1
yangpeixing
2025-12-04 63e1ee997a5318e628b992f969bdac2fec6dbf14
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx
@@ -24,23 +24,48 @@
    //下面这些方法可以保留也可以删除
    onInit() {
      this.columns.forEach(x => {
        if (x.field == "errorMessage") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            if (row.errorMessage == null||row.errorMessage=="") {
              return { background: "White", color: "Black" }
            }
            else{
              return { background: "#FF4500", color: "Black" }
            }
          }
      // this.columns.forEach(x => {
      //   if (x.field == "errorMessage") {
      //     x.cellStyle = (row, rowIndex, columnIndex) => {
      //       if (row.errorMessage == null||row.errorMessage=="") {
      //         return { background: "White", color: "Black" }
      //       }
      //       else{
      //         return { background: "#FF4500", color: "Black" }
      //       }
      //     }
      //   }
      // })
      var DoubleTrayBtn = this.buttons.find(x => x.value == "InitializationElevator");
      if (DoubleTrayBtn != null) {
        DoubleTrayBtn.onClick = () => {
          this.$confirm('确定要初始化提升机吗?', '操作确认', {
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning' // è­¦å‘Šç±»åž‹ï¼Œæ˜¾ç¤ºé»„色图标
          }).then(() => {
            this.http.post(`/api/Task/elevator`).then((x) => {
              console.log(x)
              console.log(x.status)
              if (x.status) {
                this.$Message.success('成功.');
                this.refresh();
              } else {
                return this.$error(x.message);
              }
            });
          }).catch(() => {
            // ç”¨æˆ·ç‚¹å‡»"取消"后执行的逻辑(通常是提示取消操作)
            this.$message.info('已取消操作');
          })
        }
      })
      }
      //框架初始化配置前,
      let TaskHandCompleteBtn=this.buttons.find(x=>x.value=='TaskHandComplete');
      if(TaskHandCompleteBtn){
        TaskHandCompleteBtn.onClick=function(){
      let TaskHandCompleteBtn = this.buttons.find(x => x.value == 'TaskHandComplete');
      if (TaskHandCompleteBtn) {
        TaskHandCompleteBtn.onClick = function () {
          let row = this.$refs.table.getSelected() //获取选中的行
          if (row <= 0) {
            //如果没有选中行