From 46d46b7159c3f97e3e4cb0bf00e90e27b5367325 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期五, 29 三月 2024 18:08:22 +0800 Subject: [PATCH] 采购管理产品名称列表绑定供应商列表 --- src/views/other/commonDialog/SelectCommonDialog.vue | 66 ++++++++++++++++++++++----------- 1 files changed, 44 insertions(+), 22 deletions(-) diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue index e4d3bc0..8b0fedd 100644 --- a/src/views/other/commonDialog/SelectCommonDialog.vue +++ b/src/views/other/commonDialog/SelectCommonDialog.vue @@ -28,12 +28,15 @@ <el-button type="primary" size="mini" disabled>蹇�熷垱寤�</el-button> --> </div> </div> - <TableCommonView + <TableCommonView + class="bg-list" ref="tableListRef" :table-list="tableList" - :select-box="false" + :select-box="editCommonConfig.isSelectBox" + :selectBoxList="selectBoxList" @selCommonClick="selNameClick" @selTableCol="selTableCol" + @getSelectArray="getSelectArray" > </TableCommonView> <div slot="footer" class="dialog-footer"> @@ -42,6 +45,10 @@ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> </div> </div> + </div> + <div slot="footer" class="dialog-footer" v-if="editCommonConfig.isSelectBox"> + <el-button type="primary" size="small" @click="saveClick()">纭畾</el-button> + <el-button size="small" @click="editConfig.editVisible = false">鍙栨秷</el-button> </div> </el-dialog> </div> @@ -60,14 +67,23 @@ default: () => { return { editVisible: false, + isSelectBox: false, title: "", - tableInfomation: [] + clientId: 0, + isRequest: true, + client_name: "", + tableInfomation: [], + supplierId:null, } } }, sign: { type: String, default: "" + }, + selectBoxList: { + type: Array, + default: () => [] } }, components: {}, @@ -87,15 +103,20 @@ searchSel: {}, keyword: "", keywordType: "", - showProductCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿"], + showProductCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿", "閿�鍞崟浠�", "鍗曚綅", "浜у搧瑙勬牸", "鍨嬪彿"], tableProductColumn: [ { label: "浜у搧鍚嶇О", prop: "name", isClick: true }, - { label: "浜у搧缂栧彿", prop: "number" } + { label: "浜у搧缂栧彿", prop: "number" }, + { label: "閿�鍞崟浠�", prop: "purchasePrice" }, + { label: "鍗曚綅", prop: "unit" }, + { label: "浜у搧瑙勬牸", prop: "specifications" }, + { label: "鍨嬪彿", prop: "modelNumber" } ], showCol: [], - tableColumn: [] + tableColumn: [], + selectArray: [] } - }, + }, created() { this.setTable() this.getData() @@ -133,17 +154,17 @@ } }, selTableCol(val) { - this.showcol = val; - this.tableList.tableColumn = this.setColumnVisible(val); + this.showcol = val + this.tableList.tableColumn = this.setColumnVisible(val) }, - // setColumnVisible(showCol){ - // return this.tableColumn.map(ele=>{ - // return { - // ...ele, - // isShowColumn:showCol.includes(ele.label) - // } - // }) - // }, + // 鍒楄〃澶氶�� + getSelectArray(val) { + this.selectArray = val + }, + saveClick() { + this.$emit("getSelectArray", this.selectArray) + this.editConfig.editVisible = false + }, // 璇锋眰鏁版嵁 async getData() { this.loading = true @@ -155,10 +176,11 @@ async getProductList() { let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc await fn({ - keyword:this.keyword, - page: this.pagerOptions.currPage, - pageSize: this.pagerOptions.pageSize - }).then((res) => { + keyword: this.keyword, + page: this.pagerOptions.currPage, + supplierId:this.editConfig.supplierId, + pageSize: this.pagerOptions.pageSize, + }).then((res) => { if (res.code === 200) { if (res.data.list && res.data.list.length > 0) { const list = res.data.list.map((item) => { @@ -186,7 +208,7 @@ }, // 鎼滅储 searchClick(content) { - console.log( content) + console.log(content) this.keyword = content this.getData() }, -- Gitblit v1.8.0