From 288b93ac17c816b2fb9748a54e09e62385a73ddd 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: Fri, 6 Sep 2024 09:53:23 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=B7=A5=E4=BD=9C=E7=AB=99=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=98=BE=E7=A4=BA=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/mes/md/vendor/index.vue | 24 +++-
src/views/mes/md/workstation/index.vue | 154 ++++++++++++++++++-------
2 files changed, 132 insertions(+), 46 deletions(-)
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