Commit 3878bca4 by wong.peiyi

消耗汇总

parent 30a28f13
......@@ -228,6 +228,10 @@ export const list_common_item = {
detail_inner: {
flex: 1
},
detail_title_box: {
flexDirection: 'row',
justifyContent: 'space-between',
},
detail_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
......
......@@ -1357,6 +1357,15 @@ class EquipConsuPage extends Component {
})
}
consumeSum() {
try {
const {listOptionData} = this.state
return R.compose(R.sum, R.pluck('local_add_price'), R.pathOr([], [12, 'subOption']))(listOptionData)
} catch (error) {
return 0
}
}
// 返回备注以上的元素
renderListItem() {
let { listOptionData, dateModelPop, sysValues } = this.state
......@@ -1618,10 +1627,16 @@ class EquipConsuPage extends Component {
// 返回耗材明细
renderConsumablesDetailsItem() {
let { state } = this
const sum = this.consumeSum()
return (
<CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}>
<View style={list_common_item.detail_title_box}>
<Text style={list_common_item.detail_tit}>耗材明细</Text>
<Text style={list_common_item.detail_tit}>总金额(){sum}</Text>
</View>
{
state.listOptionData[12].subOption.length ?
<View
......
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 sign in to comment