ZengTao
2024-05-13 ba604157629a79b6dd10d5d449eb6c05111bb3ef
CanadaMes-ui/src/views/home/index.vue
@@ -235,7 +235,6 @@
    height: 15px;
    position: absolute;
}
</style>
<template>
    <el-container>
@@ -345,7 +344,8 @@
        </el-main>
        <el-footer>
            <div class="blocks" style="position: relative;">
                <div :style="'position:absolute;width:40px;height:40px;top:40px;left:50px;background-Color:'+StateColor+';font-size:30px;text-align:center;border-radius: 50%;'">
                <div
                    :style="'position:absolute;width:40px;height:40px;top:40px;left:50px;background-Color:' + StateColor + ';font-size:30px;text-align:center;border-radius: 50%;'">
                    {{ CountDowns }}
                </div>
                <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:237px;">
@@ -693,7 +693,8 @@
                    <el-form-item :label="$t('Barcode')">
                        <el-input v-model="form5.glassId" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Barcode')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
                    <el-form-item :label="$t('Barcode')"
                        :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'">
                        <el-input v-model="form6.barcode" readonly autocomplete="off"  />
                    </el-form-item>
                </div>
@@ -707,7 +708,8 @@
                    <el-form-item :label="$t('Order No')">
                        <el-input v-model="form5.orderId" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Order No')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
                    <el-form-item :label="$t('Order No')"
                        :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'">
                        <el-input v-model="form6.ordernumber" readonly autocomplete="off" />
                    </el-form-item>
                </div>
@@ -721,7 +723,8 @@
                    <el-form-item :label="$t('List No')">
                        <el-input v-model="form5.listId" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('List No')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
                    <el-form-item :label="$t('List No')"
                        :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'">
                        <el-input v-model="form6.listnumber" readonly autocomplete="off" />
                    </el-form-item>
                </div>
@@ -735,7 +738,8 @@
                    <el-form-item :label="$t('Box No')">
                        <el-input v-model="form5.boxId" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Box No')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
                    <el-form-item :label="$t('Box No')"
                        :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'">
                        <el-input v-model="form6.boxnumber" readonly autocomplete="off" />
                    </el-form-item>
                </div>
@@ -749,7 +753,8 @@
                    <el-form-item :label="$t('Length')">
                        <el-input v-model="form5.glasswidthmm" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Length')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
                    <el-form-item :label="$t('Length')"
                        :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'">
                        <el-input v-model="form6.glasslength" readonly autocomplete="off" />
                    </el-form-item>
                </div>
@@ -763,7 +768,8 @@
                    <el-form-item :label="$t('Width')">
                        <el-input v-model="form5.glassheightmm" readonly autocomplete="off" />
                    </el-form-item>
                    <el-form-item :label="$t('Width')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'">
                    <el-form-item :label="$t('Width')"
                        :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'">
                        <el-input v-model="form6.glassheight" readonly autocomplete="off" />
                    </el-form-item>
                </div>
