Ver Fonte

返利单部分功能

chen há 3 anos atrás
pai
commit
4f06c0f68a

+ 2 - 2
src/api/finance/rebate_form.js

@@ -24,11 +24,11 @@ export function getRebateOrderAdd(data) {
     })
   }
 // 提审
-export function getRebateOrderApply(data) {
+export function getRebateOrderApply(params) {
     return request({
       url: '/rebate/order/apply',
       method: 'post',
-      data
+      params
     })
   }
 // 列表

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

@@ -7,3 +7,43 @@ export function getRebateOrderList(params) {
       params
     })
   }
+// 提审
+export function getRebateOrderApply(params) {
+  return request({
+    url: '/rebate/order/apply',
+    method: 'post',
+    params
+  })
+}
+// 审核
+export function getRebateOrderExamine(params) {
+  return request({
+    url: '/rebate/order/examine',
+    method: 'post',
+    params
+  })
+}
+// 复核
+export function getRebateOrderExamine2(data) {
+  return request({
+    url: '/rebate/order/examine2',
+    method: 'post',
+    data
+  })
+}
+// 详情
+export function getRebateOrderDetail(params) {
+  return request({
+    url: '/rebate/order/detail',
+    method: 'get',
+    params
+  })
+}
+// 客户确认
+export function getRebateOrderAck(data) {
+  return request({
+    url: '/rebate/order/ack',
+    method: 'post',
+    data
+  })
+}

+ 79 - 46
src/views/finance/change_apply.vue

@@ -78,7 +78,9 @@
             show-overflow-tooltip
           >
             <template slot-scope="scope">
+              <div v-if="scope.$index == 0">{{ searchForm.customerName }}</div>
               <el-select
+                v-if="scope.$index == 1"
                 filterable
                 v-model="scope.row.customerId"
                 placeholder="请选择"
@@ -109,9 +111,9 @@
               >
                 <el-option
                   v-for="item in scope.row.typeList"
-                  :key="item.id"
+                  :key="item.customerWalletId"
                   :label="item.name"
-                  :value="item.id"
+                  :value="item.customerWalletId"
                 >
                 </el-option>
               </el-select>
