From f69afc7461e1c2d92a935c0228b77388637de2e4 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 22 十二月 2023 11:25:31 +0800
Subject: [PATCH] 明细单添加编辑接口+编辑产品列表赋值逻辑修改+查看时限制操作的方法逻辑修改+毛利毛利率计算给列表赋值

---
 src/views/other/commonDialog/SelectCommonDialog.vue |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 3df5f0c..aad1584 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -68,10 +68,16 @@
           editVisible: false,
           title: "",
           clientId: 0,
+          client_name: "",
           tableInfomation: []
         }
       }
-    }
+    },
+    // 鏍规嵁鎶ヤ环鍗曟煡璇骇鍝�
+    quotationNumber:{
+      type:[String,Number],
+      default:''
+    },
   },
   components: {},
   computed: {},
@@ -98,6 +104,8 @@
     this.search_map = {
       client_id: this.editConfig.clientId
     }
+    this.keyword = this.editConfig.client_name
+    this.keywordType = "瀹㈡埛鍚嶇О"
     this.setTable()
     this.getData()
   },
@@ -349,8 +357,7 @@
     // 閿�鍞槑缁嗗崟
     async getSalesDetailsList() {
       await getSalesDetailsList({
-        keyword: this.keyword,
-        keywordType: this.keywordType,
+        clientId:Number(this.editCommonConfig.clientId),
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
@@ -405,12 +412,17 @@
     },
     // 浜у搧鍚嶇О
     async getProductList() {
-      await getProductList({
+      let params={
         productName: this.keywordType === "浜у搧鍚嶇О" ? this.keyword : "",
         productNumber: this.keywordType === "浜у搧缂栧彿" ? this.keyword : "",
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
-      }).then((res) => {
+      }
+       // 鏍规嵁鎶ヤ环鍗曟煡璇骇鍝�
+      if(this.quotationNumber){
+        params.quotationNumber=this.quotationNumber
+      }
+      await getProductList(params).then((res) => {
         console.log(res.data)
         if (res.code === 200) {
           if (res.data.data && res.data.data.length > 0) {
@@ -430,8 +442,7 @@
     },
     async getSalesReturnList() {
       await getSalesReturnList({
-        keyword: this.keyword,
-        keywordType: this.keywordType,
+        clientId:Number(this.editCommonConfig.clientId),
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {

--
Gitblit v1.8.0