dangsn
2023-08-02 54f35ae7866dac5c497372b68d03309c7eae9424
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -234,11 +234,14 @@
        hasDownload: true,
        hasUpload: true,
        height: 100
      }
      },
      result:''
    };
  },
  computed: {},
  created() {
   const index = this.$route.query.id.indexOf('@');
   this.result = this.$route.query.id.substring(0, index);
  },
  mounted() {
  },
@@ -386,7 +389,7 @@
            processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => {
              if (res.data.data.records && res.data.data.records.length!=0)  {
                this.userName = localStorage.getItem("username");
                this.parameter.template = this.userName + "-发布" + "[物品]";
                this.parameter.template = this.userName + '-发布['+this.result+'-' + this.selectRow[0].name + ']';
                this.parameter.type = 'PUBLIC';
                this.parameter.code=this.templateOid
                this.title = '流程审批'
@@ -397,12 +400,16 @@
                  cancelButtonText: '取消',
                  type: 'warning'
                }).then(() => {
                  this.userName = localStorage.getItem("username");
                  this.parameter.template = this.userName + "-发布" + "[物品]";
                  this.parameter.type = 'PUBLIC'
                  this.title = '流程审批'
                  this.visibleFlow = true;
                  this.onLoad()
                  const index = this.$route.query.id.indexOf('@');
                  const result = this.$route.query.id.substring(0, index);
                  console.log(this.$route.query)
                  const oid = this.selectRow.map(obj => obj.oid).join(",");
                  changeStatus({ oid: oid, btmname: result, lcStatus: 'Released' }).then(res => {
                    if(res.data.code == 200 ){
                      this.$message.success('发布成功')
                      this.onLoad()
                    }
                  });
                }).catch(() => {
                  this.$message({
                    type: 'info',
@@ -435,7 +442,7 @@
            processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => {
              if (res.data.records != [] && res.data.data.records.length!=0) {
                this.userName = localStorage.getItem("username");
                this.parameter.template = this.userName + "停用" + "[物品]";
                this.parameter.template = this.userName + '-停用['+this.result+'-' + this.selectRow[0].name + ']';
                this.parameter.type = 'DISABLE';
                this.parameter.code=this.templateOid
                this.title = '停用(冻结)编码数据'
@@ -488,7 +495,7 @@
              if (res.data.data.records && res.data.data.records.length!=0)  {
                this.parameter=res.data.data.records[0]
                this.userName = localStorage.getItem("username");
                this.parameter.template = this.userName + "启用" + "[物品]";
                this.parameter.template = this.userName + '-启用['+this.result+'-' + this.selectRow[0].name + ']';
                this.parameter.type = 'Released';
                this.parameter.code=this.templateOid
                this.title = '启用编码数据'
@@ -547,7 +554,7 @@
            processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => {
              if (res.data.records != [] && res.data.data.records.length!=0) {
                this.userName = localStorage.getItem("username");
                this.parameter.template = this.userName + "回收" + "[物品]";
                this.parameter.template = this.userName + '-回收['+this.result+'-' + this.selectRow[0].name + ']';
                this.parameter.type = 'TakeBack';
                this.parameter.code=this.templateOid
                this.title = '回收编码数据'
@@ -578,9 +585,11 @@
                }
              }
            });
          } else if (this.selectRow.length >=1 && !(disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0)  && showMessage) {
          } else if (showMessage && this.selectRow.length >1 && !(disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0)) {
            this.$message.warning('您选择的数据全部为【停用状态或发布状态】才可以发起流程');
            showMessage = false;
          }else if(showMessage){
            this.$message.warning('您选择的数据为【停用状态或发布状态】才可以发起流程')
          }
        });
      }