|
@@ -37,6 +37,20 @@
|
|
>
|
|
>
|
|
<template slot="menuLeft">
|
|
<template slot="menuLeft">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
+ @click="commodityImport()"
|
|
|
|
+ >导入
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ type="success"
|
|
|
|
+ icon="el-icon-upload2"
|
|
|
|
+ size="small"
|
|
|
|
+ @click="derivation()"
|
|
|
|
+ >下载模板
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
icon="el-icon-printer"
|
|
icon="el-icon-printer"
|
|
size="small"
|
|
size="small"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -72,6 +86,12 @@
|
|
:switchDialog="switchDialog"
|
|
:switchDialog="switchDialog"
|
|
@onClose="onClose()"
|
|
@onClose="onClose()"
|
|
></report-dialog>
|
|
></report-dialog>
|
|
|
|
+ <el-dialog title="导入商品"
|
|
|
|
+ append-to-body
|
|
|
|
+ :visible.sync="excelBox"
|
|
|
|
+ width="555px">
|
|
|
|
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"/>
|
|
|
|
+ </el-dialog>
|
|
</basic-container>
|
|
</basic-container>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -86,6 +106,7 @@ import {
|
|
deleteDetails,
|
|
deleteDetails,
|
|
getDeptLazyTree
|
|
getDeptLazyTree
|
|
} from "@/api/basicData/customerInformation";
|
|
} from "@/api/basicData/customerInformation";
|
|
|
|
+import {getToken} from '@/util/auth';
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
export default {
|
|
export default {
|
|
name: "customerInformation",
|
|
name: "customerInformation",
|
|
@@ -128,6 +149,27 @@ export default {
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
pagerCount: 5,
|
|
pagerCount: 5,
|
|
total: 0
|
|
total: 0
|
|
|
|
+ },
|
|
|
|
+ excelBox: false,
|
|
|
|
+ excelForm: {},
|
|
|
|
+ excelOption: {
|
|
|
|
+ submitBtn: false,
|
|
|
|
+ emptyBtn: false,
|
|
|
|
+ column: [
|
|
|
|
+ {
|
|
|
|
+ label: '模板上传',
|
|
|
|
+ prop: 'excelFile',
|
|
|
|
+ type: 'upload',
|
|
|
|
+ drag: true,
|
|
|
|
+ loadText: '模板上传中,请稍等',
|
|
|
|
+ span: 24,
|
|
|
|
+ propsHttp: {
|
|
|
|
+ res: 'data',
|
|
|
|
+ },
|
|
|
|
+ tip: '请上传 .xls,.xlsx 标准格式文件',
|
|
|
|
+ action: "",
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -139,6 +181,30 @@ export default {
|
|
// this.onLoad()
|
|
// this.onLoad()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ commodityImport(){
|
|
|
|
+ if(this.treeDeptId === ''){
|
|
|
|
+ this.$message.warning("请选择客户类型")
|
|
|
|
+ }else{
|
|
|
|
+ this.excelBox = !this.excelBox
|
|
|
|
+ const column = this.findObject(this.excelOption.column, "excelFile");
|
|
|
|
+ column.action = "/api/blade-client/corpsdesc/import-desc?typeId="+this.treeDeptId+"";
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ derivation() {
|
|
|
|
+ this.$confirm("是否下载模板?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(() => {
|
|
|
|
+ window.open(`/api/blade-client/corpsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ uploadAfter(res, done, loading, column) {
|
|
|
|
+ window.console.log(column);
|
|
|
|
+ this.excelBox = false;
|
|
|
|
+ this.refreshChange();
|
|
|
|
+ done();
|
|
|
|
+ },
|
|
nodeClick(data) {
|
|
nodeClick(data) {
|
|
this.treeDeptId = data.id;
|
|
this.treeDeptId = data.id;
|
|
this.page.currentPage = 1;
|
|
this.page.currentPage = 1;
|
|
@@ -253,7 +319,7 @@ export default {
|
|
console.log("1");
|
|
console.log("1");
|
|
},
|
|
},
|
|
refreshChange() {
|
|
refreshChange() {
|
|
- console.log("1");
|
|
|
|
|
|
+ this.onLoad(this.page);
|
|
},
|
|
},
|
|
onLoad(page, params = { parentId: 0 }) {
|
|
onLoad(page, params = { parentId: 0 }) {
|
|
let queryParams = Object.assign({}, params, {
|
|
let queryParams = Object.assign({}, params, {
|
|
@@ -263,9 +329,7 @@ export default {
|
|
});
|
|
});
|
|
customerList(queryParams).then(res => {
|
|
customerList(queryParams).then(res => {
|
|
this.dataList = res.data.data.records;
|
|
this.dataList = res.data.data.records;
|
|
- console.log(res.data.data.total);
|
|
|
|
this.page.total = res.data.data.total;
|
|
this.page.total = res.data.data.total;
|
|
- console.log(this.page);
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//树桩列点击展开触发
|
|
//树桩列点击展开触发
|