Commit a417e1098e1711e805286b6318f6ef23e9455df3

Authored by 莫红玲
1 parent 717786dc

feat(mkt): 活动变更优惠券不支持删除调整

src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/Coupons.tsx
... ... @@ -223,7 +223,7 @@ export default function Coupons({ awardWay, mulLottery, value, onChange, remove,
223 223 onClick={() => {
224 224 remove && remove(name);
225 225 }}
226   - // disabled={readOnly}
  226 + // disabled={readOnly}
227 227 />
228 228 )}
229 229  
... ... @@ -251,7 +251,7 @@ export default function Coupons({ awardWay, mulLottery, value, onChange, remove,
251 251 setVisible(true);
252 252 setNoRewad(false);
253 253 }}
254   - // disabled={readOnly}
  254 + // disabled={readOnly}
255 255 >
256 256 新增
257 257 </Button>
... ... @@ -275,12 +275,12 @@ export default function Coupons({ awardWay, mulLottery, value, onChange, remove,
275 275 onClick={
276 276 changeEnable
277 277 ? () => {
278   - // setVisible(true);
279   - setNoRewad(false);
280   - SetCurrentItem(record);
281   - setItemIndex(index);
282   - setVisible(true);
283   - }
  278 + // setVisible(true);
  279 + setNoRewad(false);
  280 + SetCurrentItem(record);
  281 + setItemIndex(index);
  282 + setVisible(true);
  283 + }
284 284 : undefined
285 285 }
286 286 >
... ... @@ -325,7 +325,7 @@ export default function Coupons({ awardWay, mulLottery, value, onChange, remove,
325 325 {itemIndex + 1}.{item.aliasName}
326 326 </span>
327 327 </Button>
328   - {((item.aliasName && !readOnly) || changeEnable) && (
  328 + {(item.aliasName && !readOnly) && (
329 329 <Popconfirm
330 330 title="删除将丢失优惠券信息,确定删除?"
331 331 okText="确定"
... ... @@ -432,15 +432,15 @@ export default function Coupons({ awardWay, mulLottery, value, onChange, remove,
432 432 wrapperCol={{ span: 16 }}
433 433 onFinish={_onOk}
434 434 autoComplete="off"
435   - // initialValues={{
436   - // awardName: (awardWay === 2 && noReward) ? "谢谢惠顾" : "",
437   - // }}
  435 + // initialValues={{
  436 + // awardName: (awardWay === 2 && noReward) ? "谢谢惠顾" : "",
  437 + // }}
438 438 >
439 439 <Form.Item
440 440 label="奖项名称:"
441 441 name="awardName"
442 442 rules={[{ required: true, message: '请输入奖项名称' }]}
443   - // initialValue={(awardWay === 2 && noReward) ? "谢谢惠顾" : ""}
  443 + // initialValue={(awardWay === 2 && noReward) ? "谢谢惠顾" : ""}
444 444 >
445 445 <Input
446 446 // disabled={(awardWay === 2 && noReward) || !!currentItem.awardName}
... ...
src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignIn.tsx
... ... @@ -10,11 +10,11 @@ import moment from &quot;moment&quot;;
10 10 const { RangePicker } = DatePicker;
11 11 const { Option } = Select;
12 12  
13   -export default function index() {
  13 +export default function Index() {
14 14 const { baseInfo, readOnly, getFlowConfig, externalInfo } = useStore();
15 15 const { activityNo, changeEnable } = baseInfo;
16 16 const { flowDisable } = externalInfo;
17   - const { data, errMsg, loading, params, setParams } = useInitial(getSignInDetail, {}, {activityNo, change: changeEnable});
  17 + const { data, errMsg, loading, params, setParams } = useInitial(getSignInDetail, {}, { activityNo, change: changeEnable });
18 18 const [form] = Form.useForm();
19 19 const [saveLoading, setSaveLoading] = useState<boolean>(false);
20 20  
... ...
src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignUp.tsx
1 1 import React, { useState, useEffect } from 'react';
2   -import { Button, Form, InputNumber, message, Space, Spin, Divider, Radio, Row, Alert } from 'antd';
  2 +import { Button, Form, InputNumber, message, Space, Spin, Divider, Radio, Row } from 'antd';
3 3 import useInitial from '@/hooks/useInitail';
4 4 import { PlusOutlined, MinusCircleOutlined } from '@ant-design/icons';
5 5 import { saveSignUpApi, getSignUpDetail, saveChangeSignUpApi } from '../../api'; //保存报名有礼
... ... @@ -163,25 +163,6 @@ export default function Index() {
163 163 <Radio value={1}>按报名顺序不同赠送不同优惠券</Radio>
164 164 </Radio.Group>
165 165 </Form.Item>
166   - {changeEnable ? (
167   - <Alert
168   - message="提示"
169   - type="warning"
170   - showIcon
171   - closable
172   - style={{ marginBottom: 10 }}
173   - description={
174   - <div>
175   - <p style={{ margin: 0, fontSize: 12, color: '#999' }}>
176   - 1.优惠券编辑变更:范围只能扩大不能缩小,变更前所发优惠券与变更后所发优惠券的限制范围一致
177   - </p>
178   - <p style={{ margin: 0, fontSize: 12, color: '#999' }}>
179   - 2.优惠券删除-新增变更:不限制优惠券变更范围,变更前所发优惠券使用范围不变,变更后所发优惠券限制范围变更
180   - </p>
181   - </div>
182   - }
183   - />
184   - ) : null}
185 166 <Form.Item noStyle shouldUpdate={(prevValues, currentValues) => prevValues.ladderReward !== currentValues.ladderReward}>
186 167 {({ getFieldValue }) => {
187 168 return (
... ...
src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignupGifts.tsx
... ... @@ -167,16 +167,18 @@ function SignupGifts({ value, onChange, disabled }: Props) {
167 167 >
168 168 编辑
169 169 </Button>
170   - <Popconfirm
171   - title="删除将丢失优惠券信息,确定删除?"
172   - okText="确定"
173   - cancelText="取消"
174   - onConfirm={() => deleteQestion(index)}
175   - >
176   - <Button type="link" danger>
177   - 删除
178   - </Button>
179   - </Popconfirm>
  170 + {!changeEnable && (
  171 + <Popconfirm
  172 + title="删除将丢失优惠券信息,确定删除?"
  173 + okText="确定"
  174 + cancelText="取消"
  175 + onConfirm={() => deleteQestion(index)}
  176 + >
  177 + <Button type="link" danger>
  178 + 删除
  179 + </Button>
  180 + </Popconfirm>
  181 + )}
180 182 </Space>
181 183 )
182 184 )}
... ...