|
@@ -72,7 +72,18 @@
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
<div class="fr">
|
|
<div class="fr">
|
|
- <el-button type="primary" size="small" @click="addFn">新增</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="downLoadFn"
|
|
|
|
+ >模板</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-upload
|
|
|
|
+ class="import-btn"
|
|
|
|
+ action=""
|
|
|
|
+ :http-request="handleImport"
|
|
|
|
+ :file-list="importFileList"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ >
|
|
|
|
+ <el-button type="primary" size="small">批量导入</el-button>
|
|
|
|
+ </el-upload>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -346,6 +357,7 @@ import {
|
|
} from "@/api/basic_data/dealer";
|
|
} from "@/api/basic_data/dealer";
|
|
// import { number } from "echarts";
|
|
// import { number } from "echarts";
|
|
import DealerDepositHistory from "./components/dealer_deposit_history";
|
|
import DealerDepositHistory from "./components/dealer_deposit_history";
|
|
|
|
+import { downloadFiles, handleImport } from "@/utils/util";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -353,6 +365,7 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ importFileList: [],
|
|
historyId: "",
|
|
historyId: "",
|
|
showHistory: true,
|
|
showHistory: true,
|
|
marks: {
|
|
marks: {
|
|
@@ -483,7 +496,27 @@ export default {
|
|
// this.$message.warning("已选定额押金,如需选择押金比例,请把定额押金归零");
|
|
// this.$message.warning("已选定额押金,如需选择押金比例,请把定额押金归零");
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
|
|
+ // 导入
|
|
|
|
+ async handleImport(param) {
|
|
|
|
+ const file = param.file;
|
|
|
|
+
|
|
|
|
+ const formData = new FormData();
|
|
|
|
+ formData.append("file", file);
|
|
|
|
|
|
|
|
+ let result = await handleImport("/customer/deposit/import", formData);
|
|
|
|
+
|
|
|
|
+ console.log(result);
|
|
|
|
+ this.importFileList = [];
|
|
|
|
+ if (result.code == 200) {
|
|
|
|
+ this.$message.success("导入成功");
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //下载模板
|
|
|
|
+ async downLoadFn() {
|
|
|
|
+ downloadFiles("/customer/deposit/downModel");
|
|
|
|
+ },
|
|
//记录
|
|
//记录
|
|
logFn(id) {
|
|
logFn(id) {
|
|
this.historyId = id;
|
|
this.historyId = id;
|
|
@@ -665,6 +698,10 @@ export default {
|
|
margin-right: 12px;
|
|
margin-right: 12px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.import-btn {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+}
|
|
// .main {
|
|
// .main {
|
|
// padding: 12px;
|
|
// padding: 12px;
|
|
// }
|
|
// }
|