From ca1ae93196be366e707647c42e3039512a2cf45f Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期二, 12 十一月 2024 14:00:24 +0800
Subject: [PATCH] 字段显示,结束任务功能更新,界面调整,测量显示

---
 Albania_Mes-ui/src/views/home/index.vue |  152 ++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 134 insertions(+), 18 deletions(-)

diff --git a/Albania_Mes-ui/src/views/home/index.vue b/Albania_Mes-ui/src/views/home/index.vue
index c873062..c7389e0 100644
--- a/Albania_Mes-ui/src/views/home/index.vue
+++ b/Albania_Mes-ui/src/views/home/index.vue
@@ -220,6 +220,8 @@
 
 .el-table .cell {
     display: flex;
+    /* height: 30px; 
+    line-height: 30px; */
 }
 
 .device {
@@ -332,6 +334,14 @@
     font-weight: bold;
     text-align: center;
 }
+.el-table .el-table__body-wrapper tr {
+  height: 40px;  /* 璁剧疆姣忚鐨勯珮搴︿负 30px */
+  line-height: 30px;
+}
+
+.el-table .el-table__body-wrapper td {
+    /* 纭繚鍗曞厓鏍煎唴瀹瑰瀭鐩村眳涓� */
+}
 </style>
 <template>
     <el-container>
@@ -368,6 +378,9 @@
                 <el-button type="primary" @click="showform(4)" :disabled="SoftEmergencyStopState" style="z-index: 999;"
                     :class="SoftEmergencyStopState == true ? 'hide' : ''">
                     {{ $t('Task queue') }}</el-button>
+                    <el-button type="primary" @click="showform(5)" :disabled="SoftEmergencyStopState" style="z-index: 999;"
+                    :class="SoftEmergencyStopState == true ? 'hide' : ''">
+                    {{ $t('Outing Queue') }}</el-button>
 
             </div>
             <div style="display: flex;align-items: center;overflow: hidden;">
@@ -444,10 +457,12 @@
                         <el-table-column prop="storageCage.glassHeight" :label="$t('Height')"></el-table-column>
                         <el-table-column prop="storageCage.thickness" :label="$t('Thickness')"></el-table-column>
                         <el-table-column prop="storageCage.films" :label="$t('Films')"></el-table-column>
-                        <el-table-column :min-width="100" :label="$t('Terminate Task')">
+                        <el-table-column :min-width="120" :label="$t('Terminate Task')">
                             <template slot-scope='scope'>
                                 <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                     @click="FinishTask(scope.row.id)">{{ $t('Complete') }}</el-button>
+                                    <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+                                    @click="TerminateTask(scope.row.id)">{{ $t('Terminate') }}</el-button>
                             </template>
                         </el-table-column>
                     </el-table>
@@ -460,10 +475,12 @@
                         <el-table-column prop="storageCage.thickness" :label="$t('Thickness')"></el-table-column>
                         <el-table-column prop="storageCage.films" :label="$t('Films')"></el-table-column>
 
-                        <el-table-column :min-width="100" :label="$t('Terminate Task')">
+                        <el-table-column :min-width="120" :label="$t('Terminate Task')">
                             <template slot-scope='scope'>
                                 <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                     @click="FinishTask(scope.row.id)">{{ $t('Complete') }}</el-button>
+                                    <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+                                    @click="TerminateTask(scope.row.id)">{{ $t('Terminate') }}</el-button>
                             </template>
                         </el-table-column>
                     </el-table>
@@ -509,12 +526,12 @@
 
         <el-dialog :visible.sync="Measure" :title="$t('Measure')" top="5vh"><!--娴嬮噺椤甸潰-->
             <!--娴嬮噺椤甸潰涓讳綋-->
-            <div style="height: 800px;">
+            <div style="height: 760px;">
                 <!--鍔熻兘-->
                 <div>
-                    <el-button type="primary" @click="ManualMatching()" :disabled="(this.LastQueue.state > 1)"
+                    <el-button type="primary" @click="ManualMatching()" :disabled="(this.LastQueue.state > 0)"
                         style="z-index: 999;">{{ $t('Manual matching') }}</el-button>
-                    <el-button type="primary" @click="ManualTake()" :disabled="(this.LastQueue.state > 1)"
+                    <el-button type="primary" @click="ManualTake()" :disabled="(this.LastQueue.state > 0)"
                         style="z-index: 999;">{{
                 $t('Manual removal') }}</el-button> 
                     <el-button type="primary" @click="AnewMeasure()" 
@@ -541,21 +558,20 @@
                 </div>
                 <br>
                 <!--鏄剧ず-->
-                <div style="width:1000px;height: 720px;border: 2px solid #d1d1d1;float: left;">
+                <div style="width:900px;height: 720px;border: 2px solid #d1d1d1;float: left;">
                     <!--鐜荤拑鍥�  #81b337-->
