修改部分字段
This commit is contained in:
@@ -180,12 +180,12 @@ export default {
|
|||||||
// 调用接口
|
// 调用接口
|
||||||
getSingleMaterialCostAnalysis(requestParams).then((res) => {
|
getSingleMaterialCostAnalysis(requestParams).then((res) => {
|
||||||
this.monData = res.data.currentMonthData.find(item => {
|
this.monData = res.data.currentMonthData.find(item => {
|
||||||
return item.name === "包材成本";
|
return item.name === "加工包材成本";
|
||||||
});
|
});
|
||||||
console.log('this.monData', this.monData);
|
console.log('this.monData', this.monData);
|
||||||
|
|
||||||
this.totalData = res.data.totalMonthData.find(item => {
|
this.totalData = res.data.totalMonthData.find(item => {
|
||||||
return item.name === "包材成本";
|
return item.name === "加工包材成本";
|
||||||
});
|
});
|
||||||
this.relatedData.total =res.data.totalMonthData,
|
this.relatedData.total =res.data.totalMonthData,
|
||||||
this.relatedData.current= res.data.currentMonthData
|
this.relatedData.current= res.data.currentMonthData
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ export default {
|
|||||||
getSingleMaterialAnalysis(requestParams).then((res) => {
|
getSingleMaterialAnalysis(requestParams).then((res) => {
|
||||||
this.monData = res.data.currentMonthData.find(item => {
|
this.monData = res.data.currentMonthData.find(item => {
|
||||||
if (this.fuelName === '电') {
|
if (this.fuelName === '电') {
|
||||||
return item.name === '原片' + this.fuelName + '成本';
|
return item.name === '加工' + this.fuelName + '成本';
|
||||||
}else{
|
}else{
|
||||||
return item.name === this.fuelName + '成本';
|
return item.name === this.fuelName + '成本';
|
||||||
}
|
}
|
||||||
@@ -206,7 +206,7 @@ export default {
|
|||||||
|
|
||||||
this.totalData = res.data.totalMonthData.find(item => {
|
this.totalData = res.data.totalMonthData.find(item => {
|
||||||
if (this.fuelName === '电') {
|
if (this.fuelName === '电') {
|
||||||
return item.name === '原片' + this.fuelName + '成本';
|
return item.name === '加工' + this.fuelName + '成本';
|
||||||
}else{
|
}else{
|
||||||
return item.name === this.fuelName + '成本';
|
return item.name === this.fuelName + '成本';
|
||||||
}
|
}
|
||||||
@@ -215,22 +215,19 @@ export default {
|
|||||||
this.relatedData = {
|
this.relatedData = {
|
||||||
relatedMon: res.data.currentMonthData.filter(item => {
|
relatedMon: res.data.currentMonthData.filter(item => {
|
||||||
if (this.fuelName === '电') {
|
if (this.fuelName === '电') {
|
||||||
return item.name !== '原片' + this.fuelName + '成本';
|
return item.name !== '加工' + this.fuelName + '成本';
|
||||||
}else{
|
}else{
|
||||||
return item.name !== this.fuelName + '成本';
|
return item.name !== this.fuelName + '成本';
|
||||||
}
|
}
|
||||||
}), // 兜底月度数据
|
}), // 兜底月度数据
|
||||||
relatedTotal: res.data.totalMonthData.filter(item => {
|
relatedTotal: res.data.totalMonthData.filter(item => {
|
||||||
if (this.fuelName === '电') {
|
if (this.fuelName === '电') {
|
||||||
return item.name !== '原片' + this.fuelName + '成本';
|
return item.name !== '加工' + this.fuelName + '成本';
|
||||||
}else{
|
}else{
|
||||||
return item.name !== this.fuelName + '成本';
|
return item.name !== this.fuelName + '成本';
|
||||||
}
|
}
|
||||||
}) // 兜底累计数据
|
}) // 兜底累计数据
|
||||||
}
|
};
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
this.trend = res.data.dataTrend
|
this.trend = res.data.dataTrend
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -89,9 +89,9 @@ export default {
|
|||||||
relatedData: {
|
relatedData: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
if (this.currentTab === 'month') {
|
if (this.currentTab === 'month') {
|
||||||
this.activeData = newVal.relatedMon || [];
|
this.activeData = newVal.current || [];
|
||||||
}else{
|
}else{
|
||||||
this.activeData = newVal.relatedTotal || [];
|
this.activeData = newVal.total || [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true, // 组件挂载时立即执行
|
immediate: true, // 组件挂载时立即执行
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export default {
|
|||||||
{ key: 'fuelCost', name: '燃料成本',label:'原片燃料成本', unit: '元/㎡', route: 'combustible/combustible'},
|
{ key: 'fuelCost', name: '燃料成本',label:'原片燃料成本', unit: '元/㎡', route: 'combustible/combustible'},
|
||||||
{ key: 'electricityCost', name: '电成本',label:'原片电成本', unit: '元/㎡', route: 'osElectricityCostAnalysis'},
|
{ key: 'electricityCost', name: '电成本',label:'原片电成本', unit: '元/㎡', route: 'osElectricityCostAnalysis'},
|
||||||
{ key: 'laborCost', name: '人工成本',label:'人工成本', unit: '元/㎡', route: 'originalSheetLabor'},
|
{ key: 'laborCost', name: '人工成本',label:'人工成本', unit: '元/㎡', route: 'originalSheetLabor'},
|
||||||
{ key: 'manufacturingCost', name: '制造成本',label:'制造成本', unit: '元/㎡', route: 'mfgOverheadCostAnalysis/mfgOverheadCostAnalysis'},
|
{ key: 'manufacturingCost', name: '制造费用',label:'制造费用', unit: '元/㎡', route: 'mfgOverheadCostAnalysis/mfgOverheadCostAnalysis'},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
indicators() {
|
indicators() {
|
||||||
|
|||||||
Reference in New Issue
Block a user