|
@@ -1,104 +1,121 @@
|
|
|
<template>
|
|
<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="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="12"
|
|
|
|
|
- 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"
|
|
|
|
|
+ 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>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
@@ -118,7 +135,7 @@ import { message } from 'ant-design-vue';
|
|
|
import { handleForm } from './setup';
|
|
import { handleForm } from './setup';
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import { ListingForm } from './interface';
|
|
import { ListingForm } from './interface';
|
|
|
-import Long from "long";
|
|
|
|
|
|
|
+import Long from 'long';
|
|
|
import { BuyOrSell } from '@/common/constants/enumCommon';
|
|
import { BuyOrSell } from '@/common/constants/enumCommon';
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: ModalEnum.spot_trade_warehouse_delisting,
|
|
name: ModalEnum.spot_trade_warehouse_delisting,
|
|
@@ -148,7 +165,6 @@ export default defineComponent({
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
function submit() {
|
|
function submit() {
|
|
|
validateAction<ListingForm>(formRef, formState).then((res) => {
|
|
validateAction<ListingForm>(formRef, formState).then((res) => {
|
|
|
-
|
|
|
|
|
// 首先确定 这是仓单贸易的有仓单挂摘牌 HasWr = 1
|
|
// 首先确定 这是仓单贸易的有仓单挂摘牌 HasWr = 1
|
|
|
// 其次判断 摘牌 1。摘买 (需要通过自己的仓单进行摘买) 2。摘卖 (不需要通过仓单)
|
|
// 其次判断 摘牌 1。摘买 (需要通过自己的仓单进行摘买) 2。摘卖 (不需要通过仓单)
|
|
|
const param: HdWRDealOrderReq = {
|
|
const param: HdWRDealOrderReq = {
|
|
@@ -170,14 +186,14 @@ export default defineComponent({
|
|
|
TradeDate: moment().format('YYYYMMDD'), // string 交易日
|
|
TradeDate: moment().format('YYYYMMDD'), // string 交易日
|
|
|
DeliveryMonth: '', // string 交收月
|
|
DeliveryMonth: '', // string 交收月
|
|
|
HasWr: 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
|
|
HasWr: 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
// 摘买方向
|
|
// 摘买方向
|
|
|
- if(props.buyOrSell === BuyOrSell.buy){
|
|
|
|
|
- param.BuyOrSell = 1
|
|
|
|
|
- param.LadingBillId = Long.fromString("2081627550296000001")
|
|
|
|
|
- }else{
|
|
|
|
|
- param.BuyOrSell = 0
|
|
|
|
|
|
|
+ if (props.buyOrSell === BuyOrSell.buy) {
|
|
|
|
|
+ param.BuyOrSell = 1;
|
|
|
|
|
+ param.LadingBillId = Long.fromString('2081627550296000001');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ param.BuyOrSell = 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
|
|
requestResultLoadingAndInfo(HdWRDealOrder, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
|
|
@@ -238,32 +254,13 @@ export default defineComponent({
|
|
|
padding: 28px 16px 7px;
|
|
padding: 28px 16px 7px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+::v-deep.ant-slider.formSlider {
|
|
|
|
|
+ width: 260px;
|
|
|
|
|
+}
|
|
|
::v-deep.ant-input-suffix {
|
|
::v-deep.ant-input-suffix {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
right: -25px;
|
|
right: -25px;
|
|
|
}
|
|
}
|
|
|
-::v-deep.formProgress {
|
|
|
|
|
- width: 260px;
|
|
|
|
|
- // height: 3px;
|
|
|
|
|
- // .rounded-corners(2px);
|
|
|
|
|
- margin-left: 70px;
|
|
|
|
|
- .ant-progress-outer {
|
|
|
|
|
- margin-right: 0;
|
|
|
|
|
- padding-right: 0;
|
|
|
|
|
- .ant-progress-inner {
|
|
|
|
|
- background: @m-grey14;
|
|
|
|
|
- .rounded-corners(2px);
|
|
|
|
|
- .ant-progress-bg {
|
|
|
|
|
- height: 3px !important;
|
|
|
|
|
- border-radius: 2px !important;
|
|
|
|
|
- background-color: @m-blue0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .ant-progress-text {
|
|
|
|
|
- display: none;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
.unit {
|
|
.unit {
|
|
|
margin-left: 70px;
|
|
margin-left: 70px;
|
|
|
width: 260px;
|
|
width: 260px;
|