feat(库存入库): 小程序品名改商品选择器 + 建品查重
- 小程序「品名」格改为商品选择器(搜索已有 / 选中带出上次设置 / 输入新名待新建), 与 Web 口径一致;生产日期与数量不带出 - 后端 createCatalogSkuForInbound 加查重:同名(+规格)已有启用商品即复用, 避免重复新建(Web / 小程序 / 批量入库 / 自助采购 四个入口一并生效) - 新增 GET /mobile/inventory/sku-options;补查重单测与设计文档
This commit is contained in:
@@ -603,6 +603,14 @@ function fetchStockInboundSkuSimilar(params = {}) {
|
||||
return request(`/mobile/inventory/sku-similar${qs}`);
|
||||
}
|
||||
|
||||
function fetchStockInboundSkuOptions(params = {}) {
|
||||
const parts = [];
|
||||
if (params.search) parts.push(`search=${encodeURIComponent(params.search)}`);
|
||||
if (params.limit) parts.push(`limit=${encodeURIComponent(params.limit)}`);
|
||||
const qs = parts.length ? `?${parts.join('&')}` : '';
|
||||
return request(`/mobile/inventory/sku-options${qs}`);
|
||||
}
|
||||
|
||||
function createStockInboundProduct(payload) {
|
||||
return request('/mobile/catalog/products', {
|
||||
method: 'POST',
|
||||
@@ -1310,6 +1318,7 @@ module.exports = {
|
||||
createStockInboundCategory,
|
||||
recognizeStockInboundCatalog,
|
||||
fetchStockInboundSkuSimilar,
|
||||
fetchStockInboundSkuOptions,
|
||||
createStockInboundProduct,
|
||||
submitStockInbound,
|
||||
recognizeStockInboundLines,
|
||||
|
||||
Reference in New Issue
Block a user