diff --git a/pages/hdyy/ccgl/sh-instore.vue b/pages/hdyy/ccgl/sh-instore.vue index 5b77011..e31f213 100644 --- a/pages/hdyy/ccgl/sh-instore.vue +++ b/pages/hdyy/ccgl/sh-instore.vue @@ -19,7 +19,7 @@ diff --git a/pages/hdyy/scgl/point-quhuo.vue b/pages/hdyy/scgl/point-quhuo.vue index 4f342a3..2cdc563 100644 --- a/pages/hdyy/scgl/point-quhuo.vue +++ b/pages/hdyy/scgl/point-quhuo.vue @@ -103,7 +103,6 @@ bagCode: '', num: null, dataList: [], - // dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}], disabled: false }; }, @@ -149,11 +148,18 @@ async _getPalletAssemblyOK () { try { let res = await getPalletAssemblyOK(this.bagCode) - if (res && res.data.length > 0) { - this.dataList = [...res.data] + if (res) { + const existingItem = this.dataList.find(item => item.bag_code === res.data.bag_code) + if (!existingItem) { + this.dataList.push(res.data) + } else { + uni.showToast({ + title: '袋码已存在,不能重复插入', + icon: 'none' + }) + } this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0) } else { - this.dataList = [] } } catch (e) { this.dataList = [] diff --git a/pages/hdyy/scgl/sc-chuliao.vue b/pages/hdyy/scgl/sc-chuliao.vue index 8f89b66..0bd5ddc 100644 --- a/pages/hdyy/scgl/sc-chuliao.vue +++ b/pages/hdyy/scgl/sc-chuliao.vue @@ -21,6 +21,7 @@ @@ -76,8 +77,8 @@ - - + + @@ -98,7 +99,6 @@ val2: '', num: null, dataList: [], - // dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}], disabled: false }; }, @@ -108,12 +108,19 @@ methods: { toEmpty () { this.val1 = '' + this.val2 = '' + this.num = null this.dataList = [] this.disabled = false }, selectChange (e) { this.index = e }, + handleChange (e) { + if (e) { + this._getGroupBucketInfo() + } + }, async _getGroupBucketInfo () { try { let res = await getGroupBucketInfo(this.val1) @@ -127,14 +134,14 @@ this.dataList = [] } }, - async _productionLine () { + async _productionLine (type) { this.disabled = true if (!this.val1 || !this.val2) { this.disabled = false return } try { - let res = await productionLine(this.val1, this.val2) + let res = await productionLine(this.val1, this.val2, type) if (res) { uni.showToast({ title: res.message, diff --git a/pages/hdyy/scgl/sl-huiku.vue b/pages/hdyy/scgl/sl-huiku.vue index 2c648d4..3d70f1b 100644 --- a/pages/hdyy/scgl/sl-huiku.vue +++ b/pages/hdyy/scgl/sl-huiku.vue @@ -11,6 +11,7 @@ @@ -66,7 +67,8 @@ - + + @@ -85,8 +87,8 @@ title: '', val1: '', num: null, + flag: false, dataList: [], - // dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}], disabled: false }; }, @@ -96,6 +98,8 @@ methods: { toEmpty () { this.val1 = '' + this.num = null + this.flag = false this.dataList = [] this.disabled = false }, @@ -118,12 +122,20 @@ // }) } }, + handleChange (e) { + if (e) { + this._getGroupInfo() + } + }, async _getGroupInfo () { try { let res = await getGroupInfo(this.val1) if (res && res.data.length > 0) { this.dataList = [...res.data] this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0) + if(!res.data.length) { + this.flag = true + } } else { this.dataList = [] } diff --git a/pages/hdyy/scgl/tp-callmater.vue b/pages/hdyy/scgl/tp-callmater.vue index f9c3357..3634a46 100644 --- a/pages/hdyy/scgl/tp-callmater.vue +++ b/pages/hdyy/scgl/tp-callmater.vue @@ -55,7 +55,7 @@ - + {{i+1}} {{e.struct_code}} {{e.material_code}} @@ -64,7 +64,7 @@ {{e.qty}} {{e.qty_unit_name}} {{e.supp_name}} - {{e.material_type_id}} + {{e.class_name}} {{e.material_spec}} {{e.material_model}} {{e.vehicle_code}} @@ -84,7 +84,7 @@