|
@@ -12,32 +12,77 @@
|
|
|
import { defineComponent, PropType, ref } from 'vue';
|
|
import { defineComponent, PropType, ref } from 'vue';
|
|
|
import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
|
|
import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
|
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
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 { 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 { v4 as uuidv4 } from 'uuid';
|
|
|
import moment from 'moment';
|
|
import moment from 'moment';
|
|
|
import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
|
|
+import {HdWRDealOrderReq} from "@/services/proto/warehousetrade/interface";
|
|
|
|
|
+import {Long} from "@/services/socket/login/interface/long";
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: ModalEnum.spot_trade_warehouse_delisting,
|
|
name: ModalEnum.spot_trade_warehouse_delisting,
|
|
|
components: { Drawer },
|
|
components: { Drawer },
|
|
|
props: {
|
|
props: {
|
|
|
selectedRow: {
|
|
selectedRow: {
|
|
|
- type: Object as PropType<WrPosition>,
|
|
|
|
|
|
|
+ type: Object as PropType<WrOrderQuoteDetail>,
|
|
|
default: {},
|
|
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) {
|
|
setup(props) {
|
|
|
const data = props.selectedRow;
|
|
const data = props.selectedRow;
|
|
|
console.log('data', data);
|
|
console.log('data', data);
|
|
|
|
|
|
|
|
const loading = ref<boolean>(false);
|
|
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);
|
|
// console.log(param);
|
|
|
- // requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
|
|
|
|
|
- // // cancel(true);
|
|
|
|
|
- // });
|
|
|
|
|
|
|
+ requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
|
|
|
|
|
+ // cancel(true);
|
|
|
|
|
+ });
|
|
|
return {
|
|
return {
|
|
|
visible: true,
|
|
visible: true,
|
|
|
};
|
|
};
|