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/components/SelectSupplierDialog.vue | 52 +++++++++++++++++++++------------------------------- 1 files changed, 21 insertions(+), 31 deletions(-) diff --git a/src/views/purchaseManage/purchase/components/SelectClientDialog.vue b/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue similarity index 74% rename from src/views/purchaseManage/purchase/components/SelectClientDialog.vue rename to src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue index ae0c94c..a5dd842 100644 --- a/src/views/purchaseManage/purchase/components/SelectClientDialog.vue +++ b/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue @@ -1,7 +1,7 @@ <template> <div class="edit-selClient-box"> <el-dialog - :title="'瀹㈡埛绠$悊'" + :title="'渚涘簲鍟嗗悕绉�'" :visible.sync="editConfig.editVisible" :width="dialogWidth" :before-close="handleClose" @@ -38,9 +38,7 @@ </template> <script> -import { - getClientList -} from "@/api/purchaseManage/purchase"; +import { getSupplierList } from "@/api/supplierManage/supplier" export default { name: "EditSelClientDialog", props: { @@ -80,15 +78,14 @@ this.tableList = { tableInfomation: [], tableColumn: [ - { label: "瀹㈡埛鍚嶇О", prop: "name", min: 100, isClick: true }, - { label: "瀹㈡埛缂栧彿", prop: "number" }, - { label: "瀹㈡埛鐘舵��", prop: "client_status" }, - { label: "閿�鍞礋璐d汉", prop: "member_name", min: 100 }, - { label: "娉曞畾浠h〃浜�", prop: "representative", min: 100 }, - { label: "娉ㄥ唽鏃堕棿", prop: "registration_time" }, - { label: "缁忚惀鑼冨洿", prop: "business_scope" }, - { label: "璇︾粏鍦板潃", prop: "detail_address" }, - { label: "澶囨敞", prop: "remark" } + { label: "渚涘簲鍟嗙紪鍙�", prop: "number", min: 190, isCommonClick: true }, + { label: "渚涘簲鍟嗗悕绉�", prop: "name", min: 130 }, + { label: "渚涘簲鍟嗙被鍨�", prop: "supplierType", min: 130 }, + { label: "鎵�灞炶涓�", prop: "industry", min: 130 }, + { label: "鑱旂郴浜�", prop: "contact", min: 130 }, + { label: "鑱旂郴鐢佃瘽", prop: "phone", min: 130 }, + { label: "鐘舵��", prop: "status_name", min: 130 }, + { label: "鍒涘缓鏃堕棿", prop: "member_name", min: 130 } ] } this.searchOptions = [] @@ -102,22 +99,20 @@ this.editConfig.editVisible = false }, // 璇锋眰鏁版嵁 - async getData() { + async getData(val, content) { this.loading = true - await getClientList({ - search_map: this.search_map, - page: 0, - pageSize: 0 + await getSupplierList({ + [val]: content, + page:1, + pageSize: 10 }) .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) => { + if (res.data.code == 200) { + if (res.data.data.list && res.data.data.list.length > 0) { + const list = res.data.data.list.map((item) => { return { ...item, - client_status: item.client_status.name, - member_name: item.member.username + status_name: item.status === 0 ? "鏈惎鐢�" : "鍚敤" } }) this.tableList.tableInfomation = list.slice(0, 5) || [] @@ -131,7 +126,7 @@ }) .catch((err) => { console.log(err) - this.this.tableList.tableInfomation = [] + this.tableList.tableInfomation = [] this.loading = false }) }, @@ -141,14 +136,9 @@ }, // 鎼滅储 searchClick(val, content) { - console.log(val, content) - this.search_map = { - [val.value]: content - } - this.getData() + this.getData(val.value, content) }, resetClick() { - this.search_map = {} this.getData() } } -- Gitblit v1.8.0