Переглянути джерело

Merge branch 'feature/Feature-finance' into develop

莫绍宝 3 роки тому
батько
коміт
e830bbde24

+ 26 - 0
src/api/finance/change_apply.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+//经销商钱包列表
+export function getWalletCustomerList(params) {
+    return request({
+      url: '/wallet/customer/list',
+      method: 'get',
+      params
+    })
+  }
+
+//用户详情
+export function getUserInfo(params) {
+    return request({
+      url: '/admin/user/detail',
+      method: 'get',
+      params
+    })
+  }
+//返利互转-新增
+export function getTransferAdd(params) {
+    return request({
+      url: '/finance/transfer/add',
+      method: 'post',
+      params
+    })
+  }

+ 43 - 0
src/api/finance/change_list.js

@@ -0,0 +1,43 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getChangeList(params) {
+  return request({
+    url: '/finance/transfer/list',
+    method: 'get',
+    params
+  })
+}
+//列表详情
+export function getChangeListDetail(params) {
+    return request({
+      url: '/finance/transfer/detail',
+      method: 'get',
+      params
+    })
+  }
+//返利互转-审核
+export function getChangeListExamine(params) {
+    return request({
+      url: '/finance/transfer/examine',
+      method: 'post',
+      params
+    })
+  }
+//返利互转-提审
+export function getTransferSubmit(params) {
+  return request({
+    url: '/finance/transfer/apply',
+    method: 'post',
+    params
+  })
+}
+//返利互转-修改
+export function getTransferEdit(params) {
+  return request({
+    url: '/finance/transfer/update',
+    method: 'post',
+    params
+  })
+}
+

+ 51 - 0
src/api/finance/credit_list.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 信用额度列表-新增
+export function getCreditListAdd(params) {
+    return request({
+      url: '/credit/add',
+      method: 'post',
+      params
+    })
+  }
+// 信用额度列表
+export function getCreditList(params) {
+    return request({
+      url: '/credit/list',
+      method: 'get',
+      params
+    })
+  }
+// 设置信用额度
+export function getCreditListEdit(params) {
+    return request({
+      url: '/credit/record/add',
+      method: 'post',
+      params
+    })
+  }
+// 信用额度列表-导出
+export function getCreditListExport(params) {
+    return request({
+      url: '/credit/exportData',
+      method: 'get',
+      params
+    })
+  }
+//信用额度记录-导出
+export function getCreditExport(params) {
+    return request({
+      url: '/credit/record/export',
+      method: 'get',
+      params
+    })
+  }
+// 信用额度记录
+export function getCredit(params) {
+    return request({
+      url: '/credit/record/list',
+      method: 'get',
+      params
+    })
+  }
+

+ 18 - 0
src/api/finance/standbook_list.js

@@ -0,0 +1,18 @@
+import request from '@/utils/request'
+
+// 台账列表
+export function getStandbookList(params) {
+    return request({
+      url: '/finance/standing/book/list',
+      method: 'get',
+      params
+    })
+  }
+// 字典
+export function getDictList(params) {
+    return request({
+      url: '/common/dict/list',
+      method: 'get',
+      params
+    })
+  }

+ 26 - 0
src/api/finance/wallet.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+// 返利钱包列表
+export function getRebateList(params) {
+    return request({
+      url: '/wallet/rebate/list',
+      method: 'get',
+      params
+    })
+  }
+// 钱包列表(非返利钱包)
+export function getWalletList(params) {
+    return request({
+      url: '/wallet/list',
+      method: 'get',
+      params
+    })
+  }
+// 经销商一键生成钱包
+export function getfinanceInit(params) {
+    return request({
+      url: '/finance/init',
+      method: 'post',
+      params
+    })
+  }

+ 2 - 1
src/store/getters.js

@@ -7,6 +7,7 @@ const getters = {
   userid: state => state.user.userid,
   phone: state => state.user.phone,
   name: state => state.user.name,
-  menus: state => state.user.menus
+  menus: state => state.user.menus,
+  customerId: state => state.user.customerId
 }
 export default getters

+ 6 - 2
src/store/modules/user.js

@@ -9,6 +9,7 @@ const getDefaultState = () => {
     name: '', // 用户名称
     phone: '', // 用户手机
     menus: "", // 菜单
+    customerId:''//经销商ID
   }
 }
 
@@ -32,6 +33,9 @@ const mutations = {
   },
   SET_MENUS: (state, menus) => {
     state.menus = menus
+  },
+  SET_CUSTOMERID: (state, customerId) => {
+    state.customerId = customerId
   }
 }
 
@@ -65,7 +69,7 @@ const actions = {
           return reject('Verification failed, please Login again.')
         }
         console.log(data);
-        const { nickName, userName } = data
+        const { nickName, userName ,customerId} = data
         
         // 模拟请求数据
         // const menus = [
