|
|
@@ -53,6 +53,7 @@
|
|
|
<a-input-number class="commonInput"
|
|
|
style="width: 260px"
|
|
|
:min="0"
|
|
|
+ :max="getMaxNum()"
|
|
|
v-model:value="formState.OrderQty" />
|
|
|
<span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
|
|
|
</a-form-item>
|
|
|
@@ -75,8 +76,8 @@
|
|
|
:max="99999999"
|
|
|
class="formSlider" />
|
|
|
<div class="unit">
|
|
|
- <span>0</span>
|
|
|
- <span>99999999{{selectedRow.enumdicname}}</span>
|
|
|
+ <span>{{selectedRow.minivalue}}</span>
|
|
|
+ <span>{{getMaxNum()}}{{selectedRow.enumdicname}}</span>
|
|
|
</div>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
@@ -85,28 +86,35 @@
|
|
|
class="relative">
|
|
|
<a-input class="commonInput"
|
|
|
:suffix="selectedRow.enumdicname"
|
|
|
+ :min="selectedRow.minivalue"
|
|
|
style="width: 260px" />
|
|
|
- <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
|
|
|
+ <div class="tip">最小单位:{{selectedRow.minivalue}}{{selectedRow.enumdicname}}</div>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <!-- <a-col :span="24">
|
|
|
- <a-form-item label="挂牌金额"
|
|
|
- class="relative">
|
|
|
- <a-input class="commonInput"
|
|
|
- :suffix="selectedRow.enumdicname"
|
|
|
- style="width: 260px" />
|
|
|
- <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
|
|
|
+ <a-col :span="24"
|
|
|
+ class="relative">
|
|
|
+ <a-form-item :label="isFloat() ? '估算金额' : '摘牌金额'">
|
|
|
+ <span class="white ml8">{{getMoney()}}</span>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item label="履约保证金"
|
|
|
- class="relative">
|
|
|
- <a-input class="commonInput"
|
|
|
- :suffix="selectedRow.enumdicname"
|
|
|
- style="width: 260px" />
|
|
|
- <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
|
|
|
+ <a-col :span="24"
|
|
|
+ class="relative">
|
|
|
+ <a-form-item :label="getMargin() ? '履约保证金' : ''">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="8"
|
|
|
+ v-if="getMargin()">
|
|
|
+ <span class="white ml8">{{getMargin()}}</span>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="4"
|
|
|
+ class="tr">
|
|
|
+ <span class="grey1">可用资金</span>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <span class="white ml8"> {{getCanUseMoney(getSelectedAccount())}}</span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
</a-form-item>
|
|
|
- </a-col> -->
|
|
|
+ </a-col>
|
|
|
</a-row>
|
|
|
<a-row :gutter="24"
|
|
|
type="flex"
|
|
|
@@ -130,26 +138,25 @@
|
|
|
<script lang="ts">
|
|
|
import { defineComponent, PropType, ref } from 'vue';
|
|
|
import { Des } from '@/common/components/commonDes';
|
|
|
-import { QhjAgreementConfig } from '@/services/go/ermcp/qhj/interface';
|
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
|
import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
|
|
|
-import { hdWROrder, wRListingCancelOrder } from '@/services/proto/warehousetrade';
|
|
|
+import { hdWROrder } from '@/services/proto/warehousetrade';
|
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
-import { HdWROrderReq, WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
|
|
|
-import { getAccountTypeList, getInTaAccount, getUserId } from '@/services/bus/account';
|
|
|
+import { WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
|
|
|
+import { getAccountTypeList, getUserId } from '@/services/bus/account';
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
import moment, { Moment } from 'moment';
|
|
|
import { getMarketRunByTradeMode } from '@/services/bus/market';
|
|
|
import { WrOrderQuote } from '@/services/go/wrtrade/interface';
|
|
|
-import { handleForm } from './setup';
|
|
|
+import { handleForm, handleNumAndPrice } from './setup';
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import { FormParam } from './interface';
|
|
|
import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
import { handleIs } from '../buy-sell-market/setup';
|
|
|
import { BuyOrSell } from '@/common/constants/enumCommon';
|
|
|
-
|
|
|
+import { getCanUseMoney } from '@/services/bus/account';
|
|
|
export default defineComponent({
|
|
|
emits: ['cancel', 'update'],
|
|
|
name: ModalEnum.spot_trade_warehouse_post_buying,
|
|
|
@@ -171,10 +178,18 @@ export default defineComponent({
|
|
|
setup(props, context) {
|
|
|
const { visible, cancel } = _closeModal(context);
|
|
|
const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
|
|
|
+ const { rules, formState, formRef } = handleForm();
|
|
|
const loading = ref<boolean>(false);
|
|
|
const accountList = getAccountTypeList([2]);
|
|
|
- const { rules, formState, formRef } = handleForm();
|
|
|
+ if (accountList.length) {
|
|
|
+ formState.accountid = accountList[0].accountid;
|
|
|
+ }
|
|
|
+ function getSelectedAccount() {
|
|
|
+ return accountList.find((e) => e.accountid === formState.accountid);
|
|
|
+ }
|
|
|
formState.DeliveryMonth = props.time;
|
|
|
+
|
|
|
+ const { getMaxNum, getMoney, getMargin } = handleNumAndPrice(props.enumName, props.selectedRow);
|
|
|
function submit() {
|
|
|
const marketInfo = getMarketRunByTradeMode(17);
|
|
|
if (marketInfo) {
|
|
|
@@ -246,6 +261,11 @@ export default defineComponent({
|
|
|
formRef,
|
|
|
isFloat,
|
|
|
isWR,
|
|
|
+ getMaxNum,
|
|
|
+ getMoney,
|
|
|
+ getMargin,
|
|
|
+ getSelectedAccount,
|
|
|
+ getCanUseMoney,
|
|
|
};
|
|
|
},
|
|
|
});
|