From 2e1b4bb68fbc579bd2d947d9f20501dbac0c5bc6 Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Tue, 30 Jul 2024 18:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A0=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=AE=8C=E5=B7=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/fg/coms/comNoReceiptPopup.vue | 151 +++++++++++++----------- src/pages/fg/receiptNoPlan.vue | 27 +---- 2 files changed, 82 insertions(+), 96 deletions(-) diff --git a/src/pages/fg/coms/comNoReceiptPopup.vue b/src/pages/fg/coms/comNoReceiptPopup.vue index af3997f1..4a2b1bf7 100644 --- a/src/pages/fg/coms/comNoReceiptPopup.vue +++ b/src/pages/fg/coms/comNoReceiptPopup.vue @@ -34,9 +34,9 @@ {{planDate}} - - + + @@ -49,18 +49,25 @@ {{itemCode}} - {{planQty}}({{getUomInfo(uom)}}) - - - + + @click="showSelectItemCode"> - + + + 数量: + ({{getUomInfo(uom)}}) + + + + + + 包装规格: @@ -77,18 +84,15 @@ - + 批次: - + - - @@ -107,7 +111,8 @@ getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, - getProductionlineAndWorkStation + getProductionlineAndWorkStation, + getProductionlineItem } from '@/api/request2.js'; import { getPackUnitName, @@ -161,10 +166,10 @@ showItemCodeSelect: false, workStationCode: "", planDate: '', - showDateSelect:false, - planDateList:[], - fgLocationCode:"", - rawLocationCode:"" + showDateSelect: false, + planDateList: [], + fgLocationCode: "", + rawLocationCode: "" } }, props: { @@ -181,7 +186,7 @@ openRequestPopup() { this.initData(); - this.planDate =getCurrDate() + this.planDate = getCurrDate() this.batch = getBatch8() this.$refs.popup.open('bottom') }, @@ -200,17 +205,17 @@ this.batch = "" this.packUnitName = "请选择包装规格" this.packUnit = "", - this.packQtyHint = "" + this.packQtyHint = "" this.showPackUnitSelect = false // this.packUnitList = [] this.itemCodeList = [] this.showItemCodeSelect = false this.workStationCode = "" - this.planDate="" - this.showDateSelect =false - this.planDateList=[] - this.fgLocationCode="" - this.rawLocationCode="" + this.planDate = "" + this.showDateSelect = false + this.planDateList = [] + this.fgLocationCode = "" + this.rawLocationCode = "" }, @@ -226,7 +231,7 @@ this.showErrorMessage('请先选择计划日期'); return; } - + if (this.productionLineName == "请选择生产线") { this.showErrorMessage("请选择生产线") return @@ -242,6 +247,11 @@ return } + if (this.planQty <= 0) { + this.showErrorMessage("请输入完工数量") + return + } + if (this.packUnitName == "请选择包装规格") { this.showErrorMessage("请选择包装规格") return @@ -252,9 +262,10 @@ callback() { let item = { - productionLineName: this.productionLineName, - productionLineCode: this.productionLineCode, //生产线 + productionLineName: "", + productionLineCode: "", //生产线 itemCode: this.itemCode, + itemName:this.itemName, uom: this.getUomInfo(this.uom), batch: this.batch, packUnitName: this.packUnitName, @@ -263,10 +274,10 @@ packQty: this.packQty, planQty: this.planQty, goodQty: this.goodQty, - planNumber: this.planNumber, + planNumber: "", workStationCode: this.workStationCode, - fgLocationCode:this.fgLocationCode, - rawLocationCode:this.rawLocationCode + fgLocationCode: this.fgLocationCode, + rawLocationCode: this.rawLocationCode }; this.closeRequestPopup(); this.$emit("confirm", item); @@ -285,34 +296,34 @@ this.productionLineName = data[0].label + "—" + data[1].label this.productionLineCode = data[0].value this.workStationCode = data[1].value - var parent =this.productLineList.filter(res=>res.value==this.productionLineCode) - var fgLocation =parent[0].children.filter(children=>children.value==this.workStationCode) - this.fgLocationCode= fgLocation[0].fgLocationCode; + var parent = this.productLineList.filter(res => res.value == this.productionLineCode) + var fgLocation = parent[0].children.filter(children => children.value == this.workStationCode) + this.fgLocationCode = fgLocation[0].fgLocationCode; this.clearItemCode() this.clearPackUnit() - + }, - clearItemCode(){ - this.planDate =getCurrDate() - this.itemCode ="请选择物料信息" + clearItemCode() { + this.planDate = getCurrDate() + this.itemCode = "请选择物料信息" this.uom = "" this.planQty = 0; this.goodQty = 0 this.planNumber = "" }, - + confirmSelectDate(data) { - this.planDate=data[0].label + this.planDate = data[0].label }, - - showSelectDate(){ - this.showDateSelect =true; - var list =lastThreeDays(3); - this.planDateList=[] - list.forEach(res=>{ + + showSelectDate() { + this.showDateSelect = true; + var list = lastThreeDays(3); + this.planDateList = [] + list.forEach(res => { this.planDateList.push({ - label :res, - value:"" + label: res, + value: "" }) }) }, @@ -347,40 +358,38 @@ this.showErrorMessage('请先选择计划日期'); return; } - if (!this.productionLineCode) { - this.showErrorMessage('请先选择生产线'); - return; - } uni.showLoading({ title: "加载中", mask: true }) - getPlaneInfoByproductLine(this.productionLineCode, this.planDate).then(res => { + let param = { + pageSize: 20, + pageNo: 1, + productionLineCode: this.productionLineCode + }; + + getProductionlineItem(param).then(res => { uni.hideLoading() - if (res.data && res.data.length > 0) { - res.data.forEach(item => { - item.label = item.itemCode + "(" + item.planQty + this.getUomInfo(item.uom) + ")" + if (res.data.list && res.data.list.length > 0) { + res.data.list.forEach(item => { + item.label = item.itemCode item.value = item }) - this.itemCodeList = res.data + this.itemCodeList = res.data.list this.showItemCodeSelect = true } else { this.showErrorMessage('未查找到物料信息'); } - }).catch(error => { uni.hideLoading() this.showErrorMessage(error); }) }, confirmSelectItem(data) { - let productionPlan = data[0].value; - this.itemCode = productionPlan.itemCode; - this.uom = productionPlan.uom - this.planQty = productionPlan.planQty; - this.goodQty = productionPlan.goodQty - this.planNumber = productionPlan.number - + let itemInfo = data[0].value; + this.itemCode = itemInfo.itemCode; + this.uom = itemInfo.uom + //清除其他数据 this.clearPackUnit(); uni.showLoading({ @@ -396,16 +405,16 @@ .getUomInfo(item.uom) + ")"; }) this.packUnitList = res.data.list - var defaultData =res.data.list.filter(item=>item.defaultPackageunit=="TRUE") + var defaultData = res.data.list.filter(item => item.defaultPackageunit == "TRUE") this.confirmSelectPackUnit(defaultData) - } - + } + }).catch(error => { uni.hideLoading() }) }, - - clearPackUnit(){ + + clearPackUnit() { this.packUnitName = "请选择包装规格" this.packUnit = "" let pack = this.packUnitList.filter(r => r.packUnit == this.packUnit); diff --git a/src/pages/fg/receiptNoPlan.vue b/src/pages/fg/receiptNoPlan.vue index 21f978b4..a373b0bb 100644 --- a/src/pages/fg/receiptNoPlan.vue +++ b/src/pages/fg/receiptNoPlan.vue @@ -6,11 +6,6 @@ - - 生产计划:{{dataContent.planNumber}} - - - 完工库位 @@ -22,14 +17,6 @@ 计划数 {{dataContent.planQty}}{{dataContent.uom}} - - 已完工 - {{ dataContent.goodQty }}{{dataContent.uom}} - - - 未完工 - {{dataContent.noGoodQty}}{{dataContent.uom}} - @@ -49,19 +36,11 @@ {{dataContent.handleQty}}/ {{dataContent.packQtyHint}} - - - - - - - - - + @@ -388,10 +367,8 @@ isCheckMesCode(result.content).then(res => { if (res.data) { if (that.dataContent) { - var itemIndex = this.allList.findIndex(r => - r.itemCode == result.itemCode && - r.order == result.order); + r.content == result.content); //不存在 if (itemIndex == -1) { // if (this.allList.length > this.dataContent.packQty) {