|
@@ -3,15 +3,51 @@ import { Icon, Table, Modal, message, Spin, Input, Select, Button, Form ,Upload,
|
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import '../userMangagement.less';
|
|
|
-import {orderType} from '../../../../dataDic.js';
|
|
|
-import {getOrderType,getProjectState,getTaskStatus,getOrderChannel,getOrderState,getPaymentState,getApprovedState} from '../../../../tools.js';
|
|
|
+import {orderType,publishStatus} from '../../../../dataDic.js';
|
|
|
+import {getOrderType,getProjectState,getTaskStatus,getPublishStatus,getOrderChannel,getOrderState,getPaymentState,getApprovedState} from '../../../../tools.js';
|
|
|
|
|
|
const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
visible: false,
|
|
|
+
|
|
|
//派单
|
|
|
+ contractList:[
|
|
|
+ {
|
|
|
+ title: '姓名',
|
|
|
+ dataIndex: 'name',
|
|
|
+ key: 'name'
|
|
|
+ }, {
|
|
|
+ title: '部门',
|
|
|
+ dataIndex: 'depatrment',
|
|
|
+ key: 'depatrment'
|
|
|
+ },{
|
|
|
+ title: '联系方式',
|
|
|
+ dataIndex: 'mobile',
|
|
|
+ key: 'mobile'
|
|
|
+ },{
|
|
|
+ title: '是否为主要联系人',
|
|
|
+ dataIndex: 'major',
|
|
|
+ key: 'major',
|
|
|
+ render:(text) => {
|
|
|
+ return text?'是':"否"
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ title: '职务',
|
|
|
+ dataIndex: 'position',
|
|
|
+ key: 'position'
|
|
|
+ },{
|
|
|
+ title: '微信',
|
|
|
+ dataIndex: 'wechat',
|
|
|
+ key: 'wechat'
|
|
|
+ },{
|
|
|
+ title: 'QQ',
|
|
|
+ dataIndex: 'qq',
|
|
|
+ key: 'qq'
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
//查看基本详情基本信息
|
|
@@ -35,7 +71,10 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
};
|
|
|
this.setState({
|
|
|
orderNo:thisData.orderNo,
|
|
|
- orderList:thisData
|
|
|
+ orderList:thisData,
|
|
|
+ uid:thisData.uid,
|
|
|
+ taskId:thisData.taskId,
|
|
|
+ publishStatus:thisData.publishStatus,
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
@@ -86,6 +125,70 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
+ //点击查看联系人
|
|
|
+ seeContract(){
|
|
|
+ this.contract();
|
|
|
+ this.setState({
|
|
|
+ seeState:false,
|
|
|
+ orderVisible:true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ orderCancel(){
|
|
|
+ this.setState({
|
|
|
+ orderVisible:false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //查看联系人
|
|
|
+ contract(){
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/customer/findAllContacts',
|
|
|
+ data: {
|
|
|
+ uid: this.state.uid
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let thisData = data.data;
|
|
|
+ if (!thisData) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ thisData = {};
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ contractArr:thisData,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //修改公示状态
|
|
|
+ changePublishStatus(){
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/techproject/updatePublishStatus',
|
|
|
+ data: {
|
|
|
+ taskId:this.state.taskId,
|
|
|
+ publishStatus:this.state.publishStatus,
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let thisData = data.data;
|
|
|
+ if (!thisData) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ thisData = {};
|
|
|
+ }
|
|
|
+ message.success('修改成功');
|
|
|
+ }.bind(this),
|
|
|
+ })
|
|
|
+ },
|
|
|
componentWillMount() {
|
|
|
|
|
|
},
|
|
@@ -99,6 +202,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
this.setState({
|
|
|
visible:false
|
|
|
})
|
|
|
+ this.props.closeShow(false)
|
|
|
},
|
|
|
render() {
|
|
|
const FormItem = Form.Item
|
|
@@ -119,10 +223,17 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
<Form layout="horizontal" id="demand-form" style={{paddingBottom:'40px'}} >
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<div className="clearfix">
|
|
|
- <FormItem className="half-item"
|
|
|
+ <FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="客户名称" >
|
|
|
<span>{orderDetaiel.buyerName}</span>
|
|
|
+ {orderDetaiel.buyerName&&<Button onClick={this.seeContract} style={{float:'right',fontSize:'12px'}}>查看联系人</Button>}
|
|
|
+ </FormItem>
|
|
|
+
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="营销员名称" >
|
|
|
+ <span>{orderDetaiel.salesmanName}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -130,6 +241,12 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
<span>{orderDetaiel.orderNo}</span>
|
|
|
{/*<Button style={{float:'right'}} onClick={this.seeOrder}>查看订单</Button>*/}
|
|
|
</FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="合同编号" >
|
|
|
+ <span>{orderDetaiel.contractNo}</span>
|
|
|
+ {/*<Button style={{float:'right'}} onClick={this.seeOrder}>查看订单</Button>*/}
|
|
|
+ </FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="项目编号" >
|
|
@@ -156,6 +273,23 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
label="是否锁定" >
|
|
|
<span>{orderDetaiel.deletedSign==2?'锁定':'未锁定'}</span>
|
|
|
</FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="公示状态" >
|
|
|
+ {orderDetaiel.taskStatus==3?<span><Select placeholder="请选择公示状态"
|
|
|
+ style={{ width:'150px'}}
|
|
|
+ value={getPublishStatus(this.state.publishStatus)}
|
|
|
+ onChange={(e)=>{this.setState({publishStatus:e})}}>
|
|
|
+ {
|
|
|
+ publishStatus.map(function (item) {
|
|
|
+ return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
+ <Button onClick={this.changePublishStatus} style={{marginLeft:'10px',fontSize:'12px'}}>修改公示状态</Button></span>:<span>{getPublishStatus(orderDetaiel.publishStatus)}</span>
|
|
|
+
|
|
|
+ }
|
|
|
+ </FormItem>
|
|
|
<div className='clearfix'>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -180,107 +314,136 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
<span>{orderDetaiel.taskReceiverName}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单留言" >
|
|
|
+ <span>{orderDetaiel.orderRemarks}</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</Spin>
|
|
|
</Form >
|
|
|
</Modal>
|
|
|
<Modal maskClosable={false} visible={this.state.seeOrderVisible}
|
|
|
- onOk={this.seeOrderCancel} onCancel={this.seeOrderCancel}
|
|
|
- width='1000px'
|
|
|
- title= '查看订单'
|
|
|
- footer=''
|
|
|
- className="admin-desc-content">
|
|
|
- <Form layout="horizontal" id="demand-form">
|
|
|
- <Spin spinning={this.state.loading}>
|
|
|
- <div className="clearfix">
|
|
|
- <div className="clearfix">
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="订单编号" >
|
|
|
- <span>{seeOrderDetaiel.orderNo}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="下单时间" >
|
|
|
- <span>{seeOrderDetaiel.createTime}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="客户名称" >
|
|
|
- <span>{seeOrderDetaiel.buyerName}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="订单类型" >
|
|
|
- <span>{getOrderType(seeOrderDetaiel.orderType)}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="订单渠道" >
|
|
|
- <span>{getOrderChannel(seeOrderDetaiel.orderChannel)}</span>
|
|
|
- </FormItem>
|
|
|
+ onOk={this.seeOrderCancel} onCancel={this.seeOrderCancel}
|
|
|
+ width='1000px'
|
|
|
+ title= '查看订单'
|
|
|
+ footer=''
|
|
|
+ className="admin-desc-content">
|
|
|
+ <Form layout="horizontal" id="demand-form">
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div className="clearfix">
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单编号" >
|
|
|
+ <span>{seeOrderDetaiel.orderNo}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="下单时间" >
|
|
|
+ <span>{seeOrderDetaiel.createTime}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="客户名称" >
|
|
|
+ <span>{seeOrderDetaiel.buyerName}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单类型" >
|
|
|
+ <span>{getOrderType(seeOrderDetaiel.orderType)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单渠道" >
|
|
|
+ <span>{getOrderChannel(seeOrderDetaiel.orderChannel)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单状态" >
|
|
|
+ <span>{getOrderState(seeOrderDetaiel.orderStatus)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <div className='clearfix'>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label="订单状态" >
|
|
|
- <span>{getOrderState(seeOrderDetaiel.orderStatus)}</span>
|
|
|
+ label="特批立项" >
|
|
|
+ <span>{getApprovedState(seeOrderDetaiel.approval)}</span>
|
|
|
</FormItem>
|
|
|
- <div className='clearfix'>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="特批立项" >
|
|
|
- <span>{getApprovedState(seeOrderDetaiel.approval)}</span>
|
|
|
- </FormItem>
|
|
|
- <div className='clearfix'>
|
|
|
- <FormItem
|
|
|
- labelCol={{ span: 4 }}
|
|
|
- wrapperCol={{ span: 16 }}
|
|
|
- label="订单留言" >
|
|
|
- <span>{seeOrderDetaiel.orderRemarks}</span>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
+ label="订单留言" >
|
|
|
+ <span>{seeOrderDetaiel.orderRemarks}</span>
|
|
|
+ </FormItem>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div className='clearfix'>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="订单负责人" >
|
|
|
- <span>{seeOrderDetaiel.salesmanName}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="意向时间" >
|
|
|
- <span>{seeOrderDetaiel.createTime}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="签单时间" >
|
|
|
- <span>{seeOrderDetaiel.signTime}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="财务负责人" >
|
|
|
- <span>{seeOrderDetaiel.financeName}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="项目负责人" >
|
|
|
- <span>{seeOrderDetaiel.technicianName}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="立项时间" >
|
|
|
- <span>{seeOrderDetaiel.setUpTime}</span>
|
|
|
- </FormItem>
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="项目状态" >
|
|
|
- <span>{getProjectState(seeOrderDetaiel.projectStage)}</span>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单负责人" >
|
|
|
+ <span>{seeOrderDetaiel.salesmanName}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="意向时间" >
|
|
|
+ <span>{seeOrderDetaiel.createTime}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="签单时间" >
|
|
|
+ <span>{seeOrderDetaiel.signTime}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="财务负责人" >
|
|
|
+ <span>{seeOrderDetaiel.financeName}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="项目负责人" >
|
|
|
+ <span>{seeOrderDetaiel.technicianName}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="立项时间" >
|
|
|
+ <span>{seeOrderDetaiel.setUpTime}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="项目状态" >
|
|
|
+ <span>{getProjectState(seeOrderDetaiel.projectStage)}</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Spin>
|
|
|
+ </Form >
|
|
|
+ </Modal>
|
|
|
+ <Modal maskClosable={false} visible={this.state.orderVisible}
|
|
|
+ onOk={this.orderCancel} onCancel={this.orderCancel}
|
|
|
+ width='800px'
|
|
|
+ title={this.state.seeState?'查看订单':'查看联系人'}
|
|
|
+ footer=''
|
|
|
+ className="admin-desc-content">
|
|
|
+ <Form layout="horizontal" id="demand-form" style={{paddingBottom:'40px'}} >
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div className="patent-table" style={{marginTop:'10px'}}>
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ {this.state.seeState?
|
|
|
+ <div className="clearfix">
|
|
|
+ </div>:
|
|
|
+ <Table columns={this.state.contractList}
|
|
|
+ dataSource={this.state.contractArr}
|
|
|
+ pagination={false}
|
|
|
+ />}
|
|
|
+ </Spin>
|
|
|
+ </div>
|
|
|
</Spin>
|
|
|
- </Form >
|
|
|
- </Modal>
|
|
|
+ </Form>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
)
|
|
|
}
|