Commit 1bb317d1ba227517a6a7d78ea22155bdbdc575c3
Merge remote-tracking branch 'origin/bug_fix'
Showing
10 changed files
with
72 additions
and
50 deletions
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 "moment"; |
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 | )} | ... | ... |
src/pages/performance/DataImport/components/ExcelTable.tsx
... | ... | @@ -5,6 +5,7 @@ import { useRequest } from 'ahooks'; |
5 | 5 | import { ErrorType } from '../entity'; |
6 | 6 | |
7 | 7 | import moment from 'moment'; |
8 | + | |
8 | 9 | interface Props { |
9 | 10 | fid?: string; |
10 | 11 | show?: boolean; |
... | ... | @@ -19,7 +20,7 @@ export default function ExcelTable({ fid, show, indicator, setExcelvisible, refr |
19 | 20 | message.error(e.message); |
20 | 21 | }, |
21 | 22 | }); |
22 | - | |
23 | + | |
23 | 24 | useEffect(() => { |
24 | 25 | if (show) { |
25 | 26 | run(fid || '', indicator?.code || ''); |
... | ... | @@ -96,6 +97,7 @@ export default function ExcelTable({ fid, show, indicator, setExcelvisible, refr |
96 | 97 | <Modal |
97 | 98 | open={show} |
98 | 99 | destroyOnClose |
100 | + okButtonProps={{ disabled: (data?.successNum || 0) <= 0 }} | |
99 | 101 | onCancel={() => { |
100 | 102 | setExcelvisible?.(false); |
101 | 103 | }} | ... | ... |
src/pages/performance/DataImport/components/ImportList.tsx
... | ... | @@ -16,6 +16,7 @@ import type { ApprovalProgressModalRef } from '@/components/ApprovalProgressModa |
16 | 16 | import dowloader from '@/utils/downloader'; |
17 | 17 | import { IMGURL } from '@/utils'; |
18 | 18 | import ExcelTable from './ExcelTable'; |
19 | +import { ErrorType } from '../entity'; | |
19 | 20 | |
20 | 21 | type Props = { |
21 | 22 | indicator?: MDataImport.IndicatorList; |
... | ... | @@ -160,7 +161,23 @@ export default function TableList({ indicator }: Props) { |
160 | 161 | dataIndex: 'graderStaffName', |
161 | 162 | render: (name) => <span>{name || '--'}</span>, |
162 | 163 | }, |
164 | + { | |
165 | + title: '是否识别', | |
166 | + width: 100, | |
167 | + dataIndex: 'errorType', | |
168 | + align: 'center', | |
169 | + render: (_: any, record: any) => (record.errorType ? <div>未识别</div> : <div>已识别</div>), | |
170 | + }, | |
171 | + { | |
172 | + title: '未识别原因', | |
173 | + width: 150, | |
174 | + dataIndex: 'errorType', | |
175 | + align: 'center', | |
176 | + render: (_: any, record: any) => (record.errorType ? ErrorType[record.errorType] : '--'), | |
177 | + }, | |
163 | 178 | ]; |
179 | + | |
180 | + | |
164 | 181 | const columns: ColumnsType<MDataImport.DetailedList> = [ |
165 | 182 | { |
166 | 183 | title: '导入时间', |
... | ... | @@ -311,6 +328,10 @@ export default function TableList({ indicator }: Props) { |
311 | 328 | onClick={() => { |
312 | 329 | DownloadApi(indicator?.code) |
313 | 330 | .then((res) => { |
331 | + if(!res){ | |
332 | + message.error('模版不存在!') | |
333 | + return | |
334 | + } | |
314 | 335 | dowloader.downloadFile({ fileUrl: IMGURL.showImage(res) }); |
315 | 336 | }) |
316 | 337 | .catch((e) => { | ... | ... |
src/pages/performance/KpiSetting/components/EditModal.tsx
... | ... | @@ -44,8 +44,9 @@ export default function EditModal({ onClose, setItem, item, roleList }: Props) { |
44 | 44 | useEffect(() => { |
45 | 45 | if (visible && currentItem) { |
46 | 46 | const result = transformFormData(currentItem, roleList, list); |
47 | + console.log(currentItem,'323') | |
47 | 48 | console.log({...result},'1111dwewwwwwew') |
48 | - form.setFieldsValue({ ...result }); | |
49 | + form.setFieldsValue({ ...result}); | |
49 | 50 | } |
50 | 51 | }, [visible]); |
51 | 52 | function handleSave(values: any) { |
... | ... | @@ -230,6 +231,18 @@ export default function EditModal({ onClose, setItem, item, roleList }: Props) { |
230 | 231 | ) : null; |
231 | 232 | }} |
232 | 233 | </Form.Item> |
234 | + <Form.Item name="businessOriginName" label="原始指标名称" rules={[{ required: true, message: '请输入原始指标名称' }]}> | |
235 | + <Input placeholder="请输入指标名称" /> | |
236 | + </Form.Item> | |
237 | + <Form.Item name="businessOriginUnit" label="原始指标单位" rules={[{ required: true }]}> | |
238 | + <Select disabled={isOriginIndicatorCode} placeholder="请选择原始指标单位"> | |
239 | + {UnitType.map((item) => ( | |
240 | + <Option value={item.value} key={item.value}> | |
241 | + {item.label} | |
242 | + </Option> | |
243 | + ))} | |
244 | + </Select> | |
245 | + </Form.Item> | |
233 | 246 | </Form> |
234 | 247 | </Modal> |
235 | 248 | ); | ... | ... |
src/pages/performance/KpiSetting/interface.d.ts