|
|
@@ -21,51 +21,60 @@ import { Modal } from 'ant-design-vue';
|
|
|
import Bus from '@/utils/eventBus/index';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: ModalEnum.pre_sale_warehouse_receipt_pending_order_cancel_order,
|
|
|
- components: { Drawer },
|
|
|
- emits: ['cancel', 'update'],
|
|
|
- props: {
|
|
|
- selectedRow: {
|
|
|
- type: Object as PropType<WrOrderDetail>,
|
|
|
- default: {},
|
|
|
- },
|
|
|
+ name: ModalEnum.pre_sale_warehouse_receipt_pending_order_cancel_order,
|
|
|
+ components: { Drawer },
|
|
|
+ emits: ['cancel', 'update'],
|
|
|
+ props: {
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<WrOrderDetail>,
|
|
|
+ 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: 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: Number(geLoginID_number()), // uint64 操作员账号ID
|
|
|
- BuyOrSell: props.selectedRow.buyorsell, // uint32 买卖方向
|
|
|
- WRID: Long.fromString(props.selectedRow.wrfactortypeid), // uint64 仓单ID,卖的时候填写
|
|
|
- };
|
|
|
- requestResultLoadingAndInfo(wRListingCancelOrder, param, loading, ['撤单成功', '撤单失败:']).then(() => {
|
|
|
- Bus.$emit('spotTrade', true);
|
|
|
- Bus.$emit('blocsTrade', true);
|
|
|
- cancel(true);
|
|
|
- });
|
|
|
- }
|
|
|
+ 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: Number(geLoginID_number()), // uint64 操作员账号ID
|
|
|
+ BuyOrSell: props.selectedRow.buyorsell, // uint32 买卖方向
|
|
|
+ WRID: Long.fromString(props.selectedRow.wrfactortypeid), // uint64 仓单ID,卖的时候填写
|
|
|
+ MarketID: props.selectedRow.marketid,
|
|
|
+ };
|
|
|
|
|
|
- Modal.confirm({
|
|
|
- title: '撤单',
|
|
|
- content: '是否确认撤单!',
|
|
|
- onOk: submit,
|
|
|
- onCancel: cancel,
|
|
|
- });
|
|
|
+ return requestResultLoadingAndInfo(wRListingCancelOrder, param, loading, ['撤单成功', '撤单失败:']).then(() => {
|
|
|
+ Bus.$emit('spotTrade', true);
|
|
|
+ Bus.$emit('blocsTrade', true);
|
|
|
+ cancel(true);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- return {
|
|
|
- visible,
|
|
|
- cancel,
|
|
|
- };
|
|
|
- },
|
|
|
+ Modal.confirm({
|
|
|
+ title: '撤单',
|
|
|
+ content: '是否确认撤单!',
|
|
|
+ maskClosable: false,
|
|
|
+ onOk: async () => {
|
|
|
+ return submit();
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ if (!loading.value) {
|
|
|
+ cancel()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ return {
|
|
|
+ visible,
|
|
|
+ cancel,
|
|
|
+ };
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|
|
|
|