ZengTao
2023-09-13 2e47413b938f97ae36d5505462cc0d70d6f7a2e2
优化主界面样式
6个文件已修改
227 ■■■■ 已修改文件
CanadaMes-ui/src/lang/locales/en-US.json 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/zh-CN.json 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/home/index.vue 103 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/en-US.json
@@ -195,7 +195,42 @@
  "langRegisterButton": "Register",
  "langResetButton": "Reset",
  "langCancelButton": "Cancel",
  "langRegisterSuccessMessage": "Registration successful"
  "langRegisterSuccessMessage": "Registration successful",
  "Enter the glass lD":"Enter the glass lD",
  "Manually feed the glass":"Manually feed the glass",
  "Enter the order number":"Enter the order number",
  "Exit the glass by order number":"Exit the glass by order number",
  "Please confirm the glass information":"Please confirm the glass information",
  "Please confirm the Ordering Information":"Please confirm the Ordering Information",
  "Alarm Information":"Alarm Information",
  "Cage Details":"Cage Details",
  "order":"order",
  "length":"length",
  "width":"width",
  "coating":"coating",
  "Operate":"Operate",
  "end task":"end task",
  "cancal":"cancal",
  "confirm":"confirm",
  "number":"number",
  "Coming out glass ID":"Coming out glass ID",
  "Incoming glass ID":"Incoming glass ID",
  "The Cage number being used":"The Cage number being used",
  "The Grille number being used":"The Grille number being used",
  "Order Nmuber":"Order Nmuber",
  "Length and width":"Length and width",
  "id":"id",
  "content":"content",
  "timeon":"timeon",
  "endTime":"endTime",
  "The Cage number":"The Cage number",
  "tier":"tier",
  "cell":"cell",
  "glassid":"glassid",
  "order number":"order number",
  "delete":"delete",
  "out":"out"
}
CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -192,5 +192,41 @@
  "langRegisterButton": "注册",
  "langResetButton": "重置",
  "langCancelButton": "取消",
  "langRegisterSuccessMessage": "注册成功"
  "langRegisterSuccessMessage": "注册成功",
  "Enter the glass lD":"输入玻璃id",
  "Manually feed the glass":"手动上片",
  "Enter the order number":"输入订单号",
  "Exit the glass by order number":"按订单出片",
  "Please confirm the glass information":"请确认玻璃信息",
  "Please confirm the Ordering Information":"请确认订单信息",
  "Alarm Information":"报警信息",
  "Cage Details":"理片笼详情",
  "order":"订单",
  "length":"长",
  "width":"宽",
  "coating":"涂层",
  "Operate":"操作",
  "end task":"完成任务",
  "cancal":"取消",
  "confirm":"确认",
  "number":"数量",
  "Coming out glass ID":"进片玻璃id",
  "Incoming glass ID":"出片玻璃id",
  "The Cage number being used":"笼子",
  "The Grille number being used":"格子",
  "Order Nmuber":"订单编号",
  "Length and width":"尺寸",
  "id":"id",
  "content":"内容",
  "timeon":"报警时间",
  "endTime":"结束时间",
  "The Cage number":"笼子",
  "tier":"层",
  "cell":"格子",
  "glassid":"玻璃id",
  "order number":"订单",
  "delete":"删除",
  "out":"出片"
}
CanadaMes-ui/src/views/home/index.vue
@@ -151,37 +151,37 @@
                </div>
            </div>
            <div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;">
                <el-input style="width:15%;" placeholder="Enter the glass lD" v-model="glassid"></el-input>
                <el-button type="primary" @click="showform()">Manually feed the glass</el-button>
                <el-input style="width:15%;" placeholder="Enter the order number" v-model="order"></el-input>
                <el-button type="warning" @click="showform1();">Exit the glass by order number</el-button>
                <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-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="Coming out glass ID"></el-table-column>
                    <el-table-column :width="250" prop="cell" label="The Grille number being used"></el-table-column>
                    <el-table-column prop="orderId" label="Order Nmuber"></el-table-column>
                    <el-table-column prop="lengthWidth" label="Length and width"></el-table-column>
                    <el-table-column prop="coating" label="coating"></el-table-column>
                    <el-table-column label="Operate">
                    <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 :label="$t('Operate')">
                        <template slot-scope='scope'>
                            <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                @click="endtask(0, scope.row.glassId, scope.row.cell)">end
                                task</el-button>
                                @click="endtask(0, scope.row.glassId, scope.row.cell)">{{$t('end task')}}</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-table :data="this.tasklist2" border style="width: 100%">
                    <el-table-column prop="glassId" label="Incoming glass ID"></el-table-column>
                    <el-table-column :width="250" prop="cell" label="The Grille number being used"></el-table-column>
                    <el-table-column prop="orderId" label="Order Nmuber"></el-table-column>
                    <el-table-column prop="lengthWidth" label="Length and width"></el-table-column>
                    <el-table-column prop="coating" label="coating"></el-table-column>
                    <el-table-column label="Operate">
                    <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 :label="$t('Operate')">
                        <template slot-scope='scope'>
                            <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                @click="endtask(1, scope.row.glassId, scope.row.cell)">end
                                task</el-button>
                                @click="endtask(1, scope.row.glassId, scope.row.cell)">{{$t('end task')}}</el-button>
                        </template>
                    </el-table-column>
                </el-table>
