ludc
2023-08-24 56c45e1f4be85d6bbfb3a03437021c6742b32ad9
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -116,7 +116,7 @@
  </basic-container>
</template>
<script>
import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode, upSaveCode} from "@/api/GetItem";
import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode, upSaveCode,applyGroupCode,receiveEditApply} from "@/api/GetItem";
import {processTS, changeStatus} from "@/api/template/setPersonnel"
import {listCodeAttributeByClassId} from "@/api/integration/integration.js";
import integrationTransfer from "@/views/integration/integrationTransfer";
@@ -412,10 +412,48 @@
        if (uniqueFlag === 'CODERECYCLE') return this.Recovery()
        //删除
        if (uniqueFlag === 'CODEDELETE') return this.enumDeleteRow()
        //申请集团码数据
        if (uniqueFlag === 'applyGroupCode') return this.applyGroupCode()
        //更新集团码数据
        if (uniqueFlag === 'receiveEditApply') return this.receiveEditApply()
        //  相似项查询
        //  if(uniqueFlag === 'CODEEDIT') return this.similarHandler()
      });
    },
    //申请集团码数据
    applyGroupCode(){
      if(this.selectRow.length <= 0){
        this.$message.warning('请选择一条数据模板!')
      }else {
        // const requestData = this.selectRow.forEach(item => {
        //   return { oids: item.oid, btmName: item.btmname };
        // });
        const oids = this.selectRow.map(item => item.oid).join(',');
        applyGroupCode({ oids, btmName: this.selectRow[0].btmname }).then(res=>{
          if(res.data.code==200){
            this.$message.success('申请成功')
          }
          this.onLoad()
        })
      }
    },
    //更新集团码数据
    receiveEditApply(){
      if(this.selectRow.length <= 0){
        this.$message.warning('请选择一条数据模板!')
      }else {
        // const requestData = this.selectRow.forEach(item => {
        //   return { oids: item.oid, btmName: item.btmname };
        // });
        const oids = this.selectRow.map(item => item.oid).join(',');
        receiveEditApply({ oids, btmName: this.selectRow[0].btmname }).then(res => {
          if(res.data.code==200){
            this.$message.success('更新成功')
            this.onLoad()
          }
        });
      }
    },
    openD() {
      this.getListCodeByClassId();
    },