chen пре 3 година
родитељ
комит
460d4a7fa3

+ 11 - 11
src/views/finance/rebate_form.vue

@@ -304,9 +304,9 @@
     <div class="btn-group clearfix">
       <div class="fl">
         <el-button type="primary" size="small" @click="addFn">保存</el-button>
-        <el-button type="primary" size="small" @click="submitFn"
+        <!-- <el-button type="primary" size="small" @click="submitFn"
           >提交审批</el-button
-        >
+        > -->
         <el-button type="primary" size="small" @click="cancelFn"
           >重置</el-button
         >
@@ -411,15 +411,15 @@ export default {
     delRowFn() {
       this.dataList.splice(this.delIndex, 1);
     },
-    //提交审批
-    async submitFn() {
-      let res = await getRebateOrderList({ pageSize: -1, pageNum: 1 });
-      console.log(res);
-      let index = res.data.records.length - 1;
-      let arr = res.data.records;
-      await getRebateOrderApply({ id: arr[index].rebateOrderId });
-      this.$message.success("提交审批成功");
-    },
+    // //提交审批
+    // async submitFn() {
+    //   let res = await getRebateOrderList({ pageSize: -1, pageNum: 1 });
+    //   console.log(res);
+    //   let index = res.data.records.length - 1;
+    //   let arr = res.data.records;
+    //   await getRebateOrderApply({ id: arr[index].rebateOrderId });
+    //   this.$message.success("提交审批成功");
+    // },
     //新增
     async addFn() {
       let arr;

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

@@ -404,7 +404,11 @@
                 <el-button
                   type="text"
                   class="textColor"
-                  v-if="!isCustomer && $checkBtnRole('edit', $route.meta.roles)"
+                  v-if="
+                    !isCustomer &&
+                    $checkBtnRole('edit', $route.meta.roles) &&
+                    scope.row.examineStatus != 'FAIL_ONE'
+                  "
                   @click="editFn(scope.row.rebateOrderId)"
                   >编辑</el-button
                 >

+ 14 - 0
src/views/finance/receipt_list.vue

@@ -259,6 +259,8 @@
         <!-- 分页 -->
         <div class="fr">
           <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
@@ -304,6 +306,17 @@ export default {
     this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
   },
   methods: {
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: this.currentPage, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: this.currentPage, pageSize: this.pageSize });
+    },
     //清空
     cancelFn() {
       this.$refs.searchForm.resetFields();
@@ -320,6 +333,7 @@ export default {
       const res = await getK3ReceiptList(data);
       console.log(res);
       this.dataList = res.data.records;
+      this.listTotal = res.data.total;
     },
     seeFn(id) {
       this.detailId = id;

+ 36 - 12
src/views/finance/standbook_list.vue

@@ -27,7 +27,7 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="经销商名称" prop="customerId">
+            <el-form-item label="经销商名称" prop="">
               <el-select
                 class="selectStyle"
                 v-model="searchForm.customerId"
@@ -364,8 +364,8 @@
             ></el-table-column>
             <el-table-column
               align="center"
-              label="返利类"
-              prop="mainName"
+              label="返利类"
+              prop="walletName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -404,11 +404,19 @@
               prop=""
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{
+                  scope.row.amountType == "OUT"
+                    ? scope.row.amount
+                    : -scope.row.amount
+                }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="结存"
-              prop=""
+              prop="balanceAmount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -440,6 +448,7 @@ import {
   getDictList,
   getCustomerList,
 } from "@/api/finance/standbook_list";
+import { number } from "echarts";
 export default {
   data() {
     return {
@@ -452,7 +461,8 @@ export default {
       dataList: [],
       selectList: [],
       dictList: [],
-
+      customerName: null,
+      customerNumber: null,
       searchForm: {
         customerId: "",
         startTime: "",
@@ -520,6 +530,8 @@ export default {
           pageSize: this.pageSize,
           pageNum: this.currentPage,
           type: this.bill,
+          customerName: this.customerName,
+          customerNumber: this.customerNumber,
         });
       }
     },
@@ -544,6 +556,8 @@ export default {
           pageSize: this.pageSize,
           pageNum: this.currentPage,
           type: this.bill,
+          customerName: this.customerName,
+          customerNumber: this.customerNumber,
         });
       }
     },
@@ -556,15 +570,22 @@ export default {
     //重置
     resetFn() {
       this.mainId = "";
+      this.searchForm.customerId = "";
       this.$refs.searchForm.resetFields();
     },
     //查询
     searchFn() {
+      this.customerName = null;
+      this.customerNumber = null;
       let res = this.customerList.filter((v) => {
         return v.id == this.searchForm.customerId;
       });
-      // console.log(res);
+      console.log(res);
       // return;
+      if (res.length > 0) {
+        this.customerName = res[0].name;
+        this.customerNumber = res[0].number;
+      }
 
       if (this.$route.query.customerName && this.$route.query.customerNumber) {
         this.getDataList({
@@ -579,8 +600,8 @@ export default {
       } else {
         this.getDataList({
           ...this.searchForm,
-          customerName: res[0].name,
-          customerNumber: res[0].number,
+          customerName: this.customerName,
+          customerNumber: this.customerNumber,
           mainId: this.mainId,
           pageSize: this.pageSize,
           pageNum: this.currentPage,
@@ -599,12 +620,13 @@ export default {
     },
     //切换列表
     checkFn(v) {
-      this.resetFn();
       // this.getDataList({
       //   pageSize: 10,
       //   pageNum: 1,
       //   type: v,
       // });
+      this.pageSize = 10;
+      this.currentPage = 1;
       if (this.$route.query.customerName && this.$route.query.customerNumber) {
         this.getDataList({
           ...this.searchForm,
@@ -619,8 +641,10 @@ export default {
         this.getDataList({
           ...this.searchForm,
           mainId: this.mainId,
-          pageSize: 10,
-          pageNum: 1,
+          customerName: this.customerName,
+          customerNumber: this.customerNumber,
+          pageSize: this.pageSize,
+          pageNum: this.currentPage,
           type: v,
         });
       }

+ 15 - 11
src/views/finance/wallet.vue

@@ -5,7 +5,7 @@
     </div>
     <br />
     <!-- 筛选条件 -->
-    <div>
+    <div v-if="!isShow">
       <el-form
         ref="searchForm"
         :model="searchForm"
@@ -234,6 +234,7 @@ import { getWalletCustomerList } from "@/api/finance/change_apply";
 export default {
   data() {
     return {
+      isShow: JSON.parse(localStorage.getItem("supply_user")).isCustomer,
       searchForm: {
         customerId: null,
       },
@@ -277,16 +278,19 @@ export default {
         type: "REBATE",
       });
     } else {
-      this.$message("请选择经销商");
-      this.getCustomerDataList();
-      // this.getDataWallet({
-      //   customerId: this.customerId,
-      //   type: "COMMONLY",
-      // });
-      // this.getDataRebate({
-      //   customerId: this.customerId,
-      //   type: "REBATE",
-      // });
+      if (this.isShow) {
+        this.getDataWallet({
+          customerId: this.customerId,
+          type: "COMMONLY",
+        });
+        this.getDataRebate({
+          customerId: this.customerId,
+          type: "REBATE",
+        });
+      } else {
+        this.$message("请选择经销商");
+        this.getCustomerDataList();
+      }
     }
   },
   computed: {