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

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

@@ -87,4 +87,8 @@ export interface ButtonListKey {
     platinum_fixed_investment_price_query_tab: string; // 千海金 定投价查询
     platinum_fixed_investment_flow_query: string; // 千海金 定投流水查询
     platinum_fixed_investment_plan_query: string; // 千海金 定投计划查询
+    platinum_document_query_position: string; // 千海金 单据查询 持仓
+    platinum_document_query_order: string; // 千海金 单据查询 委托单
+    platinum_document_query_waiting: string; // 千海金 单据查询 待付单
+    platinum_document_query_success: string; // 千海金 单据查询 成交单
 }

+ 52 - 0
src/views/platinum/platinum_document_query/compoments/filter/index.vue

@@ -0,0 +1,52 @@
+<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 } from '@/common/setup/filter';
+import { Moment } from 'moment';
+import { handleFilterOption } from '../setup';
+export default defineComponent({
+    name: 'filter-platinum_pick_query',
+    components: { FilterOption },
+    setup(props, context) {
+        const date = ref<Moment[]>([]);
+        const { select, input } = handleFilterOption();
+        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>;

+ 27 - 0
src/views/platinum/platinum_document_query/compoments/setup.ts

@@ -0,0 +1,27 @@
+import { InputList, SelectList } from "@/common/setup/filter/interface";
+
+export function handleFilterOption() {
+    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' }];
+
+    return { select, input }
+}

+ 67 - 2
src/views/platinum/platinum_document_query/list/order/index.vue

@@ -1,8 +1,73 @@
 <template>
   <!-- 单据查询 委托单-->
-  <div>单据查询 委托单-</div>
+  <div class="platinum_document_query_order">
+    <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>
+    <!-- <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 ControlModal from './compoments/controlModal/index.vue';
+
+export default defineComponent({
+    name: 'platinum_document_query_order',
+    components: { Filter, contextMenu, BtnList },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        // 表格操作按钮列表
+        const [firstBtn] = _getBtnList('platinum_document_query_order', 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_document_query/list/order/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 }
+// }

+ 45 - 0
src/views/platinum/platinum_document_query/list/position/compoments/filter/index.vue

@@ -0,0 +1,45 @@
+<template>
+  <!-- 过滤 -->
+  <div class="filterTable">
+    <FilterOption :selectList="selectList"
+                  :inputList="inputList"
+                  :fixedBtnList="fixedBtnList" />
+    <slot></slot>
+  </div>
+</template>
+
+<script lang="ts">
+import FilterOption from '@/common/components/filter/index.vue';
+import { defineComponent } from 'vue';
+import { handleFilter } from '@/common/setup/filter';
+import { handleFilterOption } from '@/views/platinum/platinum_document_query/compoments/setup';
+
+export default defineComponent({
+    name: 'filter-platinum_pick_query',
+    components: { FilterOption },
+    setup(props, context) {
+        const { select, input } = handleFilterOption();
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
+        return {
+            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>;

+ 67 - 2
src/views/platinum/platinum_document_query/list/position/index.vue

@@ -1,8 +1,73 @@
 <template>
   <!-- 单据查询 持仓-->
-  <div>单据查询 持仓</div>
+  <div class="platinum_document_query_position">
+    <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>
+    <!-- <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 ControlModal from './compoments/controlModal/index.vue';
+
+export default defineComponent({
+    name: 'platinum_document_query_position',
+    components: { Filter, contextMenu, BtnList },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        // 表格操作按钮列表
+        const [firstBtn] = _getBtnList('platinum_document_query_position', 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_document_query/list/position/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 }
+// }

+ 67 - 2
src/views/platinum/platinum_document_query/list/success/index.vue

@@ -1,8 +1,73 @@
 <template>
   <!-- 单据查询 成交单-->
-  <div>单据查询 成交单-</div>
+  <div class="platinum_document_query_success">
+    <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>
+    <!-- <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 ControlModal from './compoments/controlModal/index.vue';
+
+export default defineComponent({
+    name: 'platinum_document_query_success',
+    components: { Filter, contextMenu, BtnList },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        // 表格操作按钮列表
+        const [firstBtn] = _getBtnList('platinum_document_query_success', 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_document_query/list/success/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 }
+// }

+ 67 - 2
src/views/platinum/platinum_document_query/list/waiting/index.vue

@@ -1,8 +1,73 @@
 <template>
   <!-- 单据查询 待付单-->
-  <div>单据查询 待付单-</div>
+  <div class="platinum_document_query_waiting">
+    <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>
+    <!-- <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 ControlModal from './compoments/controlModal/index.vue';
+
+export default defineComponent({
+    name: 'platinum_document_query_waiting',
+    components: { Filter, contextMenu, BtnList },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        // 表格操作按钮列表
+        const [firstBtn] = _getBtnList('platinum_document_query_waiting', 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_document_query/list/waiting/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 }
+// }