feat:自定义额外支付

This commit is contained in:
dzc committed 2025-05-15 16:10:24 +08:00
1 parent 71a67191c4
commit a2234e8e18
4 files changed
+13 -14

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
<template>
<div class="size-full">
<div class="size-full flex justify-start">
<div class="size-full flex justify-start flex-wrap" v-if="detail.rulePriceType == 10">
<span class="color-primary">{{ detail.sourceMchName ? detail.sourceMchName : "???" }}</span>
<span>到</span>
<span class="color-primary">{{ detail.targetMchName ? detail.targetMchName : "???" }}</span>
@@ -9,7 +9,7 @@
<span>额外支付</span>
<span class="color-danger">{{ detail.multiple ? detail.multiple : "???" }}%</span>
</div>
<div class="size-full flex justify-start" v-if="detail.rulePriceType == 20">
<div class="size-full flex justify-start flex-wrap" v-if="detail.rulePriceType == 20">
<span class="color-primary">{{ detail.sourceMchName ? detail.sourceMchName : "???" }}</span>
<span>每餐消费超过</span>
<span class="color-success">{{ detail.basePrice ? displayPrice(detail.basePrice) : "???" }}</span>
@@ -9,12 +9,12 @@
</el-col>
<el-col :span="24" class="mb20">
<el-form-item label="源商户" prop="sourceMchId">
<select-mch disabled v-model="form.sourceMchId" :apiParams="{ types: '1' }" />
<select-mch v-model="form.sourceMchId" :apiParams="{ types: '1', notIds: [form.targetMchId] }" />
</el-form-item>
</el-col>
<el-col :span="24" class="mb20">
<el-form-item label="目标商户" prop="targetMchId">
<select-mch v-model="form.targetMchId" autoFirst :apiParams="{ types: '1', notIds: [form.sourceMchId] }" />
<select-mch disabled v-model="form.targetMchId" :apiParams="{ types: '1' }" />
</el-form-item>
</el-col>
<el-col :span="24" class="mb20">
@@ -72,12 +72,10 @@ const dataRules = ref({
})
// 打开弹窗
const openDialog = (id: string, sourceMchId: string) => {
const openDialog = (id: string, targetMchId: string) => {
visible.value = true
Object.assign(form, defaultForm)
if (sourceMchId) {
form.sourceMchId = sourceMchId
}
if (targetMchId) form.targetMchId = targetMchId
// 重置表单数据
nextTick(() => {
dataFormRef.value?.resetFields()
+6 -5
View File
@@ -51,11 +51,12 @@
type="primary"
v-auth="'dzc_walletRuleMchConfig_edit'"
@click="WalletRuleMchConfigFormDialogRef.openDialog(row.id)"
>编辑</el-button
>
<el-button icon="delete" text type="primary" v-auth="'dzc_walletRuleMchConfig_del'" @click="handleDelete([row.id])"
>删除</el-button
>
编辑
</el-button>
<el-button icon="delete" text type="primary" v-auth="'dzc_walletRuleMchConfig_del'" @click="handleDelete([row.id])">
删除
</el-button>
</template>
</el-table-column>
</el-table>
@@ -139,7 +140,7 @@ const handleDelete = async (ids: string[]) => {
}
onMounted(() => {
state.queryForm.sourceMchId = props.sourceMchId
state.queryForm.targetMchId = props.sourceMchId
getDataList()
})
</script>
+1 -1
View File
@@ -1,5 +1,5 @@
<template>
<el-dialog width="70%" v-model="visible" :close-on-click-modal="false" @closed="dialogClosed" draggable>
<el-dialog width="80%" v-model="visible" :close-on-click-modal="false" @closed="dialogClosed" draggable>
<div>
<el-tabs v-model="form.activeTab" class="demo-tabs">
<div v-for="v in data.tabList" :key="v.id">