-                    <div
-                        :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:' + ((720 - (this.LastQueue.glassheight / 25 * 7)) / 2) + 'px auto;width:'
+                    <div :style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:' 
+                            + ((720 - (this.LastQueue.glassheight / 25 * 7)) / 2) + 'px auto;width:'
                             + (this.LastQueue.glasswidth / 25 * 7) + 'px;height:'
                             + (this.LastQueue.glassheight / 25 * 7) + 'px;line-height: '
                             + (this.LastQueue.glassheight / 25 * 7 / 3) + 'px; background-color: '
-                            + (this.LastQueue.state > 0 ? '#4CCCE4' : (this.LastQueue.state == 0 ? '#E4CA4C' : '#E4CA4C')) + ';text-align: center;font-size:50px'">
+                            + (this.LastQueue.state > 0 ? '#4CCCE4' : (this.LastQueue.state == 0 ? '#E4CA4C' : 'red')) + ';text-align: center;font-size:50px'">
                         <div>
                             {{ $t('Measure') }}
                         </div>
                         <div>
-                            {{ $t('Width') + "*" + $t('Height') }}:{{ (this.LastQueue.glasswidth +
-                                this.LastQueue.glassheight) != 0 ? (this.LastQueue.glasswidth +
-                                    "*" + this.LastQueue.glassheight) + "" : "" }}
+                            {{ $t('Width') + "*" + $t('Height') }}:{{ (this.LastQueue.glasswidth +this.LastQueue.glassheight) != 0 ? 
+                            (this.LastQueue.glasswidth +"*" + this.LastQueue.glassheight) + "" : "" }}
                         </div>
 
                         <div>
@@ -699,19 +715,105 @@
                                 :value="item.value">
                             </el-option>
                         </el-select>
-                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;margin-left: 6px;"
-                            v-show="scope.row.state >= 0 ? true : false"
-                            @click="ClaimTasks(scope.row.flowcard, scope.row.state, selected[scope.$index], scope.row.line)">
-                            {{ scope.row.state > 0 ? $t('Stop Task') : $t('Start Task') }}</el-button>
+                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+                            v-show="scope.row.state >= 0 ? true : false" @click="StartChange(scope.row.flowcard, scope.row.orderstate)">
+                            {{ scope.row.orderstate > 0 ? $t('stop work') : $t('start work') }}</el-button>
+                       
 
                         <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                             v-show="scope.row.state >= 0 ? true : false"
                             @click="ModeChange(scope.row.flowcard, scope.row.method)">
                             {{ $t('Mode Change') }}</el-button>
 
+                            <el-button type="primary" style="padding: 4px 10px;font-size: 12px;margin-left: 6px;"
+                            v-show="scope.row.state >= 0 ? true : false"
+                            @click="ClaimTasks(scope.row.flowcard, scope.row.state, selected[scope.$index], scope.row.line)">
+                            {{ scope.row.state > 0 ? $t('Stop Task') : $t('Start Task') }}</el-button>
+
+                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+                            v-show="scope.row.state >= 0 ? true : false" @click="deleteTasks(scope.row.flowcard)">
+                            {{ $t('langDelete') }}</el-button>
+
+                    </template>
+                </el-table-column>
+            </el-table>
+        </el-dialog>
+         <!-- 鍑虹墖闃熷垪鏄剧ず琛� -->
+         <el-dialog :visible.sync="Outqueue" :title="$t('Outing Queue')" top="5vh">
+            <el-table :data="tableData2" style="width: 100%;margin-bottom: 20px;" row-key="id" border lazy
+                :tree-props="{ children: 'glassinfo', hasChildren: 'hasChildren' }">
+                <el-table-column prop="flowcard" :label="$t('Order')" width="150" align="center">
+                    <template slot-scope='scope'>
+                        <div>
+                            {{ scope.row.flowcard }}
+                        </div>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="mateid" :label="$t('Mateid')" align="center">
+                </el-table-column>
+                <el-table-column prop="tier" :label="$t('Tier')" align="center">
+                </el-table-column>
+                <el-table-column prop="number" :label="$t('Number')" align="center">
+                </el-table-column>
+                <el-table-column prop="cageno" :label="$t('Cage GlassNumber')" align="center">
+                </el-table-column>
+                <el-table-column prop="finishnumber" :label="$t('Finish No')" align="center">
+                </el-table-column>
+                <el-table-column prop="mateid" :label="$t('Mate No')" align="center">
+                </el-table-column>
+                <el-table-column prop="films" :label="$t('Films')" align="center">
+                </el-table-column>
+                <el-table-column prop="thickness" :label="$t('Thickness')" align="center">
+                </el-table-column>
+                <el-table-column prop="width" :label="$t('Width')" align="center">
+                </el-table-column>
+                <el-table-column prop="height" :label="$t('Height')" align="center">
+                </el-table-column>
+                <el-table-column prop="state" :label="$t('Task State')" align="center">
+                    <template slot-scope='scope'>
+                        <div
+                            :style="{ backgroundColor: scope.row.state === 0 ? '' : '#00FFFF', width: '105%', height: '125%', lineHeight: '50px' }">
+                            {{ scope.row.state >= 0 ? scope.row.state == 0 ? $t('Stop') : $t('Start') : "" }}
+                        </div>
+                    </template>
+                </el-table-column>
+                <!-- <el-table-column prop="state" :label="$t('Task State')" align="center">
+                    <template slot-scope='scope'>
+                        {{ scope.row.state >= 0 ? scope.row.state == 0 ? $t('Stop') : $t('Start') : "" }}
+                    </template>
+                </el-table-column> -->
+                <el-table-column prop="method" :label="$t('Task Method')" align="center">
+                    <template slot-scope='scope'>
+                        <div style="text-align: center;width: 105%;">
+                            {{ scope.row.state >= 0 ? (scope.row.method == 0 ? $t('Out') : $t('All Out')) : "" }}
+                        </div>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="line" :label="$t('Task Line')">
+                </el-table-column>
+                <el-table-column width="380" :label="$t('Operate')">
+
+                    <template slot-scope='scope'>
+                        <el-select v-model="selected[scope.$index]" :placeholder="$t('Line')"
+                            v-show="scope.row.state >= 0 ? true : false">
+                            <el-option v-for="item in options" :key="item.value" :label="item.label"
+                                :value="item.value">
+                            </el-option>
+                        </el-select>
                         <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                             v-show="scope.row.state >= 0 ? true : false" @click="StartChange(scope.row.flowcard, scope.row.orderstate)">
                             {{ scope.row.orderstate > 0 ? $t('stop work') : $t('start work') }}</el-button>
