1
zhang
2025-06-30 8d5c70aef9cbacbcc412d73c4b730e21f94e6514
src/main/webapp/views/taskWrk/taskWrk.html
@@ -31,6 +31,16 @@
                  <el-form-item label="">
                     <el-input v-model="tableSearchParam.wrk_no" placeholder="工作号"></el-input>
                  </el-form-item>
                  <el-form-item label="">
                     <el-date-picker
                           v-model="tableSearchParam.datetime"
                           value-format="yyyy-MM-dd HH:mm:ss"
                           type="datetimerange"
                           range-separator="至"
                           start-placeholder="开始日期"
                           end-placeholder="结束日期">
                     </el-date-picker>
                  </el-form-item>
                  <el-form-item>
                     <el-button type="primary" @click="getTableData">查询</el-button>
                     <el-button type="primary" @click="resetParam">重置</el-button>
@@ -42,7 +52,8 @@
                        <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="showCommand">查看指令</el-dropdown-item>-->
                              <el-dropdown-item command="returnWorkingCondition">重新给堆垛机下发任务</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>
@@ -69,7 +80,15 @@
                  </el-table-column>
                  <el-table-column property="wrkSts$" label="工作状态">
                  </el-table-column>
                  <el-table-column property="barcode" label="托盘码">
                  </el-table-column>
                  <el-table-column property="crnNo" label="堆垛机号">
                  </el-table-column>
                  <el-table-column property="ioPri" label="优先级">
                  </el-table-column>
                  <el-table-column property="type" label="下降高度">
                  </el-table-column>
                  <el-table-column property="memo" label="备注">
                  </el-table-column>
               </el-table>
@@ -114,7 +133,8 @@
               tableSearchParam: {
                  task_no: null,
                  status: null,
                  wrk_no: null
                  wrk_no: null,
                  datetime: null,
               },
               taskWrkFormVisible: false,
               taskWrkForm: {},
@@ -139,9 +159,13 @@
               },
               getTableData() {
                  let that = this;
                  let data = this.tableSearchParam
                  let data = JSON.parse(JSON.stringify(this.tableSearchParam))
                  data.curr = this.currentPage
                  data.limit = this.pageSize
                  if (this.tableSearchParam.datetime != null) {
                     data.datetime = null
                     data.create_time = this.tableSearchParam.datetime[0] + " - " + this.tableSearchParam.datetime[1]
                  }
                  $.ajax({
                     url: baseUrl + "/taskWrk/list/auth",
                     headers: {
@@ -186,9 +210,9 @@
               },
               handleCommand(command, row) {
                  switch (command) {
                     case "showCommand":
                        //查看指令
                        this.showCommand(row)
                     case "returnWorkingCondition":
                        //重新给堆垛机下发任务
                        this.returnWorkingConditionWrk(row)
                        break;
                     case "changeCommand":
                        //修改指令
@@ -258,7 +282,7 @@
                  });
               },
               completeWrk(row){
                  //派发任务
                  //完成任务
                  let that = this
                  $.ajax({
                     url: baseUrl + "/taskWrk/complete/auth",
@@ -287,6 +311,36 @@
                     }
                  });
               },
               returnWorkingConditionWrk(row){
                  //重新给堆垛机下发任务
                  let that = this
                  $.ajax({
                     url: baseUrl + "/taskWrk/returnWorkingCondition/auth",
                     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'
                           });
                        }
                     }
                  });
               },
               cancelWrk(row){
                  //取消任务
                  let that = this