From a4d8c9d69e1c171a8aa38a3f9be613f322a2c2b9 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期一, 09 十月 2023 16:10:44 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
CanadaMes-ui/src/views/home/index.vue | 274 +++++++++++++++++++++++++++++++++++-------------------
1 files changed, 178 insertions(+), 96 deletions(-)
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 049b252..cae044e 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -66,16 +66,6 @@
/* width: 4.22px; */
}
-/* .gezi:nth-child(22),
-.gezi:nth-child(43),
-.gezi:nth-child(64),
-.gezi:nth-child(85) {
- margin-left: 7px;
- margin-left: 10px;
-} */
-
-
-
.blocks {
@@ -139,7 +129,7 @@
.el-table td,
.el-table th {
- padding: 8px 0;
+ padding: 5px 0;
}
.el-table__empty-block {
@@ -153,18 +143,21 @@
.box {
width: 90%;
margin-left: 5%;
- height: 35px;
color: red;
font-size: 12px;
overflow: hidden;
+ height: 20px;
+ /* height: 35px; */
}
.text {
width: auto;
- line-height: 35px;
+
white-space: nowrap;
animation: textScroll 20s linear infinite;
margin: 0 auto;
+ line-height: 20px;
+ /* line-height: 35px; */
}
@keyframes textScroll {
@@ -178,7 +171,7 @@
}
.el-dialog {
- width: 80%;
+ width: 90%;
}
</style>
<template>
@@ -196,18 +189,19 @@
</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="glassid"></el-input>
- <el-button type="primary" @click="showform()">{{ $t('Manually feed the glass') }}</el-button>
+ <el-button type="primary" @click="showform(1)">{{ $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>
<div>
<el-table :data="this.tasklist1" border style="width: 100%">
- <el-table-column prop="glassId" :label="$t('Coming out glass ID')"></el-table-column>
- <el-table-column :width="250" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
- <el-table-column :width="250" prop="cell" :label="$t('The Grille number being used')"></el-table-column>
- <el-table-column prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
- <el-table-column prop="lengthWidth" :label="$t('Length and width')"></el-table-column>
- <el-table-column prop="coating" :label="$t('coating')"></el-table-column>
+ <el-table-column :width="130" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
+ <el-table-column :width="130" prop="cell" :label="$t('The Slot number being used')"></el-table-column>
+ <el-table-column :width="150" prop="glassId" :label="$t('Outfeed Barcodid')"></el-table-column>
+ <el-table-column :width="130" prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
+ <el-table-column prop="list" :label="$t('List Number')"></el-table-column>
+ <el-table-column prop="box" :label="$t('Box Number')"></el-table-column>
+ <el-table-column prop="lengthWidth" :label="$t('Length and Width')"></el-table-column>
<el-table-column :label="$t('Operate')">
<template slot-scope='scope'>
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@@ -216,12 +210,13 @@
</el-table-column>
</el-table>
<el-table :data="this.tasklist2" border style="width: 100%">
- <el-table-column prop="glassId" :label="$t('Incoming glass ID')"></el-table-column>
- <el-table-column :width="250" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
- <el-table-column :width="250" prop="cell" :label="$t('The Grille number being used')"></el-table-column>
- <el-table-column prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
- <el-table-column prop="lengthWidth" :label="$t('Length and width')"></el-table-column>
- <el-table-column prop="coating" :label="$t('coating')"></el-table-column>
+ <el-table-column :width="130" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
+ <el-table-column :width="130" prop="cell" :label="$t('The Slot number being used')"></el-table-column>
+ <el-table-column :width="150" prop="glassId" :label="$t('Infeed Barcodid')"></el-table-column>
+ <el-table-column :width="130" prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
+ <el-table-column prop="list" :label="$t('List Number')"></el-table-column>
+ <el-table-column prop="box" :label="$t('Box Number')"></el-table-column>
+ <el-table-column prop="lengthWidth" :label="$t('Length and Width')"></el-table-column>
<el-table-column :label="$t('Operate')">
<template slot-scope='scope'>
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@@ -234,11 +229,11 @@
<div v-for="item in tableData" :key="item['cageno']" class="occupy">
<el-col style="text-align:left;font-weight: bold;">#{{ item['cage'] }}</el-col>
<el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
- <span class="biao">Usage</span><span class="zhi">{{ item['cell'] }}%</span>
+ <span class="biao">{{ $t('Usage') }}</span><span class="zhi">{{ item['cell'] }}%</span>
</el-col>
<hr style="width:80%;margin: 0 auto;" />
<el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
- <span class="biao">Space (Pieces)</span><span class="zhi">{{ item['state'] }}</span>
+ <span class="biao">{{ $t('Space (Pieces)') }}</span><span class="zhi">{{ item['state'] }}</span>
</el-col>
</div>
</div>
@@ -267,7 +262,7 @@
@click="showcageinfo(item['cage'])"></div>
</div>
<div class="blue gezi"
- :style="{ display: flex, position: absolute, float: left, top: 105 + 'px', left: 1050 + 'px', height: loadglassheight + 'px', width: 5 + 'px' }">
+ :style="{ display: 'flex', position: 'absolute', float: 'left', top: 105 + 'px', left: 1050 + 'px', height: loadglassheight + 'px', width: 5 + 'px' }">
</div>
<div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
<div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
@@ -301,23 +296,33 @@
</el-footer>
<el-dialog :visible.sync="dialogFormVisible" :title="$t('Please confirm the glass information')">
<el-form :model="form" label-width="100px" style="padding-right: 30px">
+
+ <el-form-item :label="$t('Barcodid')">
+ <el-input style="width:15%;" :placeholder="$t('Enter the glass lD')" v-model="glassid"></el-input>
+ <el-button type="primary" @click="showform(3)">query</el-button>
+ </el-form-item>
<el-form-item :label="$t('order')">
- <el-input v-model="form.orderno" autocomplete="off" />
+ <el-input v-model="form.orderId" readonly autocomplete="off" />
</el-form-item>
<el-form-item :label="$t('length')">
- <el-input v-model="form.length" autocomplete="off" />
+ <el-input v-model="form.height" readonly autocomplete="off" />
</el-form-item>
<el-form-item :label="$t('width')">
- <el-input v-model="form.width" autocomplete="off" />
+ <el-input v-model="form.width" readonly autocomplete="off" />
</el-form-item>
- <el-form-item :label="$t('coating')">
- <el-input v-model="form.coating" autocomplete="off" />
+ <el-form-item :label="$t('Barcodid')">
+ <el-input v-model="form.glassId" readonly autocomplete="off" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
+ <el-button @click="sbumitglassid()" :style="{ display: confirm1 == true ? '' : 'none' }"
+ type="primary">{{
+ $t('confirm') }}</el-button>
+ <el-button @click="FeedInglassid()" :style="{ display: confirm2 == true ? '' : 'none' }"
+ type="primary">{{
+ $t('confirm') }}</el-button>
<el-button @click="cancal()">{{ $t('cancal') }}</el-button>
- <el-button @click="sbumitglassid()" type="primary">{{ $t('confirm') }}</el-button>
</span>
</template>
</el-dialog>
@@ -332,8 +337,8 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="cancal1()">{{ $t('cancal') }}</el-button>
<el-button @click="getOrder();" type="primary">{{ $t('confirm') }}</el-button>
+ <el-button @click="cancal1()">{{ $t('cancal') }}</el-button>
</span>
</template>
</el-dialog>
@@ -345,23 +350,28 @@
<el-table-column prop="endTime" :label="$t('endTime')"></el-table-column>
</el-table>
</el-dialog>
- <el-dialog :visible.sync="dialogFormVisible3" :title="$t('Cage Details')">
+ <el-dialog :visible.sync="dialogFormVisible3" :title="$t('Cage Details')" top="5vh">
<el-table :data="this.cageinfo" :height="700" border style="width: 100%;overflow: auto;">
- <el-table-column prop="cage" :label="$t('The Cage number')"></el-table-column>
- <el-table-column prop="cell" :label="$t('cell')"></el-table-column>
- <el-table-column prop="tier" :label="$t('tier')"></el-table-column>
- <el-table-column prop="glassId" :label="$t('glassid')"></el-table-column>
- <el-table-column prop="orderId" :label="$t('order number')"></el-table-column>
- <el-table-column prop="lengthWidth" :label="$t('Length and width')"></el-table-column>
- <el-table-column prop="coating" :label="$t('coating')"></el-table-column>
- <el-table-column :label="$t('Operate')">
+ <el-table-column :width="90" prop="cage" :label="$t('The Cage number')"></el-table-column>
+ <el-table-column :width="90" prop="cell" :label="$t('The Slot Number')"></el-table-column>
+ <el-table-column :width="55" prop="tier" :label="$t('The Side')"></el-table-column>
+ <el-table-column :width="100" prop="glassId" :label="$t('Barcodid')"></el-table-column>
+ <el-table-column :width="100" prop="orderId" :label="$t('Order Number')"></el-table-column>
+ <el-table-column :width="100" prop="list" :label="$t('List Number')"></el-table-column>
+ <el-table-column :width="100" prop="box" :label="$t('Box Number')"></el-table-column>
+ <el-table-column :width="170" prop="lengthWidth" :label="$t('Length and Width')"></el-table-column>
+ <el-table-column :width="280" :label="$t('Operate')">
<template slot-scope='scope'>
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('delete') }}</el-button>
- <!-- <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" @click="open">{{ $t('delete')
- }}</el-button> -->
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@click="outglass(scope.row.glassId, scope.row.state)">{{ $t('out') }}</el-button>
+ <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+ @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)">
+ {{ scope.row.disabled == 0 ? $t('Enable') : $t('Disable') }}</el-button>
+ <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+ @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('increase')
+ }}</el-button>
</template>
</el-table-column>
</el-table>
@@ -369,8 +379,11 @@
</el-container>
</template>
<script>
-
-import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist, SelectPassword } from "../../api/home";
+//: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
+} from "../../api/home";
import LanguageMixin from '../../lang/LanguageMixin'
@@ -379,6 +392,11 @@
name: "Home",
data() {
return {
+ confirm1: false,
+ confirm2: false,
+ insertcage: 0,
+ insertcell: 0,
+ inserttier: 0,
name: 'Confirm',
mixins: [LanguageMixin],
dialogFormVisible: false,
@@ -386,10 +404,10 @@
dialogFormVisible2: false,
dialogFormVisible3: false,
form: {
- orderno: "NG2210210",
- length: 800,
- width: 1000,
- coating: "red",
+ orderId: "",
+ glassId: "",
+ height: "",
+ width: ""
},
form1: {
order: "NG2210210",
@@ -417,7 +435,7 @@
carlist: [],
loadglassheight: 0,
password: 1,
- text: "DataBase Connection failed",
+ text: "",
zhuangtai: ""
};
},
@@ -454,8 +472,6 @@
this.car2 = 210 + 8.15 * Math.abs(obj.params[0][1] - this.carlist[1]['start']) / Math.abs(this.carlist[1]['end'] - this.carlist[1]['start']) * 100;
// this.car1 = 210 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
// this.car2 = 300 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
- console.log(obj.params[0][1], this.carlist[1]['start']);
- console.log(obj.params[0][0], this.carlist[0]['start']);
}
this.tableData = obj.tableData[0];
this.cagelist1 = obj.cagelist1[0];
@@ -464,7 +480,6 @@
this.cagelist4 = obj.cagelist4[0];
this.tasklist1 = obj.tasklist1[0];
this.tasklist2 = obj.tasklist2[0];
- // console.log(this.cagelist4);
this.alarm = obj.alarmmg[0];
this.loadglassheight = obj.loadglassheight;
this.zhuangtai = obj.zhuangtai[0];
@@ -518,7 +533,6 @@
});
Loadcarlist().then(res => {
this.carlist = res.data.carlist;
- console.log(this.carlist);
});
SelectPassword().then(res => {
this.password = res.data.password;
@@ -547,7 +561,7 @@
this.$message.success(this.$t('Operation successful'));
} else {
- this.$message.success(this.$t('There is no glass for this order'));
+ this.$message.error(this.$t('There is no glass for this order'));
}
this.load();
});
@@ -557,38 +571,48 @@
//鎵嬪姩涓婄墖
sbumitglassid() {
if (this.form.order != "") {
- if (this.zhuangtai == true) {
- Addglassid(this.glassid).then(res => {
- if (res.data.message2 == 200) {
- this.$message.success(this.$t('Operation successful'));
- this.cancal();
- } else if (res.data.message2 == 500) {
- this.$message.success(this.$t('There are currently tasks'));
- }
- else if (res.data.message2 == 300) {
- this.$message.success(this.$t('There is no such glass'));
- }
- else if (res.data.message2 == 400) {
- this.$message.success(this.$t('There is no such grid'));
- }
- });
+ if (this.form.height < 380 || this.form.width < 390 || this.form.height > 1810 || this.form.width > 2760) {
+ this.$message.error(this.$t('The glass size is not within the range'));
} else {
- this.$message.success(this.$t('There are currently tasks'));
+ if (this.zhuangtai == true) {
+ Addglassid(this.glassid).then(res => {
+ if (res.data.message2 == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ this.cancal();
+ } else if (res.data.message2 == 500) {
+ this.$message.error(this.$t('There are currently tasks'));
+ }
+ else if (res.data.message2 == 300) {
+ this.$message.error(this.$t('There is no such glass'));
+ }
+ else if (res.data.message2 == 400) {
+ this.$message.error(this.$t('There is no such grid'));
+ }
+ });
+ } else {
+ this.$message.error(this.$t('There are currently tasks'));
+ }
}
-
}
},
- showform() {
- if (this.glassid != "") {
- this.form =
- {
- orderno: "NG2210210",
- length: 800,
- width: 1000,
- coating: "red",
- };
- this.dialogFormVisible = true;
+ showform(buttons) {
+ if (buttons == 1) {
+ this.confirm1 = true;
+ this.confirm2 = false;
+ } else if (buttons == 2) {
+ this.confirm1 = false;
+ this.confirm2 = true;
}
+ SelectGlassByGlassID(this.glassid).then(res => {
+ if (res.data.form != null) {
+ this.form = res.data.form;
+ this.dialogFormVisible = true;
+ this.$message.success('query was successful');
+ } else {
+ this.dialogFormVisible = true;
+ this.$message.error(this.$t('There is no such glass'));
+ }
+ });
},
showform1() {
if (this.order != "") {
@@ -604,7 +628,12 @@
},
cancal() {
this.dialogFormVisible = false;
- this.form = {};
+ this.form = {
+ orderId: "",
+ glassId: "",
+ height: "",
+ width: ""
+ };
},
cancal1() {
this.dialogFormVisible1 = false;
@@ -625,7 +654,7 @@
}
});
} else {
- this.$message.success(this.$t('Password error'));//瀵嗙爜閿欒
+ this.$message.error(this.$t('Password error'));//瀵嗙爜閿欒
}
}).catch(() => {
this.$message({
@@ -657,10 +686,10 @@
}
});
} else {
- this.$message.success(this.$t('No delete allowed'));
+ this.$message.error(this.$t('No delete allowed'));
}
} else {
- this.$message.success(this.$t('Password error'));//瀵嗙爜閿欒
+ this.$message.error(this.$t('Password error'));//瀵嗙爜閿欒
}
}).catch(() => {
@@ -685,14 +714,17 @@
this.$message.success(this.$t('Operation successful'));
}
else if (res.data.message2 == 300) {
- this.$message.success(this.$t('There is no such grid'));
+ this.$message.error(this.$t('There is no such grid'));
+ }
+ else if (res.data.message2 == 500) {
+ this.$message.error(this.$t('This glass is already in the cage'));
}
});
} else {
- this.$message.success(this.$t('No out allowed'));
+ this.$message.error(this.$t('No out allowed'));
}
} else {
- this.$message.success(this.$t('Password error'));//瀵嗙爜閿欒
+ this.$message.error(this.$t('Password error'));//瀵嗙爜閿欒
}
}).catch(() => {
this.$message({
@@ -700,10 +732,60 @@
message: this.$t('Operation canceled')
});
});
+ },
+ insertglass(cage, cell, tier) {
+ this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+ inputType: 'password',
+ inputPlaceholder: this.$t('Please enter the password'),
+ confirmButtonText: this.$t('Yes'),
+ cancelButtonText: this.$t('No'),
+ type: 'warning'
+ }).then(({ value }) => {
+ if (this.password == value) {
+ // OutByGlassID(glassid).then(res => {
+ // if (res.data.message3 == 200) {
+ // this.$message.success(this.$t('Operation successful'));
+ // }
+ // else if (res.data.message2 == 300) {
+ // this.$message.error(this.$t('There is no such grid'));
+ // }
+ // });
+ this.insertcage = cage;
+ this.insertcell = cell;
+ this.inserttier = tier;
+ this.showform(2);
+ } else {
+ this.$message.error(this.$t('Password error'));//瀵嗙爜閿欒
+ }
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
+ });
+ });
+ },
+ FeedInglassid() {
+ Inglassid(this.insertcage, this.insertcell, this.inserttier, this.form).then(res => {
+ if (this.form.glassId != "") {
+ if (res.data.message == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ this.dialogFormVisible = false;
+ } else {
+ this.$message.error(this.$t('This glass is already in the cage'));
+ }
+ } else {
+ this.$message.error(this.$t('There is no such glass'));
+ }
+ });
+ },
+ UpdateDisabled(cage, cell, disabled) {
+ Disabled(cage, cell, disabled).then(res => {
+ if (res.data.message == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
}
}
-
}
-
</script>
\ No newline at end of file
--
Gitblit v1.8.0