解决订单结算
This commit is contained in:
parent
1deb03c2e6
commit
50c74d1f43
|
@ -128,13 +128,24 @@ export default class orderlist extends React.Component{
|
|||
tableHeight:500,
|
||||
page:1,
|
||||
limit:10,
|
||||
key_word:''
|
||||
key_word:'',
|
||||
officialprice:0,contractprice:0,costprice:0,totalprice:0
|
||||
}
|
||||
}
|
||||
//选中表格的选框
|
||||
selection(selection){
|
||||
this.setState({selectiondata:selection});
|
||||
|
||||
let officialprice=0;
|
||||
let contractprice=0;
|
||||
let costprice=0;
|
||||
let totalprice=0;
|
||||
selection.forEach(item=>{
|
||||
officialprice+=Number(item.official_price);
|
||||
contractprice+=Number(item.contract_price);
|
||||
costprice+=Number(item.cost_price);
|
||||
totalprice+=Number(item.total);
|
||||
});
|
||||
this.setState({officialprice,contractprice,costprice,totalprice});
|
||||
}
|
||||
//新建订单
|
||||
clickFn(){
|
||||
|
@ -400,8 +411,8 @@ componentDidUpdate(prevProps,prevState){
|
|||
type="info"
|
||||
extraContent={<Button type="primary" onClick={this.clearFn.bind(this)}>清空</Button>}
|
||||
>
|
||||
已选择<font color="#296bef" style={{fontWeight:'bold'}}>{this.state.selectiondata.length}</font>项,官方价金额总计¥30.00万,合同价金额总计¥30.00万,成本价金额总计:¥36.4万,结算价金额总计:¥36.4万
|
||||
</Alert>):null
|
||||
已选择<font color="#296bef" style={{fontWeight:'bold'}}>{this.state.selectiondata.length}</font>项,官方价金额总计¥{this.state.officialprice.toFixed(4)}万,合同价金额总计¥{this.state.contractprice.toFixed(4)}万,成本价金额总计:¥{this.state.costprice.toFixed(4)}万,结算价金额总计:¥{this.state.totalprice.toFixed(4)}万
|
||||
</Alert>):null
|
||||
}
|
||||
<Grid
|
||||
spliteColor={'#fff'}
|
||||
|
|
Loading…
Reference in New Issue