|
@@ -90,7 +90,7 @@ class UpdateSales extends Component {
|
|
|
}.bind(this)
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
+ // 选中回调
|
|
|
goSelect(value) {
|
|
|
let channelid;
|
|
|
let fwList = this.state.channelArr;
|
|
@@ -104,7 +104,7 @@ class UpdateSales extends Component {
|
|
|
channelid: channelid,
|
|
|
});
|
|
|
}
|
|
|
- //渠道名称自动补全
|
|
|
+ // 渠道名称自动补全
|
|
|
channelChange(e) {
|
|
|
this.setState({
|
|
|
channelName: e
|
|
@@ -152,17 +152,20 @@ class UpdateSales extends Component {
|
|
|
}
|
|
|
return false
|
|
|
}
|
|
|
- //
|
|
|
+ // 点击修改处理
|
|
|
update() {
|
|
|
const { updatas } = this.props;
|
|
|
let defaults = JSON.parse(JSON.stringify(updatas));
|
|
|
- if (updatas.userType == null && updatas.salesType == null) {//无客户所属类型 无销售类型则可选取所有销售类型
|
|
|
+ // if (updatas.userType == null && updatas.salesType == null) {//无客户所属类型 无销售类型则可选取所有销售类型
|
|
|
+ // defaults.userType = 2
|
|
|
+ // } else {
|
|
|
+ // if (updatas.salesType != null) {
|
|
|
+ // this.isArray(ssalesType, updatas.salesType, "value") && (defaults.userType = 0);//有销售类型(私有客户)
|
|
|
+ // this.isArray(qsalesType, updatas.salesType, "value") && (defaults.userType = 1);//有销售类型(以签单客户)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if (updatas.userType == null) {//无客户所属类型时--可让其选择所有销售类型
|
|
|
defaults.userType = 2
|
|
|
- } else {
|
|
|
- if (updatas.salesType != null) {
|
|
|
- this.isArray(ssalesType, updatas.salesType, "value") && (defaults.userType = 0);//有销售类型(私有客户)
|
|
|
- this.isArray(qsalesType, updatas.salesType, "value") && (defaults.userType = 1);//有销售类型(以签单客户)
|
|
|
- }
|
|
|
}
|
|
|
this.setState({
|
|
|
datas: defaults,
|
|
@@ -196,7 +199,7 @@ class UpdateSales extends Component {
|
|
|
>
|
|
|
<Form>
|
|
|
{
|
|
|
- datas.userType != null &&
|
|
|
+ (datas.userType != null && datas.userType != 2) &&
|
|
|
<FormItem {...formItemLayout} label="客户所属类型">
|
|
|
<Select
|
|
|
placeholder="请选择客户所属类型"
|
|
@@ -223,6 +226,8 @@ class UpdateSales extends Component {
|
|
|
this.setState({
|
|
|
datas: Object.assign(datas, {
|
|
|
salesType: e,
|
|
|
+ other: "",
|
|
|
+ channelName: "",
|
|
|
}),
|
|
|
});
|
|
|
}}
|