From 6365989d130a8f5e222687b7441aa19a8b5eb9d6 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期一, 28 八月 2023 19:57:10 +0800 Subject: [PATCH] 采购单联调 --- src/views/purchaseManage/purchase/DetailSupplier.vue | 56 +++++++++++++++++++++----------------------------------- 1 files changed, 21 insertions(+), 35 deletions(-) diff --git a/src/views/purchaseManage/purchase/DetailSupplier.vue b/src/views/purchaseManage/purchase/DetailSupplier.vue index c3f9e39..f57178d 100644 --- a/src/views/purchaseManage/purchase/DetailSupplier.vue +++ b/src/views/purchaseManage/purchase/DetailSupplier.vue @@ -152,7 +152,7 @@ </template> <script> -import { getDeleteSalesLeads } from "@/api/client/salesLead"; +import { deletePurchase } from "@/api/purchaseManage/purchase"; export default { name: "DetailSupplier", props: { @@ -177,7 +177,6 @@ basicInfoList: [], isDynamicExpand: true, // 璐︽埛淇℃伅 dynamicInfoList: [], - addConfig: {}, record: "", // 鏈�鏂拌繘灞� noContactDays: 0, newContactDays: "", @@ -193,13 +192,7 @@ }, created() { this.setData(this.detailConfig.infomation); - this.addConfig = { - id_name: "sales_leads_id", - id: this.detailConfig.infomation.id, - common_name: this.detailConfig.infomation.id, - sales_leads_name: this.detailConfig.infomation.name, - sales_leads_id: this.detailConfig.infomation.id, - }; + }, mounted() {}, computed: {}, @@ -214,10 +207,11 @@ type: "warning", }) .then(() => { - getDeleteSalesLeads({ ids: this.selValueList }).then((response) => { + deletePurchase({ id: this.commonDetail.infomation.ID }).then((response) => { if (response.code === 200) { this.$message.success("鍒犻櫎鎴愬姛"); - this.getData(); + this.detailConfig.visible=false; + this.$parent.getData(); } else { this.$message.warning("鍒犻櫎澶辫触"); } @@ -227,16 +221,13 @@ }, setData(item) { if (item.FollowRecord && item.FollowRecord.length > 0) { - this.record = item.FollowRecord[0].record; - console.log(item.FollowRecord[0].follow_time); - let follow_time = item.FollowRecord[0].follow_time; - this.newContactDays = follow_time.substring(0, 10); this.noContactDays = this.getDiffDay(Date.now(), this.newContactDays); } + this.record =item.record?item.record:'' this.formInfoList = [ { str: "渚涘簲鍟嗗悕绉�", - value: "", + value: item.name, }, { str: "鍚堣", @@ -252,7 +243,7 @@ }, { str: "绛剧害鏃ユ湡", - value: "", + value:item.signingDate, }, { str: "閲囪喘璐熻矗浜�", @@ -282,15 +273,15 @@ }, { leftStr: "閲囪喘鑱旂郴浜�", - leftValue: item.contact_phone, + leftValue: item.contact, rightStr: "鑱旂郴鐢佃瘽", - rightValue: "18513375588", + rightValue: item.phone, }, { leftStr: "绛剧害鏃ユ湡", - leftValue: item.sales_resources, + leftValue: item.signingDate, rightStr: "浜や粯鏃ユ湡", - rightValue: item.member_name, + rightValue: item.deliveryDate, }, { leftStr: "鍒拌揣浠撳簱", @@ -320,22 +311,17 @@ }, ]; this.tableList = { - tableInfomation: [ - { - number:1, - total:1, - } - ], + tableInfomation: item.productList?item.productList:[], selectIndex: true, tableColumn: [ - { label: "浜у搧鍚嶇О", prop: "number", min: 190, isCommonClick: true }, - { label: "浜у搧缂栫爜", prop: "total", min: 130, isCommonClick: true }, - { label: "璁¢噺鍗曚綅", prop: "contact_name", min: 130 }, - { label: "瑙勬牸鍨嬪彿", prop: "contact_phone", min: 130 }, - { label: "鏁伴噺", prop: "contact_phone", min: 130 }, - { label: "閿�鍞崟浠�", prop: "sales_resources", min: 130 }, - { label: "浠风◣鍚堣", prop: "province", min: 130 }, - { label: "鎻忚堪", prop: "province", min: 130 }, + { label: "浜у搧鍚嶇О", prop: "name", min: 190, isCommonClick: true }, + { label: "浜у搧缂栫爜", prop: "number", min: 130, isCommonClick: true }, + { label: "璁¢噺鍗曚綅", prop: "unit", min: 130 }, + { label: "瑙勬牸鍨嬪彿", prop: "specifications", min: 130 }, + { label: "鏁伴噺", prop: "amount", min: 130 }, + { label: "閿�鍞崟浠�", prop: "price", min: 130 }, + { label: "浠风◣鍚堣", prop: "total", min: 130 }, + { label: "鎻忚堪", prop: "remark", min: 130 }, ], }; }, -- Gitblit v1.8.0