Commit 79830807 authored by guang.wu's avatar guang.wu

feat: 商家信息添加pop归属字段

parent 1ffd5540
......@@ -39,6 +39,9 @@ export const businessModel = [
{ label: '到店业务(服务类业务)', value: 3 },
];
// POP归属
export const POPModel = [{ label: '自营店铺', value: 1 }, { label: '大兴吉石', value: 2 }];
export const signDateTypeList = [{ label: '自商品售卖起默认一年', value: 1 }];
export const legalPersonList = [{ label: '长期', value: '长期' }];
......
......@@ -34,16 +34,14 @@ import {
businessTypeDesc,
signDateTypeList,
legalPersonList,
POPModel,
} from './data';
import { validatePhone, validateEMail, validNumber } from '@/utils/validator';
import { getErrorMessage } from '@/utils/utils';
import MapModal from '@/components/BaiduMap';
import { apiCategoryList, apiEditStoreInfo, apiRecognize } from '../service';
const { Option } = Select;
const { Item: FormItem } = Form;
const { RangePicker } = DatePicker;
const { TabPane } = Tabs;
const carID = 301008; // 汽车类商家
const fileterBrandOptions = (input, options) => options.children.includes(input);
class BusinessInfo extends Component {
......@@ -275,6 +273,24 @@ class BusinessInfo extends Component {
});
};
// 切换POP归属
onChangePOPModel = e => {
this.setState(state => {
const { businessInfo } = state;
if (e && e.length < 2) {
businessInfo.channelId = e;
} else {
businessInfo.channelId = e.filter(item => !(businessInfo.channelId || []).includes(item));
}
this.props.form.setFieldsValue({
channelId: businessInfo.channelId,
});
return {
businessInfo,
};
});
};
/* eslint-disable no-return-assign */
saveInputRef = input => (this.input = input);
......@@ -380,6 +396,20 @@ class BusinessInfo extends Component {
)}
</FormItem>
</Col>
<Col span={24}>
<FormItem label="POP归属" labelCol={{ span: 4 }}>
{getFieldDecorator('channelId', {
rules: [{ required: true, message: '请选择POP归属!' }],
initialValue: businessInfo.channelId,
})(
<Checkbox.Group
options={POPModel}
onChange={e => this.onChangePOPModel(e)}
disabled={+mainCategoryId === carID || disabled}
/>,
)}
</FormItem>
</Col>
<Col span={24}>
<FormItem label="主营类目" labelCol={{ span: 4 }}>
{getFieldDecorator('mainCategoryId', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment