From 0f18c4e3a4943dd27e2eeb381e3c00e46218077b Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期三, 19 二月 2025 17:54:47 +0800 Subject: [PATCH] 铜材料下单-联调 --- src/views/business/materialOrder/customsInspection.vue | 77 ++++++++++++++++++-------------------- 1 files changed, 37 insertions(+), 40 deletions(-) diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue index 4f9902b..f54eec2 100644 --- a/src/views/business/materialOrder/customsInspection.vue +++ b/src/views/business/materialOrder/customsInspection.vue @@ -432,6 +432,7 @@ <script> import { + addExemptionOrder, addInsOrder, addRawMaterOrderTemplate, delRawMaterOrderTemplate, getInsOrder, @@ -995,28 +996,26 @@ this.addObj.ifsInventoryId = this.customsInspection.id this.noNeedCheckLoad = true addExemptionOrder({ - str: JSON.stringify({ - insOrder: this.addObj, - list: JSON.stringify(sampleList.map(a => { - if (a.modelNum) { - // 鏍规嵁x鍙峰垽鏂瀷鍙峰弬鏁颁笌鏍峰搧鍨嬪彿鐨勬嫾鎺ヤ綅缃� - // 渚嬪脳4锛屽氨涓�500ML脳4锛�4脳锛屽氨涓�4脳500ML - const index = a.modelNum.indexOf('脳') - if (index === 0) { - a.model = a.model + a.modelNum - } else if (index === -1) { - a.model = a.model + '-' + a.modelNum - } else { - a.model = a.modelNum + a.model - } + insOrder: this.addObj, + list: sampleList.map(a => { + if (a.modelNum) { + // 鏍规嵁x鍙峰垽鏂瀷鍙峰弬鏁颁笌鏍峰搧鍨嬪彿鐨勬嫾鎺ヤ綅缃� + // 渚嬪脳4锛屽氨涓�500ML脳4锛�4脳锛屽氨涓�4脳500ML + const index = a.modelNum.indexOf('脳') + if (index === 0) { + a.model = a.model + a.modelNum + } else if (index === -1) { + a.model = a.model + '-' + a.modelNum } else { - a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + a.model = a.modelNum + a.model } - a.insProduct = a.insProduct.filter(b=>b.state === 1) - return a - })), - pairing: JSON.stringify(pairing) - }) + } else { + a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + } + a.insProduct = a.insProduct.filter(b=>b.state === 1) + return a + }), + pairing: pairing }).then(res => { this.noNeedCheckLoad = false if (res.code == 201) return @@ -1046,28 +1045,26 @@ this.addObj.ifsInventoryId = this.customsInspection.id this.saveLoad = true addInsOrder({ - str: JSON.stringify({ - insOrder: this.addObj, - list: JSON.stringify(sampleList.map(a => { - if (a.modelNum) { - // 鏍规嵁x鍙峰垽鏂瀷鍙峰弬鏁颁笌鏍峰搧鍨嬪彿鐨勬嫾鎺ヤ綅缃� - // 渚嬪脳4锛屽氨涓�500ML脳4锛�4脳锛屽氨涓�4脳500ML - const index = a.modelNum.indexOf('脳') - if (index === 0) { - a.model = a.model + a.modelNum - } else if (index === -1) { - a.model = a.model + '-' + a.modelNum - } else { - a.model = a.modelNum + a.model - } + insOrder: this.addObj, + list: sampleList.map(a => { + if (a.modelNum) { + // 鏍规嵁x鍙峰垽鏂瀷鍙峰弬鏁颁笌鏍峰搧鍨嬪彿鐨勬嫾鎺ヤ綅缃� + // 渚嬪脳4锛屽氨涓�500ML脳4锛�4脳锛屽氨涓�4脳500ML + const index = a.modelNum.indexOf('脳') + if (index === 0) { + a.model = a.model + a.modelNum + } else if (index === -1) { + a.model = a.model + '-' + a.modelNum } else { - a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + a.model = a.modelNum + a.model } - a.insProduct = a.insProduct.filter(b=>b.state === 1) - return a - })), - pairing: JSON.stringify(pairing) - }) + } else { + a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum)) + } + a.insProduct = a.insProduct.filter(b=>b.state === 1) + return a + }), + pairing: pairing }).then(res => { this.saveLoad = false if (res.code == 201) return -- Gitblit v1.9.3