Browse Source

commit 提交代码

yu jie 4 years ago
parent
commit
7758081b92

+ 56 - 57
src/services/go/ermcp/order/interface.ts

@@ -265,63 +265,62 @@ export interface QueryTradeOrderDetailReq {
  * 委托单查询返回(合约市场)
  * 委托单查询返回(合约市场)
  */
  */
 export interface QueryTradeOrderDetailRsp {
 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:期权违约平仓
+    accountid	:number;//账户ID[报价币种]
+    buildtype	:number;//委托单据类型 - 1:建仓 2:平仓 3:先平后建
+    buyorsell	:number;//买卖 - number;
+//:买 1:卖
+    cancelorderid	:string;//撤单单号(撤单时填写)
+    cancelqty	:number;//撤单数量
+    clienttype	:number;//客户端类型 - number;
+//:保留为未填终端类型 1:PC管理端 2:PC交易端 3:手机客户端安卓 4:网页客户端 5:微信客户端 6:手机客户端苹果 7:网上开户客户端 8:无效终端编号 9:报价终端(中江)
+    closefreezecharge	:number;//平仓冻结手续费(先建后平操作,需要记录)
+    closeqty	:number;//平仓数量(先建后平操作 需要记录)
+    closetradeqty	:number;//平仓成交数量(先建后平操作,需要记录)
+    closeunfreezecharge	:number;//平仓解冻手续费(先建后平操作,需要记录)
+    decimalplace	:number;//商品报价小数位
+    delistingtype	:number;//摘牌类型 - 1:价格最优 2:点选成交
+    enableqty	:number;//可用数量 = 委托数量 - 成交数量 - 撤单数量
+    enumdicname	:string;//单位名称
+    freezecharge	:number;//冻结手续费
+    freezemargin	:number;//冻结保证金(冻结交易金额)
+    goodscode	:string;//商品代码
+    goodsid	:number;//商品ID
+    goodsname	:string;//商品名称
+    goodunitid	:number;//商品单位id
+    listingselecttype	:number;//挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
+    marketid	:number;//市场ID
+    marketname	:string;//市场名称
+    openfreezecharge	: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)
+    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;//委托时间
+    preorderid	:string;//关联预埋单号(止盈止损单时填写)
+    pricemode	:number;//取价方式 - 1:市价 2: 限价
+    qtydecimalplace	:number;//商品报价小数位
+    relatedid	:string;//关联单号(交割单)
+    tradedate	:string;//交易日(yyyyMMdd)
+    trademode	:number;//交易模式
+    tradeqty	:number;//成交数量
+    unfreezecharge	:number;//解冻手续费
+    unfreezemargin	:number;//解冻保证金
+    validtime	:string;//有效期限
+    validtype	:number;//有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效 5指定时间有效
+    volumetype	:number;//当时间有效类型为 “立即执行否则取消 IOC” 时,需要此项 - number;
+//:任意量 1:最小量(暂时不支持) 2:全部量
 }
 }
 
 
 /**
 /**

+ 13 - 1
src/services/socket/order/index.ts

@@ -3,11 +3,23 @@ import { DelistingType, OperateType, OptionType, PriceType } from '@/common/cons
 import APP from '@/services';
 import APP from '@/services';
 import { getUserId } from '@/services/bus/account';
 import { getUserId } from '@/services/bus/account';
 import { getLongTypeLoginID } from '@/services/bus/login';
 import { getLongTypeLoginID } from '@/services/bus/login';
-import { buildProtoReq50, parseProtoRsp50 } from '@/services/socket/protobuf/buildReq';
+import {buildProtoReq50, parseProtoRsp50, protoMiddleware} from '@/services/socket/protobuf/buildReq';
 import { Callback } from '@/utils/websocket/index';
 import { Callback } from '@/utils/websocket/index';
 import moment from 'moment';
 import moment from 'moment';
 import { v4 as uuidv4 } from 'uuid';
 import { v4 as uuidv4 } from 'uuid';
 import * as orderType from './interface/index';
 import * as orderType from './interface/index';
+import {OrderReq} from "@/services/socket/order/interface";
+import * as Long from "long";
+import {LongType} from "@/services/socket/login/interface";
+
+/**
+ * 下单接口
+ * @param param
+ * @constructor
+ */
+export const Order = (param: OrderReq): Promise<any> => {
+    return protoMiddleware<OrderReq>(param, 'OrderReq', 'OrderRsp', 8)
+}
 
 
 /**
 /**
  * 交易委托请求
  * 交易委托请求

+ 45 - 0
src/services/socket/order/interface.ts

@@ -0,0 +1,45 @@
+// 交易委托请求
+export interface OrderReq {
+    ClientSerialNo: string, // 客户端流水号
+    ClientOrderTime: string // 客户端委托时间
+    ClientType: number // 终端类型
+    LoginID: number // 登陆账号
+    AccountID: number // 交易账号
+    GoodsID: number // 商品ID
+    MarketID: number // 市场ID
+    ValidType: number // 校验类型
+    OperateType: number // 操作类型:
+    OrderSrc: number // 单据来源
+    OperatorID: number // 操作员账号ID
+    OrderPrice: number // 委托价格
+    MarketMaxSub?: number // 市价允许最大偏差(做市)
+    OrderQty: number // 委托数量
+    BuyOrSell: number // 买卖方向
+    BuildType: number // 下单类型
+    CurtQuotePrice?: number // 保留,计算冻结金额使用
+    SpPrice?: number // 止盈价格
+    SlPrice?: number // 止损价格
+    PriceMode: number // 取价方式
+    TimevalidType: number // 时间有效类型
+    TriggerType: number // 预埋单触发类型
+    TriggerPrice?: number // 预埋单触发价格
+    ListingSelectType: number // 挂牌点选类型
+    DelistingType: number // 摘牌类型
+    RelatedID?: number // 关联单号
+    OptionType: number // 期权类型(1:认购(看涨)2:认沽(看跌))
+    Premium?: number // 权利金
+    TriggerOperator?: number // 触发条件(1:大于等于2:小于等于)
+    ServiceTime?: string // 服务端时间
+    CouponTypeID?: number // 优惠券类型ID(买方)
+    UsedQty?: number // 使用数量
+    ValidTime?: string // 指定有效日期
+    ReceiveInfoID?: number // 收货地址ID
+}
+
+
+export interface OrderRsp {
+    RetCode: number // 返回码
+    RetDesc: string // 描述信息
+    OrderID: number // 一级生成的订单号
+    OrderTime: string // 接收委托交易的时间
+}

+ 5 - 1
src/services/socket/protobuf/protoHeader.ts

@@ -13,7 +13,8 @@ export enum HeadEnum {
     MarketID69201,
     MarketID69201,
     MarketID45201,
     MarketID45201,
     tradeMode17,
     tradeMode17,
-    tradeMode45
+    tradeMode45,
+    MarketID16201
 }
 }
 
 
 /**
 /**
@@ -58,6 +59,9 @@ export function getProtoHeadParam(funCodeName: string, type: HeadEnum = 0): IMes
         case HeadEnum.MarketID45201:
         case HeadEnum.MarketID45201:
             result = Object.assign(result, {MarketID: 45201})
             result = Object.assign(result, {MarketID: 45201})
             break;
             break;
+        case HeadEnum.MarketID16201:
+            result = Object.assign(result, {MarketID: 16201})
+            break;
     }
     }
     return result
     return result
 }
 }

+ 61 - 42
src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/index.vue

@@ -36,12 +36,12 @@
             </a-col>
             </a-col>
             <a-col :span="24">
             <a-col :span="24">
               <a-form-item label="挂牌价格">
               <a-form-item label="挂牌价格">
-                <span class="white ml8">{{selectedRow.username}}</span>
+                <span class="white ml8">{{selectedRow.orderprice.toFixed(2)}}</span>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :span="24">
             <a-col :span="24">
               <a-form-item label="挂牌数量">
               <a-form-item label="挂牌数量">
-                <span class="white ml8">{{selectedRow.username}}</span>
+                <span class="white ml8">{{selectedRow.orderqty}}</span>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
@@ -115,8 +115,13 @@
 import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
 import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
 import { defineComponent, PropType, ref } from 'vue';
 import { defineComponent, PropType, ref } from 'vue';
 import Drawer from '@/common/components/drawer/index.vue';
 import Drawer from '@/common/components/drawer/index.vue';
-import { WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
-import { getAccountTypeList, getSelectedAccountId, getUserId } from '@/services/bus/account';
+import {
+    WrOrderQuote,
+    WrOrderQuoteDetail,
+    WrTradeOrderDetailReq,
+    WrTradeOrderDetailRsp
+} from '@/services/go/wrtrade/interface';
+import {getAccount_longType, getAccountTypeList, getSelectedAccountId, getUserId} from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { HdWRDealOrder } from '@/services/proto/warehousetrade';
 import { HdWRDealOrder } from '@/services/proto/warehousetrade';
 import { v4 as uuidv4 } from 'uuid';
 import { v4 as uuidv4 } from 'uuid';
@@ -127,17 +132,22 @@ import { _closeModal } from '@/common/setup/modal/modal';
 import { handleForm } from './setup';
 import { handleForm } from './setup';
 import { validateAction } from '@/common/setup/form';
 import { validateAction } from '@/common/setup/form';
 import { ListingForm, TempWrOrderQuoteDetail } from './interface';
 import { ListingForm, TempWrOrderQuoteDetail } from './interface';
-import { BuyOrSell } from '@/common/constants/enumCommon';
+import {BuyOrSell, DelistingType, PriceType} from '@/common/constants/enumCommon';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getCanUseMoney } from '@/services/bus/account';
 import { getCanUseMoney } from '@/services/bus/account';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
+import {Order} from "@/services/socket/order";
+import {OrderReq} from "@/services/socket/order/interface";
+import {getLongTypeLoginID} from "@/services/bus/login";
+import {LongType} from "@/services/socket/login/interface";
+import * as Long from "long";
 export default defineComponent({
 export default defineComponent({
     name: ModalEnum.spot_trade_warehouse_financing_delisting,
     name: ModalEnum.spot_trade_warehouse_financing_delisting,
     components: { Drawer, PlusOutlined, MinusOutlined },
     components: { Drawer, PlusOutlined, MinusOutlined },
     emits: ['cancel', 'update'],
     emits: ['cancel', 'update'],
     props: {
     props: {
         selectedRow: {
         selectedRow: {
-            type: Object as PropType<WrOrderQuoteDetail>,
+            type: Object as PropType<WrTradeOrderDetailRsp>,
             default: {},
             default: {},
         },
         },
         parantSelectedRow: {
         parantSelectedRow: {
@@ -168,42 +178,51 @@ export default defineComponent({
         function getMoney() {}
         function getMoney() {}
         // const { getMaxNum, getMoney, getMargin } = handleNumAndMoney(props.enumName, props.buyOrSell, props.selectedRow, props.parantSelectedRow, formState);
         // const { getMaxNum, getMoney, getMargin } = handleNumAndMoney(props.enumName, props.buyOrSell, props.selectedRow, props.parantSelectedRow, formState);
         function submit() {
         function submit() {
-            // validateAction<ListingForm>(formRef, formState).then((res) => {
-            //     // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
-            //     // 其次判断  摘牌 1。摘买 (需要通过自己的仓单进行摘买)  2。摘卖 (不需要通过仓单)
-            //     const param: HdWRDealOrderReq = {
-            //         UserID: getUserId(), // uint32 用户ID
-            //         AccountID: getSelectedAccountId(), // uint64 资金账号
-            //         RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
-            //         WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
-            //         OrderQty: res.num as number, // uint64 委托数量
-            //         OrderSrc: 0, // uint32 委托来源
-            //         ClientSerialNo: uuidv4(), // string 客户端流水号
-            //         ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
-            //         ClientType: 4, // uint32 终端类型
-            //         OperatorID: getUserId(), // uint64 操作员账号ID
-            //         BuyOrSell: 0, // uint32 买卖方向
-            //         ApplyID: 0, // uint64 申请ID
-            //         // LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
-            //         SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
-            //         WRFactorTypeId: props.parantSelectedRow.wrfactortypeid, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
-            //         TradeDate: moment().format('YYYYMMDD'), // string 交易日
-            //         DeliveryMonth: '', // string 交收月
-            //         HasWr: isWR(), // uint32 是否有仓单-0:没有仓单 1:有仓单
-            //         IsFinancing: 0, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
-            //         ProductDetailID: 0, // uint64 金融机构产品组合ID(融资购买时有效)
-            //     };
-            //     // 摘买方向
-            //     if (isBuy()) {
-            //         param.BuyOrSell = 1;
-            //         param.LadingBillId = res.LadingBillId;
-            //     } else {
-            //         param.BuyOrSell = 0;
-            //     }
-            //     requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
-            //         cancel(true);
-            //     });
-            // });
+            debugger
+            validateAction<ListingForm>(formRef, formState).then((res) => {
+                // 摘牌请求
+                const param: OrderReq = {
+                    ClientSerialNo: uuidv4(), // 客户端流水号
+                    ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // 客户端委托时间
+                    ClientType: 4, // 终端类型
+                    LoginID: Number(getLongTypeLoginID() as LongType), // 登陆账号
+                    AccountID: getSelectedAccountId(), // 交易账号
+                    GoodsID: props.parantSelectedRow.goodsid, // 商品ID
+                    MarketID: props.parantSelectedRow.marketid, // 市场ID
+                    ValidType: 1, // 校验类型 当日有效
+                    OperateType: 1, // 操作类型: 申请
+                    OrderSrc: 1, // 单据来源: 客户端下单
+                    RelatedID: Long.fromString(props.selectedRow.orderid), // 操作员账号ID
+                    OrderPrice: props.selectedRow.orderprice, // 委托价格
+                    OperatorID: Number(getLongTypeLoginID()),
+                    // MarketMaxSub: number // 市价允许最大偏差(做市)
+                    OrderQty: res.num, // 委托数量
+                    BuyOrSell: props.selectedRow.buyorsell === 1 ? 0 : 1 ,  // 买卖方向  0 买 1 卖
+                    BuildType: props.selectedRow.buyorsell === 1 ? 1 : 2 ,  // 下单类型  1 建 2 平
+                    // CurtQuotePrice: 0, // 保留,计算冻结金额使用
+                    // SpPrice: 0 ,// 止盈价格
+                    // SlPrice: 0 , // 止损价格
+                    PriceMode: PriceType.limit, // 取价方式
+                    TimevalidType: 1, // 时间有效类型 单日有效
+                    TriggerType: 1, // 预埋单触发类型
+                    // TriggerPrice: number // 预埋单触发价格
+                    ListingSelectType: 2, // 挂牌点选类型 1:挂牌 2:摘牌 3:先摘后挂
+                    DelistingType:  DelistingType.selected, // 摘牌类型 2:点选成交
+                    // RelatedID: number // 关联单号
+                    OptionType: 1, // 期权类型(1:认购(看涨)2:认沽(看跌))
+                    // Premium: number // 权利金
+                    // TriggerOperator: number // 触发条件(1:大于等于2:小于等于)
+                    // ServiceTime: string // 服务端时间
+                    // CouponTypeID: number // 优惠券类型ID(买方)
+                    // UsedQty: number // 使用数量
+                    // ValidTime: string // 指定有效日期
+                    // ReceiveInfoID: number // 收货地址ID
+                }
+                debugger
+                requestResultLoadingAndInfo(Order, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
+                    cancel(true);
+                });
+            });
         }
         }
 
 
         return {
         return {

+ 2 - 2
src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/setup.ts

@@ -1,8 +1,8 @@
-import { WrOrderQuoteDetail } from "@/services/go/wrtrade/interface";
+import {WrOrderQuoteDetail, WrTradeOrderDetailReq, WrTradeOrderDetailRsp} from "@/services/go/wrtrade/interface";
 import { reactive, ref, UnwrapRef } from "vue";
 import { reactive, ref, UnwrapRef } from "vue";
 import { ListingForm } from "./interface";
 import { ListingForm } from "./interface";
 
 
-export function handleForm(data: WrOrderQuoteDetail) {
+export function handleForm(data: WrTradeOrderDetailRsp) {
     const formRef = ref();
     const formRef = ref();
     const formState: UnwrapRef<ListingForm> = reactive({
     const formState: UnwrapRef<ListingForm> = reactive({
         accountid: undefined,
         accountid: undefined,

+ 47 - 36
src/views/market/spot_trade/spot_trade_order_transaction/components/listing/index.vue

@@ -122,10 +122,15 @@ import { _closeModal } from '@/common/setup/modal/modal';
 import { handleForm } from './setup';
 import { handleForm } from './setup';
 import { validateAction } from '@/common/setup/form';
 import { validateAction } from '@/common/setup/form';
 import { FormState } from './interface';
 import { FormState } from './interface';
-import { BuyOrSell } from '@/common/constants/enumCommon';
+import {BuyOrSell, DelistingType, PriceType} from '@/common/constants/enumCommon';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getCanUseMoney } from '@/services/bus/account';
 import { getCanUseMoney } from '@/services/bus/account';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
 import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
+import {ListingForm} from "@/views/market/spot_trade/spot_trade_order_transaction/components/delisting/interface";
+import {OrderReq} from "@/services/socket/order/interface";
+import {getLongTypeLoginID} from "@/services/bus/login";
+import {LongType} from "@/services/socket/login/interface";
+import {Order} from "@/services/socket/order";
 export default defineComponent({
 export default defineComponent({
     name: ModalEnum.spot_trade_warehouse_financing_delisting,
     name: ModalEnum.spot_trade_warehouse_financing_delisting,
     components: { Drawer, PlusOutlined, MinusOutlined },
     components: { Drawer, PlusOutlined, MinusOutlined },
@@ -156,41 +161,47 @@ export default defineComponent({
         function getMoney() {}
         function getMoney() {}
         // const { getMaxNum, getMoney, getMargin } = handleNumAndMoney(props.enumName, props.buyOrSell, props.selectedRow, props.parantSelectedRow, formState);
         // const { getMaxNum, getMoney, getMargin } = handleNumAndMoney(props.enumName, props.buyOrSell, props.selectedRow, props.parantSelectedRow, formState);
         function submit() {
         function submit() {
-            // validateAction<FormState>(formRef, formState).then((res) => {
-            //     // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
-            //     // 其次判断  摘牌 1。摘买 (需要通过自己的仓单进行摘买)  2。摘卖 (不需要通过仓单)
-            //     const param: HdWRDealOrderReq = {
-            //         UserID: getUserId(), // uint32 用户ID
-            //         AccountID: getSelectedAccountId(), // uint64 资金账号
-            //         RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
-            //         WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
-            //         OrderQty: res.num as number, // uint64 委托数量
-            //         OrderSrc: 0, // uint32 委托来源
-            //         ClientSerialNo: uuidv4(), // string 客户端流水号
-            //         ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
-            //         ClientType: 4, // uint32 终端类型
-            //         OperatorID: getUserId(), // uint64 操作员账号ID
-            //         BuyOrSell: 0, // uint32 买卖方向
-            //         ApplyID: 0, // uint64 申请ID
-            //         // LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
-            //         SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
-            //         WRFactorTypeId: props.parantSelectedRow.wrfactortypeid, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
-            //         TradeDate: moment().format('YYYYMMDD'), // string 交易日
-            //         DeliveryMonth: '', // string 交收月
-            //         HasWr: isWR(), // uint32 是否有仓单-0:没有仓单 1:有仓单
-            //         IsFinancing: 0, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
-            //         ProductDetailID: 0, // uint64 金融机构产品组合ID(融资购买时有效)
-            //     };
-            //     // 摘买方向
-            //     if (isBuy()) {
-            //         param.BuyOrSell = 1;
-            //         param.LadingBillId = res.LadingBillId;
-            //     } else {
-            //         param.BuyOrSell = 0;
-            //     }
-            //     requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
-            //         cancel(true);
-            //     });
+            // validateAction<ListingForm>(formRef, formState).then((res) => {
+                // 摘牌请求
+                // const param: OrderReq = {
+                //     ClientSerialNo: uuidv4(), // 客户端流水号
+                //     ClientOrderTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), // 客户端委托时间
+                //     ClientType: 4, // 终端类型
+                //     LoginID: Number(getLongTypeLoginID() as LongType), // 登陆账号
+                //     AccountID: getSelectedAccountId(), // 交易账号
+                //     GoodsID: props.parantSelectedRow.goodsid, // 商品ID
+                //     MarketID: 123, // 市场ID
+                //     ValidType: 1, // 校验类型 当日有效
+                //     OperateType: 1, // 操作类型: 申请
+                //     OrderSrc: 1, // 单据来源: 客户端下单
+                //     OperatorID: getUserId(), // 操作员账号ID
+                //     OrderPrice: 123, // 委托价格
+                //     // MarketMaxSub: number // 市价允许最大偏差(做市)
+                //     // OrderQty: res.num, // 委托数量
+                //     // BuyOrSell: props.buyOrSell === BuyOrSell.buy ? 0 : 1 ,  // 买卖方向  0 买 1 卖
+                //     // BuildType: props.buyOrSell === BuyOrSell.buy ? 1 : 2 ,  // 下单类型  1 建 2 平
+                //     // CurtQuotePrice: 0, // 保留,计算冻结金额使用
+                //     // SpPrice: 0 ,// 止盈价格
+                //     // SlPrice: 0 , // 止损价格
+                //     PriceMode: PriceType.limit, // 取价方式
+                //     TimevalidType: 1, // 时间有效类型 单日有效
+                //     TriggerType: 1, // 预埋单触发类型
+                //     // TriggerPrice: number // 预埋单触发价格
+                //     ListingSelectType: 2, // 挂牌点选类型 1:挂牌 2:摘牌 3:先摘后挂
+                //     DelistingType:  DelistingType.selected, // 摘牌类型 2:点选成交
+                //     // RelatedID: number // 关联单号
+                //     OptionType: 1, // 期权类型(1:认购(看涨)2:认沽(看跌))
+                //     // Premium: number // 权利金
+                //     // TriggerOperator: number // 触发条件(1:大于等于2:小于等于)
+                //     // ServiceTime: string // 服务端时间
+                //     // CouponTypeID: number // 优惠券类型ID(买方)
+                //     // UsedQty: number // 使用数量
+                //     // ValidTime: string // 指定有效日期
+                //     // ReceiveInfoID: number // 收货地址ID
+                // }
+                // requestResultLoadingAndInfo(Order, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
+                //     cancel(true);
+                // });
             // });
             // });
         }
         }
 
 

+ 2 - 1
src/views/order/commodity_contract/components/commodity_contract_commission/index.vue

@@ -47,6 +47,7 @@ import { formatTime } from '@/common/methods';
 import Bus from '@/utils/eventBus/index';
 import Bus from '@/utils/eventBus/index';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
 import { queryTradeOrderDetail } from '@/services/go/ermcp/order';
+import {QueryTradeOrderDetailRsp} from "@/services/go/ermcp/order/interface";
 
 
 export default defineComponent({
 export default defineComponent({
     name: enumOrderComponents.commodity_contract_commission,
     name: enumOrderComponents.commodity_contract_commission,
@@ -55,7 +56,7 @@ export default defineComponent({
     },
     },
     setup() {
     setup() {
         // 表格列表数据
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
+        const { loading, tableList, queryTable } = queryTableList<QueryTradeOrderDetailRsp>();
         // 获取列表数据
         // 获取列表数据
         const queryTableAction = () => {
         const queryTableAction = () => {
             queryTable(queryTradeOrderDetail, {});
             queryTable(queryTradeOrderDetail, {});