Explorar o código

修改时间过滤

huangbin %!s(int64=4) %!d(string=hai) anos
pai
achega
e3f097781e

+ 40 - 1
src/common/setup/filter/index.ts

@@ -1,6 +1,9 @@
+import { formatTime } from '@/common/methods';
+import { getRangeTime } from '@/utils/time';
+import { Moment } from 'moment';
 import { isRef, Ref, ref, SetupContext } from 'vue';
 import * as type from './interface';
-import { InputList, SelectList } from './interface';
+import { InputList, SelectList, SlotParam } from './interface';
 
 
 export function handleFilter(select: SelectList[] | Ref<SelectList[]>, input: InputList[], context: SetupContext, slot?: type.SlotParam) {
@@ -57,3 +60,39 @@ export function handleFilter(select: SelectList[] | Ref<SelectList[]>, input: In
 }
 
 export type { InputList, SelectList };
+
+/**
+ * 时间过滤
+ * @param key 时间过滤对应的key
+ * @returns 
+ */
+export function handleTimeFilter(key: string) {
+    // 范围时间内过滤
+    function getFilterRangeTime(date: Ref<Moment[]>): SlotParam {
+        return {
+            search(result: any) {
+                // 处理范围时间内搜索
+                const time = date.value;
+                const temp = time.length > 1 ? getRangeTime(time[0], time[1]) : [''];
+                result[key] = temp;
+            },
+            reset() {
+                date.value = [];
+            },
+        };
+    }
+    // 具体时间过滤
+    function getFilterItemTime(date: Ref<Moment | undefined>) {
+        return {
+            search(result: any) {
+                const time = date.value;
+                const temp = time ? [formatTime(time, 'd')] : [''];
+                result[key] = temp;
+            },
+            reset() {
+                date.value = undefined;
+            },
+        };
+    }
+    return { getFilterRangeTime, getFilterItemTime }
+}

+ 6 - 0
src/services/go/ermcp/order/index.ts

@@ -18,6 +18,8 @@ import {
  * @param req
  */
 export function queryHisTradeDetail(req: QueryHisTradeDetailReq): Promise<QueryHisTradeDetailRsp[]> {
+    const accountID = getSelectedAccountId()?.toString()
+    req.accountID = accountID as string
     return commonSearch_go('/Order/QueryHisTradeDetail', req).catch((err) => {
         throw new Error(`历史成交单查询(合约市场): ${err.message}`);
     });
@@ -29,6 +31,8 @@ export function queryHisTradeDetail(req: QueryHisTradeDetailReq): Promise<QueryH
  * @param req
  */
 export function queryHisTradeOrderDetail(req: QueryHisTradeOrderDetailReq): Promise<QueryHisTradeOrderDetailRsp[]> {
+    const accountID = getSelectedAccountId()?.toString()
+    req.accountID = accountID as string
     return commonSearch_go('/Order/QueryHisTradeOrderDetail', req).catch((err) => {
         throw new Error(`历史委托单查询请求(合约市场): ${err.message}`);
     });
@@ -51,6 +55,8 @@ export function queryTradeDetail(req: QueryTradeDetailReq): Promise<QueryTradeDe
  * @param req
  */
 export function queryTradeOrderDetail(req: QueryTradeOrderDetailReq): Promise<QueryTradeOrderDetailRsp[]> {
+    const accountID = getSelectedAccountId()?.toString()
+    req.accountID = accountID as string
     return commonSearch_go('/Order/QueryTradeOrderDetail', req).catch((err) => {
         throw new Error(`委托单查询请求(合约市场): ${err.message}`);
     });

+ 293 - 293
src/services/go/ermcp/order/interface.ts

@@ -1,8 +1,8 @@
 /**
  * 历史成交单查询请求(合约市场)
  */
-export interface QueryHisTradeDetailReq{
-    accountID: string  //   资金账户 - 格式:1,2,3
+export interface QueryHisTradeDetailReq {
+    accountID?: string  //   资金账户 - 格式:1,2,3
     tradeID?: number   //   成交单号
     orderID?: number   //   委托单号
     tradeMode?: string //   交易模式 - 格式:1,2,3
@@ -15,74 +15,74 @@ export interface QueryHisTradeDetailReq{
 /**
  * 历史成交单查询返回
  */
-export interface QueryHisTradeDetailRsp{
-    accountid	:number;//账户ID[报价币种]
-    buildtype	:number;//委托单据类型 1:建仓 2:平仓 3:先平后建
-    buyorsell	:number;//方向 - number;
-//:买 1:卖
-    charge	:number;//手续费
-    closecharge	:number;//平仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
-    closeexchagechargevalue	:number;//平仓交易所手续费设置值
-    closefeealgorithm	:number;//平仓手续费收取方式 1:比率 2:固定
-    closememberchargevalue	:number;//平仓会员手续费设置值
-    closepl	:number;//平仓盈亏
-    closepl2	:number;//平仓盈亏[逐笔]
-    closeqty	:number;//平仓数量(先建后平操作 需要记录)
-    creditamount	:number;//授信金额
-    gcaccountid	:number;//账户ID[合约币种]
-    goodscode	:string;//商品代码
-    goodsid	:number;//商品ID
-    goodsname	:string;//商品名称
-    histradedate	:string;//历史交易日
-    intclosepl	:number;//整型盈亏(用于交易结算试算平衡-收益权)
-    isconfirmexercise	:number;//是否确认行权- number;
-//:否 1:是
-    ismain	:number;//是否主单 - number;
-//:不是 1:是
-    ispreexercise	:number;//是否预申报- number;
-//:否 1:是
-    isreckoned	:number;//是否结算 - number;
-//:未结算 1:已结算
-    isvaliddata	:number;//是否有效 - number;
-//:无效 1:有效
-    listingselecttype	:number;//关联委托单挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
-    marketid	:number;//市场ID
-    marketname	:string;//市场名称
-    matchaccountid	:number;//对手账号id
-    memberuserid	:number;//会员id 个人投资者 需要填写
-    opencharge	:number;//建仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
-    openexchagechargevalue	:number;//建仓交易所手续费设置值
-    openfeealgorithm	:number;//建仓手续费收取方式 1:比率 2:固定
-    openmemberchargevalue	:number;//建仓会员手续费设置值
-    openqty	:number;//开仓数量(先建后平操作 需要记录)
-    optiontype	:number;//期权类型 - 1:认购(看涨) 2:认沽(看跌)
-    orderid	:string;//委托单号
-    performanceplanid	:number;//履约计划ID[期权]
-    performancestatus	:number;//履约状态[期权] - number;
-//:无履约 1:未履约 2:履约中 3:履约完成
-    preexerciseprice	:number;//预申报价格
-    premium	:number;//权利金 - [持仓单的权利金]
-    relatedouttradeid	:number;//关联外部成交单ID
-    status	:number;//处理状态 - 1:待处理 2:已处理 3:处理失败
-    tradeamount	:number;//成交金额[账户币种,用于所有权]
-    tradedate	:string;//交易日(yyyyMMdd)
-    tradeid	:string;//成交单号(1number;
-//1+Unix秒时间戳(1number;
-//位)+2位(MarketServiceID)+xxxx)
-    trademode	:number;//交易模式
-    tradeprice	:number;//成交价格
-    tradeproperty	:number;//交易属性
-    tradeqty	:number;//成交数量
-    tradetime	:string;//成交时间
-    tradetype	:number;//成交类别 - 1:正常委托成交 2:定向做市成交(接单) 3:交割协议平仓成交 4:交割减仓成交 5:到期强平成交 6:风控斩仓成交 7:协议平仓(管理端)成交 8:仓单转持仓成交 9: 交割协议转让成交 1number;
-//:受托竞价成交(接单) 11:协议转让成交 12:系统强行平仓 13:期权违约平仓
+export interface QueryHisTradeDetailRsp {
+    accountid: number;//账户ID[报价币种]
+    buildtype: number;//委托单据类型 1:建仓 2:平仓 3:先平后建
+    buyorsell: number;//方向 - number;
+    //:买 1:卖
+    charge: number;//手续费
+    closecharge: number;//平仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
+    closeexchagechargevalue: number;//平仓交易所手续费设置值
+    closefeealgorithm: number;//平仓手续费收取方式 1:比率 2:固定
+    closememberchargevalue: number;//平仓会员手续费设置值
+    closepl: number;//平仓盈亏
+    closepl2: number;//平仓盈亏[逐笔]
+    closeqty: number;//平仓数量(先建后平操作 需要记录)
+    creditamount: number;//授信金额
+    gcaccountid: number;//账户ID[合约币种]
+    goodscode: string;//商品代码
+    goodsid: number;//商品ID
+    goodsname: string;//商品名称
+    histradedate: string;//历史交易日
+    intclosepl: number;//整型盈亏(用于交易结算试算平衡-收益权)
+    isconfirmexercise: number;//是否确认行权- number;
+    //:否 1:是
+    ismain: number;//是否主单 - number;
+    //:不是 1:是
+    ispreexercise: number;//是否预申报- number;
+    //:否 1:是
+    isreckoned: number;//是否结算 - number;
+    //:未结算 1:已结算
+    isvaliddata: number;//是否有效 - number;
+    //:无效 1:有效
+    listingselecttype: number;//关联委托单挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
+    marketid: number;//市场ID
+    marketname: string;//市场名称
+    matchaccountid: number;//对手账号id
+    memberuserid: number;//会员id 个人投资者 需要填写
+    opencharge: number;//建仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
+    openexchagechargevalue: number;//建仓交易所手续费设置值
+    openfeealgorithm: number;//建仓手续费收取方式 1:比率 2:固定
+    openmemberchargevalue: number;//建仓会员手续费设置值
+    openqty: number;//开仓数量(先建后平操作 需要记录)
+    optiontype: number;//期权类型 - 1:认购(看涨) 2:认沽(看跌)
+    orderid: string;//委托单号
+    performanceplanid: number;//履约计划ID[期权]
+    performancestatus: number;//履约状态[期权] - number;
+    //:无履约 1:未履约 2:履约中 3:履约完成
+    preexerciseprice: number;//预申报价格
+    premium: number;//权利金 - [持仓单的权利金]
+    relatedouttradeid: number;//关联外部成交单ID
+    status: number;//处理状态 - 1:待处理 2:已处理 3:处理失败
+    tradeamount: number;//成交金额[账户币种,用于所有权]
+    tradedate: string;//交易日(yyyyMMdd)
+    tradeid: string;//成交单号(1number;
+    //1+Unix秒时间戳(1number;
+    //位)+2位(MarketServiceID)+xxxx)
+    trademode: number;//交易模式
+    tradeprice: number;//成交价格
+    tradeproperty: number;//交易属性
+    tradeqty: number;//成交数量
+    tradetime: string;//成交时间
+    tradetype: number;//成交类别 - 1:正常委托成交 2:定向做市成交(接单) 3:交割协议平仓成交 4:交割减仓成交 5:到期强平成交 6:风控斩仓成交 7:协议平仓(管理端)成交 8:仓单转持仓成交 9: 交割协议转让成交 1number;
+    //:受托竞价成交(接单) 11:协议转让成交 12:系统强行平仓 13:期权违约平仓
 }
 
 /**
  * 历史委托单查询请求(合约市场)
  */
 export interface QueryHisTradeOrderDetailReq {
-    accountID: string  //    资金账户 - 格式:1,2,3
+    accountID?: string  //    资金账户 - 格式:1,2,3
     tradeMode?: string //    交易模式 - 格式:1,2,3
     orderStatus?: string//   委托状态 - 格式:1,2,3
     orderID?: number//       委托单号
@@ -93,87 +93,87 @@ export interface QueryHisTradeOrderDetailReq {
 /**
  * 历史委托单查询返回(合约市场)
  */
-export interface QueryHisTradeOrderDetailRsp{
-    accountid	:number;//账户ID[报价币种]
-    buildtype	:number;//委托单据类型 - 1:建仓 2:平仓 3:先平后建
-    buyorsell	:number;//买卖 - number;
-//:买 1:卖
-    cancelorderid	:string;//撤单单号(撤单时填写)
-    cancelqty	:number;//撤单数量
-    clientordertime	:string;//客户端委托时间
-    clientticket	:string;//客户端流水号
-    clienttype	:number;//客户端类型 - number;
-//:保留为未填终端类型 1:PC管理端 2:PC交易端 3:手机客户端安卓 4:网页客户端 5:微信客户端 6:手机客户端苹果 7:网上开户客户端 8:无效终端编号 9:报价终端(中江)
-    closeexchagechargevalue	:number;//平仓交易所手续费设置值
-    closefeealgorithm	:number;//平仓手续费收取方式 1:比率 2:固定
-    closefreezecharge	:number;//平仓冻结手续费(先建后平操作,需要记录)
-    closememberchargevalue	:number;//平仓会员手续费设置值
-    closeqty	:number;//平仓数量(先建后平操作 需要记录)
-    closetradeqty	:number;//平仓成交数量(先建后平操作,需要记录)
-    closeunfreezecharge	:number;//平仓解冻手续费(先建后平操作,需要记录)
-    delistingtype	:number;//摘牌类型 - 1:价格最优 2:点选成交
-    freezecharge	:number;//冻结手续费
-    freezemargin	:number;//冻结保证金(冻结交易金额)
-    gcaccountid	:number;//账户ID[合约币种]
-    goodscode	:string;//商品代码
-    goodsid	:number;//商品ID
-    goodsname	:string;//商品名称
-    histradedate	:string;//历史交易日
-    isconfirmexercise	:number;//是否确认行权- number;
-//:否 1:是
-    ispreexercise	:number;//是否预申报- number;
-//:否 1:是
-    isvaliddata	:number;//是否有效 - number;
-//:无效 1:有效
-    listingselecttype	:number;//挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
-    marginalgorithm	:number;//保证金收取方式 1:比率 2:固定
-    marginvalue	:number;//即市保证金设置值
-    marketid	:number;//市场ID
-    marketmaxsub	:number;//市价最大偏移范围
-    marketname	:string;//市场名称
-    memberuserid	:number;//所属会员UserID
-    openexchagechargevalue	:number;//建仓交易所手续费设置值
-    openfeealgorithm	:number;//建仓手续费收取方式 1:比率 2:固定
-    openfreezecharge	:number;//开仓冻结手续费(先建后平操作,需要记录)
-    openmemberchargevalue	:number;//建仓会员手续费设置值
-    openqty	:number;//开仓数量(先建后平操作,需要记录)
-    opentradeqty	:number;//开仓成交数量(先建后平操作,需要记录)
-    openunfreezecharge	:number;//开仓解冻手续费(先建后平操作,需要记录)
-    operatetype	:number;//操作类型 - 1:正常下单 2:斩仓 3:转单 4:结算撤单 5:系统卖出(适用于先平后建的卖出) 6:行情源报价 7:(结算)到期强平 8:(结算)协议转让 9:系统对冲单 1number;
-//:(结算)到期无效 11:交割协议转让 12:交割协议平仓 13:交割成交(所有权) 14:管理端强行平仓 15:管理端协议转让
-    operatorid	:number;//登录账号(LoginID)
-    optiontype	:number;//期权类型 - 1:认购(看涨) 2:认沽(看跌)
-    orderid	:string;//委托单号(1number;
-//number;
-//+Unix秒时间戳(1number;
-//位)+2位(MarketServiceID)+xxxx)
-    orderprice	:number;//委托价格
-    orderqty	:number;//委托数量
-    ordersrc	:number;//委托来源 - 1:客户端 2:管理端 3:风控服务 4:交割服务 5:交易服务 6:交易日结 7:商品强平 8:管理端商品退市强平 9:交易接口 1number;
-//:交割服务商被动(受托竞价) 11:预埋触发
-    orderstatus	:number;//委托状态 - 1: 委托请求 2:待冻结 3:委托成功 4: 委托失败 5:配对成功 6: 已撤销 7:部分成交 8:已成交 9:部成部撤 1number;
-//:成交失败 11:已拒绝 12:经过摘牌(先摘后挂专用-先摘后挂已摘过) 13:冻结成功(通道交易专用) 14:通道已撤 15:通道部成部撤 16:成交失败违约(荷兰式竞拍专用)
-    ordertime	:string;//委托时间
-    preexerciseprice	:number;//预申报价格
-    premium	:number;//权利金
-    preorderid	:string;//关联预埋单号(止盈止损单时填写)
-    pricemode	:number;//取价方式 - 1:市价 2: 限价
-    quoteid	:number;//报价单ID
-    relatedid	:string;//关联单号(交割单)
-    retcode	:number;//错误代码
-    sessionid	:number;//会话ID
-    tradedate	:string;//交易日(yyyyMMdd)
-    trademode	:number;//交易模式
-    tradeproperty	:number;//交易属性
-    tradeqty	:number;//成交数量
-    unfreezecharge	:number;//解冻手续费
-    unfreezemargin	:number;//解冻保证金
-    updatetime	:string;//更新时间
-    uuid	:string;//发起端唯一id
-    validtime	:string;//有效期限
-    validtype	:number;//有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效 5指定时间有效
-    volumetype	:number;//当时间有效类型为 “立即执行否则取消 IOC” 时,需要此项 - number;
-//:任意量 1:最小量(暂时不支持) 2:全部量
+export interface QueryHisTradeOrderDetailRsp {
+    accountid: number;//账户ID[报价币种]
+    buildtype: number;//委托单据类型 - 1:建仓 2:平仓 3:先平后建
+    buyorsell: number;//买卖 - number;
+    //:买 1:卖
+    cancelorderid: string;//撤单单号(撤单时填写)
+    cancelqty: number;//撤单数量
+    clientordertime: string;//客户端委托时间
+    clientticket: string;//客户端流水号
+    clienttype: number;//客户端类型 - number;
+    //:保留为未填终端类型 1:PC管理端 2:PC交易端 3:手机客户端安卓 4:网页客户端 5:微信客户端 6:手机客户端苹果 7:网上开户客户端 8:无效终端编号 9:报价终端(中江)
+    closeexchagechargevalue: number;//平仓交易所手续费设置值
+    closefeealgorithm: number;//平仓手续费收取方式 1:比率 2:固定
+    closefreezecharge: number;//平仓冻结手续费(先建后平操作,需要记录)
+    closememberchargevalue: number;//平仓会员手续费设置值
+    closeqty: number;//平仓数量(先建后平操作 需要记录)
+    closetradeqty: number;//平仓成交数量(先建后平操作,需要记录)
+    closeunfreezecharge: number;//平仓解冻手续费(先建后平操作,需要记录)
+    delistingtype: number;//摘牌类型 - 1:价格最优 2:点选成交
+    freezecharge: number;//冻结手续费
+    freezemargin: number;//冻结保证金(冻结交易金额)
+    gcaccountid: number;//账户ID[合约币种]
+    goodscode: string;//商品代码
+    goodsid: number;//商品ID
+    goodsname: string;//商品名称
+    histradedate: string;//历史交易日
+    isconfirmexercise: number;//是否确认行权- number;
+    //:否 1:是
+    ispreexercise: number;//是否预申报- number;
+    //:否 1:是
+    isvaliddata: number;//是否有效 - number;
+    //:无效 1:有效
+    listingselecttype: number;//挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
+    marginalgorithm: number;//保证金收取方式 1:比率 2:固定
+    marginvalue: number;//即市保证金设置值
+    marketid: number;//市场ID
+    marketmaxsub: number;//市价最大偏移范围
+    marketname: string;//市场名称
+    memberuserid: number;//所属会员UserID
+    openexchagechargevalue: number;//建仓交易所手续费设置值
+    openfeealgorithm: number;//建仓手续费收取方式 1:比率 2:固定
+    openfreezecharge: number;//开仓冻结手续费(先建后平操作,需要记录)
+    openmemberchargevalue: number;//建仓会员手续费设置值
+    openqty: number;//开仓数量(先建后平操作,需要记录)
+    opentradeqty: number;//开仓成交数量(先建后平操作,需要记录)
+    openunfreezecharge: number;//开仓解冻手续费(先建后平操作,需要记录)
+    operatetype: number;//操作类型 - 1:正常下单 2:斩仓 3:转单 4:结算撤单 5:系统卖出(适用于先平后建的卖出) 6:行情源报价 7:(结算)到期强平 8:(结算)协议转让 9:系统对冲单 1number;
+    //:(结算)到期无效 11:交割协议转让 12:交割协议平仓 13:交割成交(所有权) 14:管理端强行平仓 15:管理端协议转让
+    operatorid: number;//登录账号(LoginID)
+    optiontype: number;//期权类型 - 1:认购(看涨) 2:认沽(看跌)
+    orderid: string;//委托单号(1number;
+    //number;
+    //+Unix秒时间戳(1number;
+    //位)+2位(MarketServiceID)+xxxx)
+    orderprice: number;//委托价格
+    orderqty: number;//委托数量
+    ordersrc: number;//委托来源 - 1:客户端 2:管理端 3:风控服务 4:交割服务 5:交易服务 6:交易日结 7:商品强平 8:管理端商品退市强平 9:交易接口 1number;
+    //:交割服务商被动(受托竞价) 11:预埋触发
+    orderstatus: number;//委托状态 - 1: 委托请求 2:待冻结 3:委托成功 4: 委托失败 5:配对成功 6: 已撤销 7:部分成交 8:已成交 9:部成部撤 1number;
+    //:成交失败 11:已拒绝 12:经过摘牌(先摘后挂专用-先摘后挂已摘过) 13:冻结成功(通道交易专用) 14:通道已撤 15:通道部成部撤 16:成交失败违约(荷兰式竞拍专用)
+    ordertime: string;//委托时间
+    preexerciseprice: number;//预申报价格
+    premium: number;//权利金
+    preorderid: string;//关联预埋单号(止盈止损单时填写)
+    pricemode: number;//取价方式 - 1:市价 2: 限价
+    quoteid: number;//报价单ID
+    relatedid: string;//关联单号(交割单)
+    retcode: number;//错误代码
+    sessionid: number;//会话ID
+    tradedate: string;//交易日(yyyyMMdd)
+    trademode: number;//交易模式
+    tradeproperty: number;//交易属性
+    tradeqty: number;//成交数量
+    unfreezecharge: number;//解冻手续费
+    unfreezemargin: number;//解冻保证金
+    updatetime: string;//更新时间
+    uuid: string;//发起端唯一id
+    validtime: string;//有效期限
+    validtype: number;//有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效 5指定时间有效
+    volumetype: number;//当时间有效类型为 “立即执行否则取消 IOC” 时,需要此项 - number;
+    //:任意量 1:最小量(暂时不支持) 2:全部量
 }
 
 /**
@@ -191,71 +191,71 @@ export interface QueryTradeDetailReq {
 /**
  * 成交单查询返回
  */
-export interface QueryTradeDetailRsp{
-    accountid	:number;//账户ID[报价币种]
-    buildtype	:number;//委托单据类型 1:建仓 2:平仓 3:先平后建
-    buyorsell	:number;//方向 - number;
-//:买 1:卖
-    charge	:number;//手续费
-    closecharge	:number;//平仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
-    closeexchagechargevalue	:number;//平仓交易所手续费设置值
-    closefeealgorithm	:number;//平仓手续费收取方式 1:比率 2:固定
-    closememberchargevalue	:number;//平仓会员手续费设置值
-    closepl	:number;//平仓盈亏
-    closepl2	:number;//平仓盈亏[逐笔]
-    closeqty	:number;//平仓数量(先建后平操作 需要记录)
-    creditamount	:number;//授信金额
-    gcaccountid	:number;//账户ID[合约币种]
-    goodscode	:string;//商品代码
-    goodsid	:number;//商品ID
-    goodsname	:string;//商品名称
-    intclosepl	:number;//整型盈亏(用于交易结算试算平衡-收益权)
-    isconfirmexercise	:number;//是否确认行权- number;
-//:否 1:是
-    ismain	:number;//是否主单 - number;
-//:不是 1:是
-    ispreexercise	:number;//是否预申报- number;
-//:否 1:是
-    isreckoned	:number;//是否结算 - number;
-//:未结算 1:已结算
-    listingselecttype	:number;//关联委托单挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
-    marketid	:number;//市场ID
-    marketname	:string;//市场名称
-    matchaccountid	:number;//对手账号id
-    memberuserid	:number;//会员id 个人投资者 需要填写
-    opencharge	:number;//建仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
-    openexchagechargevalue	:number;//建仓交易所手续费设置值
-    openfeealgorithm	:number;//建仓手续费收取方式 1:比率 2:固定
-    openmemberchargevalue	:number;//建仓会员手续费设置值
-    openqty	:number;//开仓数量(先建后平操作 需要记录)
-    optiontype	:number;//期权类型 - 1:认购(看涨) 2:认沽(看跌)
-    orderid	:string;//委托单号
-    performanceplanid	:number;//履约计划ID[期权]
-    performancestatus	:number;//履约状态[期权] - number;
-//:无履约 1:未履约 2:履约中 3:履约完成
-    preexerciseprice	:number;//预申报价格
-    premium	:number;//权利金 - [持仓单的权利金]
-    relatedouttradeid	:number;//关联外部成交单ID
-    status	:number;//处理状态 - 1:待处理 2:已处理 3:处理失败
-    tradeamount	:number;//成交金额[账户币种,用于所有权]
-    tradedate	:string;//交易日(yyyyMMdd)
-    tradeid	:string;//成交单号(1number;
-//1+Unix秒时间戳(1number;
-//位)+2位(MarketServiceID)+xxxx)
-    trademode	:number;//交易模式
-    tradeprice	:number;//成交价格
-    tradeproperty	:number;//交易属性
-    tradeqty	:number;//成交数量
-    tradetime	:string;//成交时间
-    tradetype	:number;//成交类别 - 1:正常委托成交 2:定向做市成交(接单) 3:交割协议平仓成交 4:交割减仓成交 5:到期强平成交 6:风控斩仓成交 7:协议平仓(管理端)成交 8:仓单转持仓成交 9: 交割协议转让成交 1number;
-//:受托竞价成交(接单) 11:协议转让成交 12:系统强行平仓 13:期权违约平仓
+export interface QueryTradeDetailRsp {
+    accountid: number;//账户ID[报价币种]
+    buildtype: number;//委托单据类型 1:建仓 2:平仓 3:先平后建
+    buyorsell: number;//方向 - number;
+    //:买 1:卖
+    charge: number;//手续费
+    closecharge: number;//平仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
+    closeexchagechargevalue: number;//平仓交易所手续费设置值
+    closefeealgorithm: number;//平仓手续费收取方式 1:比率 2:固定
+    closememberchargevalue: number;//平仓会员手续费设置值
+    closepl: number;//平仓盈亏
+    closepl2: number;//平仓盈亏[逐笔]
+    closeqty: number;//平仓数量(先建后平操作 需要记录)
+    creditamount: number;//授信金额
+    gcaccountid: number;//账户ID[合约币种]
+    goodscode: string;//商品代码
+    goodsid: number;//商品ID
+    goodsname: string;//商品名称
+    intclosepl: number;//整型盈亏(用于交易结算试算平衡-收益权)
+    isconfirmexercise: number;//是否确认行权- number;
+    //:否 1:是
+    ismain: number;//是否主单 - number;
+    //:不是 1:是
+    ispreexercise: number;//是否预申报- number;
+    //:否 1:是
+    isreckoned: number;//是否结算 - number;
+    //:未结算 1:已结算
+    listingselecttype: number;//关联委托单挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
+    marketid: number;//市场ID
+    marketname: string;//市场名称
+    matchaccountid: number;//对手账号id
+    memberuserid: number;//会员id 个人投资者 需要填写
+    opencharge: number;//建仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
+    openexchagechargevalue: number;//建仓交易所手续费设置值
+    openfeealgorithm: number;//建仓手续费收取方式 1:比率 2:固定
+    openmemberchargevalue: number;//建仓会员手续费设置值
+    openqty: number;//开仓数量(先建后平操作 需要记录)
+    optiontype: number;//期权类型 - 1:认购(看涨) 2:认沽(看跌)
+    orderid: string;//委托单号
+    performanceplanid: number;//履约计划ID[期权]
+    performancestatus: number;//履约状态[期权] - number;
+    //:无履约 1:未履约 2:履约中 3:履约完成
+    preexerciseprice: number;//预申报价格
+    premium: number;//权利金 - [持仓单的权利金]
+    relatedouttradeid: number;//关联外部成交单ID
+    status: number;//处理状态 - 1:待处理 2:已处理 3:处理失败
+    tradeamount: number;//成交金额[账户币种,用于所有权]
+    tradedate: string;//交易日(yyyyMMdd)
+    tradeid: string;//成交单号(1number;
+    //1+Unix秒时间戳(1number;
+    //位)+2位(MarketServiceID)+xxxx)
+    trademode: number;//交易模式
+    tradeprice: number;//成交价格
+    tradeproperty: number;//交易属性
+    tradeqty: number;//成交数量
+    tradetime: string;//成交时间
+    tradetype: number;//成交类别 - 1:正常委托成交 2:定向做市成交(接单) 3:交割协议平仓成交 4:交割减仓成交 5:到期强平成交 6:风控斩仓成交 7:协议平仓(管理端)成交 8:仓单转持仓成交 9: 交割协议转让成交 1number;
+    //:受托竞价成交(接单) 11:协议转让成交 12:系统强行平仓 13:期权违约平仓
 }
 
 /**
  * 委托单查询请求(合约市场)
  */
 export interface QueryTradeOrderDetailReq {
-    accountID: string     //    资金账户 - 格式:1,2,3
+    accountID?: string     //    资金账户 - 格式:1,2,3
     tradeMode?: string //       交易模式 - 格式:1,2,3
     orderStatus?: string//      委托状态 - 格式:1,2,3
     orderID?: number//          委托单号
@@ -264,70 +264,70 @@ export interface QueryTradeOrderDetailReq {
 /**
  * 委托单查询返回(合约市场)
  */
-export interface QueryTradeOrderDetailRsp{
-    accountid	:number;//账户ID[报价币种]
-    buildtype	:number;//委托单据类型 1:建仓 2:平仓 3:先平后建
-    buyorsell	:number;//方向 - number;
-//:买 1:卖
-    charge	:number;//手续费
-    closecharge	:number;//平仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
-    closeexchagechargevalue	:number;//平仓交易所手续费设置值
-    closefeealgorithm	:number;//平仓手续费收取方式 1:比率 2:固定
-    closememberchargevalue	:number;//平仓会员手续费设置值
-    closepl	:number;//平仓盈亏
-    closepl2	:number;//平仓盈亏[逐笔]
-    closeqty	:number;//平仓数量(先建后平操作 需要记录)
-    creditamount	:number;//授信金额
-    gcaccountid	:number;//账户ID[合约币种]
-    goodscode	:string;//商品代码
-    goodsid	:number;//商品ID
-    goodsname	:string;//商品名称
-    intclosepl	:number;//整型盈亏(用于交易结算试算平衡-收益权)
-    isconfirmexercise	:number;//是否确认行权- number;
-//:否 1:是
-    ismain	:number;//是否主单 - number;
-//:不是 1:是
-    ispreexercise	:number;//是否预申报- number;
-//:否 1:是
-    isreckoned	:number;//是否结算 - number;
-//:未结算 1:已结算
-    listingselecttype	:number;//关联委托单挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
-    marketid	:number;//市场ID
-    marketname	:string;//市场名称
-    matchaccountid	:number;//对手账号id
-    memberuserid	:number;//会员id 个人投资者 需要填写
-    opencharge	:number;//建仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
-    openexchagechargevalue	:number;//建仓交易所手续费设置值
-    openfeealgorithm	:number;//建仓手续费收取方式 1:比率 2:固定
-    openmemberchargevalue	:number;//建仓会员手续费设置值
-    openqty	:number;//开仓数量(先建后平操作 需要记录)
-    optiontype	:number;//期权类型 - 1:认购(看涨) 2:认沽(看跌)
-    orderid	:string;//委托单号
-    performanceplanid	:number;//履约计划ID[期权]
-    performancestatus	:number;//履约状态[期权] - number;
-//:无履约 1:未履约 2:履约中 3:履约完成
-    preexerciseprice	:number;//预申报价格
-    premium	:number;//权利金 - [持仓单的权利金]
-    relatedouttradeid	:number;//关联外部成交单ID
-    status	:number;//处理状态 - 1:待处理 2:已处理 3:处理失败
-    tradeamount	:number;//成交金额[账户币种,用于所有权]
-    tradedate	:string;//交易日(yyyyMMdd)
-    tradeid	:string;//成交单号(1number;
-//1+Unix秒时间戳(1number;
-//位)+2位(MarketServiceID)+xxxx)
-    trademode	:number;//交易模式
-    tradeprice	:number;//成交价格
-    tradeproperty	:number;//交易属性
-    tradeqty	:number;//成交数量
-    tradetime	:string;//成交时间
-    tradetype	:number;//成交类别 - 1:正常委托成交 2:定向做市成交(接单) 3:交割协议平仓成交 4:交割减仓成交 5:到期强平成交 6:风控斩仓成交 7:协议平仓(管理端)成交 8:仓单转持仓成交 9: 交割协议转让成交 1number;
-//:受托竞价成交(接单) 11:协议转让成交 12:系统强行平仓 13:期权违约平仓
+export interface QueryTradeOrderDetailRsp {
+    accountid: number;//账户ID[报价币种]
+    buildtype: number;//委托单据类型 1:建仓 2:平仓 3:先平后建
+    buyorsell: number;//方向 - number;
+    //:买 1:卖
+    charge: number;//手续费
+    closecharge: number;//平仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
+    closeexchagechargevalue: number;//平仓交易所手续费设置值
+    closefeealgorithm: number;//平仓手续费收取方式 1:比率 2:固定
+    closememberchargevalue: number;//平仓会员手续费设置值
+    closepl: number;//平仓盈亏
+    closepl2: number;//平仓盈亏[逐笔]
+    closeqty: number;//平仓数量(先建后平操作 需要记录)
+    creditamount: number;//授信金额
+    gcaccountid: number;//账户ID[合约币种]
+    goodscode: string;//商品代码
+    goodsid: number;//商品ID
+    goodsname: string;//商品名称
+    intclosepl: number;//整型盈亏(用于交易结算试算平衡-收益权)
+    isconfirmexercise: number;//是否确认行权- number;
+    //:否 1:是
+    ismain: number;//是否主单 - number;
+    //:不是 1:是
+    ispreexercise: number;//是否预申报- number;
+    //:否 1:是
+    isreckoned: number;//是否结算 - number;
+    //:未结算 1:已结算
+    listingselecttype: number;//关联委托单挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
+    marketid: number;//市场ID
+    marketname: string;//市场名称
+    matchaccountid: number;//对手账号id
+    memberuserid: number;//会员id 个人投资者 需要填写
+    opencharge: number;//建仓手续费(支付总手续费=(交易所比率+会员比率)成交金额)
+    openexchagechargevalue: number;//建仓交易所手续费设置值
+    openfeealgorithm: number;//建仓手续费收取方式 1:比率 2:固定
+    openmemberchargevalue: number;//建仓会员手续费设置值
+    openqty: number;//开仓数量(先建后平操作 需要记录)
+    optiontype: number;//期权类型 - 1:认购(看涨) 2:认沽(看跌)
+    orderid: string;//委托单号
+    performanceplanid: number;//履约计划ID[期权]
+    performancestatus: number;//履约状态[期权] - number;
+    //:无履约 1:未履约 2:履约中 3:履约完成
+    preexerciseprice: number;//预申报价格
+    premium: number;//权利金 - [持仓单的权利金]
+    relatedouttradeid: number;//关联外部成交单ID
+    status: number;//处理状态 - 1:待处理 2:已处理 3:处理失败
+    tradeamount: number;//成交金额[账户币种,用于所有权]
+    tradedate: string;//交易日(yyyyMMdd)
+    tradeid: string;//成交单号(1number;
+    //1+Unix秒时间戳(1number;
+    //位)+2位(MarketServiceID)+xxxx)
+    trademode: number;//交易模式
+    tradeprice: number;//成交价格
+    tradeproperty: number;//交易属性
+    tradeqty: number;//成交数量
+    tradetime: string;//成交时间
+    tradetype: number;//成交类别 - 1:正常委托成交 2:定向做市成交(接单) 3:交割协议平仓成交 4:交割减仓成交 5:到期强平成交 6:风控斩仓成交 7:协议平仓(管理端)成交 8:仓单转持仓成交 9: 交割协议转让成交 1number;
+    //:受托竞价成交(接单) 11:协议转让成交 12:系统强行平仓 13:期权违约平仓
 }
 
 /**
  * 持仓汇总查询(合约市场)
  */
-export interface QueryTradePositionReq{
+export interface QueryTradePositionReq {
     accountID: string   //  资金账户 - 格式:1,2,3
     tradeMode?: string  //  交易模式 - 格式:1,2,3
 }
@@ -335,36 +335,36 @@ export interface QueryTradePositionReq{
 /**
  * 持仓汇总返回(合约市场)
  */
-export interface QueryTradePositionRsp{
-    accountid	:number;//资金账户
-    agreeunit	:number;//合约单位
-    averageprice	:number;//持仓均价
-    buyorsell	:number;//方向 - number;
-//:买 1:卖
-    closetotalqty	:number;//平仓总数量
-    curholderamount	:number;//当前持仓总金额[商品币种]
-    curpositionqty	:number;//当前持仓总数量
-    currencyid	:number;//报价货币ID
-    curtdposition	:number;//期末今日头寸
-    decimalplace	:number;//报价小数位
-    enableqty	:number;//可用量
-    fretdposition	:number;//冻结今日头寸
-    frozenqty	:number;//持仓冻结数量
-    goodscode	:string;//商品代码
-    goodsid	:number;//商品Id
-    goodsname	:string;//商品名称
-    goodunit	:string;//报价单位
-    goodunitid	:number;//报价单位ID
-    holderamount	:number;//期初持仓总金额[商品币种]
-    marketid	:number;//所属市场ID
-    openreqqty	:number;//开仓申请数量(用于比较最大持仓数量)
-    opentotalqty	:number;//开仓总数量
-    otherfrozenqty	:number;//持仓其他冻结数量(交割冻结)
-    positionqty	:number;//期初持仓数量
-    tnqty	:number;//T+N冻结总量
-    tnusedqty	:number;//T+N使用量(可以使用T+N的冻结数量)
-    trademode	:number;//交易模式
-    usedmargin	:number;//占用保证金[商品币种]
+export interface QueryTradePositionRsp {
+    accountid: number;//资金账户
+    agreeunit: number;//合约单位
+    averageprice: number;//持仓均价
+    buyorsell: number;//方向 - number;
+    //:买 1:卖
+    closetotalqty: number;//平仓总数量
+    curholderamount: number;//当前持仓总金额[商品币种]
+    curpositionqty: number;//当前持仓总数量
+    currencyid: number;//报价货币ID
+    curtdposition: number;//期末今日头寸
+    decimalplace: number;//报价小数位
+    enableqty: number;//可用量
+    fretdposition: number;//冻结今日头寸
+    frozenqty: number;//持仓冻结数量
+    goodscode: string;//商品代码
+    goodsid: number;//商品Id
+    goodsname: string;//商品名称
+    goodunit: string;//报价单位
+    goodunitid: number;//报价单位ID
+    holderamount: number;//期初持仓总金额[商品币种]
+    marketid: number;//所属市场ID
+    openreqqty: number;//开仓申请数量(用于比较最大持仓数量)
+    opentotalqty: number;//开仓总数量
+    otherfrozenqty: number;//持仓其他冻结数量(交割冻结)
+    positionqty: number;//期初持仓数量
+    tnqty: number;//T+N冻结总量
+    tnusedqty: number;//T+N使用量(可以使用T+N的冻结数量)
+    trademode: number;//交易模式
+    usedmargin: number;//占用保证金[商品币种]
 }
 
 

+ 79 - 0
src/views/platinum/platinum_document_query/list/order/compoments/filter/index.vue

@@ -0,0 +1,79 @@
+<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, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
+import { initData } from '@/common/methods';
+import { getGoodsList } from '@/services/bus/goods';
+import { Moment } from 'moment';
+
+export default defineComponent({
+    name: 'filter-platinum_pick_query',
+    components: { FilterOption },
+    setup(props, context) {
+        const date = ref<Moment[]>([]);
+        const select = ref<SelectList[]>([
+            {
+                value: undefined,
+                key: 'contracttype1',
+                placeholder: '账号类型',
+                list: [
+                    { value: 1, lable: '个人' },
+                    { value: -1, lable: '企业' },
+                ],
+            },
+            {
+                value: undefined,
+                key: 'goodsid',
+                placeholder: '选择商品',
+                list: [],
+            },
+        ]);
+        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'account' }];
+        // 范围时间内过滤
+        const { getFilterRangeTime } = handleTimeFilter('ordertime');
+
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, getFilterRangeTime(date));
+        initData(() => {
+            select.value[1].list = getGoodsList().map((e) => {
+                return { value: e.goodsid, lable: e.goodsname };
+            });
+        });
+        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>;

+ 14 - 11
src/views/platinum/platinum_document_query/list/order/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 单据查询 委托单-->
   <div class="platinum_document_query_order">
-    <Filter />
+    <Filter @search="updateColumn" />
     <contextMenu :contextMenuList="firstBtn">
       <a-table :columns="columns"
                class="topTable hiddenFirstCol"
@@ -22,10 +22,11 @@
 </template>
 
 <script lang="ts">
-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 { defineComponent, initData, getTableColumns, getTableEvent, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
+import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
+import { QueryTradeOrderDetailRsp } from '@/services/go/ermcp/order/interface';
+import { ref } from 'vue';
+import Filter from './compoments/filter/index.vue';
 // import ControlModal from './compoments/controlModal/index.vue';
 
 export default defineComponent({
@@ -35,29 +36,31 @@ export default defineComponent({
         // 表头数据
         const { columns, registerColumn, updateColumn } = getTableColumns();
         // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<QueryTradeOrderDetailRsp>({});
         // 表格操作按钮列表
         const [firstBtn] = _getBtnList('platinum_document_query_order', false).value;
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList('in');
+        const loading = ref<boolean>(false);
+        const tableList = ref<QueryTradeOrderDetailRsp[]>([]);
         initData(() => {
             // 获取列表数据
-            queryTable();
+            Promise.all([queryTradeOrderDetail({})]).then((res) => {
+                tableList.value = res[0];
+            });
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_order', ['goodsid', 'ordertime', 'operatorid']);
             // registerColumn('table_pcweb_qhj_withdrawal_review', ['warehousetype', 'warehousename', 'address']);
         });
 
         return {
             columns,
-
+            updateColumn,
             expandedRowKeys,
             selectedRow,
             Rowclick,
             firstBtn,
             loading,
             tableList,
-            queryTable,
             btnClick,
         };
     },

+ 20 - 4
src/views/platinum/platinum_document_query/list/position/compoments/filter/index.vue

@@ -10,9 +10,8 @@
 
 <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';
+import { defineComponent, ref } from 'vue';
+import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
 import { initData } from '@/common/methods';
 import { getGoodsList } from '@/services/bus/goods';
 
@@ -20,7 +19,24 @@ export default defineComponent({
     name: 'filter-platinum_pick_query',
     components: { FilterOption },
     setup(props, context) {
-        const { select, input } = handleFilterOption();
+        const select = ref<SelectList[]>([
+            {
+                value: undefined,
+                key: 'contracttype1',
+                placeholder: '账号类型',
+                list: [
+                    { value: 1, lable: '个人' },
+                    { value: -1, lable: '企业' },
+                ],
+            },
+            {
+                value: undefined,
+                key: 'goodsid',
+                placeholder: '选择商品',
+                list: [],
+            },
+        ]);
+        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'account' }];
         const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);
         initData(() => {
             select.value[1].list = getGoodsList().map((e) => {

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

@@ -43,7 +43,7 @@ export default defineComponent({
             // 获取列表数据
             queryTable(queryTradePosition);
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_qhj_order', ['contracttype1', 'goodsid']);
+            registerColumn('table_pcweb_qhj_order', ['contracttype1', 'goodsid', 'operatorid']);
         });
 
         return {

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

@@ -44,7 +44,7 @@ export default defineComponent({
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_deal_order', ['warehousetype', 'warehousename', 'address']);
             // registerColumn('table_pcweb_qhj_withdrawal_review', ['warehousetype', 'warehousename', 'address']);
         });
 

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

@@ -44,7 +44,7 @@ export default defineComponent({
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
+            registerColumn('table_pcweb_qhj_pay_bill', ['warehousetype', 'warehousename', 'address']);
             // registerColumn('table_pcweb_qhj_withdrawal_review', ['warehousetype', 'warehousename', 'address']);
         });
 

+ 5 - 15
src/views/platinum/platinum_financing_information/list/tab/compoments/filter/index.vue

@@ -16,12 +16,10 @@
 <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 { handleFilter, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
 import { initData } from '@/common/methods';
 import { getGoodsList } from '@/services/bus/goods';
-import { SlotParam } from '@/common/setup/filter/interface';
-import { getRangeTime } from '@/utils/time';
 
 export default defineComponent({
     name: 'filter-platinum_pick_query',
@@ -49,18 +47,10 @@ export default defineComponent({
             },
         ]);
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'account' }];
-        const slotParam: SlotParam = {
-            search(result: any) {
-                // 处理范围时间内搜索
-                const time = date.value;
-                const temp = time.length > 1 ? getRangeTime(time[0], time[1]) : [''];
-                result.contractconfirmtime = temp;
-            },
-            reset() {
-                date.value = [];
-            },
-        };
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
+        // 范围时间内过滤
+        const { getFilterRangeTime } = handleTimeFilter('contractconfirmtime');
+
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, getFilterRangeTime(date));
         initData(() => {
             // 选择商品
             select.value[0].list = getGoodsList().map((e) => {

+ 5 - 14
src/views/platinum/platinum_fixed_investment_price_query/compoments/filter/index.vue

@@ -15,11 +15,10 @@
 <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 { handleFilter, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
-import { formatTime, initData } from '@/common/methods';
+import { initData } from '@/common/methods';
 import { getGoodsList } from '@/services/bus/goods';
-import { SlotParam } from '@/common/setup/filter/interface';
 
 export default defineComponent({
     name: 'filter-platinum_pick_query',
@@ -34,19 +33,11 @@ export default defineComponent({
                 list: [],
             },
         ]);
-        const slotParam: SlotParam = {
-            search(result: any) {
-                const time = date.value;
-                const temp = time ? [formatTime(time, 'd')] : [''];
-                result.tradedate = temp;
-            },
-            reset() {
-                date.value = undefined;
-            },
-        };
+        // 具体时间过滤
+        const { getFilterItemTime } = handleTimeFilter('tradedate');
 
         const input: InputList[] = [];
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, getFilterItemTime(date));
         initData(() => {
             select.value[0].list = getGoodsList().map((e) => {
                 return { value: e.goodsid, lable: e.goodsname };

+ 5 - 15
src/views/platinum/platinum_fixed_investment_query/list/flow/compoments/filter/index.vue

@@ -18,12 +18,10 @@
 <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 { handleFilter, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
-import { SlotParam } from '@/common/setup/filter/interface';
 import { initData } from '@/common/methods';
 import { getGoodsList } from '@/services/bus/goods';
-import { getRangeTime } from '@/utils/time';
 
 export default defineComponent({
     name: 'filter-flow',
@@ -39,18 +37,10 @@ export default defineComponent({
             },
         ]);
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'accountid' }];
-        const slotParam: SlotParam = {
-            search(result: any) {
-                // 处理范围时间内搜索
-                const time = date.value;
-                const temp = time.length > 1 ? getRangeTime(time[0], time[1]) : [''];
-                result.triggertime = temp;
-            },
-            reset() {
-                date.value = [];
-            },
-        };
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
+        // 范围时间内过滤
+        const { getFilterRangeTime } = handleTimeFilter('triggertime');
+
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, getFilterRangeTime(date));
         initData(() => {
             // 选择商品
             select.value[0].list = getGoodsList().map((e) => {

+ 6 - 14
src/views/platinum/platinum_fixed_investment_query/list/plan/compoments/filter/index.vue

@@ -15,11 +15,10 @@
 <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 { handleFilter, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
-import { formatTime, initData } from '@/common/methods';
+import { initData } from '@/common/methods';
 import { getGoodsList } from '@/services/bus/goods';
-import { SlotParam } from '@/common/setup/filter/interface';
 
 export default defineComponent({
     name: 'filter-plan',
@@ -45,17 +44,10 @@ export default defineComponent({
             },
         ]);
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'accountid' }];
-        const slotParam: SlotParam = {
-            search(result: any) {
-                const time = date.value;
-                const temp = time ? [formatTime(time, 'd')] : [''];
-                result.nexttriggerdate = temp;
-            },
-            reset() {
-                date.value = undefined;
-            },
-        };
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
+        // 具体时间过滤
+        const { getFilterItemTime } = handleTimeFilter('nexttriggerdate');
+
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, getFilterItemTime(date));
         initData(() => {
             select.value[0].list = getGoodsList().map((e) => {
                 return { value: e.goodsid, lable: e.goodsname };

+ 5 - 15
src/views/platinum/platinum_pick_query/compoments/filter/index.vue

@@ -16,12 +16,10 @@
 <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 { handleFilter, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
 import { initData } from '@/common/methods';
 import { queryPickGoods } from '@/services/go/ermcp/qhj';
-import { SlotParam } from '@/common/setup/filter/interface';
-import { getRangeTime } from '@/utils/time';
 
 export default defineComponent({
     name: 'filter-platinum_pick_query',
@@ -52,18 +50,10 @@ export default defineComponent({
             },
         ]);
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索商品名称', key: 'goodsname' }];
-        const slotParam: SlotParam = {
-            search(result: any) {
-                // 处理范围时间内搜索
-                const time = date.value;
-                const temp = time.length > 1 ? getRangeTime(time[0], time[1]) : [''];
-                result.reqtime = temp;
-            },
-            reset() {
-                date.value = [];
-            },
-        };
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
+        // 范围时间内过滤
+        const { getFilterRangeTime } = handleTimeFilter('reqtime');
+
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, getFilterRangeTime(date));
         initData(() => {
             queryPickGoods().then((res) => {
                 select.value[0].list = res.map((e) => {

+ 4 - 16
src/views/platinum/platinum_recharge_withdrawal_review/compoments/filter/index.vue

@@ -16,10 +16,8 @@
 <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 { handleFilter, handleTimeFilter, InputList, SelectList } from '@/common/setup/filter';
 import { Moment } from 'moment';
-import { SlotParam } from '@/common/setup/filter/interface';
-import { getRangeTime } from '@/utils/time';
 
 export default defineComponent({
     name: 'filter-withdrawal_review',
@@ -28,19 +26,9 @@ export default defineComponent({
         const date = ref<Moment[]>([]);
         const select: SelectList[] = [];
         const input: InputList[] = [{ value: '', placeholder: '模糊搜索账号', key: 'accountcode' }];
-
-        const slotParam: SlotParam = {
-            search(result: any) {
-                // 处理范围时间内搜索
-                const time = date.value;
-                const temp = time.length > 1 ? getRangeTime(time[0], time[1]) : [''];
-                result.updatetime = temp;
-            },
-            reset() {
-                date.value = [];
-            },
-        };
-        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, slotParam);
+        // 范围时间内过滤
+        const { getFilterRangeTime } = handleTimeFilter('reqtime');
+        const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context, getFilterRangeTime(date));
         return {
             date,
             selectList,