|
@@ -3,7 +3,7 @@ import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import {Modal,Form,layout,Radio,Button,Input,Spin,Table,Select,Popconfirm,message} from 'antd';
|
|
|
import {intentionalService,newFollow,customerStatus} from '@/dataDic.js';
|
|
|
-import {getCompanyIntention,getContactType} from '@/tools.js';
|
|
|
+import {getCompanyIntention,getContactType,getfllowSituation,getcustomerStatue} from '@/tools.js';
|
|
|
const FormItem =Form.Item;
|
|
|
import BusName from '../../followDetail/businessName.jsx';
|
|
|
|
|
@@ -57,13 +57,17 @@ const VisitDetail = React.createClass({
|
|
|
dataIndex: 'followSituation',
|
|
|
key: 'followSituation',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Select placeholder="选择最新进度" value={record.followSituation} onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
|
|
|
- {
|
|
|
- newFollow.map(function (item) {
|
|
|
- return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
- })
|
|
|
- }
|
|
|
- </Select>
|
|
|
+ return <div>
|
|
|
+ {!record.readOnly?<Select placeholder="选择最新进度" value={record.followSituation} onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
|
|
|
+ {
|
|
|
+ newFollow.map(function (item) {
|
|
|
+ return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>:
|
|
|
+ <span>{getfllowSituation(text)}</span>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
}
|
|
|
}, {
|
|
|
title: '最新状态',
|
|
@@ -71,13 +75,15 @@ const VisitDetail = React.createClass({
|
|
|
dataIndex: 'customerStatus',
|
|
|
key: 'customerStatus',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
|
|
|
+ return <div>{!record.readOnly?<Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
|
|
|
{
|
|
|
customerStatus.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
})
|
|
|
}
|
|
|
- </Select>
|
|
|
+ </Select>:
|
|
|
+ <span>{getcustomerStatue(text)}</span>
|
|
|
+ }</div>
|
|
|
}
|
|
|
}, {
|
|
|
title: '跟进说明',
|
|
@@ -85,9 +91,13 @@ const VisitDetail = React.createClass({
|
|
|
dataIndex: 'remarks',
|
|
|
key: 'remarks',
|
|
|
render: (text, record, index) => {
|
|
|
- return <Input value={record.remarks} placeholder="跟进说明"
|
|
|
- onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
|
|
|
- style={{width:'120px'}}/>
|
|
|
+ return <div>
|
|
|
+ {!record.readOnly?<Input value={record.remarks} placeholder="跟进说明"
|
|
|
+ onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
|
|
|
+ style={{width:'120px'}}/>:
|
|
|
+ <span>{text}</span>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
}
|
|
|
}, {
|
|
|
title: '操作',
|
|
@@ -95,9 +105,9 @@ const VisitDetail = React.createClass({
|
|
|
key: 'rrr',
|
|
|
render: (text, record, index) => {
|
|
|
return <div>
|
|
|
- <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record,index)}} okText="删除" cancelText="不删除">
|
|
|
+ {!record.readOnly&&<Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record,index)}} okText="删除" cancelText="不删除">
|
|
|
<Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
|
|
|
- </Popconfirm>
|
|
|
+ </Popconfirm>}
|
|
|
</div>
|
|
|
}
|
|
|
}
|
|
@@ -156,6 +166,7 @@ const VisitDetail = React.createClass({
|
|
|
let thisdata = data.data.userBusinessList[i];
|
|
|
theArr.push({
|
|
|
id: thisdata.ufbId,
|
|
|
+ readOnly:this.props.followData.readOnly,
|
|
|
businessName:thisdata.businessProjectId,
|
|
|
businessGlossoryId:i,
|
|
|
businessVarietiesName:thisdata.businessVarietiesName,
|