diff --git a/src/views/mes/md/vendor/index.vue b/src/views/mes/md/vendor/index.vue index e759e9c..3b2e280 100644 --- a/src/views/mes/md/vendor/index.vue +++ b/src/views/mes/md/vendor/index.vue @@ -224,11 +224,13 @@ - -
- -
-
+
+ +
+ +
+
+
@@ -665,7 +667,9 @@ export default { this.barcodeParams.bussinessId = this.form.vendorId; this.barcodeParams.bussinessCode = this.form.vendorCode; getBarcodeUrl(this.barcodeParams).then( response =>{ - this.$set(this.form,'barcodeUrl',response.data.barcodeUrl);//强制刷新DOM + if(response.data != null){ + this.$set(this.form,'barcodeUrl',response.data.barcodeUrl);//强制刷新DOM + } }); }, //自动生成编码 @@ -686,6 +690,14 @@ export default { .barcodeClass { width: 200px; height: 200px; + border: 1px dashed; + position: relative; + display: inline-block; } + .flex-container{ + display: flex; + justify-content: center; /* 水平居中 */ + align-items: center; /* 垂直居中 */ + } \ 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 f94c6d7..cac96f3 100644 --- a/src/views/mes/md/workstation/index.vue +++ b/src/views/mes/md/workstation/index.vue @@ -156,45 +156,62 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+ +
+ +
+
+
+
+ @@ -294,6 +311,7 @@ import {getTreeList} from "@/api/mes/wm/warehouse" import {listAllProcess} from "@/api/mes/pro/process"; import {genCode} from "@/api/system/autocode/rule"; import { listAllWorkshop } from "@/api/mes/md/workshop"; +import { getBarcodeUrl } from "@/api/mes/wm/barcode"; export default { name: "Workstation", dicts: ['sys_yes_no'], @@ -350,8 +368,36 @@ export default { areaId: null, enableFlag: null, }, + //二维码查询参数 + barcodeParams: { + bussinessId: null, + bussinessCode: null, + barcodeFormart: 'QR_CODE', //模式二维码 + barcodeType: 'WORKSTATION' //类型为供应商 + }, // 表单参数 - form: {}, + form: { + workstationId: null, + workstationCode: null, + workstationName: null, + workstationAddress: null, + workshopId: null, + workshopCode: null, + workshopName: null, + processId: null, + processCode: null, + processName: null, + warehouseId: null, + locationId: null, + areaId: null, + enableFlag: 'Y', + remark: null, + barcodeUrl: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null + }, // 表单校验 rules: { workstationCode: [ @@ -449,6 +495,7 @@ export default { areaId: null, enableFlag: 'Y', remark: null, + barcodeUrl: null, createBy: null, createTime: null, updateBy: null, @@ -508,6 +555,7 @@ export default { this.open = true; this.title = "查看车间信息"; this.optType = "view"; + this.getBarcodeUrl(); }); }, /** 修改按钮操作 */ @@ -520,6 +568,7 @@ export default { this.open = true; this.title = "修改工作站"; this.optType = "edit"; + this.getBarcodeUrl(); }); }, /** 提交按钮 */ @@ -589,7 +638,32 @@ export default { //工装夹具资源新增 handleToolTypeAdd(){ this.$refs.toolList.handleAdd(); - } + }, + //获取某个供应商的二维码地址 + getBarcodeUrl(){ + this.barcodeParams.bussinessId = this.form.workstationId; + this.barcodeParams.bussinessCode = this.form.workstationCode; + getBarcodeUrl(this.barcodeParams).then( response =>{ + if(response.data != null){ + this.$set(this.form,'barcodeUrl',response.data.barcodeUrl);//强制刷新DOM + } + }); + }, } }; + \ No newline at end of file