yuxc
2023-08-02 d13c3d44ca14ba07d92216bb92ff29ab504ae048
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -54,13 +54,13 @@
                              :type="edit"
                              :visible.sync="DataVisible"></FormTemplateDialog>
          <!--          发布-->
          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow"></set-personnel>
          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow" @onLoad="onLoad"></set-personnel>
          <!--          停用-->
          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleDeactivate"></set-personnel>
          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleDeactivate" @onLoad="onLoad"></set-personnel>
          <!--          启用-->
          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleEnable"></set-personnel>
          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleEnable" @onLoad="onLoad"></set-personnel>
          <!--          回收-->
          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleRecovery"></set-personnel>
          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleRecovery" @onLoad="onLoad"></set-personnel>
          <!--          高级查询-->
          <advanced-query :options="this.options" :visible.sync="findvisible"
                          @echoContion="echoContion"></advanced-query>
@@ -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,24 +389,27 @@
            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 = '流程审批'
                this.visibleFlow = true;
                this.onLoad()
              } else {
                this.$confirm('当前分类没有添加流程模板,是否不用流程审批直接执行?', '提示', {
                  confirmButtonText: '确定',
                  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',
@@ -436,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 = '停用(冻结)编码数据'
@@ -489,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 = '启用编码数据'
@@ -548,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 = '回收编码数据'
@@ -579,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('您选择的数据为【停用状态或发布状态】才可以发起流程')
          }
        });
      }