Commit 676f40b6e31c8e99b52cb2476e4ec969ccec2e55
1 parent
f780ab5f
fix(ehr): 优化 补贴设置 配置金额 单位展示逻辑
Showing
2 changed files
with
11 additions
and
8 deletions
src/pages/ehr/PhoneChargeAndSubsidy/subpages/SubsidySettings/components/List.tsx
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | * @Author: wangqiang@feewee.cn |
3 | 3 | * @Date: 2023-02-15 17:42:54 |
4 | 4 | * @LastEditors: wangqiang@feewee.cn |
5 | - * @LastEditTime: 2023-05-11 11:40:29 | |
5 | + * @LastEditTime: 2024-03-28 15:14:20 | |
6 | 6 | */ |
7 | 7 | import { |
8 | 8 | formatObjText, |
... | ... | @@ -38,7 +38,7 @@ export default function SubsidySettingsList() { |
38 | 38 | align="left" |
39 | 39 | width={120} |
40 | 40 | render={(amount: number, record: EHrSubsidySetting.List) => `${priceToThousands(amount)} ${ |
41 | - pagination.innerParams.type === 2 | |
41 | + pagination.innerParams.type !== 1 | |
42 | 42 | ? record.amountType === 1 |
43 | 43 | ? "元/天" |
44 | 44 | : record.amountType === 3 | ... | ... |
src/pages/ehr/PhoneChargeAndSubsidy/subpages/SubsidySettings/components/Modal.tsx
1 | 1 | import { checkNull, validatorNumberCanWithDecimal } from '@/utils/validate'; |
2 | 2 | import { Form, Input, message, Modal, Select } from 'antd'; |
3 | -import { LabeledValue } from 'antd/lib/select'; | |
3 | +import type { LabeledValue } from 'antd/lib/select'; | |
4 | 4 | import React, { useEffect, useRef, useState } from 'react'; |
5 | 5 | import { saveSubsidySettingApi } from '../api'; |
6 | 6 | import { useStore } from '../index'; |
7 | -import Post, { PostRef } from './Post'; | |
8 | -import Scope, { Value as ScopeValue } from './Scope'; | |
9 | -import Shop, { Value as ShopValue } from './Shop'; | |
7 | +import type { PostRef } from './Post'; | |
8 | +import Post from './Post'; | |
9 | +import type { Value as ScopeValue } from './Scope'; | |
10 | +import Scope from './Scope'; | |
11 | +import type { Value as ShopValue } from './Shop'; | |
12 | +import Shop from './Shop'; | |
10 | 13 | |
11 | 14 | export default function SubsidySettingsModal() { |
12 | 15 | const { current, setCurrent, visible, setVisible, pagination, subsidyTypeList, nationInitial } = useStore(); |
... | ... | @@ -138,9 +141,9 @@ export default function SubsidySettingsModal() { |
138 | 141 | <Input |
139 | 142 | placeholder="请输入补贴金额" |
140 | 143 | allowClear |
141 | - suffix={pagination.innerParams.type === 2 ? undefined : '元'} | |
144 | + suffix={pagination.innerParams.type !== 1 ? undefined : '元'} | |
142 | 145 | addonAfter={ |
143 | - pagination.innerParams.type === 2 ? ( | |
146 | + pagination.innerParams.type !== 1 ? ( | |
144 | 147 | <Form.Item noStyle name="amountType"> |
145 | 148 | <Select> |
146 | 149 | <Select.Option value={1}>元/天</Select.Option> | ... | ... |