@@ -773,7 +779,8 @@
                        {{ $t('Confirm') }}</el-button>
                    <span style="margin-right: 12%;">
                        {{ $t('Remaining width:') }}
                        {{ (108.27 - (Object.keys(this.form6).length === 0 ? 0 : (form6.glassheight > form6.glasslength ?
                        {{ (108.27 - (Object.keys(this.form6).length === 0 ? 0 : (form6.glassheight > form6.glasslength
                ?
                form6.glassheight : form6.glasslength))).toFixed(2) }}
                    </span>
@@ -834,25 +841,45 @@
                    </el-table>
                </div>
                <div style="width:30%;" v-for="(item) in CurrentFrame" :key="item['barcode']">
                    <div style="background-color: yellow;">
                        <h1 style="font-size: 40px;text-align: center;">{{ $t('Current scan') }}:</h1>
                        <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ frameInfo.listnumber }}</h1>
                        <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ frameInfo.boxnumber }}</h1>
                    </div>
                    <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{
                $t('Next') }}</el-button>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame') }}:</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame on Belt') }}:</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listId'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxId'] }}</h1>
                    <h1 style="font-size: 30px;text-align: center;">
                        {{ item['flip'] == 1 ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT')
                : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }}
                    <div>
                        <div v-if="item['flip'] == 1"
                            style="width:40px;height:150px;border:1px solid black;float: left;">
                        </div>
                        <div class="frame"
                            :style="'background-color: ' + framecolor1 + ';margin-top:30px;margin:0 auto;width: 370px;height:150px;float: left;'">
                            <h1 style="font-size: 54px;text-align: center;color:white;margin-top: 0px;">
                                {{ framecolor1 == "green" ? $t('Interior Out Bypass: Right')
                                :framecolor1 == "blue" ? $t('Interior Out Bypass: Left')
                                 :$t('Remove Frame') }}
                    </h1>
                    <h1 style="font-size: 30px;text-align: center;">{{ item['framewidthmm'] }}*{{ item['frameheightmm']
                        </div>
                        <div v-if="item['flip'] == 2"
                            style="width:40px;height:150px;border:1px solid black;float: left;">
                        </div>
                    </div>
                    <h1 style="font-size: 30px;text-align: center;margin-top: 50px;">{{
                (item['framewidthmm'] * 1) > (item['frameheightmm'] * 1) ? item['frameheightmm'] :
                    item['framewidthmm']
                        }}
                    </h1>
                    <div class="frame" :style="'background-color: green;margin-top:30px;margin:0 auto;width: ' +
                FrameWidthHeight('before', item['framewidthmm'], item['frameheightmm'], item['position']) + 'px;height:' +
                FrameWidthHeight('after', item['framewidthmm'], item['frameheightmm'], item['position']) + 'px;'
                ">
                    <div>
                        <h1 style="font-size: 30px;text-align: center;margin-top: 65px;">
                        {{ (item['framewidthmm'] * 1) >= (item['frameheightmm'] * 1) ? item['frameheightmm'] : item['framewidthmm'] }}</h1>
                    </div>
                </div>
            </div>
@@ -877,7 +904,8 @@
                <el-table-column prop="storageCage.cell" :label="$t('Slot No')">
                    <template slot-scope='scope'>
                        {{
                scope.row.storageCage == null ? "" : (scope.row.storageCage.cage-1)*21+scope.row.storageCage.cell
                scope.row.storageCage == null ? "" :
                    (scope.row.storageCage.cage - 1) * 21 + scope.row.storageCage.cell
            }}
                    </template>
                </el-table-column>
@@ -903,9 +931,45 @@
                </el-table-column>
            </el-table>
            <div style="width:30%;" v-for="(item) in AluminumFrameInfo" :key="item['barcode']">
                    <!-- <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{
                $t('Next') }}</el-button> -->
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame') }}:</h1>
                    <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{
                $t('Next') }}</el-button>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame on Belt') }}:</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listId'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxId'] }}</h1>
                    <div>
                        <div v-if="item['flip'] == 1"
                            style="width:40px;height:150px;border:1px solid black;float: left;">
                        </div>
                        <div class="frame"
                            :style="'background-color: ' + framecolor + ';margin-top:30px;margin:0 auto;width: 370px;height:150px;float: left;'">
                            <h1 style="font-size: 54px;text-align: center;color:white;margin-top: 0px;">
                                {{ framecolor == "green" ? $t('Interior Out Bypass: Right')
                                :framecolor == "blue" ? $t('Interior Out Bypass: Left')
                                 :$t('Remove Frame') }}
                            </h1>
                        </div>
                        <div v-if="item['flip'] == 2"
                            style="width:40px;height:150px;border:1px solid black;float: left;">
                        </div>
                    </div>
                    <h1 style="font-size: 30px;text-align: center;margin-top: 50px;">{{
                (item['framelength'] * 1) > (item['frameheightmm'] * 1) ? item['frameheightmm'] :
                    item['framelength']
            }}
                    </h1>
                    <div>
                        <h1 style="font-size: 30px;text-align: center;margin-top: 65px;">
                        {{ (item['framelength'] * 1) >= (item['frameheightmm'] * 1) ? item['frameheightmm'] : item['framelength'] }}</h1>
                    </div>
                </div>
            <!-- <div style="width:30%;" v-for="(item) in AluminumFrameInfo" :key="item['barcode']">
                <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame on Belt') }}:</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listnumber'] }}</h1>
                    <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxnumber'] }}</h1>
