huangbin 4 лет назад
Родитель
Сommit
eb52804ac1

+ 5 - 0
src/common/setup/table/interface.ts

@@ -75,7 +75,12 @@ export interface ButtonListKey {
     spot_report_spot: string; // 现货报表
     inventory_report_inventory: string; // 库存报表
 
+    /********* =================== 千海金=================== **********/
     platinum_custom_info_normal: string; // 千海金 客户资料 正常
     platinum_customer_info_unsubmit: string; // 千海金 客户资料 待审核
     platinum_customer_info_stop: string; // 千海金 客户资料 停用
+
+    platinum_withdrawal_review_tab: string; // 千海金 提现审核
+    platinum_recharge_review_tab: string; // 千海金 充值审核
+
 }

+ 10 - 13
src/views/platinum/platinum_recharge_withdrawal_review/compoments/filter/index.vue

@@ -1,7 +1,11 @@
 <template>
   <!-- 过滤 -->
   <div class="filterTable">
-
+    <a-range-picker v-model:value="date"
+                    class="commonPicker"
+                    style="width: 200px"
+                    :show-time="{hideDisabledOptions: true}"
+                    format="YYYY-MM-DD" />
     <FilterOption :selectList="selectList"
                   :inputList="inputList"
                   :fixedBtnList="fixedBtnList" />
@@ -11,27 +15,20 @@
 
 <script lang="ts">
 import FilterOption from '@/common/components/filter/index.vue';
-import { defineComponent } from 'vue';
+import { defineComponent, ref } from 'vue';
 import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
+import { Moment } from 'moment';
 
 export default defineComponent({
     name: 'filter-withdrawal_review',
     components: { FilterOption },
     setup(props, context) {
-        const select: SelectList[] = [
-            {
-                value: undefined,
-                key: 'userinfotype',
-                placeholder: '全部客户类型',
-                list: [
-                    { value: 1, lable: '个人' },
-                    { value: 2, lable: '企业' },
-                ],
-            },
-        ];
+        const date = ref<Moment[]>([]);
+        const select: SelectList[] = [];
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'account' }];
         const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
         return {
+            date,
             selectList,
             inputList,
             fixedBtnList,

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

@@ -1,8 +1,19 @@
+
+
 <template>
   <!-- 充值审核 -->
-  <div>platinum_recharge_review_tab</div>
+  <div class="platinum_recharge_review_tab">
+    <Filter />
+  </div>
 </template>
 
 <script lang="ts">
-export default {};
+import { defineComponent } from '@/common/export/table';
+import Filter from '../../compoments/filter/index.vue'
+
+export default defineComponent({
+    name: 'platinum_recharge_review_tab',
+    components: {Filter},
+    setup() {},
+});
 </script>

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

@@ -1,8 +1,70 @@
 <template>
   <!-- 提现审核 -->
-  <div>platinum_withdrawal_review_tab</div>
+  <div class="platinum_withdrawal_review_tab">
+    <Filter></Filter>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="firstBtn"
+                   @onClick="btnClick" />
+        </template>
+      </a-table>
+    </contextMenu>
+  </div>
 </template>
 
 <script lang="ts">
-export default {};
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
+import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
+import Filter from '../../compoments/filter/index.vue';
+import { queryTableList } from './setup';
+
+export default defineComponent({
+    name: 'platinum_withdrawal_review_tab',
+    components: { Filter, contextMenu, BtnList },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        // 表格操作按钮列表
+        const [firstBtn] = _getBtnList('platinum_withdrawal_review_tab', false).value;
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList('1');
+        initData(() => {
+            // 获取列表数据
+            queryTable();
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
+        });
+
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
+
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            firstBtn,
+            loading,
+            tableList,
+            search,
+            queryTable,
+            btnClick,
+        };
+    },
+});
 </script>

+ 34 - 0
src/views/platinum/platinum_recharge_withdrawal_review/list/withdrawal/setup.ts

@@ -0,0 +1,34 @@
+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 { ref } from 'vue';
+
+
+/**
+ * 获取表格列表数据
+ * @param type 
+ * @returns 
+ */
+export function queryTableList(type: string) {
+    // 加载状态
+    const loading = ref<boolean>(false);
+    // 表格数据
+    const tableList = ref<ErmcpWareHouseInfo[]>([]);
+    function queryTable() {
+        QueryWareHouse(type)
+            .then((res) => {
+                tableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', tableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    return { loading, tableList, queryTable }
+}
+
+