Commit 51590935 authored by 张子雨's avatar 张子雨

feat: 去掉到店判断

parent c10b9ec3
...@@ -112,8 +112,6 @@ export async function getInfo() { ...@@ -112,8 +112,6 @@ export async function getInfo() {
const dataList = await apiCategoryList(res.productBusiness); const dataList = await apiCategoryList(res.productBusiness);
categoryList = dataList.data; categoryList = dataList.data;
} }
// 判断是否包含到店类型
const storedis = res.productBusiness?.includes(3);
this.setState({ this.setState({
settlementType, settlementType,
businessInfo: res, businessInfo: res,
...@@ -121,7 +119,6 @@ export async function getInfo() { ...@@ -121,7 +119,6 @@ export async function getInfo() {
companyNamedis, companyNamedis,
categoryList, categoryList,
mainCategoryId: res.mainCategoryId, mainCategoryId: res.mainCategoryId,
storedis,
}); });
} }
......
...@@ -82,7 +82,6 @@ class BusinessInfo extends Component { ...@@ -82,7 +82,6 @@ class BusinessInfo extends Component {
checkboxDisabled: false, checkboxDisabled: false,
mainCategoryId: null, mainCategoryId: null,
companyNamedis: false, // 公司名称 companyNamedis: false, // 公司名称
storedis: true, // 到店校验
}; };
async componentDidMount() { async componentDidMount() {
...@@ -331,9 +330,7 @@ class BusinessInfo extends Component { ...@@ -331,9 +330,7 @@ class BusinessInfo extends Component {
} }
onChangeBusinessModel = e => { onChangeBusinessModel = e => {
const storedis = e.includes(3);
this.getCategoryList(e); this.getCategoryList(e);
this.setState({ storedis });
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
mainCategoryId: '', mainCategoryId: '',
}); });
...@@ -350,14 +347,7 @@ class BusinessInfo extends Component { ...@@ -350,14 +347,7 @@ class BusinessInfo extends Component {
const { const {
form: { getFieldDecorator }, form: { getFieldDecorator },
} = this.props; } = this.props;
const { const { businessInfo, type, checkboxDisabled, mainCategoryId, companyNamedis } = this.state;
businessInfo,
type,
checkboxDisabled,
mainCategoryId,
companyNamedis,
storedis,
} = this.state;
return ( return (
<div className={styles.infoBox}> <div className={styles.infoBox}>
<Form className="login-form" onSubmit={this.handleSubmit} {...formItemLayout}> <Form className="login-form" onSubmit={this.handleSubmit} {...formItemLayout}>
...@@ -691,7 +681,7 @@ class BusinessInfo extends Component { ...@@ -691,7 +681,7 @@ class BusinessInfo extends Component {
</Col> </Col>
</> </>
)} )}
{(+mainCategoryId === carID || storedis) && ( {+mainCategoryId === carID && (
<> <>
<Col span={24}> <Col span={24}>
<FormItem label="授权品牌" labelCol={{ span: 4 }}> <FormItem label="授权品牌" labelCol={{ span: 4 }}>
...@@ -1091,7 +1081,7 @@ class BusinessInfo extends Component { ...@@ -1091,7 +1081,7 @@ class BusinessInfo extends Component {
</Row> </Row>
)} )}
</Card> </Card>
{(+mainCategoryId === carID || storedis) && ( {+mainCategoryId === carID && (
<Card title="其他信息"> <Card title="其他信息">
<Row gutter={24}> <Row gutter={24}>
<Col span={24}> <Col span={24}>
......
...@@ -261,6 +261,7 @@ const StoreModal = props => { ...@@ -261,6 +261,7 @@ const StoreModal = props => {
width="1000px" width="1000px"
destroyOnClose destroyOnClose
maskClosable={false} maskClosable={false}
onCancel={() => handleCancel()}
footer={ footer={
<> <>
<Button key="back" onClick={() => handleCancel()}> <Button key="back" onClick={() => handleCancel()}>
......
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