优化套餐新建版本的逻辑
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
:live-persist="livePersist"
|
||||
:build-mode-dirty="buildModeDirty"
|
||||
:build-mode-ready="pageReady"
|
||||
:show-import-inherit="showImportInherit"
|
||||
:header-title="detailsHeaderTitle"
|
||||
/>
|
||||
</div>
|
||||
@@ -82,6 +83,8 @@ const deferPersist = computed(() => copyMode.value || newVersionMode.value)
|
||||
const showBasic = computed(() => !deferPersist.value && String(route.query.step || '') !== '2')
|
||||
/** Edit existing version: live PUT/pull/import. New create / copy / newVersion: defer until finish. */
|
||||
const livePersist = computed(() => !!form.priceSetId && !deferPersist.value)
|
||||
/** Brand-new package has no prior version — hide IMPORT inherit card. */
|
||||
const showImportInherit = computed(() => newVersionMode.value || copyMode.value)
|
||||
|
||||
const detailsHeaderTitle = '编辑产品价格'
|
||||
|
||||
@@ -382,7 +385,7 @@ function onPriceBuildModeUpdate(mode) {
|
||||
proxy.$modal.msgSuccess("已拉取产品列表,可继续编辑价格")
|
||||
}).catch(() => {})
|
||||
})
|
||||
} else if (mode === 'IMPORT') {
|
||||
} else if (mode === 'IMPORT' && showImportInherit.value) {
|
||||
nextTick(async () => {
|
||||
// newVersion/copy: wait until loadExisting fills priceSetId
|
||||
const qid = route.query.priceSetId
|
||||
@@ -397,7 +400,7 @@ function onPriceBuildModeUpdate(mode) {
|
||||
return
|
||||
}
|
||||
if (!form.priceSetId) {
|
||||
proxy.$modal.msgSuccess("新建套餐无历史版本可带出,请直接导入 Excel 建价")
|
||||
proxy.$modal.msgSuccess("请直接导入 Excel 建价")
|
||||
return
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user