Commit 285552a9 authored by 张子雨's avatar 张子雨

Merge branch 'feat/constructionOne' into feature/20230327_public_takeaway

* feat/constructionOne:
  feat: 添加校验
  feat: 添加校验
parents e66130ff 70c67302
......@@ -107,6 +107,8 @@ export async function getInfo() {
const dataList = await apiCategoryList(res.productBusiness);
categoryList = dataList.data;
}
// 判断是否包含到店类型
const storedis = res.productBusiness?.includes(3);
this.setState({
settlementType,
businessInfo: res,
......@@ -114,6 +116,7 @@ export async function getInfo() {
companyNamedis,
categoryList,
mainCategoryId: res.mainCategoryId,
storedis,
});
}
......
......@@ -52,7 +52,7 @@ const { Option } = Select;
const { Item: FormItem } = Form;
const { RangePicker } = DatePicker;
const { TabPane } = Tabs;
const carID = 301008; // 汽车类商家
class BusinessInfo extends Component {
getFieldDecorator = this.props?.form?.getFieldDecorator;
......@@ -82,6 +82,7 @@ class BusinessInfo extends Component {
checkboxDisabled: false,
mainCategoryId: null,
companyNamedis: false, // 公司名称
storedis: true, // 到店校验
};
async componentDidMount() {
......@@ -321,7 +322,9 @@ class BusinessInfo extends Component {
}
onChangeBusinessModel = e => {
const storedis = e.includes(3);
this.getCategoryList(e);
this.setState({ storedis });
this.props.form.setFieldsValue({
mainCategoryId: '',
});
......@@ -338,7 +341,14 @@ class BusinessInfo extends Component {
const {
form: { getFieldDecorator },
} = this.props;
const { businessInfo, type, checkboxDisabled, mainCategoryId, companyNamedis } = this.state;
const {
businessInfo,
type,
checkboxDisabled,
mainCategoryId,
companyNamedis,
storedis,
} = this.state;
return (
<div className={styles.infoBox}>
<Form className="login-form" onSubmit={this.handleSubmit} {...formItemLayout}>
......@@ -417,6 +427,8 @@ class BusinessInfo extends Component {
})(<Input />)}
</FormItem>
</Col>
{+mainCategoryId !== carID && (
<>
<Col span={12}>
<FormItem label="客服电话" labelCol={{ span: 5 }}>
{getFieldDecorator('servicePhone', {
......@@ -433,6 +445,8 @@ class BusinessInfo extends Component {
})(<Checkbox.Group options={signDateTypeList} />)}
</FormItem>
</Col>
</>
)}
</Row>
</Card>
<Card title="店铺营业信息">
......@@ -451,7 +465,8 @@ class BusinessInfo extends Component {
)}
</FormItem>
</Col>
{+mainCategoryId !== carID && (
<>
<Col span={24}>
<FormItem label="服务设施" labelCol={{ span: 4 }}>
{getFieldDecorator('selfList', {
......@@ -474,6 +489,8 @@ class BusinessInfo extends Component {
})(renderServiceTags.call(this))}
</FormItem>
</Col>
</>
)}
</Card>
<Card title="证照信息录入区">
<Row gutter={24}>
......@@ -500,6 +517,7 @@ class BusinessInfo extends Component {
)}
</FormItem>
</Col>
{+mainCategoryId !== carID && (
<Col span={24}>
<FormItem label="企业类型" labelCol={{ span: 4 }}>
{getFieldDecorator('companyType', {
......@@ -514,6 +532,8 @@ class BusinessInfo extends Component {
)}
</FormItem>
</Col>
)}
<Col span={24} className={styles.imgList}>
<FormItem label="营业执照" labelCol={{ span: 4 }} wrapperCol={wrapperCol}>
{getFieldDecorator('businessLicenseImage', {
......@@ -533,6 +553,8 @@ class BusinessInfo extends Component {
)}
</FormItem>
</Col>
{+mainCategoryId !== carID && (
<>
<Col span={12}>
<Row>
<Col span={4} style={{ marginTop: '4px' }}>
......@@ -558,10 +580,16 @@ class BusinessInfo extends Component {
})(<Input maxLength={32} />)}
</FormItem>
</Col>
{(!companyNamedis && businessInfo.companyType && businessInfo.companyType !== 2) ||
{(!companyNamedis &&
businessInfo.companyType &&
businessInfo.companyType !== 2) ||
(!companyNamedis && businessInfo?.icbProofImage?.length) ? (
<Col span={12}>
<FormItem label="工商局变更证明" labelCol={{ span: 8 }} wrapperCol={wrapperCol}>
<FormItem
label="工商局变更证明"
labelCol={{ span: 8 }}
wrapperCol={wrapperCol}
>
{getFieldDecorator('icbProofImage', {
rules: [{ required: true, message: '请上传工商局变更证明!' }],
initialValue: businessInfo.icbProofImage,
......@@ -581,7 +609,9 @@ class BusinessInfo extends Component {
) : (
''
)}
{(!companyNamedis && businessInfo.companyType && businessInfo.companyType === 2) ||
{(!companyNamedis &&
businessInfo.companyType &&
businessInfo.companyType === 2) ||
(!companyNamedis && businessInfo?.householdRegisterImage?.length) ? (
<Col span={12}>
<FormItem label="户口本本人页" labelCol={{ span: 8 }} wrapperCol={wrapperCol}>
......@@ -650,7 +680,9 @@ class BusinessInfo extends Component {
)}
</FormItem>
</Col>
{+mainCategoryId === 301008 && (
</>
)}
{(+mainCategoryId === carID || storedis) && (
<>
<Col span={24}>
<FormItem label="授权品牌" labelCol={{ span: 4 }}>
......@@ -686,8 +718,14 @@ class BusinessInfo extends Component {
</Card>
<Card title="法人信息录入区">
<Row gutter={24}>
{+mainCategoryId !== carID && (
<>
<Col span={12} className={styles.imgList}>
<FormItem label="法人身份证人像面" labelCol={{ span: 8 }} wrapperCol={wrapperCol}>
<FormItem
label="法人身份证人像面"
labelCol={{ span: 8 }}
wrapperCol={wrapperCol}
>
{getFieldDecorator('idCardPortraitImage', {
rules: [{ required: true, message: '请上传身份证人像面!' }],
initialValue: businessInfo.idCardPortraitImage,
......@@ -707,7 +745,11 @@ class BusinessInfo extends Component {
</FormItem>
</Col>
<Col span={12} className={styles.imgList}>
<FormItem label="法人身份证国徽面" labelCol={{ span: 8 }} wrapperCol={wrapperCol}>
<FormItem
label="法人身份证国徽面"
labelCol={{ span: 8 }}
wrapperCol={wrapperCol}
>
{getFieldDecorator('idCardEmblemImage', {
rules: [{ required: true, message: '请上传身份证国徽面!' }],
initialValue: businessInfo.idCardEmblemImage,
......@@ -779,6 +821,8 @@ class BusinessInfo extends Component {
</Col>
</Row>
</Col>
</>
)}
<Col span={12}>
<FormItem label="手机号" labelCol={{ span: 8 }}>
{getFieldDecorator('legalPersonPhone', {
......@@ -790,6 +834,7 @@ class BusinessInfo extends Component {
})(<Input maxLength={11} />)}
</FormItem>
</Col>
{+mainCategoryId !== carID && (
<Col span={24}>
<FormItem label="其它证照" labelCol={{ span: 4 }} wrapperCol={wrapperCol}>
{getFieldDecorator('otherImage', {
......@@ -804,9 +849,12 @@ class BusinessInfo extends Component {
)}
</FormItem>
</Col>
)}
</Row>
</Card>
<Card title="结算信息录入区">
{+mainCategoryId !== carID && (
<>
<Row gutter={24}>
<Col span={24}>
<FormItem label="账户类型" labelCol={{ span: 4 }} wrapperCol={wrapperCol}>
......@@ -972,9 +1020,69 @@ class BusinessInfo extends Component {
</Col>
</Row>
)}
</>
)}
{+mainCategoryId === carID && (
<Row gutter={24}>
<Col span={12}>
<FormItem label="开户许可证" labelCol={{ span: 8 }} wrapperCol={wrapperCol}>
{getFieldDecorator('accountOpenPermitImage', {
rules: [{ required: true, message: '请上传开户许可证!' }],
initialValue: businessInfo.accountOpenPermitImage,
})(
<Upload
{...uploadPropsFn.call(this, {
keyName: 'accountOpenPermitImage',
type: 8,
})}
fileList={businessInfo.accountOpenPermitImage}
>
<UploadOutlined /> 上传文件
</Upload>,
)}
</FormItem>
</Col>
<Col span={12}>
<FormItem label="开户名称" labelCol={{ span: 8 }}>
{getFieldDecorator('bankAccountName', {
rules: [{ required: true, message: '请输入开户名称!' }],
initialValue: businessInfo.bankAccountName,
})(<Input maxLength={32} />)}
</FormItem>
</Col>
<Col span={12}>
<FormItem label="开户行" labelCol={{ span: 8 }}>
{getFieldDecorator('accountBankName', {
rules: [{ required: true, message: '请选择开户行!' }],
initialValue: businessInfo.accountBankName,
})(
<Select
showSearch
filterOption={(input, option) =>
(option?.value ?? '').toLowerCase().includes(input.toLowerCase())
}
>
{this.state.bankList.map(item => (
<Option value={item.bankName} key={item.bankName}>
{item.bankName}
</Option>
))}
</Select>,
)}
</FormItem>
</Col>
<Col span={12}>
<FormItem label="银行帐号" labelCol={{ span: 8 }}>
{getFieldDecorator('bankAccount', {
rules: [{ required: true, message: '请输入银行帐号!' }],
initialValue: businessInfo.bankAccount,
})(<Input maxLength={20} />)}
</FormItem>
</Col>
</Row>
)}
</Card>
{/* 汽车301008 */}
{+mainCategoryId === 301008 ? (
{(+mainCategoryId === carID || storedis) && (
<Card title="其他信息">
<Row gutter={24}>
<Col span={24}>
......@@ -987,8 +1095,6 @@ class BusinessInfo extends Component {
</Col>
</Row>
</Card>
) : (
''
)}
<div className={styles.formBtns}>
......
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