自动化立体仓库 - WMS系统
*
lsh
2025-05-29 4f1220db6667cdc5e87aebc8ae6738db705ec056
src/main/webapp/views/deviceOperate/errorTaskOperate.html
@@ -19,7 +19,7 @@
<body>
   <div id="app" style="display: flex;justify-content: center;flex-wrap: wrap;">
      <div style="width: 100%;">
         <el-table border ref="singleTable" :data="tableData" highlight-current-row @row-click="handleRowClick"
         <el-table border ref="singleTable" :data="tableData" highlight-current-row
            max-height="350" style="width: 100%">
            <el-table-column property="category" label="类别">
            </el-table-column>
@@ -39,135 +39,14 @@
      var app = new Vue({
         el: '#app',
         data: {
            showLayer: false,
            valueUpdate: false,
            selectedOption: null,
            updateJarNo: null,
            optionsUpdate: [
               { id: '1', value: '1', text: '1托' },
               { id: '2', value: '2', text: '2托' },
               { id: '3', value: '3', text: '3托' },
               { id: '4', value: '4', text: '4托' },
               { id: '5', value: '5', text: '5托' },
               { id: '6', value: '6', text: '6托' },
               { id: '7', value: '7', text: '7托' },
               { id: '999', value: '999', text: '取消' },
            ],
            tableData: [],
            currentRow: null,
            currentTitle: "未选择设备",
            currentIndex: null,
            formParam: {
               rgvNo: null,
               sourceStaNo: null,
               sourceRow: 1,
               sourceBay: 0,
               sourceLev: 1,
               staNo: null,
               row: 1,
               bay: 0,
               lev: 1,
               barcode:null,
               barcodeType:null,
               emptyContainer:null
            },
            formParamD: {
               rgvNo: null,
               sourceStaNo: null,
               sourceRow: 1,
               sourceBay: 0,
               sourceLev: 1,
               staNo: null,
               row: 1,
               bay: 0,
               lev: 1,
               barcode:null,
               barcodeType:null,
               emptyContainer:null
            },
            enableIn: false,
            enableOut: false,
            options:[
               {
                  value:'1',
                  label:'是'
               },
               {
                  value:'0',
                  label:'否'
               }
            ],
            demo: 'X',
            rgvMode: 0,
            itemMast: []
            tableData: []
         },
         created() {
            this.init()
         },
         watch: {
            valueUpdate(newVal) {
               if (newVal) {
                  this.showLayer = true;
                  // 可以在这里添加延时关闭层或其他逻辑
               }
            },
         },
         methods: {
            historicalTasks(){
               let that = this
               that.selectedOption = 0;
               that.valueUpdate = false;
               if (that.currentIndex != null){
                  $.ajax({
                     url: baseUrl + "/basJarMastLog/historicalTasks/auth",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data:{
                        id: that.tableData[that.currentIndex].jarNo
                     },
                     success: function (res) {
                        that.itemMast = res.data
                        // console.log(that.itemMast)
                     }
                  });
               }
            },
            staTova(sta,end){
               let that = this
               that.$confirm('此操作存在风险,是否继续','提示',{
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning'
               }).then(()=>{
                  $.ajax({
                     url: baseUrl + "/rgv/rgvDemoTask",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data:{
                        rgvNo : this.formParam.rgvNo,
                        sta : sta,
                        end : end
                     },
                     method: 'Get',
                     success: function (res) {
                        if (res.code == 200) {
                           that.$message({
                              message: res.msg,
                              type: 'success'
                           });
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               })
            },
            init() {
               this.getTableData()
@@ -177,76 +56,8 @@
               }, 1000)
            },
            confirmEvent() {
               var that = this
               that.valueUpdate = true;
            },
            cancelEvent() {
               var that = this
               that.valueUpdate = false;
            },
            handleSubmit() {
               if ( this.selectedOption > 998 ){
                  this.selectedOption = 0;
                  this.valueUpdate = false;
               } else if ( this.selectedOption > 0 ){
                  var that = this
                  if (that.updateJarNo == null){
                     console.log("this.updateJarNo;null;null;null;null;null")
                  } else {
                     $.ajax({
                        url: baseUrl + "/basJar/update/uodate/jar/count/auth",
                        headers: {
                           'token': localStorage.getItem('token')
                        },
                        data: {
                           jarCount: that.selectedOption,
                           jarNo: that.updateJarNo
                        },
                        success: function (res) {
                           if (res.code == 200) {
                              that.$message({
                                 message: res.msg,
                                 type: 'success'
                              });
                           } else {
                              that.$message({
                                 message: res.msg,
                                 type: 'error'
                              });
                           }
                        }
                     });
                  }
                  this.selectedOption = 0;
                  this.valueUpdate = false;
               }
            },
            handleRowClick(row, col, event) {
               var that = this
               const index = that.tableData.indexOf(row)
               that.currentRow = row;
               that.currentIndex = index
               this.updateJarNo = row.jarNo
               that.currentTitle = row.jarNo + "号硫化罐"
               that.formParam.rgvNo = row.rgvNo
               that.enableIn = row.inEnable == "Y" ? true : false
               that.enableOut = row.outEnable == "Y" ? true : false
               this.selectedOption = 0;
               this.valueUpdate = false;
               $.ajax({
                  url: baseUrl + "/basJarMast/JatId/auth",
                  headers: {
                     'token': localStorage.getItem('token')
                  },
                  data: {
                     id: row.jarNo
                  },
                  success: function (res) {
                     that.itemMast = res.data
                     // console.log(that.itemMast)
                  }
               });
            },
            getTableData() {
               let that = this;
@@ -261,226 +72,6 @@
                  method: 'post',
                  success: function (res) {
                     that.tableData = res.data
                  }
               });
            },
            demoStatus() {
               let that = this;
               $.ajax({
                  url: baseUrl + "/rgv/demo/status",
                  data:{
                     rgvNo : this.formParam.rgvNo
                  },
                  headers: {
                     'token': localStorage.getItem('token')
                  },
                  contentType: 'application/json;charset=UTF-8',
                  method: 'get',
                  success: function (res) {
                     // console.log(res)
                     that.demo = res.data.demo
                     that.rgvMode = res.data.rgvMode
                  }
               });
            },
            initiate(){
               let that = this
               that.$confirm('此操作存在风险,是否继续','提示',{
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning'
               }).then(()=>{
                  $.ajax({
                     url: baseUrl + "/rgv/operator/put",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data: this.formParam,
                     method: 'POST',
                     success: function (res) {
                        if (res.code == 200) {
                           that.$message({
                              message: res.msg,
                              type: 'success'
                           });
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               })
            },
            initiateD(method){
               let urlS = "/rgv/operator/single/step/three/put";
               if (method===1){
                  urlS = "/rgv/operator/single/step/one/put";
               }else if (method === 2){
                  urlS = "/rgv/operator/single/step/two/put";
               }else if (method === 3){
                  urlS = "/rgv/operator/single/step/three/put";
               }
               let that = this
               that.$confirm('此操作存在风险,是否继续','提示',{
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning'
               }).then(()=>{
                  $.ajax({
                     url: baseUrl + urlS,
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data: this.formParam,
                     method: 'POST',
                     success: function (res) {
                        if (res.code == 200) {
                           that.$message({
                              message: res.msg,
                              type: 'success'
                           });
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               })
            },
            demos(method){
               let that = this
               that.$confirm('此操作存在风险,是否继续','提示',{
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning'
               }).then(()=>{
                  $.ajax({
                     url: baseUrl + "/rgv/demo/status/" + method,
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data:{
                        rgvNo : this.formParam.rgvNo
                     },
                     method: 'Get',
                     success: function (res) {
                        if (res.code == 200) {
                           that.$message({
                              message: res.msg,
                              type: 'success'
                           });
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               })
            },
            rgvStatus(method){
               let that = this
               that.$confirm('此操作存在风险,是否继续','提示',{
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning'
               }).then(()=>{
                  $.ajax({
                     url: baseUrl + "/rgv/demo/status/rgvStatus",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data:{
                        rgvNo : this.formParam.rgvNo,
                        status : Number(method)
                     },
                     method: 'Get',
                     success: function (res) {
                        if (res.code == 200) {
                           that.$message({
                              message: res.msg,
                              type: 'success'
                           });
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               })
            },
            requestOperate(method) {
               let that = this
               that.$confirm('此操作存在风险,是否继续','提示',{
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning'
               }).then(()=>{
                  $.ajax({
                     url: baseUrl + "/rgv/operator/" + method,
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data: this.formParam,
                     method: 'POST',
                     success: function (res) {
                        if (res.code == 200) {
                           that.$message({
                              message: res.msg,
                              type: 'success'
                           });
                        } else {
                           that.$message({
                              message: res.msg,
                              type: 'error'
                           });
                        }
                     }
                  });
               })
            },
            updateEnableInOut(type) {
               let that = this
               let param = {}
               if (type == "in") {
                  param = {
                     inEnable: this.enableIn ? "Y" : "N",
                     rgvNo: this.formParam.rgvNo
                  }
               } else {
                  param = {
                     outEnable: this.enableOut ? "Y" : "N",
                     rgvNo: this.formParam.rgvNo
                  }
               }
               $.ajax({
                  url: baseUrl + "/basCrnp/update/auth",
                  headers: {
                     'token': localStorage.getItem('token')
                  },
                  data: param,
                  method: 'POST',
                  success: function (res) {
                     if (res.code == 200) {
                        that.$message({
                           message: res.msg,
                           type: 'success'
                        });
                     } else {
                        that.$message({
                           message: res.msg,
                           type: 'error'
                        });
                     }
                  }
               });
            }