Explorar o código

fix:交易记录页面布局修改+字段调整

lazy hai 2 meses
pai
achega
94662c1752

+ 2 - 1
src/store/modules/constant.js

@@ -42,7 +42,8 @@ export default {
       bocomCustomerStatus: [], // 会员信息管理 - 客户状态
       bocomCustomerStages: [], // 会员信息管理 - 客户阶段
       bocomApiInterface: [], // 会员接口管理 -
-      bocomTransState: [] // 会员账户-资金管理-交易记录-交易状态
+      bocomTransState: [], // 会员账户-资金管理-交易记录-交易状态
+      bocomTransRecordsFundSource: [] // 会员账户-资金管理-交易记录-资金来源
     }
   },
   mutations: {

+ 168 - 74
src/views/cyAccountManage/memberFundManage/transactionRecord.vue

@@ -1,72 +1,87 @@
 <template>
   <div class="transaction-box">
-    <div class="search">
-      <div />
-      <div class="right">
-        <div>
-          <el-input v-model="search.number" placeholder="请输入平台订单号" />
-        </div>
-        <div>
-          <el-input v-model="search.counterpartyInfo" placeholder="请输入对方账号" />
-        </div>
-        <div>
-          <el-input v-model="search.accountName" placeholder="请输入账号/户名" />
-        </div>
-        <div>
-          <el-select v-model="search.incomeExpenditureType" placeholder="请选择收支类型" clearable>
-            <el-option
-              v-for="item in constant.incomeExpenditureType"
-              :key="item.code"
-              :label="item.name"
-              :value="item.code"
-            />
-          </el-select>
-        </div>
-        <div>
-          <el-select v-model="search.businessType" placeholder="请选择业务类型" clearable>
-            <el-option
-              v-for="item in constant.fundBusinessType"
-              :key="item.code"
-              :label="item.name"
-              :value="item.code"
-            />
-          </el-select>
-        </div>
-        <div>
-          <el-select v-model="search.txnStatus" placeholder="请选择交易状态" clearable>
-            <el-option
-              v-for="item in constant.bocomTransState"
-              :key="item.code"
-              :label="item.name"
-              :value="item.code"
-            />
-          </el-select>
-        </div>
-        <div>
-          <el-date-picker
-            v-model="search.date"
-            type="daterange"
-            unlink-panels
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            value-format="yyyy-MM-dd"
-            style="width: 260px"
-          >
-          </el-date-picker>
-        </div>
-        <div>
-          <el-button type="primary" @click="fetchData('all')">查询</el-button>
+    <el-tabs v-model="activeName" type="border-card" @tab-click="handleTabClick">
+      <el-tab-pane label="静默户" name="default"></el-tab-pane>
+      <el-tab-pane label="登记薄" name="register"></el-tab-pane>
+      <div class="search">
+        <div />
+        <div class="right">
+          <div>
+            <el-input v-model="search.number" placeholder="请输入平台订单号" />
+          </div>
+          <div>
+            <el-input v-model="search.counterpartyInfo" placeholder="请输入对方账号" />
+          </div>
+          <div>
+            <el-input v-model="search.accountName" placeholder="请输入账号/户名" />
+          </div>
+          <div>
+            <el-select v-model="search.incomeExpenditureType" placeholder="请选择收支类型" clearable>
+              <el-option
+                v-for="item in constant.incomeExpenditureType"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              />
+            </el-select>
+          </div>
+          <div>
+            <el-select v-model="search.businessType" placeholder="请选择业务类型" clearable>
+              <el-option
+                v-for="item in constant.fundBusinessType"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              />
+            </el-select>
+          </div>
+          <div>
+            <el-select v-model="search.txnStatus" placeholder="请选择交易状态" clearable>
+              <el-option
+                v-for="item in constant.bocomTransState"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              />
+            </el-select>
+          </div>
+          <div>
+            <el-select v-model="search.fundSource" placeholder="请选择资金来源" clearable>
+              <el-option
+                v-for="item in constant.bocomTransRecordsFundSource"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              />
+            </el-select>
+          </div>
+          <div>
+            <el-date-picker
+              v-model="search.date"
+              type="daterange"
+              unlink-panels
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              value-format="yyyy-MM-dd"
+              style="width: 260px"
+            >
+            </el-date-picker>
+          </div>
+          <div>
+            <el-button type="primary" @click="fetchData('all')">查询</el-button>
+          </div>
         </div>
       </div>
-    </div>
-    <cy-comm-table
-      ref="commTable"
-      v-loading="loading"
-      :columns="columns"
-      :data="tableData"
-      :count="total"
-    />
+      <cy-comm-table
+        ref="commTable"
+        v-loading="loading"
+        :table-options="getTableOptions()"
+        :columns="columns"
+        :data="tableData"
+        :count="total"
+      />
+    </el-tabs>
   </div>
 </template>
 
@@ -90,6 +105,7 @@ export default {
         incomeExpenditureType: '',
         businessType: '',
         txnStatus: '',
+        fundSource: '',
         date: [],
         startDate: '',
         endDate: ''
@@ -99,6 +115,8 @@ export default {
       page: 1,
       size: 10,
       tableData: [],
+      tableKey: 1,
+      activeName: 'default',
       columns: [
         {
           label: '序号',
@@ -131,7 +149,7 @@ export default {
           showTooltip: true,
           render: (h, row) => {
             return (
-              <div>{ row.accountStatus === 1 ? '支出' : '收入' }</div>
+              <div>{ row.incomeExpenditureType === 1 ? '支出' : '收入' }</div>
             )
           }
         },
@@ -146,16 +164,48 @@ export default {
         },
         {
           label: '资金来源',
+          prop: 'fundSource',
+          showTooltip: true
+        },
+        {
+          label: '是否解冻',
+          showTooltip: true,
+          render: (h, row) => {
+            if (row.thaw === 0) {
+              return (
+                <div>否</div>
+              )
+            }
+            if (row.thaw === 1) {
+              return (
+                <div>是</div>
+              )
+            }
+            if (row.thaw === 2) {
+              return (
+                <div>待查</div>
+              )
+            }
+            return (<div></div>)
+          }
+        },
+        {
+          label: '是否划扣',
           showTooltip: true,
           render: (h, row) => {
-            if (row.fundSource === 0) {
+            if (row.buckling === 0) {
               return (
-                <div>实体卡</div>
+                <div>否</div>
+              )
+            }
+            if (row.buckling === 1) {
+              return (
+                <div>是</div>
               )
             }
-            if (row.fundSource === 1) {
+            if (row.buckling === 2) {
               return (
-                <div>静默户</div>
+                <div>待查</div>
               )
             }
             return (<div></div>)
@@ -176,6 +226,11 @@ export default {
                 <div>是</div>
               )
             }
+            if (row.toInkasso === 2) {
+              return (
+                <div>待查</div>
+              )
+            }
             return (<div></div>)
           }
         },
@@ -311,11 +366,48 @@ export default {
     ...mapGetters(['constant'])
   },
   mounted() {
-    this.$store.dispatch('getConstant', ['bocomTransState'])
+    this.$store.dispatch('getConstant', ['bocomTransState', 'bocomTransRecordsFundSource'])
 
     this.fetchData()
   },
   methods: {
+    handleTabClick(tab) {
+      this.activeName = tab.name
+      this.initSearch()
+      if (this.activeName === 'default') {
+        this.fetchData()
+      } else if (this.activeName === 'register') {
+        this.fetchData()
+      }
+    },
+    initSearch() {
+      this.page = 1
+      this.size = 10
+      this.search.number = ''
+      this.search.counterpartyInfo = ''
+      this.search.accountName = ''
+      this.search.incomeExpenditureType = ''
+      this.search.businessType = ''
+      this.search.txnStatus = ''
+      this.search.fundSource = ''
+      this.search.date = []
+      this.search.startDate = ''
+      this.search.endDate = ''
+    },
+    getTableOptions() {
+      if (this.total > 0) {
+        return {
+          sortTable: true,
+          maxHeight: 'calc(100vh - 456px)',
+          height: 'calc(100vh - 456px)'
+        }
+      }
+      return {
+        sortTable: true,
+        maxHeight: 'calc(100vh - 360px)',
+        height: 'calc(100vh - 360px)'
+      }
+    },
     async fetchData(type) {
       if (type === 'all') {
         this.size = 10
@@ -333,7 +425,8 @@ export default {
         rows: this.size,
         Loading: true,
         accountNumber: this.$route.query.accNumber,
-        billFlow: 0
+        billFlow: 0,
+        isVipAccount: this.activeName === 'default' ? 0 : 1
       })
 
       console.log('fetchData ---', res)
@@ -373,8 +466,9 @@ export default {
         1: '入账',
         2: '内部转入',
         3: '内部转出',
-        4: '提款',
-        5: '解冻'
+        4: '提现',
+        5: '解冻',
+        6: '划扣'
       }
       if (!status) return ''
       return map[status] || []