@@ -221,68 +221,67 @@
                <div class="blocks-img" :style="{ left: car2 + 'px', top: '194px' }"></div>
            </div>
        </el-footer>
        <el-dialog :visible.sync="dialogFormVisible" title="Please confirm the information">
        <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="order">
                <el-form-item :label="$t('order')">
                    <el-input v-model="form.orderno" autocomplete="off" />
                </el-form-item>
                <el-form-item label="length">
                <el-form-item :label="$t('length')">
                    <el-input v-model="form.length" autocomplete="off" />
                </el-form-item>
                <el-form-item label="width">
                <el-form-item :label="$t('width')">
                    <el-input v-model="form.width" autocomplete="off" />
                </el-form-item>
                <el-form-item label="coating">
                <el-form-item :label="$t('coating')">
                    <el-input v-model="form.coating" autocomplete="off" />
                </el-form-item>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="cancal()">cancal</el-button>
                    <el-button @click="sbumitglassid()" type="primary">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>
        <el-dialog :visible.sync="dialogFormVisible1" title="Ordering Information">
        <el-dialog :visible.sync="dialogFormVisible1" :title="$t('Please confirm the Ordering Information')">
            <el-form :model="form1" label-width="100px" style="padding-right: 30px">
                <el-form-item label="order">
                <el-form-item :label="$t('order')">
                    <el-input v-model="form1.order" autocomplete="off" />
                </el-form-item>
                <el-form-item label="number">
                <el-form-item :label="$t('number')">
                    <el-input v-model="form1.number" autocomplete="off" />
                </el-form-item>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="cancal1()">cancal</el-button>
                    <el-button @click="getOrder();" type="primary">confirm</el-button>
                    <el-button @click="cancal1()">{{ $t('cancal') }}</el-button>
                    <el-button @click="getOrder();" type="primary">{{ $t('confirm') }}</el-button>
                </span>
            </template>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible2" title="Ordering Information">
        <el-dialog :visible.sync="dialogFormVisible2" :title="$t('Alarm Information')">
            <el-table :data="this.alarm" border style="width: 100%;">
                <el-table-column prop="id" label="id"></el-table-column>
                <el-table-column prop="content" label="content"></el-table-column>
                <el-table-column prop="timeons" label="timeon"></el-table-column>
                <el-table-column prop="endTime" label="endTime"></el-table-column>
                <el-table-column prop="id" :label="$t('id')"></el-table-column>
                <el-table-column prop="content" :label="$t('content')"></el-table-column>
                <el-table-column prop="timeons" :label="$t('timeon')"></el-table-column>
                <el-table-column prop="endTime" :label="$t('endTime')"></el-table-column>
            </el-table>
        </el-dialog>
        <el-dialog :visible.sync="dialogFormVisible3" title="Cage Details">
            <el-table :data="this.cageinfo" border style="width: 100%;height: 700px;overflow: auto;">
                <el-table-column :width="150" prop="cage" label="the grille number"></el-table-column>
                <el-table-column prop="cell" label="cell"></el-table-column>
                <el-table-column prop="tier" label="tier"></el-table-column>
                <el-table-column prop="glassId" label="glassid"></el-table-column>
                <el-table-column :width="130" prop="orderId" label="order number"></el-table-column>
                <el-table-column :width="150" prop="lengthWidth" label="length and width"></el-table-column>
                <el-table-column prop="coating" label="coating"></el-table-column>
                <el-table-column :width="150" label="operate">
        <el-dialog :visible.sync="dialogFormVisible3" :title="$t('Cage Details')">
            <el-table :data="this.cageinfo" :height="700" border style="width: 100%;overflow: auto;">
                <el-table-column :width="150" 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 :width="130" prop="orderId" :label="$t('order number')"></el-table-column>
                <el-table-column :width="150" 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="140" :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)">delete</el-button>
                            @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('delete') }}</el-button>
                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                            @click="outglass(scope.row.glassId, scope.row.state)">out</el-button>
                            @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('out') }}</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -442,7 +441,9 @@
            if (this.form1.order != "") {
                InsertOrder(this.order).then(res => {
                    if (res.data.message == 200) {
                        this.dialogFormVisible1=false;
                        this.$message.success("Operation successful");
                    } else {
                        this.$message.success("There is no such order");
                    }
@@ -462,7 +463,7 @@
                        this.$message.success("There are currently tasks");
                    }
                    else if(res.data.message2 == 300) {
                        this.$message.success("There is no such grid");
                        this.$message.success("There is no such glass");
                    }
                    else if(res.data.message2 == 400) {
                        this.$message.success("There is no such grid");
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -17,7 +17,7 @@
    public void run() {
        while (this != null) {
            try {
                Thread.sleep(10000);
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -22,7 +22,7 @@
     List<StorageCage> selectAll(Short orderids);
     //判断该笼子是否有合适宽度空格
     @Select("select cage,cell,tier,id,ROUND(id/2)as prcId from storage_cage where cage=#{cage1} and state=0 and width>=#{width} ORDER BY cell,tier LIMIT 1")
     @Select("select cage,cell,tier,id,ROUND(id/2)as prcId from storage_cage where cage=#{cage1} and state=0 and width>=#{width} ORDER BY cell asc,tier desc LIMIT 1")
     StorageCage selectCage1(int  cage1,double width);
     //判断笼子内玻璃数
     @Select("select COUNT(tier)as tier from storage_cage where  cage=#{cage} and cell=#{cell} and state=1;")
@@ -54,16 +54,24 @@
     StorageCage selectGlassCage(int cage,double width,int cage1,int cage2);
    //删除笼子信息(出片)
    @Update("update storage_cage set state=#{state},width=width+#{width},glass_id=#{glassid},order_id=#{orderid},glasswidth=0 where cage=#{cage} and cell=#{cell} and tier=#{tier};")
    @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=0 where cage=#{cage} and cell=#{cell} and tier=#{tier};")
    void UpdataGlassCage(String orderid,String glassid,double width,int cage,int cell,int tier,int state);
    //修改笼子信息(进片)
    @Update("update storage_cage set state=#{state},width=width-#{width},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{width} where id=#{id};")
    @Update("update storage_cage set state=#{state},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{width} where id=#{id};")
    void UpdataAddCage(Short orderid,Short glassid,double width,int cage,int cell,int id,int state);
    //修改同笼子格子宽度
     @Update("update storage_cage set width=width-#{width} where   cage=#{cage} and cell=#{cell};")
    void UpdataAddCage1(double width,int cage,int cell);
    //修改同笼子格子宽度(出片)
     @Update("update storage_cage set width=width+#{width} where   cage=#{cage} and cell=#{cell};")
    void UpdataOutCage(double width,int cage,int cell);
    //调拨更换笼子信息
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=2)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.glasswidth=b.glasswidth,a.width=a.width-b.glasswidth,a.state=1 where a.id=#{id1}")
    @Update("update storage_cage as a,(select*from storage_cage b where b.cage=#{cage} and b.cell=#{cell} and b.tier=2)as b set a.glass_id=b.glass_id,a.order_id=b.order_id,a.width=a.width-b.glasswidth,a.state=1 where a.id=#{id1}")
    void UpdateDBCage(int id1,int cage,int cell);
    // @Insert("insert into user(name, date, address, user_no) values (#{name}, #{date}, #{address}, #{userNo})")
    // void insert (Spian spian);
    //新增任务表
    @Insert("INSERT INTO `canadames`.`storage_task`(`task_type`, `task_state`, `shelf_rack`, `load_rack`, `start_time`, `finsh_time`) VALUES (#{task_type},#{task_state},#{shelf_rack},#{load_rack},NOW(),NOW());")
    void Inserttask(int task_type,int task_state,int shelf_rack,int load_rack);
}
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -34,13 +34,16 @@
        int prcid = cageout.getPrcId();// prcid
        int prcid2;
        int ids;
        int cages;
        int cells;
        double glasswidth = cageout.getGlassWidth();
        // 判断玻璃内外片
        if (tier == 2) {
            // 判断玻璃可直接出片时
            // 修改数据库笼子表(出片)
            spianMapper.UpdataOutCage(glasswidth, cage, cell);//增加原格子宽度
            spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 0);
            datas.add((short) prcid);
            datas.add((short) 1000);
            datas.add((short) 1);
@@ -69,9 +72,13 @@
                    // 获取调拨位置进行调拨
                    prcid2 = cagecell.getPrcId();// 调拨目标位PRCID
                    ids = cagecell.getId();// 调拨目标位ID
                    cages=cagecell.getCage();//调拨目标位笼子
                    cells=cagecell.getCell();//调拨目标位格子
                    // 更换玻璃的笼子
                    spianMapper.UpdataAddCage1(glasswidth, cages, cells);//减少新格子宽度
                    spianMapper.UpdateDBCage(ids, cage, cell);// 将原格子数据更新到新格子里
                    spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 0);// 清除原格子数据
                    spianMapper.UpdataOutCage(glasswidth, cage, cell);//增加原格子宽度
                    // 填入调拨数据
                    datas.add((short) prcid);// 调拨外片起始位置
                    datas.add((short) prcid2);
@@ -98,14 +105,18 @@
                    // 获取调拨位置进行调拨
                    prcid2 = cagecell.getPrcId();// 调拨目标位prcID
                    ids = cagecell.getId();// 调拨目标位ID
                    cages=cagecell.getCage();//调拨目标位笼子
                    cells=cagecell.getCell();//调拨目标位格子
                    // 填入调拨数据
                    datas.add((short) prcid);
                    datas.add((short) prcid2);
                    datas.add((short) 2);
                    datas.add((short) 1);
                    // 转移原调拨格子数据
                    spianMapper.UpdataAddCage(glasswidth, cages, cells);//减少新格子宽度
                    spianMapper.UpdateDBCage(ids, cage, cell);// 将原格子数据更新到新格子里
                    spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 0);// 清除原格子数据
                    spianMapper.UpdataOutCage(glasswidth, cage, cell);//增加原格子宽度
                    // 传输mes数据,坐标,数据
                    S7control.getinstance().WriteWord(adddresslist, datas);
                    datas.clear(); // 清空整个列表
@@ -179,6 +190,7 @@
                    datas.add((short) 1);
                    // 数据库修改笼子表新增一条玻璃
                    spianMapper.UpdataAddCage(orderids, glassid, widths, cage1, cells, ids, 1);
                    spianMapper.UpdataAddCage1(widths, cage1, cells);//减少格子宽度
                    S7control.getinstance().WriteWord(adddresslist, datas);
                    return (200);
@@ -186,7 +198,7 @@
            }
        }
        return (300);
        return (400);
    }
