From 42691d281c357269408158d0f02939d3357eca07 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 05 十二月 2023 11:25:55 +0800
Subject: [PATCH] 集团码导入
---
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 30 ++++++++++++++
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 4 +-
Source/UBCS-WEB/src/api/GetItem.js | 10 +++++
Source/UBCS-WEB/src/components/BatchImport/index.vue | 43 +++++++++++++--------
4 files changed, 68 insertions(+), 19 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/GetItem.js b/Source/UBCS-WEB/src/api/GetItem.js
index f8c50ce..a0cc5fa 100644
--- a/Source/UBCS-WEB/src/api/GetItem.js
+++ b/Source/UBCS-WEB/src/api/GetItem.js
@@ -126,3 +126,13 @@
}
})
}
+
+//闆嗗洟鐮佹ā鏉夸笅杞�
+export const exportGroupCodeExcel = (params) => {
+ return request({
+ url: '/api/ubcs-code/mdmEngineController/exportGroupCodeExcel',
+ method: 'get',
+ params,
+ responseType: 'blob'
+ })
+}
diff --git a/Source/UBCS-WEB/src/components/BatchImport/index.vue b/Source/UBCS-WEB/src/components/BatchImport/index.vue
index 9bd82c3..29cfe88 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/index.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -13,7 +13,7 @@
</li>
</ul>
<div
- v-show="currentTypeObj[type]['upParams'] === 'classifyAttr' && this.type !== 'bulkEdit'"
+ v-show="currentTypeObj[type]['upParams'] === 'classifyAttr' && this.type !== 'bulkEdit'&& this.type !== 'groupCode'"
class="radio_box"
>
<span>鍒嗙被鐨勮矾寰勪娇鐢ㄧ殑灞炴��:</span>
@@ -61,21 +61,23 @@
>
</el-upload>
<template #footer>
- <el-button
- v-if="type !== 'bulkEdit'"
- :loading="downloadLoading"
- size="small"
- type="primary"
- @click="downloadTemplateFun"
- >涓嬭浇瀵煎叆妯℃澘
- </el-button>
- <el-button v-if="type === 'bulkEdit'"
- :loading="downloadLoading"
- size="small"
- type="primary"
- @click="downloadTemplateFun"
- >涓嬭浇缂栬緫妯℃澘
- </el-button>
+ <div v-if="type !== 'groupCode'">
+ <el-button
+ v-if="type !== 'bulkEdit' "
+ :loading="downloadLoading"
+ size="small"
+ type="primary"
+ @click="downloadTemplateFun"
+ >涓嬭浇瀵煎叆妯℃澘
+ </el-button>
+ <el-button v-if="type === 'bulkEdit'"
+ :loading="downloadLoading"
+ size="small"
+ type="primary"
+ @click="downloadTemplateFun"
+ >涓嬭浇缂栬緫妯℃澘
+ </el-button>
+ </div>
<el-button size="small" @click="dialogVisible = false">鍏抽棴</el-button>
</template>
<ShowImportData
@@ -248,6 +250,15 @@
downloadTemplateFun: downloadBatchApplyCodeTemplate,
upParams: "classifyAttr",
},
+ groupCode: {
+ title: "闆嗗洟鐮佸鍏�",
+ tipList: [
+ "1.鏍囬甯︿簲瑙掓槦鐨勮〃绀哄叧閿睘鎬э紝甯︽槦鍙疯〃绀哄繀杈撻」",
+ "2.姣忔浠呰兘鏈�澶氬鍏�5000鏉℃暟鎹�(鍙�氳繃nacos杩涜閰嶇疆锛屾帹鑽�5000/娆″鍏�)锛屽鏋滃嚭閿欎細杩斿洖閿欒鐨勬暟鎹拰鍘熷洜锛屼絾鏄纭暟鎹彲浠ョ户缁繚瀛�",
+ "3.Excel绗竴琛屽拰绗簩琛屼緷娆′负浼佷笟缂栫爜鍜岄泦鍥㈢紪鐮侊紙蹇呭~锛�"
+ ],
+ action: "/api/ubcs-code/mdmEngineController/importGroupCode"
+ }
},
secDTOList: [],
};
diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
index 213d37f..e3e913a 100644
--- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -187,7 +187,8 @@
upSaveCode,
applyGroupCode,
receiveEditApply,
- applySaveCode
+ applySaveCode,
+ exportGroupCodeExcel
} from "@/api/GetItem";
import {processTS, changeStatus} from "@/api/template/setPersonnel"
import {listCodeAttributeByClassId} from "@/api/integration/integration.js";
@@ -553,8 +554,35 @@
if (uniqueFlag === 'CODEAMEND') return this.codeAMENDHandler()
//鎵归噺缂栬緫
if (uniqueFlag === 'bulkEdit') return this.bulkEditHandler("bulkEdit")
+ //闆嗗洟鐮佸鍑�
+ if (uniqueFlag === 'excelGroupCode') return this.excelGroupCode()
+ //闆嗗洟鐮佸鍏�
+ if (uniqueFlag === 'importGroupCode') return this.importGroupCode("groupCode")
});
},
+ importGroupCode(type){
+ this.batchImportData.visible = true
+ this.batchImportData.type = type
+ this.batchImportData.codeClassifyOid = this.codeClassifyOid
+ },
+ //闆嗗洟鐮佸鍑�
+ excelGroupCode(){
+ debugger
+ this.isLoading = true;
+ exportGroupCodeExcel({
+ codeClassifyOid: this.codeClassifyOid,
+ }).then(res => {
+ console.log(res.data)
+ if (res) {
+ func.downloadFileByBlobHandler(res);
+ this.$message.success('涓嬭浇鎴愬姛锛岃鏌ョ湅锛�');
+ this.isLoading = false;
+ }
+ }).catch(error=>{
+ this.$message.error(error);
+ this.isLoading = false;
+ })
+ },
//鏍囧噯鐢宠
codeApplyHandler() {
this.$nextTick(() => {
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index 306e91f..72f90ae 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -40,12 +40,12 @@
</div>
</div>
<!-- 宸︿晶鏍�-->
- <div style="height: calc(100vh - 230px);overflow: auto">
+ <div style="height: calc(100vh - 230px);overflow: auto;">
<avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata"
:defaultExpandAll="false"
:option="Treeoption"
class="classifyTree"
- style="height: calc(100vh - 280px)"
+ style="height: calc(100vh - 280px);"
@node-click="nodeClick"
>
</avue-tree>
--
Gitblit v1.9.3