@@ -916,13 +980,10 @@
                    <h1 style="font-size: 30px;text-align: center;">{{ item['framelength'] }}*{{ item['frameheight']
                        }}
                    </h1>
                    <div class="frame" :style="'background-color: '+ framecolor +';margin-top:30px;margin:0 auto;width: ' +
                FrameWidthHeight('before', item['framelengthmm'], item['frameheightmm'], item['flip']) + 'px;height:' +
                FrameWidthHeight('after', item['framelengthmm'], item['frameheightmm'], item['flip']) + 'px;'
                ">
                <div class="frame"
                    :style="'background-color: ' + framecolor +';margin-top:30px;margin:0 auto;width:400px;height:150px;' ">
                    </div>
                </div>
            </div> -->
        </el-dialog>
        <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh">
            <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'">
@@ -1050,7 +1111,9 @@
            plc2:"",
            AluminumFrameInfo:{},
            framestate:false,
            framecolor:"green"
            framecolor: "green",
            framecolor1: "green",
            frameInfo: {}
        };
    },
    created() {
@@ -1135,7 +1198,28 @@
                    //查询当前铝框信息
                    this.CurrentFrame = obj.CurrentFrame;
                    if (this.CurrentFrame[0].frameheightmm > this.CurrentFrame[0].framewidthmm) {
                        if (this.CurrentFrame[0].frameheightmm < 23.62205 || this.CurrentFrame[0].framewidthmm < 15.748) {
                            this.framecolor1 = "red";
                        } else {
                            if (this.CurrentFrame[0].flip == 2) {
                                this.framecolo1 = "green";
                            } else {
                                this.framecolor1 = "blue";
                            }
                        }
                    } else {
                        if (this.CurrentFrame[0].frameheightmm < 15.748 || this.CurrentFrame[0].framewidthmm < 23.62205) {
                            this.framecolor1 = "red";
                        } else {
                            if (this.CurrentFrame[0].flip == 2) {
                                this.framecolor1 = "green";
                            } else {
                                this.framecolor1 = "blue";
                            }
                        }
                    }
                    // 获取设备状态
                    if (obj.DeviceList != null) {
                        this.DeviceList = obj.DeviceList[0];
@@ -1148,10 +1232,18 @@
                    if (obj.AluminumFrame != null) {
                        this.AluminumFrame = obj.AluminumFrame[0];
                        if (this.dialogFormVisible6 == true) {
                            this.dialogFormVisible7 = true;
                        }
                    }
                    if(obj.frameInfo!=null){
                        this.frameInfo=obj.frameInfo[0];
                        console.log(this.frameInfo);
                    }
                    if (obj.AluminumFrameInfo != null) {
                        this.AluminumFrameInfo = obj.AluminumFrameInfo;
                        if(this.AluminumFrameInfo[0].frameheightmm>this.AluminumFrameInfo[0].framelengthmm){
@@ -1160,7 +1252,12 @@
                                this.framecolor="red";
                            }else{
                                this.framestate=false;
                                if (this.AluminumFrameInfo[0].flip == 2) {
                                this.framecolor="green";
                                } else {
                                    this.framecolor = "blue";
                                }
                            }
                        }else{
                            if(this.AluminumFrameInfo[0].frameheightmm<400||this.AluminumFrameInfo[0].framelengthmm<600){
@@ -1168,7 +1265,11 @@
                                this.framecolor="red";
                            }else{
                                this.framestate=false;
                                if (this.AluminumFrameInfo[0].flip == 2) {
                                this.framecolor="green";
                                } else {
                                    this.framecolor = "blue";
                                }
                            }
                        }
                    }else{
@@ -1739,14 +1840,14 @@
        },
        //删除出片队列玻璃
        deleteproductionqueueglass(id) {
            this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
                inputType: 'password',
                inputPlaceholder: this.$t('Please enter the password'),
            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('confirm'), {
                // 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) {
            }).then(() => {
                // if (this.password == value) {
                    DeleteProductionQueueGlass(id).then(res => {
                        if (res.data.message == 200) {
                            this.$message.success(this.$t('Operation successful'));
@@ -1754,7 +1855,7 @@
                            this.$message.error(this.$t('This frame has glass that is currently outing'));
                        }
                    });
                }
                // }
            }).catch(() => {
                this.$message({
                    type: 'info',