Przeglądaj źródła

经销商余额汇总查询更改,弹窗返利确认调整

chen 3 lat temu
rodzic
commit
fc493de8cb

+ 4 - 1
src/views/dashboard/index.vue

@@ -180,7 +180,7 @@
                 type="text"
                 class="textColor"
                 @click="secondFn(scope.row.rebateOrderId)"
-                >复核</el-button
+                >{{ isCustomer ? "确认" : "复核" }}</el-button
               >
             </template>
           </el-table-column>
@@ -315,6 +315,7 @@ export default {
       inDialog: false,
       detailData: [],
       rebateList: [],
+      isCustomer: JSON.parse(localStorage.getItem("supply_user")).isCustomer,
     };
   },
 
@@ -333,6 +334,8 @@ export default {
           id,
         },
       });
+
+      this.$store.commit("user/showMessage", "no");
     },
     // 确认查收
     confirmCheck(id) {

+ 45 - 14
src/views/finance/balance_sum.vue

@@ -11,24 +11,34 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="经销商名称" prop="">
-              <el-input
-                v-model="searchForm.customerName"
-                placeholder="请输入经销商名称"
-              ></el-input>
+            <el-form-item label="经销商名称" prop="customerNumber">
+              <el-select
+                v-model="searchForm.customerNumber"
+                class="selectStyle"
+                placeholder="请选择"
+                filterable
+              >
+                <el-option
+                  v-for="(v, i) in customerList"
+                  :key="i"
+                  :label="v.name"
+                  :value="v.number"
+                >
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
+          <!-- <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="经销商编码" prop="">
               <el-input
                 v-model="searchForm.customerNumber"
                 placeholder="请输入"
               ></el-input>
             </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="24" :lg="12">
+          </el-col> -->
+          <el-col :xs="24" :sm="24" :lg="18">
             <el-form-item label="" class="fr">
-              <el-button size="small">清空</el-button>
+              <el-button size="small" @click="clearFn">清空</el-button>
               <el-button size="small" type="primary" @click="searchFn"
                 >搜索</el-button
               >
@@ -102,7 +112,9 @@
               <el-button
                 type="text"
                 class="textColor"
-                @click="seeFN(row.customerName, row.customerNumber,row.customerId)"
+                @click="
+                  seeFN(row.customerName, row.customerNumber, row.customerId)
+                "
               >
                 明细
               </el-button>
@@ -126,6 +138,7 @@
 </template>
 
 <script>
+import { getCustomerList } from "@/api/finance/account_list";
 import { getFinanceTotalCustomer } from "@/api/finance/blance_sum";
 export default {
   data() {
@@ -135,16 +148,30 @@ export default {
       // listTotal: 0, // 列表总数
       dataList: [], // 列表数据
       searchForm: {
-        customerName: "",
+        // customerName: "",
         customerNumber: "",
       }, //搜索表单
+      customerList: [],
       listLoading: false, // 列表加载loading
     };
   },
   created() {
     this.getDataList();
+    this.getCustomerDataList({
+      pageSize: -1,
+      pageNum: 1,
+    });
   },
   methods: {
+    //获取经销商数据
+    async getCustomerDataList(data) {
+      const res = await getCustomerList(data);
+      this.customerList = res.data.records;
+    },
+    //清除
+    clearFn() {
+      this.$refs.searchForm.resetFields();
+    },
     //搜索
     searchFn() {
       this.getDataList(this.searchForm);
@@ -165,13 +192,13 @@ export default {
       });
     },
     //明细
-    seeFN(customerName, customerNumber,customerId) {
+    seeFN(customerName, customerNumber, customerId) {
       this.$router.push({
         path: "/finance/details/standbook_list",
         query: {
           customerName,
           customerNumber,
-          customerId
+          customerId,
         },
       });
     },
@@ -179,4 +206,8 @@ export default {
 };
 </script>
 
-<style></style>
+<style lang="scss" scoped>
+.selectStyle {
+  width: 100%;
+}
+</style>

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

@@ -564,6 +564,7 @@ import RebateListConfirm from "./components/rebate_list-confirm";
 import RebateListEdit from "./components/rebate_list-edit.vue";
 
 export default {
+  name: "rebate_list",
   components: {
     RebateListDetail,
     RebateListApply,
@@ -611,7 +612,11 @@ export default {
 
     this.isCustomer = res.isCustomer;
     if (this.$route.query.id) {
-      this.examineFn(this.$route.query.id);
+      if (this.isCustomer) {
+        this.confirmFn(this.$route.query.id, false);
+      } else {
+        this.examineFn(this.$route.query.id);
+      }
     }
   },
   methods: {