Browse Source

融资信息

huangbin 4 years ago
parent
commit
74bf5d1a55

+ 9 - 6
src/services/go/ermcp/qhj/index.ts

@@ -7,14 +7,15 @@ import {
     QhjContract,
     QhjContract,
     QhjCustomer,
     QhjCustomer,
     QhjParentAreaList,
     QhjParentAreaList,
-    QhjPickGoods,
-    QhjPayOrder,
+
+    QhjPayOrder, QhjPickGoods,
+
     QhjReckonPriceLog,
     QhjReckonPriceLog,
     QhjRStrategy,
     QhjRStrategy,
     QhjRSTriggerLog,
     QhjRSTriggerLog,
     QhjTradeGoodsPickup,
     QhjTradeGoodsPickup,
     QueryAccountInOutApplyReq,
     QueryAccountInOutApplyReq,
-    QueryContractReq,
+
     QueryCustomerInfoReq, QueryPayOrderReq,
     QueryCustomerInfoReq, QueryPayOrderReq,
     QueryReckonPriceLogReq
     QueryReckonPriceLogReq
 } from "@/services/go/ermcp/qhj/interface";
 } from "@/services/go/ermcp/qhj/interface";
@@ -82,10 +83,12 @@ export function queryRStrategy(status?: 1 | 2 | 3): Promise<QhjRStrategy[]> {
 /**
 /**
  * -- 铂金宝 - 融资信息
  * -- 铂金宝 - 融资信息
  * 查询融资明细(合同) /Qhj/QueryContract
  * 查询融资明细(合同) /Qhj/QueryContract
- * @param req
+ * @param 合同id
  */
  */
-export function queryContract(req: QueryContractReq): Promise<QhjContract[]> {
-    return commonSearch_go('/Qhj/QueryContract', req).catch((err) => {
+export function queryContract(scfcontractid?: number): Promise<QhjContract[]> {
+    const userid = getUsrId();
+    const param = scfcontractid ? { userid, scfcontractid } : { userid }
+    return commonSearch_go('/Qhj/QueryContract', param).catch((err) => {
         throw new Error(`查询融资明细(合同): ${err.message}`);
         throw new Error(`查询融资明细(合同): ${err.message}`);
     });
     });
 }
 }

+ 27 - 11
src/views/platinum/platinum_financing_information/list/tab/compoments/filter/index.vue

@@ -18,6 +18,9 @@ import FilterOption from '@/common/components/filter/index.vue';
 import { defineComponent, ref } from 'vue';
 import { defineComponent, ref } from 'vue';
 import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
 import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
 import { Moment } from 'moment';
+import { initData } from '@/common/methods';
+import { getGoodsList } from '@/services/bus/goods';
+import { SlotParam } from '@/common/setup/filter/interface';
 
 
 export default defineComponent({
 export default defineComponent({
     name: 'filter-platinum_pick_query',
     name: 'filter-platinum_pick_query',
@@ -27,25 +30,38 @@ export default defineComponent({
         const select: SelectList[] = [
         const select: SelectList[] = [
             {
             {
                 value: undefined,
                 value: undefined,
-                key: 'contracttype1',
-                placeholder: '账号类型',
-                list: [
-                    { value: 1, lable: '个人' },
-                    { value: -1, lable: '企业' },
-                ],
+                key: 'goodsid',
+                placeholder: '选择商品',
+                list: [],
             },
             },
             {
             {
                 value: undefined,
                 value: undefined,
-                key: 'contracttype2',
-                placeholder: '选择商品',
+                key: 'contracttype1',
+                placeholder: '选择状态',
                 list: [
                 list: [
-                    { value: 1, lable: '采购' },
-                    { value: -1, lable: '销售' },
+                    { value: 1, lable: '个人' },
+                    { value: -1, lable: '企业' },
                 ],
                 ],
             },
             },
         ];
         ];
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'account' }];
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'account' }];
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
+        const slotParam: SlotParam = {
+            search(result: any) {
+                const time = date.value;
+                // if (time) {
+                //     result.tradedate = formatTime(time, 'd');
+                // }
+            },
+            reset() {
+                date.value = [];
+            },
+        };
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
+        initData(() => {
+            select[0].list = getGoodsList().map((e) => {
+                return { value: e.goodsid, lable: e.goodsname };
+            });
+        });
         return {
         return {
             date,
             date,
             selectList,
             selectList,

+ 4 - 3
src/views/platinum/platinum_financing_information/list/tab/index.vue

@@ -28,6 +28,7 @@ import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
 import Filter from './compoments/filter/index.vue';
 import Filter from './compoments/filter/index.vue';
 import { queryTableList } from './setup';
 import { queryTableList } from './setup';
 import Detail from './compoments/detail/index.vue';
 import Detail from './compoments/detail/index.vue';
+import { QhjContract } from '@/services/go/ermcp/qhj/interface';
 // import ControlModal from './compoments/controlModal/index.vue';
 // import ControlModal from './compoments/controlModal/index.vue';
 
 
 export default defineComponent({
 export default defineComponent({
@@ -37,16 +38,16 @@ export default defineComponent({
         // 表头数据
         // 表头数据
         const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
         const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
         // 表格事件
         // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<QhjContract>({});
         // 表格操作按钮列表
         // 表格操作按钮列表
         const [firstBtn] = _getBtnList('platinum_financing_information_tab', false).value;
         const [firstBtn] = _getBtnList('platinum_financing_information_tab', false).value;
         // 表格列表数据
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList('in');
+        const { loading, tableList, queryTable } = queryTableList();
         initData(() => {
         initData(() => {
             // 获取列表数据
             // 获取列表数据
             queryTable();
             queryTable();
             // 注册表头信息 过滤
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_fixed_financing_information', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_fixed_financing_information', ['goodsid']);
         });
         });
 
 
         // 查询
         // 查询

+ 9 - 43
src/views/platinum/platinum_financing_information/list/tab/setup.ts

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