@@ -207,13 +219,15 @@
        int prcid = cageout.getPrcId();// prcid
        int prcid2;
        int ids;
        int cages;
        int cells;
        double glasswidth = cageout.getGlassWidth();
        // 判断玻璃内外片
        if (tier == 2) {
            // 判断玻璃可直接出片时
            // 修改数据库笼子表(出片)
            spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, tier, 0);
            spianMapper.UpdataOutCage(glasswidth, cage, cell);//增加原格子宽度
            datas.add((short) prcid);
            datas.add((short) 1000);
            datas.add((short) 1);
@@ -236,9 +250,13 @@
                    // 获取调拨位置进行调拨
                    prcid2 = cagecell.getPrcId();// 调拨目标位PRCID
                    ids = cagecell.getId();// 调拨目标位ID
                    cages=cagecell.getCage();//调拨目标位笼子
                    cells=cagecell.getCell();//调拨目标位格子
                    // 更换玻璃的笼子
                    spianMapper.UpdataAddCage1(glasswidth, cages, cells);//减少新格子宽度
                    spianMapper.UpdateDBCage(ids, cage, cell);// 将原格子数据更新到新格子里
                    spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 0);// 清除原格子数据
                    spianMapper.UpdataOutCage(glasswidth, cage, cell);//增加原格子宽度
                    // 填入调拨数据
                    datas.add((short) prcid);// 调拨外片起始位置
                    datas.add((short) prcid2);
@@ -265,6 +283,9 @@
                    // 获取调拨位置进行调拨
                    prcid2 = cagecell.getPrcId();// 调拨目标位prcID
                    ids = cagecell.getId();// 调拨目标位ID
                    cages=cagecell.getCage();//调拨目标位笼子
                    cells=cagecell.getCell();//调拨目标位格子
                    // 填入调拨数据
                    datas.add((short) prcid);
                    datas.add((short) prcid2);
@@ -272,7 +293,9 @@
                    datas.add((short) 1);
                    // 转移原调拨格子数据
                    spianMapper.UpdateDBCage(ids, cage, cell);// 将原格子数据更新到新格子里
                    spianMapper.UpdataAddCage(glasswidth, cages, cells);//减少新格子宽度
                    spianMapper.UpdataGlassCage("", "", glasswidth, cage, cell, 2, 0);// 清除原格子数据
                    spianMapper.UpdataOutCage(glasswidth, cage, cell);//增加原格子宽度
                    // 传输mes数据,坐标,数据
                    S7control.getinstance().WriteWord(adddresslist, datas);
                    datas.clear(); // 清空整个列表