From be7e754d737d6c7a689465928117edb3aa02bad4 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期五, 24 十一月 2023 11:01:40 +0800
Subject: [PATCH] 销售明细单接口修改,确认订单和推送aps合并为同一个

---
 src/views/sales/salesDetails/index.vue |   48 ++++++++++++------------------------------------
 1 files changed, 12 insertions(+), 36 deletions(-)

diff --git a/src/views/sales/salesDetails/index.vue b/src/views/sales/salesDetails/index.vue
index ca149e8..1d267bb 100644
--- a/src/views/sales/salesDetails/index.vue
+++ b/src/views/sales/salesDetails/index.vue
@@ -155,10 +155,8 @@
   getProductInventoryInfo,
   getProductOrderInfo,
   updateStatus,
-  createOperation,
   getProjectList,
-  getUpdateSalesDetails,
-  sendSalesDetailsToApsProject
+  sendSalesDetailsToOtherSystem
 } from "@/api/sales/salesDetails"
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 import DetailSpecification from "@/views/sales/salesDetails/DetailSpecification"
@@ -410,7 +408,7 @@
                   ...item,
                   client_name: item.client.name,
                   member_name: item.Member.username,
-                  source: "CRM鍚屾"
+                  source: ""
                 }
               })
               this.tableList.tableInfomation = list || []
@@ -498,16 +496,12 @@
           ...row,
           status: 2
         }
-        await createOperation(params).then((res) => {
+        console.log(params,"鐪嬬湅params")
+        await sendSalesDetailsToOtherSystem(params).then((res)=>{
           if (res.code == 200) {
-            this.$message.success("纭鎻愪氦鎴愬姛")
+            this.$message.success("鎴愬姛鎺ㄩ�佽嚦aps绯荤粺")
             this.getData()
             this.thatRow.status=2
-            sendSalesDetailsToApsProject(this.thatRow).then((res)=>{
-              if(res.code===200){
-                this.$message.success("鎴愬姛鎺ㄩ�佽嚦aps绯荤粺")
-              }
-            })
           }
         })
       }
@@ -680,32 +674,14 @@
         if(valid){
           console.log()
           this.projectListShow=false
-          getUpdateSalesDetails({
-            id:this.thatRow.id,
-            salesDetails:params
-          }).then((res) => {
-            console.log(res)
-            this.editConfig.visible = false
-            if (res.code === 200) {
-              let params2 = {
-                ...this.thatRow,
-                status: 2
-              }
-              createOperation(params2).then((res) => {
-                if (res.code == 200) {
-                  this.$message.success("鎻愪氦鎴愬姛")
-                  this.getData()
-                  this.thatRow.status=2
-                  sendSalesDetailsToApsProject(this.thatRow).then((res)=>{
-                    if(res.code===200){
-                      this.$message.success("鎴愬姛鎺ㄩ�佽嚦aps绯荤粺")
-                    }
-                  })
-                }
-              })
+          console.log(params,"閫夋嫨椤圭洰鍚庣殑params")
+          params.status=2
+          sendSalesDetailsToOtherSystem(params).then((res)=>{
+            if (res.code == 200) {
+              this.$message.success("鎴愬姛鎺ㄩ�佽嚦aps绯荤粺")
+              this.getData()
+              this.thatRow.status=2
             }
-          }).catch((err)=>{
-            this.$message.error(`缂栬緫澶辫触:${err}`)
           })
         }
       })

--
Gitblit v1.8.0