ZengTao
2024-01-03 1632ba92d37e43baf671f7d465b67d644d545cf5
CanadaMes-ui/src/views/home/index.vue
@@ -46,9 +46,6 @@
    background-color: blue;
}
.red {
    background-color: red;
}
.yellow {
    background-color: yellow;
@@ -643,13 +640,15 @@
            <el-button type="primary" @click="isAllowQueueState()" :disabled="!this.isAllowReordering">{{ this.isAllowQueue
                == true ? $t('Start') : $t('Stop')
            }}</el-button>
            <el-button type="primary" @click="isAllowReorderingState()" :disabled="this.isAllowQueue">{{
            <el-button type="primary" @click="isAllowReorderings()" :disabled="this.isAllowQueue">{{
                this.isAllowReordering == true ? $t('Not Allow') : $t('Allow')
            }}</el-button>
            <el-input style="width:15%;" :placeholder="$t('Enter the Frame No')" v-model="framebarcode"></el-input>
            <el-button type="primary" @click="AddOutSliceS()">{{ $t('Add') }}</el-button>
            <el-table :data="this.OutSlice" :height="700" :span-method="objectSpanMethod" border :cell-style="cellStyle"
                style="width: 100%;overflow: auto;font-size: 18px;">
                <el-table-column :min-width="175" prop="glassId" :label="$t('Barcode')"></el-table-column>
                <el-table-column :min-width="90" prop="orderId" :label="$t('Order No')"></el-table-column>
                <el-table-column :min-width="100" prop="orderId" :label="$t('Order No')"></el-table-column>
                <el-table-column :min-width="70" prop="listId" :label="$t('List No')"></el-table-column>
                <el-table-column :min-width="70" prop="boxId" :label="$t('Box No')"></el-table-column>
                <el-table-column :min-width="100" prop="glasswidthmm" :label="$t('Length')"></el-table-column>
@@ -657,14 +656,14 @@
                <el-table-column :min-width="90" prop="state" :label="$t('Glass State')">
                    <template slot-scope='scope'>
                        {{ scope.row.state == 0 ? $t('Waiting') : scope.row.state == 1 ? $t('Outing') : scope.row.state == 2
                            ? $t('Completed') : scope.row.state == 3 ? $t('Absent') : $t('Deleted') }}
                            ? $t('Outed') : scope.row.state == 3 ? $t('Absent') : $t('Completed') }}
                    </template>
                </el-table-column>
                <el-table-column prop="sequence" :label="$t('Sequence')"></el-table-column>
                <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 != 2 && scope.row.state != 4)"
                            @click="CompleteQueue(scope.row.id, scope.row.barcode, scope.row.glassId)">{{ $t('Complete')
                            }}</el-button>
                    </template>
@@ -688,7 +687,7 @@
                <el-table-column prop="barcode" :label="$t('Frame No')"></el-table-column>
                <el-table-column :width="280" :label="$t('Operate')">
                <el-table-column :width="200" :label="$t('Operate')">
                    <template slot-scope='scope'>
                        <el-button type="text" size="small" @click="getTopMove(scope.row, scope.$index)"
                            style="font-size: 15px;"
@@ -749,7 +748,6 @@
                </el-table-column>
            </el-table>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh">
            <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'">
                <!-- {{ this.CountDowns }} -->
@@ -763,7 +761,8 @@
import {
    home, home2, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist,
    SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass, InsertQueueGlassId, UpdateQueueState, DeleteQueueGlass, SelectGlassNo,
    SelectAluminumFrameInfoById, DeleteProductionQueueGlass, AddOutSliceS, isAllowQueues, isConfirmStates, SelectPermissionByUserName, currentUsername, CompleteQueue
    SelectAluminumFrameInfoById, DeleteProductionQueueGlass, AddOutSliceS, isAllowQueues, isConfirmStates, SelectPermissionByUserName, currentUsername, CompleteQueue,
    isAllowReorderings
} from "../../api/home";
@@ -898,36 +897,44 @@
                    this.tasklist1 = obj.tasklist1[0];
                    this.tasklist2 = obj.tasklist2[0];
                    this.alarm = obj.alarmmg[0];
                    if (this.alarm.length > 0&&this.alarm!=obj.alarmmg[0]) {
                        this.dialogFormVisible2 = true;
                    } else {
                        this.dialogFormVisible2 = false;
                    }
                    //是否急停
                    if (obj.emergencystop != null) {
                        this.EmergencyStop = obj.emergencystop[0];
                    }
                    // if (obj.alarmmg[0].length > 0) {
                    //     if (this.alarm.length > 0) {
                    //         if (this.alarm[this.alarm.length - 1].id != obj.alarmmg[0][obj.alarmmg[0].length - 1].id) {
                    //             this.alarm = obj.alarmmg[0];
                    //             this.dialogFormVisible2 = true;
                    //         }
                    //     } else {
                    //         this.alarm = obj.alarmmg[0];
                    //         this.dialogFormVisible2 = true;
                    //     }
                    // }
                    // //是否急停
                    // if (obj.emergencystop != null) {
                    //     this.EmergencyStop = obj.emergencystop[0];
                    // }
                    //复位倒计时
                    if (obj.countdown != null) {
                        if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
                            this.CountDown();
                        }
                    }
                    // //复位倒计时
                    // if (obj.countdown != null) {
                    //     if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
                    //         this.CountDown();
                    //     }
                    // }
                    //复位完成信号
                    if (obj.reset != null) {
                        this.reset = obj.reset[0];
                    }
                    // //复位完成信号
                    // if (obj.reset != null) {
                    //     this.reset = obj.reset[0];
                    // }
                    //是否有进片请求
                    if (obj.D01RequestState != null) {
                        this.D01RequestState = obj.D01RequestState[0];
                    }
                    // this.D01RequestState=true;
                    //是否允许出片
                    this.isAllowQueue = obj.isAllowQueue[0];
                    //是否允许出片队列调序
                    this.isAllowReordering = obj.isAllowReordering[0];
                    //出片队列
                    if (this.isAllowReordering == true) {
                        this.OutSlice = obj.listoutslice[0];
@@ -1060,7 +1067,7 @@
            } else if (state == 2) {
                return "yellow gezi";
            } else if (state == 3) {
                return "red gezi";
                return "black gezi";
            } else {
                return "black gezi";
            }
