|
@@ -172,6 +172,7 @@ const ProjectOrder=Form.create()(React.createClass({
|
|
|
return (
|
|
|
<div>
|
|
|
{record.projectStatus==2||record.projectStatus==5?<Button style={{marginRight:'5px'}} type="primary" onClick={(e) =>{ e.stopPropagation(),this.Knot(record)}}>项目管理</Button>:''}
|
|
|
+ {record.projectStatus==2&&<Button style={{marginRight:'5px'}} type="primary" onClick={(e) =>{ e.stopPropagation(),this.Knots(record)}}>结项</Button>}
|
|
|
{record.projectStatus==1||record.projectStatus==5?<Popconfirm title={'您将作废项目【'+record.roleName+'】,系统将自动同步作废项目任务及项目资料单,请确认'} onConfirm={(e)=>{this.scrapOrder(record)}} okText="确认" cancelText="取消">
|
|
|
<Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">作废</Button>
|
|
|
</Popconfirm>:''}
|
|
@@ -183,6 +184,17 @@ const ProjectOrder=Form.create()(React.createClass({
|
|
|
dataSource: [],
|
|
|
};
|
|
|
},
|
|
|
+ //结项
|
|
|
+ Knots(record){
|
|
|
+ this.setState({
|
|
|
+ contractId:record.id,
|
|
|
+ serial:record.serialNumber,
|
|
|
+ buyerName:record.buyerName,
|
|
|
+ KnotState:false,
|
|
|
+ signBillVisible:true
|
|
|
+ })
|
|
|
+ this.editData(record)
|
|
|
+ },
|
|
|
//部门
|
|
|
departmentList() {
|
|
|
this.setState({
|
|
@@ -261,15 +273,6 @@ const ProjectOrder=Form.create()(React.createClass({
|
|
|
this.loadData();
|
|
|
this.departmentList()
|
|
|
},
|
|
|
- //立项
|
|
|
- edit(record) {
|
|
|
- this.setState({
|
|
|
- newProject:false,
|
|
|
- Kid:record.id,
|
|
|
- signBillVisible:true
|
|
|
- })
|
|
|
- this.editData(record)
|
|
|
- },
|
|
|
//项目管理
|
|
|
Knot(record){
|
|
|
this.state.userDetaile=true;
|
|
@@ -285,52 +288,40 @@ const ProjectOrder=Form.create()(React.createClass({
|
|
|
signBillVisible:false
|
|
|
})
|
|
|
},
|
|
|
- //立项。结项前数据获取
|
|
|
- editData(xhr){
|
|
|
- $.ajax({
|
|
|
- method: "POST",
|
|
|
- dataType: "json",
|
|
|
- crossDomain: false,
|
|
|
- url: globalConfig.context + 'api/lixiang-shuju',
|
|
|
- data: {
|
|
|
- id:xhr.id,
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- if (!data.data) {
|
|
|
- if (data.error && data.error.length) {
|
|
|
- message.warning(data.error[0].message);
|
|
|
- };
|
|
|
- } else {
|
|
|
-
|
|
|
- };
|
|
|
- }.bind(this)},
|
|
|
- ).always(function () {
|
|
|
- this.setState({
|
|
|
- loading: false
|
|
|
- });
|
|
|
- }.bind(this));
|
|
|
+ closeDesc(e, s) {
|
|
|
+ this.state.userDetaile=false;
|
|
|
+ this.state.showDesc = e;
|
|
|
+ if (s) {
|
|
|
+ this.loadData(this.state.pageNo);
|
|
|
+ };
|
|
|
+ },
|
|
|
+ noProject(){
|
|
|
+ this.setState({
|
|
|
+ signBillVisible:false
|
|
|
+ })
|
|
|
},
|
|
|
- //立项、结项保存操作
|
|
|
- projectSubmit(e){
|
|
|
+ //结项
|
|
|
+ projectSubmit(e){
|
|
|
e.preventDefault();
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
|
- let api=this.state.KnotState?'/api/admin/lixiang':'/api/admin/jiexiang';
|
|
|
$.ajax({
|
|
|
- method: "POST",
|
|
|
+ method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context +api ,
|
|
|
+ url: globalConfig.context +'/api/admin/techproject/revokeOrComplete' ,
|
|
|
data: {
|
|
|
- id:this.state.Kid,
|
|
|
+ contractId:this.state.contractId,
|
|
|
+ operatorType:1,
|
|
|
+ completeComment:this.state.signComment,
|
|
|
}
|
|
|
}).done(function(data) {
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
if(!data.error.length) {
|
|
|
- message.success('操作成功!');
|
|
|
+ message.success('结项成功!');
|
|
|
this.noProject();
|
|
|
this.loadData(this.state.pageNo);
|
|
|
} else {
|
|
@@ -338,13 +329,6 @@ const ProjectOrder=Form.create()(React.createClass({
|
|
|
}
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- closeDesc(e, s) {
|
|
|
- this.state.userDetaile=false;
|
|
|
- this.state.showDesc = e;
|
|
|
- if (s) {
|
|
|
- this.loadData(this.state.pageNo);
|
|
|
- };
|
|
|
- },
|
|
|
searchSwitch() {
|
|
|
this.setState({
|
|
|
newProject:false,
|
|
@@ -476,7 +460,7 @@ const ProjectOrder=Form.create()(React.createClass({
|
|
|
showDesc={this.state.showDesc}
|
|
|
closeDesc={this.closeDesc} />
|
|
|
</div >
|
|
|
- <Modal maskClosable={false} visible={this.state.signBillVisible}
|
|
|
+ <Modal maskClosable={false} visible={this.state.signBillVisible}
|
|
|
onOk={this.noProject} onCancel={this.noProject}
|
|
|
width='800px'
|
|
|
title='项目立项'
|
|
@@ -488,30 +472,25 @@ const ProjectOrder=Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="项目编号" >
|
|
|
- <span></span>
|
|
|
+ <span>{this.state.serial}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="客户名称" >
|
|
|
- <span></span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="立项时间">
|
|
|
- <span></span>
|
|
|
+ <span>{this.state.buyerName}</span>
|
|
|
</FormItem>
|
|
|
<div className='clearfix'>
|
|
|
<FormItem
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 16 }}
|
|
|
label="立项说明" >
|
|
|
- <Input type="textarea" placeholder="请输入备注" rows={4} value={this.state.introduction}
|
|
|
- onChange={(e)=>{this.setState({introduction:e.target.value})}}/>
|
|
|
+ <Input type="textarea" placeholder="请输入备注" rows={4} value={this.state.signComment}
|
|
|
+ onChange={(e)=>{this.setState({signComment:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
</div>
|
|
|
<FormItem wrapperCol={{ span: 12, offset: 4 }} className="half-middle">
|
|
|
- <Button className="submitSave" type="primary" htmlType="submit">{this.state.KnotState?"确定立项":'确定结项'}</Button>
|
|
|
+ <Button className="submitSave" type="primary" htmlType="submit">确定立项</Button>
|
|
|
<Button className="submitSave" type="ghost" onClick={this.noProject}>返回</Button>
|
|
|
</FormItem>
|
|
|
</Spin>
|