增加模版

This commit is contained in:
wuweihua
2026-10-22 14:46:52 +08:00
parent c064d925ca
commit f07386f4aa
16 changed files with 1129 additions and 26 deletions
@@ -103,7 +103,7 @@
:title="titleAll"
width="560px"
:show-update-support="false"
template-url="/templates/product/product-import-all-template.xlsx"
:template-file-code="tplCodeAll"
:template-file-name="tplAll"
:import-desc="allImportDesc"
:file-limit="5"
@@ -117,7 +117,7 @@
:show-update-support="false"
:before-submit="validateCountryImport"
:import-desc="countryImportDesc"
template-url="/templates/product/product-import-country-template.xlsx"
:template-file-code="tplCodeCountry"
:template-file-name="tplCtry"
:file-limit="5"
:submit-handler="runImportCountry"
@@ -207,8 +207,14 @@ const labCountry = '目的国家'
const labPickCountry = '请选择国家'
const labImporting = '正在导入'
const labSaving = '正在保存'
const tplAll = '产品多国家价表导入模板'
const tplCtry = '产品按国家导入模板'
const tplAll = computed(() => (props.kind === 'product'
? '产品多国家价表导入模板'
: '红线价多国导入模板'))
const tplCtry = computed(() => (props.kind === 'product'
? '产品按国家导入模板'
: '红线价单国导入模板'))
const tplCodeAll = computed(() => (props.kind === 'product' ? 'PRODUCT_ALL' : 'REDLINE_ALL'))
const tplCodeCountry = computed(() => (props.kind === 'product' ? 'PRODUCT_COUNTRY' : 'REDLINE_COUNTRY'))
const titleAll = props.kind === 'product' ? '产品 Excel 导入' : '红线价 Excel 导入'
const titleCtry = '按国家导入'
const headerTitle = props.kind === 'product' ? '编辑产品价格' : '编辑红线价'
+10 -3
View File
@@ -170,6 +170,7 @@
title="批量修改计费重"
width="520px"
action="/price/billing/bill/chargeWeight/importData"
template-file-code="CHARGE_WEIGHT"
template-file-name="批量修改计费重导入模板"
:show-update-support="false"
:import-desc="chargeWeightImportDesc"
@@ -641,10 +642,16 @@ function buildChargeWeightTemplateQuery() {
async function downloadChargeWeightImportTemplate() {
const payload = buildChargeWeightTemplateQuery()
if (payload.fillByFilter && !hasBatchFeeQuery(tableRef.value?.getQueryParams?.() || {})) {
throw new Error('请先设置列表筛选条件')
// Checked: backend fills orderNos from list filters. Unchecked: OSS template CHARGE_WEIGHT.
if (payload.fillByFilter) {
if (!hasBatchFeeQuery(tableRef.value?.getQueryParams?.() || {})) {
throw new Error('请先设置列表筛选条件')
}
await downloadChargeWeightTemplate(payload)
return
}
await downloadChargeWeightTemplate(payload)
const { downloadFileTemplate } = await import('@/api/system/fileTemplate')
await downloadFileTemplate('CHARGE_WEIGHT', '批量修改计费重导入模板')
}
function openChargeWeightImportAttach() {
@@ -144,6 +144,8 @@
:show-update-support="false"
:import-desc="importDesc"
:file-limit="5"
template-file-code="SALES_ALL"
template-file-name="销售价多国导入模板"
:submit-handler="runImportAsync"
@success="onImportSuccess"
/>
@@ -155,6 +157,8 @@
:show-update-support="false"
:import-desc="countryImportDesc"
:file-limit="5"
template-file-code="SALES_COUNTRY"
template-file-name="销售价单国导入模板"
:before-submit="validateCountryImport"
:submit-handler="runCountryImportAsync"
@success="onImportSuccess"