From 05d33b5bb924e52b9e6185a1006b31a53370d350 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期二, 25 七月 2023 18:34:30 +0800 Subject: [PATCH] bug(4455)修复 --- src/views/other/commonDialog/SelectContactDialog.vue | 185 ++++++++++++++++++++ src/store/modules/getClientName.js | 29 +++ src/views/client/salesLead/index.vue | 4 src/views/sales/quotation/AddQuotationDialog.vue | 90 +++++++-- src/views/client/followupRecords/AddFollowupRecordsDialog.vue | 115 ++++++++++-- src/views/client/salesLead/AddSalesLeadDialog.vue | 50 ++--- src/views/sales/salesDetails/AddSalesDetailsDialog.vue | 30 +- 7 files changed, 417 insertions(+), 86 deletions(-) diff --git a/src/store/modules/getClientName.js b/src/store/modules/getClientName.js index 0070ce8..3a2b6e6 100644 --- a/src/store/modules/getClientName.js +++ b/src/store/modules/getClientName.js @@ -1,13 +1,22 @@ import { getClientList } from "@/api/client/client" // 瀵煎叆鎺ュ彛 +import { getContactList } from "@/api/client/contacts" +import { getSaleChanceList } from "@/api/sales/salesOpportunity" import { Message } from "element-ui" export default { state: { - clientList: [] // 瀹㈡埛鍒楄〃 + clientList: [], // 瀹㈡埛鍒楄〃 + contactNamelist: [] // 鑱旂郴浜� }, mutations: { clientNameList(state, payload) { state.clientList = payload + }, + contactNameList(state, payload) { + state.contactNamelist = payload + }, + saleChancelist(state, payload) { + state.saleChancelist = payload } }, actions: { @@ -19,6 +28,24 @@ Message.error(res.msg) } }) + }, + geContact(context) { + getContactList().then((res) => { + if (res.code == 200) { + context.commit("contactNameList", res.data.list) + } else { + Message.error(res.msg) + } + }) + }, + geChance(context) { + getSaleChanceList().then((res) => { + if (res.code == 200) { + context.commit("saleChancelist", res.data.list) + } else { + Message.error(res.msg) + } + }) } } } diff --git a/src/views/client/followupRecords/AddFollowupRecordsDialog.vue b/src/views/client/followupRecords/AddFollowupRecordsDialog.vue index 0302ab4..4e34d25 100644 --- a/src/views/client/followupRecords/AddFollowupRecordsDialog.vue +++ b/src/views/client/followupRecords/AddFollowupRecordsDialog.vue @@ -27,12 +27,12 @@ v-model="editConfig.infomation.client_name" :fetch-suggestions="querySearchAsync" value-key="name" - @select="handleSelectClient" + @select="handleSelectClient('client', $event)" ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick"> + <div class="common-select-btn" @click="selClientClick('client')"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> </div> - <div class="common-select-btn" @click="clearupClient"> + <div class="common-select-btn" @click="clearupClient('client')"> <i class="el-icon-edit-outline" title="娓呴櫎"></i> </div> </div> @@ -62,9 +62,18 @@ <el-col :span="12"> <el-form-item label="鑱旂郴浜哄鍚�" prop="contact_id"> <div class="custom-name"> - <el-input v-model="editConfig.infomation.contact_id"></el-input> - <div class="common-select-btn"><i class="el-icon-circle-plus-outline"></i></div> - <div class="common-select-btn"><i class="el-icon-edit-outline"></i></div> + <el-autocomplete + v-model="editConfig.infomation.contact_name" + :fetch-suggestions="queryContactAsync" + value-key="name" + @select="handleSelectClient('contact', $event)" + ></el-autocomplete> + <div class="common-select-btn" @click="selClientClick('contact')"> + <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> + </div> + <div class="common-select-btn" @click="clearupClient('contact')"> + <i class="el-icon-edit-outline" title="娓呴櫎"></i> + </div> </div> </el-form-item> </el-col> @@ -99,6 +108,12 @@ <el-form-item label="閿�鍞満浼�" prop="sale_chance_id"> <div class="custom-name"> <el-input v-model="editConfig.infomation.sale_chance_id"></el-input> + <!-- <el-autocomplete + v-model="editConfig.infomation.sale_chance_id" + :fetch-suggestions="queryChanceAsync" + value-key="name" + @select="handleSelectClient('chance', $event)" + ></el-autocomplete> --> <div class="common-select-btn"><i class="el-icon-circle-plus-outline"></i></div> <div class="common-select-btn"><i class="el-icon-edit-outline"></i></div> </div> @@ -196,6 +211,12 @@ :edit-common-config="editSelectClientConfig" @selClient="selClient" /> + <!-- 閫夋嫨鑱旂郴浜� --> + <SelectContactDialog + v-if="editSelectContactConfig.editVisible" + :edit-common-config="editSelectContactConfig" + @selClient="selClient" + /> </el-dialog> </div> </template> @@ -204,6 +225,7 @@ import { getAllData } from "@/api/client/client" import { getAddFollowRecord, getUpdateFollowRecord } from "@/api/client/followupRecords" import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" +import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" export default { name: "AddFollowupRecordsDialog", props: { @@ -218,13 +240,19 @@ } } }, - components: { SelectClientDialog }, + components: { SelectClientDialog, SelectContactDialog }, computed: { searchCommonHeight() { return this.$refs.searchCommonView.offsetHeight }, clientList() { return this.$store.state.getClientName.clientList + }, + contactNamelist() { + return this.$store.state.getClientName.contactNamelist + }, + saleChancelist() { + return this.$store.state.getClientName.saleChancelist } }, data() { @@ -245,11 +273,21 @@ editVisible: false, title: "", infomation: {} - } + }, + editSelectContactConfig: { + editVisible: false, + title: "", + infomation: {} + }, + clientId: this.editContactsConfig.infomation.client_id, + contactId: this.editContactsConfig.infomation.contact_id + // saleChanceId: this.editContactsConfig.infomation.sale_chance_id } }, created() { this.$store.dispatch("geClient") + this.$store.dispatch("geContact") + this.$store.dispatch("geChance") this.getCommonData() }, methods: { @@ -317,9 +355,9 @@ let data = this.editConfig.infomation let follow_record = { follow_record: { - client_id: data.client_id || 0, + client_id: parseInt(this.clientId), client_status_id: data.client_status_id || 0, - contact_id: 0, // data.contact_id || + contact_id: parseInt(this.contactId), contact_information_id: data.contact_information_id || 0, content: data.content || "", follow_time: data.follow_time || "", @@ -328,7 +366,7 @@ number: data.number || "", purpose: data.purpose || "", record: data.record || "", - sale_chance_id: 0, //data.sale_chance_id || + sale_chance_id: parseInt(data.sale_chance_id), //data.sale_chance_id || sales_leads_id: 0, // data.sales_leads_id || topic: data.topic || "" } @@ -347,26 +385,59 @@ var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants cb(results) }, + // 閫夋嫨鑱旂郴浜哄鍚� + queryContactAsync(queryString, cb) { + var restaurants = this.contactNamelist + var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants + cb(results) + }, + // 閿�鍞満浼� + queryChanceAsync(queryString, cb) { + var restaurants = this.saleChancelist + var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants + cb(results) + }, createStateFilter(queryString) { return (state) => { return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 } }, - handleSelectClient(item) { - this.editConfig.infomation.client_id = item.id + handleSelectClient(value, item) { + console.log(value) + if (value === "client") { + this.clientId = item.id + } else if (value === "contact") { + this.contactId = item.id + } else { + this.saleChanceId = item.id + } }, - selClientClick() { - this.editSelectClientConfig.editVisible = true + selClientClick(value) { + if (value === "client") { + this.editSelectClientConfig.editVisible = true + } else if (value === "contact") { + this.editSelectContactConfig.editVisible = true + } }, - selClient(row) { - console.log(row) - this.editConfig.infomation.client_name = row.name - this.editConfig.infomation.client_id = row.id + selClient(row, value) { + console.log(value) + if (value === "contact") { + this.editConfig.infomation.contact_name = row.name + this.contactId = row.id + } else { + this.editConfig.infomation.client_name = row.name + this.clientId = row.id + } }, // 娓呴櫎宸查�夋嫨鐢ㄦ埛 - clearupClient() { - this.editConfig.infomation.client_name = "" - this.editConfig.infomation.client_id = 0 + clearupClient(value) { + if (value === "client") { + this.editConfig.infomation.client_name = "" + this.clientId = 0 + } else { + this.editConfig.infomation.contact_name = "" + this.contactId = 0 + } }, // 娣诲姞闄勪欢 addAnnexClick() {}, diff --git a/src/views/client/salesLead/AddSalesLeadDialog.vue b/src/views/client/salesLead/AddSalesLeadDialog.vue index 179850f..dc2e0fa 100644 --- a/src/views/client/salesLead/AddSalesLeadDialog.vue +++ b/src/views/client/salesLead/AddSalesLeadDialog.vue @@ -172,7 +172,7 @@ </el-form-item> </el-col> </el-row> - <el-row> + <!-- <el-row> <el-col :span="24"> <el-form-item label="鍦板潃" prop="address"> <el-input @@ -183,7 +183,7 @@ ></el-input> </el-form-item> </el-col> - </el-row> + </el-row> --> </div> <!-- 澶囨敞淇℃伅 --> <div v-if="isUnflod" class="basic-info-title">澶囨敞淇℃伅</div> @@ -233,23 +233,7 @@ return { visible: false, title: "鏂板缓", - infomation: { - name: "", - number: "LEA50", - contact_name: "", - contact_position: "", - contact_phone: "", - businessStatus: "", - sales_sources_id: "", - member_id: "", - country_id: "", - province_id: "", - city_id: "", - region_id: "", - address: "", - desc: "", - id: "" - } + infomation: {} } } } @@ -271,15 +255,7 @@ sales_sources_id: [{ required: true, message: "璇烽�夋嫨鍟嗘満鏉ユ簮", trigger: "change" }] }, businessSourceOptions: [], - ownerOptions: [ - { value: "1", label: "BOSS" }, - { value: "2", label: "Mia" }, - { value: "3", label: "璐㈠姟" }, - { value: "4", label: "甯傚満" }, - { value: "5", label: "绯荤粺绠$悊鍛�" }, - { value: "6", label: "閿�鍞�" }, - { value: "7", label: "閿�鍞�荤洃" } - ], + ownerOptions: [], countryOptions: [], // 鍥藉 provinceOptions: [], // 鐪佷唤 cityOptions: [], // 鍩庡競 @@ -296,6 +272,9 @@ created() { this.getCommonData() }, + mounted() { + this.setData() + }, methods: { getCommonData() { getAllData() @@ -306,6 +285,7 @@ this.provinceOptions = res.data.province this.cityOptions = res.data.city this.regionOptions = res.data.region + this.ownerOptions = res.data.member }) .catch((err) => { console.log(err) @@ -386,9 +366,21 @@ }, // 缂栬緫涓嬫媺妗� editDropdownBox() { - console.log("aaa") this.editDropdownConfig.editVisible = true this.editDropdownConfig.title = "鍟嗘満鏉ユ簮" + }, + // 鏁版嵁澶勭悊 + setData() { + this.editConfig.infomation.city_id = + this.editConfig.infomation.city_id === 0 ? "" : this.editConfig.infomation.city_id + this.editConfig.infomation.member_id = + this.editConfig.infomation.member_id === 0 ? "" : this.editConfig.infomation.member_id + this.editConfig.infomation.province_id = + this.editConfig.infomation.province_id === 0 ? "" : this.editConfig.infomation.province_id + this.editConfig.infomation.region_id = + this.editConfig.infomation.region_id === 0 ? "" : this.editConfig.infomation.region_id + this.editConfig.infomation.country_id = + this.editConfig.infomation.country_id === 0 ? "" : this.editConfig.infomation.country_id } } } diff --git a/src/views/client/salesLead/index.vue b/src/views/client/salesLead/index.vue index a7ab011..abdcfac 100644 --- a/src/views/client/salesLead/index.vue +++ b/src/views/client/salesLead/index.vue @@ -117,14 +117,14 @@ addBtnClick() { this.editSalesLeadConfig.visible = true this.editSalesLeadConfig.title = "鏂板缓" - this.editSalesLeadConfig.infomation = {} + this.editSalesLeadConfig.infomation = { businessStatus: "鏂板缓" } }, // 缂栬緫 handleClick(row) { console.log(row) this.editSalesLeadConfig.visible = true this.editSalesLeadConfig.title = "缂栬緫" - this.editSalesLeadConfig.infomation = { ...row } + this.editSalesLeadConfig.infomation = { ...row, businessStatus: "鏂板缓" } }, // 瀵煎叆 importClitk() { diff --git a/src/views/other/commonDialog/SelectContactDialog.vue b/src/views/other/commonDialog/SelectContactDialog.vue new file mode 100644 index 0000000..17a89be --- /dev/null +++ b/src/views/other/commonDialog/SelectContactDialog.vue @@ -0,0 +1,185 @@ +<template> + <div class="edit-selClient-box"> + <el-dialog + :title="'鑱旂郴浜�'" + :visible.sync="editConfig.editVisible" + :width="dialogWidth" + :before-close="handleClose" + :append-to-body="true" + :close-on-click-modal="false" + > + <div class="bg-view"> + <div class="query-bg"> + <el-input placeholder="璇疯緭鍏ュ唴瀹�" v-model="queryInput" size="mini" class="input-with-select"> + <el-select v-model="select" slot="prepend" placeholder="璇烽�夋嫨" disabled> + <el-option label="鍏ㄩ儴瀛楁" value="1"></el-option> + <el-option label="鑱旂郴浜哄鍚�" value="2"></el-option> + <el-option label="鑱旂郴浜虹紪鍙�" value="3"></el-option> + <el-option label="瀹㈡埛鍚嶇О" value="4"></el-option> + <el-option label="鎵嬫満" value="5"></el-option> + </el-select> + </el-input> + <div class="btn"> + <el-button type="primary" size="mini" disabled>璁剧疆瀛楁</el-button> + <el-button type="primary" size="mini" disabled>蹇�熷垱寤�</el-button> + </div> + </div> + <el-table + :data="tableData" + border + size="mini" + v-loading="loading" + :header-cell-style="{ background: '#f7f7f7' }" + > + <el-table-column label="鑱旂郴浜哄鍚�" prop="name" show-overflow-tooltip> + <template slot-scope="scope"> + <span class="sel-name" @click="selNameClick(scope.row)">{{ scope.row.name }}</span> + </template> + </el-table-column> + <el-table-column label="鑱旂郴浜虹紪鍙�" prop="number"></el-table-column> + <el-table-column label="瀹㈡埛鍚嶇О" prop="client_name"></el-table-column> + <el-table-column label="鎵嬫満" prop="phone"></el-table-column> + <div slot="empty"> + <el-empty :image-size="100"></el-empty> + </div> + </el-table> + <div slot="footer" class="dialog-footer"> + <div class="remark">璇存槑锛氭敮鎸佸瀛楁妯$硦鏌ヨ锛屼粎鏄剧ず绗﹀悎鏉′欢鐨勫墠5鏉℃暟鎹�</div> + </div> + </div> + </el-dialog> + </div> +</template> + +<script> +import { getContactList } from "@/api/client/contacts" +export default { + name: "EditSelClientDialog", + props: { + editCommonConfig: { + type: Object, + default: () => { + return { + editVisible: false, + title: "", + infomation: { + name: "", + color: "", + setDefault: "" + } + } + } + } + }, + components: {}, + computed: {}, + data() { + return { + dialogWidth: "50%", + editConfig: this.editCommonConfig, + queryInput: "", + select: "1", + tableData: [], + searchSelOptions: [], + loading: false + } + }, + created() { + this.getData() + }, + methods: { + handleClose() { + this.editConfig.editVisible = false + }, + // 璇锋眰鏁版嵁 + async getData() { + this.loading = true + await getContactList() + .then((res) => { + console.log(res) + if (res.code === 200) { + if (res.data.list && res.data.list.length > 0) { + const list = res.data.list.map((item) => { + return { + ...item, + client_name: item.Client.name + } + }) + this.tableData = list.slice(0, 5) || [] + } else { + this.tableData = [] + } + } else { + this.tableData = [] + } + this.loading = false + }) + .catch((err) => { + console.log(err) + this.tableData = [] + this.loading = false + }) + }, + selNameClick(row) { + this.editConfig.editVisible = false + this.$emit("selClient", row, "contact") + }, + // 鏃堕棿鏄剧ず + dateFormat(fmt, date) { + let ret = "" + date = new Date(date) + const opt = { + "Y+": date.getFullYear().toString(), // 骞� + "m+": (date.getMonth() + 1).toString(), // 鏈� + "d+": date.getDate().toString(), // 鏃� + "H+": date.getHours().toString(), // 鏃� + "M+": date.getMinutes().toString(), // 鍒� + "S+": date.getSeconds().toString() // 绉� + // 鏈夊叾浠栨牸寮忓寲瀛楃闇�姹傚彲浠ョ户缁坊鍔狅紝蹇呴』杞寲鎴愬瓧绗︿覆 + } + for (let k in opt) { + ret = new RegExp("(" + k + ")").exec(fmt) + if (ret) { + fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")) + } + } + return fmt + } + } +} +</script> + +<!-- Add "scoped" attribute to limit CSS to this component only --> +<style lang="scss" scoped> +.bg-view { + margin: 10px; + .query-bg { + margin-bottom: 10px; + display: flex; + justify-content: space-between; + .el-input { + width: 310px; + .el-select { + width: 100px; + } + } + .btn { + float: right; + } + } +} +.sel-name { + color: $color-primary; + cursor: pointer; +} +.dialog-footer { + height: 40px; + line-height: 40px; + color: red; +} +::v-deep { + .input-with-select .el-input-group__prepend { + background-color: #fff; + } +} +</style> diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue index 576dfc2..cb8f901 100644 --- a/src/views/sales/quotation/AddQuotationDialog.vue +++ b/src/views/sales/quotation/AddQuotationDialog.vue @@ -28,7 +28,7 @@ v-model="editConfig.infomation.client_name" :fetch-suggestions="querySearchAsync" value-key="name" - @select="handleSelectClient" + @select="handleSelectClient('client', $event)" ></el-autocomplete> <div class="common-select-btn" @click="selClientClick"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> @@ -75,9 +75,18 @@ <el-col :span="12"> <el-form-item label="鑱旂郴浜哄鍚�" prop="contact_id"> <div class="custom-name"> - <el-input v-model="editConfig.infomation.contact_id"></el-input> - <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="閫夋嫨"></i></div> - <div class="common-select-btn"><i class="el-icon-edit" title="缂栬緫"></i></div> + <el-autocomplete + v-model="editConfig.infomation.contact_name" + :fetch-suggestions="queryContactAsync" + value-key="name" + @select="handleSelectClient('contact', $event)" + ></el-autocomplete> + <div class="common-select-btn" @click="selClientClick('contact')"> + <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> + </div> + <div class="common-select-btn" @click="clearupClient('contact')"> + <i class="el-icon-edit-outline" title="娓呴櫎"></i> + </div> </div> </el-form-item> </el-col> @@ -213,6 +222,12 @@ :edit-common-config="editSelectClientConfig" @selClient="selClient" /> + <!-- 閫夋嫨鑱旂郴浜� --> + <SelectContactDialog + v-if="editSelectContactConfig.editVisible" + :edit-common-config="editSelectContactConfig" + @selClient="selClient" + /> </el-dialog> </div> </template> @@ -222,6 +237,7 @@ import { getAllData } from "@/api/client/client" import { getAddQuotation, getUpdateQuotation } from "@/api/sales/quotation" import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" +import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" export default { name: "QuotationDialog", props: { @@ -236,13 +252,16 @@ } } }, - components: { SelectClientDialog }, + components: { SelectClientDialog, SelectContactDialog }, computed: { searchCommonHeight() { return this.$refs.searchCommonView.offsetHeight }, clientList() { return this.$store.state.getClientName.clientList + }, + contactNamelist() { + return this.$store.state.getClientName.contactNamelist } }, data() { @@ -270,11 +289,19 @@ editVisible: false, title: "", infomation: {} - } + }, + editSelectContactConfig: { + editVisible: false, + title: "", + infomation: {} + }, + clientId: this.editCommonConfig.infomation.client_id, + contactId: this.editCommonConfig.infomation.contact_id } }, created() { this.$store.dispatch("geClient") + this.$store.dispatch("geContact") this.setTableForm() this.getCommonData() }, @@ -339,9 +366,9 @@ let data = this.editConfig.infomation let params = { id: this.editConfig.title === "鏂板缓" ? 0 : data.id, - client_id: parseInt(data.client_id) || 0, + client_id: parseInt(this.clientId) || 0, conditions: data.conditions || "", - contact_id: data.contact_id || 0, + contact_id: parseInt(this.contactId) || 0, file: data.file || "", member_id: data.member_id || 0, number: data.number || "", @@ -360,26 +387,51 @@ var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants cb(results) }, + // 閫夋嫨鑱旂郴浜哄鍚� + queryContactAsync(queryString, cb) { + var restaurants = this.contactNamelist + var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants + cb(results) + }, createStateFilter(queryString) { return (state) => { return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 } }, - handleSelectClient(item) { - this.editConfig.infomation.client_id = item.id + handleSelectClient(value, item) { + console.log(value) + if (value === "client") { + this.clientId = item.id + } else { + this.contactId = item.id + } }, - selClientClick() { - this.editSelectClientConfig.editVisible = true + selClientClick(value) { + if (value === "client") { + this.editSelectClientConfig.editVisible = true + } else if (value === "contact") { + this.editSelectContactConfig.editVisible = true + } }, - selClient(row) { - console.log(row) - this.editConfig.infomation.client_name = row.name - this.editConfig.infomation.client_id = row.id + selClient(row, value) { + console.log(value) + if (value === "contact") { + this.editConfig.infomation.contact_name = row.name + this.contactId = row.id + } else { + this.editConfig.infomation.client_name = row.name + this.clientId = row.id + } }, // 娓呴櫎宸查�夋嫨鐢ㄦ埛 - clearupClient() { - this.editConfig.infomation.client_name = "" - this.editConfig.infomation.client_id = 0 + clearupClient(value) { + if (value === "client") { + this.editConfig.infomation.client_name = "" + this.clientId = 0 + } else { + this.editConfig.infomation.contact_name = "" + this.contactId = 0 + } }, // 娣诲姞闄勪欢 addAnnexClick() {}, diff --git a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue index c9854f6..cc258a6 100644 --- a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue +++ b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue @@ -91,7 +91,7 @@ </el-date-picker> </el-form-item> </el-col> - <el-col :span="12"> + <!-- <el-col :span="12"> <el-form-item label="寰俊璁㈠崟鐘舵��" prop="wechatOrderStatus"> <div class="common-select"> <el-select @@ -113,7 +113,7 @@ </div> </div> </el-form-item> - </el-col> + </el-col> --> </el-row> </div> <!-- 鏀惰揣淇℃伅 --> @@ -140,18 +140,18 @@ </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鐗╂祦鍏徃" prop="logisticsCompany"> - <el-input v-model="editConfig.infomation.addressee"></el-input> + <el-form-item label="鐗╂祦鍏徃" prop="logisticCompany"> + <el-input v-model="editConfig.infomation.logisticCompany"></el-input> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鐗╂祦鍗曞彿" prop="logisticsOddNumber"> - <el-input v-model="editConfig.infomation.phone"></el-input> + <el-form-item label="鐗╂祦鍗曞彿" prop="logisticNumber"> + <el-input v-model="editConfig.infomation.logisticNumber"></el-input> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鐗╂祦璐圭敤" prop="logisticsCost"> - <el-input v-model="editConfig.infomation.addressee"></el-input> + <el-form-item label="鐗╂祦璐圭敤" prop="logisticCost"> + <el-input v-model="editConfig.infomation.logisticCost"></el-input> </el-form-item> </el-col> </el-row> @@ -321,12 +321,13 @@ dialogWidth: "80%", editConfig: this.editCommonConfig, rules: { - clientId: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }], + client_name: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }], number: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }], signTime: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }], memberId: [{ required: true, message: "璇烽�夋嫨璐熻矗浜�", trigger: "change" }] // approvalOpinion: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }] }, + clientId: this.editCommonConfig.infomation.clientId, memberOptions: [], selSourceOrderOptions: [], wechatOrderStatusOptions: [], // 寰俊璁㈠崟鐘舵�� @@ -418,7 +419,7 @@ salesDetails: { address: data.address || "", addressee: data.addressee || "", - clientId: parseInt(data.clientId) || 0, + clientId: parseInt(this.clientId), conditions: data.conditions || "", deliveryDate: data.deliveryDate || "", memberId: data.memberId || 0, @@ -439,7 +440,10 @@ saleChanceId: data.saleChanceId || 0, saleType: data.saleType || 0, signTime: data.signTime || "", - wechatOrderStatus: data.wechatOrderStatus || 0 + wechatOrderStatus: data.wechatOrderStatus || 0, + logisticCompany: data.logisticCompany || "", + logisticCost: parseInt(data.logisticCost) || 0, + logisticNumber: data.logisticNumber || "" } } return params @@ -460,7 +464,7 @@ } }, handleSelectClient(item) { - this.editConfig.infomation.client_id = item.id + this.clientId = item.id }, selClientClick() { this.editSelectClientConfig.editVisible = true @@ -468,7 +472,7 @@ selClient(row) { console.log(row) this.editConfig.infomation.client_name = row.name - this.editConfig.infomation.client_id = row.id + this.clientId = row.id }, // 娓呴櫎宸查�夋嫨鐢ㄦ埛 clearupClient() { -- Gitblit v1.8.0