增加导出功能

This commit is contained in:
wuweihua
2026-10-21 18:06:21 +08:00
parent c04191c316
commit 92000956fc
15 changed files with 1181 additions and 21 deletions
-19
View File
@@ -27,7 +27,6 @@
<div class="wizard-actions">
<el-button @click="goBack">取消</el-button>
<el-button v-if="showBasic" type="info" :loading="saving" @click="saveDraft">保存</el-button>
<el-button type="primary" :loading="creating" @click="finishEdit">完成</el-button>
</div>
@@ -67,7 +66,6 @@ const route = useRoute()
const refData = usePriceSetRefData()
const saving = ref(false)
const creating = ref(false)
const progressVisible = ref(false)
const progressPercent = ref(0)
@@ -248,23 +246,6 @@ async function finishEdit() {
}
}
/** Persist basic draft (no detail wipe). */
async function saveDraft() {
const validBasic = await basicRef.value.validate()
if (!validBasic) return
saving.value = true
try {
const priceSetId = await runSaveWithProgress(buildPayload())
form.priceSetId = priceSetId
proxy.$modal.msgSuccess('已保存(待启用),套餐ID=' + priceSetId)
goBack()
} catch (e) {
// surfaced
} finally {
saving.value = false
}
}
function buildPayload(opts = {}) {
const { basic, version } = form
const detailRows = form.details.filter(d => d && d.productCode)