|
@@ -115,6 +115,15 @@
|
|
|
<el-button type="primary" size="small" @click="exportFn"
|
|
|
>导出</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>
|
|
|
<!-- 列表 -->
|
|
@@ -222,7 +231,7 @@
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="currentPage"
|
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
|
- :page-size="10"
|
|
|
+ :page-size="pageSize"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="listTotal"
|
|
|
>
|
|
@@ -239,7 +248,7 @@ import {
|
|
|
getDepositManageList,
|
|
|
getDepositManagExport,
|
|
|
} from "@/api/engin_deposit/refund_list";
|
|
|
-import { downloadFiles } from "@/utils/util";
|
|
|
+import { downloadFiles, handleImport } from "@/utils/util";
|
|
|
import RefundListDetail from "./components/refund_list-detail.vue";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -247,6 +256,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ importFileList: [],
|
|
|
enginOrderType: "HOME", //列表类型
|
|
|
currentPage: 1, // 当前页码
|
|
|
pageSize: 10, // 每页数量
|
|
@@ -284,6 +294,38 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 导入
|
|
|
+ async handleImport(param) {
|
|
|
+ const file = param.file;
|
|
|
+
|
|
|
+ const formData = new FormData();
|
|
|
+ formData.append("file", file);
|
|
|
+
|
|
|
+ let result = await handleImport("/deposit-manage/import", formData);
|
|
|
+
|
|
|
+ console.log(result);
|
|
|
+ this.importFileList = [];
|
|
|
+ if (result.code == 200) {
|
|
|
+ this.$message.success("导入成功");
|
|
|
+ this.getDataList({
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ pageNum: this.currentPage,
|
|
|
+ confirmName: "",
|
|
|
+ createName: "",
|
|
|
+ customerKeyword: "",
|
|
|
+ // endDeliverTime: "",
|
|
|
+ enginOrderNo: "",
|
|
|
+ enginOrderType: this.enginOrderType,
|
|
|
+ examineStatus: "",
|
|
|
+ refEnginRecordNo: "",
|
|
|
+ refProjectName: "",
|
|
|
+ refUseUnit: "",
|
|
|
+ // startDeliverTime: "",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error(result.message);
|
|
|
+ }
|
|
|
+ },
|
|
|
//审批后更新列表数据
|
|
|
updateList() {
|
|
|
this.getDataList({
|
|
@@ -305,6 +347,9 @@ export default {
|
|
|
//切换列表
|
|
|
changeEnginOrderTypeFn(v) {
|
|
|
// console.log(v);
|
|
|
+ this.pageSize = 10;
|
|
|
+ this.currentPage = 1;
|
|
|
+
|
|
|
this.getDataList({
|
|
|
pageSize: this.pageSize,
|
|
|
pageNum: this.currentPage,
|
|
@@ -435,4 +480,8 @@ export default {
|
|
|
.dateStyle {
|
|
|
width: 100%;
|
|
|
}
|
|
|
+.import-btn {
|
|
|
+ margin-left: 10px;
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
</style>
|