From d745bf028dc809ee47c1f6d215076f1031f22e05 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 21 Oct 2026 09:22:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8A=A5=E4=BB=B7=E5=8D=95=E5=8D=A1?= =?UTF-8?q?=E7=89=87):=20=E8=A1=A5=20allowCreateFromQuery/createFromQueryL?= =?UTF-8?q?abel=20=E7=AD=89=E5=8F=82=E6=95=B0=E2=80=94=E2=80=94=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E5=95=86=E5=93=81=E9=A1=B9=E4=B9=8B=E5=89=8D=E6=A0=B9?= =?UTF-8?q?=E6=9C=AC=E6=B2=A1=E6=B8=B2=E6=9F=93=EF=BC=88=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E5=8F=AA=E5=89=A9=E3=80=8C=E6=97=A0=E5=8C=B9=E9=85=8D=E9=A1=B9?= =?UTF-8?q?=E3=80=8D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en/quotes.ts | 1 + src/i18n/locales/id/quotes.ts | 1 + src/i18n/locales/zh-CN/quotes.ts | 1 + src/pages/customers/QuoteVersionManagement.tsx | 8 ++++++++ 4 files changed, 11 insertions(+) diff --git a/src/i18n/locales/en/quotes.ts b/src/i18n/locales/en/quotes.ts index 4ffae9f..b0e115e 100644 --- a/src/i18n/locales/en/quotes.ts +++ b/src/i18n/locales/en/quotes.ts @@ -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': diff --git a/src/i18n/locales/id/quotes.ts b/src/i18n/locales/id/quotes.ts index 6fc8be7..6e1383f 100644 --- a/src/i18n/locales/id/quotes.ts +++ b/src/i18n/locales/id/quotes.ts @@ -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': diff --git a/src/i18n/locales/zh-CN/quotes.ts b/src/i18n/locales/zh-CN/quotes.ts index 9bfd011..807ecb9 100644 --- a/src/i18n/locales/zh-CN/quotes.ts +++ b/src/i18n/locales/zh-CN/quotes.ts @@ -111,6 +111,7 @@ export const quotes: MessageDict = { 'form.importFromLibrary': '从客户商品库导入', 'form.importing': '导入中…', 'form.newSku': '新建商品', + 'form.newSkuHint': '填分类/单位/价格后自动回填本行', 'form.refreshSku': '刷新', 'form.addRow': '添加行', 'form.skusEmptyWarn': diff --git a/src/pages/customers/QuoteVersionManagement.tsx b/src/pages/customers/QuoteVersionManagement.tsx index 2a7581b..fffad55 100644 --- a/src/pages/customers/QuoteVersionManagement.tsx +++ b/src/pages/customers/QuoteVersionManagement.tsx @@ -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('');