fix(报价单卡片): 补 allowCreateFromQuery/createFromQueryLabel 等参数——新建商品项之前根本没渲染(下拉只剩「无匹配项」)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s

This commit is contained in:
Ubuntu
2026-10-21 09:22:55 +08:00
parent 898b36b3a6
commit d745bf028d
4 changed files with 11 additions and 0 deletions
+1
View File
@@ -113,6 +113,7 @@ export const quotes: MessageDict = {
'form.importFromLibrary': 'Import from customer library',
'form.importing': 'Importing…',
'form.newSku': 'New product',
'form.newSkuHint': 'Fill category/unit/price, then it is applied to this line',
'form.refreshSku': 'Refresh',
'form.addRow': 'Add row',
'form.skusEmptyWarn':
+1
View File
@@ -116,6 +116,7 @@ export const quotes: MessageDict = {
'form.importFromLibrary': 'Impor dari pustaka pelanggan',
'form.importing': 'Mengimpor…',
'form.newSku': 'Produk baru',
'form.newSkuHint': 'Isi kategori/satuan/harga, lalu diterapkan ke baris ini',
'form.refreshSku': 'Muat ulang',
'form.addRow': 'Tambah baris',
'form.skusEmptyWarn':
+1
View File
@@ -111,6 +111,7 @@ export const quotes: MessageDict = {
'form.importFromLibrary': '从客户商品库导入',
'form.importing': '导入中…',
'form.newSku': '新建商品',
'form.newSkuHint': '填分类/单位/价格后自动回填本行',
'form.refreshSku': '刷新',
'form.addRow': '添加行',
'form.skusEmptyWarn':
@@ -1812,7 +1812,15 @@ export const QuoteVersionManagement: React.FC = () => {
}}
options={quoteSkuOptions}
compact
className="w-full"
maxListHeight="max-h-56"
allowCreateFromQuery
alwaysShowCreate
createEmptyLabel={t('quotes.form.newSku')}
createFromQueryLabel={(q) =>
q.trim() ? `${t('quotes.form.newSku')}「${q}」` : t('quotes.form.newSku')
}
createFromQueryHint={t('quotes.form.newSkuHint')}
onCreateFromQuery={(q) => {
setCreateProductInitialName(q);
setCreateProductError('');