瀏覽代碼

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

huangbin 4 年之前
父節點
當前提交
a1eb775515

+ 0 - 15
src/services/proto/warehousetrade/index.ts

@@ -19,21 +19,6 @@ export const hdWROrder = (param: HdWROrderReq): Promise<any> => {
 /**
  * 持仓单摘牌请求
  *
- *             const param = {
-                MarketID: MarketID,
-                AccountID: AccountId.toString(), // 资金账号
-                RelatedWRTradeOrderID: WRTradeOrderID, // 关联委托单号(摘牌委托关联挂牌委托单ID)
-                WRTransferUserID: WRTransferUserID, // 仓单贸易委托单ID
-                OrderQty: OrderQty, // 委托数量
-                OrderSrc: 0, // 委托来源
-                OperatorID: 0, // 操作员账号ID
-                BuyOrSell: enums.BuyOrSell.BuyOrSell_BUY, // 买卖方向
-                ApplyID: 0, // 申请ID
-                TradeDate: moment().format('YYYYMMDD'), // 交易日
-                LadingBillId: LadingBillID,
-                SubNum: 0, // 提单子单号(wrholdlb的SubNum字段),卖的时候填写
-                WRFactorTypeId: WRFactorTypeID,
-            }
  * @param param
  * @constructor
  */

+ 52 - 7
src/views/market/spot_trade/components/buy-sell-market/components/delisting/index.vue

@@ -12,32 +12,77 @@
 import { defineComponent, PropType, ref } from 'vue';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrPositionReq, WrPosition } from '@/services/go/wrtrade/interface';
-import { getUserId } from '@/services/bus/account';
+import {QueryWrPositionReq, WrOrderQuote, WrOrderQuoteDetail, WrPosition} from '@/services/go/wrtrade/interface';
+import {getSelectedAccountId, getUserId} from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { hdWROrder } from '@/services/proto/warehousetrade';
+import {HdWRDealOrder, hdWROrder} from '@/services/proto/warehousetrade';
 import { v4 as uuidv4 } from 'uuid';
 import moment from 'moment';
 import { ModalEnum } from '@/common/constants/modalNameEnum';
+import {HdWRDealOrderReq} from "@/services/proto/warehousetrade/interface";
+import {Long} from "@/services/socket/login/interface/long";
 
 export default defineComponent({
     name: ModalEnum.spot_trade_warehouse_delisting,
     components: { Drawer },
     props: {
         selectedRow: {
-            type: Object as PropType<WrPosition>,
+            type: Object as PropType<WrOrderQuoteDetail>,
             default: {},
         },
     },
+
+    /**
+     *  *             const param = {
+                MarketID: MarketID,
+                AccountID: AccountId.toString(), // 资金账号
+                RelatedWRTradeOrderID: WRTradeOrderID, // 关联委托单号(摘牌委托关联挂牌委托单ID)
+                WRTransferUserID: WRTransferUserID, // 仓单贸易委托单ID
+                OrderQty: OrderQty, // 委托数量
+                OrderSrc: 0, // 委托来源
+                OperatorID: 0, // 操作员账号ID
+                BuyOrSell: enums.BuyOrSell.BuyOrSell_BUY, // 买卖方向
+                ApplyID: 0, // 申请ID
+                TradeDate: moment().format('YYYYMMDD'), // 交易日
+                LadingBillId: LadingBillID,
+                SubNum: 0, // 提单子单号(wrholdlb的SubNum字段),卖的时候填写
+                WRFactorTypeId: WRFactorTypeID,
+            }
+     * @param props
+     */
     setup(props) {
         const data = props.selectedRow;
         console.log('data', data);
 
         const loading = ref<boolean>(false);
+
+
+        // 摘卖方向
+        const param : HdWRDealOrderReq = {
+            UserID: getUserId(), // uint32 用户ID
+            AccountID: Number(getSelectedAccountId() as Long), // uint64 资金账号
+            RelatedWRTradeOrderID: Number(props.selectedRow.wrtradeorderid), // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
+            WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
+            OrderQty: 1, // 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: 1, // uint32 买卖方向
+            ApplyID: 0, // uint64 申请ID
+            LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
+            SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
+            WRFactorTypeId: 0, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
+            TradeDate:  moment().format("YYYYMMDD"),  // string 交易日
+            DeliveryMonth: "", // string 交收月
+            HasWr: 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
+        }
+        debugger
         // console.log(param);
-        // requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
-        //     // cancel(true);
-        // });
+        requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
+            // cancel(true);
+        });
         return {
             visible: true,
         };