Bläddra i källkod

commit 撤单

yu jie 4 år sedan
förälder
incheckning
a5f4f95707

+ 1 - 1
src/services/proto/warehousetrade/index.ts

@@ -39,7 +39,7 @@ export const wROutApply = (param: WROutApplyReq): Promise<any> => {
  * @param param
  */
 export const wRListingCancelOrder = (param: WRListingCancelOrderReq): Promise<any> => {
-    return protoMiddleware<WRListingCancelOrderReq>(param, 'WRListingCancelOrderReq', 'WRListingCancelOrderRsp', 2)
+    return protoMiddleware<WRListingCancelOrderReq>(param, 'WRListingCancelOrderReq', 'WRListingCancelOrderRsp', HeadEnum.tradeMode17)
 }
 
 

+ 1 - 1
src/services/proto/warehousetrade/interface.ts

@@ -146,7 +146,7 @@ export interface WRListingCancelOrderReq {
     ClientType: number; // uint32 终端类型
     OperatorID: number; // uint64 操作员账号ID
     BuyOrSell: number; // uint32 买卖方向
-    WRI: number; // uint64 仓单ID,卖的时候填写
+    WRID: number; // uint64 仓单ID,卖的时候填写
 }
 
 // 挂牌撤单应答 0 22 5

+ 2 - 1
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/index.vue

@@ -175,6 +175,7 @@ export default defineComponent({
         function submit() {
             const marketInfo = getMarketRunByTradeMode(17);
             if (marketInfo) {
+                // 无仓单挂牌
                 const param = {
                     AccountID: getInTaAccount(),
                     ClientSerialNo: uuidv4(), // 客户端流水号
@@ -187,7 +188,7 @@ export default defineComponent({
                     // SubNum: '0', // 提单子单号
                     SubNum: 0,
                     // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                    WRFactorTypeId: 0, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+                    WRFactorTypeId:  props.selectedRow.wrfactortypeid, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
                     IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
                     // MatchUserIDs: 0, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
                     OrderQty: 1, // 委托数量(可挂部分数据量) ======

+ 22 - 10
src/views/order/spot_warran/components/spot_warrant_pending_order/components/cancle/index.vue

@@ -12,7 +12,7 @@
 import { defineComponent, PropType, ref } from 'vue';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrPositionReq, WrHoldLB, WrPosition } from '@/services/go/wrtrade/interface';
+import {QueryWrPositionReq, WrHoldLB, WrOrderDetail, WrPosition} from '@/services/go/wrtrade/interface';
 import { getInTaAccount, getUserId } from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import {hdWROrder, wRListingCancelOrder} from '@/services/proto/warehousetrade';
@@ -26,6 +26,7 @@ import { message } from 'ant-design-vue';
 import { getGoodsGroupsByTradeMode } from '@/services/bus/goods';
 import { TradeMode } from '@/common/constants/enumCommon';
 import {WRGoodsInfo, WRListingCancelOrderReq} from '@/services/proto/warehousetrade/interface';
+import * as Long from "long";
 
 export default defineComponent({
     name: ModalEnum.spot_warrant_spot_details_listed,
@@ -33,7 +34,7 @@ export default defineComponent({
     emits: ['cancel'],
     props: {
         selectedRow: {
-            type: Object as PropType<WrHoldLB>,
+            type: Object as PropType<WrOrderDetail>,
             default: {},
         },
     },
@@ -41,17 +42,28 @@ export default defineComponent({
         const { visible, cancel } = _closeModal(context);
         console.log('selectedRow', props.selectedRow);
         const loading = ref<boolean>(false);
-        function submit() {
 
-            // const param: WRListingCancelOrderReq = {
-            //
-            // }
-            //
-            // requestResultLoadingAndInfo(wRListingCancelOrder, param, loading, ['撤单成功', '撤单失败:']).then(() => {
-            //     cancel();
-            // });
+        function submit() {
+            const param: WRListingCancelOrderReq = {
+                UserID: getUserId(),// uint32 用户ID
+                AccountID: getInTaAccount(), // uint64 资金账号
+                OldWRTradeOrderID: Long.fromString(props.selectedRow.wrtradeorderid),  // uint64 目标仓单贸易委托单ID
+                OrderSrc: 1, // uint32 委托来源
+                ClientSerialNo: uuidv4(), // string 客户端流水号
+                ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
+                ClientType: 4, // uint32 终端类型
+                OperatorID:  getUserId(), // uint64 操作员账号ID
+                BuyOrSell: props.selectedRow.buyorsell, // uint32 买卖方向
+                WRID: props.selectedRow.wrfactortypeid, // uint64 仓单ID,卖的时候填写
+            }
+            debugger
+            requestResultLoadingAndInfo(wRListingCancelOrder, param, loading, ['撤单成功', '撤单失败:']).then(() => {
+                cancel();
+            });
         }
 
+        submit()
+
         return {
             visible,
             cancel,