From 6887629cbd7c09407d25a6199d8ddd878d17da4f Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期二, 24 十月 2023 17:50:11 +0800 Subject: [PATCH] 客户管理,跟进记录,线索,发票,合同管理,总单,报价单,退款单,明细单,机会,退货单,子单,客户服务单,服务合同,服务回访单连天 --- src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue | 65 ++++++++++++++++++++++---------- 1 files changed, 45 insertions(+), 20 deletions(-) diff --git a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue index 5d4ebd6..83988e3 100644 --- a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue +++ b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue @@ -31,7 +31,22 @@ <!-- </el-col>--> <el-col :span="12"> <el-form-item label="閿�鍞満浼氱紪鍙�" prop="number"> - <WordInput + <el-input + v-if=" + editConfig.title == '缂栬緫' || + (editConfig.title == '鏂板缓' && + codenumer && + (explain != '' || isIdDisabled)) + " + :disabled="editConfig.title == '缂栬緫'" + v-model="editConfig.infomation.number" + placeholder="璇疯緭鍏ョ紪鐮�" + > + </el-input> + <span v-else-if="editConfig.title == '鏂板缓'" style="color: #f56c6c" + >璇蜂紭鍏堥厤缃紪鐮佽鑼� <el-button type="text" @click="numberClick"> 閰嶇疆瑙勮寖 </el-button></span + > + <!-- <WordInput v-if="codenumer && (explain != '' || isIdDisabled) && method == 0" :codenumer="codenumer" :sum="sum" @@ -42,7 +57,7 @@ <span v-else-if="method == 0" style="color: #f56c6c" >璇蜂紭鍏堥厤缃紪鐮佽鑼� <el-button type="text" @click="numberClick"> 閰嶇疆瑙勮寖 </el-button></span > - <span v-else>{{ editConfig.title === "鏂板缓" ? "鑷姩鐢熸垚" : editConfig.infomation.number }}</span> + <span v-else>{{ editConfig.title === "鏂板缓" ? "鑷姩鐢熸垚" : editConfig.infomation.number }}</span> --> </el-form-item> </el-col> <el-col :span="12"> @@ -576,8 +591,7 @@ import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" import { getCityList } from "@/api/common/address" -import WordInput from "@/components/wordInput.vue" -import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" +import codeMixin from "@/components/makepager/mixin/codeMixin" import { getContactList } from "@/api/client/contacts" export default { name: "AddSalesOpportunityDialog", @@ -594,7 +608,7 @@ } } }, - components: { WordInput, SelectClientDialog, SelectContactDialog }, + components: { SelectClientDialog, SelectContactDialog }, computed: { searchCommonHeight() { return this.$refs.searchCommonView.offsetHeight @@ -609,7 +623,7 @@ dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { - number: [{ required: true, message: "璇疯緭鍏ラ攢鍞満浼氱紪鍙�", trigger: "blur" }], + number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], name: [{ required: true, message: "璇疯緭鍏ユ満浼氬悕绉�", trigger: "blur" }], member_id: [{ required: true, message: "璇烽�夋嫨閿�鍞礋璐d汉", trigger: "change" }], @@ -656,6 +670,10 @@ } this.getCommonData() this.formInfo() + if (this.editConfig.title === "缂栬緫") { + this.isContact = false + this.getContactList(this.editConfig.infomation.contact_id) + } }, watch: { "editConfig.visible"(val) { @@ -663,9 +681,6 @@ this.formInfo() } }, - "editConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { formInfo() { @@ -717,9 +732,11 @@ console.log(res) this.editConfig.visible = false if (res.code === 200) { - this.$message.success("娣诲姞鎴愬姛") + this.$message.success("娣诲姞鎴愬姛锛�") this.$parent.getData() // } + }else{ + this.$message.error(res.msg?res.msg:"娣诲姞澶辫触锛�") } }) } else { @@ -727,8 +744,10 @@ console.log(res) this.editConfig.visible = false if (res.code === 200) { - this.$message.success("缂栬緫鎴愬姛") + this.$message.success("缂栬緫鎴愬姛锛�") this.$parent.getData() + }else{ + this.$message.error(res.msg?res.msg:"缂栬緫澶辫触锛�") } }) } @@ -773,22 +792,21 @@ status_id: data.status_id || 0, threats: data.threats || "", whether_established: data.whether_established || "", - remark: data.remark || "", detail_address: data.detail_address || "", codeStandID: data.ID, - codeRule: this.codeRule } return params }, // 鑾峰彇鑱旂郴浜哄垪琛� getContactList(id) { getContactList({ - clientId: id, page: 0, pageSize: 0, - search_map: {} + search_map: { + client_id: id + } }).then((res) => { if (res.code == 200) { this.contactNamelist = res.data.list @@ -814,28 +832,36 @@ handleSelectClient(value, item) { if (value === "client") { this.clientId = item.id + this.editConfig.infomation.client_name = item.name + this.editConfig.infomation.contact_name = "" + this.contactId = 0 this.isContact = false this.getContactList(item.id) } else if (value === "contact") { + this.editConfig.infomation.contact_name = item.name this.contactId = item.id } + this.refresh() }, selClientClick(value) { if (value === "client") { this.editSelectClientConfig.editVisible = true } else if (value === "contact") { this.editSelectContactConfig.editVisible = true + this.editSelectContactConfig.clientId = this.clientId } }, selClient(row, value) { if (value === "contact") { this.editConfig.infomation.contact_name = row.name this.contactId = row.id - this.isContact = false - this.getContactList(row.id) } else if (value === "client") { this.editConfig.infomation.client_name = row.name this.clientId = row.id + this.editConfig.infomation.contact_name = "" + this.contactId = 0 + this.isContact = false + this.getContactList(row.id) } this.refresh() }, @@ -873,9 +899,8 @@ }, async getCityList(val, value) { await getCityList({ province_id: val }).then((res) => { - console.log(res) - if (res.data.code === 200) { - this.cityOptions = res.data.data.list + if (res.code === 200) { + this.cityOptions = res.data.list if (value === "sel") { this.editConfig.infomation.city_id = "" } -- Gitblit v1.8.0