pang.jiabao
2025-05-13 0069b25d77cf2dd36b030fa4c86d4f3738f552e8
src/main/webapp/views/taskWrkLog/taskWrkLog.html
@@ -23,22 +23,32 @@
                  <el-form-item 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-input v-model="tableSearchParam.start_point" placeholder="起始位"></el-input>
                  </el-form-item>
                  <el-form-item label="">
                     <el-input v-model="tableSearchParam.target_point" placeholder="目标位"></el-input>
                  </el-form-item>
                  <el-form-item>
                     <el-button type="primary" @click="getTableData">查询</el-button>
                     <el-button type="primary" @click="resetParam">重置</el-button>
                  </el-form-item>
               </el-form>
               <el-table ref="singleTable" :data="tableData" style="width: 100%;">
                  <el-table-column label="操作" width="100">
                     <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-menu>
                        </el-dropdown>
                     </template>
                  </el-table-column>
<!--                  <el-table-column label="操作" width="100">-->
<!--                     <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="resubmitTheTask">重新上报任务完结</el-dropdown-item>-->
<!--                              <el-dropdown-item command="showCommand">查看指令</el-dropdown-item>-->
<!--                           </el-dropdown-menu>-->
<!--                        </el-dropdown>-->
<!--                     </template>-->
<!--                  </el-table-column>-->
                  <el-table-column property="taskNo" label="任务号">
                  </el-table-column>
                  <el-table-column property="status$" label="任务状态">
@@ -58,6 +68,8 @@
                  <el-table-column property="wrkSts$" label="工作状态">
                  </el-table-column>
                  <el-table-column property="crnNo" label="堆垛机号">
                  </el-table-column>
                  <el-table-column property="barcode" label="条码">
                  </el-table-column>
               </el-table>
@@ -154,6 +166,11 @@
               },
               handleCommand(command, row) {
                  switch (command) {
                     case "resubmitTheTask":
                        //重新上报任务完结
                        this.resubmitTheTask(row)
                        break;
                     case "showCommand":
                        //查看指令
                        this.showCommand(row)
@@ -173,6 +190,36 @@
                     success: function(layero, index) {}
                  });
               },
               resubmitTheTask(row){
                  //重新上报任务完结
                  let that = this
                  $.ajax({
                     url: baseUrl + "/taskWrkLog/resubmitTheTask/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'
                           });
                        }
                     }
                  });
               },
            }
         })
      </script>