From 982c43dfa3ae432923373bea8d6aa80eae8ba82c Mon Sep 17 00:00:00 2001 From: jinna Date: Thu, 30 Apr 2026 17:46:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E4=B8=8E=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statisticalAnalysis/index.vue | 14 ++- .../production/executionProcess.vue | 48 +++++++--- .../production/executionWorkorder.vue | 40 +++++--- .../production/processDeatils.vue | 66 ++++++++----- .../production/workorderDetails.vue | 57 ++++++++---- .../qualificationAnalysis.vue | 52 +++++++---- .../tankSolutionSystem/info.vue | 93 +++++++++++-------- .../tankSolutionTaskAssignment.vue | 42 ++++++--- .../tankSolutionTaskDispose.vue | 36 +++++-- 9 files changed, 300 insertions(+), 148 deletions(-) diff --git a/src/views/productionSchedulingPlan/statisticalAnalysis/index.vue b/src/views/productionSchedulingPlan/statisticalAnalysis/index.vue index 53c651ff..9f2f1576 100644 --- a/src/views/productionSchedulingPlan/statisticalAnalysis/index.vue +++ b/src/views/productionSchedulingPlan/statisticalAnalysis/index.vue @@ -15,6 +15,7 @@ @refresh-change="refreshChange" :summary-method="summaryMethod" + @sort-change="sortChange" > @@ -117,7 +118,7 @@ export default { calcHeight: 32, simplePage: false, searchShow: true, - searchMenuSpan: 6, + searchMenuSpan: 18, searchIcon: true, searchIndex: 3, tree: false, @@ -224,6 +225,17 @@ export default { }; }, methods: { + // 字段排序 + sortChange({ prop, order }){ + this.query.descs = undefined; + this.query.ascs = undefined; + const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase() + const orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : orderByField; + this.onLoad(this.page, this.query); + }, getRealColumnWidths() { return new Promise(resolve => { this.$nextTick(() => { diff --git a/src/views/productionSchedulingPlan/statisticalAnalysis/production/executionProcess.vue b/src/views/productionSchedulingPlan/statisticalAnalysis/production/executionProcess.vue index 0eac7bf6..9a68373e 100644 --- a/src/views/productionSchedulingPlan/statisticalAnalysis/production/executionProcess.vue +++ b/src/views/productionSchedulingPlan/statisticalAnalysis/production/executionProcess.vue @@ -15,6 +15,7 @@ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" + @sort-change="sortChange" > @@ -129,7 +130,7 @@ export default { label: '作业中心', prop: 'workCenterName', search: false, - sortable: true, + sortable: "custom", span: 12, }, { @@ -137,7 +138,7 @@ export default { prop: 'workCenterId', search: true, hide: true, - sortable: true, + sortable: "custom", span: 12, width: 120, searchOrder: 19, @@ -163,7 +164,7 @@ export default { label: '工艺能力', prop: 'craftName', search: false, - sortable: true, + sortable: "custom", span: 12, searchOrder: 17, }, @@ -172,7 +173,7 @@ export default { prop: 'caId', hide: true, search: true, - sortable: true, + sortable: "custom", span: 12, width: 120, searchOrder: 17, @@ -198,7 +199,7 @@ export default { label: '工序', prop: 'processName', search: false, - sortable: true, + sortable: "custom", span: 12, searchOrder: 16, }, @@ -206,7 +207,7 @@ export default { label: '工序', prop: 'ppsId', search: true, - sortable: true, + sortable: "custom", hide: true, span: 12, searchOrder: 16, @@ -232,7 +233,7 @@ export default { label: '工序执行次数', prop: 'totalCount', search: false, - sortable: true, + sortable: "custom", span: 12, width: 150, }, @@ -240,7 +241,7 @@ export default { label: '准时偏差(±分钟)', prop: 'interval', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', hide: true, @@ -251,49 +252,49 @@ export default { label: '提前开工', prop: 'earlyStartCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '准时开工', prop: 'onTimeStartCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '延迟开工', prop: 'delayStartCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '提前完工', prop: 'earlyFinishCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '准时完工', prop: 'onTimeFinishCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '延迟完工', prop: 'delayFinishCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '工序完成时间', prop: 'cycledate', search: true, - sortable: true, + sortable: "custom", hide: true, span: 12, type: 'date', @@ -322,6 +323,17 @@ export default { this.onLoad(this.page, this.query); }, methods: { + // 字段排序 + sortChange({ prop, order }){ + this.query.descs = undefined; + this.query.ascs = undefined; + const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase() + const orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : orderByField; + this.onLoad(this.page, this.query); + }, onChangeData() {}, toDetail(row, type) { row.interval = this.query.interval; @@ -443,6 +455,12 @@ export default { if (!!params.ppsId) { query_.ppsId = params.ppsId; } + if(this.query.ascs){ + query_.ascs = this.query.ascs; + } + if(this.query.descs){ + query_.descs = this.query.descs; + } getProcessExecutePage(page.currentPage, page.pageSize, query_).then(res => { this.data = res.data.data.records; this.loading = false; diff --git a/src/views/productionSchedulingPlan/statisticalAnalysis/production/executionWorkorder.vue b/src/views/productionSchedulingPlan/statisticalAnalysis/production/executionWorkorder.vue index 9dfb38f5..b5e950d1 100644 --- a/src/views/productionSchedulingPlan/statisticalAnalysis/production/executionWorkorder.vue +++ b/src/views/productionSchedulingPlan/statisticalAnalysis/production/executionWorkorder.vue @@ -16,6 +16,7 @@ @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" + @sort-change="sortChange" > @@ -129,7 +130,7 @@ export default { label: '作业中心', prop: 'workCenterName', search: false, - sortable: true, + sortable: "custom", span: 12, }, { @@ -137,7 +138,7 @@ export default { prop: 'workCenterId', search: true, hide: true, - sortable: true, + sortable: "custom", span: 12, width: 120, searchOrder: 19, @@ -163,7 +164,7 @@ export default { label: '准时偏差(±分钟)', prop: 'interval', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', hide: true, @@ -174,7 +175,7 @@ export default { label: '车间订单数量', prop: 'totalCount', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', }, @@ -182,49 +183,49 @@ export default { label: '提前开工', prop: 'earlyStartCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '准时开工', prop: 'onTimeStartCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '延迟开工', prop: 'delayStartCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '提前完工', prop: 'earlyFinishCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '准时完工', prop: 'onTimeFinishCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '延迟完工', prop: 'delayFinishCount', search: false, - sortable: true, + sortable: "custom", span: 12, }, { label: '订单完成时间', prop: 'cycledate', search: true, - sortable: true, + sortable: "custom", hide: true, span: 12, type: 'date', @@ -254,6 +255,17 @@ export default { // this.$refs.crud.refreshTable(); }, methods: { + // 字段排序 + sortChange({ prop, order }){ + this.query.descs = undefined; + this.query.ascs = undefined; + const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase() + const orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : orderByField; + this.onLoad(this.page, this.query); + }, onChangeData() {}, toDetail(row, type) { // console.log(909090,row, type); @@ -370,6 +382,12 @@ export default { if (!!this.query.workCenterId) { query_.workCenterId = this.query.workCenterId; } + if(this.query.ascs){ + query_.ascs = this.query.ascs; + } + if(this.query.descs){ + query_.descs = this.query.descs; + } getCenterExecuteList(query_).then(res => { this.data = res.data.data; diff --git a/src/views/productionSchedulingPlan/statisticalAnalysis/production/processDeatils.vue b/src/views/productionSchedulingPlan/statisticalAnalysis/production/processDeatils.vue index 9be00cb1..cd7986d8 100644 --- a/src/views/productionSchedulingPlan/statisticalAnalysis/production/processDeatils.vue +++ b/src/views/productionSchedulingPlan/statisticalAnalysis/production/processDeatils.vue @@ -15,6 +15,7 @@ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" + @sort-change="sortChange" > @@ -91,7 +92,7 @@ export default { label: '作业中心', prop: 'workCenterName', search: false, - sortable: true, + sortable: "custom", span: 12, width: 150, }, @@ -100,7 +101,7 @@ export default { prop: 'workCenterId', search: true, hide: true, - sortable: true, + sortable: "custom", span: 12, width: 120, searchOrder: 15, @@ -127,7 +128,7 @@ export default { label: '车间订单号', prop: 'woCode', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -137,7 +138,7 @@ export default { label: '零件号', prop: 'partCode', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -147,7 +148,7 @@ export default { label: '零件名称', prop: 'partName', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -156,7 +157,7 @@ export default { label: '批次号', prop: 'batchNo', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -166,7 +167,7 @@ export default { label: '流程卡号', prop: 'cardNo', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -176,7 +177,7 @@ export default { label: '工艺能力', prop: 'craftName', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -185,7 +186,7 @@ export default { prop: 'caId', hide: true, search: true, - sortable: true, + sortable: "custom", span: 12, width: 120, searchOrder: 13, @@ -211,7 +212,7 @@ export default { label: '工序', prop: 'processName', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -219,7 +220,7 @@ export default { label: '工序', prop: 'ppsId', search: true, - sortable: true, + sortable: "custom", hide: true, span: 12, searchOrder: 12, @@ -246,7 +247,7 @@ export default { label: '加工班组', prop: 'teamName', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -256,7 +257,7 @@ export default { label: '班组', prop: 'makeTeam', search: true, - sortable: true, + sortable: "custom", hide: true, span: 12, searchLabelWidth: 'auto', @@ -274,7 +275,7 @@ export default { label: '计划开始时间', prop: 'planStartTime', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -283,7 +284,7 @@ export default { label: '实际开始时间', prop: 'factStartTime', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -292,7 +293,7 @@ export default { label: '开工类型', prop: 'startType', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -317,7 +318,7 @@ export default { label: '计划完成时间', prop: 'planEndTime', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -326,7 +327,7 @@ export default { label: '实际完成时间', prop: 'factEndTime', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -335,7 +336,7 @@ export default { label: '完工类型', prop: 'endType', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -360,7 +361,7 @@ export default { label: '计划时长(分钟)', prop: 'planDurationMinute', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 180, @@ -369,7 +370,7 @@ export default { label: '实际时长(分钟)', prop: 'factDurationMinute', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 180, @@ -378,7 +379,7 @@ export default { label: '偏差时长(分钟)', prop: 'biasDurationMinute', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 180, @@ -388,7 +389,7 @@ export default { label: '工序完成时间', prop: 'cycledate', search: true, - sortable: true, + sortable: "custom", hide: true, span: 12, type: 'date', @@ -404,7 +405,7 @@ export default { label: '准时偏差(±分钟)', prop: 'interval', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', hide: true, @@ -464,6 +465,17 @@ export default { this.onLoad(this.page,this.query); }, methods: { + // 字段排序 + sortChange({ prop, order }){ + this.query.descs = undefined; + this.query.ascs = undefined; + const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase() + const orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : orderByField; + this.onLoad(this.page, this.query); + }, onChangeData() {}, formatDate(date) { const year = date.getFullYear(); @@ -601,6 +613,12 @@ export default { if (!!this.query.makeTeam) { query_.makeTeam = this.query.makeTeam; } + if(this.query.ascs){ + query_.ascs = this.query.ascs + } + if(this.query.descs){ + query_.descs = this.query.descs + } getProcessExecuteDetailPage(page.currentPage, page.pageSize, query_).then(res => { this.data = res.data.data.records; this.loading = false; diff --git a/src/views/productionSchedulingPlan/statisticalAnalysis/production/workorderDetails.vue b/src/views/productionSchedulingPlan/statisticalAnalysis/production/workorderDetails.vue index fa04f39b..bbb1caff 100644 --- a/src/views/productionSchedulingPlan/statisticalAnalysis/production/workorderDetails.vue +++ b/src/views/productionSchedulingPlan/statisticalAnalysis/production/workorderDetails.vue @@ -15,6 +15,7 @@ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" + @sort-change="sortChange" > @@ -91,7 +92,7 @@ export default { label: '作业中心', prop: 'workCenterName', search: false, - sortable: true, + sortable: "custom", span: 12, width: 150, }, @@ -100,7 +101,7 @@ export default { prop: 'workCenterId', search: true, hide: true, - sortable: true, + sortable: "custom", span: 12, width: 120, searchOrder: 17, @@ -128,7 +129,7 @@ export default { label: '车间订单号', prop: 'woCode', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -138,7 +139,7 @@ export default { label: '零件号', prop: 'partCode', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -149,7 +150,7 @@ export default { label: '零件名称', prop: 'partName', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -158,7 +159,7 @@ export default { label: '批次号', prop: 'batchNo', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -168,7 +169,7 @@ export default { label: '流程卡号', prop: 'cardNo', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -178,7 +179,7 @@ export default { label: '接收时间', prop: 'receiveTime', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -187,7 +188,7 @@ export default { label: '计划开始时间', prop: 'planStartTime', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -196,7 +197,7 @@ export default { label: '实际开始时间', prop: 'factStartTime', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -205,7 +206,7 @@ export default { label: '开工类型', prop: 'startType', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -230,7 +231,7 @@ export default { label: '计划完成时间', prop: 'planEndTime', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -239,7 +240,7 @@ export default { label: '实际完成时间', prop: 'factEndTime', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -248,7 +249,7 @@ export default { label: '完工类型', prop: 'endType', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 150, @@ -273,7 +274,7 @@ export default { label: '计划时长(分钟)', prop: 'planDurationMinute', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 180, @@ -282,7 +283,7 @@ export default { label: '实际时长(分钟)', prop: 'factDurationMinute', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 180, @@ -291,7 +292,7 @@ export default { label: '偏差时长(分钟)', prop: 'biasDurationMinute', search: false, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', width: 180, @@ -301,7 +302,7 @@ export default { label: '订单完成时间', prop: 'cycledate', search: true, - sortable: true, + sortable: "custom", hide: true, span: 12, type: 'date', @@ -317,7 +318,7 @@ export default { label: '准时偏差(±分钟)', prop: 'interval', search: true, - sortable: true, + sortable: "custom", span: 12, searchLabelWidth: 'auto', hide: true, @@ -369,6 +370,17 @@ export default { this.onLoad(this.page, this.query); }, methods: { + // 字段排序 + sortChange({ prop, order }){ + this.query.descs = undefined; + this.query.ascs = undefined; + const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase() + const orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : orderByField; + this.onLoad(this.page, this.query); + }, onChangeData() {}, formatDate(date) { const year = date.getFullYear(); @@ -494,6 +506,13 @@ export default { if (!!params.interval) { query_.interval = params.interval; } + if(this.query.ascs){ + query_.ascs = this.query.ascs; + } + + if(this.query.descs){ + query_.descs = this.query.descs; + } getOrderExecuteDetailPage(page.currentPage, page.pageSize, query_).then(res => { this.data = res.data.data.records; diff --git a/src/views/productionSchedulingPlan/statisticalAnalysis/qualificationAnalysis.vue b/src/views/productionSchedulingPlan/statisticalAnalysis/qualificationAnalysis.vue index db30f46f..d498682b 100644 --- a/src/views/productionSchedulingPlan/statisticalAnalysis/qualificationAnalysis.vue +++ b/src/views/productionSchedulingPlan/statisticalAnalysis/qualificationAnalysis.vue @@ -16,6 +16,7 @@ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" + @sort-change="sortChange" > @@ -90,7 +91,7 @@ export default { label: '车间订单号', prop: 'woCode', search: true, - sortable: true, + sortable: "custom", width: 180, span: 12, searchOrder: 18, @@ -100,7 +101,7 @@ export default { label: '零件号', prop: 'partCode', search: true, - sortable: true, + sortable: "custom", width: 150, span: 12, searchOrder: 19, @@ -109,7 +110,7 @@ export default { label: '零件名称', prop: 'partName', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -117,7 +118,7 @@ export default { label: '批次号', prop: 'batchNo', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -125,7 +126,7 @@ export default { label: '流程卡号', prop: 'cardNo', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -133,7 +134,7 @@ export default { label: '质量等级', prop: 'productIdent', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, searchOrder: 13, @@ -142,7 +143,7 @@ export default { label: '质量等级', prop: 'productIdentId', search: true, - sortable: true, + sortable: "custom", width: 150, span: 12, searchOrder: 13, @@ -161,7 +162,7 @@ export default { label: '工序', prop: 'processName', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, searchOrder: 16, @@ -170,7 +171,7 @@ export default { label: '工序', prop: 'processId', search: true, - sortable: true, + sortable: "custom", hide: true, span: 12, searchOrder: 16, @@ -196,7 +197,7 @@ export default { label: '工艺能力', prop: 'craftName', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, searchOrder: 17, @@ -206,7 +207,7 @@ export default { prop: 'craftId', hide: true, search: true, - sortable: true, + sortable: "custom", span: 12, width: 120, searchOrder: 17, @@ -232,7 +233,7 @@ export default { label: '资质要求', prop: 'certificateName', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, searchOrder: 15, @@ -241,7 +242,7 @@ export default { label: '资质要求', prop: 'certificateId', search: true, - sortable: true, + sortable: "custom", width: 150, span: 12, searchOrder: 15, @@ -260,7 +261,7 @@ export default { label: '作业中心', prop: 'workCenterName', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -268,7 +269,7 @@ export default { label: '加工班组', prop: 'teamName', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -276,7 +277,7 @@ export default { label: '计划加工人', prop: 'teamMembers', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -284,7 +285,7 @@ export default { label: '实际加工人', prop: 'factTeamMembers', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -292,7 +293,7 @@ export default { label: '是否按资质加工', prop: 'isQua', search: true, - sortable: true, + sortable: "custom", width: 150, span: 12, searchOrder: 14, @@ -313,7 +314,7 @@ export default { label: '工序完成时间', prop: 'factEndTime', search: false, - sortable: true, + sortable: "custom", width: 150, span: 12, }, @@ -322,7 +323,7 @@ export default { prop: 'cycledate', hide: true, search: true, - sortable: true, + sortable: "custom", width: 150, span: 12, type: 'date', @@ -350,6 +351,17 @@ export default { this.onLoad(this.page, this.query); }, methods: { + // 字段排序 + sortChange({ prop, order }){ + this.query.descs = undefined; + this.query.ascs = undefined; + const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase() + const orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : orderByField; + this.onLoad(this.page, this.query); + }, onChangeData(val, type) { if (val && type == 'craftId') { this.query.craftName = val.caName; diff --git a/src/views/qualityManagement/tankSolutionSystem/info.vue b/src/views/qualityManagement/tankSolutionSystem/info.vue index 50cc41b4..db66234c 100644 --- a/src/views/qualityManagement/tankSolutionSystem/info.vue +++ b/src/views/qualityManagement/tankSolutionSystem/info.vue @@ -3,14 +3,16 @@ + @refresh-change="refreshChange" @on-load="onLoad" + @sort-change="sortChange" + > @@ -96,6 +98,7 @@ import addEditInfoDialog from './components/addEditInfoDialog.vue' import basicImport from '@/components/basic-import/main.vue' // import calculateNeedValuesByFormula fro/m '@/utils/calculateNeedValuesByFormula' import {getList,getDetail,deleteInfo,getManager,getPerson,getTeam,setBatch,getWorkCenter} from '@/api/tankSolutionSystem/info' +import { mapGetters } from 'vuex'; export default { components: { dispatcherDialog, addEditInfoDialog,basicImport }, data() { @@ -108,6 +111,7 @@ export default { '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', , '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31' ], + query:{}, isShowImport:false, excelBox: false, loading: false, @@ -155,7 +159,7 @@ export default { index: false, showOverflowTooltip: true, searchLabelPosition: 'left', - searchLabelPosition: 'left', + searchLabelWidth: 'auto', searchGutter: 24, searchSpan: 6, menuAlign: 'center', @@ -167,7 +171,7 @@ export default { label: '作业中心', prop: 'wcName', type: 'select', - sortable: true, + sortable: "custom", width: 150, filterable: true, span: 8, @@ -190,7 +194,7 @@ export default { prop: 'workTankId', search: true, type: 'select', - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -212,7 +216,7 @@ export default { prop: 'drugName', search: false, type: 'select', - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -232,7 +236,7 @@ export default { prop: 'drugMaterialCode', search: false, type: 'select', - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -260,7 +264,7 @@ export default { prop: 'drugMaterialName', disabled: true, search: false, - sortable: true, + sortable: "custom", width: 150, filter: true, span: 8, @@ -276,7 +280,7 @@ export default { label: '分析项目', prop: 'testElement', search: true, - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -292,7 +296,7 @@ export default { label: '规范上下限', prop: 'proContent', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, hide: true, @@ -309,7 +313,7 @@ export default { label: '规范上限', prop: 'normValueMax', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, display: false, @@ -327,7 +331,7 @@ export default { label: '规范下限', prop: 'normValueMin', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, display: false, @@ -345,7 +349,7 @@ export default { label: '目标上下限', prop: 'targetLimit', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, hide: true, @@ -362,7 +366,7 @@ export default { label: '目标上限', prop: 'targetValueMax', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, addDisplay: false, @@ -381,7 +385,7 @@ export default { label: '目标下限', prop: 'targetValueMin', search: false, - sortable: true, + sortable: "custom", addDisplay: false, viewDisplay: false, editDisplay: false, @@ -400,7 +404,7 @@ export default { label: '目标值', prop: 'targetValue', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -416,7 +420,7 @@ export default { label: '体积', prop: 'volume', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -426,7 +430,7 @@ export default { label: '测量值单位', prop: 'testUnit', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -436,7 +440,7 @@ export default { label: '加药量单位', prop: 'addUnit', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -446,7 +450,7 @@ export default { label: '添加点', prop: 'fillingLocation', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -457,7 +461,7 @@ export default { prop: 'addDrugFormulaName', search: false, type: 'select', - sortable: true, + sortable: "custom", width: 160, filter: true, span: 8, @@ -492,7 +496,7 @@ export default { label: '化验频率', prop: 'jobType', search: false, - sortable: true, + sortable: "custom", addDisplay: false, viewDisplay: false, editDisplay: false, @@ -511,7 +515,7 @@ export default { label: '测试周期(天)', prop: 'analysisCycle', search: false, - sortable: true, + sortable: "custom", type: 'date', width: 140, filter: true, @@ -528,7 +532,7 @@ export default { label: '有效期', prop: 'validDate', search: false, - sortable: true, + sortable: "custom", type: 'date', width: 120, filter: true, @@ -546,7 +550,7 @@ export default { label: '上次化验日期', prop: 'lastTest', search: false, - sortable: true, + sortable: "custom", addDisplay: false, viewDisplay: false, editDisplay: false, @@ -566,7 +570,7 @@ export default { prop: 'testUserRealName', type: 'select', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -583,7 +587,7 @@ export default { prop: 'processUserRealName', type: 'select', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -600,7 +604,7 @@ export default { prop: 'tsName', type: 'select', search: false, - sortable: true, + sortable: "custom", width: 120, filter: true, span: 8, @@ -616,7 +620,7 @@ export default { label: '更新时间', prop: 'updateTime', search: false, - sortable: true, + sortable: "custom", width: 160, addDisplay: false, viewDisplay: false, @@ -635,7 +639,7 @@ export default { label: '分析周期', prop: 'assayCycle1', search: false, - sortable: true, + sortable: "custom", hide: true, width: 120, filter: true, @@ -706,7 +710,21 @@ export default { this.getPersonList() this.getWorkCenterList() }, + computed: { + ...mapGetters(['permission']), + }, methods: { + // 字段排序 + sortChange({ prop, order }){ + this.query.descs = undefined; + this.query.ascs = undefined; + const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase() + const orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : orderByField; + this.onLoad(this.page, this.query); + }, // 主管工艺下拉 getManagerList(){ getManager().then(res =>{ @@ -853,6 +871,7 @@ export default { getList({ current:this.page.currentPage, size:this.page.pageSize, + ...this.query, workCenterId:this.search.wcName ? this.search.wcName : '', workTankId:this.search.workTankId ? this.search.workTankId : '', testElement:this.search.testElement ? this.search.testElement : '' diff --git a/src/views/qualityManagement/tankSolutionSystem/tankSolutionTaskAssignment.vue b/src/views/qualityManagement/tankSolutionSystem/tankSolutionTaskAssignment.vue index b654019e..5a929ee5 100644 --- a/src/views/qualityManagement/tankSolutionSystem/tankSolutionTaskAssignment.vue +++ b/src/views/qualityManagement/tankSolutionSystem/tankSolutionTaskAssignment.vue @@ -3,19 +3,21 @@ + @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" + @sort-change="sortChange" + >