Browse Source

增加新字段:TP(RMB/KCT)

Sample cost(RMB):计算公式:TP(RMB/KCT)*Sample Qty/1000
master
han\hanst 20 hours ago
parent
commit
9918bd4dce
  1. 46
      src/views/modules/sampleTracking/projectProofTracking/constants.js
  2. 15
      src/views/modules/sampleTracking/projectProofTracking/mixins/costComments.js

46
src/views/modules/sampleTracking/projectProofTracking/constants.js

@ -57,8 +57,8 @@ export const ONE_KEY_ROLE_FIELDS = [
'docEngineer2' '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 = [ export const CUSTOMIZED_FOR_MAS_ALS_OPTIONS = [
'PM-standard', 'PM-standard',
'PM-Customized for ALS', 'PM-Customized for ALS',
@ -236,6 +236,20 @@ export const DEFAULT_TRACKING_COLUMNS = [
columnWidth: 80, columnWidth: 80,
showOverflowTooltip: false 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 落库。 // Sample Qty / Year / Month / LT 为计算列;仅 PM inquery time 落库。
{ {
serialNumber: 'proofTrackingTable1SampleQty', serialNumber: 'proofTrackingTable1SampleQty',
@ -280,6 +294,34 @@ export const DEFAULT_TRACKING_COLUMNS = [
columnWidth: 140, columnWidth: 140,
showOverflowTooltip: false 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', serialNumber: 'proofTrackingTable1ToolingCostCn',
columnProp: 'toolingCostCn', columnProp: 'toolingCostCn',

15
src/views/modules/sampleTracking/projectProofTracking/mixins/costComments.js

@ -214,6 +214,15 @@ export default {
sampleAndToolingCostUsd: this.sumPreviewCost(sampleCostUsd, this.toCostNumber(row.toolingCostUsd)) 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') { if (editingProp === 'toolingCostCn') {
const toolingCostUsd = normalized.value == null || rate == null const toolingCostUsd = normalized.value == null || rate == null
? null ? null
@ -238,6 +247,9 @@ export default {
if (columnProp === 'sampleCostUsd') { if (columnProp === 'sampleCostUsd') {
return '修改 TP 时按 TP(KCT/USD) × Sample Qty / 1000 计算' return '修改 TP 时按 TP(KCT/USD) × Sample Qty / 1000 计算'
} }
if (columnProp === 'sampleCostRmb') {
return '修改 TP 时按 TP(RMB/KCT) × Sample Qty / 1000 计算'
}
if (columnProp === 'toolingCostUsd') { if (columnProp === 'toolingCostUsd') {
return `修改 Tooling cost/CN 时按人民币 / ${rateText}` return `修改 Tooling cost/CN 时按人民币 / ${rateText}`
} }
@ -462,6 +474,7 @@ export default {
trackingId: row.trackingId, trackingId: row.trackingId,
customizedForMasAls: this.isBlankValue(row.customizedForMasAls) ? null : String(row.customizedForMasAls).trim(), customizedForMasAls: this.isBlankValue(row.customizedForMasAls) ? null : String(row.customizedForMasAls).trim(),
tpKctUsd: this.toCostNumber(row.tpKctUsd), tpKctUsd: this.toCostNumber(row.tpKctUsd),
tpRmbKct: this.toCostNumber(row.tpRmbKct),
toolingCostCn: this.toCostNumber(row.toolingCostCn), toolingCostCn: this.toCostNumber(row.toolingCostCn),
sampleCostFromFnCn: this.toCostNumber(row.sampleCostFromFnCn), sampleCostFromFnCn: this.toCostNumber(row.sampleCostFromFnCn),
updateBy: this.$store.state.user.name updateBy: this.$store.state.user.name
@ -494,9 +507,11 @@ export default {
const fields = [ const fields = [
'customizedForMasAls', 'customizedForMasAls',
'tpKctUsd', 'tpKctUsd',
'tpRmbKct',
'toolingCostCn', 'toolingCostCn',
'sampleCostFromFnCn', 'sampleCostFromFnCn',
'sampleCostUsd', 'sampleCostUsd',
'sampleCostRmb',
'toolingCostUsd', 'toolingCostUsd',
'sampleAndToolingCostUsd', 'sampleAndToolingCostUsd',
'sampleCostFromFnUsd' 'sampleCostFromFnUsd'

Loading…
Cancel
Save