1
huanghongfeng
2024-11-26 87d873ad509b4c927ac19aebaa3622fe9374626b
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js
@@ -1,6 +1,6 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
//import gridBody from './extend/GetLocationStatus.vue'
let extension = {
  components: {
    //查询界面扩展组件
@@ -20,11 +20,11 @@
      let EnableBtn = this.buttons.find(x => x.value == 'Enable');
      if (EnableBtn) {
        EnableBtn.onClick = function () {
          if (this.selection.length === 0) {
          let rows = this.$refs.table.getSelected();
          if (rows.length === 0) {
            return this.$message.error("请选择至少一条数据");
          }
          var keys = this.selection.map((item) => item.id); // èŽ·å–é€‰ä¸­è¡Œçš„id
          var keys = rows.map(x=>{return x.id}); // èŽ·å–é€‰ä¸­è¡Œçš„id
          this.http
            .post("api/LocationInfo/LocationEnableStatus", keys, "数据处理中")
            .then((x) => {
@@ -36,10 +36,11 @@
      let DisableBtn = this.buttons.find(x => x.value == 'Disable');
      if (DisableBtn) {
        DisableBtn.onClick = function () {
          if (this.selection.length === 0) {
          let rows = this.$refs.table.getSelected();
          if (rows.length === 0) {
            return this.$message.error("请选择至少一条数据");
          }
          var keys = this.selection.map((item) => item.id); // èŽ·å–é€‰ä¸­è¡Œçš„id
          var keys = rows.map(x=>{return x.id});
          this.http
            .post("api/LocationInfo/LocationDisableStatus", keys, "数据处理中")
            .then((x) => {
@@ -49,21 +50,24 @@
        }
      }
      this.columns.push({
        field: '操作',
        title: '操作',
        width: 90,
        fixed: 'right',
        align: 'center',
        formatter: (row) => {
          return (
            '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">查看明细</i>'
          );
        },
        click: (row) => {
          this.$refs.gridBody.open(row);
        }
      });
      // this.columns.push({
      //   field: '操作',
      //   title: '操作',
      //   width: 90,
      //   fixed: 'right',
      //   align: 'center',
      //   formatter: (row) => {
      //     return (
      //       '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">查看明细</i>'
      //     );
      //   },
      //   click: (row) => {
      //     var ids = row.map(x => {
      //       return  x.locationCode
      //     })
      //     this.$refs.gridBody.open(ids);
      //   }
      // });
    },
    onInited() {
      //框架初始化配置后