Przeglądaj źródła

Merge tag 'Hotfix-21' into develop

Finish Hotfix-21
chen 3 lat temu
rodzic
commit
0c46a88cf4

+ 51 - 2
src/views/engin_deposit/refund_list.vue

@@ -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>

+ 1 - 1
src/views/finance/change_list.vue

@@ -316,7 +316,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"
           >

+ 1 - 1
src/views/finance/rebate_list.vue

@@ -541,7 +541,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"
           >

+ 1 - 1
src/views/finance/receivable_list.vue

@@ -261,7 +261,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"
           >

+ 19 - 6
src/views/finance/standbook_list.vue

@@ -295,19 +295,19 @@
             ></el-table-column>
           </el-table>
         </div>
-        <!-- 分页 -->
+        <!-- 分页
         <div class="fr">
           <el-pagination
             @size-change="handleSizeChange"
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
+            :page-sizes="[10, 20, 30, 50, 500]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
             :total="listTotal"
           >
           </el-pagination>
-        </div>
+        </div> -->
       </div>
     </div>
     <div v-show="bill == 'REBATE'">
@@ -445,20 +445,33 @@
           </el-table>
         </div>
         <!-- 分页 -->
-        <div class="fr">
+        <!-- <div class="fr">
           <el-pagination
             @size-change="handleSizeChange"
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
+            :page-sizes="[10, 20, 30, 50, 500]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
             :total="listTotal"
           >
           </el-pagination>
-        </div>
+        </div> -->
       </div>
     </div>
+    <!-- 分页 -->
+    <div class="fr">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[10, 20, 30, 50, 500]"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="listTotal"
+      >
+      </el-pagination>
+    </div>
   </div>
 </template>