Kaynağa Gözat

修改充值和提现

huangbin 4 yıl önce
ebeveyn
işleme
a2836ed274

+ 3 - 1
src/common/setup/table/clolumn.ts

@@ -38,15 +38,17 @@ export function getTableColumns() {
                 align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
                 slots: { customRender: columnfield },
             };
+            // 序号
             if (columntitle === '序号') {
                 item.customRender = (obj: any) => `${obj.index + 1}`
             }
+            // 设置表格宽度,默认120
             if (columnwidth && columnwidth !== '0') {
                 item.width = +columnwidth
             } else {
                 item.width = 120 // 默认120
             }
-
+            // 数据格式化
             if (formatterstring) {
                 const fn = getFromatterFn(formatterstring)
                 if (fn) {

+ 19 - 1
src/views/platinum/platinum_recharge_withdrawal_review/compoments/filter/index.vue

@@ -18,6 +18,8 @@ import FilterOption from '@/common/components/filter/index.vue';
 import { defineComponent, ref } from 'vue';
 import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
+import { formatTime } from '@/common/methods/format';
+import { SlotParam } from '@/common/setup/filter/interface';
 
 export default defineComponent({
     name: 'filter-withdrawal_review',
@@ -26,7 +28,23 @@ export default defineComponent({
         const date = ref<Moment[]>([]);
         const select: SelectList[] = [];
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'accountcode' }];
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
+
+        const slotParam: SlotParam = {
+            search(result: any) {
+                const fn = (value: Moment) => {
+                    return formatTime(value, 'd') + ' ' + '00:00:00';
+                };
+                const time = date.value;
+                if (time.length > 1) {
+                    result.begindate = fn(date.value[0]);
+                    result.enddate = fn(date.value[1]);
+                }
+            },
+            reset() {
+                date.value = [];
+            },
+        };
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
         return {
             date,
             selectList,

+ 2 - 3
src/views/platinum/platinum_recharge_withdrawal_review/list/recharge/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 充值审核 -->
   <div class="platinum_recharge_review_tab">
-    <Filter />
+    <Filter @search="search" />
     <contextMenu :contextMenuList="firstBtn">
       <a-table :columns="columns"
                class="topTable hiddenFirstCol"
@@ -44,8 +44,7 @@ export default defineComponent({
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_recharge_review', ['warehousetype', 'warehousename', 'address']);
-            // registerColumn('table_pcweb_qhj_withdrawal_review', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_recharge_review', ['accountcode']);
         });
 
         // 查询

+ 11 - 40
src/views/platinum/platinum_recharge_withdrawal_review/list/setup.ts

@@ -1,49 +1,20 @@
-import { QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
-import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
-import { message } from 'ant-design-vue';
+import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { queryAccountInOutApply } from '@/services/go/ermcp/qhj';
+import { QhjAccountOutInApply } from '@/services/go/ermcp/qhj/interface';
 import { ref } from 'vue';
 
-// export function queryTableList(type: 'in' | 'out') {
-//     // 加载状态
-//     const loading = ref<boolean>(false);
-//     // 表格数据
-//     const tableList = ref<QhjAccountOutInApply[]>([]);
-//     function queryTable() {
-//         queryResultLoadingAndInfo(queryAccountInOutApply, loading)
-//             .then(res => {
-//                 //申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
-//                 const arr = type === 'in' ? [1, 3, 5, 7] : [2, 4, 6, 8]
-//                 tableList.value = res.filter((e: QhjAccountOutInApply) => arr.includes(e.executetype)).map((e: QhjAccountOutInApply, i: number) => {
-//                     return { ...e, key: String(i) };
-//                 });
-//             })
-//     }
-//     return { loading, tableList, queryTable }
-// }
-
-/**
- * 获取表格列表数据
- * @param type 
- * @returns 
- */
-export function queryTableList(type: string) {
+export function queryTableList(type: 'in' | 'out') {
     // 加载状态
     const loading = ref<boolean>(false);
     // 表格数据
-    const tableList = ref<ErmcpWareHouseInfo[]>([]);
+    const tableList = ref<QhjAccountOutInApply[]>([]);
     function queryTable() {
-        QueryWareHouse('1')
-            .then((res) => {
-                tableList.value = res.map((e, i) => {
-                    return { ...e, key: String(i) };
-                });
-                loading.value = false;
-                console.log('查询列表', tableList);
+        queryResultLoadingAndInfo(queryAccountInOutApply, loading)
+            .then(res => {
+                //申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
+                const arr = type === 'in' ? [1, 3, 5, 7] : [2, 4, 6, 8]
+                tableList.value = res.filter((e: QhjAccountOutInApply) => arr.includes(e.executetype))
             })
-            .catch((err) => {
-                message.error(err);
-                loading.value = false;
-            });
     }
     return { loading, tableList, queryTable }
-}
+}

+ 2 - 2
src/views/platinum/platinum_recharge_withdrawal_review/list/withdrawal/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 提现审核 -->
   <div class="platinum_withdrawal_review_tab">
-    <Filter></Filter>
+    <Filter @search="search"></Filter>
     <contextMenu :contextMenuList="forDataBtn">
       <a-table :columns="columns"
                class="topTable hiddenFirstCol"
@@ -44,7 +44,7 @@ export default defineComponent({
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_withdrawal_review', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_withdrawal_review', ['accountcode']);
         });
 
         // 查询