From a73b5878e0a043395736d63c8c2c8e9a8f56ab32 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 16 十月 2023 20:46:35 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into wn

---
 src/views/other/commonDialog/SelectContactDialog.vue          |    5 
 src/views/other/payment/receipt/addReceipt.vue                |    9 +-
 src/store/modules/getClientName.js                            |    3 
 src/views/client/followupRecords/AddFollowupRecordsDialog.vue |   29 ++++++-
 src/views/sales/salesDetails/AddSalesDetailsDialog.vue        |   96 ++++++++++++++----------
 src/views/other/commonDialog/SelectCommonDialog.vue           |   46 +++++++++++
 src/views/sales/salesReturn/AddSalesReturnDialog.vue          |    5 +
 src/views/sales/refundForm/index.vue                          |    2 
 src/views/other/commonDialog/SelectChanceDialog.vue           |    6 +
 src/views/other/commonDialog/SelectLeadDialog.vue             |    5 
 src/views/other/payment/receipt/index.vue                     |   13 +-
 src/views/client/followupRecords/index.vue                    |    2 
 src/views/sales/salesReturn/DetailReturn.vue                  |    3 
 src/views/sales/subOrder/DetailSubOrder.vue                   |    3 
 src/views/service/serviceContract/index.vue                   |    4 
 15 files changed, 165 insertions(+), 66 deletions(-)

diff --git a/src/store/modules/getClientName.js b/src/store/modules/getClientName.js
index 504c027..743d9f3 100644
--- a/src/store/modules/getClientName.js
+++ b/src/store/modules/getClientName.js
@@ -125,6 +125,9 @@
         }
       })
     },
+    getLeadFilter({commit},newData){
+      commit("saleLeadlist",newData)
+    },
     geMaster(context) {
       getMasterOrderList().then((res) => {
         if (res.code == 200) {
diff --git a/src/views/client/followupRecords/AddFollowupRecordsDialog.vue b/src/views/client/followupRecords/AddFollowupRecordsDialog.vue
index 1fa08a8..5a34d74 100644
--- a/src/views/client/followupRecords/AddFollowupRecordsDialog.vue
+++ b/src/views/client/followupRecords/AddFollowupRecordsDialog.vue
@@ -78,7 +78,7 @@
                   </div>
                 </el-form-item>
               </el-col>
-              <el-col v-if="isUnflod" :span="12">
+              <el-col v-if="isUnflod && !isDetail" :span="12">
                 <el-form-item label="瀹㈡埛鐘舵��" prop="client_status_id">
                   <div class="common-select">
                     <el-select
@@ -217,7 +217,7 @@
                   </div>
                 </el-form-item>
               </el-col>
-              <el-col :span="12">
+              <el-col :span="12" v-if="!isDetail">
                 <el-form-item label="閿�鍞嚎绱�" prop="sales_leads_name">
                   <div class="custom-name">
                     <!-- <el-input v-model="editConfig.infomation.sales_leads_id"></el-input> -->
@@ -401,6 +401,8 @@
 import { getContactList } from "@/api/client/contacts"
 import { mapActions } from "vuex";
 import { getSaleChanceList } from "@/api/sales/salesOpportunity";
+import { getSalesLeadsList } from "@/api/client/salesLead"
+
 
 export default {
   name: "AddFollowupRecordsDialog",
@@ -416,6 +418,10 @@
         };
       },
     },
+    isDetail: {
+      type: Boolean,
+      default: false
+    }
   },
   components: {
     SelectClientDialog,
@@ -492,16 +498,19 @@
         editVisible: false,
         title: "",
         infomation: {},
+        search_map:{}
       },
       editSelectChanceConfig: {
         editVisible: false,
         title: "",
         infomation: {},
+        search_map:{},
       },
       editSelectLeadConfig: {
         editVisible: false,
         title: "",
         infomation: {},
+        search_map:{},
       },
       clientId: this.editContactsConfig.infomation.client_id,
       contactId: this.editContactsConfig.infomation.contact_id,
@@ -531,7 +540,7 @@
     },
   },
   methods: {
-    ...mapActions(["getContactFilter"]),
+    ...mapActions(["getContactFilter","getLeadFilter"]),
     formInfo() {
       this.objCode.type = "璺熻繘璁板綍缂栫爜";
       this.objCode.codeStandID = "";
@@ -668,6 +677,10 @@
     },
     async handleSelectClient(value, item) {
       if (value === "client") {
+        console.log(item,"item")
+        this.editSelectContactConfig.search_map.client_id=item.id
+        this.editSelectChanceConfig.search_map.client_id=item.id
+        this.editSelectLeadConfig.search_map.name=item.name
         await getContactList({
         search_map:{
           client_id:item.id
@@ -679,11 +692,19 @@
             this.getContactFilter(res.data.list);
           }
         });
+        await getSalesLeadsList({
+          search_map:{
+            name:item.name
+          },
+        }).then((res) => {
+          if (res.code === 200) {
+            this.getLeadFilter(res.data.list);
+          }
+        });
         this.clientId = item.id;
         this.editConfig.infomation.client_name = item.name;
         this.isChance = false;
         this.getChanceList(item.id);
-        // console.log("clientId",this.clientId,this.editConfig.infomation.client_name)
       } else if (value === "contact") {
         this.contactId = item.id;
         this.editConfig.infomation.contact_name = item.name;
diff --git a/src/views/client/followupRecords/index.vue b/src/views/client/followupRecords/index.vue
index 72a09e5..ec8d7f6 100644
--- a/src/views/client/followupRecords/index.vue
+++ b/src/views/client/followupRecords/index.vue
@@ -50,7 +50,7 @@
       </div>
     </div>
     <!-- 鏂板缓/缂栬緫璺熻繘璁板綍 -->
-    <AddFollowupRecordsDialog v-if="editConfig.visible" :edit-contacts-config="editConfig" />
+    <AddFollowupRecordsDialog :is-detail="isDetail" v-if="editConfig.visible" :edit-contacts-config="editConfig" />
     <!-- 鑱旂郴浜鸿鎯� -->
     <DetailContacts v-if="contactsDeail.visible" :contacts-detail="contactsDeail" />
     <!-- 瀹㈡埛璇︽儏 -->
diff --git a/src/views/other/commonDialog/SelectChanceDialog.vue b/src/views/other/commonDialog/SelectChanceDialog.vue
index 2814fbc..182923d 100644
--- a/src/views/other/commonDialog/SelectChanceDialog.vue
+++ b/src/views/other/commonDialog/SelectChanceDialog.vue
@@ -54,6 +54,7 @@
         return {
           editVisible: false,
           title: "",
+          clientId: 0,
           infomation: {}
         }
       }
@@ -82,6 +83,9 @@
     }
   },
   created() {
+    this.search_map = {
+      client_id: this.editConfig.clientId
+    }
     this.setTable()
     this.getData()
   },
