From 3472c98ae1f560d0e326cab0994fe755aeb89d8f Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 30 十月 2023 11:04:20 +0800
Subject: [PATCH] 显示扫码位,上片位当前玻璃信息,添加确认扫码位玻璃功能
---
CanadaMes-ui/src/views/home/index.vue | 80 ++++++++++++++++++++++++++++++++--------
CanadaMes-ui/src/api/home.js | 8 ++++
CanadaMes-ui/src/lang/locales/en-US.json | 6 ++
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java | 4 ++
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java | 9 ++++
CanadaMes-ui/src/lang/locales/zh-CN.json | 6 ++
6 files changed, 94 insertions(+), 19 deletions(-)
diff --git a/CanadaMes-ui/src/api/home.js b/CanadaMes-ui/src/api/home.js
index c86ac99..7658487 100644
--- a/CanadaMes-ui/src/api/home.js
+++ b/CanadaMes-ui/src/api/home.js
@@ -130,4 +130,12 @@
method: 'post',
data:""
})
+}
+
+export function InsertQueueGlassId(glassid) {
+ return request({
+ url: '/home/InsertQueueGlassId?glassid=' + glassid,
+ method: 'post',
+ data: ""
+ })
}
\ No newline at end of file
diff --git a/CanadaMes-ui/src/lang/locales/en-US.json b/CanadaMes-ui/src/lang/locales/en-US.json
index 994ccc2..0769742 100644
--- a/CanadaMes-ui/src/lang/locales/en-US.json
+++ b/CanadaMes-ui/src/lang/locales/en-US.json
@@ -292,6 +292,10 @@
"Enter the Order lD":"Enter the Order lD",
"OrderInfo":"OrderInfo",
"Query":"Query",
- "permission update":"permission update"
+ "permission update":"permission update",
+ "query was successful":"query was successful",
+ "Scan Code Point":"Scan Code Point",
+ "Upper film position":"Upper film position",
+ "Glass Information":"Glass Information"
}
\ No newline at end of file
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index 20c1032..767e722 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -295,6 +295,10 @@
"Enter the Order lD":"璇疯緭鍏ヨ鍗昳d",
"OrderInfo":"璁㈠崟淇℃伅",
"Query":"鏌ヨ",
- "permission update":"鏉冮檺缂栬緫"
+ "permission update":"鏉冮檺缂栬緫",
+ "query was successful":"鏌ヨ鎴愬姛",
+ "Scan Code Point":"鎵爜浣�",
+ "Upper film position":"涓婄墖浣�",
+ "Glass Information":"鐜荤拑淇℃伅"
}
\ No newline at end of file
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 7f82e44..7012203 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -195,7 +195,7 @@
</div>
<div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;">
<el-input style="width:15%;" :placeholder="$t('Enter the glass lD')" v-model="glassid1"></el-input>
- <el-button type="primary" @click="showform3()">{{ $t('Infeed barcodid') }}</el-button>
+ <el-button type="primary" @click="SelectGlassByGlassIDs()">{{ $t('Infeed barcodid') }}</el-button>
<el-input style="width:15%;" :placeholder="$t('Enter the order number')" v-model="order"></el-input>
<el-button type="warning" @click="showform1();">{{ $t('Exit the glass by order number') }}</el-button>
</div>
@@ -338,11 +338,12 @@
<el-form :model="form" label-width="100px" style="padding-right: 30px">
<el-form-item style="text-align: center;">
<el-input style="width:15%;" :placeholder="$t('Enter the glass lD')" v-model="glassid1"></el-input>
- <el-button type="primary" @click="showform(3)">{{ $t('Query') }}</el-button>
+ <el-button type="primary" @click="SelectGlassByGlassIDs()">{{ $t('Query') }}</el-button>
</el-form-item>
- <div style="display: flex;justify-content: space-around;">
- <label for="">鎵爜浣�</label>
- <label for="">涓婄墖浣�</label>
+ <div style="display: flex;justify-content: space-around;height: 40px;">
+ <label for="">{{ $t('Scan Code Point') }}</label>
+ <label for="">{{ $t('Upper film position') }}</label>
+ <label for="">{{ $t('Glass Information') }}</label>
</div>
<div style="display: flex;justify-content: space-around;">
<el-form-item :label="$t('Barcodid')">
@@ -350,6 +351,9 @@
</el-form-item>
<el-form-item :label="$t('Barcodid')">
<el-input v-model="form3.glassId" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('Barcodid')">
+ <el-input v-model="form4.glassId" readonly autocomplete="off" />
</el-form-item>
</div>
<div style="display: flex;justify-content: space-around;">
@@ -359,6 +363,9 @@
<el-form-item :label="$t('order')">
<el-input v-model="form3.orderId" readonly autocomplete="off" />
</el-form-item>
+ <el-form-item :label="$t('order')">
+ <el-input v-model="form4.orderId" readonly autocomplete="off" />
+ </el-form-item>
</div>
<div style="display: flex;justify-content: space-around;">
<el-form-item :label="$t('length')">
@@ -366,6 +373,9 @@
</el-form-item>
<el-form-item :label="$t('length')">
<el-input v-model="form3.height" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('length')">
+ <el-input v-model="form4.height" readonly autocomplete="off" />
</el-form-item>
</div>
<div style="display: flex;justify-content: space-around;">
@@ -375,12 +385,18 @@
<el-form-item :label="$t('width')">
<el-input v-model="form3.width" readonly autocomplete="off" />
</el-form-item>
+ <el-form-item :label="$t('width')">
+ <el-input v-model="form4.width" readonly autocomplete="off" />
+ </el-form-item>
</div>
-
+
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="FeedInglassid()" type="primary">{{ $t('confirm') }}</el-button>
+ <el-button @click="InsertQueueGlass()" type="primary" :disabled="disabled">{{ $t('confirm')
+ }}</el-button>
+ <el-button @click="InsertQueueGlass()" type="primary" :disabled="disabled">{{ $t('confirm')
+ }}</el-button>
<el-button @click="cancel3()">{{ $t('cancel') }}</el-button>
</span>
</template>
@@ -477,8 +493,8 @@
<script>
//:disabled="scope.row.glassId > 0 || scope.row.disabled == 1 ? true : false"
import {
- home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo,
- SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist, SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass
+ home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist,
+ SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass, InsertQueueGlassId
} from "../../api/home";
@@ -512,16 +528,22 @@
number: 800,
},
form2: {
- orderId: "5",
- glassId: "6",
- height: "7",
- width: "8"
+ orderId: "1145",
+ glassId: "112",
+ height: "59.06",
+ width: "48.03"
},
form3: {
orderId: "1",
glassId: "2",
height: "3",
width: "4"
+ },
+ form4: {
+ orderId: "",
+ glassId: "",
+ height: "",
+ width: ""
},
alarm: [],
tableData: [],
@@ -550,6 +572,8 @@
zhuangtai: "",
orderid: "",
GlassInfo: [],
+ disabled: true,
+ disabled1: true,
currentPage: 1, //榛樿鍒濆椤�
pagesize: 15, //姣忛〉榛樿鏄剧ず鐨勬暟鎹�
pageCount: 0
@@ -580,7 +604,6 @@
};
// 娴忚鍣ㄧ鏀舵秷鎭紝鑾峰緱浠庢湇鍔$鍙戦�佽繃鏉ョ殑鏂囨湰娑堟伅
socket.onmessage = function (msg) {
-
//console.log("鏀跺埌鏁版嵁====" + msg.data);
let obj = JSON.parse(msg.data);
if (obj.params != null) {
@@ -602,6 +625,7 @@
this.glassid1 = obj.queid[0];
if (this.glassid1 != "") {
+ this.disabled1=false;
this.showform3();
}
this.form2 = obj.form2;
@@ -734,7 +758,7 @@
if (res.data.form != null) {
this.form = res.data.form;
this.dialogFormVisible = true;
- this.$message.success('query was successful');
+ this.$message.success(this.$t('query was successful'));
} else {
this.dialogFormVisible = true;
this.$message.error(this.$t('There is no such glass'));
@@ -753,8 +777,25 @@
}
},
//鏄剧ず鎵爜浣嶅拰涓婄墖浣�
- showform3() {
+ showform3(){
this.dialogFormVisible5 = true;
+ },
+ //鑾峰彇鎵爜浣嶅拰涓婄墖浣嶆暟鎹�
+ SelectGlassByGlassIDs() {
+ this.showform3();
+ SelectGlassByGlassID(this.glassid1).then(res => {
+ if (res.data.form != null) {
+ this.form4 = res.data.form;
+ this.$message.success(this.$t('query was successful'));
+ } else {
+ this.$message.error(this.$t('There is no such glass'));
+ }
+ if (this.form2.glassId == "") {
+ this.disabled = false;
+ } else {
+ this.disabled = true;
+ }
+ });
},
selectglassinfo() {
SelectGlass(this.orderid).then(res => {
@@ -947,6 +988,13 @@
handleCurrentChange: function (currentPage) {
this.currentPage = currentPage;
},
+ InsertQueueGlass() {
+ InsertQueueGlassId(this.glassid1).then(res => {
+ if (res.data.message == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
+ }
}
}
</script>
\ No newline at end of file
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
index 8ce263e..5f6f1f4 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -217,6 +217,13 @@
return Result.success(map);
}
-
+ //鎵嬪姩娣诲姞鎵爜浣嶇幓鐠�
+ @PostMapping("/InsertQueueGlassId")
+ public Result InsertQueueGlassId(String glassid) {
+ homeMapper.InsertQueueGlassId(glassid);
+ Map<String, Object> map = new HashMap<>();
+ map.put("message", "200");
+ return Result.success(map);
+ }
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
index 2d5febd..c5e465f 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -112,5 +112,9 @@
@Select("select * from queue qe inner join glass gl on qe.glassid=gl.glassid where id=#{id}")
List<Glass> GetQueueInfo(int id);
+
+ @Select("update queue set glassid=#{glassid},state=0,time=now() where id=1")
+ void InsertQueueGlassId(String glassid);
+
}
--
Gitblit v1.8.0