#
zjj
2024-05-23 fe6e066b0970ed6c1dd23aa17fa65f16edbf513c
src/main/webapp/views/taskWrk/taskWrk.html
@@ -28,6 +28,13 @@
                        <el-option label="取消" value="4"></el-option>
                     </el-select>
                  </el-form-item>
                  <el-form-item  label="">
                     <el-select v-model="tableSearchParam.io_type" placeholder="任务类型">
                        <el-option label="入库" value="1"></el-option>
                        <el-option label="出库" value="2"></el-option>
                        <el-option label="移库" value="3"></el-option>
                     </el-select>
                  </el-form-item>
                  <el-form-item style="width: 100px;" label="">
                     <el-input v-model="tableSearchParam.wrk_no" placeholder="工作号"></el-input>
                  </el-form-item>
@@ -51,7 +58,7 @@
               </el-form>
               <el-table border ref="singleTable" :data="tableData" style="width: 100%;">
                  <el-table-column sortable align="center" property="taskNo" label="任务号" width="90">
                  <el-table-column fixed="left" sortable align="center" property="taskNo" label="任务号" width="90">
                  </el-table-column>
                  <el-table-column sortable align="center" property="status$" label="任务状态" width="110">
                  </el-table-column>
@@ -67,7 +74,7 @@
                  </el-table-column>
                  <el-table-column sortable align="center" property="targetPoint" label="终点位置">
                  </el-table-column>
                  <el-table-column sortable align="center" property="wrkSts$" label="工作状态">
                  <el-table-column sortable align="center" property="wrkSts$" label="工作状态" width="150">
                  </el-table-column>
                  <el-table-column sortable align="center" property="barcode" label="托盘码">
                  </el-table-column>
@@ -75,7 +82,12 @@
                  </el-table-column>
                  <el-table-column sortable align="center" property="ioPri$" label="优先级">
                  </el-table-column>
                  <el-table-column label="操作" width="100" align="center">
                  <el-table-column sortable align="center" property="executeTime$" label="堆垛机开始执行时间">
                  </el-table-column>
                  <el-table-column sortable align="center" property="completeTime$" label="堆垛机结束执行时间">
                  </el-table-column>
                  <el-table-column fixed="right" 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>
@@ -102,7 +114,7 @@
            </el-card>
         </div>
         <el-dialog :title="taskWrkFormTitle" :visible.sync="taskWrkFormVisible">
         <el-dialog :title="taskWrkFormTitle" :visible.sync="taskWrkFormVisible" :before-close="handleClose">
            <el-form :model="taskWrkForm">
               <el-form-item label="起点位置" :label-width="taskWrkFormLabelWidth">
                  <el-input v-model="taskWrkForm.startPoint" autocomplete="off"></el-input>
@@ -147,6 +159,46 @@
               this.init()
            },
            methods: {
               handleClose(done) {
                  this.$confirm('确认关闭?')
                        .then(_ => {
                           done();
                        })
                        .catch(_ => {});
               },
               taskWrkFormConfirm() {
                  //修改指定任务数据
                  let that = this
                  $.ajax({
                     url: baseUrl + "/taskWrk/updatePoint/auth",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data: {
                        taskNo: this.taskWrkForm.taskNo,
                        startPoint: this.taskWrkForm.startPoint,
                        targetPoint: this.taskWrkForm.targetPoint,
                     },
                     method: 'POST',
                     success: function(res) {
                        if (res.code == 200) {
                           that.taskWrkFormVisible = false
                           that.$message({
                              message: "更新成功",
                              type: 'success'
                           });
                           that.getTableData()
                        } else if (res.code === 403) {
                           top.location.href = baseUrl + "/";
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               },
               init() {
                  let taskNo = getQueryVariable('taskNo')
                  let wrkNo = getQueryVariable('wrkNo')
@@ -409,39 +461,7 @@
                     }
                  });
               },
               taskWrkFormConfirm() {
                  //修改指定任务数据
                  let that = this
                  $.ajax({
                     url: baseUrl + "/taskWrk/updatePoint/auth",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data: {
                        taskNo: this.taskWrkForm.taskNo,
                        startPoint: this.taskWrkForm.startPoint,
                        targetPoint: this.taskWrkForm.targetPoint,
                     },
                     method: 'POST',
                     success: function(res) {
                        if (res.code == 200) {
                           that.taskWrkFormVisible = false
                           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>