|
@@ -22,12 +22,14 @@
|
|
|
<a-form-item label="挂牌方式"
|
|
<a-form-item label="挂牌方式"
|
|
|
name="WRPriceType">
|
|
name="WRPriceType">
|
|
|
<a-select class="inlineFormSelect"
|
|
<a-select class="inlineFormSelect"
|
|
|
- default-value="1"
|
|
|
|
|
- v-model:value="formState.WRPriceType"
|
|
|
|
|
- style="width: 140px">
|
|
|
|
|
- <a-select-option :value="1">一口价</a-select-option>
|
|
|
|
|
|
|
+ v-model:value="formState.marketid"
|
|
|
|
|
+ @change="handleMarket"
|
|
|
|
|
+ style="width: 140px"
|
|
|
|
|
+ placeholder="请选择挂牌市场">
|
|
|
|
|
+ <!-- <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> -->
|
|
|
|
|
+ <a-select-option v-for="item in spotMarkets" :key="item.marketid" :value="item.marketid">{{item.marketname}}</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -158,7 +160,6 @@
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
- <template v-if="isBlocs()">
|
|
|
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="履约保证金"
|
|
<a-form-item label="履约保证金"
|
|
@@ -187,32 +188,33 @@
|
|
|
class="inputIconBox">
|
|
class="inputIconBox">
|
|
|
<span :class="['clickBox', formState.permanceTempName ? 'white' : '']"
|
|
<span :class="['clickBox', formState.permanceTempName ? 'white' : '']"
|
|
|
style="width: 140px"
|
|
style="width: 140px"
|
|
|
- @click="openPermance">{{formState.permanceTempName ? formState.permanceTempName : '选择履约模板'}}</span>
|
|
|
|
|
|
|
+ @click="handlePermance">{{formState.permanceTempName ? formState.permanceTempName : '选择履约模板'}}</span>
|
|
|
<svg class="icon svg-icon"
|
|
<svg class="icon svg-icon"
|
|
|
aria-hidden="true"
|
|
aria-hidden="true"
|
|
|
- @click="openPermance">
|
|
|
|
|
|
|
+ @click="handlePermance">
|
|
|
<use xlink:href="#icon-moban" />
|
|
<use xlink:href="#icon-moban" />
|
|
|
</svg>
|
|
</svg>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="指定朋友"
|
|
|
|
|
- class="inputIconBox">
|
|
|
|
|
- <span :class="['clickBox', getFriendLength() ? 'white' : '']"
|
|
|
|
|
- style="width: 140px"
|
|
|
|
|
- @click="openFriend">{{getFriendLength() ? `已选${getFriendLength() }人` : '选择朋友'}}</span>
|
|
|
|
|
- <svg class="icon svg-icon"
|
|
|
|
|
- aria-hidden="true"
|
|
|
|
|
- @click="openFriend">
|
|
|
|
|
- <use xlink:href="#icon-pengyou1" />
|
|
|
|
|
- </svg>
|
|
|
|
|
- <a-checkbox class="commonCheckbox"
|
|
|
|
|
- v-model:checked="friendCheck"
|
|
|
|
|
- @change="limiteFriends">不限</a-checkbox>
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
|
|
+ <template v-if="isBlocs()">
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="指定朋友"
|
|
|
|
|
+ class="inputIconBox">
|
|
|
|
|
+ <span :class="['clickBox', getFriendLength() ? 'white' : '']"
|
|
|
|
|
+ style="width: 140px"
|
|
|
|
|
+ @click="openFriend">{{getFriendLength() ? `已选${getFriendLength() }人` : '选择朋友'}}</span>
|
|
|
|
|
+ <svg class="icon svg-icon"
|
|
|
|
|
+ aria-hidden="true"
|
|
|
|
|
+ @click="openFriend">
|
|
|
|
|
+ <use xlink:href="#icon-pengyou1" />
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ <a-checkbox class="commonCheckbox"
|
|
|
|
|
+ v-model:checked="friendCheck"
|
|
|
|
|
+ @change="limiteFriends">不限</a-checkbox>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </template>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
- </template>
|
|
|
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="24"
|
|
<a-col :span="24"
|
|
|
v-if="isFloat()"
|
|
v-if="isFloat()"
|
|
@@ -290,6 +292,7 @@
|
|
|
<!-- 选择履约模板 -->
|
|
<!-- 选择履约模板 -->
|
|
|
<Permance v-if="showPermance"
|
|
<Permance v-if="showPermance"
|
|
|
:position="'bottom'"
|
|
:position="'bottom'"
|
|
|
|
|
+ :marketid="formState.marketid"
|
|
|
@cancel="choosePermance"
|
|
@cancel="choosePermance"
|
|
|
@update="choosePermance" />
|
|
@update="choosePermance" />
|
|
|
</template>
|
|
</template>
|
|
@@ -317,7 +320,7 @@ import moment from 'moment';
|
|
|
import { v4 as uuidv4, v4 } from 'uuid';
|
|
import { v4 as uuidv4, v4 } from 'uuid';
|
|
|
import { defineComponent, onMounted, PropType, ref } from 'vue';
|
|
import { defineComponent, onMounted, PropType, ref } from 'vue';
|
|
|
import { ListingForm } from './interface';
|
|
import { ListingForm } from './interface';
|
|
|
-import { handleForm, handleGoods, handleNumAndPrice } from './setup';
|
|
|
|
|
|
|
+import { handleForm, handleGoods, handleNumAndPrice, queryMarketSection } from './setup';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: ModalEnum.spot_warrant_spot_details_listed,
|
|
name: ModalEnum.spot_warrant_spot_details_listed,
|
|
@@ -344,6 +347,37 @@ export default defineComponent({
|
|
|
const { numCheck, increaseNumber, decreaseNumber } = useBlocksNumber(formState);
|
|
const { numCheck, increaseNumber, decreaseNumber } = useBlocksNumber(formState);
|
|
|
|
|
|
|
|
const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
|
|
const { goodsGroup, goodsList, groupsChange, findGoodsCode } = handleGoods();
|
|
|
|
|
+
|
|
|
|
|
+ // 获取仓单贸易市场
|
|
|
|
|
+ const { spotMarkets } = queryMarketSection(false)
|
|
|
|
|
+
|
|
|
|
|
+ // 切换市场
|
|
|
|
|
+ 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
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 点选履约模板
|
|
|
|
|
+ function handlePermance() {
|
|
|
|
|
+ // 必须先选择市场再选择对应的履约模板
|
|
|
|
|
+ if (!formState.marketid) {
|
|
|
|
|
+ message.info('请先选择市场')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ openPermance()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 切换商品组
|
|
// 切换商品组
|
|
|
function handleGoodsGroups(value: number) {
|
|
function handleGoodsGroups(value: number) {
|
|
|
formState.goodsid = undefined;
|
|
formState.goodsid = undefined;
|
|
@@ -386,7 +420,27 @@ export default defineComponent({
|
|
|
return item.taaccounttype === 2 ? item : list[0];
|
|
return item.taaccounttype === 2 ? item : list[0];
|
|
|
}
|
|
}
|
|
|
function submit() {
|
|
function submit() {
|
|
|
- const marketInfo = getMarketRunByTradeMode(17);
|
|
|
|
|
|
|
+ debugger;
|
|
|
|
|
+ // 市场信息
|
|
|
|
|
+ if (!formState.marketid) {
|
|
|
|
|
+ message.info("请选择市场")
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // const marketInfo = getMarketRunByTradeMode(17);
|
|
|
|
|
+ const market = spotMarkets.value.find(item => item.marketid === formState.marketid)
|
|
|
|
|
+ if (!market) {
|
|
|
|
|
+ message.info("市场信息异常,请稍后重试")
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 履约模板
|
|
|
|
|
+ if (!formState.permanceTempName) {
|
|
|
|
|
+ message.info('请选择履约模板')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const marketInfo = getMarketRunByTradeMode(market!.trademode)
|
|
|
if (marketInfo) {
|
|
if (marketInfo) {
|
|
|
// 无仓单挂牌
|
|
// 无仓单挂牌
|
|
|
validateAction<ListingForm>(formRef, formState).then((res) => {
|
|
validateAction<ListingForm>(formRef, formState).then((res) => {
|
|
@@ -442,10 +496,10 @@ export default defineComponent({
|
|
|
};
|
|
};
|
|
|
if (isBlocs()) {
|
|
if (isBlocs()) {
|
|
|
// 贸易圈 是后加的, 处理贸易圈
|
|
// 贸易圈 是后加的, 处理贸易圈
|
|
|
- if (!formState.permanceTempName) {
|
|
|
|
|
- message.error('请选择履约模板');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (!formState.permanceTempName) {
|
|
|
|
|
+ // message.error('请选择履约模板');
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
if (!friendCheck.value) {
|
|
if (!friendCheck.value) {
|
|
|
if (formState.friends.length === 0) {
|
|
if (formState.friends.length === 0) {
|
|
|
message.error('请选择朋友');
|
|
message.error('请选择朋友');
|
|
@@ -509,6 +563,9 @@ export default defineComponent({
|
|
|
getFriendLength,
|
|
getFriendLength,
|
|
|
limiteFriends,
|
|
limiteFriends,
|
|
|
getPrice,
|
|
getPrice,
|
|
|
|
|
+ spotMarkets,
|
|
|
|
|
+ handleMarket,
|
|
|
|
|
+ handlePermance,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|