|
@@ -207,9 +207,39 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
}
|
|
|
}.bind(this));
|
|
|
},
|
|
|
+ modifyBroker() {
|
|
|
+ this.props.form.validateFields((err, values) => {
|
|
|
+ if (!err) {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/audit/modifyAchievementTechBroker',
|
|
|
+ data: {
|
|
|
+ id: this.props.data.id,
|
|
|
+ techBrokerId: values.modifyTechBrokerId
|
|
|
+ }
|
|
|
+ }).done(function (data) {
|
|
|
+ this.state.auditStatus = 0;
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ } else {
|
|
|
+ message.success('保存成功!');
|
|
|
+ this.props.handleOk();
|
|
|
+ };
|
|
|
+ }.bind(this));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
formSubmit() {
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
- if (values.auditStatus == 3 && !values.techBroderId) {
|
|
|
+ if (values.auditStatus == 3 && !values.techBrokerId) {
|
|
|
message.warning('必须选择一个技术经纪人!');
|
|
|
return
|
|
|
};
|
|
@@ -224,7 +254,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
url: globalConfig.context + '/api/admin/audit/achievement',
|
|
|
data: {
|
|
|
id: this.props.data.id,
|
|
|
- techBroderId: values.techBroderId,
|
|
|
+ techBroderId: values.techBrokerId,
|
|
|
auditStatus: values.auditStatus
|
|
|
}
|
|
|
}).done(function (data) {
|
|
@@ -645,7 +675,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="技术经纪人" >
|
|
|
- {getFieldDecorator('techBroderId', {
|
|
|
+ {getFieldDecorator('techBrokerId', {
|
|
|
initialValue: theData.techBrokerId
|
|
|
})(
|
|
|
<Select style={{ width: 260 }}
|
|
@@ -658,8 +688,26 @@ const AchievementDetailShow = Form.create()(React.createClass({
|
|
|
)}
|
|
|
</FormItem>
|
|
|
</div> : <div></div>}
|
|
|
+ {window.showAuditStatus && theData.auditStatus == 3 ? <div className="clearfix">
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="指派新经纪人" >
|
|
|
+ {getFieldDecorator('modifyTechBrokerId', {
|
|
|
+ initialValue: theData.techBrokerId
|
|
|
+ })(
|
|
|
+ <Select style={{ width: 260 }}
|
|
|
+ placeholder="请选择要指派的新经纪人"
|
|
|
+ notFoundContent="未获取到经纪人列表"
|
|
|
+ showSearch
|
|
|
+ filterOption={companySearch}>
|
|
|
+ {this.props.techBrodersOption}
|
|
|
+ </Select>
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ </div> : <div></div>}
|
|
|
<FormItem wrapperCol={{ span: 12, offset: 4 }}>
|
|
|
{theData.auditStatus == 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存</Button> : <span></span>}
|
|
|
+ {theData.auditStatus == 3 ? <Button className="set-submit" type="primary" onClick={() => { this.modifyBroker(); }}>保存</Button> : <span></span>}
|
|
|
<Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
|
|
|
{window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList}>生成匹配列表</Button> : <span></span>}
|
|
|
</FormItem>
|