|
@@ -37,6 +37,7 @@ import './channel.less';
|
|
|
|
|
|
const {TabPane} = Tabs;
|
|
|
const { RangePicker } = DatePicker;
|
|
|
+const Option = Select.Option;
|
|
|
|
|
|
class Channel extends Component{
|
|
|
constructor(props) {
|
|
@@ -194,6 +195,7 @@ class Channel extends Component{
|
|
|
visitModul: false,
|
|
|
categoryArr:[],
|
|
|
tabsKey:'',
|
|
|
+ adminList:[],
|
|
|
}
|
|
|
this.loadData = this.loadData.bind(this);
|
|
|
this.search = this.search.bind(this);
|
|
@@ -210,6 +212,7 @@ class Channel extends Component{
|
|
|
this.blurChange = this.blurChange.bind(this);
|
|
|
this.selectAuto = this.selectAuto.bind(this);
|
|
|
this.changeAssigner = this.changeAssigner.bind(this);
|
|
|
+ this.getAdminList = this.getAdminList.bind(this);
|
|
|
}
|
|
|
|
|
|
componentWillReceiveProps (nextProps) {
|
|
@@ -224,6 +227,48 @@ class Channel extends Component{
|
|
|
this.initialization();
|
|
|
}
|
|
|
|
|
|
+ //获取渠道专员列表
|
|
|
+ getAdminList(value = '') {
|
|
|
+ this.setState({
|
|
|
+ adminListLoading:true
|
|
|
+ })
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/superviser/adminList",
|
|
|
+ data: {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 99,
|
|
|
+ name: value,
|
|
|
+ roleName: '渠道专员',
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let thedata = data.data.list;
|
|
|
+ let theArr = [];
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }else{
|
|
|
+ thedata.map(function (item, _) {
|
|
|
+ theArr.push({
|
|
|
+ value: item.id,
|
|
|
+ label: item.name,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ adminList: theArr,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(
|
|
|
+ function () {
|
|
|
+ this.setState({
|
|
|
+ adminListLoading:false
|
|
|
+ })
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
initialization(){
|
|
|
//城市
|
|
|
let provinces = [];
|
|
@@ -390,6 +435,7 @@ class Channel extends Component{
|
|
|
: this.state.addressSearch[1],
|
|
|
startTime: this.state.releaseDate[0],
|
|
|
endTime: this.state.releaseDate[1],
|
|
|
+ aid:this.state.adminValue,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
ShowModal(this);
|
|
@@ -446,6 +492,7 @@ class Channel extends Component{
|
|
|
addressSearch:[],
|
|
|
releaseDate:[],
|
|
|
statusSearch:undefined,
|
|
|
+ adminValue:undefined,
|
|
|
},()=>{
|
|
|
this.loadData();
|
|
|
})
|
|
@@ -826,6 +873,24 @@ class Channel extends Component{
|
|
|
this.setState({ releaseDate: dataString });
|
|
|
}}
|
|
|
/>
|
|
|
+ {this.props.type !== 1 ? <Select
|
|
|
+ showSearch
|
|
|
+ value={this.state.adminValue}
|
|
|
+ style={{ width: 150,marginLeft:'10px' }}
|
|
|
+ onSearch={this.getAdminList}
|
|
|
+ onSelect={(v)=>{
|
|
|
+ this.setState({
|
|
|
+ adminValue:v
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ onFocus={this.getAdminList}
|
|
|
+ filterOption={false}
|
|
|
+ placeholder="请输入渠道专员名称"
|
|
|
+ >
|
|
|
+ {this.state.adminList.map((v,k)=>(
|
|
|
+ <Option key={k} value={v.value}>{v.label}</Option>
|
|
|
+ ))}
|
|
|
+ </Select> : null}
|
|
|
<Button
|
|
|
type="primary"
|
|
|
style={{ marginLeft: "10px", marginRight: 10 }}
|