From 46d46b7159c3f97e3e4cb0bf00e90e27b5367325 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期五, 29 三月 2024 18:08:22 +0800 Subject: [PATCH] 采购管理产品名称列表绑定供应商列表 --- src/components/makepager/CommonFormTableView.vue | 29 ++++++++++++++++++++--------- 1 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue index f03f1ab..b722ac6 100644 --- a/src/components/makepager/CommonFormTableView.vue +++ b/src/components/makepager/CommonFormTableView.vue @@ -10,7 +10,7 @@ :span-method="arraySpanMethod" style="width: 100%" @selection-change="handleSelectionChange" - :row-key="(row) => row.productId" + :row-key="getRowKeys" > <el-table-column v-if="selectBox" type="selection" :selectable="isDisabled" :reserve-selection="true" width="40" align="center"> @@ -315,9 +315,11 @@ editVisible: false, isSelectBox: false, title: "", - infomation: {} + infomation: {}, + supplierId:null, }, - productIndex: 0 + productIndex: 0, + supplierId:null, } }, created() { @@ -332,10 +334,20 @@ this.getTableInfo() }, immediate: true - } + }, + supplierId(n,o) { + this.editSelCommonConfig.supplierId=n + console.log(n,o,"鐪嬬湅閭�") + } }, computed: {}, methods: { + // 鑾峰彇row鐨刱ey鍊� + getRowKeys(row) { + let string; + string = row[this.productTableList.key?this.productTableList.key:this.productTableList.productId]; + return string; + }, isDisabled(row){ if (this.name == "rework") { if (row.status == 1) { @@ -365,9 +377,9 @@ async getProductList() { let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc await fn({ - page: 1, - pageSize: 100 - }).then((res) => { + page: 1, + pageSize: 100, + }).then((res) => { if (res.code === 200) { if (res.data.list && res.data.list.length > 0) { this.productList = res.data.list @@ -553,8 +565,7 @@ }) }, // 鏂板 - selClientClick(scope, prop) { - console.log(scope, prop) + selClientClick(scope) { this.productIndex = scope.$index this.editSelCommonConfig.title = "浜у搧鍚嶇О" this.editSelCommonConfig.isSelectBox = true -- Gitblit v1.8.0