Ver código fonte

Merge branch 'feature/返利单批量审核' into develop

# Conflicts:
#	src/views/finance/rebate_list.vue
chen 2 anos atrás
pai
commit
8db5ad7b66
2 arquivos alterados com 37 adições e 12 exclusões
  1. 8 0
      src/api/finance/rebate_list.js
  2. 29 12
      src/views/finance/rebate_list.vue

+ 8 - 0
src/api/finance/rebate_list.js

@@ -79,6 +79,14 @@ export function getRebateOrderExamineBatch(params) {
     params,
   });
 }
+// 批量复核
+export function getRebateOrderExamine2Batch(params) {
+  return request({
+    url: "/rebate/order/examine2/batch",
+    method: "post",
+    params,
+  });
+}
 // 复核前-编辑
 export function getRebateOrderAclUpdate(data) {
   return request({

+ 29 - 12
src/views/finance/rebate_list.vue

@@ -73,12 +73,11 @@
           <el-popconfirm style="margin-right:15px" v-if="$checkBtnRole('del', $route.meta.roles)" class="delClass" @onConfirm="deleFn" title="确定删除吗?">
             <el-button :disabled="deleList.length < 1" slot="reference" type="danger" icon="el-icon-minus" size="mini">批量删除</el-button>
           </el-popconfirm>
-          <el-popconfirm style="margin-right:15px" v-if="$checkBtnRole('apply', $route.meta.roles) && searchForm.examineStatus ==='SAVE'" class="delClass" @onConfirm="batchApplication" title="确定执行批量审核吗?">
+          <el-popconfirm style="margin-right:15px" v-if="$checkBtnRole('apply', $route.meta.roles) && searchForm.examineStatus ==='SAVE'" class="delClass" @onConfirm="batchApplication" title="确定执行批量申请吗?">
             <el-button :disabled="deleList.length < 1" slot="reference" type="warning" icon="el-icon-finished" size="mini">批量申请</el-button>
           </el-popconfirm>
-          <el-popconfirm style="margin-right:15px" v-if="$checkBtnRole('examine', $route.meta.roles) && searchForm.examineStatus ==='WAIT'" class="delClass" @onConfirm="batchAudit" title="确定执行批量审核吗?">
-            <el-button :disabled="deleList.length < 1" slot="reference" type="warning" icon="el-icon-finished" size="mini">批量审核</el-button>
-          </el-popconfirm>
+          <el-button @click="batchAudit('audit')" v-if="$checkBtnRole('examine', $route.meta.roles) && searchForm.examineStatus ==='WAIT'" :disabled="deleList.length < 1" slot="reference" type="warning" icon="el-icon-finished" size="mini">批量审核</el-button>
+          <el-button @click="batchReview('review')" v-if="$checkBtnRole('examine', $route.meta.roles) && searchForm.examineStatus ==='OK_ONE_AND_CONFIRM'" :disabled="deleList.length < 1" slot="reference" type="warning" icon="el-icon-finished" size="mini">批量复核</el-button>
           <!-- <el-button @click="batchApplication" :disabled='deleList.length < 1' size="mini" type="warning" icon="el-icon-finished" v-if="$checkBtnRole('examine', $route.meta.roles) && searchForm.examineStatus ==='SAVE'">批量申请</el-button> -->
         </div>
         <div class="fr">
@@ -223,7 +222,7 @@
                     confirmFn(
                       scope.row.rebateOrderId,
                       scope.row.customerIsConfirm,
-
+                      
                     )
                   ">{{
                     scope.row.customerIsConfirm == true && scope.row.examineStatus == 'OK_ONE' ? "编辑" : scope.row.customerIsConfirm == false?'确定':'详情'
@@ -260,6 +259,7 @@ import {
   getRebateOrderBatchDel,
   getRebateOrderApplyBatch,
   getRebateOrderExamineBatch,
+  getRebateOrderExamine2Batch,
 } from "@/api/finance/rebate_list";
 import RebateListApply from "./components/rebate_list-apply.vue";
 import RebateListExamine from "./components/rebate_list-examine.vue";
@@ -308,6 +308,7 @@ export default {
         status: "",
         remark: "",
       },
+      state: "",
     };
   },
   computed: {
@@ -333,23 +334,39 @@ export default {
     }
   },
   methods: {
+    //批量复核
+    batchReview(value) {
+      this.state = value;
+      this.isShowExamineDialog = true;
+    },
+
     //批量审核
-    batchAudit() {
+    batchAudit(value) {
+      this.state = value;
       this.isShowExamineDialog = true;
     },
     //提交批量审核
     async submitExamineForm() {
       let res = this.deleList.toString();
+      if (this.state === "audit") {
+        await getRebateOrderExamineBatch({
+          ids: res,
+          examineStatus: this.examineForm.status,
+          examineRemark: this.examineForm.remark,
+        });
+        this.$message.success("批量审核成功");
+      } else {
+        await getRebateOrderExamine2Batch({
+          ids: res,
+          examineStatus: this.examineForm.status,
+          examineRemark: this.examineForm.remark,
+        });
+        this.$message.success("批量复核成功");
+      }
 
-      await getRebateOrderExamineBatch({
-        ids: res,
-        examineStatus: this.examineForm.status,
-        examineRemark: this.examineForm.remark,
-      });
       this.deleList = [];
       this.isShowExamineDialog = false;
       this.getDataList();
-      this.$message.success("批量审批成功");
     },
     //批量申请
     async batchApplication() {