|
@@ -174,7 +174,7 @@
|
|
|
import { defineAsyncComponent, defineComponent, onMounted, PropType, ref } from 'vue';
|
|
import { defineAsyncComponent, defineComponent, onMounted, PropType, ref } from 'vue';
|
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
|
import { WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
|
|
import { WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
|
|
|
-import { getAccountTypeList } from '@/services/bus/account';
|
|
|
|
|
|
|
+import {getAccountTypeList, getSelectedAccountId, getUserId} from '@/services/bus/account';
|
|
|
import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
import { handleForm, handleSpotWarrant } from './setup';
|
|
import { handleForm, handleSpotWarrant } from './setup';
|
|
@@ -187,6 +187,12 @@ import { handleNumAndMoney, getWrPosition, selecedFinance } from './setup';
|
|
|
import { handleIs } from '../../setup';
|
|
import { handleIs } from '../../setup';
|
|
|
import { getCanUseMoney } from '@/services/bus/account';
|
|
import { getCanUseMoney } from '@/services/bus/account';
|
|
|
import Bus from '@/utils/eventBus/index';
|
|
import Bus from '@/utils/eventBus/index';
|
|
|
|
|
+import {ListingForm} from "@/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/interface";
|
|
|
|
|
+import {HdWRDealOrderReq} from "@/services/proto/warehousetrade/interface";
|
|
|
|
|
+import {v4 as uuidv4} from "uuid";
|
|
|
|
|
+import moment from "moment";
|
|
|
|
|
+import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
|
|
|
|
|
+import {HdWRDealOrder} from "@/services/proto/warehousetrade";
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: ModalEnum.spot_trade_warehouse_delisting,
|
|
name: ModalEnum.spot_trade_warehouse_delisting,
|
|
@@ -242,41 +248,43 @@ export default defineComponent({
|
|
|
formState.case = `${item.productname}-${item.username}-${item.financingdays}天-${(item.marginratio * 100).toFixed(2)}%-${item.interestratemode === 3 ? item.interestrate : (item.interestrate * 10000).toFixed(2)}%-${item.interestsettlemode === 1 ? '按日结息' : '按月结息'}-${item.interestminlen}天起息`;
|
|
formState.case = `${item.productname}-${item.username}-${item.financingdays}天-${(item.marginratio * 100).toFixed(2)}%-${item.interestratemode === 3 ? item.interestrate : (item.interestrate * 10000).toFixed(2)}%-${item.interestsettlemode === 1 ? '按日结息' : '按月结息'}-${item.interestminlen}天起息`;
|
|
|
}
|
|
}
|
|
|
function submit() {
|
|
function submit() {
|
|
|
- // validateAction<ListingForm>(formRef, formState).then((res) => {
|
|
|
|
|
- // // 首先确定 这是仓单贸易的有仓单挂摘牌 HasWr = 1
|
|
|
|
|
- // // 其次判断 摘牌 1。摘买 (需要通过自己的仓单进行摘买) 2。摘卖 (不需要通过仓单)
|
|
|
|
|
- // const param: HdWRDealOrderReq = {
|
|
|
|
|
- // UserID: getUserId(), // uint32 用户ID
|
|
|
|
|
- // AccountID: getSelectedAccountId(), // uint64 资金账号
|
|
|
|
|
- // RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
|
|
|
|
|
- // WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
|
|
|
|
|
- // OrderQty: res.num as number, // 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: 0, // uint32 买卖方向
|
|
|
|
|
- // ApplyID: 0, // uint64 申请ID
|
|
|
|
|
- // // LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
|
|
|
|
|
- // SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
|
|
|
|
|
- // WRFactorTypeId: props.parantSelectedRow.wrfactortypeid, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
|
|
|
|
|
- // TradeDate: moment().format('YYYYMMDD'), // string 交易日
|
|
|
|
|
- // DeliveryMonth: '', // string 交收月
|
|
|
|
|
- // HasWr: isSale() ? 0 : 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
|
|
|
|
|
- // };
|
|
|
|
|
- // // 摘买方向
|
|
|
|
|
- // if (isBuy()) {
|
|
|
|
|
- // param.BuyOrSell = 1;
|
|
|
|
|
- // param.LadingBillId = res.LadingBillId;
|
|
|
|
|
- // } else {
|
|
|
|
|
- // param.BuyOrSell = 0;
|
|
|
|
|
- // }
|
|
|
|
|
- // requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
|
|
|
|
|
- // Bus.$emit('financing_manager', true);
|
|
|
|
|
- // cancel(true);
|
|
|
|
|
- // });
|
|
|
|
|
- // });
|
|
|
|
|
|
|
+ validateAction<ListingForm>(formRef, formState).then((res) => {
|
|
|
|
|
+ // 首先确定 这是仓单贸易的有仓单挂摘牌 HasWr = 1
|
|
|
|
|
+ // 其次判断 摘牌 1。摘买 (需要通过自己的仓单进行摘买) 2。摘卖 (不需要通过仓单)
|
|
|
|
|
+ const param: HdWRDealOrderReq = {
|
|
|
|
|
+ UserID: getUserId(), // uint32 用户ID
|
|
|
|
|
+ AccountID: getSelectedAccountId(), // uint64 资金账号
|
|
|
|
|
+ RelatedWRTradeOrderID: props.selectedRow.wrtradeorderid, // uint64 关联委托单号(摘牌委托关联挂牌委托单ID)
|
|
|
|
|
+ WRTransferUserID: props.selectedRow.userid, // uint32 仓单受让用户
|
|
|
|
|
+ OrderQty: res.num as number, // 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: 0, // uint32 买卖方向
|
|
|
|
|
+ ApplyID: 0, // uint64 申请ID
|
|
|
|
|
+ // LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
|
|
|
|
|
+ SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
|
|
|
|
|
+ WRFactorTypeId: props.parantSelectedRow.wrfactortypeid, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
|
|
|
|
|
+ TradeDate: moment().format('YYYYMMDD'), // string 交易日
|
|
|
|
|
+ DeliveryMonth: '', // string 交收月
|
|
|
|
|
+ HasWr: isWR(), // uint32 是否有仓单-0:没有仓单 1:有仓单
|
|
|
|
|
+ IsFinancing: 1, // uint32 是否融资购买(买摘牌时有效)-0:否 1:是
|
|
|
|
|
+ ProductDetailID: res.caseId, // uint64 金融机构产品组合ID(融资购买时有效)
|
|
|
|
|
+ };
|
|
|
|
|
+ // 摘买方向
|
|
|
|
|
+ if (isBuy()) {
|
|
|
|
|
+ param.BuyOrSell = 1;
|
|
|
|
|
+ param.LadingBillId = res.LadingBillId;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ param.BuyOrSell = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['融资摘牌成功', '融资摘牌失败:']).then(() => {
|
|
|
|
|
+ cancel(true);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
return {
|