|
|
@@ -78,22 +78,22 @@
|
|
|
|
|
|
<template v-if="dataForm.isRefund == '1'">
|
|
|
<div class="wrap">
|
|
|
- <div style="display: flex;align-items: center;flex-direction: row">
|
|
|
+ <div style="display: flex; align-items: center; flex-direction: row">
|
|
|
<div style="font-weight: bold">退费条件</div>
|
|
|
<el-radio-group v-model="dataForm.configType" style="margin-left: 38px">
|
|
|
<el-radio :value="0" size="large">统一退费条件</el-radio>
|
|
|
<el-radio :value="1" size="large">单独退费条件</el-radio>
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
- <div class="desc" v-show="dataForm.configType==0">
|
|
|
+ <div class="desc" v-show="dataForm.configType == 0">
|
|
|
外出超过
|
|
|
<TgInputNumber class="w50 ml2 mr2" v-model="dataForm.maximumDays" />天满足退费条件
|
|
|
其中自外出后第
|
|
|
<TgInputNumber
|
|
|
class="w50 ml2 mr2"
|
|
|
v-model="dataForm.minimumDays"
|
|
|
- :max="Number(dataForm.maximumDays)"
|
|
|
/>天,开始退费,并且返院当日
|
|
|
+ <!-- :max="Number(dataForm.maximumDays)" -->
|
|
|
<TgRadio
|
|
|
class="inline ml5"
|
|
|
v-model="dataForm.isSameDayRefund"
|
|
|
@@ -107,7 +107,7 @@
|
|
|
>
|
|
|
</TgRadio>
|
|
|
</div>
|
|
|
- <div style="height: 20px;color: transparent" v-show="dataForm.configType!=0">--</div>
|
|
|
+ <div style="height: 20px; color: transparent" v-show="dataForm.configType != 0">--</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="wrap">
|
|
|
@@ -178,11 +178,16 @@
|
|
|
style="max-width: 300px"
|
|
|
placeholder="输入金额"
|
|
|
type="number"
|
|
|
- :disabled="(scope.row.isCustom==0 || isDetail)"
|
|
|
+ :disabled="scope.row.isCustom == 0 || isDetail"
|
|
|
class="input-with-select"
|
|
|
>
|
|
|
<template #prepend>
|
|
|
- <el-select v-model="scope.row.isCustom" :disabled="isDetail" placeholder="请选择" style="width: 85px">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.isCustom"
|
|
|
+ :disabled="isDetail"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 85px"
|
|
|
+ >
|
|
|
<el-option label="启用" :value="1" />
|
|
|
<el-option label="禁用" :value="0" />
|
|
|
</el-select>
|
|
|
@@ -211,23 +216,39 @@
|
|
|
<el-table-column prop="amount" label="金额" width="200">
|
|
|
<template #default="scope">
|
|
|
<span v-if="scope.row.type == 2"
|
|
|
- ><TgInputNumber v-model="scope.row.proportion" class="w120" />%</span
|
|
|
+ ><TgInputNumber v-model="scope.row.proportion" class="w120" />%</span
|
|
|
+ >
|
|
|
+ <span v-else>
|
|
|
+ <TgInputNumber
|
|
|
+ :disabled="scope.row.type == 3"
|
|
|
+ v-model="scope.row.amount"
|
|
|
+ class="w120"
|
|
|
+ />
|
|
|
+ 元</span
|
|
|
>
|
|
|
- <span v-else> <TgInputNumber :disabled="scope.row.type==3" v-model="scope.row.amount" class="w120" /> 元</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="dataForm.configType==1" prop="amount2" label="退费条件" width="900">
|
|
|
+ <el-table-column
|
|
|
+ v-if="dataForm.configType == 1"
|
|
|
+ prop="amount2"
|
|
|
+ label="退费条件"
|
|
|
+ width="900"
|
|
|
+ >
|
|
|
<template #default="scope">
|
|
|
- <div style="display: flex;flex-direction: row;align-items: center;">
|
|
|
- <div style="height: 60px;align-items: center;display: flex;flex-direction: row">
|
|
|
+ <div style="display: flex; flex-direction: row; align-items: center">
|
|
|
+ <div
|
|
|
+ style="height: 60px; align-items: center; display: flex; flex-direction: row"
|
|
|
+ >
|
|
|
外出超过
|
|
|
- <TgInputNumber class="w50 ml2 mr2" v-model="scope.row.maximumDays" />天满足退费条件
|
|
|
- 其中自外出后第
|
|
|
+ <TgInputNumber
|
|
|
+ class="w50 ml2 mr2"
|
|
|
+ v-model="scope.row.maximumDays"
|
|
|
+ />天满足退费条件 其中自外出后第
|
|
|
<TgInputNumber
|
|
|
class="w50 ml2 mr2"
|
|
|
v-model="scope.row.minimumDays"
|
|
|
- :max="Number(scope.row.maximumDays)"
|
|
|
/>天,开始退费,并且返院当日
|
|
|
+ <!-- :max="Number(scope.row.maximumDays)" -->
|
|
|
<TgRadio
|
|
|
class="inline ml5"
|
|
|
v-model="scope.row.isSameDayRefund"
|
|
|
@@ -237,7 +258,7 @@
|
|
|
v-for="(item, index) in getIntDictOptions(DICT_TYPE.REFUND_TERMS_TYPE)"
|
|
|
:key="index"
|
|
|
:value="item.value"
|
|
|
- >{{ item.label }}</el-radio
|
|
|
+ >{{ item.label }}</el-radio
|
|
|
>
|
|
|
</TgRadio>
|
|
|
</div>
|
|
|
@@ -248,20 +269,22 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<!-- <div class="content">-->
|
|
|
-<!-- <div class="left">-->
|
|
|
-<!-- <img :src="counter" alt="" />-->
|
|
|
-<!-- <div class="column">-->
|
|
|
-<!-- <span class="text">外出退费计算器</span>-->
|
|
|
-<!-- <span>输入外出起止日期,测试一下退费金额吧。</span>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <el-button type="primary" round @click="handleTest">点击测试</el-button>-->
|
|
|
-<!-- </div>-->
|
|
|
+ <!-- <div class="content">-->
|
|
|
+ <!-- <div class="left">-->
|
|
|
+ <!-- <img :src="counter" alt="" />-->
|
|
|
+ <!-- <div class="column">-->
|
|
|
+ <!-- <span class="text">外出退费计算器</span>-->
|
|
|
+ <!-- <span>输入外出起止日期,测试一下退费金额吧。</span>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- <el-button type="primary" round @click="handleTest">点击测试</el-button>-->
|
|
|
+ <!-- </div>-->
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<el-button @click="handleClosed">关闭</el-button>
|
|
|
- <el-button v-loading="formLoading" type="primary" @click="submitForm" v-if="!isDetail">确定</el-button>
|
|
|
+ <el-button v-loading="formLoading" type="primary" @click="submitForm" v-if="!isDetail"
|
|
|
+ >确定</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
<Counter ref="counterRef" />
|
|
|
</Dialog>
|
|
|
@@ -308,7 +331,7 @@ const state = reactive<OutRefundFormType>({
|
|
|
maximumDays: undefined,
|
|
|
minimumDays: undefined,
|
|
|
items: [],
|
|
|
- tenantId: undefined,
|
|
|
+ tenantId: undefined
|
|
|
},
|
|
|
dataRule: {
|
|
|
// 表单规则
|
|
|
@@ -335,7 +358,7 @@ const open = async (tenantId, id, detail) => {
|
|
|
const res = await getOutboundRefundDetail(id)
|
|
|
dataForm.value = res
|
|
|
dataForm.value.items.map(async (item) => {
|
|
|
- getItemList(item, false,false)
|
|
|
+ getItemList(item, false, false)
|
|
|
})
|
|
|
} finally {
|
|
|
}
|
|
|
@@ -357,7 +380,7 @@ const submitForm = async () => {
|
|
|
if (item.itemId == m.itemId && index != i) {
|
|
|
result = true
|
|
|
}
|
|
|
- if(item.isCustom==1 && (item.customAmount=='')){
|
|
|
+ if (item.isCustom == 1 && item.customAmount == '') {
|
|
|
result = true
|
|
|
}
|
|
|
})
|
|
|
@@ -494,10 +517,10 @@ const getItemList = async (row, flag = true, flag2 = false) => {
|
|
|
if (row?.__isNew) {
|
|
|
row.__isNew = false
|
|
|
}
|
|
|
- const sameCategoryRows = dataForm.value.items.filter(item => item.categoryId === row.categoryId)
|
|
|
- const existingItemIdSet = new Set(
|
|
|
- sameCategoryRows.map(item => item.itemId).filter(Boolean)
|
|
|
+ const sameCategoryRows = dataForm.value.items.filter(
|
|
|
+ (item) => item.categoryId === row.categoryId
|
|
|
)
|
|
|
+ const existingItemIdSet = new Set(sameCategoryRows.map((item) => item.itemId).filter(Boolean))
|
|
|
|
|
|
// 当前行如果还没选子项:优先回填“缺失的子项”
|
|
|
if (!row.itemId) {
|