@@ -121,7 +125,7 @@
     async getData() {
       this.loading = true
       await getSaleChanceList({
-        search_map: this.search_map,
+        search_map: this.editCommonConfig.search_map,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       })
diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 4ea3c14..e829aa8 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -55,6 +55,7 @@
 import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder"
 import { getProductList } from "@/api/common/other"
 import { getSalesReturnList } from "@/api/sales/salesReturn"
+import { getSubOrderList } from "@/api/sales/subOrder"
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 export default {
   name: "EditSelCommonDialog",
@@ -67,6 +68,7 @@
           editVisible: false,
           title: "",
           clientId: 0,
+          client_name: "",
           tableInfomation: []
         }
       }
@@ -97,6 +99,8 @@
     this.search_map = {
       client_id: this.editConfig.clientId
     }
+    this.keyword = this.editConfig.client_name
+    this.keywordType = "瀹㈡埛鍚嶇О"
     this.setTable()
     this.getData()
   },
@@ -214,6 +218,20 @@
           tableColumn: this.setColumnVisible(this.showCol)
         }
         this.searchSel = { value: "number", label: "閿�鍞��璐у崟缂栧彿" }
+      } else if (this.editConfig.title === "閿�鍞瓙鍗�") {
+        this.tableColumn = [
+          { label: "鍗曟嵁缂栧彿", prop: "number", isClick: true, default: true }, // 鍗曟嵁缂栧彿
+          { label: "璐熻矗浜�", prop: "member_name" } // 璐熻矗浜�
+        ]
+        this.showCol = ["鍗曟嵁缂栧彿", "璐熻矗浜�"]
+        this.tableList = {
+          selectIndex: true,
+          tableInfomation: [],
+          allcol: [],
+          showcol: this.showCol,
+          tableColumn: this.setColumnVisible(this.showCol)
+        }
+        this.searchSel = { value: "number", label: "鍗曟嵁缂栧彿" }
       }
       this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
       this.searchOptions = []
