|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
- <!-- 现货仓单 现货明细 撤单 -->
|
|
|
- <div></div>
|
|
|
+ <!-- 现货仓单 现货明细 撤单 -->
|
|
|
+ <div></div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
@@ -16,52 +16,58 @@ import Bus from '@/utils/eventBus/index';
|
|
|
import { Modal } from 'ant-design-vue';
|
|
|
import * as Long from 'long';
|
|
|
import { defineComponent, PropType, ref } from 'vue';
|
|
|
+import { getTaAccounts } from '@/services/go/TaAccount'
|
|
|
+import APP from '@/services';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: ModalEnum.spot_warrant_pending_order_cancel_order,
|
|
|
- components: { Drawer },
|
|
|
- emits: ['cancel', 'update'],
|
|
|
- props: {
|
|
|
- selectedRow: {
|
|
|
- type: Object as PropType<QueryTradeOrderDetailRsp>,
|
|
|
- default: {},
|
|
|
- },
|
|
|
+ name: ModalEnum.spot_warrant_pending_order_cancel_order,
|
|
|
+ components: { Drawer },
|
|
|
+ emits: ['cancel', 'update'],
|
|
|
+ props: {
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<QueryTradeOrderDetailRsp>,
|
|
|
+ default: {},
|
|
|
},
|
|
|
- setup(props, context) {
|
|
|
- const { visible, cancel } = _closeModal(context);
|
|
|
- const loading = ref<boolean>(false);
|
|
|
+ },
|
|
|
+ setup(props, context) {
|
|
|
+ const { visible, cancel } = _closeModal(context);
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
|
|
|
- function submit() {
|
|
|
- const param = {
|
|
|
- // ClientSerialNo: uuidv4(), // string 客户端流水号
|
|
|
- // ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
|
|
|
- // ClientType: 4, // uint32 终端类型
|
|
|
- // OperateType: 5, // 操作类型
|
|
|
- OldOrderId: Long.fromString(props.selectedRow.orderid),
|
|
|
- AccountID: getInTaAccount(), // uint64 资金账号
|
|
|
- // OrderSrc: 1, // uint32 委托来源
|
|
|
- OperatorID: Number(geLoginID_number()), // uint64 操作员账号ID
|
|
|
- MarketID: props.selectedRow.marketid,
|
|
|
- GoodsID: props.selectedRow.goodsid,
|
|
|
- };
|
|
|
- requestResultLoadingAndInfo(cancelOrderReq, param, loading, ['撤单成功', '撤单失败:']).then(() => {
|
|
|
- Bus.$emit('spotTrade', true);
|
|
|
- cancel(true);
|
|
|
- });
|
|
|
- }
|
|
|
+ function submit() {
|
|
|
+ const param = {
|
|
|
+ // ClientSerialNo: uuidv4(), // string 客户端流水号
|
|
|
+ // ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
|
|
|
+ // ClientType: 4, // uint32 终端类型
|
|
|
+ // OperateType: 5, // 操作类型
|
|
|
+ OldOrderId: Long.fromString(props.selectedRow.orderid),
|
|
|
+ AccountID: getInTaAccount(), // uint64 资金账号
|
|
|
+ // OrderSrc: 1, // uint32 委托来源
|
|
|
+ OperatorID: Number(geLoginID_number()), // uint64 操作员账号ID
|
|
|
+ MarketID: props.selectedRow.marketid,
|
|
|
+ GoodsID: props.selectedRow.goodsid,
|
|
|
+ };
|
|
|
+ requestResultLoadingAndInfo(cancelOrderReq, param, loading, ['撤单成功', '撤单失败:']).then(() => {
|
|
|
+ Bus.$emit('spotTrade', true);
|
|
|
+ // 查询资金账户
|
|
|
+ getTaAccounts({ loginID: geLoginID_number()! }).then((res) => {
|
|
|
+ APP.set('accountList', res);
|
|
|
+ })
|
|
|
+ cancel(true);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- Modal.confirm({
|
|
|
- title: '撤单',
|
|
|
- content: '是否确认撤单?',
|
|
|
- onOk: submit,
|
|
|
- onCancel: cancel,
|
|
|
- });
|
|
|
+ Modal.confirm({
|
|
|
+ title: '撤单',
|
|
|
+ content: '是否确认撤单?',
|
|
|
+ onOk: submit,
|
|
|
+ onCancel: cancel,
|
|
|
+ });
|
|
|
|
|
|
- return {
|
|
|
- visible,
|
|
|
- cancel,
|
|
|
- };
|
|
|
- },
|
|
|
+ return {
|
|
|
+ visible,
|
|
|
+ cancel,
|
|
|
+ };
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|
|
|
|