fix(operator): fix operator edit issue
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m51s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m51s
This commit is contained in:
@@ -242,7 +242,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取详情失败')
|
||||
console.log('获取详情失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -941,7 +941,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取套餐列表失败')
|
||||
console.log('获取套餐列表失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取详情失败')
|
||||
console.log('获取详情失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -751,7 +751,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取套餐系列列表失败')
|
||||
console.log('获取套餐系列列表失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取详情失败')
|
||||
console.log('获取详情失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -535,7 +535,7 @@
|
||||
await fetchDetail()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error(packageDialogType.value === 'add' ? '添加失败' : '更新失败')
|
||||
console.log(packageDialogType.value === 'add' ? '添加失败' : '更新失败')
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
@@ -568,7 +568,7 @@
|
||||
await fetchDetail()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('删除失败')
|
||||
console.log('删除失败')
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
|
||||
@@ -175,7 +175,11 @@
|
||||
<ElInputNumber
|
||||
v-model="packageForm.cost_price_yuan"
|
||||
:min="packageForm.original_cost_price || 0"
|
||||
:max="packageForm.original_cost_price ? packageForm.original_cost_price * 1.5 : undefined"
|
||||
:max="
|
||||
packageForm.original_cost_price
|
||||
? packageForm.original_cost_price * 1.5
|
||||
: undefined
|
||||
"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
@@ -183,8 +187,10 @@
|
||||
placeholder="请输入成本价"
|
||||
/>
|
||||
<div v-if="packageForm.original_cost_price" class="form-tip">
|
||||
原价: ¥{{ packageForm.original_cost_price.toFixed(2) }},
|
||||
最高: ¥{{ (packageForm.original_cost_price * 1.5).toFixed(2) }} (50%溢价)
|
||||
原价: ¥{{ packageForm.original_cost_price.toFixed(2) }}, 最高: ¥{{
|
||||
(packageForm.original_cost_price * 1.5).toFixed(2)
|
||||
}}
|
||||
(50%溢价)
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElForm>
|
||||
@@ -312,7 +318,9 @@
|
||||
<ElInputNumber
|
||||
v-model="pkg.cost_price"
|
||||
:min="pkg.original_cost_price || 0"
|
||||
:max="pkg.original_cost_price ? pkg.original_cost_price * 1.5 : undefined"
|
||||
:max="
|
||||
pkg.original_cost_price ? pkg.original_cost_price * 1.5 : undefined
|
||||
"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
@@ -320,7 +328,9 @@
|
||||
style="width: 150px"
|
||||
/>
|
||||
<span v-if="pkg.original_cost_price" class="min-cost-hint">
|
||||
(原价: ¥{{ pkg.original_cost_price.toFixed(2) }}, 最高: ¥{{ (pkg.original_cost_price * 1.5).toFixed(2) }})
|
||||
(原价: ¥{{ pkg.original_cost_price.toFixed(2) }}, 最高: ¥{{
|
||||
(pkg.original_cost_price * 1.5).toFixed(2)
|
||||
}})
|
||||
</span>
|
||||
</div>
|
||||
<ElButton type="danger" size="small" @click="removePackage(index)"
|
||||
@@ -345,99 +355,99 @@
|
||||
|
||||
<!-- 佣金类型和金额 - 2列布局 -->
|
||||
<ElRow :gutter="20">
|
||||
<ElCol :span="12">
|
||||
<ElFormItem label="佣金类型">
|
||||
<div class="commission-type-display">
|
||||
<ElTag
|
||||
:type="form.commission_type === 'fixed' ? 'success' : 'warning'"
|
||||
size="large"
|
||||
>
|
||||
{{ form.commission_type === 'fixed' ? '固定佣金' : '梯度佣金' }}
|
||||
</ElTag>
|
||||
<span class="type-hint">(从套餐系列配置继承)</span>
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :span="12" v-if="form.commission_type === 'fixed'">
|
||||
<ElFormItem label="佣金金额(元)" prop="one_time_commission_amount">
|
||||
<ElInputNumber
|
||||
v-model="form.one_time_commission_amount"
|
||||
:min="0"
|
||||
:max="form.series_max_commission_amount"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
placeholder="请输入固定佣金金额(元)"
|
||||
/>
|
||||
<div class="form-tip">
|
||||
该代理能获得的固定佣金金额(单位:元)
|
||||
<span class="max-amount-hint">
|
||||
<br />
|
||||
该系列最大佣金金额:
|
||||
<span class="amount-value"
|
||||
>¥{{ form.series_max_commission_amount.toFixed(2) }}</span
|
||||
<ElCol :span="12">
|
||||
<ElFormItem label="佣金类型">
|
||||
<div class="commission-type-display">
|
||||
<ElTag
|
||||
:type="form.commission_type === 'fixed' ? 'success' : 'warning'"
|
||||
size="large"
|
||||
>
|
||||
</span>
|
||||
{{ form.commission_type === 'fixed' ? '固定佣金' : '梯度佣金' }}
|
||||
</ElTag>
|
||||
<span class="type-hint">(从套餐系列配置继承)</span>
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :span="12" v-if="form.commission_type === 'fixed'">
|
||||
<ElFormItem label="佣金金额(元)" prop="one_time_commission_amount">
|
||||
<ElInputNumber
|
||||
v-model="form.one_time_commission_amount"
|
||||
:min="0"
|
||||
:max="form.series_max_commission_amount"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
placeholder="请输入固定佣金金额(元)"
|
||||
/>
|
||||
<div class="form-tip">
|
||||
该代理能获得的固定佣金金额(单位:元)
|
||||
<span class="max-amount-hint">
|
||||
<br />
|
||||
该系列最大佣金金额:
|
||||
<span class="amount-value"
|
||||
>¥{{ form.series_max_commission_amount.toFixed(2) }}</span
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
|
||||
<!-- 梯度佣金配置 -->
|
||||
<template v-if="form.commission_type === 'tiered'">
|
||||
<ElFormItem label="梯度配置" prop="commission_tiers">
|
||||
<ElTable :data="form.commission_tiers" border style="width: 100%">
|
||||
<ElTableColumn label="比较运算符" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="success">{{ row.operator || '>=' }}</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="达标阈值" width="120">
|
||||
<template #default="{ row }">
|
||||
<span class="readonly-value">{{ row.threshold }}</span>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="统计维度" width="120">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="info">
|
||||
{{ row.dimension === 'sales_count' ? '销量' : '销售额' }}
|
||||
</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="统计范围" width="140">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="warning"> 仅自己 </ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="佣金金额(元)" min-width="180">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; flex-direction: column; gap: 4px">
|
||||
<ElInputNumber
|
||||
v-model="row.amount"
|
||||
:min="0"
|
||||
:max="row.max_amount"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
placeholder="请输入佣金金额"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<span
|
||||
v-if="row.max_amount"
|
||||
style="font-size: 12px; color: var(--el-text-color-secondary)"
|
||||
>
|
||||
最大: ¥{{ row.max_amount.toFixed(2) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
</ElTable>
|
||||
<div class="form-tip" style="margin-top: 8px">
|
||||
梯度配置从套餐系列继承,达标阈值、统计维度、统计范围为只读,只能修改佣金金额
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
|
||||
<!-- 梯度佣金配置 -->
|
||||
<template v-if="form.commission_type === 'tiered'">
|
||||
<ElFormItem label="梯度配置" prop="commission_tiers">
|
||||
<ElTable :data="form.commission_tiers" border style="width: 100%">
|
||||
<ElTableColumn label="比较运算符" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="success">{{ row.operator || '>=' }}</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="达标阈值" width="120">
|
||||
<template #default="{ row }">
|
||||
<span class="readonly-value">{{ row.threshold }}</span>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="统计维度" width="120">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="info">
|
||||
{{ row.dimension === 'sales_count' ? '销量' : '销售额' }}
|
||||
</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="统计范围" width="140">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="warning"> 仅自己 </ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="佣金金额(元)" min-width="180">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; flex-direction: column; gap: 4px">
|
||||
<ElInputNumber
|
||||
v-model="row.amount"
|
||||
:min="0"
|
||||
:max="row.max_amount"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
placeholder="请输入佣金金额"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<span
|
||||
v-if="row.max_amount"
|
||||
style="font-size: 12px; color: var(--el-text-color-secondary)"
|
||||
>
|
||||
最大: ¥{{ row.max_amount.toFixed(2) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
</ElTable>
|
||||
<div class="form-tip" style="margin-top: 8px">
|
||||
梯度配置从套餐系列继承,达标阈值、统计维度、统计范围为只读,只能修改佣金金额
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- 强制充值配置 -->
|
||||
@@ -511,99 +521,99 @@
|
||||
|
||||
<!-- 佣金类型和金额 - 2列布局 -->
|
||||
<ElRow :gutter="20" v-if="form.series_id">
|
||||
<ElCol :span="12">
|
||||
<ElFormItem label="佣金类型">
|
||||
<div class="commission-type-display">
|
||||
<ElTag
|
||||
:type="form.commission_type === 'fixed' ? 'success' : 'warning'"
|
||||
size="large"
|
||||
>
|
||||
{{ form.commission_type === 'fixed' ? '固定佣金' : '梯度佣金' }}
|
||||
</ElTag>
|
||||
<span class="type-hint">(从套餐系列配置继承)</span>
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :span="12" v-if="form.commission_type === 'fixed'">
|
||||
<ElFormItem label="佣金金额(元)" prop="one_time_commission_amount">
|
||||
<ElInputNumber
|
||||
v-model="form.one_time_commission_amount"
|
||||
:min="0"
|
||||
:max="form.series_max_commission_amount"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
placeholder="请输入固定佣金金额(元)"
|
||||
/>
|
||||
<div class="form-tip">
|
||||
该代理能获得的固定佣金金额(单位:元)
|
||||
<span class="max-amount-hint">
|
||||
<br />
|
||||
该系列最大佣金金额:
|
||||
<span class="amount-value"
|
||||
>¥{{ form.series_max_commission_amount.toFixed(2) }}</span
|
||||
<ElCol :span="12">
|
||||
<ElFormItem label="佣金类型">
|
||||
<div class="commission-type-display">
|
||||
<ElTag
|
||||
:type="form.commission_type === 'fixed' ? 'success' : 'warning'"
|
||||
size="large"
|
||||
>
|
||||
</span>
|
||||
{{ form.commission_type === 'fixed' ? '固定佣金' : '梯度佣金' }}
|
||||
</ElTag>
|
||||
<span class="type-hint">(从套餐系列配置继承)</span>
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
<ElCol :span="12" v-if="form.commission_type === 'fixed'">
|
||||
<ElFormItem label="佣金金额(元)" prop="one_time_commission_amount">
|
||||
<ElInputNumber
|
||||
v-model="form.one_time_commission_amount"
|
||||
:min="0"
|
||||
:max="form.series_max_commission_amount"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
placeholder="请输入固定佣金金额(元)"
|
||||
/>
|
||||
<div class="form-tip">
|
||||
该代理能获得的固定佣金金额(单位:元)
|
||||
<span class="max-amount-hint">
|
||||
<br />
|
||||
该系列最大佣金金额:
|
||||
<span class="amount-value"
|
||||
>¥{{ form.series_max_commission_amount.toFixed(2) }}</span
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
|
||||
<!-- 梯度佣金配置 -->
|
||||
<template v-if="form.commission_type === 'tiered'">
|
||||
<ElFormItem label="梯度配置" prop="commission_tiers">
|
||||
<ElTable :data="form.commission_tiers" border style="width: 100%">
|
||||
<ElTableColumn label="比较运算符" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="success">{{ row.operator || '>=' }}</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="达标阈值" width="120">
|
||||
<template #default="{ row }">
|
||||
<span class="readonly-value">{{ row.threshold }}</span>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="统计维度" width="120">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="info">
|
||||
{{ row.dimension === 'sales_count' ? '销量' : '销售额' }}
|
||||
</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="统计范围" width="140">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="warning"> 仅自己 </ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="佣金金额(元)" min-width="180">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; flex-direction: column; gap: 4px">
|
||||
<ElInputNumber
|
||||
v-model="row.amount"
|
||||
:min="0"
|
||||
:max="row.max_amount"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
placeholder="请输入佣金金额"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<span
|
||||
v-if="row.max_amount"
|
||||
style="font-size: 12px; color: var(--el-text-color-secondary)"
|
||||
>
|
||||
最大: ¥{{ row.max_amount.toFixed(2) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
</ElTable>
|
||||
<div class="form-tip" style="margin-top: 8px">
|
||||
梯度配置从套餐系列继承,达标阈值、统计维度、统计范围为只读,只能修改佣金金额
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
|
||||
<!-- 梯度佣金配置 -->
|
||||
<template v-if="form.commission_type === 'tiered'">
|
||||
<ElFormItem label="梯度配置" prop="commission_tiers">
|
||||
<ElTable :data="form.commission_tiers" border style="width: 100%">
|
||||
<ElTableColumn label="比较运算符" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="success">{{ row.operator || '>=' }}</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="达标阈值" width="120">
|
||||
<template #default="{ row }">
|
||||
<span class="readonly-value">{{ row.threshold }}</span>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="统计维度" width="120">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="info">
|
||||
{{ row.dimension === 'sales_count' ? '销量' : '销售额' }}
|
||||
</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="统计范围" width="140">
|
||||
<template #default="{ row }">
|
||||
<ElTag size="small" type="warning"> 仅自己 </ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn label="佣金金额(元)" min-width="180">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; flex-direction: column; gap: 4px">
|
||||
<ElInputNumber
|
||||
v-model="row.amount"
|
||||
:min="0"
|
||||
:max="row.max_amount"
|
||||
:precision="2"
|
||||
:step="0.01"
|
||||
:controls="false"
|
||||
placeholder="请输入佣金金额"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<span
|
||||
v-if="row.max_amount"
|
||||
style="font-size: 12px; color: var(--el-text-color-secondary)"
|
||||
>
|
||||
最大: ¥{{ row.max_amount.toFixed(2) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
</ElTable>
|
||||
<div class="form-tip" style="margin-top: 8px">
|
||||
梯度配置从套餐系列继承,达标阈值、统计维度、统计范围为只读,只能修改佣金金额
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- 强制充值配置 -->
|
||||
@@ -835,10 +845,22 @@
|
||||
callback(new Error('请输入成本价'))
|
||||
} else if (value < 0) {
|
||||
callback(new Error('成本价不能小于0'))
|
||||
} else if (packageForm.value.original_cost_price && value < packageForm.value.original_cost_price) {
|
||||
callback(new Error(`成本价不能低于原价 ¥${packageForm.value.original_cost_price.toFixed(2)}`))
|
||||
} else if (packageForm.value.original_cost_price && value > packageForm.value.original_cost_price * 1.5) {
|
||||
callback(new Error(`成本价不能高于原价的50%溢价(最高:¥${(packageForm.value.original_cost_price * 1.5).toFixed(2)})`))
|
||||
} else if (
|
||||
packageForm.value.original_cost_price &&
|
||||
value < packageForm.value.original_cost_price
|
||||
) {
|
||||
callback(
|
||||
new Error(`成本价不能低于原价 ¥${packageForm.value.original_cost_price.toFixed(2)}`)
|
||||
)
|
||||
} else if (
|
||||
packageForm.value.original_cost_price &&
|
||||
value > packageForm.value.original_cost_price * 1.5
|
||||
) {
|
||||
callback(
|
||||
new Error(
|
||||
`成本价不能高于原价的50%溢价(最高:¥${(packageForm.value.original_cost_price * 1.5).toFixed(2)})`
|
||||
)
|
||||
)
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@@ -1470,7 +1492,9 @@
|
||||
// 从 availablePackages 中查找选中的套餐
|
||||
const selectedPackage = availablePackages.value.find((p) => p.id === packageId)
|
||||
if (selectedPackage) {
|
||||
const originalCostPrice = selectedPackage.cost_price ? selectedPackage.cost_price / 100 : 0
|
||||
const originalCostPrice = selectedPackage.cost_price
|
||||
? selectedPackage.cost_price / 100
|
||||
: 0
|
||||
packageForm.value.original_cost_price = originalCostPrice
|
||||
packageForm.value.cost_price_yuan = originalCostPrice
|
||||
}
|
||||
@@ -1501,7 +1525,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 加载搜索栏系列选项(默认加载10条)
|
||||
const loadSearchSeriesOptions = async () => {
|
||||
try {
|
||||
@@ -1661,7 +1684,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取系列分配列表失败')
|
||||
console.log('获取系列分配列表失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -1798,7 +1821,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取详情失败:', error)
|
||||
ElMessage.error('获取详情失败')
|
||||
console.log('获取详情失败')
|
||||
dialogVisible.value = false
|
||||
} finally {
|
||||
loading.value = false
|
||||
@@ -1910,7 +1933,9 @@
|
||||
// 根据佣金类型携带不同参数
|
||||
if (form.commission_type === 'fixed') {
|
||||
// 固定模式:携带 one_time_commission_amount(将元转换为分)
|
||||
data.one_time_commission_amount = Math.round((form.one_time_commission_amount || 0) * 100)
|
||||
data.one_time_commission_amount = Math.round(
|
||||
(form.one_time_commission_amount || 0) * 100
|
||||
)
|
||||
} else if (form.commission_type === 'tiered') {
|
||||
// 梯度模式:携带 commission_tiers(将元转换为分)
|
||||
// 注意:请求时不传 operator,operator 是响应中从 PackageSeries 合并过来的
|
||||
@@ -2013,7 +2038,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取套餐列表失败:', error)
|
||||
ElMessage.error('获取套餐列表失败')
|
||||
console.log('获取套餐列表失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -2128,7 +2153,7 @@
|
||||
await refreshPackageList()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error(packageDialogType.value === 'add' ? '添加失败' : '更新失败')
|
||||
console.log(packageDialogType.value === 'add' ? '添加失败' : '更新失败')
|
||||
} finally {
|
||||
packageSubmitLoading.value = false
|
||||
}
|
||||
@@ -2161,7 +2186,7 @@
|
||||
await refreshPackageList()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('删除失败')
|
||||
console.log('删除失败')
|
||||
} finally {
|
||||
packageSubmitLoading.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user