|
@@ -68,75 +68,65 @@ const Business = React.createClass({
|
|
|
key: 'ooo',
|
|
|
render: (text, record) => {
|
|
|
const dataSources = this.state.customerArr || [];
|
|
|
- console.log(this.state.customerArr);
|
|
|
const options = dataSources.map(group => (
|
|
|
<Select.Option key={group.id} value={group.name}>
|
|
|
{group.name}
|
|
|
</Select.Option>
|
|
|
));
|
|
|
return (
|
|
|
- <div className="control">
|
|
|
- <Button
|
|
|
- onClick={e => {
|
|
|
- this.businessIntentionDetails(record);
|
|
|
- }}
|
|
|
- >
|
|
|
- 查看
|
|
|
- </Button>
|
|
|
- <AutoComplete
|
|
|
- className="certain-category-search"
|
|
|
- dropdownClassName="certain-category-search-dropdown"
|
|
|
- dropdownMatchSelectWidth={false}
|
|
|
- dropdownStyle={{ width: 120 }}
|
|
|
- style={{
|
|
|
- width: "120px",
|
|
|
- marginLeft: 10,
|
|
|
- visibility:
|
|
|
- this.state.selectedRowKeys[0] == record.businessProjectId &&
|
|
|
- record.followSituation == 5
|
|
|
- ? "visible"
|
|
|
- : "hidden"
|
|
|
- }}
|
|
|
- dataSource={options}
|
|
|
- placeholder="输入转交人姓名"
|
|
|
- onChange={this.httpChange}
|
|
|
- filterOption={true}
|
|
|
- onBlur={this.blurChange}
|
|
|
- onSelect={this.selectAuto}
|
|
|
- >
|
|
|
- <Input />
|
|
|
- </AutoComplete>
|
|
|
- <Button
|
|
|
- style={{ marginLeft: 10 }}
|
|
|
- onClick={e => {
|
|
|
- this.changeBusiness(record);
|
|
|
- }}
|
|
|
- style={{
|
|
|
- marginLeft: 10,
|
|
|
- visibility:
|
|
|
- this.state.selectedRowKeys[0] == record.businessProjectId &&
|
|
|
- record.followSituation == 5
|
|
|
- ? "visible"
|
|
|
- : "hidden"
|
|
|
- }}
|
|
|
- >
|
|
|
- 转交业务
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
+ <div className="control">
|
|
|
+ <Button
|
|
|
+ onClick={e => {
|
|
|
+ this.businessIntentionDetails(record);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </Button>
|
|
|
+ <AutoComplete
|
|
|
+ className="certain-category-search"
|
|
|
+ dropdownClassName="certain-category-search-dropdown"
|
|
|
+ dropdownMatchSelectWidth={false}
|
|
|
+ dropdownStyle={{ width: 120 }}
|
|
|
+ style={{
|
|
|
+ width: "120px",
|
|
|
+ marginLeft: 10,
|
|
|
+ transition: "all .5s",
|
|
|
+ display:
|
|
|
+ record.followSituation == 5
|
|
|
+ ? "inline-block"
|
|
|
+ : "none"
|
|
|
+ }}
|
|
|
+ dataSource={options}
|
|
|
+ placeholder="输入转交人姓名"
|
|
|
+ onChange={this.httpChange}
|
|
|
+ filterOption={true}
|
|
|
+ onBlur={this.blurChange}
|
|
|
+ onSelect={this.selectAuto}
|
|
|
+ >
|
|
|
+ <Input />
|
|
|
+ </AutoComplete>
|
|
|
+ <Button
|
|
|
+ style={{ marginLeft: 10 }}
|
|
|
+ onClick={e => {
|
|
|
+ this.changeBusiness(record);
|
|
|
+ }}
|
|
|
+ type={"primary"}
|
|
|
+ style={{
|
|
|
+ marginLeft: 10,
|
|
|
+ transition: "all .5s",
|
|
|
+ display:
|
|
|
+ record.followSituation == 5
|
|
|
+ ? "inline-block"
|
|
|
+ : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 转交业务
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
); }
|
|
|
}],
|
|
|
}
|
|
|
},
|
|
|
- componentDidMount() {
|
|
|
- // console.log(document.querySelectorAll(".control"));
|
|
|
- window.setTimeout(() => {
|
|
|
- let dom = document.querySelectorAll(".control")
|
|
|
- for(let i = 0; i < dom.length; i++) {
|
|
|
- document.querySelectorAll(".control")[i].parentNode.style.width = "300px"
|
|
|
- }
|
|
|
- },100)
|
|
|
-
|
|
|
- },
|
|
|
//指定转交人自动补全
|
|
|
supervisor(e){
|
|
|
$.ajax({
|
|
@@ -160,7 +150,6 @@ const Business = React.createClass({
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
|
- console.log(this.state.customerArr);
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
@@ -171,7 +160,6 @@ const Business = React.createClass({
|
|
|
this.setState({
|
|
|
auto:value
|
|
|
})
|
|
|
- console.log(this.state.auto);
|
|
|
|
|
|
},
|
|
|
blurChange(e){
|
|
@@ -187,7 +175,6 @@ const Business = React.createClass({
|
|
|
this.setState({
|
|
|
theTypes:theType
|
|
|
})
|
|
|
- console.log(this.state.theTypes);
|
|
|
|
|
|
},
|
|
|
//值改变时请求客户名称
|
|
@@ -230,7 +217,7 @@ const Business = React.createClass({
|
|
|
for(let i = 0; i < data.data.list.length; i++) {
|
|
|
let thisdata = data.data.list[i];
|
|
|
theArr.push({
|
|
|
- key: thisdata.businessProjectId,
|
|
|
+ key: i,
|
|
|
businessId: thisdata.businessId,
|
|
|
businessProjectId:thisdata.businessProjectId,
|
|
|
businessName: thisdata.businessName,
|
|
@@ -252,15 +239,26 @@ const Business = React.createClass({
|
|
|
dataBusiness: theArr,
|
|
|
paginationt: this.state.paginationt||[]
|
|
|
});
|
|
|
+ console.log(this.state.dataBusiness);
|
|
|
+
|
|
|
}.bind(this),
|
|
|
}).always(function() {
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
+ window.setTimeout(() => {
|
|
|
+ let dom = document.querySelectorAll(".control");
|
|
|
+ for (let i = 0; i < dom.length; i++) {
|
|
|
+ document.querySelectorAll(".control")[i].parentNode.style.width =
|
|
|
+ "300px";
|
|
|
+ }
|
|
|
+ }, 100);
|
|
|
}.bind(this));
|
|
|
},
|
|
|
componentWillMount(){
|
|
|
this.BusinessList();
|
|
|
+ console.log(this.state.dataBusiness);
|
|
|
+
|
|
|
},
|
|
|
detailsModal(){
|
|
|
this.props.closeDetail(false, false)
|
|
@@ -274,7 +272,6 @@ const Business = React.createClass({
|
|
|
})
|
|
|
},
|
|
|
changeBusiness(e) {
|
|
|
- console.log(e);
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -295,6 +292,8 @@ const Business = React.createClass({
|
|
|
};
|
|
|
} else {
|
|
|
message.success("转交成功!")
|
|
|
+ this.props.closeDesc(false,true)
|
|
|
+ this.props.closeDetail()
|
|
|
this.BusinessList()
|
|
|
this.setState({
|
|
|
selectedRowKeys: []
|
|
@@ -308,18 +307,14 @@ const Business = React.createClass({
|
|
|
}.bind(this));
|
|
|
},
|
|
|
onSelectChange(selectedRowKeys) {
|
|
|
- console.log(selectedRowKeys);
|
|
|
this.setState({
|
|
|
- selectedRowKeys
|
|
|
+ selectedRowKeys,
|
|
|
+ businessModul: false
|
|
|
})
|
|
|
},
|
|
|
render(){
|
|
|
- const { selectedRowKeys } = this.state;
|
|
|
- const rowSelection = {
|
|
|
- selectedRowKeys,
|
|
|
- onChange: this.onSelectChange,
|
|
|
- type: "radio"
|
|
|
- };
|
|
|
+ console.log("数组",this.state.dataBusiness);
|
|
|
+
|
|
|
return (
|
|
|
<div className="clearfix">
|
|
|
<Spin spinning={this.state.loading}>
|
|
@@ -327,7 +322,6 @@ const Business = React.createClass({
|
|
|
pagination={this.state.paginationt}
|
|
|
columns={this.state.businessIntentionList}
|
|
|
dataSource={this.state.dataBusiness}
|
|
|
- rowSelection={rowSelection}
|
|
|
/>
|
|
|
</Spin>
|
|
|
<BusinessDetail
|