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

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

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