增加一个打单功能套餐

This commit is contained in:
wuweihua
2026-11-09 23:00:48 +08:00
parent 2632e5aa78
commit 16afa0d590
30 changed files with 3418 additions and 132 deletions
@@ -40,9 +40,9 @@
<template #col-termStatus="{ row }">
<el-switch
v-if="row.termId"
:model-value="row.termStatus === '1' ? '1' : '0'"
active-value="0"
inactive-value="1"
:model-value="row.termStatus === '1' ? '1' : '2'"
active-value="1"
inactive-value="2"
inline-prompt
active-text="生效"
inactive-text="失效"
@@ -87,9 +87,9 @@
<template #default="{ row }">
<el-switch
v-if="row.termId"
:model-value="row.status === '1' ? '1' : '0'"
active-value="0"
inactive-value="1"
:model-value="row.status === '1' ? '1' : '2'"
active-value="1"
inactive-value="2"
inline-prompt
active-text="生效"
inactive-text="失效"
@@ -385,11 +385,12 @@ function saveTerm() {
}
function changeStatus(row, field, status) {
if (!row?.termId || (status !== '0' && status !== '1') || row[field] === status) return
// pay_product_term.status:0待生效 1生效 2已失效;开关只在 生效/已失效 间切换
if (!row?.termId || (status !== '1' && status !== '2') || row[field] === status) return
const previous = row[field]
row[field] = status
changePayTermStatus({ termId: row.termId, productId: row.productId, status }).then(() => {
proxy.$modal.msgSuccess(status === '0' ? '已设为生效' : '已设为失效')
proxy.$modal.msgSuccess(status === '1' ? '已设为生效' : '已设为失效')
tableRef.value.refresh()
if (historyVisible.value) loadHistory()
}).catch(() => {