Commit f4116581f94b003a3392aae65fef16a708b1845c

Authored by 莫红玲
2 parents 4efafafe ca987870

Merge remote-tracking branch 'origin/bug_fix'

src/pages/coupon/CouponConfig/components/WareLimitType/SpecLimit.tsx
... ... @@ -14,7 +14,7 @@ const carEnum = {
14 14 1: '11', //品牌
15 15 2: '12', //车系
16 16 3: '13', //车型
17   -}
  17 +};
18 18 const SpecLimit = (props: Props) => {
19 19 const { form, value, readonly, onChange, carSelectApi } = props;
20 20 const [specList, setSpecList] = useState<any[]>([]);
... ... @@ -49,18 +49,17 @@ const SpecLimit = (props: Props) =&gt; {
49 49 function renderTree(specList: any[], carType: number) {
50 50 return specList.map((spec, index) => {
51 51 const { label, value, children, type } = spec;
52   - const hasChildren = Array.isArray(children) && children.length > 0;
53   -
  52 + const hasChildren = (Array.isArray(children) && children.length > 0) || spec.specConfigCodeList;
54 53 if (hasChildren) {
55 54 return (
56 55 // disableCheckbox={hasChildren disableCheckbox={readonly}
57 56 <TreeSelect.TreeNode selectable title={label} value={`${carEnum[carType]}_${value}`} key={`${carEnum[carType]}_${value}`}>
58   - {renderTree(children, carType + 1)}
  57 + {renderTree(children || spec.specConfigCodeList, carType + 1)}
59 58 </TreeSelect.TreeNode>
60 59 );
61 60 } else {
62 61 data.push(String(value));
63   - return <TreeSelect.TreeNode selectable title={label} value={`${carEnum[carType]}_${value}`} key={`${carEnum[carType]}_${value}`} />;
  62 + return <TreeSelect.TreeNode selectable={!!value} checkable={!!value} title={label || spec} value={value ? `${carEnum[carType]}_${value}` : spec} key={value ? `${carEnum[carType]}_${value}` : spec} />;
64 63 }
65 64 });
66 65 }
... ...
src/pages/ehr/PhoneChargeAndSubsidy/subpages/ConfirmThePhoneBillList/components/List.tsx
... ... @@ -2,7 +2,7 @@
2 2 * @Author: wangqiang@feewee.cn
3 3 * @Date: 2022-05-27 11:14:12
4 4 * @LastEditors: wangqiang@feewee.cn
5   - * @LastEditTime: 2023-04-26 14:22:59
  5 + * @LastEditTime: 2023-04-27 16:08:16
6 6 */
7 7 import React from "react";
8 8 import { Table, Divider, Popconfirm, message, Badge } from "antd";
... ...
src/pages/ehr/PhoneChargeAndSubsidy/subpages/ConfirmThePhoneBillList/components/Modal.tsx
1 1 /*
2 2 * @Date: 2021-07-13 14:26:59
3 3 * @LastEditors: wangqiang@feewee.cn
4   - * @LastEditTime: 2023-04-27 09:42:31
  4 + * @LastEditTime: 2023-04-27 16:42:53
5 5 */
6 6 import React, { useEffect, useMemo, useState } from "react";
7 7 import { Form, Modal, message, Input, Divider, Spin, Row } from "antd";
... ... @@ -148,8 +148,9 @@ export default function MobileWhiteModal() {
148 148 0
149 149 ) ?? 0
150 150 )
151   - : undefined,
  151 + : val.sumRealAmount,
152 152 mobileList,
  153 + rebates: val.rebates,
153 154 };
154 155 const api =
155 156 current?.status === ListStatus.返话费预充确认
... ... @@ -223,7 +224,12 @@ export default function MobileWhiteModal() {
223 224 name="shop"
224 225 rules={[{ required: true, message: "请选择结算门店" }]}
225 226 >
226   - <ShopSelectNew disabled={!!checkDetailType} />
  227 + <ShopSelectNew
  228 + disabled={
  229 + !!checkDetailType ||
  230 + current?.status === ListStatus.返话费预充确认
  231 + }
  232 + />
227 233 </Form.Item>
228 234 <Divider />
229 235 <Form.Item noStyle>
... ... @@ -237,6 +243,22 @@ export default function MobileWhiteModal() {
237 243 +(form.getFieldValue("sumPreChargeAmount") ?? 0)
238 244 )} 元`}
239 245 />
  246 + <Form.Item noStyle name="sumRealAmount" />
  247 + <Form.Item noStyle name="rebates" />
  248 + <DetailItem
  249 + title="话费充值总金额"
  250 + style={{ marginBottom: 0 }}
  251 + desp={`${priceToThousands(
  252 + +(form.getFieldValue("sumRealAmount") ?? 0)
  253 + )} 元`}
  254 + />
  255 + <DetailItem
  256 + title="返点比例"
  257 + style={{ marginBottom: 0 }}
  258 + desp={`${priceToThousands(
  259 + +(form.getFieldValue("rebates") ?? 0)
  260 + )} %`}
  261 + />
240 262 <DetailItem
241 263 title="当前预充合计金额"
242 264 style={{ marginBottom: 0 }}
... ...
src/pages/ehr/PhoneChargeAndSubsidy/subpages/ConfirmThePhoneBillList/interface.d.ts
... ... @@ -2,7 +2,7 @@
2 2 * @Author: wangqiang@feewee.cn
3 3 * @Date: 2022-05-27 10:35:22
4 4 * @LastEditors: wangqiang@feewee.cn
5   - * @LastEditTime: 2023-04-26 14:07:17
  5 + * @LastEditTime: 2023-04-27 16:40:23
6 6 */
7 7 declare namespace EHrConfirmThePhoneBillList {
8 8 interface QueryParams {
... ... @@ -39,6 +39,8 @@ declare namespace EHrConfirmThePhoneBillList {
39 39 monthDate?: number; // 结算月份
40 40 mobileList?: MobileStaffItemVO[]; // 手机号列表
41 41 sumPreChargeAmount?: number; // 预充合计金额
  42 + sumRealAmount?: number; // 话费充值总金额
  43 + rebates?: number; // 返点比例
42 44 }
43 45  
44 46 interface MobileStaffItemVO {
... ... @@ -86,8 +88,9 @@ declare namespace EHrConfirmThePhoneBillList {
86 88 shopName?: string; // 结算门店名称
87 89 sumShouldAmount?: number; // 合计应补贴金额
88 90 sumPreChargeAmount?: number; // 合计预充金额
89   - sumRealAmount?: number; // 合计实际补贴金额
  91 + sumRealAmount?: number; // 合计实际补贴金额 / 话费充值总金额
90 92 mobileList?: MobileStaffItemVO[]; // 手机号列表
  93 + rebates?: number; // 返点比例
91 94 }
92 95  
93 96 type PhoneBillProgressItemEventKey =
... ...
src/pages/ehr/PhoneChargeAndSubsidy/subpages/SubsidyConfirm/components/Filter.tsx
... ... @@ -2,20 +2,23 @@
2 2 * @Author: wangqiang@feewee.cn
3 3 * @Date: 2023-03-13 09:12:55
4 4 * @LastEditors: wangqiang@feewee.cn
5   - * @LastEditTime: 2023-03-13 09:55:05
  5 + * @LastEditTime: 2023-04-27 15:48:47
6 6 */
7 7 import React from "react";
8 8 import { Radio, Row } from "antd";
9 9 import { useStore } from "../index";
  10 +import FeeweeFilterOption from '@/pages/notice/components/FeeweeFilterOption';
  11 +import ShopSelectNew from '@/components/ShopSelectNew';
10 12  
11 13 export default function SubsidyConfirmFilter() {
12 14 const { pagination, StatusList } = useStore();
  15 + const { innerParams, setParams } = pagination;
13 16  
14 17 return (
15   - <Row justify="space-between" align="bottom">
  18 + <Row justify="start" align="bottom">
16 19 <Radio.Group
17 20 buttonStyle="solid"
18   - style={{ marginBottom: 10 }}
  21 + style={{ marginBottom: 10, marginRight: 10 }}
19 22 value={pagination.innerParams.status}
20 23 onChange={(e) => pagination.setParams({ status: e.target.value, current: 1 }, true)}
21 24 >
... ... @@ -25,6 +28,29 @@ export default function SubsidyConfirmFilter() {
25 28 </Radio.Button>
26 29 ))}
27 30 </Radio.Group>
  31 + <FeeweeFilterOption title="人员在职门店">
  32 + <ShopSelectNew
  33 + style={{ minWidth: 260, marginRight: 10, marginBottom: 10 }}
  34 + value={
  35 + innerParams.shopName && innerParams.shopId
  36 + ? [
  37 + {
  38 + label: innerParams.shopName,
  39 + value: innerParams.shopId,
  40 + },
  41 + ]
  42 + : []
  43 + }
  44 + onChange={(shops: any) => setParams(
  45 + {
  46 + shopId: shops.length ? shops[0].value : undefined,
  47 + shopName: shops.length ? shops[0].label : undefined,
  48 + current: 1,
  49 + },
  50 + true
  51 + )}
  52 + />
  53 + </FeeweeFilterOption>
28 54 </Row>
29 55 );
30 56 }
... ...
src/pages/ehr/PhoneChargeAndSubsidy/subpages/SubsidyConfirm/components/List.tsx
... ... @@ -2,7 +2,7 @@
2 2 * @Author: wangqiang@feewee.cn
3 3 * @Date: 2023-03-13 09:13:01
4 4 * @LastEditors: wangqiang@feewee.cn
5   - * @LastEditTime: 2023-04-20 09:57:41
  5 + * @LastEditTime: 2023-04-27 15:47:02
6 6 */
7 7 import { Badge, Divider, message, Popconfirm, Table } from "antd";
8 8 import React from "react";
... ... @@ -48,6 +48,12 @@ export default function SubsidyConfirmList() {
48 48 render={(monthDate: number) => (monthDate ? moment(monthDate).format("YYYY-MM") : "-")}
49 49 />
50 50 <Table.Column
  51 + title="人员在职门店"
  52 + dataIndex="shopName"
  53 + align="left"
  54 + render={(shopName: string) => (shopName ?? "-")}
  55 + />
  56 + <Table.Column
51 57 title="状态"
52 58 dataIndex="status"
53 59 align="left"
... ...
src/pages/ehr/PhoneChargeAndSubsidy/subpages/SubsidyConfirm/components/Modal.tsx
... ... @@ -123,6 +123,15 @@ export default function SubsidyConfirmModal() {
123 123 readOnly
124 124 />
125 125 </Form.Item>
  126 + <Form.Item label="人员在职门店">
  127 + <Input
  128 + value={
  129 + current?.shopName ?? "-"
  130 + }
  131 + bordered={false}
  132 + readOnly
  133 + />
  134 + </Form.Item>
126 135 <Divider />
127 136 <Skeleton
128 137 active
... ...
src/pages/ehr/PhoneChargeAndSubsidy/subpages/SubsidyConfirm/interface.d.ts
... ... @@ -2,16 +2,20 @@
2 2 * @Author: wangqiang@feewee.cn
3 3 * @Date: 2023-03-13 09:12:25
4 4 * @LastEditors: wangqiang@feewee.cn
5   - * @LastEditTime: 2023-04-19 10:30:11
  5 + * @LastEditTime: 2023-04-27 15:47:54
6 6 */
7 7 declare namespace EHrSubsidyConfirm {
8 8 interface QueryParams {
9 9 status?: number; // 1未确认 2待审批 3审批拒绝 4审批通过 5审批撤销
  10 + shopId?: number;
  11 + shopName?: string;
10 12 }
11 13  
12 14 interface ListVO {
13 15 id?: number;
14 16 monthDate?: number; // 月度
  17 + shopId?: number;
  18 + shopName?: string;
15 19 status?: number; // 1未确认 2待审批 3审批拒绝 4审批通过 5审批撤销
16 20 auditNo?: string; // 审批编码
17 21 }
... ... @@ -19,6 +23,7 @@ declare namespace EHrSubsidyConfirm {
19 23 interface ItemVO {
20 24 id?: number;
21 25 monthDate?: number;
  26 + shopName?: string; // 人员在职门店
22 27 typeList?: TypeVO[];
23 28 sumAmount?: number; // 合计实际金额(仅提交时需要)
24 29 }
... ...
src/pages/mkt/ActivityCreate/BasicInformation/index.tsx
... ... @@ -85,12 +85,12 @@ function Index({ onNext }: Props) {
85 85 // changePramas[key] = params[key];
86 86 // }
87 87 // }
88   - params.bizType = undefined;
89   - params.activityType = undefined;
90   - params.address = undefined;
91   - params.addressType = undefined;
92   - params.startTime = undefined;
93   - params.couponValidTime = undefined;
  88 + params.bizType = undefined;
  89 + params.activityType = undefined;
  90 + params.address = undefined;
  91 + params.addressType = undefined;
  92 + params.startTime = undefined;
  93 + params.couponValidTime = undefined;
94 94 }
95 95 const currentApi = changeEnable ? api.changeBasicInfoApi : api.saveBasicInfoApi;
96 96 currentApi(params).then((res) => {
... ... @@ -234,7 +234,7 @@ function Index({ onNext }: Props) {
234 234 {({ getFieldValue }): any => {
235 235 return getFieldValue("addressType") === 2 ? (
236 236 <Form.Item label="地址" name="address" rules={[{ required: true, message: '请选择地址' }]}>
237   - <PositionSelector disabled={readOnly} />
  237 + <PositionSelector />
238 238 </Form.Item>
239 239 ) : null;
240 240 }}
... ...