|
|
@@ -8,8 +8,15 @@
|
|
|
<Form ref="formRef" class="g-form__container" @submit="formSubmit">
|
|
|
<CellGroup inset>
|
|
|
<!-- 错误 #6595 已签约状态的签约信息,修改时应限制修改银行渠道 -->
|
|
|
- <Field v-if="bankInfo?.signstatus === 4 && selectCusBank" :label="$t('banksign.bankchannel')" v-model="selectCusBank.cusbankname" name="cusBankName" :rules="formRules.CusBankID" readonly />
|
|
|
- <Field :label="$t('banksign.bankchannel')" v-model="cusBankName" :placeholder="$t('banksign.tips16')" name="cusBankName" :rules="formRules.CusBankID" @click-input="showCusBank = true" is-link v-else />
|
|
|
+ <Field v-if="bankInfo?.signstatus === 4 && selectCusBank" :label="$t('banksign.bankchannel')"
|
|
|
+ v-model="selectCusBank.cusbankname" readonly />
|
|
|
+ <Field :label="$t('banksign.bankchannel')" :placeholder="$t('banksign.tips16')" name="CusBankID"
|
|
|
+ :rules="formRules.CusBankID" is-link v-else>
|
|
|
+ <template #input>
|
|
|
+ <app-select v-model="formData.CusBankID" :options="cusBanks"
|
|
|
+ :optionProps="{ label: 'cusbankname', value: 'cusbankid' }" @confirm="cusBankChange" />
|
|
|
+ </template>
|
|
|
+ </Field>
|
|
|
<!-- <Field name="OpenBankAccId" :label="$t('banksign.bankname')" v-model="formData.ExBankName" readonly
|
|
|
v-if="!isedit && userInfo.bankid" />
|
|
|
<Field name="OpenBankAccId" :label="$t('banksign.bankname')" v-model="formData.ExBankName"
|
|
|
@@ -68,16 +75,6 @@
|
|
|
:placeholder="$t('common.pleaseenter') + `${item.fieldname}`" />
|
|
|
</template>
|
|
|
</template>
|
|
|
- <Popup v-model:show="showCusBank" position="bottom" teleport="body" round>
|
|
|
- <Picker :columns="datalist" @cancel="showCusBank = false" @confirm="cusBankChange"
|
|
|
- :confirm-button-text="$t('operation.confirm')" :cancel-button-text="$t('operation.cancel')">
|
|
|
- <template #option="{ text, index }">
|
|
|
- <slot name="option" :row="datalist[index]" :index="index">
|
|
|
- <span>{{ text }}</span>
|
|
|
- </slot>
|
|
|
- </template>
|
|
|
- </Picker>
|
|
|
- </Popup>
|
|
|
</CellGroup>
|
|
|
</Form>
|
|
|
<template #footer>
|
|
|
@@ -101,6 +98,7 @@ import { validateRules } from '@/constants/regex'
|
|
|
import { useCountDown } from '@vant/use'
|
|
|
import { useUserStore, i18n } from '@/stores'
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
+import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
|
|
|
const props = defineProps({
|
|
|
isedit: {
|
|
|
@@ -120,33 +118,19 @@ const refresh = shallowRef(false) // 是否刷新父组件数据
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
const showSelect = shallowRef(false) // 弹出客户选择界面
|
|
|
const showSearch = shallowRef(false) // 弹出客户搜索界面
|
|
|
-const showCusBank = shallowRef(false) // 弹出银行渠道
|
|
|
const { configs } = useDoCusBankExtendConfigs(1)
|
|
|
const userStore = useUserStore()
|
|
|
const { userInfo } = userStore.$toRefs()
|
|
|
-const cusBankName = shallowRef('')
|
|
|
|
|
|
const { global: { t } } = i18n
|
|
|
|
|
|
-const datalist = computed(() => {
|
|
|
- return cusBanks.value.map(e => {
|
|
|
- return { text: e.cusbankname, value: e.cusbankid }
|
|
|
- })
|
|
|
-})
|
|
|
+const cusBankChange = () => {
|
|
|
+ // 清空银行信息
|
|
|
+ formData.ExBankName = undefined
|
|
|
+ formData.OpenBankAccId = undefined
|
|
|
|
|
|
-const cusBankChange = ({ selectedOptions }) => {
|
|
|
-
|
|
|
- if (selectedOptions[0].value != formData.CusBankID) {
|
|
|
- // 清空银行信息
|
|
|
- formData.ExBankName = undefined
|
|
|
- formData.OpenBankAccId = undefined
|
|
|
- }
|
|
|
-
|
|
|
- showCusBank.value = false
|
|
|
- formData.CusBankID = selectedOptions[0].value
|
|
|
selectCusBank.value = cusBanks.value.find(e => e.cusbankid === formData.CusBankID)
|
|
|
- const { tradedate, currency, cusbankid, cusbankname } = selectCusBank.value ?? {}
|
|
|
- cusBankName.value = cusbankname ?? ''
|
|
|
+ const { tradedate, currency, cusbankid } = selectCusBank.value ?? {}
|
|
|
|
|
|
formData.TradeDate = tradedate
|
|
|
formData.Currency = currency
|
|
|
@@ -157,6 +141,8 @@ const cusBankChange = ({ selectedOptions }) => {
|
|
|
|
|
|
swsFormData.CusBankID = cusbankid
|
|
|
swsFormData.TradeDate = tradedate
|
|
|
+
|
|
|
+ formRef.value?.validate('CusBankID')
|
|
|
}
|
|
|
|
|
|
// 银行列表
|
|
|
@@ -230,7 +216,6 @@ const onSearchBankChange = (item: Model.BankBranChnumInfoRsp) => {
|
|
|
const formRules: { [key: string]: FieldRule[] } = {
|
|
|
CusBankID: [{
|
|
|
message: t('banksign.tips16'),
|
|
|
- required: true,
|
|
|
validator: () => {
|
|
|
return !!formData.CusBankID
|
|
|
}
|
|
|
@@ -328,7 +313,6 @@ watch(configs, (data) => {
|
|
|
onMounted(() => {
|
|
|
// 任务 #6605
|
|
|
if (formData.CusBankID) {
|
|
|
- cusBankName.value = bankInfo.value?.cusbankname ?? ''
|
|
|
formData.CusBankID = bankInfo.value?.cusbankid
|
|
|
}
|
|
|
})
|