From 0de37e701d64061723fa1fd951e97b9f40a142fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?yinjinlu-pc=5C=E5=B0=B9=E9=87=91=E8=B7=AF?=
<411641505@qq.com>
Date: Wed, 6 Sep 2023 00:10:13 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E4=BD=8D=E7=9A=84=E8=B5=8B=E7=A0=81?=
=?UTF-8?q?=E7=94=9F=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/mes/wm/barcode/index.vue | 67 ++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/src/views/mes/wm/barcode/index.vue b/src/views/mes/wm/barcode/index.vue
index 5786a9b..d4a2ad8 100644
--- a/src/views/mes/wm/barcode/index.vue
+++ b/src/views/mes/wm/barcode/index.vue
@@ -201,6 +201,27 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -234,6 +255,7 @@
+
@@ -250,6 +272,8 @@
+
+
@@ -294,6 +318,7 @@ import PackageSelectSingle from "@/components/package/single.vue";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue"
import Barcodeconfig from "./config.vue"
import BarcodeBatchPrint from "./batchprint.vue"
+import {getTreeList} from "@/api/mes/wm/warehouse"
export default {
name: "Barcode",
dicts: ['mes_barcode_type','mes_barcode_formart','sys_yes_no'],
@@ -302,6 +327,13 @@ export default {
},
data() {
return {
+ warehouseInfo:[],
+ warehouseOptions:[],
+ warehouseProps:{
+ multiple: false,
+ value: 'pId',
+ label: 'pName',
+ },
optType: null,
// 遮罩层
loading: true,
@@ -352,6 +384,7 @@ export default {
},
created() {
this.getList();
+ this.getWarehouseList();
},
methods: {
/** 查询条码清单列表 */
@@ -485,6 +518,40 @@ export default {
this.form.barcodeContent= "".concat(this.form.barcodeType,'-',this.form.bussinessCode);
}
},
+ //选择仓库、库区、库位
+ getWarehouseList(){
+ getTreeList().then( response =>{
+ if(response.data){
+ this.warehouseOptions = response.data.filter((el) =>{
+ return el.warehouseCode.indexOf('VIR') == -1;
+ });;
+ }
+ this.warehouseOptions.map(w =>{
+ debugger;
+ w.children.map(l =>{
+ let lstr =JSON.stringify(l.children).replace(/locationId/g,'lId').replace(/areaId/g, 'pId').replace(/areaName/g,'pName');
+ l.children = JSON.parse(lstr);
+ });
+
+ let wstr = JSON.stringify(w.children).replace(/warehouseId/g,'wId').replace(/locationId/g, 'pId').replace(/locationName/g,'pName');
+ w.children = JSON.parse(wstr);
+
+ });
+ let ostr=JSON.stringify(this.warehouseOptions).replace(/warehouseId/g,'pId').replace(/warehouseName/g, 'pName');
+ this.warehouseOptions = JSON.parse(ostr);
+ debugger;
+ });
+ },
+ handleWarehouseChanged(obj){
+ debugger;
+ const checkedNode = this.$refs['warehouseRef'].getCheckedNodes();
+ if(obj !=null){
+ this.form.bussinessId = checkedNode[0].data.pId;
+ this.form.bussinessCode = checkedNode[0].data.areaCode;
+ this.form.bussinessName = checkedNode[0].data.pName;
+ this.form.barcodeContent = "".concat(this.form.barcodeType,'-',this.form.bussinessCode);
+ }
+ },
//装箱单选择
handleSelectPackage(){
this.$refs.packageSelect.showFlag=true;