|
@@ -5,15 +5,26 @@
|
|
|
<div class="futures_trade__left">
|
|
<div class="futures_trade__left">
|
|
|
<div class="futures_trade__form">
|
|
<div class="futures_trade__form">
|
|
|
<a-form class="inlineForm" ref="formRef" :model="formData" :rules="rules">
|
|
<a-form class="inlineForm" ref="formRef" :model="formData" :rules="rules">
|
|
|
- <a-form-item label="合同编号" v-if="isSpotContract">
|
|
|
|
|
|
|
+ <a-form-item label="合同编号" style="margin-bottom:10px" v-if="isSpotContract">
|
|
|
<span class="white">{{ selectedRow.contractno }}</span>
|
|
<span class="white">{{ selectedRow.contractno }}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
- <a-form-item label="计划编号" v-if="isHedgePlan">
|
|
|
|
|
|
|
+ <a-form-item label="计划编号" style="margin-bottom:10px" v-if="isHedgePlan">
|
|
|
<span class="white">{{ selectedRow.hedgeplanno }}</span>
|
|
<span class="white">{{ selectedRow.hedgeplanno }}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
- <a-form-item label="账号">
|
|
|
|
|
|
|
+ <template v-if="isSpotContract">
|
|
|
|
|
+ <a-form-item label="已定价量" style="margin-bottom:10px">
|
|
|
|
|
+ <span class="white">{{ Number(contractMiddleGoodsCfg.middlegoodspricedqty3).toFixed(2) }}</span>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item label="已关联量" style="margin-bottom:10px">
|
|
|
|
|
+ <span class="white">{{ contractMiddleGoodsCfg.relatedmiddlegoodsqty }}</span>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item label="待点价量" style="margin-bottom:10px">
|
|
|
|
|
+ <span class="white">{{ Math.trunc(contractMiddleGoodsCfg.pendingpricedqty) }}({{ Math.trunc(contractMiddleGoodsCfg.covertqty) }}手)</span>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <a-form-item label="账号" name="AccountID">
|
|
|
<a-select class="inlineFormSelect" placeholder="请选择账号" v-model:value="formData.AccountID" @change="tradeAccountChange">
|
|
<a-select class="inlineFormSelect" placeholder="请选择账号" v-model:value="formData.AccountID" @change="tradeAccountChange">
|
|
|
- <a-select-option v-for="item in futuresAccountList" :value="item.accountid" :key="item.accountid">{{item.accountid}}/{{ item.accountname }}</a-select-option>
|
|
|
|
|
|
|
+ <a-select-option v-for="item in accountList" :value="item.accountid" :key="item.accountid">{{item.accountid}}/{{ item.accountname }}</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item label="合约" name="GoodsID">
|
|
<a-form-item label="合约" name="GoodsID">
|
|
@@ -93,6 +104,8 @@ import { ErmcpRealExposureModel } from '@/services/go/ermcp/exposure/interface';
|
|
|
import { queryExposureGoods } from '@/services/go/ermcp/exposure'
|
|
import { queryExposureGoods } from '@/services/go/ermcp/exposure'
|
|
|
import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
|
|
import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
|
|
|
import { GetDeliveryGoodsDetail } from "@/services/go/ermcp/goodsInfo";
|
|
import { GetDeliveryGoodsDetail } from "@/services/go/ermcp/goodsInfo";
|
|
|
|
|
+import { queryErmcp3ContractMiddleGoodsCfg } from '@/services/go/ermcp/spot-contract'
|
|
|
|
|
+import { QueryErmcp3ContractMiddleGoodsCfgRsp } from '@/services/go/ermcp/spot-contract/interface';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
emits: ['cancel', 'update'],
|
|
emits: ['cancel', 'update'],
|
|
@@ -106,11 +119,18 @@ export default defineComponent({
|
|
|
},
|
|
},
|
|
|
setup(props, context) {
|
|
setup(props, context) {
|
|
|
const { visible, cancel } = _closeModal(context);
|
|
const { visible, cancel } = _closeModal(context);
|
|
|
- const { goodsid, spotcontractid, hedgeplanid, deliverygoodsid, goodsgroupid, MiddleGoodsID } = props.selectedRow;
|
|
|
|
|
|
|
+ const { accountid, goodsid, spotcontractid, hedgeplanid, deliverygoodsid, goodsgroupid, MiddleGoodsID } = props.selectedRow;
|
|
|
const { rules, formData } = handleForm();
|
|
const { rules, formData } = handleForm();
|
|
|
const formRef = ref();
|
|
const formRef = ref();
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
|
|
|
|
|
|
|
+ // 现货合同期现配置信息
|
|
|
|
|
+ const contractMiddleGoodsCfg = ref<QueryErmcp3ContractMiddleGoodsCfgRsp>({
|
|
|
|
|
+ middlegoodspricedqty3: '0',
|
|
|
|
|
+ relatedmiddlegoodsqty: '0',
|
|
|
|
|
+ pendingpricedqty: '0',
|
|
|
|
|
+ covertqty: 0
|
|
|
|
|
+ });
|
|
|
// 合约列表
|
|
// 合约列表
|
|
|
const goodsList = ref(getGoodsQuoteList());
|
|
const goodsList = ref(getGoodsQuoteList());
|
|
|
// 当前选中的商品合约
|
|
// 当前选中的商品合约
|
|
@@ -125,6 +145,10 @@ export default defineComponent({
|
|
|
// 现货合同
|
|
// 现货合同
|
|
|
if (isSpotContract) {
|
|
if (isSpotContract) {
|
|
|
goodsList.value = goodsList.value.filter((e) => e.goodsgroupid === goodsgroupid);
|
|
goodsList.value = goodsList.value.filter((e) => e.goodsgroupid === goodsgroupid);
|
|
|
|
|
+
|
|
|
|
|
+ queryErmcp3ContractMiddleGoodsCfg({ spotcontractid }).then((res) => {
|
|
|
|
|
+ contractMiddleGoodsCfg.value = res[0];
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 实时敞口
|
|
// 实时敞口
|
|
@@ -193,6 +217,20 @@ export default defineComponent({
|
|
|
formData.OrderQty = enableqty;
|
|
formData.OrderQty = enableqty;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ // 账号列表
|
|
|
|
|
+ const accountList = computed(() => {
|
|
|
|
|
+ if (isSpotContract) {
|
|
|
|
|
+ const tmpList = futuresAccountList.value.filter((e) => e.accountid === accountid);
|
|
|
|
|
+ if (tmpList.length) {
|
|
|
|
|
+ formData.AccountID = tmpList[0].accountid;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ formData.AccountID = undefined;
|
|
|
|
|
+ }
|
|
|
|
|
+ return tmpList;
|
|
|
|
|
+ }
|
|
|
|
|
+ return futuresAccountList.value;
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
// 持仓列表
|
|
// 持仓列表
|
|
|
const positionList = computed(() => {
|
|
const positionList = computed(() => {
|
|
|
if (selectedGoods.value) {
|
|
if (selectedGoods.value) {
|
|
@@ -412,8 +450,9 @@ export default defineComponent({
|
|
|
cancel,
|
|
cancel,
|
|
|
loading,
|
|
loading,
|
|
|
visible,
|
|
visible,
|
|
|
- futuresAccountList,
|
|
|
|
|
|
|
+ accountList,
|
|
|
positionList,
|
|
positionList,
|
|
|
|
|
+ contractMiddleGoodsCfg,
|
|
|
rules,
|
|
rules,
|
|
|
formRef,
|
|
formRef,
|
|
|
formData,
|
|
formData,
|