@@ -252,6 +270,8 @@
         this.getProductList()
       } else if (this.editConfig.title === "閿�鍞��璐у崟") {
         this.getSalesReturnList()
+      } else if (this.editConfig.title === "閿�鍞瓙鍗�") {
+        this.getSubOrderList()
       }
     },
     // 閿�鍞�诲崟
@@ -435,6 +455,30 @@
         this.loading = false
       })
     },
+    // 閿�鍞瓙鍗�
+    async getSubOrderList() {
+      await getSubOrderList({
+        search_map: this.search_map,
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize
+      }).then((res) => {
+        if (res.code === 200) {
+          if (res.data.list && res.data.list.length > 0) {
+            const list = res.data.list.map((item) => {
+              return {
+                ...item,
+                member_name: item.member.username
+              }
+            })
+            this.tableList.tableInfomation = list || []
+            this.pagerOptions.totalCount = res.data.count
+          } else {
+            this.tableList.tableInfomation = []
+          }
+        }
+        this.loading = false
+      })
+    },
     handleClose() {
       this.editConfig.editVisible = false
     },
@@ -454,6 +498,8 @@
         this.$emit("selClient", row, "productName")
       } else if (this.editConfig.title === "閿�鍞��璐у崟") {
         this.$emit("selClient", row, "salesReturn")
+      } else if (this.editConfig.title === "閿�鍞瓙鍗�") {
+        this.$emit("selClient", row, "subbill")
       }
     },
     // 鎼滅储
diff --git a/src/views/other/commonDialog/SelectContactDialog.vue b/src/views/other/commonDialog/SelectContactDialog.vue
index 7e578d5..515a796 100644
--- a/src/views/other/commonDialog/SelectContactDialog.vue
+++ b/src/views/other/commonDialog/SelectContactDialog.vue
@@ -54,7 +54,8 @@
         return {
           editVisible: false,
           title: "",
-          infomation: {}
+          infomation: {},
+          search_map:{},
         }
       }
     }
@@ -120,7 +121,7 @@
     async getData() {
       this.loading = true
       await getContactList({
-        search_map: this.search_map,
+        search_map: this.editCommonConfig.search_map,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       })
diff --git a/src/views/other/commonDialog/SelectLeadDialog.vue b/src/views/other/commonDialog/SelectLeadDialog.vue
index f60f85a..df7f079 100644
--- a/src/views/other/commonDialog/SelectLeadDialog.vue
+++ b/src/views/other/commonDialog/SelectLeadDialog.vue
@@ -59,7 +59,8 @@
         return {
           editVisible: false,
           title: "",
-          infomation: {}
+          infomation: {},
+          search_map:{},
         }
       }
     }
@@ -93,7 +94,7 @@
     async getData() {
       this.loading = true
       await getSalesLeadsList({
-        search_map: this.search_map,
+        search_map: this.editCommonConfig.search_map,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       })
diff --git a/src/views/other/payment/receipt/addReceipt.vue b/src/views/other/payment/receipt/addReceipt.vue
index da78aa7..ed5daa4 100644
--- a/src/views/other/payment/receipt/addReceipt.vue
+++ b/src/views/other/payment/receipt/addReceipt.vue
@@ -87,10 +87,10 @@
                 </el-form-item>
               </el-col>
               <el-col v-else :span="12">
-                <el-form-item label="鍚堝悓璁㈠崟">
+                <el-form-item label="閿�鍞槑缁嗗崟" prop="saleDetailNumber">
                   <div class="custom-name">
                     <el-autocomplete
-                      v-model="editConfig.infomation.number"
+                      v-model="editConfig.infomation.saleDetailNumber"
                       :fetch-suggestions="
                         (queryString, callback) => {
                           querySearchAsync(queryString, callback, 'contract')
@@ -104,7 +104,7 @@
                       <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
                     </div>
                     <div
-                      v-if="editConfig.infomation.number && editConfig.infomation.number.length > 0"
+                      v-if="editConfig.infomation.saleDetailNumber && editConfig.infomation.saleDetailNumber.length > 0"
                       class="common-select-btn"
                       @click="clearupClient('contract')"
                     >
@@ -359,7 +359,8 @@
       rules: {
         client_name: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: "change" }],
         signTime: [{ required: true, message: "璇烽�夋嫨鏀舵鏃ユ湡", trigger: "change" }],
-        memberId: [{ required: true, message: "璇烽�夋嫨閿�鍞礋璐d汉", trigger: "change" }]
+        memberId: [{ required: true, message: "璇烽�夋嫨閿�鍞礋璐d汉", trigger: "change" }],
+        saleDetailNumber: [{ required: true, message: "璇烽�夋嫨閿�鍞槑缁嗗崟", trigger: "change" }]
         // approvalOpinion: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }]
       },
       memberOptions: [],
