From 40c376f205eb814bc8b38f6c1277246a039be104 Mon Sep 17 00:00:00 2001 From: Lewis_yan Date: Wed, 8 Apr 2026 22:30:38 +0800 Subject: [PATCH] feat(i18n): add missing inquiry status keys and paymentPrepaid to pissupplier quotation --- web/src/i18n/pages/pissupplier/en.ts | 58 ++++++++++++++++++++ web/src/i18n/pages/pissupplier/zh-cn.ts | 58 ++++++++++++++++++++ web/src/i18n/pages/pissupplier/zh-tw.ts | 58 ++++++++++++++++++++ web/src/views/pissupplier/quotation/crud.tsx | 10 ++-- 4 files changed, 179 insertions(+), 5 deletions(-) diff --git a/web/src/i18n/pages/pissupplier/en.ts b/web/src/i18n/pages/pissupplier/en.ts index a096b85..7ba8c2b 100644 --- a/web/src/i18n/pages/pissupplier/en.ts +++ b/web/src/i18n/pages/pissupplier/en.ts @@ -68,6 +68,64 @@ export default { lowestPrice: 'Lowest Price', averagePrice: 'Average Price', inquiryTitle: 'Inquiry Title', + fileTypeDrawing: 'Drawing', + fileTypeBidDoc: 'Bid Document', + fileTypeOther: 'Other', + paymentTt30_70: 'T/T 30% Prepay, 70% Before Shipment', + paymentNet30: 'Net 30 Days', + paymentNet45: 'Net 45 Days', + paymentPrepaid: 'Full Prepayment', + partNo: 'Part No', + specDesc: 'Spec Description', + processStation: 'Process Station', + processUnit: 'Process Unit', + processRate: 'Station Rate', + processMeasure: 'Process Qty', + specificGravity: 'Specific Gravity', + totalPrice: 'Total Amount', + taxAmount: 'Tax Amount', + taxRatePct: 'Tax Rate (%)', + profitAmount: 'Profit Amount', + profitRatePct: 'Profit Rate (%)', + saved: 'Saved', + submitted: 'Submitted', + submittedInquiryClosed: 'Submitted, Inquiry Closed', + saveFailed: 'Save Failed', + submitFailed: 'Submit Failed', + cannotAddRowNoFields: 'Please configure fields in the template before adding rows', + attachmentUploadFailed: 'Attachment upload failed: {{name}}', + attachmentMissingPath: 'Attachment path missing: {{name}}', + unnamed: 'Unnamed', + unnamedFile: 'Unnamed File', + statusEvaluating: 'Evaluating', + statusLost: 'Lost', + statusOpen: 'Open', + statusConfirmed: 'Confirmed', + statusPublished: 'Published', + statusQuotingEnd: 'Quote Ended', + statusBargaining: 'Bargaining', + statusPriceAudit: 'Price Audit', + statusPriceApproved: 'Price Approved', + statusCancelled: 'Cancelled', + length: 'Length', + width: 'Width', + height: 'Height', + qty: 'Qty', + material: 'Material', + }, + vendorType: { + stateOwned: 'State-owned', + collective: 'Collective', + private: 'Private', + joint: 'Joint Venture', + whollyOwned: 'Wholly Foreign-owned', + other: 'Other', + }, + paymentTerms: { + tt30_70: 'T/T 30% Prepay, 70% Before Shipment', + net30: 'Net 30 Days', + net45: 'Net 45 Days', + prepaid: 'Full Prepayment', }, }, }, diff --git a/web/src/i18n/pages/pissupplier/zh-cn.ts b/web/src/i18n/pages/pissupplier/zh-cn.ts index 3b91d2b..2f67cd1 100644 --- a/web/src/i18n/pages/pissupplier/zh-cn.ts +++ b/web/src/i18n/pages/pissupplier/zh-cn.ts @@ -68,6 +68,64 @@ export default { lowestPrice: '制程最低价', averagePrice: '平均价', inquiryTitle: '询价单名称', + fileTypeDrawing: '图纸', + fileTypeBidDoc: '招标文件', + fileTypeOther: '其他', + paymentTt30_70: 'T/T 30%预付,70%出货前', + paymentNet30: '月结30天', + paymentNet45: '月结45天', + paymentPrepaid: '全额预付', + partNo: '料号', + specDesc: '规格描述', + processStation: '加工工站', + processUnit: '加工单位', + processRate: '工站费率', + processMeasure: '加工数量', + specificGravity: '比重', + totalPrice: '合计金额', + taxAmount: '税额', + taxRatePct: '税率(%)', + profitAmount: '利润金额', + profitRatePct: '利润率(%)', + saved: '已保存', + submitted: '已提交', + submittedInquiryClosed: '已提交,询价单已关闭', + saveFailed: '保存失败', + submitFailed: '提交失败', + cannotAddRowNoFields: '请先在模板中配置要填写的字段后再新增行', + attachmentUploadFailed: '附件上传失败:{{name}}', + attachmentMissingPath: '附件路径缺失:{{name}}', + unnamed: '未命名', + unnamedFile: '未命名文件', + statusEvaluating: '评标中', + statusLost: '落标', + statusOpen: '开立', + statusConfirmed: '确认', + statusPublished: '发布', + statusQuotingEnd: '报价结束', + statusBargaining: '比议价中', + statusPriceAudit: '价格审核', + statusPriceApproved: '核价通过(结束)', + statusCancelled: '作废', + length: '长', + width: '宽', + height: '高', + qty: '数量', + material: '材质', + }, + vendorType: { + stateOwned: '国有', + collective: '集体', + private: '私营', + joint: '合资', + whollyOwned: '独资', + other: '其他', + }, + paymentTerms: { + tt30_70: 'T/T 30%预付,70%出货前', + net30: '月结30天', + net45: '月结45天', + prepaid: '全额预付', }, }, }, diff --git a/web/src/i18n/pages/pissupplier/zh-tw.ts b/web/src/i18n/pages/pissupplier/zh-tw.ts index a51da41..91046a2 100644 --- a/web/src/i18n/pages/pissupplier/zh-tw.ts +++ b/web/src/i18n/pages/pissupplier/zh-tw.ts @@ -68,6 +68,64 @@ export default { lowestPrice: '製程最低價', averagePrice: '平均價', inquiryTitle: '詢價單名稱', + fileTypeDrawing: '圖紙', + fileTypeBidDoc: '招標文件', + fileTypeOther: '其他', + paymentTt30_70: 'T/T 30%預付,70%出貨前', + paymentNet30: '月結30天', + paymentNet45: '月結45天', + paymentPrepaid: '全額預付', + partNo: '料號', + specDesc: '規格描述', + processStation: '加工工站', + processUnit: '加工單位', + processRate: '工站費率', + processMeasure: '加工數量', + specificGravity: '比重', + totalPrice: '合計金額', + taxAmount: '稅額', + taxRatePct: '稅率(%)', + profitAmount: '利潤金額', + profitRatePct: '利潤率(%)', + saved: '已儲存', + submitted: '已提交', + submittedInquiryClosed: '已提交,詢價單已關閉', + saveFailed: '儲存失敗', + submitFailed: '提交失敗', + cannotAddRowNoFields: '請先在模板中配置要填寫的欄位後再新增行', + attachmentUploadFailed: '附件上傳失敗:{{name}}', + attachmentMissingPath: '附件路徑缺失:{{name}}', + unnamed: '未命名', + unnamedFile: '未命名檔案', + statusEvaluating: '評標中', + statusLost: '落標', + statusOpen: '開立', + statusConfirmed: '確認', + statusPublished: '發布', + statusQuotingEnd: '報價結束', + statusBargaining: '比議價中', + statusPriceAudit: '價格審核', + statusPriceApproved: '核價通過(結束)', + statusCancelled: '作廢', + length: '長', + width: '寬', + height: '高', + qty: '數量', + material: '材質', + }, + vendorType: { + stateOwned: '國有', + collective: '集體', + private: '私營', + joint: '合資', + whollyOwned: '獨資', + other: '其他', + }, + paymentTerms: { + tt30_70: 'T/T 30%預付,70%出貨前', + net30: '月結30天', + net45: '月結45天', + prepaid: '全額預付', }, }, }, diff --git a/web/src/views/pissupplier/quotation/crud.tsx b/web/src/views/pissupplier/quotation/crud.tsx index 4ad2c99..3238ac4 100644 --- a/web/src/views/pissupplier/quotation/crud.tsx +++ b/web/src/views/pissupplier/quotation/crud.tsx @@ -83,9 +83,9 @@ type Quote = { type SummaryRow = { section: string; amount: number; isSubtotal?: boolean } /** 与杂采询价列表列展示一致 */ -export const buyingMethodDict = [ - { value: 1, label: '询价' }, - { value: 2, label: '招标' } +export const getBuyingMethodDict = (t: Function) => [ + { value: 1, label: t('message.pages.pissupplier.quotation.buyingMethodInquiry') }, + { value: 2, label: t('message.pages.pissupplier.quotation.buyingMethodBid') } ] export function formatQuoteDeadlineDisplay(value: unknown) { @@ -806,7 +806,7 @@ const costItemsFromQuotationApi = (item: any, t: Function): CostItem[] => { section: '其它成本', attrs: [ { key: 'part_id', label: t('message.pages.pissupplier.quotation.partNo'), value: o.part_id ?? '' }, - { key: 'packageFee', label: t('message.pages.pissupplier.quotation.packageFee'), value: o.packaging_cost ?? '' }, + { key: 'packageFee', label: t('message.pages.pissupplier.quotation.packagingFee'), value: o.packaging_cost ?? '' }, { key: 'transportFee', label: t('message.pages.pissupplier.quotation.transportFee'), value: o.transportation_cost ?? '' } ] }) @@ -2380,7 +2380,7 @@ export function useQuoteCrud(options?: { return { filters, - statusOptions: getStatusOptions(), + statusOptions: getStatusOptions(t), resetFilter, filteredQuotes, loading,