@@ -169,7 +171,20 @@ export default {
   data() {
     return {
       listLoading: false, // 列表加载loading
-      dataList: [],
+      dataList: [
+        {
+          customerId: "",
+          name: "",
+          money: "",
+          bz: "",
+        },
+        {
+          customerId: "",
+          name: "",
+          money: "",
+          bz: "",
+        },
+      ],
       searchForm: {
         customerId: "",
         customerName: "",
@@ -186,19 +201,19 @@ export default {
     this.getCustomerData();
   },
   methods: {
-    func(arr, target) {
-      var obj = {};
-      for (var i = 0; i < arr.length; i++) {
-        var item = arr[i].money;
-        if (obj[item] === undefined) {
-          var x = target - item;
-          obj[x] = i;
-        } else {
-          return [obj[item], i];
-        }
-      }
-      return null;
-    },
+    // func(arr, target) {
+    //   var obj = {};
+    //   for (var i = 0; i < arr.length; i++) {
+    //     var item = arr[i].money;
+    //     if (obj[item] === undefined) {
+    //       var x = target - item;
+    //       obj[x] = i;
+    //     } else {
+    //       return [obj[item], i];
+    //     }
+    //   }
+    //   return null;
+    // },
 
     resetFn() {
       this.dataList.forEach((v) => {
@@ -241,23 +256,42 @@ export default {
       let initiatorRemark;
       let receiverRemark;
       let amount;
-      let res = this.func(this.dataList, 0);
-      console.log(res);
-
-      if (this.dataList[res[0]].money > 0) {
-        receiverWalletRebateId = this.dataList[res[0]].customerWalletId;
-        initiatorWalletRebateId = this.dataList[res[1]].customerWalletId;
-        receiverRemark = this.dataList[res[0]].bz;
-        initiatorRemark = this.dataList[res[1]].bz;
-        amount = this.dataList[res[0]].money;
+      // let res = this.func(this.dataList, 0);
+      // console.log(res);
+      // if (this.dataList[res[0]].money > 0) {
+      //   receiverWalletRebateId = this.dataList[res[0]].customerWalletId;
+      //   initiatorWalletRebateId = this.dataList[res[1]].customerWalletId;
+      //   receiverRemark = this.dataList[res[0]].bz;
+      //   initiatorRemark = this.dataList[res[1]].bz;
+      //   amount = this.dataList[res[0]].money;
+      // } else {
+      //   receiverWalletRebateId = this.dataList[res[1]].customerWalletId;
+      //   initiatorWalletRebateId = this.dataList[res[0]].customerWalletId;
+      //   receiverRemark = this.dataList[res[1]].bz;
+      //   initiatorRemark = this.dataList[res[0]].bz;
+      //   amount = this.dataList[res[1]].money;
+      // }
+      // await getTransferAdd({
+      //   receiverWalletRebateId,
+      //   initiatorWalletRebateId,
+      //   receiverRemark,
+      //   initiatorRemark,
+      //   amount: amount * 1,
+      // });
+      console.log(this.dataList);
+      if (this.dataList[0].money > 0) {
+        receiverWalletRebateId = this.dataList[0].name;
+        initiatorWalletRebateId = this.dataList[1].name;
+        initiatorRemark = this.dataList[1].bz;
+        receiverRemark = this.dataList[0].bz;
+        amount = this.dataList[0].money;
       } else {
-        receiverWalletRebateId = this.dataList[res[1]].customerWalletId;
-        initiatorWalletRebateId = this.dataList[res[0]].customerWalletId;
-        receiverRemark = this.dataList[res[1]].bz;
-        initiatorRemark = this.dataList[res[0]].bz;
-        amount = this.dataList[res[1]].money;
+        receiverWalletRebateId = this.dataList[1].name;
+        initiatorWalletRebateId = this.dataList[0].name;
+        initiatorRemark = this.dataList[0].bz;
+        receiverRemark = this.dataList[1].bz;
+        amount = this.dataList[1].money;
       }
-
       await getTransferAdd({
         receiverWalletRebateId,
         initiatorWalletRebateId,
@@ -269,22 +303,21 @@ export default {
     },
     async getUserInfoFn() {
       const res = await getUserInfo({ adminUserId: this.userid });
-      console.log(res);
-      this.searchForm.customerId = res.data.customerId;
+      console.log(res, 1);
+      this.searchForm.customerNumber = res.data.customerNumber;
+      this.dataList[0].customerId = res.data.customerId;
       this.searchForm.customerName = res.data.customerName;
-
-      const res2 = await getWalletCustomerList({
-        customerId: res.data.customerId,
-        type: "REBATE",
-      });
-      console.log(res2);
-
-      res2.data.forEach((v) => {
-        v.money = "";
-        v.bz = "";
-      });
-      this.dataList = res2.data;
-      console.log(this.dataList);
+      // const res2 = await getWalletCustomerList({
+      //   customerId: res.data.customerId,
+      //   type: "REBATE",
+      // });
+      // console.log(res2, 5555);
+      // res2.data.forEach((v) => {
+      //   v.money = "";
+      //   v.bz = "";
+      // });
+      // this.dataList = res2.data;
+      // console.log(this.dataList);
     },
   },
 };

+ 214 - 0
src/views/finance/components/rebate_list-confirm.vue

@@ -0,0 +1,214 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="销售返利单"> </el-page-header>
+    </div>
+    <br />
+    <br />
+    <span>返利单</span>
+    <el-divider></el-divider>
+    <!-- 表头 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利单号" prop="">
+              <el-input
+                v-model="searchForm.rebateOrderId"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利日期" prop="">
+              <el-input
+                v-model="searchForm.theTime"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注" prop="">
+              <el-input
+                v-model="searchForm.remark"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input
+                v-model="searchForm.createBy"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单日期" prop="">
+              <el-input
+                v-model="searchForm.createTime"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审批人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审批日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            label="序号"
+            align="center"
+            width="100"
+            type="index"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop="walletName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="总返利金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ Math.abs(scope.row.amount) + scope.row.withholdAmount }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="返利金额"
+            prop="amount"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.amount"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="折让金额"
+            prop="allowanceAmount"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.allowanceAmount"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop="policyDocNo"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <br />
+    <el-button type="primary" size="small" @click="btnFn">确定</el-button>
+    <el-button type="primary" size="small" @click="resetFn">重置</el-button>
+  </div>
+</template>
+
+<script>
+import { getRebateOrderDetail } from "@/api/finance/rebate_list";
+export default {
+  props: {
+    detailId: {
+      type: String,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      searchForm: {
+        rebateOrderId: "",
+        theTime: "",
+        createBy: "",
+        createTime: "",
+        remark: "",
+      },
+      dataList: [],
+      listLoading: false, // 列表加载loading
+    };
+  },
+  created() {
+    this.getDataList();
+  },
+  methods: {
+    //确定
+    btnFn() {
+      console.log(this.dataList);
+      const res = this.dataList.map((v) => {
+        return {
+          allowanceAmount: v.allowanceAmount,
+          rebateAmount: v.amount,
+        };
+      });
+      console.log(res, 888);
+    },
+    //获取详情数据
+    async getDataList() {
+      let res = await getRebateOrderDetail({ id: this.detailId });
+
+      this.searchForm.rebateOrderId = res.data.id;
+      this.searchForm.theTime = res.data.theTime;
+      this.searchForm.createBy = res.data.createBy;
+      this.searchForm.createTime = res.data.createTime;
+      this.searchForm.remark = res.data.remark;
+      this.dataList = res.data.items;
+    },
+    goBack() {
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 156 - 26
src/views/finance/components/rebate_list-examine.vue

@@ -16,27 +16,42 @@
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利单号" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.rebateOrderId"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利日期" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.theTime"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="备注" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.remark"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单人" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.createBy"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单日期" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.createTime"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -77,55 +92,112 @@
           <el-table-column
             label="序号"
             align="center"
-            min-width="100"
+            width="100"
+            type="index"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="经销商编码"
-            prop=""
+            prop="customerNumber"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="经销商名称"
-            prop=""
+            prop="customerName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="经销商简称"
-            prop=""
+            label="返利类型"
+            prop="walletName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="返利类型"
-            prop=""
+            label="返利总金额"
+            prop="amount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="返利总金额"
-            prop=""
+            label="暂扣返利"
+            prop="withholdAmount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="暂扣返利"
-            prop=""
+            label="政策文件流水号"
+            prop="policyFileNo"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="政策文号"
+            prop="policyDocNo"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="政策年份"
+            prop="policyYear"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="备注"
-            prop=""
+            label="政策月份"
+            prop="policyMonth"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="政策归属部门"
+            prop="policyOrg"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="客户区域"
+            prop="customerArea"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="客户属性"
+            prop="customerAttr"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="奖励实际归属客户"
+            prop="rewardActualCustomers"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注1"
+            prop="remark1"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注2"
+            prop="remark2"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -136,34 +208,92 @@
       <el-row :gutter="0">
         <el-col :span="12" class="item">
           <div class="label">审批人</div>
-          <div class="value">2022123233435342</div>
+          <div class="value">{{ this.name }}</div>
         </el-col>
         <el-col :span="12" class="item">
           <div class="label">审批结果</div>
           <div class="value">
-            <el-radio-group>
-              <el-radio :label="true">通过</el-radio>
-              <el-radio :label="false">弃审</el-radio>
-            </el-radio-group>
+            <el-radio v-model="examineStatus" label="OK">通过</el-radio>
+            <el-radio v-model="examineStatus" label="FAIL">驳回</el-radio>
           </div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">审批说明</div>
           <div class="value">
-            <el-input placeholder="请输入内容"></el-input>
+            <el-input
+              v-model="examineRemark"
+              placeholder="请输入内容"
+            ></el-input>
           </div>
         </el-col>
       </el-row>
     </div>
     <br />
-    <el-button type="primary" size="small">确定</el-button>
-    <el-button type="primary" size="small">重置</el-button>
+    <el-button type="primary" size="small" @click="btnFn">确定</el-button>
+    <el-button type="primary" size="small" @click="resetFn">重置</el-button>
   </div>
 </template>
 
 <script>
+import {
+  getRebateOrderDetail,
+  getRebateOrderExamine,
+} from "@/api/finance/rebate_list";
+import { mapGetters } from "vuex";
 export default {
+  props: {
+    detailId: {
+      type: String,
+      required: true,
+    },
+  },
+  computed: { ...mapGetters(["name"]) },
+  data() {
+    return {
+      examineRemark: "",
+      examineStatus: "",
+      searchForm: {
+        rebateOrderId: "",
+        theTime: "",
+        createBy: "",
+        createTime: "",
+        remark: "",
+      },
+      dataList: [],
+      listLoading: false, // 列表加载loading
+    };
+  },
+  created() {
+    this.getDataList();
+  },
   methods: {
+    //重置
+    resetFn() {
+      this.examineRemark = "";
+      this.examineStatus = "";
+    },
+    //确定
+    async btnFn() {
+      await getRebateOrderExamine({
+        id: this.detailId,
+        examineRemark: this.examineRemark,
+        examineStatus: this.examineStatus,
+      });
+      this.$emit("updateList");
+      this.$message.success("审核成功");
+    },
+    //获取详情数据
+    async getDataList() {
+      let res = await getRebateOrderDetail({ id: this.detailId });
+      console.log(res, 11111);
+      this.searchForm.rebateOrderId = res.data.id;
+      this.searchForm.theTime = res.data.theTime;
+      this.searchForm.createBy = res.data.createBy;
+      this.searchForm.createTime = res.data.createTime;
+      this.searchForm.remark = res.data.remark;
+      this.dataList = res.data.items;
+    },
+
     goBack() {
       this.$parent.showPage = 1;
     },

+ 191 - 38
src/views/finance/components/rebate_list-review.vue

@@ -16,27 +16,42 @@
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利单号" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.rebateOrderId"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利日期" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.theTime"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="备注" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.remark"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单人" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.createBy"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单日期" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.createTime"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -77,55 +92,112 @@
           <el-table-column
             label="序号"
             align="center"
-            min-width="100"
+            width="100"
+            type="index"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="经销商编码"
-            prop=""
+            prop="customerNumber"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="经销商名称"
-            prop=""
+            prop="customerName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="经销商简称"
-            prop=""
+            label="返利类型"
+            prop="walletName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="返利类型"
-            prop=""
+            label="返利总金额"
+            prop="amount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="返利金额"
-            prop=""
+            label="暂扣返利"
+            prop="withholdAmount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="暂扣返利"
-            prop=""
+            label="政策文件流水号"
+            prop="policyFileNo"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="备注"
-            prop=""
+            label="政策文号"
+            prop="policyDocNo"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="政策年份"
+            prop="policyYear"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="政策月份"
+            prop="policyMonth"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="政策归属部门"
+            prop="policyOrg"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="客户区域"
+            prop="customerArea"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="客户属性"
+            prop="customerAttr"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="奖励实际归属客户"
+            prop="rewardActualCustomers"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注1"
+            prop="remark1"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注2"
+            prop="remark2"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -139,7 +211,7 @@
       <div class="table">
         <el-table
           v-loading="listLoading"
-          :data="dataList"
+          :data="dataList2"
           element-loading-text="Loading"
           border
           fit
@@ -156,35 +228,35 @@
           <el-table-column
             align="center"
             label="返利单号"
-            prop=""
+            prop="rebateOrderId"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="经销商编码"
-            prop=""
+            prop="customerNumber"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="经销商名称"
-            prop=""
+            prop="customerName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="返利类型"
-            prop=""
+            prop="walletName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="总返利金额"
-            prop=""
+            prop="amount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -198,84 +270,165 @@
           <el-table-column
             align="center"
             label="折让金额"
-            prop=""
+            prop="allowanceAmount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="暂扣返利"
-            prop=""
+            prop="withholdAmount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="折让编号"
-            prop=""
+            prop="allowanceCode"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.allowanceCode"></el-input>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             label="折让账号"
-            prop=""
+            prop="allowanceAccount"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.allowanceAccount"></el-input>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             label="已办理折让金额"
-            prop=""
+            prop="handledAllowanceAmount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="折让对应收款单号"
-            prop=""
+            prop="allowanceOrderNo"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="确认人"
-            prop=""
+            prop="customerName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="确认日期"
-            prop=""
+            prop="customerConfirmTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="复核人"
-            prop=""
+            prop="secondExamineBy"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="复核日期"
-            prop=""
+            prop="secondExamineTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
         </el-table>
       </div>
     </div>
-    <el-button type="primary" size="small">确定</el-button>
-    <el-button type="primary" size="small">重置</el-button>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">复核人</div>
+          <div class="value">{{ this.name }}</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">操作</div>
+          <div class="value">
+            <el-radio v-model="examineStatus" label="OK">复核通过</el-radio>
+            <el-radio v-model="examineStatus" label="FALL">取消复核</el-radio>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">复核状态</div>
+          <div class="value">
+            <el-input v-model="examineRemark" placeholder=""></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <br />
+    <el-button type="primary" size="small" @click="btnFn">确定</el-button>
   </div>
 </template>
 
 <script>
+import {
+  getRebateOrderDetail,
+  getRebateOrderExamine2,
+} from "@/api/finance/rebate_list";
+import { mapGetters } from "vuex";
 export default {
+  props: {
+    detailId: {
+      type: String,
+      required: true,
+    },
+  },
+  computed: { ...mapGetters(["name"]) },
+  data() {
+    return {
+      examineRemark: "",
+      examineStatus: "",
+      searchForm: {
+        rebateOrderId: "",
+        theTime: "",
+        createBy: "",
+        createTime: "",
+        remark: "",
+      },
+      dataList: [],
+      dataList2: [],
+      listLoading: false, // 列表加载loading
+    };
+  },
+  created() {
+    this.getDataList();
+  },
   methods: {
+    //确定
+    async btnFn() {
+      await getRebateOrderExamine2({
+        id: this.detailId,
+        examineRemark: this.examineRemark,
+        examineStatus: this.examineStatus,
+      });
+      this.$message.success("复核成功");
+    },
+    //获取详情数据
+    async getDataList() {
+      let res = await getRebateOrderDetail({ id: this.detailId });
+
+      this.searchForm.rebateOrderId = res.data.id;
+      this.searchForm.theTime = res.data.theTime;
+      this.searchForm.createBy = res.data.createBy;
+      this.searchForm.createTime = res.data.createTime;
+      this.searchForm.remark = res.data.remark;
+      this.dataList = res.data.items;
+      this.dataList2 = res.data.items;
+    },
     goBack() {
       this.$parent.showPage = 1;
     },

+ 70 - 35
src/views/finance/rebate_list.vue

@@ -44,27 +44,6 @@
         </el-form>
       </div>
 
-      <!-- 按钮 -->
-      <div class="btn-group clearfix">
-        <div class="fl">
-          <el-button type="primary" size="small" @click="applyFn"
-            >申请</el-button
-          >
-
-          <el-button type="primary" size="small" @click="examineFn"
-            >审核</el-button
-          >
-
-          <el-button type="primary" size="small" @click="reviewFn"
-            >复核</el-button
-          >
-
-          <el-button type="primary" size="small" @click="infoFn"
-            >详情</el-button
-          >
-        </div>
-      </div>
-
       <!-- 列表 -->
       <div class="mymain-container">
         <div class="table">
@@ -80,7 +59,7 @@
             <el-table-column
               align="center"
               label="状态"
-              prop=""
+              prop="examineStatus"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -308,15 +287,41 @@
             <el-table-column
               align="center"
               label="操作"
-              min-width="260"
+              min-width="300"
               show-overflow-tooltip
               fixed="right"
             >
-              <template slot-scope="">
-                <el-button type="text" class="textColor">申请</el-button>
-                <el-button type="text" class="textColor">审核</el-button>
-                <el-button type="text" class="textColor">复核</el-button>
-                <el-button type="text" class="textColor">详情</el-button>
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="applyFn(scope.row.rebateOrderId)"
+                  >申请</el-button
+                >
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="examineFn(scope.row.rebateOrderId)"
+                  >审核</el-button
+                >
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="reviewFn(scope.row.rebateOrderId)"
+                  >复核</el-button
+                >
+                <el-button type="text" class="textColor" @click="infoFn"
+                  >详情</el-button
+                >
+                <el-button type="text" class="textColor" @click="detail2"
+                  >详情2</el-button
+                >
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="confirmFn(scope.row.rebateOrderId)"
+                  >确认</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -335,25 +340,36 @@
       </div>
     </div>
     <RebateListApply v-else-if="showPage == 2" />
-    <RebateListExamine v-else-if="showPage == 3" />
-    <RebateListReview v-else-if="showPage == 4" />
+    <RebateListExamine
+      @updateList="updateList"
+      :detailId="detailId"
+      v-else-if="showPage == 3"
+    />
+    <RebateListReview :detailId="detailId" v-else-if="showPage == 4" />
     <!-- 详情 -->
     <RebateListDetail v-else-if="showPage == 5" />
+    <!-- 确定 -->
+    <RebateListConfirm :detailId="detailId" v-else-if="showPage == 6" />
   </div>
 </template>
 
 <script>
-import { getRebateOrderList } from "@/api/finance/rebate_list";
+import {
+  getRebateOrderList,
+  getRebateOrderApply,
+} from "@/api/finance/rebate_list";
 import RebateListApply from "./components/rebate_list-apply.vue";
 import RebateListExamine from "./components/rebate_list-examine.vue";
 import RebateListReview from "./components/rebate_list-review.vue";
 import RebateListDetail from "./components/rebate_list-detail";
+import RebateListConfirm from "./components/rebate_list-confirm";
 export default {
   components: {
     RebateListDetail,
     RebateListApply,
     RebateListExamine,
     RebateListReview,
+    RebateListConfirm,
   },
   data() {
     return {
@@ -364,6 +380,7 @@ export default {
       searchForm: {}, //搜索表单
       listLoading: false, // 列表加载loading
       showPage: 1,
+      detailId: null,
     };
   },
   created() {
@@ -373,25 +390,43 @@ export default {
     });
   },
   methods: {
+    //更新列表数据
+    updateList() {
+      this.getDataList({
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      });
+    },
     //获取列表数据
     async getDataList(data) {
       const res = await getRebateOrderList(data);
       this.dataList = res.data.records;
       this.listTotal = res.data.total;
     },
+    //确认
+    confirmFn(id) {
+      this.detailId = id;
+      this.showPage = 6;
+    },
     //复核
-    reviewFn() {
+    reviewFn(id) {
+      this.detailId = id;
       this.showPage = 4;
     },
     //审核
-    examineFn() {
+    examineFn(id) {
+      this.detailId = id;
       this.showPage = 3;
     },
     //申请
-    applyFn() {
+    async applyFn(id) {
+      await getRebateOrderApply({ id });
+      this.$message.success("申请成功");
+    },
+    //详情2
+    detail2() {
       this.showPage = 2;
     },
-
     //详情
     infoFn() {
       this.showPage = 5;