From 9918bd4dceb5ead250f9f4d201f165ba8ac6b3ee Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Thu, 3 Dec 2026 14:48:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=9ATP(RMB/KCT)=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20Sample=20cost(RMB):?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=85=AC=E5=BC=8F=EF=BC=9ATP(RMB/KCT)*Sample?= =?UTF-8?q?=20Qty/1000?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectProofTracking/constants.js | 46 ++++++++++++++++++- .../mixins/costComments.js | 15 ++++++ 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/src/views/modules/sampleTracking/projectProofTracking/constants.js b/src/views/modules/sampleTracking/projectProofTracking/constants.js index 4acf1f1..2465288 100644 --- a/src/views/modules/sampleTracking/projectProofTracking/constants.js +++ b/src/views/modules/sampleTracking/projectProofTracking/constants.js @@ -57,8 +57,8 @@ export const ONE_KEY_ROLE_FIELDS = [ 'docEngineer2' ] -export const COST_MANUAL_COLUMNS = ['customizedForMasAls', 'tpKctUsd', 'toolingCostCn', 'sampleCostFromFnCn'] -export const COST_CALCULATED_COLUMNS = ['sampleCostUsd', 'toolingCostUsd', 'sampleAndToolingCostUsd', 'sampleCostFromFnUsd'] +export const COST_MANUAL_COLUMNS = ['customizedForMasAls', 'tpKctUsd', 'tpRmbKct', 'toolingCostCn', 'sampleCostFromFnCn'] +export const COST_CALCULATED_COLUMNS = ['sampleCostUsd', 'sampleCostRmb', 'toolingCostUsd', 'sampleAndToolingCostUsd', 'sampleCostFromFnUsd'] export const CUSTOMIZED_FOR_MAS_ALS_OPTIONS = [ 'PM-standard', 'PM-Customized for ALS', @@ -236,6 +236,20 @@ export const DEFAULT_TRACKING_COLUMNS = [ columnWidth: 80, showOverflowTooltip: false }, + { + serialNumber: 'proofTrackingTable1ProjectPhase', + columnProp: 'projectPhase', + headerAlign: 'center', + align: 'center', + columnLabel: '项目阶段', + columnHidden: false, + columnImage: false, + columnSortable: false, + status: true, + fixed: '', + columnWidth: 110, + showOverflowTooltip: true + }, // Sample Qty / Year / Month / LT 为计算列;仅 PM inquery time 落库。 { serialNumber: 'proofTrackingTable1SampleQty', @@ -280,6 +294,34 @@ export const DEFAULT_TRACKING_COLUMNS = [ columnWidth: 140, showOverflowTooltip: false }, + { + serialNumber: 'proofTrackingTable1TpRmbKct', + columnProp: 'tpRmbKct', + headerAlign: 'center', + align: 'center', + columnLabel: 'TP(RMB/KCT)', + columnHidden: false, + columnImage: false, + columnSortable: false, + status: true, + fixed: '', + columnWidth: 130, + showOverflowTooltip: false + }, + { + serialNumber: 'proofTrackingTable1SampleCostRmb', + columnProp: 'sampleCostRmb', + headerAlign: 'center', + align: 'center', + columnLabel: 'Sample cost(RMB)', + columnHidden: false, + columnImage: false, + columnSortable: false, + status: true, + fixed: '', + columnWidth: 160, + showOverflowTooltip: false + }, { serialNumber: 'proofTrackingTable1ToolingCostCn', columnProp: 'toolingCostCn', diff --git a/src/views/modules/sampleTracking/projectProofTracking/mixins/costComments.js b/src/views/modules/sampleTracking/projectProofTracking/mixins/costComments.js index 095cead..44dc4c5 100644 --- a/src/views/modules/sampleTracking/projectProofTracking/mixins/costComments.js +++ b/src/views/modules/sampleTracking/projectProofTracking/mixins/costComments.js @@ -214,6 +214,15 @@ export default { sampleAndToolingCostUsd: this.sumPreviewCost(sampleCostUsd, this.toCostNumber(row.toolingCostUsd)) } } + // 人民币单价只预览人民币样品费,不改美元样品费和模具合计。 + if (editingProp === 'tpRmbKct') { + const qty = this.getRowSampleQty(row) + return { + sampleCostRmb: normalized.value == null || qty == null + ? null + : this.roundCost(normalized.value * qty / 1000) + } + } if (editingProp === 'toolingCostCn') { const toolingCostUsd = normalized.value == null || rate == null ? null @@ -238,6 +247,9 @@ export default { if (columnProp === 'sampleCostUsd') { return '修改 TP 时按 TP(KCT/USD) × Sample Qty / 1000 计算' } + if (columnProp === 'sampleCostRmb') { + return '修改 TP 时按 TP(RMB/KCT) × Sample Qty / 1000 计算' + } if (columnProp === 'toolingCostUsd') { return `修改 Tooling cost/CN 时按人民币 / ${rateText}` } @@ -462,6 +474,7 @@ export default { trackingId: row.trackingId, customizedForMasAls: this.isBlankValue(row.customizedForMasAls) ? null : String(row.customizedForMasAls).trim(), tpKctUsd: this.toCostNumber(row.tpKctUsd), + tpRmbKct: this.toCostNumber(row.tpRmbKct), toolingCostCn: this.toCostNumber(row.toolingCostCn), sampleCostFromFnCn: this.toCostNumber(row.sampleCostFromFnCn), updateBy: this.$store.state.user.name @@ -494,9 +507,11 @@ export default { const fields = [ 'customizedForMasAls', 'tpKctUsd', + 'tpRmbKct', 'toolingCostCn', 'sampleCostFromFnCn', 'sampleCostUsd', + 'sampleCostRmb', 'toolingCostUsd', 'sampleAndToolingCostUsd', 'sampleCostFromFnUsd'