zjj
2024-01-03 a0f44792c6ba7978c0e3c9a09ebc06a94ffc11e2
src/main/webapp/views/taskWrk/taskWrk.html
@@ -17,19 +17,22 @@
         <div style="width: 100%;">
            <el-card class="box-card">
               <el-form :inline="true" :model="tableSearchParam" class="demo-form-inline">
                  <el-form-item label="">
                  <el-form-item style="width: 100px;" label="">
                     <el-input v-model="tableSearchParam.task_no" placeholder="任务号"></el-input>
                  </el-form-item>
                  <el-form-item label="">
                     <el-select v-model="tableSearchParam.status" placeholder="任务状态">
                  <el-form-item style="width: 100px;" label="">
                     <el-select v-model="tableSearchParam.status" placeholder="状态">
                        <el-option label="接收" value="1"></el-option>
                        <el-option label="派发" value="2"></el-option>
                        <el-option label="完结" value="3"></el-option>
                        <el-option label="取消" value="4"></el-option>
                     </el-select>
                  </el-form-item>
                  <el-form-item label="">
                  <el-form-item style="width: 100px;" label="">
                     <el-input v-model="tableSearchParam.wrk_no" placeholder="工作号"></el-input>
                  </el-form-item>
                  <el-form-item label="">
                     <el-input v-model="tableSearchParam.barcode" placeholder="托盘码"></el-input>
                  </el-form-item>
                  <el-form-item label="">
                     <el-date-picker
@@ -47,20 +50,7 @@
                  </el-form-item>
               </el-form>
               <el-table border ref="singleTable" :data="tableData" style="width: 100%;">
                  <el-table-column label="操作" width="100" align="center">
                     <template slot-scope="scope">
                        <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
                           <el-button icon="el-icon-more" size="mini" type="primary"></el-button>
                           <el-dropdown-menu slot="dropdown">
                              <el-dropdown-item command="showCommand">查看指令</el-dropdown-item>
                              <el-dropdown-item command="changeCommand">修改</el-dropdown-item>
                              <el-dropdown-item command="assign">派发</el-dropdown-item>
                              <el-dropdown-item command="complete">完结</el-dropdown-item>
                              <el-dropdown-item command="cancel">取消</el-dropdown-item>
                           </el-dropdown-menu>
                        </el-dropdown>
                     </template>
                  </el-table-column>
                  <el-table-column sortable align="center" property="taskNo" label="任务号" width="90">
                  </el-table-column>
                  <el-table-column sortable align="center" property="status$" label="任务状态" width="110">
@@ -83,7 +73,23 @@
                  </el-table-column>
                  <el-table-column sortable align="center" property="crnNo" label="堆垛机号">
                  </el-table-column>
                  <el-table-column sortable align="center" property="ioPri" label="优先级">
                  <el-table-column sortable align="center" property="ioPri$" label="优先级">
                  </el-table-column>
                  <el-table-column label="操作" width="100" align="center">
                     <template slot-scope="scope">
                        <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
                           <el-button icon="el-icon-more" size="mini" type="primary"></el-button>
                           <el-dropdown-menu slot="dropdown">
                              <el-dropdown-item command="showCommand">查看指令</el-dropdown-item>
                              <el-dropdown-item command="upIoPri">增加优先级</el-dropdown-item>
                              <el-dropdown-item command="downIoPri">降低优先级</el-dropdown-item>
                              <el-dropdown-item command="changeCommand">修改</el-dropdown-item>
                              <el-dropdown-item command="assign">派发</el-dropdown-item>
                              <el-dropdown-item command="complete">完结</el-dropdown-item>
                              <el-dropdown-item command="cancel">取消</el-dropdown-item>
                           </el-dropdown-menu>
                        </el-dropdown>
                     </template>
                  </el-table-column>
               </el-table>
@@ -130,6 +136,7 @@
                  status: null,
                  wrk_no: null,
                  datetime: null,
                  barcode:null
               },
               taskWrkFormVisible: false,
               taskWrkForm: {},
@@ -209,6 +216,14 @@
                        //查看指令
                        this.showCommand(row)
                        break;
                     case "upIoPri":
                        //查看指令
                        this.upIoPri(row)
                        break;
                     case "downIoPri":
                        //查看指令
                        this.downIoPri(row)
                        break;
                     case "changeCommand":
                        //修改指令
                        this.changeCommand(row);
@@ -240,6 +255,64 @@
                     success: function(layero, index) {}
                  });
               },
               upIoPri(row) {
                  let that = this
                  $.ajax({
                     url: baseUrl + "/taskWrk/upIoPri",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data: {
                        taskNo: row.taskNo
                     },
                     method: 'POST',
                     success: function(res) {
                        if (res.code == 200) {
                           that.$message({
                              message: "增加成功",
                              type: 'success'
                           });
                           that.getTableData()
                        } else if (res.code === 403) {
                           top.location.href = baseUrl + "/";
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               },
               downIoPri(row) {
                  let that = this
                  $.ajax({
                     url: baseUrl + "/taskWrk/downIoPri",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data: {
                        taskNo: row.taskNo
                     },
                     method: 'POST',
                     success: function(res) {
                        if (res.code == 200) {
                           that.$message({
                              message: "降低成功",
                              type: 'success'
                           });
                           that.getTableData()
                        } else if (res.code === 403) {
                           top.location.href = baseUrl + "/";
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               },
               changeCommand(row) {
                  //修改指令
                  this.taskWrkFormVisible = true