diff --git a/src/views/mes/md/mditem/index.vue b/src/views/mes/md/mditem/index.vue index 3866b9c..f96c4a3 100644 --- a/src/views/mes/md/mditem/index.vue +++ b/src/views/mes/md/mditem/index.vue @@ -185,66 +185,88 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + - + +
+ +
+ +
+
+
+
+ + + + + + + + @@ -368,6 +390,7 @@ import {genCode} from "@/api/system/autocode/rule" import { getToken } from "@/utils/auth"; import { treeselect } from "@/api/mes/md/itemtype"; import Treeselect from "@riophae/vue-treeselect"; +import { getBarcodeUrl } from "@/api/mes/wm/barcode"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { @@ -427,6 +450,13 @@ export default { // 上传的地址 url: process.env.VUE_APP_BASE_API + "/mes/md/mditem/importData" }, + //二维码查询参数 + barcodeParams: { + bussinessId: null, + bussinessCode: null, + barcodeFormart: 'QR_CODE', //模式二维码 + barcodeType: 'ITEM' //类型 + }, // 查询参数 queryParams: { pageNum: 1, @@ -526,6 +556,7 @@ export default { itemOrProduct: undefined, enableFlag: 'Y', safeStockFlag: 'N', + barcodeUrl: null, minStock: 0, maxStock: 0, optType: undefined, @@ -560,6 +591,7 @@ export default { this.open = true; this.title = "查看物料/产品"; this.optType = "view"; + this.getBarcodeUrl(); }); }, /** 新增按钮操作 */ @@ -583,6 +615,7 @@ export default { this.open = true; this.optType = "edit"; this.title = "修改物料/产品"; + this.getBarcodeUrl(); }); }, /** 提交按钮 */ @@ -648,6 +681,16 @@ export default { submitFileForm() { this.$refs.upload.submit(); }, + //获取二维码地址 + getBarcodeUrl(){ + this.barcodeParams.bussinessId = this.form.itemId; + this.barcodeParams.bussinessCode = this.form.itemCode; + getBarcodeUrl(this.barcodeParams).then( response =>{ + if(response.data != null){ + this.$set(this.form,'barcodeUrl',response.data.barcodeUrl);//强制刷新DOM + } + }); + }, //自动生成物料编码 handleAutoGenChange(autoGenFlag){ debugger; @@ -661,4 +704,19 @@ export default { } } }; - \ No newline at end of file + + \ No newline at end of file diff --git a/src/views/mes/md/workstation/index.vue b/src/views/mes/md/workstation/index.vue index cac96f3..3490dda 100644 --- a/src/views/mes/md/workstation/index.vue +++ b/src/views/mes/md/workstation/index.vue @@ -373,7 +373,7 @@ export default { bussinessId: null, bussinessCode: null, barcodeFormart: 'QR_CODE', //模式二维码 - barcodeType: 'WORKSTATION' //类型为供应商 + barcodeType: 'WORKSTATION' //类型 }, // 表单参数 form: { @@ -639,7 +639,7 @@ export default { handleToolTypeAdd(){ this.$refs.toolList.handleAdd(); }, - //获取某个供应商的二维码地址 + //获取某个工作站的二维码地址 getBarcodeUrl(){ this.barcodeParams.bussinessId = this.form.workstationId; this.barcodeParams.bussinessCode = this.form.workstationCode;