From 6887629cbd7c09407d25a6199d8ddd878d17da4f Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期二, 24 十月 2023 17:50:11 +0800 Subject: [PATCH] 客户管理,跟进记录,线索,发票,合同管理,总单,报价单,退款单,明细单,机会,退货单,子单,客户服务单,服务合同,服务回访单连天 --- src/views/service/serviceContract/AddServiceContractDialog.vue | 9 - src/views/service/serviceFollowup/AddServiceFollowupDialog.vue | 12 +- src/views/client/followupRecords/AddFollowupRecordsDialog.vue | 7 - src/views/client/salesLead/AddSalesLeadDialog.vue | 5 - src/views/sales/salesDetails/AddSalesDetailsDialog.vue | 4 src/components/makepager/mixin/codeMixin.js | 4 src/views/other/payment/saleInvoice/index.vue | 10 +- src/views/sales/masterOrder/AddMasterOrderDialog.vue | 7 - src/views/sales/salesReturn/AddSalesReturnDialog.vue | 4 src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue | 42 ++++--- src/views/sales/refundForm/AddRefundFormDialog.vue | 30 ++--- src/views/sales/refundForm/index.vue | 7 src/views/client/client/AddClientManageDialog.vue | 5 src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue | 11 +- src/views/other/payment/saleInvoice/addSaleInvoice.vue | 93 +++++++++--------- src/views/sales/quotation/AddQuotationDialog.vue | 5 src/views/sales/subOrder/AddSubOrderDialog.vue | 7 - src/views/sales/contractManage/AddContractManageDialog.vue | 2 src/views/sales/salesDetails/index.vue | 3 19 files changed, 116 insertions(+), 151 deletions(-) diff --git a/src/components/makepager/mixin/codeMixin.js b/src/components/makepager/mixin/codeMixin.js index 799d1f7..afd3d26 100644 --- a/src/components/makepager/mixin/codeMixin.js +++ b/src/components/makepager/mixin/codeMixin.js @@ -33,7 +33,7 @@ if (res.code == 200) { const { List = [], ID, AutoRule = {}, Method } = res.data && res.data.data ? res.data.data[0] : [] this.codeRule = res.data && res.data.data ? res.data.data[0] : {} - let autoRule = AutoRule + let autoRule = AutoRule let method = Method ? Method : 0 this.method = method let rules = List @@ -93,6 +93,8 @@ const res = await getAutoCode(this.codeRule); if (res.code == 200) { this.$set(this.editConfig.infomation, 'number', res.data?res.data:'') + }else{ + this.$set(this.editConfig.infomation, 'number', this.codeRule.AutoRule.PrefixValue?this.codeRule.AutoRule.PrefixValue:'') } } diff --git a/src/views/client/client/AddClientManageDialog.vue b/src/views/client/client/AddClientManageDialog.vue index feaebc0..daa8ad8 100644 --- a/src/views/client/client/AddClientManageDialog.vue +++ b/src/views/client/client/AddClientManageDialog.vue @@ -614,9 +614,6 @@ this.formInfo() } }, - 'editClientManageConfig.infomation.codeStandID'(){ - this.formInfo() - } }, methods: { formInfo(){ @@ -636,6 +633,7 @@ getAllData() .then((res) => { this.memberOptions = res.data.member + this.$set(this.editConfig.infomation,'member_id',this.editConfig.infomation.member_id) this.clientSourceOptions = res.data.client_origin this.clientStatusOptions = res.data.client_status this.importantLevelOptions = res.data.client_level @@ -665,7 +663,6 @@ if (valid) { console.log(this.editConfig.infomation) const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddClient(params).then((res) => { console.log(res) diff --git a/src/views/client/followupRecords/AddFollowupRecordsDialog.vue b/src/views/client/followupRecords/AddFollowupRecordsDialog.vue index 2e258f2..5758864 100644 --- a/src/views/client/followupRecords/AddFollowupRecordsDialog.vue +++ b/src/views/client/followupRecords/AddFollowupRecordsDialog.vue @@ -459,7 +459,7 @@ editConfig: this.editContactsConfig, rules: { number: [ - { required: true, validator: this.validateCheckCode, trigger: "blur" }, + { required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }, ], member_id: [ { required: true, message: "璇烽�夋嫨璐熻矗浜�", trigger: "change" }, @@ -542,9 +542,6 @@ this.formInfo(); } }, - "editContactsConfig.infomation.codeStandID"() { - this.formInfo(); - }, }, methods: { ...mapActions(["getContactFilter", "getLeadFilter"]), @@ -592,8 +589,6 @@ if (valid) { const params = this.saveParams(); if (this.editConfig.title === "鏂板缓") { - params.codeStandardID=this.autoCodeObj.codeStandardID - params.autoIncr=this.autoCodeObj.maxAutoIncr getAddFollowRecord(params).then((res) => { this.editConfig.visible = false; if (res.code === 200) { diff --git a/src/views/client/salesLead/AddSalesLeadDialog.vue b/src/views/client/salesLead/AddSalesLeadDialog.vue index 546a1b2..29eb503 100644 --- a/src/views/client/salesLead/AddSalesLeadDialog.vue +++ b/src/views/client/salesLead/AddSalesLeadDialog.vue @@ -328,9 +328,6 @@ this.formInfo() } }, - 'editSalesLeadConfig.infomation.codeStandID'(){ - this.formInfo() - } }, methods: { formInfo(){ @@ -367,7 +364,6 @@ saveClick(formName) { this.$refs[formName].validate((valid) => { if (valid) { - console.log(this.editConfig.infomation) let params = { city_id: this.editConfig.infomation.city_id || 0, contact_name: this.editConfig.infomation.contact_name || "", @@ -385,7 +381,6 @@ detail_address: this.editConfig.infomation.detail_address || "", codeStandID:this.editConfig.infomation.ID, } - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddSalesLeads(params).then((res) => { console.log(res) diff --git a/src/views/other/payment/saleInvoice/addSaleInvoice.vue b/src/views/other/payment/saleInvoice/addSaleInvoice.vue index 3ad8f2c..44889e2 100644 --- a/src/views/other/payment/saleInvoice/addSaleInvoice.vue +++ b/src/views/other/payment/saleInvoice/addSaleInvoice.vue @@ -154,22 +154,25 @@ } " value-key="number" + :disabled="this.editCommonConfig.infomation.id?true:false" @select="handleSelectClient('serviceContract', $event)" style="width: 100%" ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick('serviceContract')"> - <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> - </div> - <div - v-if=" - editConfig.infomation.serviceContract_Number && - editConfig.infomation.serviceContract_Number.length > 0 - " - class="common-select-btn" - @click="clearupClient('serviceContract')" - > - <i class="el-icon-remove-outline" title="娓呴櫎"></i> - </div> + <template v-if='!this.editCommonConfig.infomation.id'> + <div class="common-select-btn" @click="selClientClick('serviceContract')"> + <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> + </div> + <div + v-if=" + editConfig.infomation.serviceContract_Number && + editConfig.infomation.serviceContract_Number.length > 0 + " + class="common-select-btn" + @click="clearupClient('serviceContract')" + > + <i class="el-icon-remove-outline" title="娓呴櫎"></i> + </div> + </template> </div> </el-form-item> </el-col> @@ -177,26 +180,29 @@ <el-form-item label="鍚堝悓璁㈠崟"> <div class="custom-name"> <el-autocomplete - v-model="editConfig.infomation.number" + v-model="editConfig.infomation.contract_number" :fetch-suggestions=" (queryString, callback) => { querySearchAsync(queryString, callback, 'contract') } " value-key="number" + :disabled="this.editCommonConfig.infomation.id?true:false" @select="handleSelectClient('contract', $event)" style="width: 100%" ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick('contract')"> - <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> - </div> - <div - v-if="editConfig.infomation.number && editConfig.infomation.number.length > 0" - class="common-select-btn" - @click="clearupClient('contract')" - > - <i class="el-icon-remove-outline" title="娓呴櫎"></i> - </div> + <template v-if='!this.editCommonConfig.infomation.id'> + <div class="common-select-btn" @click="selClientClick('contract')"> + <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> + </div> + <div + v-if="editConfig.infomation.contract_number && editConfig.infomation.contract_number.length > 0" + class="common-select-btn" + @click="clearupClient('contract')" + > + <i class="el-icon-remove-outline" title="娓呴櫎"></i> + </div> + </template> </div> </el-form-item> </el-col> @@ -467,7 +473,7 @@ infomation: {} }, clientId: this.editCommonConfig.infomation.client_id, - SalesDetailsId: this.editCommonConfig.infomation.SalesDetailsId, + SalesDetailsId: this.editCommonConfig.infomation.id, serviceContractId: this.editCommonConfig.infomation.id, tableData: [] } @@ -486,9 +492,6 @@ this.formInfo() } }, - 'editCommonConfig.infomation.codeStandID'(){ - this.formInfo() - } }, methods: { formInfo(){ @@ -508,33 +511,26 @@ this.getInvoiceTypeList() this.getInvoiceStatusList() this.getCourierCompanyList() + this.$set(this.editConfig.infomation,'serviceContract_Number',this.editCommonConfig.infomation.keyword) + this.$set(this.editConfig.infomation,'contract_number',this.editCommonConfig.infomation.keyword) }, async getInvoiceTypeList() { - await getInvoiceTypeList().then((res) => { - console.log("绁ㄦ嵁绫诲瀷") - console.log(res.data) - if (res.data.code === 200) { - this.invoiceTypeOptions = res.data.data.data + const res=await getInvoiceTypeList() + if (res.code == 200) { + this.invoiceTypeOptions = res.data.data } - }) }, async getInvoiceStatusList() { - await getInvoiceStatusList().then((res) => { - console.log("绁ㄦ嵁鐘舵��") - console.log(res.data) - if (res.data.code === 200) { - this.invoiceStatusOptions = res.data.data.data + const res=await getInvoiceStatusList() + if (res.code == 200) { + this.invoiceStatusOptions = res.data.data } - }) }, async getCourierCompanyList() { - await getCourierCompanyList().then((res) => { - console.log("鐗╂祦鍏徃") - console.log(res.data) - if (res.data.code === 200) { - this.courierCompanyOptions = res.data.data.data + const res=await getCourierCompanyList() + if (res.code == 200) { + this.courierCompanyOptions = res.data.data } - }) }, // 淇濆瓨 saveClick(formName) { @@ -594,6 +590,7 @@ products: this.tableData, sourceId: this.editConfig.sourceType === 1 ? this.SalesDetailsId : this.serviceContractId, sourceType: this.editConfig.sourceType, + number:data.number || "", subject: data.subject || "", taxpayerIdNumber: data.taxpayerIdNumber || "" } @@ -652,7 +649,7 @@ this.editConfig.infomation.serviceContract_Number = row.number this.serviceContractId = row.id } else if (value === "contract") { - this.editConfig.infomation.number = row.number + this.editConfig.infomation.contract_number = row.number this.SalesDetailsId = row.id } }, @@ -665,7 +662,7 @@ this.editConfig.infomation.serviceContract_Number = "" this.serviceContractId = 0 } else if (value === "contract") { - this.editConfig.infomation.number = "" + this.editConfig.infomation.contract_number = "" this.SalesDetailsId = 0 } }, diff --git a/src/views/other/payment/saleInvoice/index.vue b/src/views/other/payment/saleInvoice/index.vue index bd13fb7..0ed89c1 100644 --- a/src/views/other/payment/saleInvoice/index.vue +++ b/src/views/other/payment/saleInvoice/index.vue @@ -101,7 +101,7 @@ keyword: "", keywordType: "", tableColumn: [ - { label: "鍙戠エ缂栧彿", prop: "invoiceNumber", default: true }, + { label: "鍙戠エ缂栧彿", prop: "number", default: true }, { label: "涓婚", prop: "subject" }, { label: "瀹㈡埛鍚嶇О", prop: "client_name" }, { label: "绁ㄦ嵁绫诲瀷", prop: "invoiceType_name" }, @@ -189,9 +189,9 @@ } await getInvoiceList(params) .then((res) => { - if (res.data.code === 200) { - if (res.data.data.data && res.data.data.data.length > 0) { - const list = res.data.data.data.map((item) => { + if (res.code === 200) { + if (res.data.data && res.data.data.length > 0) { + const list = res.data.data.map((item) => { return { ...item, client_name: item.Client.name, @@ -200,7 +200,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/contractManage/AddContractManageDialog.vue b/src/views/sales/contractManage/AddContractManageDialog.vue index bb7474c..87141cc 100644 --- a/src/views/sales/contractManage/AddContractManageDialog.vue +++ b/src/views/sales/contractManage/AddContractManageDialog.vue @@ -349,9 +349,7 @@ saveClick(formName) { this.$refs[formName].validate((valid) => { if (valid) { - console.log(this.editConfig.infomation) const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddContract(params).then((res) => { console.log(res) diff --git a/src/views/sales/masterOrder/AddMasterOrderDialog.vue b/src/views/sales/masterOrder/AddMasterOrderDialog.vue index 035a628..fce3c8e 100644 --- a/src/views/sales/masterOrder/AddMasterOrderDialog.vue +++ b/src/views/sales/masterOrder/AddMasterOrderDialog.vue @@ -217,7 +217,7 @@ dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { - number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], + number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], client_name: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }], member_id: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }] }, @@ -244,9 +244,6 @@ this.formInfo() } }, - "editCommonConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { formInfo() { @@ -269,9 +266,7 @@ saveClick(formName) { this.$refs[formName].validate((valid) => { if (valid) { - console.log(this.editConfig.infomation) const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddMasterOrder(params).then((res) => { console.log(res) diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue index 7a5a2ab..b9de06b 100644 --- a/src/views/sales/quotation/AddQuotationDialog.vue +++ b/src/views/sales/quotation/AddQuotationDialog.vue @@ -370,7 +370,7 @@ dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { - number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], + number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur","change"] }], quotationName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }], quotation_status_id: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }], sale_chance_name: [{ required: true, validator: this.checkChance, trigger: "change" }], @@ -425,9 +425,6 @@ this.formInfo() } }, - "editConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { formInfo() { diff --git a/src/views/sales/refundForm/AddRefundFormDialog.vue b/src/views/sales/refundForm/AddRefundFormDialog.vue index d18d9a2..370da91 100644 --- a/src/views/sales/refundForm/AddRefundFormDialog.vue +++ b/src/views/sales/refundForm/AddRefundFormDialog.vue @@ -412,9 +412,6 @@ this.formInfo() } }, - "editClientManageConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { ...mapActions(["getReturnListFliter"]), @@ -427,34 +424,34 @@ this.getRCodeStandardList() this.getBankAccountList() }, - getCommonData() { - getAllData().then((res) => { - this.memberOptions = res.data.member - // this.accountOptions = res.data.accountId - }) + async getCommonData() { + const res=await getAllData() + if(res.code==200){ + this.memberOptions = res.data.member? res.data.member:[] + } + this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) this.getPaymentTypeList() }, - async getPaymentTypeList() { - await getPaymentTypeList().then((res) => { + getPaymentTypeList() { + getPaymentTypeList().then(res=>{ if (res.code === 200) { this.paymentTypeListOptions = res.data.data ?? [] } + this.$set(this.editConfig.infomation,'paymentTypeId',this.editConfig.infomation.paymentTypeId) }) }, - async getBankAccountList() { - await getBankAccountList().then((res) => { - console.log("璐︽埛") - console.log('璐︽埛',res) + getBankAccountList() { + getBankAccountList().then(res=>{ if (res.code === 200) { - this.accountOptions = res.data.data + this.accountOptions = res.data.data? res.data.data:[] } + this.$set(this.editConfig.infomation,'bankAccountId',this.editConfig.infomation.bankAccountId) }) }, // 淇濆瓨 saveClick(formName) { this.$refs[formName].validate((valid) => { if (valid) { - console.log(this.editConfig.infomation) for (let i = 0; i < this.tableData.length; i++) { if (this.tableData[i].name.length === 0) { this.isNoProduct = true @@ -467,7 +464,6 @@ this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖") } else { const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddSalesRefund(params).then((res) => { console.log(res) diff --git a/src/views/sales/refundForm/index.vue b/src/views/sales/refundForm/index.vue index c4f7515..f34499e 100644 --- a/src/views/sales/refundForm/index.vue +++ b/src/views/sales/refundForm/index.vue @@ -235,16 +235,15 @@ }, // 鏂板缓 addBtnClick() { - this.editConfig.visible = true this.editConfig.title = "鏂板缓" this.editConfig.infomation = { currency: "浜烘皯甯�", ...this.addConfig } + this.editConfig.visible = true }, // 缂栬緫 handleClick(row) { - console.log(row) - this.editConfig.visible = true this.editConfig.title = "缂栬緫" - this.editConfig.infomation = { ...row, currency: "浜烘皯甯�", sale_return_nunber: row.Source.number } + this.editConfig.infomation = { ...row, currency: "浜烘皯甯�", sale_return_nunber: row.salesReturn.number } + this.editConfig.visible = true }, // 鍒犻櫎 delClick(rowID) { diff --git a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue index 90c8e7f..a0745c3 100644 --- a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue +++ b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue @@ -545,9 +545,6 @@ this.formInfo() } }, - "editClientManageConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { ...mapActions(["getChanceFilter", "getSubunitFliter"]), @@ -580,7 +577,6 @@ saveClick(formName) { this.$refs[formName].validate((valid) => { if (valid) { - console.log(this.editConfig.infomation) for (let i = 0; i < this.tableData.length; i++) { if (this.tableData[i].name.length === 0) { this.isNoProduct = true diff --git a/src/views/sales/salesDetails/index.vue b/src/views/sales/salesDetails/index.vue index 1df9ab4..ccf54eb 100644 --- a/src/views/sales/salesDetails/index.vue +++ b/src/views/sales/salesDetails/index.vue @@ -366,9 +366,8 @@ }, // 鑱旂郴浜鸿鎯� selCommonClick(row) { - console.log(row) - this.specificationDetail.visible = true this.specificationDetail.infomation = { ...row } + this.specificationDetail.visible = true }, addCollectionPlanClick(row) { this.addCollectionConfig.visible = true diff --git a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue index ac82902..83988e3 100644 --- a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue +++ b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue @@ -681,9 +681,6 @@ this.formInfo() } }, - "editConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { formInfo() { @@ -735,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 { @@ -745,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:"缂栬緫澶辫触锛�") } }) } diff --git a/src/views/sales/salesReturn/AddSalesReturnDialog.vue b/src/views/sales/salesReturn/AddSalesReturnDialog.vue index bf86fea..825b387 100644 --- a/src/views/sales/salesReturn/AddSalesReturnDialog.vue +++ b/src/views/sales/salesReturn/AddSalesReturnDialog.vue @@ -349,9 +349,6 @@ this.formInfo() } }, - "editClientManageConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { ...mapActions(["getSalesDetailsFliter"]), @@ -402,7 +399,6 @@ // this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖") // } else { const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddSalesReturn(params).then((res) => { console.log(res) diff --git a/src/views/sales/subOrder/AddSubOrderDialog.vue b/src/views/sales/subOrder/AddSubOrderDialog.vue index de9232b..cb48a40 100644 --- a/src/views/sales/subOrder/AddSubOrderDialog.vue +++ b/src/views/sales/subOrder/AddSubOrderDialog.vue @@ -238,7 +238,7 @@ dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { - number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], + number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], master_order_number: [{ required: true, message: "璇烽�夋嫨鎴栧垱寤洪攢鍞�诲崟", trigger: "blur" }], client_name: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }], memberId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }] @@ -295,9 +295,6 @@ this.formInfo() } }, - "editConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { formInfo() { @@ -313,6 +310,7 @@ console.log(res) if (res.code === 200) { this.memberOptions = res.data.member + this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) this.dataProcess() } }) @@ -354,7 +352,6 @@ this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖") } else { const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddSubOrder(params).then((res) => { console.log(res) diff --git a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue index a33549e..1692653 100644 --- a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue +++ b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue @@ -703,7 +703,7 @@ dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { - serviceNumber: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], + serviceNumber: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], client_name: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: "change" }], subject: [{ required: true, message: "璇疯緭鍏ヤ富棰�", trigger: "blur" }], // productCategory: [{ required: true, message: "璇烽�夋嫨浜у搧绫诲埆", trigger: "change" }], @@ -789,9 +789,6 @@ this.formInfo() } }, - "editCommonConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { formInfo() { @@ -1025,33 +1022,40 @@ } }, // 鏁呴殰绫诲埆 - async getFaultTypeList() { - await getFaultTypeList().then((res) => { - this.faultTypeOptions = res.data.data + getFaultTypeList() { + getFaultTypeList().then((res) => { + this.faultTypeOptions = res.data.data?res.data.data:[] + this.$set(this.editConfig.infomation,'faultTypeId',this.editConfig.infomation.faultTypeId) }) }, // 鏈嶅姟鏂瑰紡 - async getServiceTypeList() { - await getServiceTypeList().then((res) => { - this.serviceTypeOptions = res.data.data + getServiceTypeList() { + getServiceTypeList().then((res) => { + this.serviceTypeOptions = res.data.data?res.data.data:[] + this.$set(this.editConfig.infomation,'serviceTypeId',this.editConfig.infomation.serviceTypeId) }) }, // 涓ラ噸绋嬪害 - async getSeverityList() { - await getSeverityList().then((res) => { - this.severityOptions = res.data.data + getSeverityList() { + getSeverityList().then((res) => { + this.severityOptions = res.data.data?res.data.data:[] + + this.$set(this.editConfig.infomation,'severity',this.editConfig.infomation.severity) }) }, // 浼樺厛绾у埆 - async getPriorityLevelList() { - await getPriorityLevelList().then((res) => { - this.priorityLevelOptions = res.data.data + getPriorityLevelList() { + getPriorityLevelList().then((res) => { + this.priorityLevelOptions = res.data.data?res.data.data:[] + + this.$set(this.editConfig.infomation,'priorityLevelId',this.editConfig.infomation.priorityLevelId) }) }, // 鑺辫垂鏃堕棿 - async getTimeSpentList() { - await getTimeSpentList().then((res) => { - this.timeSpentOptions = res.data.data + getTimeSpentList() { + getTimeSpentList().then((res) => { + this.timeSpentOptions = res.data.data?res.data.data:[] + this.$set(this.editConfig.infomation,'timeSpentId',this.editConfig.infomation.timeSpentId) }) } } diff --git a/src/views/service/serviceContract/AddServiceContractDialog.vue b/src/views/service/serviceContract/AddServiceContractDialog.vue index 7b62b47..3f90381 100644 --- a/src/views/service/serviceContract/AddServiceContractDialog.vue +++ b/src/views/service/serviceContract/AddServiceContractDialog.vue @@ -504,7 +504,7 @@ dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { - number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], + number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], client_name: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: "change" }], signTime: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }], memberId: [{ required: true, message: "璇烽�夋嫨璐熻矗浜�", trigger: "change" }] @@ -567,9 +567,6 @@ this.formInfo() } }, - "editCommonConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { formInfo() { @@ -585,8 +582,11 @@ .then((res) => { if (res.code === 200) { this.memberOptions = res.data.member + this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) this.contractTypeOptions = res.data.serviceContractType + this.$set(this.editConfig.infomation,'serviceContractTypeId',this.editConfig.infomation.serviceContractTypeId) this.contractStatusOptions = res.data.serviceContractStatus + this.$set(this.editConfig.infomation,'serviceContractStatusId',this.editConfig.infomation.serviceContractStatusId) // this.currencyOptions = res.data.currency } }) @@ -611,7 +611,6 @@ this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖") } else { const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddServiceContract(params).then((res) => { console.log(res) diff --git a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue b/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue index b4b5d89..1015ebd 100644 --- a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue +++ b/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue @@ -340,7 +340,7 @@ dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { - number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], + number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], client_name: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: "change" }], service_number: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鏈嶅姟鍗�", trigger: "change" }], memberId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }] @@ -384,9 +384,6 @@ this.formInfo() } }, - "editCommonConfig.infomation.codeStandID"() { - this.formInfo() - } }, methods: { formInfo() { @@ -401,11 +398,17 @@ getAllData() .then((res) => { this.memberOptions = res.data.member + this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) this.satisfactionOptions = res.data.satisfaction // 婊℃剰搴� + this.$set(this.editConfig.infomation,'satisfactionId',this.editConfig.infomation.satisfactionId) this.timelyRateOptions = res.data.timely_rate // 鍙婃椂鐜� + this.$set(this.editConfig.infomation,'timelyRateId',this.editConfig.infomation.timelyRateId) this.solveRateOptions = res.data.solve_rate // 瑙e喅鐜� + this.$set(this.editConfig.infomation,'solveRateId',this.editConfig.infomation.solveRateId) this.oldMemberOptions = res.data.member // 鍘熸湇鍔′汉鍛� + this.$set(this.editConfig.infomation,'oldMemberId',this.editConfig.infomation.oldMemberId) this.isVisitOptions = res.data.isVisit // 鏈嶅姟浜哄憳鏄惁鏉ヨ繃 + this.$set(this.editConfig.infomation,'isVisitId',this.editConfig.infomation.isVisitId) }) .catch((err) => { console.log(err) @@ -417,7 +420,6 @@ if (valid) { console.log(this.editConfig.infomation) const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddServiceFollowup(params).then((res) => { console.log(res) -- Gitblit v1.8.0