|
|
@@ -1,122 +1,5 @@
|
|
|
<template>
|
|
|
- <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
|
|
|
- <Drawer
|
|
|
- :title="'摘牌'"
|
|
|
- :placement="'top'"
|
|
|
- :visible="visible"
|
|
|
- width="486px"
|
|
|
- height="479px"
|
|
|
- @cancel="cancel"
|
|
|
- class="top"
|
|
|
- >
|
|
|
- <div class="delisting">
|
|
|
- <div class="formBar">
|
|
|
- <a-form
|
|
|
- class="inlineForm dialogForm"
|
|
|
- ref="formRef"
|
|
|
- :model="formState"
|
|
|
- :rules="rules"
|
|
|
- >
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item label="交易账户" name="accountid">
|
|
|
- <a-select
|
|
|
- class="inlineFormSelect"
|
|
|
- style="width: 260px"
|
|
|
- v-model:value="formState.accountid"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <a-select-option
|
|
|
- v-for="item in accountList"
|
|
|
- :value="item.accountid"
|
|
|
- :key="item.accountid"
|
|
|
- >{{item.accountid}}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item label="挂牌方">
|
|
|
- <span class="white">{{selectedRow.username}}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item label="挂牌价格">
|
|
|
- <span class="yellow">{{selectedRow.fixedprice}}</span>
|
|
|
- </a-form-item>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24"></a-col>
|
|
|
- </a-row>
|
|
|
- <a-form-item label="挂牌数量">
|
|
|
- <span class="white">{{selectedRow.orderqty}}吨</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item label="现货仓单" name>
|
|
|
- <a-select
|
|
|
- class="inlineFormSelect"
|
|
|
- style="width: 260px"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <a-select-option value="8271930000-01(120吨)">8271930000-01(120吨)</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item label="摘牌数量" name="num">
|
|
|
- <a-input-number
|
|
|
- class="dialogInput"
|
|
|
- style="width: 260px"
|
|
|
- v-model:value="formState.num"
|
|
|
- suffix="吨"
|
|
|
- />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24" class="mt-20">
|
|
|
- <a-form-item>
|
|
|
- <a-slider
|
|
|
- :min="0"
|
|
|
- v-model:value="formState.num"
|
|
|
- :max="selectedRow.orderqty"
|
|
|
- class="formSlider"
|
|
|
- />
|
|
|
- <div class="unit">
|
|
|
- <span>1</span>
|
|
|
- <span>{{selectedRow.orderqty}}</span>
|
|
|
- </div>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12"> </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24" class="mt-20">
|
|
|
- <a-form-item label="挂牌金额">
|
|
|
- <span class="white">50400.00</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item class="tc">
|
|
|
- <a-button class="listedBtn" @click="submit">卖出</a-button>
|
|
|
- <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </Drawer>
|
|
|
- <!-- 仓单贸易 一口价 摘牌 -->
|
|
|
+ <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
|
|
|
<Drawer :title="'摘牌'"
|
|
|
:placement="'top'"
|
|
|
:visible="visible"
|
|
|
@@ -165,8 +48,7 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- <a-row :gutter="24"
|
|
|
- v-if="isBuy()">
|
|
|
+ <a-row :gutter="24">
|
|
|
<a-col :span="24">
|
|
|
<a-form-item label="现货仓单"
|
|
|
name>
|
|
|
@@ -227,6 +109,124 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</Drawer>
|
|
|
+ <!-- 仓单贸易 一口价 摘牌 -->
|
|
|
+ <Drawer :title="'摘牌'"
|
|
|
+ :placement="'top'"
|
|
|
+ :visible="visible"
|
|
|
+ width="486px"
|
|
|
+ height="479px"
|
|
|
+ @cancel="cancel"
|
|
|
+ class="top">
|
|
|
+ <div class="delisting">
|
|
|
+ <div class="formBar">
|
|
|
+ <a-form class="inlineForm dialogForm"
|
|
|
+ ref="formRef"
|
|
|
+ :model="formState"
|
|
|
+ :rules="rules">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="交易账户"
|
|
|
+ name="accountid">
|
|
|
+ <a-select class="inlineFormSelect"
|
|
|
+ style="width: 260px"
|
|
|
+ v-model:value="formState.accountid"
|
|
|
+ placeholder="请选择">
|
|
|
+ <a-select-option v-for="item in accountList"
|
|
|
+ :value="item.accountid"
|
|
|
+ :key="item.accountid">
|
|
|
+ {{item.accountid}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="挂牌方">
|
|
|
+ <span class="white">{{selectedRow.username}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="挂牌价格">
|
|
|
+ <span class="yellow">{{selectedRow.fixedprice}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24"></a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-form-item label="挂牌数量">
|
|
|
+ <span class="white">{{selectedRow.orderqty}}吨</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24"
|
|
|
+ v-if="isSale() && !isSale()">
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="现货仓单"
|
|
|
+ name="LadingBillId">
|
|
|
+ <a-select class="inlineFormSelect"
|
|
|
+ style="width: 260px"
|
|
|
+ v-model:value="formState.LadingBillId"
|
|
|
+ placeholder="请选择">
|
|
|
+ <a-select-option v-for="item in wrHoldList"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id">
|
|
|
+ {{item.name}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="摘牌数量"
|
|
|
+ name="num">
|
|
|
+ <a-input-number class="dialogInput"
|
|
|
+ style="width: 260px"
|
|
|
+ v-model:value="formState.num"
|
|
|
+ suffix="吨" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24"
|
|
|
+ class="mt-20">
|
|
|
+ <a-form-item>
|
|
|
+ <a-slider :min="0"
|
|
|
+ v-model:value="formState.num"
|
|
|
+ :max="selectedRow.orderqty"
|
|
|
+ class="formSlider" />
|
|
|
+ <div class="unit">
|
|
|
+ <span>1</span>
|
|
|
+ <span>{{selectedRow.orderqty}}</span>
|
|
|
+ </div>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12"> </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24"
|
|
|
+ class="mt-20">
|
|
|
+ <a-form-item label="挂牌金额">
|
|
|
+ <span class="white">50400.00</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item class="tc">
|
|
|
+ <a-button class="listedBtn"
|
|
|
+ @click="submit">卖出</a-button>
|
|
|
+ <a-button class="ml10 cancelBtn"
|
|
|
+ @click="cancel">取消</a-button>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Drawer>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
@@ -242,11 +242,9 @@ import moment from 'moment';
|
|
|
import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
import { HdWRDealOrderReq } from '@/services/proto/warehousetrade/interface';
|
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
-import { message } from 'ant-design-vue';
|
|
|
-import { handleForm, handleIs } from './setup';
|
|
|
+import { handleForm, handleIs, handleSpotWarrant } from './setup';
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import { ListingForm } from './interface';
|
|
|
-import Long from 'long';
|
|
|
import { BuyOrSell } from '@/common/constants/enumCommon';
|
|
|
import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
export default defineComponent({
|
|
|
@@ -275,11 +273,10 @@ export default defineComponent({
|
|
|
setup(props, context) {
|
|
|
const { visible, cancel } = _closeModal(context);
|
|
|
const accountList = getAccountTypeList([2]);
|
|
|
- const data = props.selectedRow;
|
|
|
const { rules, formState, formRef } = handleForm(props.selectedRow);
|
|
|
- console.log('data', data);
|
|
|
const loading = ref<boolean>(false);
|
|
|
const { isSale, isBuy } = handleIs(props.enumName, props.buyOrSell);
|
|
|
+ const { wrHoldList } = handleSpotWarrant(props.enumName, props.buyOrSell, props.selectedRow);
|
|
|
|
|
|
function submit() {
|
|
|
validateAction<ListingForm>(formRef, formState).then((res) => {
|
|
|
@@ -298,7 +295,7 @@ export default defineComponent({
|
|
|
OperatorID: getUserId(), // uint64 操作员账号ID
|
|
|
BuyOrSell: 0, // uint32 买卖方向
|
|
|
ApplyID: 0, // uint64 申请ID
|
|
|
- LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
|
|
|
+ // LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
|
|
|
SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
|
|
|
WRFactorTypeId: props.parantSelectedRow.wrfactortypeid, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
|
|
|
TradeDate: moment().format('YYYYMMDD'), // string 交易日
|
|
|
@@ -309,7 +306,7 @@ export default defineComponent({
|
|
|
// 摘买方向
|
|
|
if (isBuy()) {
|
|
|
param.BuyOrSell = 1;
|
|
|
- param.LadingBillId = Long.fromString('2081627550296000001');
|
|
|
+ param.LadingBillId = res.LadingBillId;
|
|
|
} else {
|
|
|
param.BuyOrSell = 0;
|
|
|
}
|
|
|
@@ -324,8 +321,9 @@ export default defineComponent({
|
|
|
visible,
|
|
|
cancel,
|
|
|
accountList,
|
|
|
+ wrHoldList,
|
|
|
submit,
|
|
|
- isBuy,
|
|
|
+ isSale,
|
|
|
rules,
|
|
|
formState,
|
|
|
formRef,
|