|
@@ -599,7 +599,7 @@
|
|
v-if="openState == 'check'"
|
|
v-if="openState == 'check'"
|
|
>
|
|
>
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
- <el-col :span="6" :offset="21">
|
|
|
|
|
|
+ <el-col :span="6" :offset="20">
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
:size="size"
|
|
:size="size"
|
|
@@ -607,6 +607,12 @@
|
|
>
|
|
>
|
|
添加
|
|
添加
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <BatchImport
|
|
|
|
+ ref="batchImportDept"
|
|
|
|
+ @import="importDataBtnDept"
|
|
|
|
+ @temDownload="importTemplateBtnDept"
|
|
|
|
+ :fileSize="2"
|
|
|
|
+ ></BatchImport>
|
|
<el-button
|
|
<el-button
|
|
:size="size"
|
|
:size="size"
|
|
type="danger"
|
|
type="danger"
|
|
@@ -714,7 +720,7 @@ import {
|
|
// 客户负责人接口
|
|
// 客户负责人接口
|
|
import { delCustomersResponsiblePerson } from "@/api/business/spd/cm/customersResponsiblePerson";
|
|
import { delCustomersResponsiblePerson } from "@/api/business/spd/cm/customersResponsiblePerson";
|
|
// 客户科室接口
|
|
// 客户科室接口
|
|
-import { delCustomersDepartment } from "@/api/business/spd/cm/customersDepartment";
|
|
|
|
|
|
+import { delCustomersDepartment,importDataDept } from "@/api/business/spd/cm/customersDepartment";
|
|
import useColumns from "./columns";
|
|
import useColumns from "./columns";
|
|
import { dicts } from "../dicts";
|
|
import { dicts } from "../dicts";
|
|
export default {
|
|
export default {
|
|
@@ -733,6 +739,7 @@ export default {
|
|
import("@/views/business/spd/cm/customersDepartment/index.vue"),
|
|
import("@/views/business/spd/cm/customersDepartment/index.vue"),
|
|
ElSuperSearch: () => import("@/components/super-search/index.vue"),
|
|
ElSuperSearch: () => import("@/components/super-search/index.vue"),
|
|
ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
|
|
ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
|
|
|
|
+ BatchImport: () => import("@/components/BatchImport/index.vue"),
|
|
},
|
|
},
|
|
dicts: [...dicts],
|
|
dicts: [...dicts],
|
|
data() {
|
|
data() {
|
|
@@ -1291,6 +1298,30 @@ export default {
|
|
return this.$modal.msgError("资质信息中存在必填项未填!");
|
|
return this.$modal.msgError("资质信息中存在必填项未填!");
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ //导入模板-科室
|
|
|
|
+ importTemplateBtnDept(){
|
|
|
|
+ this.download('/cm/customersDepartment/importTemplate', {
|
|
|
|
+ }, `客户科室导入模板_${new Date().getTime()}.xlsx`)
|
|
|
|
+ },
|
|
|
|
+ //上传文件-科室
|
|
|
|
+ async importDataBtnDept(file) {
|
|
|
|
+ try {
|
|
|
|
+ this.$modal.loading("加载中......");
|
|
|
|
+ let formData = new FormData();
|
|
|
|
+ formData.append("file", file[0].raw);
|
|
|
|
+ let { code, msg } = await importDataDept(formData);
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ this.$notify.success({ message: msg });
|
|
|
|
+ let { setVisible } = this.$refs.batchImportDept;
|
|
|
|
+ setVisible(false);
|
|
|
|
+ this.resetList();
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ } finally {
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|