From ef0092c1a83dd5e6eace543b763f483578aac6a7 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Mon, 30 Dec 2024 15:20:21 +0800 Subject: [PATCH] 1 --- src/api/production/production.js | 2 + src/views/modules/product/operatorGroup.vue | 71 ++++++++++++++++++++- src/views/modules/sys/language/common.vue | 2 +- 3 files changed, 71 insertions(+), 4 deletions(-) diff --git a/src/api/production/production.js b/src/api/production/production.js index 99010a9..65f3536 100644 --- a/src/api/production/production.js +++ b/src/api/production/production.js @@ -7,3 +7,5 @@ export const getOperatorGroupPlanHeader = data => createAPI(`/operatorGroup/getO export const getOperatorGroupPlanDetail = data => createAPI(`/operatorGroup/getOperatorGroupPlanDetail`,'Post',data) export const getOperatorGroupDefault = data => createAPI(`/operatorGroup/getOperatorGroupDefault`,'Post',data) export const saveOperatorGroupDetail= data => createAPI(`/operatorGroup/saveOperatorGroupDetail`,'Post',data) +export const deleteOperatorGroupPlan= data => createAPI(`/operatorGroup/deleteOperatorGroupPlan`,'Post',data) +export const getShiftInfoData= data => createAPI(`/operatorGroup/getShiftInfoData`,'Post',data) diff --git a/src/views/modules/product/operatorGroup.vue b/src/views/modules/product/operatorGroup.vue index 4ac1a29..77bf8ab 100644 --- a/src/views/modules/product/operatorGroup.vue +++ b/src/views/modules/product/operatorGroup.vue @@ -7,6 +7,38 @@ + + + + + + + + + + + + + + + + + + 查询 新增班次调度 @@ -204,7 +236,7 @@ import { getOperatorGroup,getOperatorGroupPlanHeader,getOperatorGroupPlanDetail, - getOperatorGroupDefault,saveOperatorGroupDetail + getOperatorGroupDefault,saveOperatorGroupDetail,deleteOperatorGroupPlan,getShiftInfoData } from "@/api/production/production.js" export default { @@ -222,10 +254,17 @@ // site:this.$store.state.user.site, operatorID:'', operatorName:'', + startDate: this.dayjs().subtract(1, 'month').format('YYYY-MM-DD HH:mm:ss'), + endDate:'', + shiftno:'', }, + shiftList:[], currentRow:{ site:'', - operatorGroupId:'' + operatorGroupId:'', + startDate: '', + endDate:'', + shiftno:'', }, currentRow2:{ site:'', @@ -443,6 +482,9 @@ changeData(row){ this.currentRow.site=row.site this.currentRow.operatorGroupId=row.operatorID + this.currentRow.startDate=this.searchData.startDate + this.currentRow.endDate=this.searchData.endDate + this.currentRow.shiftno=this.searchData.shiftno this.getGroupPlanHeaderData(); }, getData(){ @@ -572,9 +614,32 @@ } }) }, + deleteHandle(row){ + this.$confirm(`是否删除?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteOperatorGroupPlan(row).then(({data}) => { + if (data && data.code === 0) { + this.getGroupPlanHeaderData(); + this.$message.success(data.msg) + } else { + this.$message.warning(data.msg) + } + }) + }) + }, + getShiftInfo(){ + getShiftInfoData({site:this.$store.state.user.site}).then(({data}) => { + if (data && data.code === 0) { + this.shiftList=data.rows + } + }) + } }, created() { - + this.getShiftInfo(); } } diff --git a/src/views/modules/sys/language/common.vue b/src/views/modules/sys/language/common.vue index 0933870..270df7c 100644 --- a/src/views/modules/sys/language/common.vue +++ b/src/views/modules/sys/language/common.vue @@ -1,5 +1,5 @@