huangbin há 4 anos atrás
pai
commit
de5f2741a3

+ 3 - 5
src/services/go/wrtrade/index.ts

@@ -6,9 +6,7 @@ import { getUsrId } from "@/services/bus/user";
 import { commonSearch_go } from "@/services/go";
 import {
     QueryFaProductDetailReq,
-    QueryFilterItemReq,
-    QueryFtDeliveryGoodsReq,
-    QueryHoldLBReq,
+    QueryFilterItemReq, QueryHoldLBReq,
     QueryOrderQuoteDetailReq,
     QueryOrderQuoteReq,
     QueryPerformancePlanReq,
@@ -64,8 +62,8 @@ export function queryFilterItem(req: QueryFilterItemReq): Promise<WrFilterItem[]
  * 查询品种品类筛选框列表 /WrTrade2/QueryFtDeliveryGoods
  * @param req
  */
-export function queryFtDeliveryGoods(req: QueryFtDeliveryGoodsReq): Promise<WrFtDeliveryGoods> {
-    return commonSearch_go('/WrTrade2/QueryFtDeliveryGoods', req).catch((err) => {
+export function queryFtDeliveryGoods(): Promise<WrFtDeliveryGoods[]> {
+    return commonSearch_go('/WrTrade2/QueryFtDeliveryGoods', {}).catch((err) => {
         throw new Error(`查询品种品类筛选框列表: ${err}`);
     });
 }

+ 258 - 257
src/services/go/wrtrade/interface.ts

@@ -4,7 +4,7 @@
 export interface QueryOrderQuoteReq {
     wrpricetype: number//       价格方式 - 1:固定价 2-浮动价
     haswr: number//             是否有仓单 0-没有 1-有(仓单贸易填1,产能预售填0)
-    wrstandardname?: string //  商品名称(筛选条件)
+    wrstandardid?: number //  商品id(筛选条件)
     brandname?: string     //   品牌名称(筛选条件)
     marketid?: number  //       仓单贸易市场id
     pagesize?: number//         每页条数
@@ -403,71 +403,71 @@ export interface QueryPerformancePlanReq {
  * 查询履约信息返回
  */
 export interface WrPerformancePlan {
-    amount	:number;//履约金额(总金额)
-    buyaccountid	:number;//买方账号
-    buyerfreezeamount	:number;//履约冻结(买履约)
-    buyerfreezeamountremain	:number;//履约冻结剩余(买履约)
-    buyorsell	:number;//买卖方向 number;
-//-买 1-卖
-    buypaidamount	:number;//买方已冻/已扣金额 (已付金额)
-    buyusername	:string;//买方名字
-    contractid	:number;//合同ID
-    createtime	:string;//创建时间
-    creatorid	:number;//创建人
-    curstepdeadline	:string;//当前步骤到期时间
-    curstepid	:string;//当前步骤ID
-    curstepname	:string;//当前步骤名称
-    deliverygoodscode	:string;//品种代码
-    deliverygoodsid	:number;//品种ID
-    deliverygoodsname	:string;//品种名称
-    enumdicname	:string;//单位名称
-    expressfee	:number;//运费
-    expressfeeconfirmed	:number;//是否确认运费 - number;
-//:无 1:买方确认 2:卖方确认
-    hasovershort	:number;//是否确认溢短 - number;
-//:没有 1:买方确认 2:卖方确认
-    haswr	:number;//类型 number;
-//-仓单预售 1-仓单贸易
-    marketid	:number;//市场ID
-    middleaccountid	:number;//中间商资金账号ID
-    middleuserid	:number;//中间商用户ID
-    minivalue	:number;//现货商品最小变动值
-    optioncompare	:string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
-    overshortamount	:number;//溢短金额
-    overshortqty	:number;//溢短数量
-    paymenttype	:number;//付款方式 - 1:冻结 2:扣款
-    performanceplanid	:string;//履约计划ID(13number;
-//+yyMMddHHmmss+xxxx)
-    performancestatus	:number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
-//:超时关闭
-    performancetype	:number;//履约类型 - number;
-//:通用 1:交割 2:仓单贸易 3:预售集采 4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式 1number;
-//:法币C2C 11:报价系统 12:挂牌系统
-    qty	:number;//履约数量
-    relatedorderid	:string;//关联单号(履约类型的关联单号)
-    remark	:string;//备注
-    sellaccountid	:number;//卖方账号
-    sellerfreezeamount	:number;//履约冻结(卖履约)
-    sellerfreezeamountremain	:number;//履约冻结剩余(卖履约)
-    sellreceivedamount	:number;//卖方已收金额
-    sellusername	:string;//卖方名字
-    shipremark	:string;//发货备注[物流单号]
-    starttime	:string;//开始时间
-    steptypeid	:number;//履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结 1number;
-//:货款溢短 11:生成合同[中江] 12:运费 9number;
-//:确认支付 91. 确认放行 92买方支付(直接扣款) 用于-1模板“
-    unpaidamount	:number;//剩余款(待支付金额)
-    userid	:number;//用户id
-    warehouseid	:number;//仓库ID
-    warehousename	:string;//仓库名称
-    wrfactortypeid	:string;//仓单要素类型ID(212+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    wrfactortypename	:string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
-    wrstandardcode	:string;//现货商品代码
-    wrstandardid	:number;//现货商品ID
-    wrstandardname	:string;//商品名称
-    wrtransferuserid	:number;//仓单受让用户
-    wrtypename	:string;//商品
+    amount: number;//履约金额(总金额)
+    buyaccountid: number;//买方账号
+    buyerfreezeamount: number;//履约冻结(买履约)
+    buyerfreezeamountremain: number;//履约冻结剩余(买履约)
+    buyorsell: number;//买卖方向 number;
+    //-买 1-卖
+    buypaidamount: number;//买方已冻/已扣金额 (已付金额)
+    buyusername: string;//买方名字
+    contractid: number;//合同ID
+    createtime: string;//创建时间
+    creatorid: number;//创建人
+    curstepdeadline: string;//当前步骤到期时间
+    curstepid: string;//当前步骤ID
+    curstepname: string;//当前步骤名称
+    deliverygoodscode: string;//品种代码
+    deliverygoodsid: number;//品种ID
+    deliverygoodsname: string;//品种名称
+    enumdicname: string;//单位名称
+    expressfee: number;//运费
+    expressfeeconfirmed: number;//是否确认运费 - number;
+    //:无 1:买方确认 2:卖方确认
+    hasovershort: number;//是否确认溢短 - number;
+    //:没有 1:买方确认 2:卖方确认
+    haswr: number;//类型 number;
+    //-仓单预售 1-仓单贸易
+    marketid: number;//市场ID
+    middleaccountid: number;//中间商资金账号ID
+    middleuserid: number;//中间商用户ID
+    minivalue: number;//现货商品最小变动值
+    optioncompare: string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
+    overshortamount: number;//溢短金额
+    overshortqty: number;//溢短数量
+    paymenttype: number;//付款方式 - 1:冻结 2:扣款
+    performanceplanid: string;//履约计划ID(13number;
+    //+yyMMddHHmmss+xxxx)
+    performancestatus: number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
+    //:超时关闭
+    performancetype: number;//履约类型 - number;
+    //:通用 1:交割 2:仓单贸易 3:预售集采 4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式 1number;
+    //:法币C2C 11:报价系统 12:挂牌系统
+    qty: number;//履约数量
+    relatedorderid: string;//关联单号(履约类型的关联单号)
+    remark: string;//备注
+    sellaccountid: number;//卖方账号
+    sellerfreezeamount: number;//履约冻结(卖履约)
+    sellerfreezeamountremain: number;//履约冻结剩余(卖履约)
+    sellreceivedamount: number;//卖方已收金额
+    sellusername: string;//卖方名字
+    shipremark: string;//发货备注[物流单号]
+    starttime: string;//开始时间
+    steptypeid: number;//履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结 1number;
+    //:货款溢短 11:生成合同[中江] 12:运费 9number;
+    //:确认支付 91. 确认放行 92买方支付(直接扣款) 用于-1模板“
+    unpaidamount: number;//剩余款(待支付金额)
+    userid: number;//用户id
+    warehouseid: number;//仓库ID
+    warehousename: string;//仓库名称
+    wrfactortypeid: string;//仓单要素类型ID(212+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    wrfactortypename: string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
+    wrstandardcode: string;//现货商品代码
+    wrstandardid: number;//现货商品ID
+    wrstandardname: string;//商品名称
+    wrtransferuserid: number;//仓单受让用户
+    wrtypename: string;//商品
 }
 
 /**
@@ -612,6 +612,7 @@ export interface QueryWrStandardFactoryItemReq {
 export interface WrStandardFactoryItem {
     dgfactoryitemid: number         //  选择项id
     dgfactoryitemvalue: string      //  要素项值
+    warehouseid: number // 仓库id
 }
 
 export interface WrStandardFactoryItemEx {
@@ -633,51 +634,51 @@ export interface QueryWrPerformancePlanStepReq {
  * 查询履约信息返回
  */
 export interface WrPerformancePlanStep {
-    delaydays	:number;//延期申请天数
-    deliverygoodscode	:string;//品种代码
-    deliverygoodsid	:number;//品种ID
-    deliverygoodsname	:string;//品种名称
-    endtime	:string;//结束日期
-    enumdicname	:string;//单位名称
-    executeside	:number;//步骤执行方 - 1:买方 2:卖方
-    handlestatus	:number;//处理状态 - 1:开始 2:结束 3:冻结请求 4:冻结返回成功 5:冻结返回失败 6:扣款请求 7:扣款返回成功 8:扣款返回失败 9:仓单转移请求 1number;
-//:仓单转移返回成功 11:仓单转移返回失败 12:加钱请求 13:加钱返回成功 14:加钱返回失败 15:解冻仓单头寸请求 16:解冻仓单头寸返回成功 17:解冻仓单头寸返回失败 18:解冻库位请求 19:解冻库位返回成功 2number;
-//:解冻库位返回失败
-    isauto	:number;//是否自动 - number;
-//:不自动 1:自动
-    islastreceivestep	:number;//是否最后收款步骤 - number;
-//:不是 1:是 (暂时不用,由服务自己判断是否为最后一步付款或收款)
-    minivalue	:number;//现货商品最小变动值
-    optioncompare	:string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
-    overdays	:number;//超期天数 = 当前时间(数据库时间) - 结束日期
-    performancestepid	:string;//履约步骤ID(131+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    planid	:string;//所属履约计划ID
-    realamount	:number;//实际完成金额
-    relatedorderid	:string;//关联单号
-    remaindays	:number;//剩余天数
-    remark	:string;//错误备注
-    starttime	:string;//开始日期
-    stepamount	:number;//步骤金额
-    stepdays	:number;//距离上一步天数(分钟)
-    stepindex	:number;//步骤序号
-    steplanchtype	:number;//步骤启动类型 - 1:系统自动 2:手动
-    stepremark	:string;//步骤备注
-    stepstatus	:number;//步骤状态 - 1:待开始 2:进行中 3:已完成 4:延期(进行中) 5:失败 6:自动完成 7:超时关闭
-    steptypeid	:number;//履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结 1number;
-//:货款溢短 11:生成合同[中江] 12:运费 9number;
-//:确认支付 91. 确认放行 92买方支付(直接扣款) 用于-1模板“
-    steptypename	:string;//步骤名称
-    stepvalue	:number;//步骤值
-    warehouseid	:number;//仓库ID
-    warehousename	:string;//仓库名称
-    wrfactortypeid	:string;//仓单要素类型ID(212+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    wrfactortypename	:string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
-    wrstandardcode	:string;//现货商品代码
-    wrstandardid	:number;//现货商品ID
-    wrstandardname	:string;//商品名称
-    wrtypename	:string;//商品
+    delaydays: number;//延期申请天数
+    deliverygoodscode: string;//品种代码
+    deliverygoodsid: number;//品种ID
+    deliverygoodsname: string;//品种名称
+    endtime: string;//结束日期
+    enumdicname: string;//单位名称
+    executeside: number;//步骤执行方 - 1:买方 2:卖方
+    handlestatus: number;//处理状态 - 1:开始 2:结束 3:冻结请求 4:冻结返回成功 5:冻结返回失败 6:扣款请求 7:扣款返回成功 8:扣款返回失败 9:仓单转移请求 1number;
+    //:仓单转移返回成功 11:仓单转移返回失败 12:加钱请求 13:加钱返回成功 14:加钱返回失败 15:解冻仓单头寸请求 16:解冻仓单头寸返回成功 17:解冻仓单头寸返回失败 18:解冻库位请求 19:解冻库位返回成功 2number;
+    //:解冻库位返回失败
+    isauto: number;//是否自动 - number;
+    //:不自动 1:自动
+    islastreceivestep: number;//是否最后收款步骤 - number;
+    //:不是 1:是 (暂时不用,由服务自己判断是否为最后一步付款或收款)
+    minivalue: number;//现货商品最小变动值
+    optioncompare: string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
+    overdays: number;//超期天数 = 当前时间(数据库时间) - 结束日期
+    performancestepid: string;//履约步骤ID(131+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    planid: string;//所属履约计划ID
+    realamount: number;//实际完成金额
+    relatedorderid: string;//关联单号
+    remaindays: number;//剩余天数
+    remark: string;//错误备注
+    starttime: string;//开始日期
+    stepamount: number;//步骤金额
+    stepdays: number;//距离上一步天数(分钟)
+    stepindex: number;//步骤序号
+    steplanchtype: number;//步骤启动类型 - 1:系统自动 2:手动
+    stepremark: string;//步骤备注
+    stepstatus: number;//步骤状态 - 1:待开始 2:进行中 3:已完成 4:延期(进行中) 5:失败 6:自动完成 7:超时关闭
+    steptypeid: number;//履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结 1number;
+    //:货款溢短 11:生成合同[中江] 12:运费 9number;
+    //:确认支付 91. 确认放行 92买方支付(直接扣款) 用于-1模板“
+    steptypename: string;//步骤名称
+    stepvalue: number;//步骤值
+    warehouseid: number;//仓库ID
+    warehousename: string;//仓库名称
+    wrfactortypeid: string;//仓单要素类型ID(212+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    wrfactortypename: string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
+    wrstandardcode: string;//现货商品代码
+    wrstandardid: number;//现货商品ID
+    wrstandardname: string;//商品名称
+    wrtypename: string;//商品
 }
 
 /**
@@ -685,68 +686,68 @@ export interface WrPerformancePlanStep {
  */
 export interface QueryWrScfContractReq {
     userid: number                  //  用户id
-    scfcontractid? : number         //  融资合同id
+    scfcontractid?: number         //  融资合同id
 }
 
 /**
  * 查询仓单贸易融资合同 返回
  */
-export interface WrScfContract{
-    borroweruserid	:number;//借款用户ID
-    buybackwrpositionqty	:number;//已回购仓单头寸数量 - [仓单回购\仓单质押] -> 已回购数量
-    closeinterest	:number;//已结利息 -> 已结费用
-    currisklevel	:number;//风险级别 - 1:正常 2:追加货款 3:支付尾款
-    deadline	:string;//截止日期(yyyyMMdd) -> 借款到期时间
-    deliverygoodscode	:string;//品种代码
-    deliverygoodsid	:number;//品种ID
-    deliverygoodsname	:string;//品种名称
-    enumdicname	:string;//单位名称
-    financingdays	:number;//天数(天)
-    initmargin	:number;//保证金 - [仓单回购]
-    interestamount	:number;//计息金额=合同剩余金额 - 初始保证金 - 追缴保证金 \ 合同剩余金额
-    interestdebt	:number;//利息欠款(记录负数) -> 费用欠款
-    interestminlen	:number;//最小起息天数
-    interestrate	:number;//利率
-    interestratemode	:number;//利率方式 - 1:年利率 2:日利率 3:日固定值
-    interestsettlemode	:number;//结息方式 - 1:按日结息 3:按月结息
-    interestsettlevalue	:number;//结息方式值
-    isautoloan	:number;//是否自动放款 - number;
-//:手动 1:自动 - [仓单质押]
-    lastcloseinterestday	:string;//最近结息日(yyyyMMdd)
-    lenderamount	:number;//贷款金额 -> 借款金额
-    lenderuserid	:number;//贷款方用户ID -> 融出方用户ID
-    lenderusername	:string;//融出方
-    marginratio	:number;//保证金比率质押率 - [仓单质押]
-    marketid	:number;//市场ID - 拆成三个独立模式后,根据市场ID处理
-    minivalue	:number;//现货商品最小变动值
-    optioncompare	:string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
-    pricemove	:number;//估值升贴水值
-    productdetailid	:number;//产品组合ID
-    productid	:number;//金融产品ID
-    productname	:string;//产品名称
-    remainamount	:number;//合同剩余金额 -> 剩余金额
-    remainwrpositionqty	:number;//剩余仓单头寸数量 - [仓单回购\仓单质押] -> 剩余数量(待回购数量)
-    remark	:string;//备注
-    scfcontractid	:string;//SCF合同ID(31number;
-//+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    scfcontractstatus	:number;//合同状态 - 1:待确认 2:已确认 3:确认拒绝 4:已支付保证金 5:已激活 6:已违约 7:到期结束 8:延期结束 9:违约结束 1number;
-//:已注销 11:已关闭 99:未提交
-    scfcontracttype	:number;//合同类型 - 1:仓单回购 2:仓单质押 3:合作套保 4:资金贷款 5:融资单 6:融资回购
-    startinterestday	:string;//计息开始日(yyyyMMdd) -> 开始计费日期
-    totalinterest	:number;//已计利息 -> 已计费用
-    unpaidinterest	:number;//未结费用
-    updatetime	:string;//更新时间
-    warehouseid	:number;//仓库ID
-    warehousename	:string;//仓库名称
-    wrfactortypeid	:string;//仓单要素类型ID(212+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    wrfactortypename	:string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
-    wrqty	:number;//仓单数量 - [仓单回购\仓单质押] -> 数量
-    wrstandardcode	:string;//现货商品代码
-    wrstandardid	:number;//现货商品ID
-    wrstandardname	:string;//商品名称
-    wrtypename	:string;//商品
+export interface WrScfContract {
+    borroweruserid: number;//借款用户ID
+    buybackwrpositionqty: number;//已回购仓单头寸数量 - [仓单回购\仓单质押] -> 已回购数量
+    closeinterest: number;//已结利息 -> 已结费用
+    currisklevel: number;//风险级别 - 1:正常 2:追加货款 3:支付尾款
+    deadline: string;//截止日期(yyyyMMdd) -> 借款到期时间
+    deliverygoodscode: string;//品种代码
+    deliverygoodsid: number;//品种ID
+    deliverygoodsname: string;//品种名称
+    enumdicname: string;//单位名称
+    financingdays: number;//天数(天)
+    initmargin: number;//保证金 - [仓单回购]
+    interestamount: number;//计息金额=合同剩余金额 - 初始保证金 - 追缴保证金 \ 合同剩余金额
+    interestdebt: number;//利息欠款(记录负数) -> 费用欠款
+    interestminlen: number;//最小起息天数
+    interestrate: number;//利率
+    interestratemode: number;//利率方式 - 1:年利率 2:日利率 3:日固定值
+    interestsettlemode: number;//结息方式 - 1:按日结息 3:按月结息
+    interestsettlevalue: number;//结息方式值
+    isautoloan: number;//是否自动放款 - number;
+    //:手动 1:自动 - [仓单质押]
+    lastcloseinterestday: string;//最近结息日(yyyyMMdd)
+    lenderamount: number;//贷款金额 -> 借款金额
+    lenderuserid: number;//贷款方用户ID -> 融出方用户ID
+    lenderusername: string;//融出方
+    marginratio: number;//保证金比率质押率 - [仓单质押]
+    marketid: number;//市场ID - 拆成三个独立模式后,根据市场ID处理
+    minivalue: number;//现货商品最小变动值
+    optioncompare: string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
+    pricemove: number;//估值升贴水值
+    productdetailid: number;//产品组合ID
+    productid: number;//金融产品ID
+    productname: string;//产品名称
+    remainamount: number;//合同剩余金额 -> 剩余金额
+    remainwrpositionqty: number;//剩余仓单头寸数量 - [仓单回购\仓单质押] -> 剩余数量(待回购数量)
+    remark: string;//备注
+    scfcontractid: string;//SCF合同ID(31number;
+    //+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    scfcontractstatus: number;//合同状态 - 1:待确认 2:已确认 3:确认拒绝 4:已支付保证金 5:已激活 6:已违约 7:到期结束 8:延期结束 9:违约结束 1number;
+    //:已注销 11:已关闭 99:未提交
+    scfcontracttype: number;//合同类型 - 1:仓单回购 2:仓单质押 3:合作套保 4:资金贷款 5:融资单 6:融资回购
+    startinterestday: string;//计息开始日(yyyyMMdd) -> 开始计费日期
+    totalinterest: number;//已计利息 -> 已计费用
+    unpaidinterest: number;//未结费用
+    updatetime: string;//更新时间
+    warehouseid: number;//仓库ID
+    warehousename: string;//仓库名称
+    wrfactortypeid: string;//仓单要素类型ID(212+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    wrfactortypename: string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
+    wrqty: number;//仓单数量 - [仓单回购\仓单质押] -> 数量
+    wrstandardcode: string;//现货商品代码
+    wrstandardid: number;//现货商品ID
+    wrstandardname: string;//商品名称
+    wrtypename: string;//商品
 }
 
 /**
@@ -760,68 +761,68 @@ export interface QueryWrFinanceBuyApplyReq {
  * 查询融资购买申请 返回
  */
 export interface WrFinanceBuyApply {
-    applydate	:string;//申请时间
-    applystatus	:number;//申请状态 - 1:待审核 2.审核中 3:审核通过 4:审核拒绝 5:审核失败 6:已撤销 7:自动审核 8:融资失败
-    applyuserid	:number;//申请人
-    auditdate	:string;//审核时间
-    auditremark	:string;//审核备注
-    audituserid	:number;//审核人
-    buyaccountid	:number;//买方资金账号
-    buyorsell	:number;//买卖 - number;
-//:买 1:卖
-    buyuserid	:number;//买方用户ID
-    buyusername	:string;//买方名称
-    buywrtradeorderid	:string;//融资方买委托单ID
-    deliverygoodscode	:string;//品种代码
-    deliverygoodsid	:number;//品种ID
-    deliverygoodsname	:string;//品种名称
-    deliverymonth	:string;//交收月(yyyy-MM) [无仓单HasWR =number;
-//]
-    enumdicname	:string;//单位名称
-    financeaccountid	:number;//融资方资金帐户ID
-    financeapplyid	:string;//融资申请单ID(32number;
-//+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    financeareauserid	:string;//融资方用户ID
-    financename	:string;//融出方名称
-    financetype	:number;//融资类型 1-融资回购
-    financingdays	:number;//天数(天)
-    freezebuymargin	:number;//冻结融资保证金(买方)
-    handleremark	:string;//处理备注
-    handlestatus	:number;//处理状态
-    interestminlen	:number;//最小起息天数
-    interestrate	:number;//利率
-    interestratemode	:number;//利率方式 - 1:年利率 2:日利率 3:日固定值
-    interestsettlemode	:number;//结息方式 - 1:按日结息 3:按月结息
-    interestsettlevalue	:number;//结息方式值
-    isautoloan	:number;//是否自动放款 - number;
-//:手动 1:自动
-    marginratio	:number;//保证金比率质押率 - [仓单质押]
-    marketid	:number;//市场ID
-    minivalue	:number;//现货商品最小变动值
-    optioncompare	:string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
-    orderqty	:number;//委托数量(商品数量)
-    productdetailid	:number;//产品组合ID
-    productid	:number;//金融产品ID
-    productname	:string;//产品名称
-    remark	:string;//备注
-    scfcontractid	:string;//仓单回购合同ID
-    sellaccountid	:number;//卖方资金账号
-    selluserid	:number;//卖方用户ID
-    sellwrtradeorderid	:string;//卖方委托单ID
-    tradeamount	:number;//成交金额(借款金额)
-    tradedate	:string;//交易日(yyyyMMdd)
-    tradeprice	:number;//成交价格
-    warehouseid	:number;//仓库ID
-    warehousename	:string;//仓库名称
-    wrfactortypeid	:string;//仓单要素类型ID(212+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    wrfactortypename	:string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
-    wrpricetype	:number;//价格方式 - 1:固定价 2-浮动价 - [挂牌单]
-    wrstandardcode	:string;//现货商品代码
-    wrstandardid	:number;//现货商品ID
-    wrstandardname	:string;//商品名称
-    wrtypename	:string;//商品
+    applydate: string;//申请时间
+    applystatus: number;//申请状态 - 1:待审核 2.审核中 3:审核通过 4:审核拒绝 5:审核失败 6:已撤销 7:自动审核 8:融资失败
+    applyuserid: number;//申请人
+    auditdate: string;//审核时间
+    auditremark: string;//审核备注
+    audituserid: number;//审核人
+    buyaccountid: number;//买方资金账号
+    buyorsell: number;//买卖 - number;
+    //:买 1:卖
+    buyuserid: number;//买方用户ID
+    buyusername: string;//买方名称
+    buywrtradeorderid: string;//融资方买委托单ID
+    deliverygoodscode: string;//品种代码
+    deliverygoodsid: number;//品种ID
+    deliverygoodsname: string;//品种名称
+    deliverymonth: string;//交收月(yyyy-MM) [无仓单HasWR =number;
+    //]
+    enumdicname: string;//单位名称
+    financeaccountid: number;//融资方资金帐户ID
+    financeapplyid: string;//融资申请单ID(32number;
+    //+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    financeareauserid: string;//融资方用户ID
+    financename: string;//融出方名称
+    financetype: number;//融资类型 1-融资回购
+    financingdays: number;//天数(天)
+    freezebuymargin: number;//冻结融资保证金(买方)
+    handleremark: string;//处理备注
+    handlestatus: number;//处理状态
+    interestminlen: number;//最小起息天数
+    interestrate: number;//利率
+    interestratemode: number;//利率方式 - 1:年利率 2:日利率 3:日固定值
+    interestsettlemode: number;//结息方式 - 1:按日结息 3:按月结息
+    interestsettlevalue: number;//结息方式值
+    isautoloan: number;//是否自动放款 - number;
+    //:手动 1:自动
+    marginratio: number;//保证金比率质押率 - [仓单质押]
+    marketid: number;//市场ID
+    minivalue: number;//现货商品最小变动值
+    optioncompare: string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
+    orderqty: number;//委托数量(商品数量)
+    productdetailid: number;//产品组合ID
+    productid: number;//金融产品ID
+    productname: string;//产品名称
+    remark: string;//备注
+    scfcontractid: string;//仓单回购合同ID
+    sellaccountid: number;//卖方资金账号
+    selluserid: number;//卖方用户ID
+    sellwrtradeorderid: string;//卖方委托单ID
+    tradeamount: number;//成交金额(借款金额)
+    tradedate: string;//交易日(yyyyMMdd)
+    tradeprice: number;//成交价格
+    warehouseid: number;//仓库ID
+    warehousename: string;//仓库名称
+    wrfactortypeid: string;//仓单要素类型ID(212+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    wrfactortypename: string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
+    wrpricetype: number;//价格方式 - 1:固定价 2-浮动价 - [挂牌单]
+    wrstandardcode: string;//现货商品代码
+    wrstandardid: number;//现货商品ID
+    wrstandardname: string;//商品名称
+    wrtypename: string;//商品
 }
 
 /**
@@ -834,18 +835,18 @@ export interface QueryWrBuybackDetailReq {
 /**
  * 查询仓单回购明细 返回
  */
-export interface WrBuybackDetail{
-    buybackamount	:number;//回购金额
-    buybackqty	:number;//回购数量
-    buybackreleasemargin	:number;//回购释放保证金
-    buybacktime	:string;//回购时间
-    errordesc	:string;//错误描述
-    handlestatus	:number;//处理 - 1:待处理 2:处理成功 3:处理失败
-    relatedwrid	:number;//关联仓单ID
-    scfcontractid	:string;//SCF合同ID
-    scfwrbuybackid	:number;//SCF仓单回购明细ID(312+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    tradedate	:string;//交易日(yyyyMMdd)
+export interface WrBuybackDetail {
+    buybackamount: number;//回购金额
+    buybackqty: number;//回购数量
+    buybackreleasemargin: number;//回购释放保证金
+    buybacktime: string;//回购时间
+    errordesc: string;//错误描述
+    handlestatus: number;//处理 - 1:待处理 2:处理成功 3:处理失败
+    relatedwrid: number;//关联仓单ID
+    scfcontractid: string;//SCF合同ID
+    scfwrbuybackid: number;//SCF仓单回购明细ID(312+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    tradedate: string;//交易日(yyyyMMdd)
 }
 
 /**
@@ -858,19 +859,19 @@ export interface QueryWrScfContractInterestReq {
 /**
  * 查询融资合同费用明细 返回
  */
-export interface WrScfContractInterest{
-    closeinterest	:number;//已结利息
-    closeintereststatus	:number;//结息状态 - 1:未结 2:已结
-    closetime	:string;//结息时间
-    closetradedate	:string;//结息交易日
-    creatorid	:number;//操作人ID
-    dayrate	:number;//日利率(根据利率配置计算出的日利率值,年利率则除以36number;
-//,保留5位小数)
-    interest	:number;//利息
-    interestamount	:number;//计息金额
-    interestday	:string;//计息日(yyyyMMdd)
-    scfcontractid	:string;//SCF合同ID
-    scfcontractinterestid	:number;//SCF合同计息ID(313+Unix秒时间戳(1number;
-//位)+xxxxxx)
-    updatetime	:string;//更新时间
+export interface WrScfContractInterest {
+    closeinterest: number;//已结利息
+    closeintereststatus: number;//结息状态 - 1:未结 2:已结
+    closetime: string;//结息时间
+    closetradedate: string;//结息交易日
+    creatorid: number;//操作人ID
+    dayrate: number;//日利率(根据利率配置计算出的日利率值,年利率则除以36number;
+    //,保留5位小数)
+    interest: number;//利息
+    interestamount: number;//计息金额
+    interestday: string;//计息日(yyyyMMdd)
+    scfcontractid: string;//SCF合同ID
+    scfcontractinterestid: number;//SCF合同计息ID(313+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    updatetime: string;//更新时间
 }

+ 1 - 2
src/views/market/spot_trade/components/buy-sell-market/setup.ts

@@ -111,10 +111,9 @@ export function handleIs(enumName: EnumRouterName, buyOrSell: BuyOrSell) {
 // 获取金额计算规则
 const rules = ref<WrMarketTradeConfig[]>([])
 export function handlePriceRule(loading: Ref<boolean>, marketid: number) {
+    if (rules.value.length) return
     queryResultLoadingAndInfo(queryWrMarketTradeConfig, loading, { marketid }).then(res => {
-
         rules.value = res;
-        console.log('rules', res)
     })
 }
 export function getRules() {

+ 226 - 0
src/views/market/spot_trade/components/filter/index.vue

@@ -0,0 +1,226 @@
+<template>
+  <!-- 报表通用过滤 -->
+  <div class="filterTable">
+    <div class="filter-custom-table">
+      <a-tree-select v-model:value="selectedFT"
+                     @change="changeFT"
+                     style="width: 200px"
+                     :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                     :tree-data="FtDeliveryGoods"
+                     placeholder="全部商品"
+                     :showCheckedStrategy="ALL"
+                     tree-default-expand-all>
+      </a-tree-select>
+      <a-select label-in-value
+                class="conditionSelect"
+                v-for="(item, index) in wrLsit"
+                :key="index + '11'"
+                style="width: 120px"
+                v-model:value="item.selected"
+                :placeholder="`全部${item.itemtypename}`">
+        <a-select-option v-for="sub in item.itemlst"
+                         :key="sub.dgfactoryitemid">
+          {{sub.dgfactoryitemvalue}}
+        </a-select-option>
+      </a-select>
+      <a-space direction="vertical"
+               v-if="!isWR()">
+        <a-month-picker :allowClear="false"
+                        placeholder="全部交收月"
+                        v-model:value="time"
+                        class="commonDatePicker conditionPicker" />
+      </a-space>
+      <a-select class="conditionSelect"
+                v-if="isFloat()"
+                :style="{width: '180px', maxHeight: '400px', overflow: 'auto' }"
+                @change="goodsChange"
+                placeholder="全部期货合约">
+        <a-select-option v-for="item in goodsList"
+                         :value="item.goodsid"
+                         :key="item.goodsid">{{item.goodscode}}({{item.goodsname}})
+        </a-select-option>
+      </a-select>
+      <a-button class="selectBtn"
+                @click="search(true)">筛选</a-button>
+      <a-button class="selectBtn"
+                @click="listingAction">挂牌求购
+      </a-button>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+import FilterOption from '@/common/components/filter/index.vue';
+import { defineComponent, PropType } from 'vue';
+import { ref } from 'vue';
+import { handlMiddleGoods } from '@/views/report/setup';
+import { initData } from '@/common/methods';
+import { handleFtDeliveryGoods, handleWarehouse } from '../../setup';
+import { queryWrStandardFactoryItem } from '@/services/go/wrtrade';
+import { WrStandardFactoryItemEx } from '@/services/go/wrtrade/interface';
+import { message, TreeSelect } from 'ant-design-vue';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { Moment } from 'moment';
+import moment from 'moment';
+import { handleGoods } from '@/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/setup';
+import { addSubscribeQuotation, removeSubscribeQuotation } from '@/services/socket/quota';
+import { v4 } from 'uuid';
+import { getGoodsList, getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
+import { handleIs, setGoodsPrice } from '../buy-sell-market/setup';
+import { BuyOrSell, TradeMode } from '@/common/constants/enumCommon';
+import { getMarketByTradeMode } from '@/services/bus/market';
+import { handlePriceRule } from '@/views/market/spot_trade/components/buy-sell-market/setup';
+
+const ALL = TreeSelect.SHOW_ALL;
+
+interface SelectList extends WrStandardFactoryItemEx {
+    selected: { key: number; label: Object; value: number } | undefined;
+}
+
+export default defineComponent({
+    name: 'exposure-filter-table',
+    components: { FilterOption },
+    props: {
+        enumName: {
+            default: '',
+            type: String as PropType<EnumRouterName>,
+        },
+    },
+    setup(props, context) {
+        const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
+        const loading = ref<boolean>(false);
+        const marketInfo = getMarketByTradeMode(TradeMode.WarehouseReceiptTrade);
+        if (marketInfo) {
+            // 获取计算规则
+            handlePriceRule(loading, marketInfo.marketid);
+        }
+        // 商品
+        const { FtDeliveryGoods } = handleFtDeliveryGoods();
+        const selectedFT = ref<number>();
+
+        // 仓单要素
+        const wrLsit = ref<SelectList[]>([]);
+        function changeFT(value: number, label: any, extra: any) {
+            queryWrStandardFactoryItem({ wrstandardid: value }).then((res) => {
+                const result: SelectList[] = [];
+                res.forEach((el) => {
+                    result.push({ selected: undefined, ...el });
+                });
+                wrLsit.value = result;
+            });
+        }
+        // 全部期货合约
+        const goodsList = ref<Goods[]>([]);
+        const selectedGoods = ref<Goods>();
+        initData(() => {
+            goodsList.value = getGoodsList();
+        });
+        const uuid = v4();
+        // 切换商品
+        function goodsChange(id: number) {
+            //行情订阅
+            removeSubscribeQuotation(uuid);
+            const goods = goodsList.value.find((e) => e.goodsid === id);
+            selectedGoods.value = goods;
+            const arr = [{ exchangeCode: 250, goodsCode: goods!.goodscode, subState: 0 }];
+            addSubscribeQuotation(uuid, arr);
+        }
+        // 交收月
+        const time = ref<Moment>(); // string 交收月
+        function search(isQuery: boolean) {
+            const result: any = {};
+            if (selectedFT.value) {
+                //  商品名称(筛选条件)
+                const id = selectedFT.value;
+                result.wrstandardid = id;
+                FtDeliveryGoods.value.forEach((item) => {
+                    item.children?.forEach((el) => {
+                        if (el.key === id) {
+                            //  品种id
+                            result.deliverygoodsid = item.key;
+                        }
+                    });
+                });
+            }
+            wrLsit.value.forEach((el) => {
+                const { selected, itemtypename } = el;
+                if (selected) {
+                    const { key } = selected;
+                    if (itemtypename === '仓库') {
+                        result.warehouseid = el.itemlst.find((e) => e.dgfactoryitemid === key)!.warehouseid;
+                    } else {
+                        // 商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm
+                        const name = el.itemlst.find((e) => e.dgfactoryitemid === key)!.dgfactoryitemvalue;
+                        result.dgitemname = result.dgitemname ? `${result.dgitemname},${name}` : name;
+                    }
+                }
+            });
+            if (!isWR()) {
+                // 预售
+                if (time.value) {
+                    //   交收月(yyyy-mm) 仓单预售填写
+                    result.deliverymonth = moment(time.value).format('YYYY-MM');
+                }
+            }
+            if (isQuery) {
+                context.emit('search', result);
+            }
+            return result;
+        }
+        function listingAction() {
+            if (!selectedFT.value) {
+                message.warn('请选中商品!');
+                return;
+            }
+            let flag = true;
+            for (const item of wrLsit.value) {
+                if (!item.selected) {
+                    message.warn(`请选择${item.itemtypename}`);
+                    flag = false;
+                    return;
+                }
+            }
+
+            if (flag) {
+                if (!isWR()) {
+                    if (!time.value) {
+                        message.warn('请选中交收月!');
+                        return;
+                    }
+                }
+                if (isFloat()) {
+                    if (!selectedGoods.value) {
+                        message.warn('请选中期货合约!');
+                        return;
+                    }
+                    const result = getQuoteDayInfoByCodeFindPrice(selectedGoods.value.goodscode);
+                    setGoodsPrice(result);
+                }
+                const result = search(false);
+                context.emit('buy', result, selectedGoods.value);
+            }
+        }
+        return {
+            FtDeliveryGoods,
+            selectedFT,
+            wrLsit,
+            changeFT,
+            search,
+            listingAction,
+            ALL,
+            time,
+            goodsList,
+            goodsChange,
+            isWR,
+            isFloat,
+            // findGoodsCode,
+            // handleGoodsChange,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;
+

+ 141 - 139
src/views/market/spot_trade/components/post_buying/index.vue

@@ -1,140 +1,143 @@
 <template>
-    <!-- 挂牌求购 -->
-    <Drawer :title="'挂牌求购'" :placement="'right'" :visible="visible" @cancel="cancel" class="top">
-        <div class="post_buying">
-            <div class="formBar">
-                <a-form
-                    class="inlineForm dialogForm"
-                    ref="formRef"
-                    :model="formState"
-                    :rules="rules"
-                >
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="交易账户" name="accountid">
-                                <a-select
-                                    class="inlineFormSelect"
-                                    style="width: 260px"
-                                    v-model:value="formState.accountid"
-                                    placeholder="请选择"
-                                >
-                                    <a-select-option
-                                        v-for="item in accountList"
-                                        :value="item.accountid"
-                                        :key="item.accountid"
-                                    >{{item.accountid}}</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="!isFloat()">
-                            <a-form-item label="挂牌价格" name="FixedPrice">
-                                <a-input-number
-                                    class="commonInput"
-                                    style="width: 260px"
-                                    :min="0"
-                                    v-model:value="formState.FixedPrice"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-else>
-                            <a-form-item label="基差" name="PriceMove">
-                                <a-input-number
-                                    class="commonInput"
-                                    style="width: 260px"
-                                    v-model:value="formState.PriceMove"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isFloat()">
-                            <a-form-item label="估算价" name="PriceMove">
-                                <span>估算价估算价</span>
-                            </a-form-item>
-                        </a-col>
+  <!-- 挂牌求购 -->
+  <Drawer :title="'挂牌求购'"
+          :placement="'right'"
+          :visible="visible"
+          @cancel="cancel"
+          class="top">
+    <div class="post_buying">
+      <div class="formBar">
+        <a-form class="inlineForm dialogForm"
+                ref="formRef"
+                :model="formState"
+                :rules="rules">
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="交易账户"
+                           name="accountid">
+                <a-select class="inlineFormSelect"
+                          style="width: 260px"
+                          v-model:value="formState.accountid"
+                          placeholder="请选择">
+                  <a-select-option v-for="item in accountList"
+                                   :value="item.accountid"
+                                   :key="item.accountid">{{item.accountid}}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="!isFloat()">
+              <a-form-item label="挂牌价格"
+                           name="FixedPrice">
+                <a-input-number class="commonInput"
+                                style="width: 260px"
+                                :min="0"
+                                v-model:value="formState.FixedPrice" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-else>
+              <a-form-item label="基差"
+                           name="PriceMove">
+                <a-input-number class="commonInput"
+                                style="width: 260px"
+                                v-model:value="formState.PriceMove" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="isFloat()">
+              <a-form-item label="估算价"
+                           name="PriceMove">
+                <span>估算价估算价</span>
+              </a-form-item>
+            </a-col>
 
-                        <a-col :span="24">
-                            <a-form-item label="挂牌数量" name="OrderQty">
-                                <a-input-number
-                                    class="commonInput"
-                                    style="width: 260px"
-                                    :min="0"
-                                    :max="getMaxNum()"
-                                    v-model:value="formState.OrderQty"
-                                />
-                                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="!isWR()">
-                            <a-form-item label="交收月" name="DeliveryMonth">
-                                <a-month-picker
-                                    style="width: 260px"
-                                    v-model:value="formState.DeliveryMonth"
-                                    :allowClear="false"
-                                    class="commonDatePicker dialogDatePicker"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="mt-10">
-                            <a-form-item>
-                                <a-slider
-                                    ::min="0"
-                                    v-model:value="formState.OrderQty"
-                                    :max="99999999"
-                                    class="formSlider"
-                                />
-                                <div class="unit">
-                                    <span>{{selectedRow.minivalue}}</span>
-                                    <span>{{getMaxNum()}}{{selectedRow.enumdicname}}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="起摘数量" class="relative">
-                                <a-input
-                                    class="commonInput"
-                                    :suffix="selectedRow.enumdicname"
-                                    :min="selectedRow.minivalue"
-                                    style="width: 260px"
-                                />
-                                <div
-                                    class="tip"
-                                >最小单位:{{selectedRow.minivalue}}{{selectedRow.enumdicname}}</div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="relative mt20">
-                            <a-form-item :label="isFloat() ? '估算金额' : '摘牌金额'">
-                                <span class="white ml8">{{getMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="relative">
-                            <a-form-item :label="getMargin() ? '履约保证金' : ''">
-                                <a-row>
-                                    <a-col :span="8" v-if="getMargin()">
-                                        <span class="white ml8">{{getMargin()}}</span>
-                                    </a-col>
-                                    <a-col :span="4" class="tr">
-                                        <span class="grey1">可用资金</span>
-                                    </a-col>
-                                    <a-col :span="12">
-                                        <span
-                                            class="white ml8"
-                                        >{{getCanUseMoney(getSelectedAccount())}}</span>
-                                    </a-col>
-                                </a-row>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24" type="flex" justify="center">
-                        <a-col :span="24" class="mt20">
-                            <a-form-item class="tc">
-                                <a-button class="listedBtn" @click="submit">买入</a-button>
-                                <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </a-form>
-            </div>
-        </div>
-    </Drawer>
+            <a-col :span="24">
+              <a-form-item label="挂牌数量"
+                           name="OrderQty">
+                <a-input-number class="commonInput"
+                                style="width: 260px"
+                                :min="0"
+                                :max="getMaxNum()"
+                                v-model:value="formState.OrderQty" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="!isWR()">
+              <a-form-item label="交收月"
+                           name="DeliveryMonth">
+                <a-month-picker style="width: 260px"
+                                v-model:value="formState.DeliveryMonth"
+                                :allowClear="false"
+                                class="commonDatePicker dialogDatePicker" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   class="mt-10">
+              <a-form-item>
+                <a-slider ::min="0"
+                          v-model:value="formState.OrderQty"
+                          :max="99999999"
+                          class="formSlider" />
+                <div class="unit">
+                  <span>{{selectedRow.minivalue}}</span>
+                  <span>{{getMaxNum()}}{{selectedRow.enumdicname}}</span>
+                </div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="起摘数量"
+                           class="relative">
+                <a-input class="commonInput"
+                         :suffix="selectedRow.enumdicname"
+                         :min="selectedRow.minivalue"
+                         style="width: 260px" />
+                <div class="tip">最小单位:{{selectedRow.minivalue}}{{selectedRow.enumdicname}}</div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   class="relative mt20">
+              <a-form-item :label="isFloat() ? '估算金额' : '摘牌金额'">
+                <span class="white ml8">{{getMoney()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   class="relative">
+              <a-form-item :label="getMargin() ? '履约保证金' : ''">
+                <a-row>
+                  <a-col :span="8"
+                         v-if="getMargin()">
+                    <span class="white ml8">{{getMargin()}}</span>
+                  </a-col>
+                  <a-col :span="4"
+                         class="tr">
+                    <span class="grey1">可用资金</span>
+                  </a-col>
+                  <a-col :span="12">
+                    <span class="white ml8">{{getCanUseMoney(getSelectedAccount())}}</span>
+                  </a-col>
+                </a-row>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24"
+                 type="flex"
+                 justify="center">
+            <a-col :span="24"
+                   class="mt20">
+              <a-form-item class="tc">
+                <a-button class="listedBtn"
+                          @click="submit">买入</a-button>
+                <a-button class="ml10 cancelBtn"
+                          @click="cancel">取消</a-button>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </div>
+  </Drawer>
 </template>
 
 <script lang="ts">
@@ -159,6 +162,7 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { handleIs } from '../buy-sell-market/setup';
 import { BuyOrSell } from '@/common/constants/enumCommon';
 import { getCanUseMoney } from '@/services/bus/account';
+
 export default defineComponent({
     emits: ['cancel', 'update'],
     name: ModalEnum.spot_trade_warehouse_post_buying,
@@ -189,15 +193,13 @@ export default defineComponent({
         function getSelectedAccount() {
             return accountList.find((e) => e.accountid === formState.accountid);
         }
-        formState.DeliveryMonth = props.time;
+        formState.DeliveryMonth = props.selectedRow.deliverymonth ? moment(props.selectedRow.deliverymonth) : props.time;
 
         const { getMaxNum, getMoney, getMargin } = handleNumAndPrice(props.enumName, props.selectedRow);
         function submit() {
             const marketInfo = getMarketRunByTradeMode(17);
             if (marketInfo) {
                 validateAction<FormParam>(formRef, formState).then((res) => {
-                    // 只有有仓单的有求购  无仓单不能求购
-
                     const wrGoodsInfo: WRGoodsInfo = {
                         GoodsID: props.selectedRow.goodsid, // uint32 配置商品ID
                         GoodsCode: props.selectedRow.goodscode, // string 配置商品代码
@@ -218,7 +220,7 @@ export default defineComponent({
                         // SubNum: '0', // 提单子单号
                         SubNum: 0,
                         // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        WRFactorTypeId: props.selectedRow.wrfactortypeid, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+                        WRFactorTypeId: props.selectedRow.wrfactortypeid ? props.selectedRow.wrfactortypeid : 0, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
                         IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
                         // MatchUserIDs: 0, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
                         OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======

+ 8 - 0
src/views/market/spot_trade/interface.ts

@@ -2,4 +2,12 @@ import { BtnList } from '@/common/components/btnList/interface';
 export interface BuyAndSellMarket {
     isMarket: boolean,
     btnList: BtnList[],
+}
+
+export interface TreeDataItem {
+    value: number;
+    key: number;
+    title?: string;
+    slots?: Record<string, string>;
+    children?: TreeDataItem[];
 }

+ 45 - 1
src/views/market/spot_trade/setup.ts

@@ -6,9 +6,11 @@ import { getTableColumns, getTableEvent, initData } from "@/common/export/table"
 import { findChildList, getClassName } from "@/common/setup/table/button";
 import { ComposeTableParam, TableEventCB } from "@/common/setup/table/interface";
 import { OperationTabMenu } from '@/services/go/commonService/interface';
+import { queryFilterItem, queryFtDeliveryGoods } from '@/services/go/wrtrade';
+import { WrFilterItem } from '@/services/go/wrtrade/interface';
 import TimerUtils from '@/utils/timer/timerUtil';
 import { onMounted, onUnmounted, ref } from "vue";
-import { BuyAndSellMarket } from './interface';
+import { BuyAndSellMarket, TreeDataItem } from './interface';
 
 const buyAndSellEunm = 'buyAndSell'
 
@@ -120,3 +122,45 @@ export function handleComposeTable<T>({ queryFn, menuType, isDetail, tableName,
         firstBtn, // 表格按钮
     }
 }
+
+
+const FtDeliveryGoods = ref<TreeDataItem[]>([])
+// 获取报价大厅商品过滤项数据
+export function handleFtDeliveryGoods() {
+    if (FtDeliveryGoods.value.length === 0) {
+        initData(() => {
+            queryFtDeliveryGoods().then(res => {
+                const result: TreeDataItem[] = []
+                res.forEach(el => {
+                    const { deliverygoodsid, deliverygoodsname, wdlst } = el
+                    const item: TreeDataItem = {
+                        title: deliverygoodsname,
+                        key: deliverygoodsid,
+                        value: deliverygoodsid,
+                        children: []
+                    }
+                    wdlst.forEach(e => {
+                        const { wrstandardid, wrstandardname } = e
+                        item.children?.push({ value: wrstandardid, key: wrstandardid, title: wrstandardname })
+                    })
+                    result.push(item)
+                })
+                FtDeliveryGoods.value = result;
+            })
+        })
+    }
+    return { FtDeliveryGoods }
+}
+
+// 处理仓库
+const warehouseList = ref<WrFilterItem[]>([])
+export function handleWarehouse() {
+    initData(() => {
+        if (warehouseList.value.length === 0) {
+            queryFilterItem({ itype: '3' }).then(res => {
+                warehouseList.value = res
+            })
+        }
+    })
+    return { warehouseList }
+}

+ 50 - 1
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue

@@ -1,6 +1,9 @@
 <template>
   <!-- 仓单预售 浮动价预售-->
   <div class="topTableHeight">
+    <Filter :enumName="name"
+            @buy="buyOpen"
+            @search="search" />
     <a-table :columns="columns"
              class="srcollYTable"
              :scroll="{ x: '100%', y: 'calc(100vh - 479px)' }"
@@ -28,14 +31,19 @@ import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, Mod
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import Filter from '../../components/filter/index.vue';
+import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
+import { ref } from 'vue';
 
 export default defineComponent({
     name: EnumRouterName.warehouse_pre_sale_floating_price,
     components: {
         contextMenu,
+        Filter,
         [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
         [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
         buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
+        postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
     },
     setup() {
         // 表格列表数据
@@ -57,11 +65,52 @@ export default defineComponent({
             tableFilterKey: [],
             isDetail: false,
         };
+        const {
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            columns,
+            registerColumn,
+            updateColumn, // 表头
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent, // 控制异步组件
+            firstBtn, // 表格按钮
+        } = handleComposeTable<WrOrderQuote>(param);
+        function search(value: Object) {
+            const param: QueryOrderQuoteReq = {
+                wrpricetype: 2,
+                haswr: 0,
+            };
+            Object.assign(param, value);
+            queryTable(queryOrderQuote, param);
+        }
+        function buyOpen(value: any, goods: Goods) {
+            componentId.value = 'postBuying';
+            value.goodsid = goods.goodsid;
+            value.goodscode = goods.goodscode;
+            selectedRow.value = value;
+        }
         return {
-            ...handleComposeTable<WrOrderQuote>(param),
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            columns,
+            registerColumn,
+            updateColumn, // 表头
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent, // 控制异步组件
+            firstBtn, // 表格按钮
             name: EnumRouterName.warehouse_pre_sale_floating_price,
             loading,
             tableList,
+            search,
+            buyOpen,
         };
     },
 });

+ 46 - 1
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_price/index.vue

@@ -1,6 +1,9 @@
 <template>
   <!-- 仓单预售 一口价预售-->
   <div class="topTableHeight">
+    <Filter :enumName="name"
+            @search="search"
+            @buy="buyOpen" />
     <a-table :columns="columns"
              class="srcollYTable"
              :scroll="{ x: '100%', y: 'calc(100vh - 479px)' }"
@@ -28,14 +31,17 @@ import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, Mod
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import Filter from '../../components/filter/index.vue';
 
 export default defineComponent({
     name: EnumRouterName.warehouse_pre_sale_price,
     components: {
         contextMenu,
+        Filter,
         [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
         [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
         buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
+        postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
     },
     setup() {
         // 表格列表数据
@@ -56,11 +62,50 @@ export default defineComponent({
             tableFilterKey: [],
             isDetail: false,
         };
+        const {
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            columns,
+            registerColumn,
+            updateColumn, // 表头
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent, // 控制异步组件
+            firstBtn, // 表格按钮
+        } = handleComposeTable<WrOrderQuote>(param);
+        function search(value: Object) {
+            const param: QueryOrderQuoteReq = {
+                wrpricetype: 1,
+                haswr: 0,
+            };
+            Object.assign(param, value);
+            queryTable(queryOrderQuote, param);
+        }
+        function buyOpen(value: any, goods: any) {
+            componentId.value = 'postBuying';
+            selectedRow.value = value;
+        }
         return {
-            ...handleComposeTable<WrOrderQuote>(param),
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            columns,
+            registerColumn,
+            updateColumn, // 表头
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent, // 控制异步组件
+            firstBtn, // 表格按钮
             name: EnumRouterName.warehouse_pre_sale_price,
             loading,
             tableList,
+            search,
+            buyOpen,
         };
     },
 });

+ 70 - 24
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue

@@ -1,27 +1,28 @@
 <template>
-    <!-- 仓单贸易 浮动价挂牌-->
-    <div class="topTableHeight">
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: 'calc(100vh - 479px)' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        ></a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :enumName="name"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </div>
+  <!-- 仓单贸易 浮动价挂牌-->
+  <div class="topTableHeight">
+    <Filter :enumName="name"
+            @search="search"
+            @buy="buyOpen" />
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 479px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList"></a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu"
+                 @cancel="closeContext"
+                 :list="firstBtn"></contextMenu>
+    <component :is="componentId"
+               v-if="componentId"
+               :enumName="name"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -30,14 +31,18 @@ import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, Mod
 import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import Filter from '../../components/filter/index.vue';
+import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
 
 export default defineComponent({
     name: EnumRouterName.warehouse_receipt_trade_floating_price,
     components: {
         contextMenu,
+        Filter,
         [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
         [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
         buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
+        postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
     },
     setup() {
         // 表格列表数据
@@ -58,11 +63,52 @@ export default defineComponent({
             tableFilterKey: [],
             isDetail: false,
         };
+        const {
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            columns,
+            registerColumn,
+            updateColumn, // 表头
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent, // 控制异步组件
+            firstBtn, // 表格按钮
+        } = handleComposeTable<WrOrderQuote>(param);
+        function search(value: Object) {
+            const param: QueryOrderQuoteReq = {
+                wrpricetype: 2,
+                haswr: 1,
+            };
+            Object.assign(param, value);
+            queryTable(queryOrderQuote, param);
+        }
+        function buyOpen(value: any, goods: Goods) {
+            componentId.value = 'postBuying';
+            value.goodsid = goods.goodsid;
+            value.goodscode = goods.goodscode;
+            selectedRow.value = value;
+        }
         return {
-            ...handleComposeTable<WrOrderQuote>(param),
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            columns,
+            registerColumn,
+            updateColumn, // 表头
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent, // 控制异步组件
+            firstBtn, // 表格按钮
             name: EnumRouterName.warehouse_receipt_trade_floating_price,
             loading,
             tableList,
+            search,
+            buyOpen,
         };
     },
 });

+ 68 - 24
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_price/index.vue

@@ -1,27 +1,28 @@
 <template>
-    <!-- 仓单贸易 一口价挂牌-->
-    <div class="topTableHeight">
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: 'calc(100vh - 479px)' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        ></a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :enumName="name"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </div>
+  <!-- 仓单贸易 一口价挂牌-->
+  <div class="topTableHeight">
+    <Filter :enumName="name"
+            @search="search"
+            @buy="buyOpen" />
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 479px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList"></a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu"
+                 @cancel="closeContext"
+                 :list="firstBtn"></contextMenu>
+    <component :is="componentId"
+               v-if="componentId"
+               :enumName="name"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -31,14 +32,17 @@ import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interfac
 import { queryOrderQuote } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/views/market/spot_trade/setup';
 import Bus from '@/utils/eventBus/index';
+import Filter from '../../components/filter/index.vue';
 
 export default defineComponent({
     name: EnumRouterName.warehouse_receipt_trade_price,
     components: {
         contextMenu,
+        Filter,
         [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
         [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
         buyAndSell: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
+        postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
     },
     setup() {
         // 表格列表数据
@@ -60,11 +64,51 @@ export default defineComponent({
             tableFilterKey: [],
             isDetail: false,
         };
+        const {
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            columns,
+            registerColumn,
+            updateColumn, // 表头
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent, // 控制异步组件
+            firstBtn, // 表格按钮
+        } = handleComposeTable<WrOrderQuote>(param);
+        function search(value: Object) {
+            const param: QueryOrderQuoteReq = {
+                wrpricetype: 1,
+                haswr: 1,
+            };
+            Object.assign(param, value);
+            queryTable(queryOrderQuote, param);
+        }
+        function buyOpen(value: any, goods: any) {
+            componentId.value = 'postBuying';
+            selectedRow.value = value;
+        }
+
         return {
-            ...handleComposeTable<WrOrderQuote>(param),
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            columns,
+            registerColumn,
+            updateColumn, // 表头
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent, // 控制异步组件
+            firstBtn, // 表格按钮
             name: EnumRouterName.warehouse_receipt_trade_price,
             loading,
             tableList,
+            search,
+            buyOpen,
         };
     },
 });