@@ -92,7 +96,7 @@ const actions = {
           // },
         // ]
         // menus.push({ path: '*', redirect: '/404', hidden: true })
-
+        commit('SET_CUSTOMERID',customerId)
         commit('SET_NAME', nickName)
         commit('SET_PHONE', userName)
         // commit("SET_MENUS", menus) // 触发vuex SET_MENUS 保存路由表到vuex

+ 128 - 12
src/views/finance/change_apply.vue

@@ -14,7 +14,7 @@
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利互转单号" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input placeholder="请输入" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -24,17 +24,23 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单人" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input placeholder="请输入" disabled></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
+                placeholder="请输入"
+                v-model="searchForm.customerId"
+              ></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
+                placeholder="请输入"
+                v-model="searchForm.customerName"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -59,14 +65,15 @@
         >
           <el-table-column
             label="序号"
+            type="index"
             align="center"
-            min-width="100"
+            width="100"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="返利类型"
-            prop=""
+            prop="name"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -76,30 +83,139 @@
             prop=""
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.money"></el-input>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             label="备注"
             prop=""
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.bz"></el-input>
+            </template>
+          </el-table-column>
         </el-table>
       </div>
     </div>
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-button type="primary" size="small">保存</el-button>
-        <el-button type="primary" size="small">提交申请</el-button>
-        <el-button type="primary" size="small">重置</el-button>
+        <el-button type="primary" size="small" @click="preservationFn"
+          >保存</el-button
+        >
+
+        <el-button type="primary" size="small" @click="resetFn">重置</el-button>
       </div>
     </div>
   </div>
 </template>
 
 <script>
-export default {};
+import { mapGetters } from "vuex";
+import {
+  getUserInfo,
+  getWalletCustomerList,
+  getTransferAdd,
+  getTransferSubmit,
+} from "@/api/finance/change_apply";
+export default {
+  data() {
+    return {
+      listLoading: false, // 列表加载loading
+      dataList: [],
+      searchForm: {
+        customerId: "",
+        customerName: "",
+      },
+    };
+  },
+  computed: {
+    ...mapGetters(["userid"]),
+  },
+  created() {
+    this.getUserInfoFn();
+  },
+  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;
+    },
+
+    resetFn() {
+      this.dataList.forEach((v) => {
+        v.money = "";
+        v.bz = "";
+      });
+    },
+
+    //保存
+    async preservationFn() {
+      let receiverWalletRebateId;
+      let initiatorWalletRebateId;
+      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;
+      } 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,
+      });
+      this.$message.success("申请成功");
+    },
+    async getUserInfoFn() {
+      const res = await getUserInfo({ adminUserId: this.userid });
+      console.log(res);
+      this.searchForm.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);
+    },
+  },
+};
 </script>
 
 <style>

+ 192 - 58
src/views/finance/change_list.vue

@@ -5,8 +5,10 @@
         <el-radio-button label="全部"></el-radio-button>
         <el-radio-button label="待审核"></el-radio-button>
         <el-radio-button label="审核通过"></el-radio-button>
+        <el-radio-button label="审核驳回"></el-radio-button>
         <el-radio-button label="复核通过"></el-radio-button>
-        <el-radio-button label="驳回"></el-radio-button>
+        <el-radio-button label="待复核"></el-radio-button>
+        <el-radio-button label="复核驳回"></el-radio-button>
       </el-radio-group>
       <br /><br />
       <!-- 筛选条件 -->
@@ -20,49 +22,47 @@
         >
           <el-row :gutter="20">
             <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 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="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="返利类型" prop="walletName">
+                <el-input
+                  v-model="searchForm.walletName"
+                  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 label="申请日期" prop="startTime">
+                <el-date-picker
+                  class="dateStyle"
+                  v-model="searchForm.startTime"
+                  placeholder="选择日期"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                >
+                </el-date-picker>
               </el-form-item>
             </el-col>
 
-            <el-col :xs="24" :sm="12" :lg="24">
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="" class="fr">
-                <el-button size="small">清空</el-button>
-                <el-button size="small" type="primary">搜索</el-button>
+                <el-button size="small" @click="clearFn">清空</el-button>
+                <el-button size="small" type="primary" @click="searchFn"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
         </el-form>
       </div>
-      <!-- 按钮 -->
-      <div class="btn-group clearfix">
-        <div class="fl">
-          <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="detailFn"
-            >详情</el-button
-          >
-        </div>
-      </div>
+
       <br />
 
       <strong>返利互转单列表</strong>
@@ -82,41 +82,42 @@
             <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="id"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="申请日期"
-              prop=""
+              prop="applyTime"
               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="initiatorRemark"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -130,73 +131,123 @@
             <el-table-column
               align="center"
               label="返利金额"
-              prop=""
+              prop="amount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="备注"
-              prop=""
+              prop="remark"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="制单人"
-              prop=""
+              prop="createBy"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="审核人"
-              prop=""
+              prop="examineBy"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="审核日期"
-              prop=""
+              prop="examineTime"
               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-column
               align="center"
               label="状态"
-              prop=""
+              prop="examineStatus"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                <el-tag v-show="scope.row.examineStatus == 'SAVE'">保存</el-tag>
+                <el-tag v-show="scope.row.examineStatus == 'WAIT'"
+                  >待审核</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'OK_ONE'"
+                  >初审通过</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'FAIL_ONE'"
+                  >初审不通过</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'OK'"
+                  >复核通过</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'FALL'"
+                  >不通过</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'CLOSE'"
+                  >已关闭</el-tag
+                >
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="操作"
-              min-width="160"
+              min-width="200"
               show-overflow-tooltip
+              fixed="right"
             >
-              <template slot-scope="">
-                <el-button type="text" class="textColor" slot="reference"
+              <template slot-scope="scope">
+                <el-button
+                  @click="submitFn(scope.row.id)"
+                  type="text"
+                  class="textColor"
+                  slot="reference"
+                  >提审</el-button
+                >
+                <el-button
+                  v-if="
+                    scope.row.examineStatus == 'WAIT' ||
+                    scope.row.examineStatus == 'OK_ONE'
+                  "
+                  @click="examineFn(scope.row.id)"
+                  type="text"
+                  class="textColor"
+                  slot="reference"
                   >审核</el-button
                 >
