From 44fa3282cd2dc9089c96dba228227fc884045eff Mon Sep 17 00:00:00 2001 From: ruanqi Date: Mon, 23 May 2022 17:35:23 +0800 Subject: [PATCH] =?UTF-8?q?0505=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/production/dailyPlan.js | 2 + src/views/modules/production/dailyPlan.vue | 1 + .../modules/production/search_schedule.vue | 186 +++++++++++++++++- 3 files changed, 188 insertions(+), 1 deletion(-) diff --git a/src/api/production/dailyPlan.js b/src/api/production/dailyPlan.js index b1174a6..c2438ef 100644 --- a/src/api/production/dailyPlan.js +++ b/src/api/production/dailyPlan.js @@ -33,3 +33,5 @@ export const resourceCapacityLoadingData=data => createAPI(`/dailyPlan/resource export const checkScheduleLoad=data => createAPI(`/dailyPlan/checkScheduleLoad`,'post',data) // 获取 export const getProduceScheduleList = data => createAPI('/dailyPlan/getProduceScheduleData', 'POST', data) +// 物料缺料检查 +export const getPartCheckData = data => createAPI('/dailyPlan/getPartCheckData', 'POST', data) diff --git a/src/views/modules/production/dailyPlan.vue b/src/views/modules/production/dailyPlan.vue index 2f8f2f9..07bcd5b 100644 --- a/src/views/modules/production/dailyPlan.vue +++ b/src/views/modules/production/dailyPlan.vue @@ -1048,6 +1048,7 @@ }) }, getTodayShiftNo () { + this.searchData.shiftNo=''; let inData = { scheduledate: this.searchData.scheduleDate, site: this.searchData.site, diff --git a/src/views/modules/production/search_schedule.vue b/src/views/modules/production/search_schedule.vue index 9d43f60..1437652 100644 --- a/src/views/modules/production/search_schedule.vue +++ b/src/views/modules/production/search_schedule.vue @@ -66,6 +66,9 @@ class="el-button el-button--primary el-button--medium"> 导出 + 缺料检查 + @@ -82,6 +85,7 @@ :data="dataList" border :row-class-name="routingRowClassName2" + @selection-change="selectionChangeHandle" v-loading="dataListLoading" style="width: 100%;margin-top: -20px"> 关闭--> + + 关闭 + + + + + + + + + + 只显示缺料的物料 + + + + 查询 + + + 导出 + + + + + + + + + + + + + + + + + + + + + 关闭 + + @@ -144,7 +245,8 @@ printMaterialLabel, } from "@/views/modules/production/print_serialNo_label.js" import { - getProduceScheduleList + getProduceScheduleList, + getPartCheckData, } from '@/api/production/dailyPlan.js' import { printSerialNo, @@ -158,6 +260,14 @@ }, data () { return { + partCheckData:{ + site:'', + partNo:'', + checkFlag:'Y', + seqNoData:'', + }, + searchFlag:false, + modelFlag2:false, sum1:'', sum2:'', sum3:'', @@ -168,8 +278,17 @@ exportName: "排产日计划清单"+this.dayjs().format('YYYYMMDDHHmmss'), exportFooter: [], // 导出 end + + // 导出 start + exportData2: [], + exportName2: "缺料检查清单"+this.dayjs().format('YYYYMMDDHHmmss'), + exportHeader2: ["缺料检查清单"], + exportFooter2: [], + // 导出 end height:200, + partCheckList:[], dataList:[], + dataListSelections:[], dataListLoading: false, columnArray: [ { @@ -683,6 +802,9 @@ }) }, methods: { + selectionChangeHandle (val) { + this.dataListSelections = val + }, getBaseData(val){ if (this.tagNo === 88){ this.searchData.resourceId = val.ResourceID @@ -836,6 +958,68 @@ // return 'customer-row-2'; // } }, + partCheckModal(){ + if(this.dataListSelections.length==0){ + this.$alert('请先勾选日计划!', '错误', { + confirmButtonText: '确定' + }) + return false; + } + let sql=''; + for (let i = 0; i < this.dataListSelections.length; i++) { + if(i == 0){ + sql+=this.dataListSelections[i].seqNo; + }else { + sql+=','+this.dataListSelections[i].seqNo; + } + } + this.partCheckData={ + site:this.$store.state.user.site, + partNo:'', + checkFlag:'Y', + seqNoData: sql + } + getPartCheckData(this.partCheckData).then(({data}) => { + this.partCheckList=data.rows; + }) + this.modelFlag2=true; + }, + refreshPartCheckData(){ + this.searchFlag=true; + getPartCheckData(this.partCheckData).then(({data}) => { + this.searchFlag=false; + this.partCheckList=data.rows; + }) + }, + //导出excel + createExportData2() { + + return this.partCheckList; + + }, + startDownload2() { + // this.exportData = this.dataList + + }, + finishDownload2() { + + }, + fields2() { + + let s = { + '零部件编码':'componentPartNo', + '零部件名称':'partDesc', + '规格型号':'partSpec', + '计量单位':'partUm', + '需求数量':'qtyRequired', + '库存数量':'calQtyOnHand', + '缺料数量':'calQtyShorage', + } + + return s + + }, + // 导出 end } }