From d68b036a3b3c67273b8effa3c9925ef3869a91ba Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 07 二月 2024 13:56:50 +0800 Subject: [PATCH] wms项目 wms系统参数设置的页面开发+路由+是否显示表头配置 --- src/components/makepager/CommonFormTableView.vue | 82 ++++++++++++++++++++++++++++++---------- 1 files changed, 61 insertions(+), 21 deletions(-) diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue index fae8e86..2a8bd19 100644 --- a/src/components/makepager/CommonFormTableView.vue +++ b/src/components/makepager/CommonFormTableView.vue @@ -185,7 +185,7 @@ style="width: 80%" @change=" (val) => { - selLocationClick(val, item.prop) + selLocationClick(val, item.prop,scope.row) } " > @@ -285,6 +285,25 @@ </template> </div> </el-form-item> + <!-- 浠� --> + <el-form-item v-else-if="item.formLocation" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop"> + <div class="custom-name"> + <span v-if="scope.row.isEdit || scope.row.editable">{{ scope.row.formLocation }}</span> + <el-autocomplete + v-else + style="width: 100%" + v-model="scope.row.productCategory" + @focus="productTypeFocus" + :fetch-suggestions=" + (queryString, callback) => { + querySearchAsync(queryString, callback, 'formLocation') + } + " + value-key="name" + @select="handleSelectClient('formLocation', $event)" + ></el-autocomplete> + </div> + </el-form-item> <!-- 浜у搧绫诲埆 --> <el-form-item v-else-if="item.productType" @@ -369,7 +388,7 @@ <slot name="tableButton" /> </el-table> </el-form> - <div v-if="!detailEnter && !isinventory && !islistingrules && !isReorder" style="margin: 10px"> + <div v-if="!detailEnter && !isinventory && !isReorder" style="margin: 10px"> <el-button size="small" type="primary" @click="add">娣诲姞鏄庣粏琛�</el-button> <!-- <el-button size="small" type="primary" @click="empty">娓呯┖</el-button> --> </div> @@ -458,7 +477,9 @@ locacionId: 0, productName: "", productId: "", - initialPosition: "" + initialPosition: "", + formLocationList:[], + toLocationList:[], } }, created() { @@ -497,6 +518,7 @@ } }) }, + // 涓嬫媺鎼滅储 async handleSelectClient(value, item) { this.$emit("selProductClick", value, item) if (value === "product") { @@ -527,6 +549,8 @@ restaurants = this.productNameOptions } else if (value === "productType") { restaurants = this.productTypeNameOptions + }else if(value==="formLocation"){ + restaurants = this.selLocationOptions } var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants cb(results) @@ -573,6 +597,7 @@ } }) }, + // 浣嶇疆 async getLocationList() { this.locacionName = "" @@ -616,24 +641,39 @@ } }) }, - // 璁剧疆瀛愪綅缃� - async setLocationList(jointName) { - await getLocationList({ - // keyword: "", - jointName: jointName, - page: 1, - pageSize: 100 - }).then((res) => { - if (res.code === 200) { - const list = res.data ? res.data : [] - this.selSonLocationOptions = list - // if (this.isReorder) { - // this.locacionName = list[0]?.name - // this.locacionId = list[0]?.id - // this.$emit("selLocationClick", list[0], "locacionName") - // } - } - }) + // 璁剧疆瀛愪綅缃�/婧愪綅缃� + async setLocationList(jointName,tag) { + if(tag==="fromLocation"){ + await getLocationList({ + jointName: jointName, + page: 1, + pageSize: 100 + }).then((res) => { + if (res.code === 200) { + this.selSonLocationOptions = res.data + } + }) + }else if(tag==="toLocation"){ + await getLocationList({ + jointName: jointName, + page: 1, + pageSize: 100 + }).then((res) => { + if (res.code === 200) { + this.selToLocationOptions = res.data + } + }) + }else{ + await getLocationList({ + jointName: jointName, + page: 1, + pageSize: 100 + }).then((res) => { + if (res.code === 200) { + this.selSonLocationOptions = res.data + } + }) + } }, // 鑾峰彇鍏徃鍒楄〃 async getCompanyList() { -- Gitblit v1.8.0