增加专属报价功能
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
plain
|
||||
size="small"
|
||||
:disabled="hasDraft"
|
||||
v-hasPermi="['price:set:add']"
|
||||
v-hasPermi="addPerm"
|
||||
@click="emit('create-version')"
|
||||
>新建价格版本</el-button>
|
||||
</template>
|
||||
@@ -50,14 +50,14 @@
|
||||
link
|
||||
type="success"
|
||||
@click="emit('activate', row)"
|
||||
v-hasPermi="['price:set:edit']"
|
||||
v-hasPermi="editPerm"
|
||||
>启动</el-button>
|
||||
<el-button
|
||||
v-if="isPendingVersion(row)"
|
||||
link
|
||||
type="primary"
|
||||
@click="emit('reschedule', row)"
|
||||
v-hasPermi="['price:set:edit']"
|
||||
v-hasPermi="editPerm"
|
||||
>修改生效时间</el-button>
|
||||
<el-button
|
||||
v-if="isDraftVersion(row) || isPendingVersion(row) || isEffectVersion(row)"
|
||||
@@ -66,7 +66,7 @@
|
||||
:loading="isRemoving(row)"
|
||||
:disabled="removingPsvId != null"
|
||||
@click="emit('remove', row)"
|
||||
v-hasPermi="['price:set:edit']"
|
||||
v-hasPermi="editPerm"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -78,6 +78,11 @@
|
||||
import SetSectionCard from './SetSectionCard.vue'
|
||||
import { versionStatusLabel, versionStatusTag, isDraftVersion, isPendingVersion, isEffectVersion, isPriceEditableVersion } from '../../utils/priceSet'
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
import { usePriceSetModule, usePriceSetPerm } from '../../composables/usePriceSetModule'
|
||||
|
||||
const mod = usePriceSetModule()
|
||||
const addPerm = usePriceSetPerm('add')
|
||||
const editPerm = usePriceSetPerm('edit')
|
||||
|
||||
const props = defineProps({
|
||||
versions: { type: Array, default: () => [] },
|
||||
@@ -164,8 +169,8 @@ function detailCount(row) {
|
||||
}
|
||||
|
||||
function showEditButton(row) {
|
||||
if (checkPermi(['price:set:forceEdit'])) return true
|
||||
return isPriceEditableVersion(row) && checkPermi(['price:set:edit'])
|
||||
if (checkPermi([mod.permPrefix + ':forceEdit'])) return true
|
||||
return isPriceEditableVersion(row) && checkPermi([mod.permPrefix + ':edit'])
|
||||
}
|
||||
|
||||
function isRemoving(row) {
|
||||
|
||||
Reference in New Issue
Block a user