Commit 1736497e authored by 武广's avatar 武广

fix: 修改餐段 取消外卖需去除自助餐

parent 531dc6e6
......@@ -17,21 +17,13 @@ import {
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { jsonToArray } from '@/utils/utils';
import moment from 'moment';
import {
layout,
mealType,
boolOptions,
hideOptions,
infoOptions,
mealSections,
} from '../staticData/index';
import { layout, mealType, boolOptions, hideOptions, mealSections } from '../staticData/index';
import {
apiEnterpriseInfo,
apiNewEnterprise,
apiEditEnterprise,
apiEnterprisePickSelf,
} from '../service';
import style from '../style/info.less';
import MealSection from './MealSection';
import MealLimit from './MealLimit';
......@@ -170,10 +162,18 @@ const CustomerInfo = props => {
if (props.info && props.info.id && ms.length < mealTypes.length) {
await checkConfirm();
}
// 添加餐段
if (mealTypes.length < ms.length) {
if (!ms.includes('1') && ms.includes('2')) {
ms.push('1');
}
} else if (!ms.includes('1') && ms.includes('2')) {
// 去除餐段
if (ms.includes('4')) {
ms = ['4'];
} else {
ms = [];
}
}
form.setFieldsValue({
mealType: ms,
......@@ -342,13 +342,6 @@ const CustomerInfo = props => {
<Form.Item label="餐段配置" required wrapperCol={{ span: 12 }}>
<MealSection meals={meals} onChange={onChangeMealSection} />
</Form.Item>
{/* <Form.Item
label="商品展示信息"
name="xinxin"
rules={[{ required: true, message: '请选择商品展示信息!' }]}
>
<CheckboxGroup options={infoOptions} />
</Form.Item> */}
<Divider orientation="left" plain>
企业单笔消费限额
</Divider>
......
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