+                       
+
+                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+                            v-show="scope.row.state >= 0 ? true : false"
+                            @click="ModeChange(scope.row.flowcard, scope.row.method)">
+                            {{ $t('Mode Change') }}</el-button>
+
+                            <el-button type="primary" style="padding: 4px 10px;font-size: 12px;margin-left: 6px;"
+                            v-show="scope.row.state >= 0 ? true : false"
+                            @click="ClaimTasks(scope.row.flowcard, scope.row.state, selected[scope.$index], scope.row.line)">
+                            {{ scope.row.state > 0 ? $t('Stop Task') : $t('Start Task') }}</el-button>
 
                         <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                             v-show="scope.row.state >= 0 ? true : false" @click="deleteTasks(scope.row.flowcard)">
@@ -738,11 +840,11 @@
             <el-table :data="this.StorageCageAddInfo" :height="700" border style="width: 100%;overflow: auto;">
                 <el-table-column prop="flowcard" :label="$t('Flowcard')"></el-table-column>
                 <el-table-column prop="tier" :label="$t('Tier')"></el-table-column>
-                <el-table-column prop="mateid" :label="$t('Mateid')"></el-table-column>
                 <el-table-column prop="width" :label="$t('Width')"></el-table-column>
                 <el-table-column prop="height" :label="$t('Height')"></el-table-column>
                 <el-table-column prop="thickness" :label="$t('Thickness')"></el-table-column>
                 <el-table-column prop="films" :label="$t('Films')"></el-table-column>
+                <el-table-column prop="mateid" :label="$t('Mateid')"></el-table-column>
                 <el-table-column :label="$t('Operate')">
                     <template slot-scope='scope'>
                         <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@@ -762,7 +864,7 @@
     Disabled, SelectPermissionByUserName, currentUsername, CompleteQueue,
     isAllowReorderings,
 
-    UpdateStroageCageByCell, FinishTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue, importData, ManualTake, AnewMeasure, StartChange, deleteTasks,SaveMeasure
+    UpdateStroageCageByCell, FinishTask,TerminateTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue, importData, ManualTake, AnewMeasure, StartChange, deleteTasks,SaveMeasure
 } from "../../api/home";
 
 
@@ -800,6 +902,7 @@
 
             dataList: [],
             tableData1: [],
+            tableData2: [],
             Measuermode: false,
             confirm1: false,
             confirm2: false,
@@ -815,6 +918,7 @@
             Measure: false,
             StorageCage: false,
             Taskqueue: false,
+            Outqueue: false,
             StorageCageAdd: false,
             StorageCageInfo: [],
             StorageCageForm: {
@@ -921,6 +1025,8 @@
                 this.StorageCage = true;
             } else if (i == 4) {
                 this.Taskqueue = true;
+            }else if (i == 5) {
+                this.Outqueue = true;
             }
         },
         init() {
@@ -992,6 +1098,7 @@
                     }
 
                     this.tableData1 = obj.OrderTask[0];
+                    this.tableData2 = obj.OrderTask[0];
                     this.LastQueue = obj.LastQueue[0];
 
                     //鏄惁鍏佽鍑虹墖
@@ -1174,6 +1281,15 @@
                 }
             });
         },
+        //缁撴潫杩�/鍑虹墖浠诲姟
+        TerminateTask(id) {
+            TerminateTask(id).then(res => {
+                if (res.data.message == 200) {
+                    this.$message.success(this.$t('Operation successful'));
+                }
+            });
+        },
+
         //淇敼鐞嗙墖绗肩幓鐠冧俊鎭�
         UpdateStroageCageByCell(cell, nownum, num) {
             if (nownum == null && num == 1) {

--
Gitblit v1.8.0