From 4cb4e41df7c2cc7954e09ef3751ecb24de7c06d2 Mon Sep 17 00:00:00 2001 From: hdy <1105738590@qq.com> Date: 星期五, 14 三月 2025 13:28:25 +0800 Subject: [PATCH] 修改 --- billion-ui/src/views/main/bs/routeInfo/index.vue | 40 ++++++++++++++++++++++++++++++---------- 1 files changed, 30 insertions(+), 10 deletions(-) diff --git a/billion-ui/src/views/main/bs/routeInfo/index.vue b/billion-ui/src/views/main/bs/routeInfo/index.vue index c310d30..d8610f1 100644 --- a/billion-ui/src/views/main/bs/routeInfo/index.vue +++ b/billion-ui/src/views/main/bs/routeInfo/index.vue @@ -117,21 +117,21 @@ </router-link> </template> </el-table-column> - <el-table-column show-overflow-tooltip="true" label="娴佺▼鍚嶇О" align="center" prop="routeName" /> - <el-table-column show-overflow-tooltip="true" label="浜у搧缂栫爜" align="center" prop="productCode" /> - <el-table-column show-overflow-tooltip="true" label="浜у搧鍚嶇О" align="center" prop="productName" /> - <el-table-column show-overflow-tooltip="true" label="鐗堟湰" align="center" prop="version" /> + <el-table-column :show-overflow-tooltip="true" label="娴佺▼鍚嶇О" align="center" prop="routeName" /> + <el-table-column :show-overflow-tooltip="true" label="浜у搧缂栫爜" align="center" prop="productCode" /> + <el-table-column :show-overflow-tooltip="true" label="浜у搧鍚嶇О" align="center" prop="productName" /> + <el-table-column :show-overflow-tooltip="true" label="鐗堟湰" align="center" prop="version" /> <el-table-column label="鐘舵��" align="center" prop="status"> <template slot-scope="scope"> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> </template> </el-table-column> - <el-table-column show-overflow-tooltip="true" label="鏁版嵁鏉ユ簮" align="center" prop="dataSource" /> - <el-table-column show-overflow-tooltip="true" label="澶囨敞" align="center" prop="remark" /> - <el-table-column show-overflow-tooltip="true" label="鍒涘缓鐢ㄦ埛" align="center" prop="createBy" /> + <el-table-column :show-overflow-tooltip="true" label="鏁版嵁鏉ユ簮" align="center" prop="dataSource" /> + <el-table-column :show-overflow-tooltip="true" label="澶囨敞" align="center" prop="remark" /> + <el-table-column :show-overflow-tooltip="true" label="鍒涘缓鐢ㄦ埛" align="center" prop="createBy" /> <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> </el-table-column> - <el-table-column show-overflow-tooltip="true" label="鏇存敼鐢ㄦ埛" align="center" prop="updateBy" /> + <el-table-column :show-overflow-tooltip="true" label="鏇存敼鐢ㄦ埛" align="center" prop="updateBy" /> <el-table-column label="鏇存敼鏃堕棿" align="center" prop="updateTime" width="180"> </el-table-column> </el-table> @@ -157,7 +157,11 @@ <el-input v-model="form.routeName" placeholder="璇疯緭鍏ユ祦绋嬪悕绉�" /> </el-form-item> <el-form-item label="浜у搧缂栫爜" prop="productCode"> - <el-input v-model="form.productCode" placeholder="璇疯緭鍏ヤ骇鍝佺紪鐮�" /> + <el-input v-model="form.productCode" placeholder="璇烽�夋嫨浜у搧缂栫爜" readonly> + <template #append> + <el-button @click="dialogTableVisible = true">閫夋嫨</el-button> + </template> + </el-input> </el-form-item> <el-form-item label="浜у搧鍚嶇О" prop="productName"> <el-input v-model="form.productName" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�" /> @@ -186,17 +190,28 @@ <el-button @click="cancel">鍙� 娑�</el-button> </div> </el-dialog> + <!-- 浜у搧閫夋嫨鍣ㄧ粍浠� --> + <ProductSelector + :visible="dialogTableVisible" + @select-product="handleSelectProduct" + @update:visible="dialogTableVisible = $event" + /> </div> </template> <script> import { listRouteInfo, getRouteInfo, delRouteInfo, addRouteInfo, updateRouteInfo } from "@/api/main/bs/routeInfo"; - +import ProductSelector from "./ProductSelector.vue"; export default { + components: { + ProductSelector + }, name: "RouteInfo", dicts: ['sys_normal_disable'], data() { return { + multipleSelection: [], + dialogTableVisible: false, advancedSearchVisible: false, // 閬僵灞� loading: true, @@ -247,6 +262,11 @@ this.getList(); }, methods: { + handleSelectProduct(selectedProduct) { + console.log(selectedProduct) + this.form.productCode = selectedProduct.materialCode; // 鍋囪浣犻渶瑕佺殑鏄棩鏈熷瓧娈� + this.form.productName = selectedProduct.materialName; // 鍋囪浣犻渶瑕佺殑鏄鍚嶅瓧娈� + }, toggleAdvancedSearch() { this.advancedSearchVisible = !this.advancedSearchVisible; }, -- Gitblit v1.9.3