|
@@ -12,8 +12,8 @@
|
|
|
<div class="formBar">
|
|
<div class="formBar">
|
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="挂牌方式" name="WRPriceType">
|
|
|
|
|
- <a-select class="inlineFormSelect" v-model:value="formState.marketid" @change="handleMarket" style="width: 140px" placeholder="请选择挂牌市场">
|
|
|
|
|
|
|
+ <a-form-item label="交易市场" name="marketid">
|
|
|
|
|
+ <a-select class="inlineFormSelect" v-model:value="formState.marketid" @change="handleMarket" style="width: 140px" placeholder="请选择交易市场">
|
|
|
<!-- <a-select-option :value="1">一口价</a-select-option>
|
|
<!-- <a-select-option :value="1">一口价</a-select-option>
|
|
|
<a-select-option :value="2">浮动价</a-select-option>
|
|
<a-select-option :value="2">浮动价</a-select-option>
|
|
|
<a-select-option :value="3">贸易圈</a-select-option> -->
|
|
<a-select-option :value="3">贸易圈</a-select-option> -->
|
|
@@ -54,8 +54,8 @@
|
|
|
</a-row>
|
|
</a-row>
|
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="挂牌数量" name="OrderQty">
|
|
|
|
|
- <a-input-number class="dialogInput" style="width: 140px !important" :min="0" v-model:value="formState.OrderQty" placeholder="请输入挂牌数量" />
|
|
|
|
|
|
|
+ <a-form-item ref="OrderQty" label="挂牌数量" name="OrderQty">
|
|
|
|
|
+ <a-input-number class="dialogInput" style="width: 140px !important" :min="0" v-model:value="formState.OrderQty" />
|
|
|
<span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
|
|
<span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
|
|
|
<a-checkbox class="commonCheckbox" v-if="isBlocs()" v-model:checked="numCheck">整单</a-checkbox>
|
|
<a-checkbox class="commonCheckbox" v-if="isBlocs()" v-model:checked="numCheck">整单</a-checkbox>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -71,13 +71,13 @@
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
|
|
+ <a-row :gutter="24" v-if="Number.isInteger(formState.OrderQty)">
|
|
|
<a-col :span="12" class="mt-20">
|
|
<a-col :span="12" class="mt-20">
|
|
|
<a-form-item>
|
|
<a-form-item>
|
|
|
- <a-slider v-model:value="formState.OrderQty" :min="0" :max="selectedRow.enableqty" class="formSlider" style="width: 140px;" />
|
|
|
|
|
|
|
+ <a-slider v-model:value="formState.OrderQty" :min="0" :max="selectedRow.enalbeqty" class="formSlider" style="width: 140px;" @afterChange="() => $refs.OrderQty.onFieldBlur()" />
|
|
|
<div class="unit">
|
|
<div class="unit">
|
|
|
<span>0</span>
|
|
<span>0</span>
|
|
|
- <span>{{selectedRow.enableqty}}{{selectedRow.enumdicname}}</span>
|
|
|
|
|
|
|
+ <span>{{selectedRow.enalbeqty}}{{selectedRow.enumdicname}}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -89,13 +89,16 @@
|
|
|
<a-month-picker style="width: 140px" v-model:value="formState.DeliveryMonth" :allowClear="false" class="commonDatePicker dialogDatePicker" />
|
|
<a-month-picker style="width: 140px" v-model:value="formState.DeliveryMonth" :allowClear="false" class="commonDatePicker dialogDatePicker" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="12" v-if="isFloat()">
|
|
|
|
|
- <a-form-item label="基差" name="PriceMove">
|
|
|
|
|
- <a-input-number class="commonInput" v-model:value="formState.PriceMove" style="width: 140px" />
|
|
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="履约模板" class="inputIconBox">
|
|
|
|
|
+ <span :class="['clickBox', formState.permanceTempName ? 'white' : '']" style="width: 140px" @click="handlePermance">{{formState.permanceTempName ? formState.permanceTempName : '选择履约模板'}}</span>
|
|
|
|
|
+ <svg class="icon svg-icon" aria-hidden="true" @click="handlePermance">
|
|
|
|
|
+ <use xlink:href="#icon-moban" />
|
|
|
|
|
+ </svg>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
|
|
+ <a-row :gutter="24" v-if="isBlocs()">
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="履约保证金" name="margin">
|
|
<a-form-item label="履约保证金" name="margin">
|
|
|
<a-input-number class="commonInput" v-model:value="formState.margin" :min="0" style="width: 140px" />
|
|
<a-input-number class="commonInput" v-model:value="formState.margin" :min="0" style="width: 140px" />
|
|
@@ -109,12 +112,9 @@
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="履约模板" class="inputIconBox">
|
|
|
|
|
- <span :class="['clickBox', formState.permanceTempName ? 'white' : '']" style="width: 140px" @click="handlePermance">{{formState.permanceTempName ? formState.permanceTempName : '选择履约模板'}}</span>
|
|
|
|
|
- <svg class="icon svg-icon" aria-hidden="true" @click="handlePermance">
|
|
|
|
|
- <use xlink:href="#icon-moban" />
|
|
|
|
|
- </svg>
|
|
|
|
|
|
|
+ <a-col :span="12" v-if="isFloat()">
|
|
|
|
|
+ <a-form-item label="基差" name="PriceMove">
|
|
|
|
|
+ <a-input-number class="commonInput" v-model:value="formState.PriceMove" style="width: 140px" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<template v-if="isBlocs()">
|
|
<template v-if="isBlocs()">
|
|
@@ -131,37 +131,30 @@
|
|
|
</a-row>
|
|
</a-row>
|
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="24" v-if="isFloat()" class="relative">
|
|
<a-col :span="24" v-if="isFloat()" class="relative">
|
|
|
- <a-form-item :label="'估算价'">
|
|
|
|
|
|
|
+ <a-form-item label="估算价">
|
|
|
<span class="white ml8">{{getPrice()}}</span>
|
|
<span class="white ml8">{{getPrice()}}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- </a-row>
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
<a-col :span="24" v-if="isFloat()" class="relative">
|
|
<a-col :span="24" v-if="isFloat()" class="relative">
|
|
|
- <a-form-item :label="'估算金额'">
|
|
|
|
|
|
|
+ <a-form-item label="估算金额">
|
|
|
<span class="white ml8">{{getWrMoney()}}</span>
|
|
<span class="white ml8">{{getWrMoney()}}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="24" v-if="isFixed()" class="relative">
|
|
|
|
|
- <a-form-item :label="'挂牌金额'">
|
|
|
|
|
|
|
+ <a-col :span="24" v-else class="relative">
|
|
|
|
|
+ <a-form-item label="挂牌金额">
|
|
|
<span class="white ml8">{{getWrMoney()}}</span>
|
|
<span class="white ml8">{{getWrMoney()}}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="24" v-if="isBlocs()" class="relative">
|
|
|
|
|
- <a-form-item :label="'挂牌金额'">
|
|
|
|
|
- <span class="white ml8">{{getMoney()}}</span>
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="24" v-if="getWrMargin() && !isBlocs()">
|
|
|
|
|
- <a-form-item :label="getWrMargin() ? '履约保证金' : ''">
|
|
|
|
|
- <span class="white ml8">{{getWrMargin()}}</span>
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
<a-col :span="24" v-if="isBlocs()">
|
|
<a-col :span="24" v-if="isBlocs()">
|
|
|
<a-form-item label="履约保证金">
|
|
<a-form-item label="履约保证金">
|
|
|
<span class="white ml8">{{getMargin()}}</span>
|
|
<span class="white ml8">{{getMargin()}}</span>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
|
|
+ <a-col :span="24" v-else-if="getWrMargin()">
|
|
|
|
|
+ <a-form-item label="履约保证金">
|
|
|
|
|
+ <span class="white ml8">{{getWrMargin()}}</span>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
|
<a-form-item label="可用资金">
|
|
<a-form-item label="可用资金">
|
|
|
<span class="white ml8">{{getCanUseMoney(handleSelectedAccount())}}</span>
|
|
<span class="white ml8">{{getCanUseMoney(handleSelectedAccount())}}</span>
|
|
@@ -173,7 +166,7 @@
|
|
|
<a-col :span="24" class="fixedBtns">
|
|
<a-col :span="24" class="fixedBtns">
|
|
|
<a-form-item class="btnCenter">
|
|
<a-form-item class="btnCenter">
|
|
|
<a-button class="listedBtn" :loading="loading" :disabled="loading" @click="submit">卖出</a-button>
|
|
<a-button class="listedBtn" :loading="loading" :disabled="loading" @click="submit">卖出</a-button>
|
|
|
- <a-button class="ml10 cancelBtn" :loading="loading" :disabled="loading" @click="cancel">取消</a-button>
|
|
|
|
|
|
|
+ <a-button class="ml10 cancelBtn" :loading="loading" :disabled="loading" @click="cancel(false)">取消</a-button>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
@@ -238,22 +231,7 @@ export default defineComponent({
|
|
|
const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
|
|
const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
|
|
|
|
|
|
|
|
// 获取仓单贸易市场
|
|
// 获取仓单贸易市场
|
|
|
- const { spotMarkets } = queryMarketSection(true)
|
|
|
|
|
-
|
|
|
|
|
- // 切换市场
|
|
|
|
|
- function handleMarket(value: number) {
|
|
|
|
|
- const market = spotMarkets.value.find(item => item.marketid === value)
|
|
|
|
|
- if (!market) return
|
|
|
|
|
-
|
|
|
|
|
- // 判断所选择市场挂牌方式 1:一口价 2:浮动价 3:贸易圈 4:协议指定
|
|
|
|
|
- if (market.listingmode === 1) {
|
|
|
|
|
- formState.WRPriceType = 1
|
|
|
|
|
- } else if (market.listingmode === 2) {
|
|
|
|
|
- formState.WRPriceType = 2
|
|
|
|
|
- } else {
|
|
|
|
|
- formState.WRPriceType = 3
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ const { spotMarkets, handleMarket } = queryMarketSection(true)
|
|
|
|
|
|
|
|
// 点选履约模板
|
|
// 点选履约模板
|
|
|
function handlePermance() {
|
|
function handlePermance() {
|
|
@@ -288,7 +266,7 @@ export default defineComponent({
|
|
|
// 估算价
|
|
// 估算价
|
|
|
function getPrice() {
|
|
function getPrice() {
|
|
|
let result = '--';
|
|
let result = '--';
|
|
|
- if (goodsCode.value) {
|
|
|
|
|
|
|
+ if (goodsCode.value && typeof formState.PriceMove === 'number') {
|
|
|
const goodsPrice = getQuoteDayInfoByCodeFindPrice(goodsCode.value);
|
|
const goodsPrice = getQuoteDayInfoByCodeFindPrice(goodsCode.value);
|
|
|
if (goodsPrice && goodsPrice !== '--') {
|
|
if (goodsPrice && goodsPrice !== '--') {
|
|
|
// 有实时行情价格
|
|
// 有实时行情价格
|
|
@@ -301,7 +279,7 @@ export default defineComponent({
|
|
|
onBeforeUnmount(() => {
|
|
onBeforeUnmount(() => {
|
|
|
removeSubscribeQuotation(uuid);
|
|
removeSubscribeQuotation(uuid);
|
|
|
});
|
|
});
|
|
|
- const { getWrMoney, getWrMargin, isFloat, isFixed, isBlocs } = handleNumAndPrice();
|
|
|
|
|
|
|
+ const { getWrMoney, getWrMargin, isFloat, isFixed, isBlocs, isAgreemt } = handleNumAndPrice();
|
|
|
// 处理内部资金账号
|
|
// 处理内部资金账号
|
|
|
function handleSelectedAccount() {
|
|
function handleSelectedAccount() {
|
|
|
const item = getSelectedAccount();
|
|
const item = getSelectedAccount();
|
|
@@ -352,8 +330,8 @@ export default defineComponent({
|
|
|
SubNum: props.selectedRow.subnum ? props.selectedRow.subnum : 0,
|
|
SubNum: props.selectedRow.subnum ? props.selectedRow.subnum : 0,
|
|
|
// WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
|
|
// WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
|
|
|
WRFactorTypeId: props.selectedRow.wrfactortypeid, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
|
|
WRFactorTypeId: props.selectedRow.wrfactortypeid, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
|
|
|
- IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
|
|
|
|
|
- MatchAccIDs: [], // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
|
|
|
|
|
|
|
+ IsSpecified: res.isSpecified, // 是否指定对手 0:不指定 1:指定 uint32
|
|
|
|
|
+ MatchAccIDs: res.friends, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
|
|
|
OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
|
|
OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
|
|
|
DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID
|
|
DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID
|
|
|
WRPriceType: res.WRPriceType, // 价格方式 1:固定价 2:浮动价
|
|
WRPriceType: res.WRPriceType, // 价格方式 1:固定价 2:浮动价
|
|
@@ -382,6 +360,14 @@ export default defineComponent({
|
|
|
MarginFlag: 0,
|
|
MarginFlag: 0,
|
|
|
DelistMinQty: res.DelistMinQty, // 起摘数量
|
|
DelistMinQty: res.DelistMinQty, // 起摘数量
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ if (isAgreemt()) {
|
|
|
|
|
+ if (!formState.friends.length) {
|
|
|
|
|
+ message.error('请选择用户');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (isBlocs()) {
|
|
if (isBlocs()) {
|
|
|
// 贸易圈 是后加的, 处理贸易圈
|
|
// 贸易圈 是后加的, 处理贸易圈
|
|
|
// if (!formState.permanceTempName) {
|
|
// if (!formState.permanceTempName) {
|
|
@@ -395,9 +381,6 @@ export default defineComponent({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const obj = {
|
|
const obj = {
|
|
|
- IsSpecified: 1,
|
|
|
|
|
- MatchAccIDs: res.friends,
|
|
|
|
|
- WRPriceType: 1,
|
|
|
|
|
TimevalidType: 3, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
|
|
TimevalidType: 3, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
|
|
|
MarginFlag: 1, // 挂牌是否指定保证金 0:否 1:是
|
|
MarginFlag: 1, // 挂牌是否指定保证金 0:否 1:是
|
|
|
MarginAlgorithm: 1, // 指定保证金方式 1:比率 2:固定
|
|
MarginAlgorithm: 1, // 指定保证金方式 1:比率 2:固定
|