From c5d68d050a5fb84f2e60a34409809fb0b08466c5 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 28 二月 2024 15:22:13 +0800 Subject: [PATCH] 跟进记录模块 如果客户名称有值查询对应的销售机会列表,如果没有查询所有销售机会的逻辑 --- src/views/sales/salesDetails/AddSalesDetailsDialog.vue | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 38 insertions(+), 13 deletions(-) diff --git a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue index 7bcbdaf..290677e 100644 --- a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue +++ b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue @@ -115,8 +115,9 @@ @select="handleSelectClient('chance', $event)" :disabled="isNameChanceEdit || isView" ></el-autocomplete> + <!-- &&editConfig.infomation.client_name --> <div - v-if="!isNameChanceEdit && !isView&&editConfig.infomation.client_name" + v-if="!isNameChanceEdit && !isView" class="common-select-btn" @click="selClientClick('chance')" > @@ -181,6 +182,7 @@ } ]" > + <!-- isAddQuatation || --> <div class="custom-name"> <el-autocomplete v-model="editConfig.infomation.quotation_number" @@ -192,21 +194,22 @@ value-key="number" @select="handleSelectClient('quotation', $event)" style="width: 100%" - placeholder="璇峰厛閫夋嫨閿�鍞満浼�" - :disabled="isAddQuatation || isView" + placeholder="璇烽�夋嫨閿�鍞姤浠峰崟" + :disabled=" isView" ></el-autocomplete> + <!-- !isAddQuatation && editConfig.infomation.sale_chance_name &&--> <div - v-if="!isAddQuatation && !isView&&editConfig.infomation.sale_chance_name" + v-if=" !isView" class="common-select-btn" @click="selClientClick('quotation')" > <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> </div> + <!-- !isAddQuatation && --> <div v-if=" editConfig.infomation.quotation_number && editConfig.infomation.quotation_number.length > 0 && - !isAddQuatation && !isView " class="common-select-btn" @@ -917,8 +920,8 @@ this.subbillId = item.id this.editConfig.infomation.subbill_name = item.number } else if (value === "quotation") { - // this.productTableList.tableData = item.products - // this.tableData = item.products + this.productTableList.tableData = item.products + this.tableData = item.products this.editConfig.infomation.quotation_number = item.number this.quotationId = item.id } @@ -927,7 +930,9 @@ if (value === "client") { this.editSelectClientConfig.editVisible = true } else if (value === "chance") { - this.editSelectChanceConfig.clientId = this.clientId + if(this.clientId){ + this.editSelectChanceConfig.clientId = this.clientId + } this.editSelectChanceConfig.editVisible = true } else if (value === "subbill") { this.editSelCommonConfig.title = "閿�鍞瓙鍗�" @@ -935,24 +940,37 @@ this.editSelCommonConfig.clientId = this.clientId } else if (value === "quotation") { this.editSelCommonConfig.title = "鎶ヤ环鍗�" + if(this.saleChanceId&&this.clientId){ + this.editSelCommonConfig.clientId = this.clientId + // 姝e悜閫夋嫨瀹㈡埛 閿�鍞満浼� 鎶ヤ环鍗� + this.editSelCommonConfig.isRequest = false + this.editSelCommonConfig.count=this.count + this.editSelCommonConfig.tableInfomation = [...this.quotationList] + }else{ + // 鍙嶅悜閫夋嫨 + this.editSelCommonConfig.isRequest = true; + } this.editSelCommonConfig.editVisible = true - this.editSelCommonConfig.clientId = this.clientId - this.editSelCommonConfig.isRequest = false - this.editSelCommonConfig.count=this.count - this.editSelCommonConfig.tableInfomation = [...this.quotationList] } }, selClient(row, value) { if (value === "client") { this.editConfig.infomation.sale_chance_name = "" + this.saleChanceId='' this.editConfig.infomation.subbill_name = "" + // 娓呯┖鎶ヤ环鍗� + this.editConfig.infomation.quotation_number ='' this.editConfig.infomation.client_name = row.name this.clientId = row.id this.getSaleChanceList(row) this.getSubOrderList(row) } else if (value === "chance") { this.editConfig.infomation.sale_chance_name = row.name + this.editConfig.infomation.client_name = row.client.name + this.clientId = row.client.id this.saleChanceId = row.id + // 娓呯┖鎶ヤ环鍗� + this.editConfig.infomation.quotation_number ='' this.isAddQuatation = false this.getQuotation(row.id) } else if (value === "subbill") { @@ -960,8 +978,14 @@ this.subbillId = row.id } else if (value === "quotation") { this.productTableList.tableData = row.products - // this.tableData = row.products + this.tableData = row.products this.editConfig.infomation.quotation_number = row.number + //鍙嶅悜 瀹㈡埛鍚嶇О + this.editConfig.infomation.client_name = row.client.name + this.clientId = row.client.id + //鍙嶅悜 閿�鍞満浼� + this.editConfig.infomation.sale_chance_name = row.sale_chance.name + this.saleChanceId = row.sale_chance.id this.quotationId = row.id } }, @@ -990,6 +1014,7 @@ this.quotationId = 0 } this.productTableList.tableData = [] + this.tableData = [] }, // 娣诲姞闄勪欢 addAnnexClick() {}, -- Gitblit v1.8.0