Commit d373357d authored by d.arizona's avatar d.arizona

update

parent 2a57fbd4
This diff is collapsed.
...@@ -434,29 +434,29 @@ export default class CorporateAnnualTarget extends Component { ...@@ -434,29 +434,29 @@ export default class CorporateAnnualTarget extends Component {
// console.log(i[9] == null? "" : i[9].value) // console.log(i[9] == null? "" : i[9].value)
data.push({ data.push({
"item_report_id": i[1], "item_report_id": i[1],
"item_name": i[1] !== ""? null : String(i[6]), "item_name": i[1] == ""? null : String(i[6]),
"parent": i[1] !== ""? null : i[2], "parent": i[1] == ""? null : i[2],
"weight": String(i[7]), "weight": String(i[7]),
"uom": String(i[8]), "uom": String(i[8]),
"kpi_type": i[9] == null? "" : i[9].value, "kpi_type": i[9] == null? "" : i[9].value,
"max_ach": i[10] == null? "" : i[10].value, "max_ach": i[10] == null? "" : i[10].value,
"formula": i[11] == null? "" : i[11].value, "formula": i[11] == null? "" : i[11].value,
"total_actual_before": String(i[12]), "total_actual_before": String(i[12]) == ""? "0,0" : String(i(12)),
"january": String(i[13]), "january": String(i[13]) == ""? "0,0" : String(i[13]),
"february": String(i[14]), "february": String(i[14]) == ""? "0,0" : String(i[14]),
"march": String(i[15]), "march": String(i[15]) == ""? "0,0" : String(i[15]),
"april": String(i[16]), "april": String(i[16]) == ""? "0,0" : String(i[16]),
"may": String(i[17]), "may": String(i[17]) == ""? "0,0" : String(i[17]),
"june": String(i[18]), "june": String(i[18]) == ""? "0,0" : String(i[18]),
"july": String(i[19]), "july": String(i[19]) == ""? "0,0" : String(i[19]),
"august": String(i[20]), "august": String(i[20]) == ""? "0,0" : String(i[20]),
"september": String(i[21]), "september": String(i[21]) == ""? "0,0" : String(i[21]),
"october": String(i[22]), "october": String(i[22]) == ""? "0,0" : String(i[22]),
"november": String(i[23]), "november": String(i[23]) == ""? "0,0" : String(i[23]),
"december": String(i[24]), "december": String(i[24]) == ""? "0,0" : String(i[24]),
"total_current_year": String(i[25]), "total_current_year": String(i[25]) == ""? "0,0" : String(i[25]),
"total_next_year": String(i[26]), "total_next_year": String(i[26]) == ""? "0,0" : String(i[26]),
"total_more_year": String(i[27]), "total_more_year": String(i[27]) == ""? "0,0" : String(i[27]),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
...@@ -472,7 +472,7 @@ export default class CorporateAnnualTarget extends Component { ...@@ -472,7 +472,7 @@ export default class CorporateAnnualTarget extends Component {
} }
let totalWeight = 0 let totalWeight = 0
this.state.dataTable.map((items,indexs) => { this.state.dataTable.map((items,indexs) => {
if (items[0] == 3) { if (items[0] !== 1 || items[0] !== 4) {
console.log(items[7]) console.log(items[7])
totalWeight += Number(items[7].replace('%', '')) totalWeight += Number(items[7].replace('%', ''))
} }
...@@ -503,29 +503,29 @@ export default class CorporateAnnualTarget extends Component { ...@@ -503,29 +503,29 @@ export default class CorporateAnnualTarget extends Component {
// console.log(i[9] == null? "" : i[9].value) // console.log(i[9] == null? "" : i[9].value)
data.push({ data.push({
"item_report_id": i[1], "item_report_id": i[1],
"item_name": i[1] !== ""? null : String(i[6]), "item_name": i[1] == ""? null : String(i[6]),
"parent": i[1] !== ""? null : i[2], "parent": i[1] == ""? null : i[2],
"weight": String(i[7]), "weight": String(i[7]),
"uom": String(i[8]), "uom": String(i[8]),
"kpi_type": i[9] == null? "" : i[9].value, "kpi_type": i[9] == null? "" : i[9].value,
"max_ach": i[10] == null? "" : i[10].value, "max_ach": i[10] == null? "" : i[10].value,
"formula": i[11] == null? "" : i[11].value, "formula": i[11] == null? "" : i[11].value,
"total_actual_before": String(i[12]), "total_actual_before": String(i[12]) == ""? "0,0" : String(i(12)),
"january": String(i[13]), "january": String(i[13]) == ""? "0,0" : String(i[13]),
"february": String(i[14]), "february": String(i[14]) == ""? "0,0" : String(i[14]),
"march": String(i[15]), "march": String(i[15]) == ""? "0,0" : String(i[15]),
"april": String(i[16]), "april": String(i[16]) == ""? "0,0" : String(i[16]),
"may": String(i[17]), "may": String(i[17]) == ""? "0,0" : String(i[17]),
"june": String(i[18]), "june": String(i[18]) == ""? "0,0" : String(i[18]),
"july": String(i[19]), "july": String(i[19]) == ""? "0,0" : String(i[19]),
"august": String(i[20]), "august": String(i[20]) == ""? "0,0" : String(i[20]),
"september": String(i[21]), "september": String(i[21]) == ""? "0,0" : String(i[21]),
"october": String(i[22]), "october": String(i[22]) == ""? "0,0" : String(i[22]),
"november": String(i[23]), "november": String(i[23]) == ""? "0,0" : String(i[23]),
"december": String(i[24]), "december": String(i[24]) == ""? "0,0" : String(i[24]),
"total_current_year": String(i[25]), "total_current_year": String(i[25]) == ""? "0,0" : String(i[25]),
"total_next_year": String(i[26]), "total_next_year": String(i[26]) == ""? "0,0" : String(i[26]),
"total_more_year": String(i[27]), "total_more_year": String(i[27]) == ""? "0,0" : String(i[27]),
"strategic": String(i[28]), "strategic": String(i[28]),
"pic": String(i[29]) "pic": String(i[29])
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment