From 437944f7efda35f9d791e967c38857974473bd4d Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期二, 17 十月 2023 12:00:09 +0800 Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into wn --- src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue | 5 +- src/views/other/commonDialog/SelectContactDialog.vue | 10 ++-- src/common/untils/request.js | 9 ++++ src/views/other/commonDialog/SelectLeadDialog.vue | 8 ++-- src/views/other/payment/collectionPlan/index.vue | 14 ++++--- src/views/service/clientServiceOrder/index.vue | 3 - src/views/sales/salesReturn/AddSalesReturnDialog.vue | 28 ++++++++----- src/views/sales/refundForm/AddRefundFormDialog.vue | 23 +++++------ 8 files changed, 57 insertions(+), 43 deletions(-) diff --git a/src/common/untils/request.js b/src/common/untils/request.js index 173cccd..9cb4874 100644 --- a/src/common/untils/request.js +++ b/src/common/untils/request.js @@ -86,6 +86,15 @@ } }, (error) => { + if (error.response.status === 401){ + if (isDev){ + alert("JWT澶辨晥") + }else { + // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉 + window.location = getApsPage()+'/login' + } + } + let { message } = error if (message === "Network Error") { message = "鍚庣鎺ュ彛杩炴帴寮傚父" diff --git a/src/views/other/commonDialog/SelectContactDialog.vue b/src/views/other/commonDialog/SelectContactDialog.vue index 515a796..4c71a20 100644 --- a/src/views/other/commonDialog/SelectContactDialog.vue +++ b/src/views/other/commonDialog/SelectContactDialog.vue @@ -55,7 +55,7 @@ editVisible: false, title: "", infomation: {}, - search_map:{}, + search_map: {} } } } @@ -71,7 +71,7 @@ tableList: [], searchSelOptions: [], loading: false, - search_map: {}, + // search_map: {}, tableColumn: [ { label: "鑱旂郴浜哄鍚�", prop: "name", isContactClick: true, default: true }, // 鑱旂郴浜哄鍚� { label: "鑱旂郴浜虹紪鍙�", prop: "number" }, // 鑱旂郴浜虹紪鍙� @@ -121,7 +121,7 @@ async getData() { this.loading = true await getContactList({ - search_map: this.editCommonConfig.search_map, + search_map: this.editConfig.search_map, page: this.pagerOptions.currPage, pageSize: this.pagerOptions.pageSize }) @@ -158,13 +158,13 @@ // 鎼滅储 searchClick(val, content) { console.log(val, content) - this.search_map = { + this.editConfig.search_map = { [val.value]: content } this.getData() }, resetClick() { - this.search_map = {} + this.editConfig.search_map = {} this.getData() } } diff --git a/src/views/other/commonDialog/SelectLeadDialog.vue b/src/views/other/commonDialog/SelectLeadDialog.vue index df7f079..a5897d4 100644 --- a/src/views/other/commonDialog/SelectLeadDialog.vue +++ b/src/views/other/commonDialog/SelectLeadDialog.vue @@ -60,7 +60,7 @@ editVisible: false, title: "", infomation: {}, - search_map:{}, + search_map: {} } } } @@ -94,7 +94,7 @@ async getData() { this.loading = true await getSalesLeadsList({ - search_map: this.editCommonConfig.search_map, + search_map: this.editConfig.search_map, page: this.pagerOptions.currPage, pageSize: this.pagerOptions.pageSize }) @@ -131,13 +131,13 @@ // 鎼滅储 searchClick(val, content) { console.log(val, content) - this.search_map = { + this.editConfig.search_map = { [val.value]: content } this.getData() }, resetClick() { - this.search_map = {} + this.editConfig.search_map = {} this.getData() } } diff --git a/src/views/other/payment/collectionPlan/index.vue b/src/views/other/payment/collectionPlan/index.vue index b118f45..0751b85 100644 --- a/src/views/other/payment/collectionPlan/index.vue +++ b/src/views/other/payment/collectionPlan/index.vue @@ -136,7 +136,7 @@ } else { this.serviceContractId = this.addConfig.id } - // this.getData() + this.getData() }, methods: { setTable() { @@ -169,19 +169,21 @@ // 璇锋眰鏁版嵁 async getData() { this.loading = true + console.log(this.addConfig) await getCollectionPlanList({ - serviceContractId: this.serviceContractId + sourceType: this.addConfig.keywordType === "閿�鍞槑缁嗗崟" ? 1 : 2, + sourceId: this.addConfig.id }) .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 } }) 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/AddRefundFormDialog.vue b/src/views/sales/refundForm/AddRefundFormDialog.vue index 290bf4f..eff816e 100644 --- a/src/views/sales/refundForm/AddRefundFormDialog.vue +++ b/src/views/sales/refundForm/AddRefundFormDialog.vue @@ -315,7 +315,7 @@ import { getPaymentTypeList } from "@/api/common/payment" import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" import { getSalesReturnList } from "@/api/sales/salesReturn" -import { mapActions } from 'vuex'; +import { mapActions } from "vuex" export default { name: "AddRefundFormDialog", @@ -375,7 +375,7 @@ editVisible: false, title: "", infomation: {}, - clientId:"" + clientId: "" }, clientId: this.editCommonConfig.infomation.client_id, sourceId: this.editCommonConfig.infomation.sourceId, @@ -401,8 +401,8 @@ this.formInfo() } }, - methods: { - ...mapActions(["getReturnListFliter"]), + methods: { + ...mapActions(["getReturnListFliter"]), formInfo() { this.objCode.type = "閿�鍞��娆剧紪鐮�" this.objCode.codeStandID = "" @@ -485,9 +485,9 @@ reason: data.reason || "", refundDate: data.refundDate || "", sourceId: this.sourceId || 0, - sourceType: 1 - }, - codeRule: this.codeRule + sourceType: 1, + codeRule: this.codeRule + } } return params }, @@ -517,14 +517,13 @@ async handleSelectClient(value, item) { if (value === "client") { this.clientId = item.id - this.editSelCommonConfig.clientId=item.id - console.log("瀹㈡埛鍚嶇О",this.clientId,value,item) + this.editSelCommonConfig.clientId = item.id + console.log("瀹㈡埛鍚嶇О", this.clientId, value, item) await getSalesReturnList({ - clientId:this.clientId - }).then((res)=>{ + clientId: this.clientId + }).then((res) => { this.getReturnListFliter(res.data.list) }) - } else if (value === "salesReturn") { console.log(item) this.editConfig.infomation.sale_return_nunber = item.number diff --git a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue index fe80cbb..65b5f49 100644 --- a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue +++ b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue @@ -878,9 +878,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 = "" } diff --git a/src/views/sales/salesReturn/AddSalesReturnDialog.vue b/src/views/sales/salesReturn/AddSalesReturnDialog.vue index a684527..fc4697f 100644 --- a/src/views/sales/salesReturn/AddSalesReturnDialog.vue +++ b/src/views/sales/salesReturn/AddSalesReturnDialog.vue @@ -233,7 +233,7 @@ :edit-common-config="editSelectClientConfig" @selClient="selClient" /> - <!-- 閫夋嫨鍚堝悓璁㈠崟 --> + <!-- 閿�鍞槑缁嗗崟 --> <SelectCommonDialog v-if="editSelCommonConfig.editVisible" :edit-common-config="editSelCommonConfig" @@ -307,9 +307,9 @@ }, editSelCommonConfig: { editVisible: false, - title: "", + title: "閿�鍞槑缁嗗崟", infomation: {}, - clientId:"" + clientId: "" }, productId: 1, isNoProduct: true, @@ -429,9 +429,9 @@ returnDate: data.returnDate || "", salesReturnStatusId: data.salesReturnStatusId || 0, sourceId: this.SalesDetailsId, - sourceType: 1 - }, - codeRule: this.codeRule + sourceType: 1, + codeRule: this.codeRule + } } return params }, @@ -461,14 +461,13 @@ async handleSelectClient(value, item) { if (value === "client") { this.clientId = item.id - this.editSelCommonConfig.clientId=item.id + this.editSelCommonConfig.clientId = item.id await getSalesDetailsList({ clientId: this.clientId }).then((res) => { this.getSalesDetailsFliter(res.data.list) }) } else if (value === "contract") { - console.log(item, item.number, "閫夋嫨妗�66") this.productTableList.tableData = item.products this.tableData = item.products this.SalesDetailsId = item.id @@ -484,11 +483,17 @@ this.editSelCommonConfig.client_name = this.editConfig.infomation.client_name } }, - selClient(row, value) { + async selClient(row, value) { console.log(row, value) if (value === "client") { this.editConfig.infomation.client_name = row.name this.clientId = row.id + this.editSelCommonConfig.clientId = row.id + await getSalesDetailsList({ + clientId: row.id + }).then((res) => { + this.getSalesDetailsFliter(res.data.list) + }) } else if (value === "contract") { this.editConfig.infomation.salesDetailNumber = row.number this.SalesDetailsId = row.id @@ -499,8 +504,9 @@ // 娓呴櫎宸查�夋嫨鐢ㄦ埛 clearupClient(value) { if (value === "client") { - this.editConfig.infomation.client_name = "" - this.clientId = 0 + this.editConfig.infomation = {} + // this.editConfig.infomation.client_name = "" + // this.clientId = 0 } else if (value === "contract") { this.editConfig.infomation.salesDetailNumber = "" this.productTableList.tableData = [] diff --git a/src/views/service/clientServiceOrder/index.vue b/src/views/service/clientServiceOrder/index.vue index 53a79ca..dcc31aa 100644 --- a/src/views/service/clientServiceOrder/index.vue +++ b/src/views/service/clientServiceOrder/index.vue @@ -184,8 +184,7 @@ keywordType: this.keywordType, page: this.pagerOptions.currPage, pageSize: this.pagerOptions.pageSize, - - sourceId:this.addConfig.salesDetailsId + sourceId: this.addConfig.id }) .then((res) => { console.log(res) -- Gitblit v1.8.0