Refactor billing options retrieval to include data permissions and add effective date handling for product imports

This commit is contained in:
wuweihua
2026-10-09 09:27:28 +08:00
parent fea34d1d10
commit c95a9861cc
42 changed files with 984 additions and 219 deletions
@@ -1,5 +1,5 @@
import { ref } from 'vue'
import { listProduct } from '@/api/price/product'
import { listProductOptions } from '@/api/price/product'
/**
* 产品列表模块级共享缓存:全应用只拉取一次
@@ -37,9 +37,9 @@ export function useProducts() {
function ensureProducts(force = false) {
if (!force && loadingPromise) return loadingPromise
if (!force && productList.value.length) return Promise.resolve(productList.value)
loadingPromise = listProduct({ pageNum: 1, pageSize: 1000 })
loadingPromise = listProductOptions({})
.then(res => {
productList.value = res.rows || []
productList.value = res.data || []
return productList.value
})
.finally(() => {