diff --git a/src/views/other/payment/receipt/index.vue b/src/views/other/payment/receipt/index.vue
index 3e8365e..3270ab7 100644
--- a/src/views/other/payment/receipt/index.vue
+++ b/src/views/other/payment/receipt/index.vue
@@ -146,8 +146,7 @@
     }
     this.getData()
   },
-  mounted() {
-  },
+  mounted() {},
   methods: {
     setTable() {
       this.tableList = {
@@ -188,7 +187,7 @@
           sourceType: sourceTyle,
           page: this.pagerOptions.currPage,
           pageSize: this.pagerOptions.pageSize,
-          client_id:this.addConfig.client_id,
+          client_id: this.addConfig.client_id
         }
       } else {
         params = {
@@ -196,13 +195,13 @@
           keywordType: this.keywordType,
           page: this.pagerOptions.currPage,
           pageSize: this.pagerOptions.pageSize,
-          client_id:this.addConfig.client_id,
+          client_id: this.addConfig.client_id
         }
       }
       await getReceiptList(params)
         .then((res) => {
-          if (res.data.code === 200) {
-            const resList = res?.data?.data?.data ?? []
+          if (res.code === 200) {
+            const resList = res?.data?.data ?? []
             if (resList.length > 0) {
               const list = resList.map((item) => {
                 return {
@@ -213,7 +212,7 @@
                 }
               })
               this.tableList.tableInfomation = list || []
-              this.pagerOptions.totalCount = res.data.data.count
+              this.pagerOptions.totalCount = res.data.count
             } else {
               this.tableList.tableInfomation = []
             }
diff --git a/src/views/sales/refundForm/index.vue b/src/views/sales/refundForm/index.vue
index 51638cf..77593ed 100644
--- a/src/views/sales/refundForm/index.vue
+++ b/src/views/sales/refundForm/index.vue
@@ -237,7 +237,7 @@
     addBtnClick() {
       this.editConfig.visible = true
       this.editConfig.title = "鏂板缓"
-      this.editConfig.infomation = { currency: "浜烘皯甯�" }
+      this.editConfig.infomation = { currency: "浜烘皯甯�", ...this.addConfig }
     },
     // 缂栬緫
     handleClick(row) {
diff --git a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
index 6e15d36..6166496 100644
--- a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
+++ b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -119,7 +119,7 @@
                       @select="handleSelectClient('subbill', $event)"
                       :disabled="isNameChanceEdit"
                     ></el-autocomplete>
-                    <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('client')">
+                    <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('subbill')">
                       <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
                     </div>
                     <div
@@ -403,6 +403,12 @@
         :edit-common-config="editSelectChanceConfig"
         @selClient="selClient"
       />
+      <!-- 閿�鍞瓙鍗� -->
+      <SelectCommonDialog
+        v-if="editSelCommonConfig.editVisible"
+        :edit-common-config="editSelCommonConfig"
+        @selClient="selClient"
+      />
       <!-- 鏂板缓 鏀舵璁″垝 -->
       <AddCollectionPlan v-if="addCollectionConfig.visible" :edit-common-config="addCollectionConfig" />
     </el-dialog>
@@ -417,10 +423,11 @@
 import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog"
 import AddCollectionPlan from "@/views/other/payment/collectionPlan/AddCollectionPlan"
 import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"
-import { getSaleChanceList} from "@/api/sales/salesOpportunity"
+import { getSaleChanceList } from "@/api/sales/salesOpportunity"
 import { getSubOrderList } from "@/api/sales/subOrder"
+import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
 
-import {mapActions} from "vuex"
+import { mapActions } from "vuex"
 
 export default {
   name: "AddSalesDetailsDialog",
@@ -437,17 +444,17 @@
       }
     }
   },
-  components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog, AddCollectionPlan },
+  components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog, AddCollectionPlan, SelectCommonDialog },
   computed: {
     clientList() {
       return this.$store.state.getClientName.clientList
-    },
-    saleChancelist() {
-      return this.$store.state.getClientName.saleChancelist
-    },
-    subOrderList(){
-      return this.$store.state.getClientName.subOrderList
     }
+    // saleChancelist() {
+    //   return this.$store.state.getClientName.saleChancelist
+    // },
+    // subOrderList() {
+    //   return this.$store.state.getClientName.subOrderList
+    // }
   },
   data() {
     return {
@@ -483,9 +490,14 @@
         title: "",
         infomation: {}
       },
+      editSelCommonConfig: {
+        editVisible: false,
+        title: "",
+        infomation: {}
+      },
       clientId: this.editCommonConfig.infomation.client_id,
       saleChanceId: this.editCommonConfig.infomation.saleChanceId,
-      subbillId:this.editCommonConfig.infomation.subbillId,
+      subbillId: this.editCommonConfig.infomation.subbillId,
       productId: 1,
       isNoProduct: true,
       addCollectionConfig: {
@@ -499,8 +511,8 @@
   },
   created() {
     this.$store.dispatch("geClient")
-    this.$store.dispatch("geChance")
-    this.$store.dispatch("getSubunit")
+    // this.$store.dispatch("geChance")
+    // this.$store.dispatch("getSubunit")
     this.setTableForm()
     this.getCommonData()
     this.formInfo()
@@ -522,7 +534,7 @@
     }
   },
   methods: {
-    ...mapActions(["getChanceFilter","getSubunitFliter"]), 
+    ...mapActions(["getChanceFilter", "getSubunitFliter"]),
     formInfo() {
       this.objCode.type = "閿�鍞槑缁嗙紪鐮�"
       this.objCode.codeStandID = ""
@@ -642,16 +654,11 @@
       var restaurants = []
       if (value === "client") {
         restaurants = this.clientList
-        console.log(restaurants,"瀹㈡埛鍗�")
+        console.log(restaurants, "瀹㈡埛鍗�")
       } else if (value === "chance") {
         restaurants = this.saleChancelist
-      }else if(value==="subbill"){
-        let arr=[]
-         this.subOrderList.map((item)=>{
-          arr.push(item.client)
-         })
-         restaurants=arr
-        console.log("瀛愪腹",restaurants,arr)
+      } else if (value === "subbill") {
+        restaurants = this.subOrderList
       }
       var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants
       cb(results)
@@ -667,34 +674,43 @@
         this.editConfig.infomation.client_name = item.name
         // 闇�瑕佷慨鏀�
         await getSaleChanceList({
-          client_id:this.clientId
-        }).then((res)=>{
+          page: 1,
+          pageSize: 15,
+          search_map: {
+            client_id: item.id
+          }
+        }).then((res) => {
+          console.log(res)
+          this.saleChancelist = res.data.list
         })
         await getSubOrderList({
-          page:1,
-          pageSize:15,
-          search_map:{
-            client_id:item.id
+          page: 1,
+          pageSize: 15,
+          search_map: {
+            client_id: item.id
           }
-        }).then((res)=>{
-          this.getSubunitFliter(res.data.list)
+        }).then((res) => {
+          this.subOrderList = res.data.list
         })
       } else if (value === "chance") {
         this.saleChanceId = item.id
         this.editConfig.infomation.client_name = item.name
-      }else if(value==="subbill"){
-        console.log("涓嬫媺妗嗙偣鍑�",item)
+      } else if (value === "subbill") {
+        console.log("涓嬫媺妗嗙偣鍑�", item)
         this.subbillId = item.id
-        this.editConfig.infomation.subbill_name = item.name
+        this.editConfig.infomation.subbill_name = item.number
       }
     },
     selClientClick(value) {
       if (value === "client") {
         this.editSelectClientConfig.editVisible = true
       } else if (value === "chance") {
+        this.editSelectChanceConfig.clientId = this.clientId
         this.editSelectChanceConfig.editVisible = true
-      }else if(value==="subbill"){
-        this.editSelectChanceConfig.editVisible = true
+      } else if (value === "subbill") {
+        this.editSelCommonConfig.title = "閿�鍞瓙鍗�"
+        this.editSelCommonConfig.editVisible = true
+        this.editSelCommonConfig.clientId = this.clientId
       }
     },
     selClient(row, value) {
@@ -704,9 +720,9 @@
       } else if (value === "chance") {
         this.editConfig.infomation.sale_chance_name = row.name
         this.saleChanceId = row.id
-      }else if(value==="subbill"){
-        this.editConfig.infomation.subbill_name = row.name
-        this.subbillId=row.id
+      } else if (value === "subbill") {
+        this.editConfig.infomation.subbill_name = row.number
+        this.subbillId = row.id
       }
     },
     // 娓呴櫎宸查�夋嫨鐢ㄦ埛
@@ -717,9 +733,9 @@
       } else if (value === "chance") {
         this.editConfig.infomation.sale_chance_name = ""
         this.saleChanceId = 0
-      }else if(value==="subbill"){
+      } else if (value === "subbill") {
         this.editConfig.infomation.subbill_name = ""
-        this.subbillId=0
+        this.subbillId = 0
       }
     },
     // 娣诲姞闄勪欢
