From e780aafba97d07959e55a3d5f9c549f4e84bda2a Mon Sep 17 00:00:00 2001 From: rq Date: Fri, 12 Aug 2022 21:39:48 +0800 Subject: [PATCH] 11 --- src/api/production/generateReport.js | 2 + src/views/modules/production/dailyPlan.vue | 30 +++++- .../modules/production/dailyPlanReport.vue | 26 +++++- .../modules/production/generateReport.vue | 43 ++++----- .../modules/production/scheduleForSOTask.vue | 27 +++++- .../production/scheduleForShopOrder.vue | 28 +++++- .../modules/production/soscheduleRouting.vue | 92 ++++++++++++------- src/views/modules/sys/user.vue | 7 ++ 8 files changed, 193 insertions(+), 62 deletions(-) diff --git a/src/api/production/generateReport.js b/src/api/production/generateReport.js index 19cbaf6..27fe9f7 100644 --- a/src/api/production/generateReport.js +++ b/src/api/production/generateReport.js @@ -12,3 +12,5 @@ export const getSOScheduleRoutingData = data => createAPI(`dailyPlan/getSOSchedu // 获取生产报告信息 export const saveGenerateReportForSchedule = data => createAPI(`dailyPlan/saveGenerateReportForSchedule`, 'post', data); + +export const cancelJob = data => createAPI(`dailyPlan/cancelJob`, 'post', data); diff --git a/src/views/modules/production/dailyPlan.vue b/src/views/modules/production/dailyPlan.vue index aaf9a82..080077e 100644 --- a/src/views/modules/production/dailyPlan.vue +++ b/src/views/modules/production/dailyPlan.vue @@ -76,7 +76,8 @@ placeholder="选择日期"> - + + 物料编码 @@ -306,6 +307,8 @@ + + @@ -319,9 +322,12 @@ delPlan, savePlans } from '@/api/production.js' - + import Chooselist from '@/views/modules/common/Chooselist' export default { name: 'productionDispatch', + components: { + Chooselist + }, data () { return { @@ -383,7 +389,8 @@ planStatus: 'ROUND(a.LotSize,3) >ROUND(ISNULL(so.scheduling_size,0),3)' }, // table高度 - height: 200 + height: 200, + tagNo:'', } }, mounted () { @@ -392,6 +399,23 @@ }) }, methods: { + // 获取基础数据列表S + getBaseList (val,type) { + this.tagNo = val + this.$nextTick(() => { + let strVal = '' + if (val === 5) { + strVal = this.searchData.partNo + } + this.$refs.baseList.init(val, strVal) + }) + }, + /* 列表方法的回调 */ + getBaseData (val) { + if (this.tagNo === 5) { + this.searchData.partNo = val.PartNo + } + }, search () { this.getData() }, diff --git a/src/views/modules/production/dailyPlanReport.vue b/src/views/modules/production/dailyPlanReport.vue index 48c87ea..fb87d2f 100644 --- a/src/views/modules/production/dailyPlanReport.vue +++ b/src/views/modules/production/dailyPlanReport.vue @@ -7,7 +7,8 @@ - + + 物料编码 @@ -172,6 +173,8 @@ 关闭 + + @@ -183,8 +186,12 @@ dailyPlanReportsSave } from "@/api/production.js" import decimalUtil from '../../../utils/decimalUtil' + import Chooselist from '@/views/modules/common/Chooselist' export default { name: 'dailyPlanReport', + components: { + Chooselist + }, data () { return { reportsModalFlag:false, @@ -215,6 +222,7 @@ }, dataListSelections:[], + tagNo:'', } }, mounted() { @@ -223,6 +231,22 @@ }) }, methods: { + getBaseList (val,type) { + this.tagNo = val + this.$nextTick(() => { + let strVal = '' + if (val === 5) { + strVal = this.searchData.partNo + } + this.$refs.baseList.init(val, strVal) + }) + }, + /* 列表方法的回调 */ + getBaseData (val) { + if (this.tagNo === 5) { + this.searchData.partNo = val.PartNo + } + }, selectionChangeHandle (val) { this.dataListSelections = val }, diff --git a/src/views/modules/production/generateReport.vue b/src/views/modules/production/generateReport.vue index 6d3eaa5..70a9602 100644 --- a/src/views/modules/production/generateReport.vue +++ b/src/views/modules/production/generateReport.vue @@ -48,10 +48,12 @@ placeholder="选择日期"> - + + 操作员姓名 - + + 机台ID @@ -564,34 +566,33 @@ this.$nextTick(() => { let strVal = '' if (val === 24) { - strVal = this.searchData.workCenterNo - } else if (val === 26) { - this.operatorType = type - if (type === 1) { - strVal = this.saveHeaderData.operatorId - } else if (type === 2) { - strVal = this.saveHeaderData.operatorId2 - } + strVal = this.searchData.sWorkCenterNo + } + if (val === 5) { + strVal = this.searchData.partNo + } + if (val === 26) { + strVal = this.searchData.operatorName + } + if (val === 88) { + strVal = this.searchData.sResourceID } this.$refs.baseList.init(val, strVal) }) }, /* 列表方法的回调 */ getBaseData (val) { - console.log(val) if (this.tagNo === 24) { - this.searchData.workCenterNo = val.WorkCenterNo - } else if (this.tagNo === 26) { - if (this.operatorType === 1) { - this.saveHeaderData.operatorId = val.OperatorID - this.saveHeaderData.operatorName = val.OperatorName - } else if (this.operatorType === 2) { - this.saveHeaderData.operatorId2 = val.OperatorID - this.saveHeaderData.operatorIdName2 = val.OperatorName - } - } else if (this.tagNo === 5) { + this.searchData.sWorkCenterNo = val.WorkCenterNo + } else if (this.tagNo === 5) { this.searchData.partNo = val.PartNo } + if (this.tagNo === 26) { + this.searchData.operatorName = val.OperatorName + } + if (this.tagNo === 88) { + this.searchData.sResourceID = val.ResourceID + } }, initReportModal (row) { this.setUp.reviewFlag = true diff --git a/src/views/modules/production/scheduleForSOTask.vue b/src/views/modules/production/scheduleForSOTask.vue index 457ba8e..160a655 100644 --- a/src/views/modules/production/scheduleForSOTask.vue +++ b/src/views/modules/production/scheduleForSOTask.vue @@ -42,7 +42,8 @@ - + + 物料编码 @@ -366,6 +367,7 @@ + @@ -376,9 +378,12 @@ getAvailableResourceList, scheduleForSOTask, } from "@/api/production.js" - + import Chooselist from '@/views/modules/common/Chooselist' export default { name: 'scheduleForSOTask', + components: { + Chooselist + }, data () { return { // 导出 start @@ -444,6 +449,7 @@ availableResourceList: [], schedulingModalTableData: [], operatorIdList:[], + tagNo:'', } }, mounted() { @@ -452,6 +458,23 @@ }) }, methods: { + // 获取基础数据列表S + getBaseList (val,type) { + this.tagNo = val + this.$nextTick(() => { + let strVal = '' + if (val === 5) { + strVal = this.searchData.partNo + } + this.$refs.baseList.init(val, strVal) + }) + }, + /* 列表方法的回调 */ + getBaseData (val) { + if (this.tagNo === 5) { + this.searchData.partNo = val.PartNo + } + }, search(){ getSOTastRoutingData(this.searchData).then(({data}) => { this.tableData = data.rows; diff --git a/src/views/modules/production/scheduleForShopOrder.vue b/src/views/modules/production/scheduleForShopOrder.vue index e69a406..cbfe66c 100644 --- a/src/views/modules/production/scheduleForShopOrder.vue +++ b/src/views/modules/production/scheduleForShopOrder.vue @@ -79,7 +79,8 @@ placeholder="选择日期"> - + + 物料编码 @@ -419,6 +420,7 @@ + @@ -429,9 +431,12 @@ getAvailableResourceList, scheduleForShopOrder, } from "@/api/production.js" - + import Chooselist from '@/views/modules/common/Chooselist' export default { name: 'searchDailyPlan', + components: { + Chooselist + }, data () { return { // 导出 start @@ -501,6 +506,8 @@ availableResourceList: [], schedulingModalTableData: [], operatorIdList:[], + + tagNo:'', } }, mounted() { @@ -509,6 +516,23 @@ }) }, methods: { + // 获取基础数据列表S + getBaseList (val,type) { + this.tagNo = val + this.$nextTick(() => { + let strVal = '' + if (val === 5) { + strVal = this.searchData.partNo + } + this.$refs.baseList.init(val, strVal) + }) + }, + /* 列表方法的回调 */ + getBaseData (val) { + if (this.tagNo === 5) { + this.searchData.partNo = val.PartNo + } + }, search(){ getShopOrderRoutingData(this.searchData).then(({data}) => { this.tableData = data.rows; diff --git a/src/views/modules/production/soscheduleRouting.vue b/src/views/modules/production/soscheduleRouting.vue index 31cce89..463a7a9 100644 --- a/src/views/modules/production/soscheduleRouting.vue +++ b/src/views/modules/production/soscheduleRouting.vue @@ -48,10 +48,12 @@ placeholder="选择日期"> - + + 操作员姓名 - + + 机台ID @@ -85,16 +87,16 @@ :data="tableData" border style="width: 100%"> - - - - - - - - - - + + + import { getSOScheduleRoutingData - , saveGenerateReportForSchedule + , cancelJob } from '@/api/production/generateReport.js' import Chooselist from '@/views/modules/common/Chooselist' @@ -337,34 +339,33 @@ this.$nextTick(() => { let strVal = '' if (val === 24) { - strVal = this.searchData.workCenterNo - } else if (val === 26) { - this.operatorType = type - if (type === 1) { - strVal = this.saveHeaderData.operatorId - } else if (type === 2) { - strVal = this.saveHeaderData.operatorId2 - } + strVal = this.searchData.sWorkCenterNo + } + if (val === 5) { + strVal = this.searchData.partNo + } + if (val === 26) { + strVal = this.searchData.operatorName + } + if (val === 88) { + strVal = this.searchData.sResourceID } this.$refs.baseList.init(val, strVal) }) }, /* 列表方法的回调 */ getBaseData (val) { - console.log(val) if (this.tagNo === 24) { - this.searchData.workCenterNo = val.WorkCenterNo - } else if (this.tagNo === 26) { - if (this.operatorType === 1) { - this.saveHeaderData.operatorId = val.OperatorID - this.saveHeaderData.operatorName = val.OperatorName - } else if (this.operatorType === 2) { - this.saveHeaderData.operatorId2 = val.OperatorID - this.saveHeaderData.operatorIdName2 = val.OperatorName - } - } else if (this.tagNo === 5) { + this.searchData.sWorkCenterNo = val.WorkCenterNo + } else if (this.tagNo === 5) { this.searchData.partNo = val.PartNo } + if (this.tagNo === 26) { + this.searchData.operatorName = val.OperatorName + } + if (this.tagNo === 88) { + this.searchData.sResourceID = val.ResourceID + } }, search () { @@ -392,7 +393,32 @@ let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() return Y + M + D + H + MM + S }, - + cancelJob(row){ + if(row.qtyReported>0){ + this.$alert('该派工单已经有报工无法取消!', '错误', { + confirmButtonText: '确定' + }) + return false + } + this.$confirm(`确定取消此派工单`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + cancelJob(row).then(({data}) => { + if (data && data.code === 0) { + this.search (); + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + } + }) + } + }) + }) + } }, created () { diff --git a/src/views/modules/sys/user.vue b/src/views/modules/sys/user.vue index 4c7bb67..612638d 100644 --- a/src/views/modules/sys/user.vue +++ b/src/views/modules/sys/user.vue @@ -21,6 +21,13 @@ align="center" label="用户名"> + +