Преглед изворни кода

返利互转增加已驳回状态,销售返利单增加搜索条件

chen пре 2 година
родитељ
комит
83379d883a
2 измењених фајлова са 32 додато и 43 уклоњено
  1. 1 0
      src/views/finance/change_list.vue
  2. 31 43
      src/views/finance/rebate_list.vue

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

@@ -5,6 +5,7 @@
         <el-radio-button label="">全部</el-radio-button>
         <el-radio-button label="WAIT">待审核</el-radio-button>
         <el-radio-button label="OK_ONE">审核通过</el-radio-button>
+        <el-radio-button label="REJECT">已驳回</el-radio-button>
         <!-- <el-radio-button label="FAIL_ONE">审核驳回</el-radio-button> -->
         <!-- <el-radio-button label="复核通过"></el-radio-button>
         <el-radio-button label="待复核"></el-radio-button>

+ 31 - 43
src/views/finance/rebate_list.vue

@@ -33,6 +33,11 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="返利单号" prop="id">
+                <el-input v-model="searchForm.id" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="开始时间" prop="startTime">
                 <el-date-picker class="selectStyle" v-model="searchForm.startTime" placeholder="选择日期" type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
                 </el-date-picker>
@@ -53,7 +58,7 @@
                 </el-radio-group>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="12" :lg="12">
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="" class="fr">
                 <el-button size="mini" @click="cancelFn">清空</el-button>
                 <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
@@ -275,6 +280,7 @@ export default {
       listTotal: 0, // 列表总数
       dataList: [], // 列表数据
       searchForm: {
+        id: "",
         customerName: "",
         walletName: "",
         customerNumber: "",
@@ -301,10 +307,7 @@ export default {
     },
   },
   created() {
-    this.getDataList({
-      pageSize: this.pageSize,
-      pageNum: this.currentPage,
-    });
+    this.getDataList();
     const res = JSON.parse(localStorage.getItem("supply_user"));
 
     this.isCustomer = res.isCustomer;
@@ -329,11 +332,7 @@ export default {
       let res = this.deleList.toString();
       // console.log(res);
       await getRebateOrderBatchDel({ ids: res });
-      this.getDataList({
-        ...this.searchForm,
-        pageSize: this.pageSize,
-        pageNum: this.currentPage,
-      });
+      this.getDataList();
       this.$message.success("删除成功");
       this.deleList = [];
     },
@@ -349,11 +348,7 @@ export default {
     //切换radio获取数据
     changeRadioFn(v) {
       this.currentPage = 1;
-      this.getDataList({
-        ...this.searchForm,
-        pageSize: this.pageSize,
-        pageNum: this.currentPage,
-      });
+      this.getDataList();
     },
     //清除
     cancelFn() {
@@ -361,42 +356,39 @@ export default {
     },
     //搜索
     searchFn() {
-      this.getDataList({
-        ...this.searchForm,
-        pageSize: this.pageSize,
-        pageNum: this.currentPage,
-      });
+      this.currentPage = 1;
+      this.getDataList();
     },
     // 更改每页数量
     handleSizeChange(val) {
       this.pageSize = val;
-      this.currentPage = 1;
-      this.getDataList({
-        pageNum: 1,
-        pageSize: this.pageSize,
-        ...this.searchForm,
-      });
+      this.getDataList();
     },
     // 更改当前页
     handleCurrentChange(val) {
       this.currentPage = val;
-      this.getDataList({
-        pageNum: val,
-        pageSize: this.pageSize,
-        ...this.searchForm,
-      });
+      this.getDataList();
     },
     //更新列表数据
     updateList() {
-      this.getDataList({
-        pageSize: this.pageSize,
-        pageNum: this.currentPage,
-        ...this.searchForm,
-      });
+      this.getDataList();
     },
     //获取列表数据
-    async getDataList(data) {
-      const res = await getRebateOrderList(data);
+    async getDataList() {
+      let params = {
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        customerName: this.searchForm.customerName,
+        customerNumber: this.searchForm.customerNumber,
+        endTime: this.searchForm.endTime,
+        examineStatus: this.searchForm.examineStatus,
+        id: this.searchForm.id,
+        isConfirm: this.searchForm.isConfirm,
+        isSecondExamine: "",
+        startTime: this.searchForm.startTime,
+        walletName: this.searchForm.walletName,
+      };
+      const res = await getRebateOrderList(params);
       this.listTotal = res.data.total;
       let arr = res.data.records;
       arr.forEach((value) => {
@@ -447,11 +439,7 @@ export default {
     async applyFn(id) {
       await getRebateOrderApply({ id });
 
-      this.getDataList({
-        pageSize: this.pageSize,
-        pageNum: this.currentPage,
-        ...this.currentPage,
-      });
+      this.getDataList();
       this.$message.success("申请成功");
     },
     //详情2