From 587985e3c62e10166c22ab0d8641fd087314538f Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Fri, 19 Jul 2024 10:44:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qualityInspectionBoxBtn/dialogForm.vue | 197 ++++++++------ .../quality/qualityInspectionBoxBtn/index.vue | 79 +++--- .../quality/qualityInspectionDet/index.vue | 21 +- .../quality/qualityInspectionType/index.vue | 19 +- .../quality/qualityScrapDet/add-or-updata.vue | 135 +++++----- .../quality/qualityScrapDet/index.vue | 35 +-- .../qualityScrapType/add-or-updata.vue | 20 -- .../quality/qualityScrapType/index.vue | 34 +-- .../equipmentTraceability/index.vue | 246 ++++-------------- .../monitoring/materielDateFrom/index.vue | 78 ++---- .../monitoring/processTraceability/index.vue | 120 ++------- .../rawMaterialTraceability/index.vue | 125 +-------- .../quality/qualityInspectionRecord/index.vue | 23 +- src/views/quality/qualityScrapLog/index.vue | 52 ++-- 14 files changed, 432 insertions(+), 752 deletions(-) diff --git a/src/views/devConfig/quality/qualityInspectionBoxBtn/dialogForm.vue b/src/views/devConfig/quality/qualityInspectionBoxBtn/dialogForm.vue index 0cae68d9..6253c041 100644 --- a/src/views/devConfig/quality/qualityInspectionBoxBtn/dialogForm.vue +++ b/src/views/devConfig/quality/qualityInspectionBoxBtn/dialogForm.vue @@ -6,37 +6,67 @@ --> diff --git a/src/views/devConfig/quality/qualityScrapDet/index.vue b/src/views/devConfig/quality/qualityScrapDet/index.vue index 189fa59a..6bb2f75d 100644 --- a/src/views/devConfig/quality/qualityScrapDet/index.vue +++ b/src/views/devConfig/quality/qualityScrapDet/index.vue @@ -9,11 +9,12 @@ :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" - :table-data="tableData"> + :table-data="tableData" + :max-height="tableH"> @@ -21,7 +22,7 @@ + width="50%"> @@ -46,32 +47,38 @@ import { deleteQualityScrapDet, } from '@/api/base/qualityScrapDet'; import { getList } from '@/api/base/qualityScrapType'; +import tableHeightMixin from '@/mixins/tableHeightMixin'; const tableProps = [ { prop: 'createTime', label: '添加时间', filter: parseTime, + width: 160, }, { prop: 'content', label: '报废原因', + showOverflowtooltip: true, }, { prop: 'code', label: '报废原因编码', + showOverflowtooltip: true, }, { prop: 'typeName', label: '报废类型', + showOverflowtooltip: true, }, { prop: 'remark', label: '备注', + showOverflowtooltip: true, }, ]; export default { - mixins: [basicPage], + mixins: [basicPage, tableHeightMixin], data() { return { urlOptions: { @@ -109,6 +116,7 @@ export default { labelField: 'name', valueField: 'id', param: 'typeId', + filterable: true, }, { type: 'button', @@ -129,6 +137,11 @@ export default { plain: true, }, ], + listQuery: { + pageNo: 1, + pageSize: 20, + }, + total: 0, }; }, components: { @@ -144,7 +157,7 @@ export default { this.dataListLoading = true; this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.tableData = response.data.list; - this.listQuery.total = response.data.total; + this.total = response.data.total; this.dataListLoading = false; }); }, @@ -157,20 +170,10 @@ export default { switch (val.btnName) { case 'search': this.listQuery.pageNo = 1; - this.listQuery.pageSize = 10; this.listQuery.content = val.content ? val.content : undefined; this.listQuery.typeId = val.typeId ? val.typeId : undefined; this.getDataList(); break; - case 'reset': - this.$refs.searchBarForm.resetForm(); - this.listQuery = { - pageSize: 10, - pageNo: 1, - total: 1, - }; - this.getDataList(); - break; case 'add': this.addOrEditTitle = '新增'; this.addOrUpdateVisible = true; diff --git a/src/views/devConfig/quality/qualityScrapType/add-or-updata.vue b/src/views/devConfig/quality/qualityScrapType/add-or-updata.vue index 0358535b..26e83799 100644 --- a/src/views/devConfig/quality/qualityScrapType/add-or-updata.vue +++ b/src/views/devConfig/quality/qualityScrapType/add-or-updata.vue @@ -55,7 +55,6 @@ import { getQualityScrapType, getCode, } from '@/api/base/qualityScrapType'; -// import { getMaterialList } from "@/api/base/material"; export default { mixins: [basicAdd], @@ -75,9 +74,7 @@ export default { description: undefined, remark: undefined, }, - // materialList: [], dataRule: { - // materialId: [{ required: true, message: "", trigger: "blur" }], code: [ { required: true, message: '报废类型编码不能为空', trigger: 'blur' }, ], @@ -87,22 +84,5 @@ export default { }, }; }, - mounted() { - // this.getDict() - console.log('我看看', this.dataForm); - }, - methods: { - // async getDict() { - // // 物料列表 - // const res = await getMaterialList(); - // this.materialList = res.data; - // }, - // setMaterialCode() { - // const chooseM = this.materialList.filter(item => { - // return item.id === this.dataForm.materialId - // }) - // this.dataForm.materialCode = chooseM[0].code - // } - }, }; diff --git a/src/views/devConfig/quality/qualityScrapType/index.vue b/src/views/devConfig/quality/qualityScrapType/index.vue index dc7e7605..9750239e 100644 --- a/src/views/devConfig/quality/qualityScrapType/index.vue +++ b/src/views/devConfig/quality/qualityScrapType/index.vue @@ -9,11 +9,12 @@ :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" - :table-data="tableData"> + :table-data="tableData" + :max-height="tableH"> @@ -21,7 +22,7 @@ + width="50%"> @@ -45,33 +46,39 @@ import { getQualityScrapTypePage, deleteQualityScrapType, } from '@/api/base/qualityScrapType'; +import tableHeightMixin from '@/mixins/tableHeightMixin'; const tableProps = [ { prop: 'createTime', label: '添加时间', filter: parseTime, + width: 160, }, { prop: 'name', label: '报废类型', + showOverflowtooltip: true, }, { prop: 'code', label: '报废类型编码', + showOverflowtooltip: true, }, { prop: 'description', label: '描述信息', + showOverflowtooltip: true, }, { prop: 'remark', label: '备注', + showOverflowtooltip: true, }, ]; export default { - mixins: [basicPage], + mixins: [basicPage, tableHeightMixin], data() { return { urlOptions: { @@ -121,6 +128,11 @@ export default { plain: true, }, ], + listQuery: { + pageNo: 1, + pageSize: 20, + }, + total: 0, }; }, components: { @@ -133,7 +145,7 @@ export default { this.dataListLoading = true; this.urlOptions.getDataListURL(this.listQuery).then((response) => { this.tableData = response.data.list; - this.listQuery.total = response.data.total; + this.total = response.data.total; this.dataListLoading = false; }); }, @@ -141,19 +153,9 @@ export default { switch (val.btnName) { case 'search': this.listQuery.pageNo = 1; - this.listQuery.pageSize = 10; this.listQuery.name = val.name ? val.name : undefined; this.getDataList(); break; - case 'reset': - this.$refs.searchBarForm.resetForm(); - this.listQuery = { - pageSize: 10, - pageNo: 1, - total: 1, - }; - this.getDataList(); - break; case 'add': this.addOrEditTitle = '新增'; this.addOrUpdateVisible = true; diff --git a/src/views/quality/monitoring/equipmentTraceability/index.vue b/src/views/quality/monitoring/equipmentTraceability/index.vue index 77e101eb..9e2d0892 100644 --- a/src/views/quality/monitoring/equipmentTraceability/index.vue +++ b/src/views/quality/monitoring/equipmentTraceability/index.vue @@ -1,10 +1,3 @@ - - diff --git a/src/views/quality/monitoring/materielDateFrom/index.vue b/src/views/quality/monitoring/materielDateFrom/index.vue index e7bd7a88..0d9ab707 100644 --- a/src/views/quality/monitoring/materielDateFrom/index.vue +++ b/src/views/quality/monitoring/materielDateFrom/index.vue @@ -1,10 +1,3 @@ -