mirror of
https://gitee.com/bootx/dax-pay-ui
synced 2026-08-04 12:36:21 +08:00
style 界面调整
This commit is contained in:
@@ -22,7 +22,11 @@
|
||||
<a-input v-model:value="form.id" :disabled="showable" />
|
||||
</a-form-item>
|
||||
<a-form-item label="接收方编号" validate-first name="receiverNo">
|
||||
<a-input v-model:value="form.receiverNo" :disabled="!addable" placeholder="请输入接收方编号" />
|
||||
<a-input
|
||||
v-model:value="form.receiverNo"
|
||||
:disabled="!addable"
|
||||
placeholder="请输入接收方编号"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="所属通道" name="channel">
|
||||
<a-select
|
||||
@@ -44,14 +48,22 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="接收方账号" name="receiverAccount">
|
||||
<a-input v-model:value="form.receiverAccount" :disabled="!addable" placeholder="请输入接收方账号">
|
||||
<a-input
|
||||
v-model:value="form.receiverAccount"
|
||||
:disabled="!addable"
|
||||
placeholder="请输入接收方账号"
|
||||
>
|
||||
<template v-if="['open_id'].includes(form.receiverType as string) && addable" #suffix>
|
||||
<icon icon="ant-design:qrcode-outlined" @click="showQrCode" />
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="接收方姓名" name="receiverName">
|
||||
<a-input v-model:value="form.receiverName" :disabled="!addable" placeholder="请输入接收方姓名" />
|
||||
<a-input
|
||||
v-model:value="form.receiverName"
|
||||
:disabled="!addable"
|
||||
placeholder="请输入接收方姓名"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="分账关系类型" name="relationType">
|
||||
<a-select
|
||||
@@ -62,27 +74,50 @@
|
||||
placeholder="请选择分账关系类型"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item v-if="form.relationType === 'custom'" label="接收者关系名称" name="relationName">
|
||||
<a-input v-model:value="form.relationName" :disabled="!addable" placeholder="请输入接收者关系名称" />
|
||||
<a-form-item
|
||||
v-if="form.relationType === 'custom'"
|
||||
label="接收者关系名称"
|
||||
name="relationName"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="form.relationName"
|
||||
:disabled="!addable"
|
||||
placeholder="请输入接收者关系名称"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<template #footer>
|
||||
<a-space>
|
||||
<a-button key="cancel" @click="handleCancel">取消</a-button>
|
||||
<a-button v-if="!showable" key="forward" :loading="confirmLoading" type="primary" @click="handleOk">保存</a-button>
|
||||
<a-button
|
||||
v-if="!showable"
|
||||
key="forward"
|
||||
:loading="confirmLoading"
|
||||
type="primary"
|
||||
@click="handleOk"
|
||||
>保存</a-button
|
||||
>
|
||||
</a-space>
|
||||
</template>
|
||||
<open-id-qr-code ref="openIdQrCode" @close="pauseFun" />
|
||||
<open-id-qr-code ref="openIdQrCode" @close="pauseFun" />
|
||||
</basic-modal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import useFormEdit from '@/hooks/bootx/useFormEdit'
|
||||
import { useMessage } from '@/hooks/web/useMessage'
|
||||
import {computed, nextTick, ref} from 'vue'
|
||||
import { computed, nextTick, ref } from 'vue'
|
||||
import { FormInstance, Rule } from 'ant-design-vue/lib/form'
|
||||
import { add, get, AllocReceiver, update, findChannels, findReceiverTypeByChannel, existsByNo } from './AllocationReceiver.api'
|
||||
import {
|
||||
add,
|
||||
get,
|
||||
AllocReceiver,
|
||||
update,
|
||||
findChannels,
|
||||
findReceiverTypeByChannel,
|
||||
existsByNo,
|
||||
} from './AllocationReceiver.api'
|
||||
import { FormEditType } from '@/enums/formTypeEnum'
|
||||
import { BasicModal } from '@/components/Modal'
|
||||
import { useDict } from '@/hooks/bootx/useDict'
|
||||
@@ -128,7 +163,9 @@
|
||||
receiverType: [{ required: true, message: '请选择分账接收方类型' }],
|
||||
receiverAccount: [{ required: true, message: '请输入接收方账号' }],
|
||||
relationType: [{ required: true, message: '请选择分账关系类型' }],
|
||||
relationName: [{ required: form.value.relationType === 'custom', message: '请输入类型关系名称' }],
|
||||
relationName: [
|
||||
{ required: form.value.relationType === 'custom', message: '请输入类型关系名称' },
|
||||
],
|
||||
} as Record<string, Rule[]>
|
||||
})
|
||||
|
||||
@@ -176,7 +213,9 @@
|
||||
* 通道变动
|
||||
*/
|
||||
function channelChange() {
|
||||
findReceiverTypeByChannel(form.value.channel).then(({ data }) => (receiverTypeList.value = data))
|
||||
findReceiverTypeByChannel(form.value.channel).then(
|
||||
({ data }) => (receiverTypeList.value = data),
|
||||
)
|
||||
form.value.receiverType = undefined
|
||||
}
|
||||
|
||||
@@ -190,7 +229,10 @@
|
||||
if (formEditType.value === FormEditType.Add) {
|
||||
await add(form.value)
|
||||
} else if (formEditType.value === FormEditType.Edit) {
|
||||
await update({ ...form.value, ...diffForm(rawForm.value, form.value, 'receiverAccount', 'receiverName') })
|
||||
await update({
|
||||
...form.value,
|
||||
...diffForm(rawForm.value, form.value, 'receiverAccount', 'receiverName'),
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
confirmLoading.value = false
|
||||
@@ -209,8 +251,8 @@
|
||||
* 校验编码重复
|
||||
*/
|
||||
async function validateCode() {
|
||||
const { receiverNo,appId } = form.value
|
||||
const res = await existsByNo(receiverNo,appId)
|
||||
const { receiverNo, appId } = form.value
|
||||
const res = await existsByNo(receiverNo, appId)
|
||||
return res.data ? Promise.reject('该接收方编号已经存在') : Promise.resolve()
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
<a-modal :open="visible" title="扫码获取OpenId" @cancel="handleClose" :footer="null" :width="300">
|
||||
<div style="display: flex; flex-direction: column; align-items: center; padding: 20px 0">
|
||||
<qr-code :options="{ margin: 0 }" :width="250" :value="qrUrl" />
|
||||
<div class="mt-15px mb-15px" style="display: flex; flex-direction: row; align-items: center; justify-content: center">
|
||||
<div
|
||||
class="mt-15px mb-15px"
|
||||
style="display: flex; flex-direction: row; align-items: center; justify-content: center"
|
||||
>
|
||||
{{ bottomTitle }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,7 +14,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import QrCode from '@/components/Qrcode/src/Qrcode.vue'
|
||||
import {ref} from "vue";
|
||||
import { ref } from 'vue'
|
||||
|
||||
let visible = ref(false)
|
||||
let qrUrl = ref('')
|
||||
@@ -23,8 +26,8 @@
|
||||
*/
|
||||
function init(url, title) {
|
||||
visible.value = true
|
||||
qrUrl = url
|
||||
bottomTitle = title
|
||||
qrUrl.value = url
|
||||
bottomTitle.value = title
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -62,7 +62,11 @@
|
||||
<a-textarea v-model:value="form.extraParam" :rows="3" placeholder="请输入支付扩展参数" />
|
||||
</a-form-item>
|
||||
<a-form-item label="商户扩展参数" name="attach">
|
||||
<a-textarea v-model:value="form.attach" :rows="3" placeholder="请输入商户扩展参数" />
|
||||
<a-textarea
|
||||
v-model:value="form.attach"
|
||||
:rows="3"
|
||||
placeholder="请输入商户扩展参数, 会原样回调返回"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="异步通知地址" name="notifyUrl">
|
||||
<a-input v-model:value="form.notifyUrl" placeholder="请输入异步通知地址" />
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
* 分账配置
|
||||
*/
|
||||
function showAllocConfig(record) {
|
||||
// TODO
|
||||
createMessage.warn('暂未开放')
|
||||
}
|
||||
/**
|
||||
* 分账接收方
|
||||
|
||||
@@ -104,7 +104,9 @@
|
||||
const { dictConvert } = useDict()
|
||||
|
||||
let order = ref<PayOrder>({})
|
||||
// 入口
|
||||
/**
|
||||
* 入口
|
||||
*/
|
||||
async function init(orderNo: string) {
|
||||
visible.value = true
|
||||
confirmLoading.value = true
|
||||
|
||||
Reference in New Issue
Block a user