-                <el-button type="text" class="textColor" slot="reference"
-                  >复核</el-button
+                <el-button
+                  v-if="
+                    scope.row.examineStatus == 'WAIT' ||
+                    scope.row.examineStatus == 'SAVE'
+                  "
+                  type="text"
+                  class="textColor"
+                  slot="reference"
+                  @click="editFn(scope.row.id)"
+                  >修改</el-button
                 >
-                <el-button type="text" class="textColor" slot="reference"
+                <el-button
+                  @click="detailFn(scope.row.id)"
+                  type="text"
+                  class="textColor"
+                  slot="reference"
                   >详情</el-button
                 >
               </template>
@@ -206,6 +257,8 @@
         <!-- 分页 -->
         <div class="fr">
           <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
@@ -216,13 +269,26 @@
         </div>
       </div>
     </div>
-    <ChangeListDetail v-else-if="showPage == 2" />
-    <ChangeListExamine v-else-if="showPage == 3" />
-    <ChangeListReview v-else-if="showPage == 4" />
+    <ChangeListDetail :detailList="detailList" v-else-if="showPage == 2" />
+    <ChangeListExamine
+      @refresh="refreshFn"
+      :detailList="detailList"
+      v-else-if="showPage == 3"
+    />
+    <ChangeListReview
+      @refresh="refreshFn"
+      :detailList="detailList"
+      v-else-if="showPage == 4"
+    />
   </div>
 </template>
 
 <script>
+import {
+  getChangeList,
+  getChangeListDetail,
+  getTransferSubmit,
+} from "@/api/finance/change_list";
 import ChangeListDetail from "./components/change_list-detail";
 import ChangeListExamine from "./components/change_list-examine";
 import ChangeListReview from "./components/change_list-review";
@@ -234,26 +300,94 @@ export default {
   },
   data() {
     return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [], // 列表数据
+      searchForm: {
+        startTime: "",
+        walletName: "",
+        id: "",
+      }, //搜索表单
+      listLoading: false, // 列表加载loading
       category: "全部",
       showPage: 1,
+      detailList: {},
     };
   },
