From 2883c25a71cb080258f5e17430ff5ee37c0061c2 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期一, 22 一月 2024 09:05:05 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes

---
 CanadaMes-ui/src/views/home/index.vue |  132 ++++++++++++++++++++++++++++---------------
 1 files changed, 85 insertions(+), 47 deletions(-)

diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index cf37f5b..48158a8 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -375,37 +375,70 @@
                 <div class="device" :style="'top: 262px;left: 150px;background-color: ' + ShowDeviceList(8) + ';'">D05</div>
                 <div class="device" :style="'top: 339px;left: 150px;background-color: ' + ShowDeviceList(9) + ';'">D06</div>
 
-                <div class="glass D01" style="top: 54px;left: 1055px;position: absolute;"
-                    @click="ClearGlassId('DB101.9.2', 0)">{{ ShowGlassIdList(0) }}</div>
-                <div class="glass D02" style="top: 132px;left: 1055px;position: absolute;"
-                    @click="ClearGlassId('DB101.9.2', 1)">{{ ShowGlassIdList(1) }}</div>
-                <div class="glass B01" style="top: 270px;left: 640px;position: absolute;"
-                    @click="ClearGlassId('DB101.10.2', 2)">
-                    B01:{{ ShowGlassIdList(2) }}</div>
-                <div class="glass B02" style="top: 290px;left: 640px;position: absolute;"
-                    @click="ClearGlassId('DB101.10.3', 3)">B02:{{ ShowGlassIdList(3) }}</div>
-                <div class="glass A01" style="top: 270px;left: 289px;position: absolute;"
-                    @click="ClearGlassId('DB101.10.0', 4)">
-                    A01.1:{{ ShowGlassIdList(4) }}</div>
+                <div class="glass D01" style="top: 39px;left: 1055px;position: absolute;">{{ ShowGlassIdList(0) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 0)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
+                <div class="glass D02" style="top: 117px;left: 1055px;position: absolute;">{{ ShowGlassIdList(1) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 1)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
+                <div class="glass B01" style="top: 270px;left: 640px;position: absolute;">
+                    B01:{{ ShowGlassIdList(2) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.2', 2)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
+                <div class="glass B02" style="top: 315px;left: 640px;position: absolute;">B02:{{ ShowGlassIdList(3) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.3', 3)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
+                <div class="glass A01" style="top: 270px;left: 289px;position: absolute;">
+                    A01.1:{{ ShowGlassIdList(4) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.0', 4)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
 
-                <div class="glass A01" style="top: 290px;left: 289px;position: absolute;"
-                    @click="ClearGlassId('DB101.10.1,5',5)">A01.2:{{ ShowGlassIdList(5) }}</div>
+                <div class="glass A01" style="top: 315px;left: 289px;position: absolute;">A01.2:{{ ShowGlassIdList(5) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.1,5', 5)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
 
-                <div class="glass A02" style="top: 310px;left: 289px;position: absolute;"
-                    @click="ClearGlassId('DB101.10.2,6',6)">A02:{{ ShowGlassIdList(6) }}</div>
+                <div class="glass A02" style="top: 360px;left: 289px;position: absolute;">A02:{{ ShowGlassIdList(6) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.2,6', 6)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
 
-                <div class="glass D03" style="top: 137px;left: 42px;position: absolute;"
-                    @click="ClearGlassId('DB101.9.4', 7)">
-                    {{ ShowGlassIdList(7) }}</div>
-                <div class="glass D04" style="top: 213px;left: 42px;position: absolute;"
-                    @click="ClearGlassId('DB101.9.5', 8)">
-                    {{ ShowGlassIdList(8) }}</div>
-                <div class="glass D05" style="top: 290px;left: 42px;position: absolute;"
-                    @click="ClearGlassId('DB101.9.6', 9)">
-                    {{ ShowGlassIdList(9) }}</div>
-                <div class="glass D06" style="top: 367px;left: 42px;position: absolute;"
-                    @click="ClearGlassId('DB101.9.5', 10)">
-                    {{ ShowGlassIdList(10) }}</div>
+                <div class="glass D03" style="top: 122px;left: 42px;position: absolute;">
+                    {{ ShowGlassIdList(7) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.4', 7)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
+                <div class="glass D04" style="top: 198px;left: 42px;position: absolute;">
+                    {{ ShowGlassIdList(8) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 8)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
+                <div class="glass D05" style="top: 275px;left: 42px;position: absolute;">
+                    {{ ShowGlassIdList(9) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.6', 9)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
+                <div class="glass D06" style="top: 352px;left: 42px;position: absolute;">
+                    {{ ShowGlassIdList(10) }}
+                    <br />
+                    <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 10)">
+                        {{ $t('Clear') }}</el-button>
+                </div>
 
 
             </div>
@@ -573,12 +606,12 @@
                         }}</el-button>
                     </el-form-item> -->
                     <el-form-item>
-                        {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}
+                        {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}
                         <el-button type="primary" @click="isConfirmState()">
-                            {{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}</el-button>
+                            {{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}</el-button>
                     </el-form-item>
                     <el-form-item>
-                        {{ $t('Current State') }}:{{ this.Scanningmethod==true?$t('Automatic'):$t('Hand Movement')}}
+                        {{ $t('Current State') }}:{{ this.Scanningmethod == false ? $t('Automatic') : $t('Hand Movement') }}
                         <el-button type="primary" @click="SwitchScanMethod()">{{ $t('Switch')
                         }}</el-button>
                     </el-form-item>
@@ -595,7 +628,7 @@
                 </div>
                 <div style="display: flex;justify-content: space-around;">
                     <label for="">{{ $t('Upper film position') }}</label>
-                    
+
                     <label for="">{{ $t('Scan Code Point') }}</label>
                 </div>
                 <div style="display: flex;justify-content: space-around;height: 40px;">
@@ -754,7 +787,7 @@
                         <el-table-column :min-width="90" prop="barcode" :label="$t('Complete')">
                             <template slot-scope='scope' style="height:100px;height:100px;">
                                 <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
-                                    :disabled="!(!isAllowQueue && scope.row.state != 2 && scope.row.state != 4)"
+                                    :disabled="!(!isAllowQueue && scope.row.state != 1 && scope.row.state != 2)"
                                     @click="CompleteQueue(scope.row.id, scope.row.barcode, scope.row.glassId)">{{
                                         $t('Complete')
                                     }}</el-button>
@@ -981,12 +1014,11 @@
             DeviceList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
             GlassIdList: [],
             Scanningmethod: true,
-            CurrrentGlassId:""
+            CurrrentGlassId: ""
         };
     },
     created() {
         this.load();
-
         this.init();
     }
     ,
@@ -1029,15 +1061,15 @@
                     this.alarm = obj.alarmmg[0];
                     //鑾峰彇褰撳墠鎵爜鏂瑰紡
                     if (obj.Scanningmethod != null) {
-                        this.Scanningmethod=obj.Scanningmethod[0];
+                        this.Scanningmethod = obj.Scanningmethod[0];
                     }
 
                     //鑾峰彇褰撳墠鎵爜鏋幓鐠僫d
-                    if(obj.CurrrentGlassId!=null){
+                    if (obj.CurrrentGlassId != null) {
                         const specialChars = /[^\w\s]/g;
-                        this.CurrrentGlassId=obj.CurrrentGlassId[0].replace(specialChars, "");
+                        this.CurrrentGlassId = obj.CurrrentGlassId[0].replace(specialChars, "");
                     }
-                    
+
                     //鏌ヨ褰撳墠閾濇淇℃伅
                     this.CurrentFrame = obj.CurrentFrame;
                     //鑾峰彇璁惧鐘舵��
@@ -1122,10 +1154,10 @@
                     } else {
                         this.form3 = {};
                     }
-                    
+
                     if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 0) {
                         this.loadglassheight1 = 70;
-                        if(this.form5.glassId!=obj.form3[0].glassId){
+                        if (this.form5.glassId != obj.form3[0].glassId) {
                             this.showform3();
                         }
                         this.form5 = obj.form3[0];
@@ -1261,6 +1293,7 @@
         },
         //鎵嬪姩涓婄墖
         sbumitglassid() {
+            console.log(1111111);
             if (this.form.order != "") {
                 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'));
@@ -1323,12 +1356,12 @@
         },
         //鎵嬪姩鍐欏叆plc鎵爜浣嶇幓鐠僫d
         WriteGlassID() {
-            if (this.glassid1.length ==14) {
+            if (this.glassid1.length == 14) {
                 WriteGlassID(this.glassid1).then(res => {
                     console.log(res.data);
                     this.$message.success(this.$t('Successful operation'));
                 });
-            }else{
+            } else {
                 this.$message.error(this.$t('Please enter the correct glassID'));
             }
         },
@@ -1596,6 +1629,8 @@
                     DeleteProductionQueueGlass(id).then(res => {
                         if (res.data.message == 200) {
                             this.$message.success(this.$t('Operation successful'));
+                        }else{
+                            this.$message.error(this.$t('This frame has glass that is currently outing'));
                         }
                     });
                 }
@@ -1634,6 +1669,9 @@
                         if (res.data.message == 200) {
                             this.form5 = {};
                             this.$message.success(this.$t('Operation successful'));
+                        }
+                        else if (res.data.message == 400) {
+                            this.$message.error(this.$t('The glass size is not within the range'));
                         } else {
                             this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
                         }
@@ -2044,9 +2082,9 @@
         //娓呴櫎鐜荤拑id
         ClearGlassId(position, num) {
             if (this.ClearGlassID == false) {
-                console.log(this.DeviceList,num);
+                console.log(this.DeviceList, num);
                 if (this.DeviceList[num] == 0) {
-                    if (this.GlassIdList[num].length < 14) {
+                    if (this.GlassIdList[num].length <= 14) {
                         this.$confirm(this.$t('Are you sure to clear this barcode ?'), this.$t('confirm'), {
                             confirmButtonText: this.$t('Yes'),
                             cancelButtonText: this.$t('No'),
@@ -2104,9 +2142,9 @@
             });
         },
         //鍒囨崲浜岀淮鐮佽幏鍙栨柟寮�
-        SwitchScanMethod(){
+        SwitchScanMethod() {
             SwitchScanMethod(!this.Scanningmethod).then(res => {
-                if(res.data.message == 200) {
+                if (res.data.message == 200) {
                     this.$message.success(this.$t('Operation successful'));
                 }
             });

--
Gitblit v1.8.0