From c2e684e0caab67573bb2df44d6f0c73bbaedd9c7 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 20 二月 2025 17:04:11 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev

---
 src/views/business/materialOrder/copperOrder.vue |   41 +++++++++++++++++++++--------------------
 1 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/src/views/business/materialOrder/copperOrder.vue b/src/views/business/materialOrder/copperOrder.vue
index 467bc40..07ecb07 100644
--- a/src/views/business/materialOrder/copperOrder.vue
+++ b/src/views/business/materialOrder/copperOrder.vue
@@ -683,7 +683,6 @@
       if (projectNum!=0){
         this.$message.error('鍏嶆涓嶅彲閫夋嫨妫�楠岄」')
       } else {
-        const pairing = []
         let trees = this.selectTree.split(" - ")
         if (trees.length < 3) {
           this.$message.error('鏈�夋嫨瀵硅薄')
@@ -700,27 +699,29 @@
         this.addObj.model = (trees[4] == undefined ? null : trees[4])
         this.noNeedCheckLoad = true
         addRawCopperOrderExemptionOrder({
-          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
-                }
+          copperInsOrder: this.addObj,
+          sampleList: sampleList.map(a => {
+            if (a.insProduct.length > 0) {
+              a.insProduct.forEach(c => {
+                delete c.id
+              })
+            }
+            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
           })
         }).then(res => {
           this.noNeedCheckLoad = false

--
Gitblit v1.9.3