huangbin 4 anni fa
parent
commit
623e7cb220

+ 1 - 0
src/common/constants/buttonType.ts

@@ -116,4 +116,5 @@ export interface ButtonType {
     platinum_pick_query_upload_logistics: string; // 千海金 提货查询 上传物流
     platinum_pick_query_receipt: string; // 千海金 提货查询 确认收货
     platinum_pick_query_confirm_pickup: string; // 千海金 提货查询 确认提货
+    platinum_financing_information_detail: string; // 千海金 融资明细
 }

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

@@ -91,4 +91,6 @@ export interface ButtonListKey {
     platinum_document_query_order: string; // 千海金 单据查询 委托单
     platinum_document_query_waiting: string; // 千海金 单据查询 待付单
     platinum_document_query_success: string; // 千海金 单据查询 成交单
+    platinum_financing_information_tab: string; // 千海金 融资信息
+}
 }

+ 78 - 0
src/views/platinum/platinum_financing_information/list/tab/compoments/detail/index.vue

@@ -0,0 +1,78 @@
+<template>
+  <a-modal class="add-custom custom-detail"
+           title="融资明细"
+           centered
+           v-model:visible="visible"
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading.loading"
+                @click="cancel">关闭</a-button>
+    </template>
+    <Des :list="desList" />
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import { formatValue } from '@/common/methods';
+import { Des, handleDesList } from '@/common/components/commonDes';
+import { closeModal } from '@/common/setup/modal';
+
+export default defineComponent({
+    name: 'platinum_financing_information_detail',
+    components: { Des },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props) {
+        const { visible, cancel } = closeModal('platinum_financing_information_detail');
+        const loading = ref<boolean>(false);
+        const { desList, getDesList } = handleDesList();
+
+        watchEffect(() => {
+            // if (props.selectedRow.customername) {
+            const data = props.selectedRow;
+            // 个人
+            const person = [
+                { label: '客户类型', value: '个人' },
+                { label: '姓名', value: data.customername },
+                { label: '身份证号码', value: formatValue(data.cardnum) },
+                { label: '手机号码', value: formatValue(data.mobile) },
+                { label: '邮箱', value: formatValue(data.email) },
+                { label: '联系电话', value: formatValue(data.telphone) },
+                { label: '通讯地址', value: formatValue(data.address) },
+                { label: '备注', value: formatValue(data.remark) },
+            ];
+            getDesList(person);
+            // }
+        });
+        return {
+            desList,
+            cancel,
+            visible,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+    .upload {
+        .look {
+            margin-left: 0;
+        }
+    }
+}
+</style>;

+ 72 - 0
src/views/platinum/platinum_financing_information/list/tab/compoments/filter/index.vue

@@ -0,0 +1,72 @@
+<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" />
+    <slot></slot>
+  </div>
+</template>
+
+<script lang="ts">
+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';
+
+export default defineComponent({
+    name: 'filter-platinum_pick_query',
+    components: { FilterOption },
+    setup(props, context) {
+        const date = ref<Moment[]>([]);
+        const select: SelectList[] = [
+            {
+                value: undefined,
+                key: 'contracttype1',
+                placeholder: '账号类型',
+                list: [
+                    { value: 1, lable: '个人' },
+                    { value: -1, lable: '企业' },
+                ],
+            },
+            {
+                value: undefined,
+                key: 'contracttype2',
+                placeholder: '选择商品',
+                list: [
+                    { value: 1, lable: '采购' },
+                    { value: -1, lable: '销售' },
+                ],
+            },
+        ];
+        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'account' }];
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
+        return {
+            date,
+            selectList,
+            inputList,
+            fixedBtnList,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.filterTable {
+    .commonPicker.ant-calendar-picker {
+        display: inline-flex;
+        padding-top: 9px;
+        padding-bottom: 6px;
+        margin-right: 10px;
+        .ant-input {
+            border: 0;
+            background: @m-grey9;
+        }
+    }
+}
+</style>;

+ 69 - 2
src/views/platinum/platinum_financing_information/list/tab/index.vue

@@ -1,8 +1,75 @@
 <template>
   <!-- 融资信息 -->
-  <div>融资信息</div>
+  <div class="platinum_financing_information_tab">
+    <Filter />
+    <contextMenu :contextMenuList="firstBtn">
+      <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>
+    <Detail :selectedRow="selectedRow" />
+    <!-- <ControlModal :selectedRow="selectedRow" /> -->
+  </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';
+import Detail from './compoments/detail/index.vue';
+// import ControlModal from './compoments/controlModal/index.vue';
+
+export default defineComponent({
+    name: 'platinum_financing_information_tab',
+    components: { Filter, contextMenu, BtnList, Detail },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        // 表格操作按钮列表
+        const [firstBtn] = _getBtnList('platinum_financing_information_tab', false).value;
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList('in');
+        initData(() => {
+            // 获取列表数据
+            queryTable();
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
+            // registerColumn('table_pcweb_qhj_withdrawal_review', ['warehousetype', 'warehousename', 'address']);
+        });
+
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
+
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            firstBtn,
+            loading,
+            tableList,
+            search,
+            queryTable,
+            btnClick,
+        };
+    },
+});
 </script>

+ 51 - 0
src/views/platinum/platinum_financing_information/list/tab/setup.ts

@@ -0,0 +1,51 @@
+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('1')
+            .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 }
+}
+
+// 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 }
+// }