|
@@ -197,6 +197,14 @@ const Order = Form.create()(
|
|
|
//评价
|
|
|
evaluateSubmit(e){
|
|
|
e.preventDefault();
|
|
|
+ if(!this.state.remark){
|
|
|
+ message.warning('请填写评价内容');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(!this.state.star){
|
|
|
+ message.warning('请选择评星等级');
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.setState({
|
|
|
loading:true
|
|
|
})
|
|
@@ -212,7 +220,8 @@ const Order = Form.create()(
|
|
|
},
|
|
|
success:function(data){
|
|
|
if(data&&data.error.length){
|
|
|
- message.error(data.error[0].message)
|
|
|
+ message.error(data.error[0].message);
|
|
|
+ return;
|
|
|
}
|
|
|
message.success('提交成功,感谢您的评价!')
|
|
|
this.loadData(this.state.page);
|
|
@@ -409,7 +418,8 @@ const Order = Form.create()(
|
|
|
<Form layout="horizontal" onSubmit={this.evaluateSubmit} >
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<p style={{marginLeft:40,fontSize:20,marginBottom:15}}>其他买家需要您的建议哦!</p>
|
|
|
- <FormItem labelCol={{ span: 4 }} wrapperCol={{ span: 12 }} label="评价内容">
|
|
|
+ <FormItem labelCol={{ span: 4 }} wrapperCol={{ span: 12 }}
|
|
|
+ label={<span><i style={{color:'#f00'}}> * </i>评价内容</span>}>
|
|
|
<Input
|
|
|
type="textarea"
|
|
|
rows={4}
|
|
@@ -423,7 +433,7 @@ const Order = Form.create()(
|
|
|
<FormItem
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 8 }}
|
|
|
- label="评星"
|
|
|
+ label={<span><i style={{color:'#f00'}}> * </i>评星</span>}
|
|
|
>
|
|
|
<Rate onChange={(e)=>{this.setState({star:e})}} value={this.state.star} />
|
|
|
</FormItem>
|