diff --git a/src/views/sales/salesReturn/AddSalesReturnDialog.vue b/src/views/sales/salesReturn/AddSalesReturnDialog.vue
index c59f472..c09db0d 100644
--- a/src/views/sales/salesReturn/AddSalesReturnDialog.vue
+++ b/src/views/sales/salesReturn/AddSalesReturnDialog.vue
@@ -478,6 +478,7 @@
       } else if (value === "contract") {
         this.editSelCommonConfig.title = "閿�鍞槑缁嗗崟"
         this.editSelCommonConfig.editVisible = true
+        this.editSelCommonConfig.client_name = this.editConfig.infomation.client_name
       }
     },
     selClient(row, value) {
@@ -488,6 +489,8 @@
       } else if (value === "contract") {
         this.editConfig.infomation.salesDetailNumber = row.number
         this.SalesDetailsId = row.id
+        this.productTableList.tableData = row.products
+        this.tableData = row.products
       }
     },
     // 娓呴櫎宸查�夋嫨鐢ㄦ埛
@@ -497,6 +500,8 @@
         this.clientId = 0
       } else if (value === "contract") {
         this.editConfig.infomation.salesDetailNumber = ""
+        this.productTableList.tableData = []
+        this.tableData = []
         this.SalesDetailsId = 0
       }
     },
