|
|
@@ -109,13 +109,14 @@
|
|
|
<a-form-item label="指定朋友"
|
|
|
class="inputIconBox">
|
|
|
<span class="clickBox"
|
|
|
- @click="openFriend">{{frineds ? `已选${frineds.length}人` : '选择朋友'}}</span>
|
|
|
+ @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">不限</a-checkbox>
|
|
|
+ <a-checkbox class="commonCheckbox"
|
|
|
+ v-model:checked="friendCheck" @change="limiteFriends">不限</a-checkbox>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
@@ -264,7 +265,16 @@ const useFriends = (formState: UnwrapRef<FormParam>) => {
|
|
|
function openFriend() {
|
|
|
showFriend.value = true;
|
|
|
}
|
|
|
- return { friendCheck, showFriend, chooseFriend, openFriend };
|
|
|
+ function getFriendLength() {
|
|
|
+ return formState.friends.length;
|
|
|
+ }
|
|
|
+ // 是否 不限好友
|
|
|
+ function limiteFriends() {
|
|
|
+ if(friendCheck.value) {
|
|
|
+ formState.friends.length = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends };
|
|
|
};
|
|
|
|
|
|
// 履约模板
|
|
|
@@ -298,7 +308,7 @@ export default defineComponent({
|
|
|
// 表单
|
|
|
const { rules, formState, formRef } = handleForm();
|
|
|
// 选择朋友
|
|
|
- const { friendCheck, showFriend, chooseFriend, openFriend } = useFriends(formState);
|
|
|
+ const { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends } = useFriends(formState);
|
|
|
// 履约模板
|
|
|
const { showPermance, choosePermance, openPermance } = usePermaceTemp(formState);
|
|
|
const loading = ref<boolean>(false);
|
|
|
@@ -333,7 +343,7 @@ export default defineComponent({
|
|
|
// WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
|
|
|
WRFactorTypeId: props.selectedRow.wrfactortypeid ? props.selectedRow.wrfactortypeid : 0, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
|
|
|
IsSpecified: 1, // 是否指定对手 0:不指定 1:指定 uint32
|
|
|
- MatchUserIDs: friendCheck.value ? [] : res.friends, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
|
|
|
+ MatchUserIDs: res.friends, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
|
|
|
OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
|
|
|
DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID // 有仓单求购
|
|
|
WRPriceType: 1, // 价格方式 1:固定价 2:浮动价
|
|
|
@@ -398,9 +408,12 @@ export default defineComponent({
|
|
|
numCheck,
|
|
|
increaseNumber,
|
|
|
decreaseNumber,
|
|
|
+ friendCheck,
|
|
|
showFriend,
|
|
|
chooseFriend,
|
|
|
openFriend,
|
|
|
+ getFriendLength,
|
|
|
+ limiteFriends,
|
|
|
};
|
|
|
},
|
|
|
});
|