Commit bc745c1e38a228bea8fcac406c5e2b45c0816431

Authored by 李娅兰
2 parents f2ee322e 392aa7d8

Merge branch 'bug_fix' of gitlab.feewee.cn:FEV2/fw-cms into bug_fix

src/pages/cas/ClaimConfirmation/components/DetailModal.tsx
1 1 import React, { useEffect, useState } from 'react';
2 2 import { Descriptions, Form, Input, message, Modal, Popconfirm, Select, Spin, Table } from 'antd';
3 3 import moment from 'moment';
  4 +import {isEmpty} from "lodash";
4 5 import { ColumnsType } from 'antd/es/table';
5 6  
6 7 import { formatPartCnt } from '../../utils';
... ... @@ -119,7 +120,7 @@ export default function DetailMOdal({ current, visible, setVisible, setLoading:
119 120 dataIndex: 'totalPrice',
120 121 title: '材料费',
121 122 align: 'center',
122   - render: (totalPrice: number) => rmb.p(totalPrice),
  123 + render: (totalPrice: number) => isNaN(totalPrice) ? '--' : rmb.p(totalPrice ?? 0),
123 124 },
124 125 {
125 126 dataIndex: 'partName',
... ... @@ -357,7 +358,7 @@ export default function DetailMOdal({ current, visible, setVisible, setLoading:
357 358 {(detail && detail.consultantDesc) || '--'}
358 359 </DescriptionItem>
359 360 <DescriptionItem label="附件" span={3}>
360   - <ImageModal title="查看附件" fids={detail?.fids || []} />
  361 + <ImageModal title="查看附件" fids={isEmpty(detail?.fids) ? [] : detail?.fids} />
361 362 </DescriptionItem>
362 363 </Descriptions>
363 364  
... ...
src/pages/coupon/CouponConfig/components/FullReduce.tsx
... ... @@ -155,7 +155,7 @@ export default function FullReduce({ info, readonly, form, getCouponType, confNo
155 155 )}
156 156 {/* 全部默认不叠加false,立减券允许修改类型 */}
157 157 <Form.Item label="可与其他同类型优惠券叠加使用" name="superimposed" >
158   - <Radio.Group disabled={readonly || !!confNo || info.discountsType != 1}>
  158 + <Radio.Group disabled={readonly || info.discountsType != 1}>
159 159 <Radio key={1} value={true}>可叠加</Radio>
160 160 <Radio key={0} value={false}>不可叠加</Radio>
161 161 </Radio.Group>
... ...
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 )}
... ...