修改产品功能

This commit is contained in:
wuweihua
2026-09-28 21:43:39 +08:00
parent b247bc2fd2
commit 0ad90f6183
32 changed files with 339 additions and 660 deletions
@@ -24,7 +24,7 @@ import {
export function usePriceSetRefData() {
/** 产品下拉选项 */
const productOptions = ref([])
/** productCode -> bms_product_country 行 */
/** productCode -> product_country 行 */
const countryCache = reactive({})
/** productCode -> 进行中的国家明细请求(去重,避免 hydrate 按行打爆接口) */
const countryPending = {}
@@ -323,7 +323,7 @@ export function useDetailCascade(refData) {
row.weightLabel = formatWeightLabel(row.weightMin, row.weightMax)
}
row._countryKey = countryKeyOf(row)
// Keep package prices in fv*; product base is stamped later from bms_product_country.
// Keep package prices in fv*; product base is stamped later from product_country.
return row
}
refData.ensureCountries(row.productCode).then(rows => {
@@ -178,7 +178,7 @@ export function matchCountryZone(detail, item) {
/**
* 国家下拉选项(按产品的国家配置去重)
* @param {Array} rows bms_product_country 行
* @param {Array} rows product_country 行
* @returns {Array<{key, code, name, label}>}
*/
export function buildCountryOptions(rows) {
@@ -198,7 +198,7 @@ export function buildCountryOptions(rows) {
/**
* 重量段下拉选项(按已选国家过滤去重)
* @param {Array} rows bms_product_country 行
* @param {Array} rows product_country 行
* @param {Object} row 当前明细行(含国家)
* @returns {Array<{value, label, detailId, freightPrice, registrationFee}>}
*/
@@ -311,7 +311,7 @@ export function createEmptyDetailRow() {
productCountryId: undefined,
fvValue: undefined,
fvRegistrationFee: undefined,
/** product default freight when copied from bms_product_country */
/** product default freight when copied from product_country */
_baseFreight: undefined,
/** product default registration fee */
_baseReg: undefined,