|
@@ -151,6 +151,61 @@ const Task = React.createClass({
|
|
|
],
|
|
|
dataSource: [],
|
|
|
searchTime: [],
|
|
|
+ columnsX: [
|
|
|
+ {
|
|
|
+ title: '业务项目名称',
|
|
|
+ dataIndex: 'commodityName',
|
|
|
+ key: 'commodityName'
|
|
|
+ }, {
|
|
|
+ title: '项目类别',
|
|
|
+ dataIndex: 'cname',
|
|
|
+ key: 'cname',
|
|
|
+
|
|
|
+ },{
|
|
|
+ title: '项目数量',
|
|
|
+ dataIndex: 'commodityQuantity',
|
|
|
+ key: 'commodityQuantity'
|
|
|
+ }, {
|
|
|
+ title: '金额(万元)',
|
|
|
+ dataIndex: 'commodityPrice',
|
|
|
+ key: 'commodityPrice'
|
|
|
+ }, {
|
|
|
+ title: '负责人',
|
|
|
+ dataIndex: 'contacts',
|
|
|
+ key: 'contacts'
|
|
|
+ }, {
|
|
|
+ title: '负责人电话',
|
|
|
+ dataIndex: 'contactsMobile',
|
|
|
+ key: 'contactsMobile'
|
|
|
+ }, {
|
|
|
+ title: '主要项目',
|
|
|
+ dataIndex: 'main',
|
|
|
+ key: 'main',
|
|
|
+ render:(text)=>{
|
|
|
+ return (text?'是':'否')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ title: '项目说明',
|
|
|
+ dataIndex: 'taskComment',
|
|
|
+ key: 'taskComment',
|
|
|
+ render:(text)=>{
|
|
|
+ return (text&&text.length>8?text.substr(0,8)+'…':text)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'操作',
|
|
|
+ dataIndex: 'caozuo',
|
|
|
+ key: 'caouzo',
|
|
|
+ render:(text,record)=>{
|
|
|
+ return <div>
|
|
|
+ {record.taskStatus==0?
|
|
|
+ <Button type="primary" style={{margin:'0 10px'}} onClick={(e)=>{e.stopPropagation(),this.evaluate(record)}}>分配任务</Button>
|
|
|
+ :''}
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ dataSourceX: [],
|
|
|
}
|
|
|
},
|
|
|
/* 分派 */
|
|
@@ -171,6 +226,8 @@ const Task = React.createClass({
|
|
|
visible: true,
|
|
|
});
|
|
|
this.xiangqing(record.id);
|
|
|
+ this.xiangqings(record.orderNo);
|
|
|
+ this.xiangmu(record.orderNo);
|
|
|
},
|
|
|
//点击修改任务详情
|
|
|
tijiaoOk(){
|
|
@@ -299,6 +356,46 @@ const Task = React.createClass({
|
|
|
contactMobile:thisdata.contactMobile,//联系人电话
|
|
|
legalPerson:thisdata.legalPerson,//法人
|
|
|
legalPersonTel:thisdata.legalPersonTel,//法人电话
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //订单详情
|
|
|
+ xiangqings(orderNos) {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context +"/api/admin/newOrder/getOrderNewDetail",
|
|
|
+ data: {
|
|
|
+ orderNo:orderNos
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ let theArr = [];
|
|
|
+
|
|
|
+ if(data.error.length || data.data.list == "") {
|
|
|
+ if(data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ let thisdata=data.data;
|
|
|
+ this.setState({
|
|
|
+ processStatus:thisdata.processStatus,//流程状态
|
|
|
+ liquidationStatus:thisdata.liquidationStatus,//结算状态
|
|
|
+ approval:thisdata.approval,//特批状态
|
|
|
+ orderRemarks:thisdata.orderRemarks,//订单留言
|
|
|
+ salesmanName:thisdata.salesmanName,//营销员名称
|
|
|
+ salesmanMobile:thisdata.salesmanMobile,//营销员电话
|
|
|
+ financeName:thisdata.financeName,//财务名称
|
|
|
+ financeMobile:thisdata.financeMobile,//财务电话
|
|
|
})
|
|
|
};
|
|
|
|
|
@@ -309,6 +406,53 @@ const Task = React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
+ //项目列表
|
|
|
+ xiangmu(orderNos) {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context +"/api/admin/newOrder/getOrderTask",
|
|
|
+ data: {
|
|
|
+ orderNo:orderNos
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ let theArr = [];
|
|
|
+
|
|
|
+ if(data.error.length || data.data.list == "") {
|
|
|
+ if(data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < data.data.length; i++) {
|
|
|
+ let thisdata = data.data[i];
|
|
|
+ theArr.push({
|
|
|
+ key: i,
|
|
|
+ id:thisdata.id,
|
|
|
+ orderNo:thisdata.orderNo,//订单编号
|
|
|
+ commodityId:thisdata.commodityId,//项目ID
|
|
|
+ commodityName:thisdata.commodityName,//项目名称
|
|
|
+ cname:thisdata.cname,//项目类别
|
|
|
+ commodityPrice:thisdata.commodityPrice,//项目价格
|
|
|
+ commodityQuantity:thisdata.commodityQuantity,//项目数量
|
|
|
+ main:thisdata.main,//是否为主要任务
|
|
|
+ taskComment:thisdata.taskComment,//任务说明
|
|
|
+ contacts:thisdata.contacts,//联系人
|
|
|
+ contactsMobile:thisdata.contactsMobile,//联系人电话
|
|
|
+ taskStatus:thisdata.taskStatus,//是否分配
|
|
|
+ });
|
|
|
+ };
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ dataSourceX: theArr,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
//关闭详情
|
|
|
visitCancel(e){
|
|
|
this.setState({
|
|
@@ -485,11 +629,41 @@ const Task = React.createClass({
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
+ label="特批立项" >
|
|
|
+ <span>{getApprovedState(this.state.approval)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="流程状态" >
|
|
|
+ <span>{getProcessStatus(this.state.processStatus)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="结算状态" >
|
|
|
+ <span>{getLiquidationStatus(this.state.liquidationStatus)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
label="订单负责人" >
|
|
|
<span>{this.state.salesmanName}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
+ label="订单负责人电话" >
|
|
|
+ <span>{this.state.salesmanMobile}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="财务负责人" >
|
|
|
+ <span>{this.state.financeName}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="财务负责人电话" >
|
|
|
+ <span>{this.state.financeMobile}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
label="客户联系人" >
|
|
|
<Input placeholder="请输入联系人名称" value={this.state.contacts} style={{width:'200px'}}
|
|
|
onChange={(e)=>{this.setState({contacts:e.target.value})}} ref="commodityQuantity"/>
|
|
@@ -613,6 +787,19 @@ const Task = React.createClass({
|
|
|
onChange={(e)=>{this.setState({taskComment:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+ <div>
|
|
|
+ <span style={{marginLeft:'50px',fontSize:'20px'}}>项目业务</span>
|
|
|
+ {this.state.processStatus==0?<Button type='primary' onClick={this.addDetailed} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加项目明细</Button>:""}
|
|
|
+ </div>
|
|
|
+ <div className="patent-table">
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Table columns={this.state.columnsX}
|
|
|
+ dataSource={this.state.dataSourceX}
|
|
|
+ pagination={this.state.paginations}
|
|
|
+ onRowClick={this.tableRowClickX}
|
|
|
+ />
|
|
|
+ </Spin>
|
|
|
+ </div>
|
|
|
<div className='clearfix'>
|
|
|
<Button className="cancel" type="primary" onClick={this.tijiaoOk} style={{marginLeft:"200px"}} htmlType="submit">保存</Button>
|
|
|
<Button className="cancel" type="ghost" onClick={this.visitCancel} style={{marginLeft:"50px"}}>取消</Button>
|