diff --git a/src/components/stockSelect/single.vue b/src/components/stockSelect/single.vue index 0a77ed6..27d4c7c 100644 --- a/src/components/stockSelect/single.vue +++ b/src/components/stockSelect/single.vue @@ -245,10 +245,13 @@ export default { this.loading = true; listWmstock(this.queryParams).then(response => { if(response.rows){ - if(this.warehouseCode.indexOf('VIR') == -1){ + debugger; + if(this.warehouseCode != null && this.warehouseCode != undefined && this.warehouseCode.indexOf('VIR') >0 ){ + this.wmstockList = response.rows; + }else { //如果不是查询线边库的物资,则在查询结果中过滤掉线边库的数据 this.wmstockList = response.rows.filter((el) =>{ - return el.warehouseCode.indexOf('VIR') == -1; + return el.warehouseCode.indexOf('VIR') == -1; }); } this.total = response.total; diff --git a/src/views/mes/wm/barcode/index.vue b/src/views/mes/wm/barcode/index.vue index d4a2ad8..231e141 100644 --- a/src/views/mes/wm/barcode/index.vue +++ b/src/views/mes/wm/barcode/index.vue @@ -272,7 +272,22 @@ - + + + + + + + + + + + + + + + + @@ -316,6 +331,7 @@ import ItemSelect from "@/components/itemSelect/single.vue"; import VendorSelect from "@/components/vendorSelect/single.vue"; import PackageSelectSingle from "@/components/package/single.vue"; import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue" +import StockSelect from "@/components/stockSelect/single.vue" import Barcodeconfig from "./config.vue" import BarcodeBatchPrint from "./batchprint.vue" import {getTreeList} from "@/api/mes/wm/warehouse" @@ -323,7 +339,7 @@ export default { name: "Barcode", dicts: ['mes_barcode_type','mes_barcode_formart','sys_yes_no'], components: { - ItemSelect,VendorSelect,PackageSelectSingle,Barcodeconfig,WorkstationSelect,BarcodeBatchPrint + ItemSelect,VendorSelect,PackageSelectSingle,Barcodeconfig,WorkstationSelect,StockSelect,BarcodeBatchPrint }, data() { return { @@ -578,6 +594,22 @@ export default { this.form.barcodeContent= "".concat(this.form.barcodeType,'-',this.form.bussinessCode); } }, + /** + * 选择库存 + */ + handleMaterialStockSelect(){ + this.$refs.stockSelect.showFlag = true; + }, + + /**库存选择返回 */ + onMaterialStockSelected(obj){ + if(obj != undefined && obj != null){ + this.form.bussinessId = obj.materialStockId; + this.form.bussinessCode = obj.itemCode; + this.form.bussinessName = "".concat(obj.itemName,'|',obj.specification,'|',obj.vendorName,'|',obj.batchCode); + this.form.barcodeContent= "".concat(this.form.barcodeType,'-',this.form.bussinessId); + } + }, handleConfig(){ this.$refs.barcodeconfig.showFlag = true; },