@@ -1078,7 +1085,6 @@
                    this.load();
                });
            }
        },
        //手动上片
        sbumitglassid() {
@@ -1449,7 +1455,6 @@
                            this.form5 = {};
                            this.$message.success(this.$t('Operation successful'));
                        } else {
                            alert(1);
                            this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
                        }
                    });
@@ -1504,19 +1509,24 @@
            this.AluminumFrame.forEach(item => { item.barcode = glassid; item.isCheck = isChecked })
        },
        //添加到出片队列
        addoutslice() {
            var dats_ = new Array();
            this.AluminumFrame.forEach(item => {
                var dats2_ = new Array();
                dats2_[0] = item.barcode;
                dats2_[1] = item.isCheck;
                dats2_[2] = item.Flip;
                dats2_[3] = item.FrameNo;
                dats2_[4] = item.glasslengthmm;
                dats2_[5] = item.glassheightmm;
                dats_[dats_.length] = dats2_;
            });
            AddOutSliceS(dats_).then(res => {
        AddOutSliceS() {
            // var dats_ = new Array();
            // this.AluminumFrame.forEach(item => {
            //     var dats2_ = new Array();
            //     dats2_[0] = item.barcode;
            //     dats2_[1] = item.isCheck;
            //     dats2_[2] = item.Flip;
            //     dats2_[3] = item.FrameNo;
            //     dats2_[4] = item.glasslengthmm;
            //     dats2_[5] = item.glassheightmm;
            //     dats_[dats_.length] = dats2_;
            // });
            // AddOutSliceS(dats_).then(res => {
            //     if (res.data.message == 200) {
            //         this.$message.success(this.$t('Operation successful'));
            //     }
            // });
            AddOutSliceS(this.framebarcode).then(res => {
                if (res.data.message == 200) {
                    this.$message.success(this.$t('Operation successful'));
                }
@@ -1641,9 +1651,13 @@
                }
            })
        },
        //
        isAllowReorderingState() {
            this.isAllowReordering = !this.isAllowReordering;
        //是否允许出片队列排序
        isAllowReorderings() {
            isAllowReorderings(!this.isAllowReordering, this.OutSlice).then(res => {
                if (res.data.message == 200) {
                    this.$message.success(this.$t('Operation successful'));
                }
            })
        },
        //切换上片是否需要确认玻璃信息
        isConfirmState() {
@@ -1654,8 +1668,8 @@
            });
        }
        ,
        cellStyle({  column, rowIndex, columnIndex }) {
            // console.log(row, column, "ss");
        //表格样式
        cellStyle({ column, rowIndex, columnIndex }) {
            column = rowIndex;
            rowIndex = column;
            let style = "";
@@ -1753,8 +1767,8 @@
                }
            });
        },
        //45秒复位倒数计时
        CountDown() {
            //50秒倒数计时
            let count = 45;
            let timer = setInterval(
                () => {
@@ -1765,8 +1779,9 @@
                    } else {
                        if (count > 0) {
                            this.PromptSize = 500;
                            this.CountDowns = count;
                            count--;
                            this.CountDowns = count;
                            this.dialogFormCountDown = true;
                        }
                        else {
                            this.PromptSize = 200;
@@ -1780,7 +1795,7 @@
                },
                1000
            );
            this.dialogFormCountDown = true;
        }
    }
}