分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-04-16 e883d7e4bf057f7a2ed7cc001fe27083d82baa22
´úÂë¹ÜÀí/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js
@@ -41,14 +41,83 @@
        //示例:设置修改新建、编辑弹出框字段标签的长度
        // this.boxOptions.labelWidth = 150;
        this.pagination.order = "asc";
        this.columns.forEach(row=>{
          if(row.field=="stationCode"){
            row.sort=true;
          }
        })
        this.buttons.splice(1, 0, {
          name: "移库",
          icon: 'el-icon-document',
          type: 'danger',
          name: "取消禁用",
          icon: 'md-refresh',
          type: 'primary',
          onClick: function () {
              this.$refs.gridHeader.detialBox = true;
              let rows = this.$refs.table.getSelected();
              if (rows.length == 0) return this.$error("请选择要取消禁用的数据");
              this.$confirm('确认要取消禁用吗?', '警告', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
              }).then(() => {
                  let data = [];
                  let parm = {
                      "data": data,
                      "type": "1"
                  }
                  rows.forEach(t => data.push(t.id))
                  this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "取消禁用中...").then(x => {
                      if (x.status) {
                          this.$Message.success("取消禁用成功!");
                          this.refresh();
                      } else {
                          this.$Message.error(x.message);
                      }
                  })
              });
          }
      })
      this.buttons.splice(1, 0, {
          name: "禁用",
          icon: 'md-refresh',
          type: 'danger',
          onClick: function () {
              let rows = this.$refs.table.getSelected();
              if (rows.length == 0) return this.$error("请选择要禁用的数据");
              this.$confirm('确认要禁用吗?', '警告', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
              }).then(() => {
                  let data = [];
                  let parm = {
                      "data": data,
                      "type": "0"
                  }
                  rows.forEach(t => data.push(t.id))
                  this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "锁定中...").then(x => {
                      if (x.status) {
                          this.$Message.success("禁用成功!");
                          this.refresh();
                      } else {
                          this.$Message.error(x.message);
                      }
                  })
              });
          }
      })
      //   this.buttons.splice(1, 0, {
      //     name: "移库",
      //     icon: 'el-icon-document',
      //     type: 'danger',
      //     onClick: function () {
      //         this.$refs.gridHeader.detialBox = true;
      //     }
      // })
    },
    onInited() {
      //框架初始化配置后