分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-04-16 e883d7e4bf057f7a2ed7cc001fe27083d82baa22
´úÂë¹ÜÀí/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js
@@ -6,11 +6,11 @@
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import addTask from "@/views/dialog/addTask.vue"
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridHeader: addTask,
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
@@ -32,9 +32,92 @@
        //       this.$Message.success('点击了按钮');
        //     }
        //   });
        // this.buttons.forEach(x => {
        //   if(x.value=='Add'){
        //     x.name='移库'
        //     x.icon='el-icon-document'
        //   }
        // });
        //示例:设置修改新建、编辑弹出框字段标签的长度
        // 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: 'md-refresh',
          type: 'primary',
          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": "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() {
      //框架初始化配置后