修改套餐规则
This commit is contained in:
@@ -63,9 +63,11 @@
|
||||
v-hasPermi="['price:set:edit']"
|
||||
>修改生效时间</el-button>
|
||||
<el-button
|
||||
v-if="isDraftVersion(row) || isPendingVersion(row)"
|
||||
v-if="isDraftVersion(row) || isPendingVersion(row) || isEffectVersion(row)"
|
||||
link
|
||||
type="danger"
|
||||
:loading="isRemoving(row)"
|
||||
:disabled="removingPsvId != null"
|
||||
@click="emit('remove', row)"
|
||||
v-hasPermi="['price:set:edit']"
|
||||
>删除</el-button>
|
||||
@@ -77,12 +79,13 @@
|
||||
|
||||
<script setup name="SetVersionTable">
|
||||
import SetSectionCard from './SetSectionCard.vue'
|
||||
import { versionStatusLabel, versionStatusTag, isDraftVersion, isPendingVersion, isPriceEditableVersion } from '../../utils/priceSet'
|
||||
import { versionStatusLabel, versionStatusTag, isDraftVersion, isPendingVersion, isEffectVersion, isPriceEditableVersion } from '../../utils/priceSet'
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
|
||||
const props = defineProps({
|
||||
versions: { type: Array, default: () => [] },
|
||||
modelValue: { type: [Number, String], default: undefined }
|
||||
modelValue: { type: [Number, String], default: undefined },
|
||||
removingPsvId: { type: [Number, String], default: null }
|
||||
})
|
||||
const emit = defineEmits(['update:modelValue', 'create-version', 'open-details', 'view-import-attach', 'activate', 'reschedule', 'edit', 'remove'])
|
||||
|
||||
@@ -134,6 +137,10 @@ function showEditButton(row) {
|
||||
return isPriceEditableVersion(row) && checkPermi(['price:set:edit'])
|
||||
}
|
||||
|
||||
function isRemoving(row) {
|
||||
return props.removingPsvId != null && row && String(props.removingPsvId) === String(row.psvId)
|
||||
}
|
||||
|
||||
function openDetails(row) {
|
||||
if (!row || row.psvId == null) return
|
||||
emit('update:modelValue', row.psvId)
|
||||
|
||||
Reference in New Issue
Block a user