解决bug

This commit is contained in:
red-deng-deng 2021-11-26 20:47:59 +08:00
parent eea4d5e0b4
commit 240532388f
4 changed files with 24 additions and 7 deletions

View File

@ -3,21 +3,23 @@
height: 60px; height: 60px;
min-width: 300px; min-width: 300px;
display: flex; display: flex;
line-height: 60px;
box-sizing: border-box; box-sizing: border-box;
} }
.nava a{ .nava a{
display: flex; display: flex;
color: #333; color: #333;
padding: 0 18px;
text-decoration: none; text-decoration: none;
margin-right: 10px; // margin-right: 10px;
font-size: 16px; font-size: 16px;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 110px; // width: 110px;
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;
&:hover{ &:hover{
width: 110px; // width: 110px;
background: #f2f4f7; background: #f2f4f7;
color: #296bef; color: #296bef;
} }

View File

@ -75,7 +75,9 @@ export default class commoditylist extends React.Component{
filterList:[{id:0,label:"商品类型",menuList:[{id:2,name:"卡密"},{id:1,name:"直充"}]}, filterList:[{id:0,label:"商品类型",menuList:[{id:2,name:"卡密"},{id:1,name:"直充"}]},
], ],
menuList:[{id:0,name:"商品类型",check:false}], menuList:[{id:0,name:"商品类型",check:false}],
drawerVisible:false drawerVisible:false,
contractprice:0,
totalprice:0,
} }
} }
//分页 //分页
@ -133,7 +135,13 @@ export default class commoditylist extends React.Component{
} }
selection(selection){ selection(selection){
this.setState({selectiondata:selection}); this.setState({selectiondata:selection});
let contractprice=0;
let totalprice=0;
selection.forEach(item=>{
contractprice+=Number(item.official_price);
totalprice+=Number(item.contract_price);
});
this.setState({contractprice,totalprice});
} }
batchdelFn(){ batchdelFn(){
if(this.state.selectiondata<1){ if(this.state.selectiondata<1){
@ -253,7 +261,7 @@ export default class commoditylist extends React.Component{
type="info" type="info"
extraContent={<Button type="primary">清空</Button>} extraContent={<Button type="primary">清空</Button>}
> >
已选择<font color="#296bef" style={{fontWeight:'bold'}}>{this.state.selectiondata.length}</font>30.0036.4 已选择<font color="#296bef" style={{fontWeight:'bold'}}>{this.state.selectiondata.length}</font>:{this.state.contractprice.toFixed(4)}{this.state.totalprice.toFixed(4)}
</Alert>):null </Alert>):null
} }
<div className="code-table"> <div className="code-table">

View File

@ -275,7 +275,7 @@ export default class App extends Component {
</div> </div>
</div>}> </div>}>
{/* */} {/* */}
{this.state.userInfo.user_name}&nbsp;<Icon type="down" className="exitIcon" /> <div className="nameItem">{this.state.userInfo.user_name}&nbsp;<Icon type="down" className="exitIcon" /></div>
</Pop> </Pop>
</div> </div>
<aside className="mainbody" > <aside className="mainbody" >

View File

@ -82,6 +82,7 @@
.exit-userInfo{ .exit-userInfo{
line-height: 1.5rem; line-height: 1.5rem;
color: #333; color: #333;
font-size: 14px; font-size: 14px;
margin-left: 15px; margin-left: 15px;
} }
@ -109,3 +110,9 @@
background: transparent!important; background: transparent!important;
} }
.nameItem{
height: 100%;
display: flex;
align-items: center;
font-weight: bold;
}