增加建立新版本

This commit is contained in:
wuweihua
2026-10-28 21:42:45 +08:00
parent 00a690abe9
commit 1eb0e45513
8 changed files with 109 additions and 28 deletions
@@ -12,10 +12,16 @@ export const SET_TYPE = {
DISCOUNT: 'DISCOUNT'
}
/** Version create-price mode */
/**
* Version create-price mode
* PULL: from product library
* IMPORT: Excel + preload latest prior version
* IMPORT_FRESH: Excel only, no prior version data
*/
export const PRICE_BUILD_MODE = {
PULL: 'PULL',
IMPORT: 'IMPORT'
IMPORT: 'IMPORT',
IMPORT_FRESH: 'IMPORT_FRESH'
}
export function isPullBuildMode(mode) {
@@ -26,6 +32,15 @@ export function isImportBuildMode(mode) {
return mode === PRICE_BUILD_MODE.IMPORT
}
export function isImportFreshBuildMode(mode) {
return mode === PRICE_BUILD_MODE.IMPORT_FRESH
}
/** Either Excel mode (with or without prior version) */
export function isExcelBuildMode(mode) {
return isImportBuildMode(mode) || isImportFreshBuildMode(mode)
}
/** 套餐状态枚举:D 待启用 / A 审核中 / E 生效 / R 驳回 / S 已停用 */
export const SET_STATUS = {
DRAFT: 'D',