+  created() {
+    this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+  },
   methods: {
+    //刷新
+    refreshFn() {
+      this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+    },
+    //提审
+    async submitFn(id) {
+      await getTransferSubmit({ id });
+      this.$message.success("提审成功");
+      this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+    },
+    //清空
+    clearFn() {
+      console.log(this.$refs.searchForm);
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      this.getDataList({
+        ...this.searchForm,
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+      });
+    },
+
+    //获取列表数据
+    async getDataList(data) {
+      const res = await getChangeList(data);
+      console.log(res);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
     //详情
-    detailFn() {
+    async detailFn(id) {
+      const res = await getChangeListDetail({ id });
+      console.log(res);
+      this.detailList = res.data;
       this.showPage = 2;
     },
-    //复核
-    reviewFn() {
+    //修改
+    async editFn(id) {
+      const res = await getChangeListDetail({ id });
+
+      this.detailList = res.data;
       this.showPage = 4;
     },
     //审核
-    examineFn() {
+    async examineFn(id) {
+      const res = await getChangeListDetail({ id });
+
+      this.detailList = res.data;
       this.showPage = 3;
     },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
   },
 };
 </script>
 
-<style>
+<style lang="scss" scoped>
+.dateStyle {
+  width: 100%;
+}
 </style>

+ 71 - 28
src/views/finance/components/change_list-detail.vue

@@ -9,62 +9,84 @@
     <el-divider></el-divider>
     <!-- 筛选条件 -->
     <div>
-      <el-form
-        ref="searchForm"
-        :model="searchForm"
-        label-width="100px"
-        size="small"
-        label-position="left"
-      >
+      <el-form 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 placeholder="请输入"></el-input>
+              <el-input
+                disabled
+                v-model="detailList.id"
+                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
+                disabled
+                v-model="detailList.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 disabled 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
+                disabled
+                v-model="detailList.customerNumber"
+                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
+                disabled
+                v-model="detailList.customerName"
+                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
+                disabled
+                v-model="detailList.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
+                disabled
+                v-model="detailList.examineBy"
+                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
+                disabled
+                v-model="detailList.examineTime"
+                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 disabled 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 disabled placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -85,45 +107,66 @@
           <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="customerWalletName"
             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>
           <el-table-column
             align="center"
             label="备注"
-            prop=""
+            prop="remark"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
         </el-table>
       </div>
     </div>
-    <!-- 按钮 -->
-    <div class="btn-group clearfix">
-      <div class="fl">
-        <el-button type="primary" size="small">确定</el-button>
-        <el-button type="primary" size="small">重置</el-button>
-      </div>
-    </div>
   </div>
 </template>
 
 <script>
 export default {
+  props: {
+    detailList: {
+      type: Object,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      dataList: [], // 列表数据
+      searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+    };
+  },
+  created() {
+    this.dataList = [
+      {
+        customerWalletName: this.detailList.initiatorCustomerWalletName,
+        remark: this.detailList.initiatorRemark,
+        amount: -this.detailList.amount,
+      },
+      {
+        customerWalletName: this.detailList.receiverCustomerWalletName,
+        remark: this.detailList.receiverRemark,
+        amount: this.detailList.amount,
+      },
+    ];
+  },
   methods: {
     goBack() {
       this.$parent.showPage = 1;

+ 86 - 26
src/views/finance/components/change_list-examine.vue

@@ -9,22 +9,19 @@
     <el-divider></el-divider>
     <!-- 筛选条件 -->
     <div>
-      <el-form
-        ref="searchForm"
-        :model="searchForm"
-        label-width="100px"
-        size="small"
-        label-position="left"
-      >
+      <el-form 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 placeholder="请输入"></el-input>
+              <el-input v-model="detailList.id" 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="detailList.theTime"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -34,27 +31,42 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="经销商编号" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="detailList.customerNumber"
+                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="detailList.customerName"
+                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="detailList.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="detailList.examineBy"
+                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="detailList.examineTime"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -75,27 +87,28 @@
           <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="customerWalletName"
             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>
           <el-table-column
             align="center"
             label="备注"
-            prop=""
+            prop="remark"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -106,21 +119,19 @@
       <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="FALL">驳回</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="remark" placeholder="请输入内容"></el-input>
           </div>
         </el-col>
       </el-row>
@@ -129,17 +140,66 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <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>
     </div>
   </div>
 </template>
 
 <script>
+import { getChangeListExamine } from "@/api/finance/change_list";
+import { mapGetters } from "vuex";
 export default {
+  props: {
+    detailList: {
+      type: Object,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      remark: "",
+      examineStatus: "",
+      dataList: [], // 列表数据
+      // searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+    };
+  },
+  computed: { ...mapGetters(["name"]) },
+  created() {
+    this.dataList = [
+      {
+        customerWalletName: this.detailList.initiatorCustomerWalletName,
+        remark: this.detailList.initiatorRemark,
+        amount: -this.detailList.amount,
+      },
+      {
+        customerWalletName: this.detailList.receiverCustomerWalletName,
+        remark: this.detailList.receiverRemark,
+        amount: this.detailList.amount,
+      },
+    ];
+  },
   methods: {
+    //重置
+    resetFn() {
+      this.remark = "";
+      this.examineStatus = "";
+    },
+    //确定
+    async btnFn() {
+      // console.log(this.detailList);
+      await getChangeListExamine({
+        id: this.detailList.id,
+        remark: this.remark,
+        examineStatus: this.examineStatus,
+      });
+      this.$message.success("已审核");
+    },
     goBack() {
+      this.$emit("refresh");
+
       this.$parent.showPage = 1;
     },
   },

+ 109 - 18
src/views/finance/components/change_list-review.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="sty">
-      <el-page-header @back="goBack" content="复核"> </el-page-header>
+      <el-page-header @back="goBack" content="修改"> </el-page-header>
     </div>
     <br />
     <br />
@@ -19,12 +19,15 @@
         <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="detailList.id" 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="detailList.theTime"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -34,27 +37,42 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="经销商编号" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="detailList.customerNumber"
+                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="detailList.customerName"
+                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="detailList.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="detailList.examineBy"
+                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="detailList.examineTime"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -85,34 +103,43 @@
           <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="customerWalletName"
             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>
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.amount"></el-input>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             label="备注"
-            prop=""
+            prop="remark"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.remark"></el-input>
+            </template>
+          </el-table-column>
         </el-table>
       </div>
     </div>
-    <div class="diy-table-1">
+    <!-- <div class="diy-table-1">
       <el-row :gutter="0">
         <el-col :span="12" class="item">
           <div class="label">复核人</div>
@@ -134,22 +161,86 @@
           </div>
         </el-col>
       </el-row>
-    </div>
+    </div> -->
     <br />
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <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>
     </div>
   </div>
 </template>
 
 <script>
+import { getTransferEdit } from "@/api/finance/change_list";
 export default {
+  props: {
+    detailList: {
+      type: Object,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      dataList: [], // 列表数据
+      searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+    };
+  },
+  created() {
+    this.getList();
+  },
   methods: {
+    //重置
+    resetFn() {
+      this.getList();
+    },
+
+    //数据初始化
+    getList() {
+      this.dataList = [
+        {
+          initiatorWalletRebateId: this.detailList.initiatorCustomerWalletId,
+          customerWalletName: this.detailList.initiatorCustomerWalletName,
+          remark: this.detailList.initiatorRemark,
+          amount: -this.detailList.amount,
+        },
+        {
+          receiverWalletRebateId: this.detailList.receiverCustomerWalletId,
+          customerWalletName: this.detailList.receiverCustomerWalletName,
+          remark: this.detailList.receiverRemark,
+          amount: this.detailList.amount,
+        },
+      ];
+    },
+    //确定
+    async btnFn() {
+      console.log(this.detailList);
+      let receiverWalletRebateId;
+      let initiatorWalletRebateId;
+      let initiatorRemark;
+      let receiverRemark;
+      let amount;
+
+      initiatorWalletRebateId = this.dataList[0].initiatorWalletRebateId;
+      receiverWalletRebateId = this.dataList[1].receiverWalletRebateId;
+      initiatorRemark = this.dataList[0].remark;
+      receiverRemark = this.dataList[1].remark;
+      amount = this.dataList[1].amount;
+      await getTransferEdit({
+        id: this.detailList.id,
+        receiverWalletRebateId,
+        initiatorWalletRebateId,
+        receiverRemark,
+        initiatorRemark,
+        amount: amount * 1,
+      });
+      this.$message.success("修改成功");
+    },
     goBack() {
+      this.$emit("refresh");
       this.$parent.showPage = 1;
     },
   },

+ 116 - 21
src/views/finance/components/credit_list-detail.vue

@@ -16,22 +16,38 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="日期" prop="">
+            <el-form-item label="开始时间" prop="startTime">
               <el-date-picker
-                v-model="value1"
-                type="daterange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
+                class="selectStyle"
+                v-model="searchForm.startTime"
+                type="datetime"
+                placeholder="选择日期时间"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="结束时间" prop="endTime">
+              <el-date-picker
+                class="selectStyle"
+                v-model="searchForm.endTime"
+                type="datetime"
+                placeholder="选择日期时间"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
               >
               </el-date-picker>
             </el-form-item>
           </el-col>
 
-          <el-col :xs="24" :sm="24" :lg="18">
+          <el-col :xs="24" :sm="24" :lg="12">
             <el-form-item label="" class="fr">
-              <el-button size="small">清空</el-button>
-              <el-button size="small" type="primary">搜索</el-button>
+              <el-button size="small" @click="clearFn">清空</el-button>
+              <el-button size="small" type="primary" @click="searchFn"
+                >搜索</el-button
+              >
             </el-form-item>
           </el-col>
         </el-row>
@@ -40,7 +56,9 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fr">
-        <el-button type="primary" size="small">导出</el-button>
+        <el-button type="primary" size="small" @click="exportList"
+          >导出</el-button
+        >
       </div>
     </div>
     <!-- 列表 -->
@@ -58,55 +76,70 @@
           <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=""
+            prop="customerWalletName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="变更金额"
+            prop="amount"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="使用金额"
+            prop="useAmount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="变更额度"
-            prop=""
+            label="开始日期"
+            prop="startTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="总信用额度"
-            prop=""
+            label="结束日期"
+            prop="endTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="变更时间"
-            prop=""
+            prop="updateTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="变更人"
-            prop=""
+            prop="updateBy"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -115,6 +148,8 @@
       <!-- 分页 -->
       <div class="fr">
         <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-sizes="[10, 20, 30, 50]"
           :page-size="10"
@@ -128,18 +163,78 @@
 </template>
 
 <script>
+import { getCredit } from "@/api/finance/credit_list";
+import { downloadFiles } from "@/utils/util";
 export default {
+  props: {
+    recordsList: {
+      type: Object,
+      required: true,
+    },
+  },
   data() {
     return {
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      searchForm: {
+        startTime: "",
+        endTime: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
     };
   },
+  created() {
+    this.getDataList({
+      customerWalletCreditId: this.recordsList.id,
+
+      pageNum: this.currentPage,
+      pageSize: this.pageSize,
+    });
+  },
   methods: {
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
+    //导出
+    exportList() {
+      let screenData = {
+        customerWalletCreditId: this.recordsList.id,
+        startTime: this.searchForm.startTime,
+        endTime: this.searchForm.endTime,
+      };
+      downloadFiles("/credit/record/export", screenData);
+    },
+    //清除
+    clearFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      console.log(this.searchForm);
+      this.getDataList({
+        ...this.searchForm,
+        customerWalletCreditId: this.recordsList.id,
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+      });
+    },
+    //获取信用额度变更记录数据
+    async getDataList(data) {
+      const res = await getCredit(data);
+      console.log(res);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
     goBack() {
       this.$parent.showRecord = true;
     },

+ 275 - 44
src/views/finance/credit_list.vue

@@ -12,30 +12,44 @@
         >
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="经销商编码" prop="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="经销商编码" prop="customerNumber">
+                <el-input
+                  v-model="searchForm.customerNumber"
+                  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 label="经销商名称" prop="customerName">
+                <el-input
+                  v-model="searchForm.customerName"
+                  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 label="关联钱包" prop="walletName">
+                <el-input
+                  v-model="searchForm.walletName"
+                  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 label="总信用额度" prop="amount">
+                <el-input
+                  v-model="searchForm.amount"
+                  placeholder="请输入"
+                ></el-input>
               </el-form-item>
             </el-col>
 
             <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item label="" class="fr">
-                <el-button size="small">清空</el-button>
-                <el-button size="small" type="primary">搜索</el-button>
+                <el-button size="small" @click="clearFn">清空</el-button>
+                <el-button size="small" type="primary" @click="searchFn"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
@@ -47,12 +61,11 @@
           <el-button type="primary" size="small" @click="showAddFn"
             >新建</el-button
           >
-          <el-button type="primary" size="small" @click="recordFn"
-            >详情</el-button
-          >
         </div>
         <div class="fr">
-          <el-button type="primary" size="small">导出</el-button>
+          <el-button type="primary" size="small" @click="exportList"
+            >导出</el-button
+          >
           <el-button type="primary" size="small">打印</el-button>
         </div>
       </div>
@@ -71,41 +84,35 @@
             <el-table-column
               label="序号"
               align="center"
-              min-width="100"
+              type="index"
+              width="100"
               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=""
-              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="amount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="关联钱包"
-              prop=""
+              prop="customerWalletName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -115,11 +122,17 @@
               min-width="160"
               show-overflow-tooltip
             >
-              <template slot-scope="">
-                <el-button type="text" class="textColor" slot="reference"
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="editFn(scope.row)"
                   >设置额度</el-button
                 >
-                <el-button type="text" class="textColor" slot="reference"
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="recordFn(scope.row)"
                   >记录</el-button
                 >
               </template>
@@ -129,6 +142,8 @@
         <!-- 分页 -->
         <div class="fr">
           <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
@@ -139,31 +154,81 @@
         </div>
       </div>
     </div>
-    <CreditListDetail v-else />
+    <CreditListDetail :recordsList="recordsList" v-else />
     <!-- 新增弹窗 -->
     <el-dialog
-      title="提货人档案"
+      title="新增"
       :visible.sync="dialogForm"
       width="30%"
       :show-close="false"
       :close-on-click-modal="false"
     >
-      <el-form label-width="120px">
+      <el-form
+        ref="addForm"
+        :rules="rules"
+        :model="addForm"
+        label-width="120px"
+      >
         <el-form-item label="经销商名称" prop="customerId" label-width="120px">
-          <el-select class="selectStyle" placeholder="请选择">
-            <el-option> </el-option>
+          <el-select
+            v-model="addForm.customerId"
+            class="selectStyle"
+            placeholder="请选择"
+            filterable
+            @change="customerChangeFn"
+          >
+            <el-option
+              v-for="v in customerList"
+              :key="v.id"
+              :label="v.name"
+              :value="v.id"
+            >
+            </el-option>
           </el-select>
         </el-form-item>
 
-        <el-form-item label="信用变更额度" prop="">
-          <el-input></el-input>
+        <el-form-item label="信用变更额度" prop="amount">
+          <el-input v-model.number="addForm.amount"></el-input>
         </el-form-item>
 
-        <el-form-item label="关联钱包" prop="customerId">
-          <el-select class="selectStyle" placeholder="请选择">
-            <el-option> </el-option>
+        <el-form-item label="关联钱包" prop="customerWalletId">
+          <el-select
+            v-model="addForm.customerWalletId"
+            class="selectStyle"
+            placeholder="请选择"
+            filterable
+          >
+            <el-option
+              v-for="v in customerWalletList"
+              :key="v.customerWalletId"
+              :label="v.mainName"
+              :value="v.customerWalletId"
+            >
+            </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="开始时间" prop="startTime">
+          <el-date-picker
+            class="selectStyle"
+            v-model="addForm.startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            default-time="00:00:00"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="结束时间" prop="endTime">
+          <el-date-picker
+            class="selectStyle"
+            v-model="addForm.endTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            default-time="00:00:00"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancelFn">取 消</el-button>
@@ -174,7 +239,15 @@
 </template>
 
 <script>
+import { getWalletCustomerList } from "@/api/finance/change_apply";
+import { getDealerList } from "@/api/basic_data/dealer";
+import {
+  getCreditListAdd,
+  getCreditList,
+  getCreditListEdit,
+} from "@/api/finance/credit_list";
 import CreditListDetail from "./components/credit_list-detail";
+import { downloadFiles } from "@/utils/util";
 export default {
   components: {
     CreditListDetail,
@@ -185,24 +258,182 @@ export default {
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      searchForm: {
+        customerNumber: "",
+        customerName: "",
+        amount: "",
+        walletName: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
       showRecord: true,
       dialogForm: false, //弹窗表单
+      addForm: {
+        startTime: "",
+        endTime: "",
+        amount: null,
+        customerId: "",
+        customerWalletId: "",
+      },
+      customerList: [], //经销商列表数据
+      customerWalletList: [], //经销商钱包列表
+      recordsList: {}, //记录数据
+      customerWalletCreditId: null, //设置额度ID
+      rules: {
+        startTime: [
+          { required: true, message: "请选择开始时间", trigger: "blur" },
+        ],
+        endTime: [
+          { required: true, message: "请选择结束时间", trigger: "blur" },
+        ],
+        amount: [
+          {
+            required: true,
+            message: "请输入数字",
+            type: "number",
+            trigger: "blur",
+          },
+        ],
+        customerId: [
+          { required: true, message: "请选择经销商", trigger: "blur" },
+        ],
+        customerWalletId: [
+          { required: true, message: "请选择钱包", trigger: "blur" },
+        ],
+      },
     };
   },
+  created() {
+    this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+    this.getDealerData({ pageSize: -1, pageNum: 1 });
+  },
   methods: {
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
+    //设置额度
+    editFn(value) {
+      this.customerWalletCreditId = value.id;
+
+      this.addForm = {
+        startTime: "",
+        endTime: "",
+        amount: value.amount,
+        customerId: value.customerId,
+        customerWalletId: value.customerWalletId,
+      };
+      this.getWalletData({ type: "COMMONLY", customerId: value.customerId });
+
+      this.dialogForm = true;
+    },
+    //导出
+    exportList() {
+      let screenData = {
+        amount: this.searchForm.amount,
+        customerNumber: this.searchForm.customerNumber,
+        customerName: this.searchForm.customerName,
+        walletName: this.searchForm.walletName,
+      };
+      downloadFiles("/credit/exportData", screenData);
+    },
+    //清空
+    clearFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      this.getDataList({
+        ...this.searchForm,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      });
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
+    //列表数据
+    async getDataList(data) {
+      const res = await getCreditList(data);
+      console.log(res);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
+    //下拉框数据
+    customerChangeFn(value) {
+      this.getWalletData({ type: "COMMONLY", customerId: value });
+    },
+    //获取经销商钱包列表
+    async getWalletData(data) {
+      const res = await getWalletCustomerList(data);
+
+      this.customerWalletList = res.data;
+    },
+    //获取经销商列表
+    async getDealerData(data) {
+      const res = await getDealerList(data);
+
+      this.customerList = res.data.records;
+    },
     //新建
     showAddFn() {
       this.dialogForm = true;
     },
     //确定
-    addDataFn() {},
+    async addDataFn() {
+      await this.$refs.addForm.validate();
+
+      if (this.customerWalletCreditId) {
+        await getCreditListEdit({
+          ...this.addForm,
+          customerWalletCreditId: this.customerWalletCreditId,
+        });
+        this.$message.success("设置成功");
+      } else {
+        await getCreditListAdd({ ...this.addForm });
+        this.$message.success("新增成功");
+      }
+      this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+      this.addForm = {
+        startTime: "",
+        endTime: "",
+        amount: null,
+        customerId: "",
+        customerWalletId: "",
+      };
+      this.customerWalletCreditId = null;
+      this.dialogForm = false;
+    },
     //取消
-    cancelFn() {
+    async cancelFn() {
+      // this.addForm = {
+      //   startTime: "",
+      //   endTime: "",
+      //   amount: null,
+      //   customerId: "",
+      //   customerWalletId: "",
+      // };
+      await this.$refs.addForm.resetFields();
+      this.customerWalletCreditId = null;
       this.dialogForm = false;
     },
-    recordFn() {
+    //记录
+    recordFn(v) {
+      this.recordsList = v;
       this.showRecord = false;
     },
   },

+ 224 - 59
src/views/finance/standbook_list.vue

@@ -2,15 +2,18 @@
   <div class="app-container">
     <span>台账</span>
     <el-divider></el-divider>
-    <el-radio-group v-model="category" size="">
-      <el-radio-button label="家用空调"></el-radio-button>
-      <el-radio-button label="商用空调"></el-radio-button>
-      <el-radio-button label="生活电器"></el-radio-button>
+    <el-radio-group v-model="mainId" size="">
+      <el-radio-button
+        v-for="v in dictList"
+        :key="v.sysDictId"
+        :label="v.dictCode"
+        >{{ v.dictValue }}</el-radio-button
+      >
     </el-radio-group>
     <br /><br />
-    <el-radio-group v-model="bill" size="">
-      <el-radio-button label="贷款台账"></el-radio-button>
-      <el-radio-button label="返利台账"></el-radio-button>
+    <el-radio-group v-model="bill" @change="checkFn" size="">
+      <el-radio-button label="COMMONLY">贷款台账</el-radio-button>
+      <el-radio-button label="REBATE">返利台账</el-radio-button>
     </el-radio-group>
     <h1></h1>
     <!-- 筛选条件 -->
@@ -24,39 +27,69 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="钱包" prop="">
-              <el-select class="selectStyle" placeholder="请选择">
-                <el-option> </el-option>
+            <el-form-item label="钱包" prop="walletRebateId">
+              <el-select
+                class="selectStyle"
+                v-model="searchForm.walletRebateId"
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="v in selectList"
+                  :key="v.walletRebateId"
+                  :label="v.name"
+                  :value="v.walletRebateId"
+                >
+                </el-option>
               </el-select>
             </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 label="单据号" prop="billNo">
+              <el-input
+                v-model="searchForm.billNo"
+                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"
+                type="datetime"
+                placeholder="选择日期时间"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="日期时间" prop="">
+            <el-form-item label="结束时间" prop="endTime">
               <el-date-picker
-                type="datetimerange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
+                class="selectStyle"
+                v-model="searchForm.endTime"
+                type="datetime"
+                placeholder="选择日期时间"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
               >
               </el-date-picker>
             </el-form-item>
           </el-col>
 
-          <el-col :xs="24" :sm="24" :lg="6">
+          <el-col :xs="24" :sm="24" :lg="24">
             <el-form-item label="" class="fr">
-              <el-button size="small">清空</el-button>
-              <el-button size="small" type="primary">搜索</el-button>
+              <el-button size="small" @click="resetFn">清空</el-button>
+              <el-button size="small" type="primary" @click="searchFn"
+                >搜索</el-button
+              >
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
     </div>
-    <div v-show="bill == '贷款台账'">
+    <div v-show="bill == 'COMMONLY'">
       <!-- 列表 -->
       <div class="mymain-container">
         <div class="table">
@@ -72,90 +105,115 @@
             <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="theTime"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="单据类型"
-              prop=""
+              prop="billType"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="单据号"
-              prop=""
+              prop="billNo"
               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="remark"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="预付货款"
-              prop=""
+              prop="flag"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 1 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="订单占款"
-              prop=""
+              prop="flag"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 2 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="支付货款"
-              prop=""
+              prop="flag"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 3 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="押金"
-              prop=""
+              prop="flag"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 4 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="工程保证金"
-              prop=""
+              prop="flag"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 5 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="其他暂扣款"
-              prop=""
+              prop="flag"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 6 ? 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>
@@ -164,6 +222,8 @@
         <!-- 分页 -->
         <div class="fr">
           <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
@@ -174,7 +234,7 @@
         </div>
       </div>
     </div>
-    <div v-show="bill == '返利台账'">
+    <div v-show="bill == 'REBATE'">
       <!-- 列表 -->
       <div class="mymain-container">
         <div class="table">
@@ -190,79 +250,88 @@
             <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="customerCode"
               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="theTime"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="审核日期"
-              prop=""
+              prop="examineTime"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="单据类型"
-              prop=""
+              prop="billType"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="单据号"
-              prop=""
+              prop="billNo"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="返利品类"
-              prop=""
+              prop="mainName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="摘要"
-              prop=""
+              prop="remark"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="收入"
-              prop=""
+              prop="amountType"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.amountType == "IN" ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="支出"
-              prop=""
+              prop="amountType"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ scope.row.amountType == "OUT" ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="暂扣返利"
@@ -282,6 +351,8 @@
         <!-- 分页 -->
         <div class="fr">
           <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
@@ -296,20 +367,114 @@
 </template>
 
 <script>
+import { mapGetters } from "vuex";
+import { getWalletCustomerList } from "@/api/finance/change_apply";
+import { getStandbookList, getDictList } from "@/api/finance/standbook_list";
 export default {
   data() {
     return {
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
-      dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      // dataListRebate: [], // 列表数据
+      // dataListLoan: [], // 列表数据
+      dataList: [],
+      selectList: [],
+      dictList: [],
+
+      searchForm: {
+        startTime: "",
+        endTime: "",
+        billNo: "",
+        walletRebateId: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
-      category: "家用空调",
-      bill: "贷款台账",
+      mainId: "",
+      bill: "COMMONLY",
     };
   },
-  methods: {},
+  computed: {
+    ...mapGetters(["customerId"]),
+  },
+  created() {
+    this.getDataList({
+      pageSize: this.pageSize,
+      pageNum: this.currentPage,
+      type: this.bill,
+    });
+    this.getWalletList();
+    this.getDataDict();
+  },
+  methods: {
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
+    //获取品类
+    async getDataDict() {
+      const res = await getDictList({ sysDictEnum: "PRODUCT_TYPE" });
+      console.log(res);
+      this.dictList = res.data;
+    },
+    //重置
+    resetFn() {
+      this.mainId = "";
+      this.$refs.searchForm.resetFields();
+    },
+    //查询
+    searchFn() {
+      // console.log(this.searchForm);
+      // const res = this.selectList.filter(
+      //   (v) => v.walletRebateId == this.searchForm.walletRebateId
+      // );
+      // console.log(res);
+      this.getDataList({
+        ...this.searchForm,
+        mainId: this.mainId,
+        type: this.bill,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      });
+    },
+
+    //钱包数据
+    async getWalletList() {
+      let res = await getWalletCustomerList({
+        customerId: this.customerId,
+        type: this.bill,
+      });
+      this.selectList = res.data;
+    },
+    //切换列表
+    checkFn(v) {
+      console.log(v);
+      this.getDataList({
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        type: v,
+      });
+      this.getWalletList();
+    },
+    //
+    async getDataList(data) {
+      let res;
+      if (this.bill == "COMMONLY") {
+        res = await getStandbookList(data);
+      } else {
+        res = await getStandbookList(data);
+      }
+
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
+  },
 };
 </script>
 

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

@@ -6,7 +6,9 @@
       </el-col>
       <el-col :xs="24" :sm="12" :lg="12">
         <div class="fr">
-          <el-button size="small" type="primary">一键生成钱包</el-button>
+          <el-button size="small" type="primary" @click="generateFn"
+            >一键生成钱包</el-button
+          >
         </div>
       </el-col>
     </el-row>
@@ -16,7 +18,7 @@
       <div class="table">
         <el-table
           v-loading="listLoading"
-          :data="dataList"
+          :data="walletList"
           element-loading-text="Loading"
           border
           fit
@@ -26,28 +28,28 @@
           <el-table-column
             align="center"
             label="钱包类型"
-            prop=""
+            prop="type"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="钱包"
-            prop=""
+            prop="name"
             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>
           <el-table-column
             align="center"
             label="更新时间"
-            prop=""
+            prop="updateTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -61,7 +63,7 @@
       <div class="table">
         <el-table
           v-loading="listLoading"
-          :data="dataList"
+          :data="rebateList"
           element-loading-text="Loading"
           border
           fit
@@ -71,21 +73,21 @@
           <el-table-column
             align="center"
             label="返利钱包"
-            prop=""
+            prop="name"
             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>
           <el-table-column
             align="center"
             label="更新时间"
-            prop=""
+            prop="updateTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -96,7 +98,47 @@
 </template>
 
 <script>
-export default {};
+import { mapGetters } from "vuex";
+import { getfinanceInit } from "@/api/finance/wallet";
+import { getWalletCustomerList } from "@/api/finance/change_apply";
+export default {
+  data() {
+    return {
+      listLoading: false, // 列表加载loading
+      walletList: [],
+      rebateList: [],
+    };
+  },
+  created() {
+    this.getDataWallet();
+    this.getDataRebate();
+  },
+  computed: {
+    ...mapGetters(["customerId"]),
+  },
+  methods: {
+    //一键生成
+    async generateFn() {
+      await getfinanceInit({ customerId: this.customerId });
+      this.$message.success("已生成");
+    },
+    //
+    async getDataRebate() {
+      let res = await getWalletCustomerList({
+        customerId: this.customerId,
+        type: "REBATE",
+      });
+      this.rebateList = res.data;
+    },
+    async getDataWallet() {
+      let res = await getWalletCustomerList({
+        customerId: this.customerId,
+        type: "COMMONLY",
+      });
+      this.walletList = res.data;
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>