diff --git a/src/views/sales/salesReturn/DetailReturn.vue b/src/views/sales/salesReturn/DetailReturn.vue
index bd1d6f5..d482301 100644
--- a/src/views/sales/salesReturn/DetailReturn.vue
+++ b/src/views/sales/salesReturn/DetailReturn.vue
@@ -178,7 +178,8 @@
       client_name: this.detailConfig.infomation.client.name,
       contact_name: this.detailConfig.infomation.contact_name,
       client_id: this.detailConfig.infomation.client_id,
-      contact_id: this.detailConfig.infomation.contact_id
+      contact_id: this.detailConfig.infomation.contact_id,
+      sale_return_nunber: this.detailConfig.infomation.number
     }
     this.setTableForm()
   },
diff --git a/src/views/sales/subOrder/DetailSubOrder.vue b/src/views/sales/subOrder/DetailSubOrder.vue
index 64b3d2f..9046af6 100644
--- a/src/views/sales/subOrder/DetailSubOrder.vue
+++ b/src/views/sales/subOrder/DetailSubOrder.vue
@@ -136,7 +136,8 @@
       client_name: this.detailConfig.infomation.client.name,
       contact_name: this.detailConfig.infomation.contact_name,
       client_id: this.detailConfig.infomation.client_id,
-      contact_id: this.detailConfig.infomation.contact_id
+      contact_id: this.detailConfig.infomation.contact_id,
+      subbill_name: this.detailConfig.infomation.number
     }
     this.setTableForm()
   },
diff --git a/src/views/service/serviceContract/index.vue b/src/views/service/serviceContract/index.vue
index 7bc06b1..d56d3d6 100644
--- a/src/views/service/serviceContract/index.vue
+++ b/src/views/service/serviceContract/index.vue
@@ -271,9 +271,9 @@
       this.editConfig.infomation = {
         ...this.addConfig,
         currency: "浜烘皯甯�",
-        client_name: "",
+        client_name: Object.keys(this.addConfig).length === 0 ? "" : this.addConfig.client_name,
         contact_name: "",
-        sale_chance_name: "",
+        sale_chance_name: Object.keys(this.addConfig).length === 0 ? "" : this.addConfig.sale_chance_name,
         contract_number: "",
         quotation_number: ""
       }

--
Gitblit v1.8.0