|
|
@@ -26,8 +26,7 @@
|
|
|
<Field name="DepositID" label="支付方式" :rules="formRules.DepositID" is-link
|
|
|
v-if="selectedDate?.presaleapplyid">
|
|
|
<template #input>
|
|
|
- <app-select v-model="formData.DepositID" :options="presaleApplyDeposits"
|
|
|
- @confirm="formRef?.validate('DepositID')" />
|
|
|
+ <app-select :options="presaleApplyDeposits" @confirm="onDepositChange" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
<Field label="参考价" v-if="selectedDate">
|
|
|
@@ -150,7 +149,7 @@ const deposit = computed(() => {
|
|
|
const { Qty = 0, DepositID } = formData.value
|
|
|
const { presaleapplydeposits } = details.value
|
|
|
const { unitprice = 0 } = selectedDate.value ?? {}
|
|
|
- const apply = presaleapplydeposits?.find((e) => e.depositid === DepositID) // 选中的支付方式
|
|
|
+ const apply = presaleapplydeposits?.find((e) => e.depositid === DepositID?.toString()) // 选中的支付方式
|
|
|
|
|
|
if (apply) {
|
|
|
return (unitprice * apply.depositrate * Qty).toFixed(2)
|
|
|
@@ -231,6 +230,12 @@ const onMonthChange = (value: string) => {
|
|
|
formRef.value?.validate('PresaleApplyID')
|
|
|
}
|
|
|
|
|
|
+// 切换支付方式
|
|
|
+const onDepositChange = (value: string) => {
|
|
|
+ formData.value.DepositID = Long.fromString(value)
|
|
|
+ formRef.value?.validate('DepositID')
|
|
|
+}
|
|
|
+
|
|
|
// 更新表单数据
|
|
|
const updateForm = (formValue: Proto.SpotPresaleDestingOrderReq) => {
|
|
|
formData.value = formValue
|