|
@@ -24,6 +24,9 @@
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-printer" size="small" type="primary" @click.stop="openReport()">报表打印
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelAdminProfiles = true">批量修改分管员
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="small" @click="handleExport" icon="el-icon-download">导出</el-button>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
<el-button type="text" icon="el-icon-view" size="small" @click.stop="editOpen(scope.row, 1)">查看
|
|
@@ -59,6 +62,20 @@
|
|
|
温馨提示 第一次导入时请先下载模板
|
|
|
</p>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="批量修改分管员" append-to-body :visible.sync="excelAdminProfiles" width="555px" :close-on-click-modal="false"
|
|
|
+ v-dialog-drag>
|
|
|
+ <avue-form :option="excelOptionAdminProfiles" v-model="excelAdminProfilesForm" table-loading="excelLoading"
|
|
|
+ :upload-before="uploadBeforeAdminProfiles" :upload-after="uploadAfterAdminProfiles">
|
|
|
+ <template slot="excelTemplate">
|
|
|
+ <el-button type="primary" @click="derivationAdminProfiles">
|
|
|
+ 点击下载<i class="el-icon-download el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
+ <p style="text-align: center;color: #dc0505">
|
|
|
+ 温馨提示 第一次导入时请先下载模板
|
|
|
+ </p>
|
|
|
+ </el-dialog>
|
|
|
</basic-container>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -132,8 +149,10 @@ export default {
|
|
|
pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
|
|
|
},
|
|
|
excelBox: false,
|
|
|
+ excelAdminProfiles: false,
|
|
|
excelLoading: false,
|
|
|
excelForm: {},
|
|
|
+ excelAdminProfilesForm: {},
|
|
|
excelOption: {
|
|
|
submitBtn: false,
|
|
|
emptyBtn: false,
|
|
@@ -158,6 +177,31 @@ export default {
|
|
|
action: "/api/blade-client/corpsdesc/import-desc?corpType=KH"
|
|
|
}
|
|
|
]
|
|
|
+ },
|
|
|
+ excelOptionAdminProfiles: {
|
|
|
+ submitBtn: false,
|
|
|
+ emptyBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "模板下载",
|
|
|
+ prop: "excelTemplate",
|
|
|
+ formslot: true,
|
|
|
+ span: 24
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "模板上传",
|
|
|
+ prop: "excelFile",
|
|
|
+ type: "upload",
|
|
|
+ drag: true,
|
|
|
+ loadText: "模板上传中,请稍等",
|
|
|
+ span: 24,
|
|
|
+ propsHttp: {
|
|
|
+ res: "data"
|
|
|
+ },
|
|
|
+ tip: "请上传 .xls,.xlsx 标准格式文件",
|
|
|
+ action: "/api/blade-client/corpsdesc/importCorp"
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -206,10 +250,20 @@ export default {
|
|
|
}=${getToken()}`
|
|
|
);
|
|
|
},
|
|
|
+ derivationAdminProfiles() {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-client/corpsdesc/exportAdminProfiles?${this.website.tokenHeader
|
|
|
+ }=${getToken()}`
|
|
|
+ );
|
|
|
+ },
|
|
|
uploadBefore(file, done, loading) {
|
|
|
done();
|
|
|
loading = true;
|
|
|
},
|
|
|
+ uploadBeforeAdminProfiles(file, done, loading) {
|
|
|
+ done();
|
|
|
+ loading = true;
|
|
|
+ },
|
|
|
uploadAfter(res, done, loading, column) {
|
|
|
this.excelBox = false;
|
|
|
this.$message.success("导入成功!");
|
|
@@ -217,6 +271,13 @@ export default {
|
|
|
loading = false;
|
|
|
done();
|
|
|
},
|
|
|
+ uploadAfterAdminProfiles(res, done, loading, column) {
|
|
|
+ this.excelAdminProfiles = false;
|
|
|
+ this.$message.success("导入成功!");
|
|
|
+ this.refreshChange();
|
|
|
+ loading = false;
|
|
|
+ done();
|
|
|
+ },
|
|
|
nodeClick(data) {
|
|
|
this.treeDeptId = data.id;
|
|
|
this.page.currentPage = 1;
|
|
@@ -404,6 +465,28 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
this.onLoad(this.page, this.search);
|
|
|
+ },
|
|
|
+ handleExport() {
|
|
|
+ let params = { ...this.search }
|
|
|
+ let queryParams = Object.assign({}, params, {
|
|
|
+ corpsTypeId: this.treeDeptId,
|
|
|
+ corpType: customerParameter.code
|
|
|
+ });
|
|
|
+ this.$confirm('是否导出客户资料?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-client/corpsdesc/export?${this.website.tokenHeader
|
|
|
+ }=${getToken()}&code=${queryParams.code}&cname=${queryParams.cname}&belongtoarea=${queryParams.belongtoarea}&belongtocompany=${queryParams.belongtocompany}&attn=${queryParams.attn}&goodtypes=${queryParams.goodtypes}&creditLevel=${queryParams.creditLevel}&adminProfiles=${queryParams.adminProfiles}&corpsTypeId=${queryParams.corpsTypeId}&corpType=KH`
|
|
|
+ );
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消' //
|
|
|
+ });
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|