库位的赋码生成
This commit is contained in:
parent
03ac62cd32
commit
0de37e701d
@ -201,6 +201,27 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--仓库-->
|
||||
<el-row v-if="form.barcodeType=='WAREHOUSE'">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="储位" prop="warehouseId">
|
||||
<!-- <el-cascader v-model="warehouseInfo"
|
||||
:options="warehouseOptions"
|
||||
:props="warehouseProps"
|
||||
@change="handleWarehouseChanged"
|
||||
>
|
||||
</el-cascader> -->
|
||||
<el-cascader v-model="warehouseInfo"
|
||||
ref="warehouseRef"
|
||||
:options="warehouseOptions"
|
||||
:props="warehouseProps"
|
||||
@change="handleWarehouseChanged"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!--箱条码-->
|
||||
<el-row v-if="form.barcodeType=='BOX'">
|
||||
<el-col :span="12">
|
||||
@ -234,6 +255,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 工作站 -->
|
||||
<el-row v-else-if="form.barcodeType=='WORKSTATION'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工作站" prop="bussinessCode">
|
||||
@ -250,6 +272,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<!--根据不同的条码类型展示不同的业务内容选择 end-->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user