fangmingyue 1 rok temu
rodzic
commit
ab21776700

+ 16
- 1
src/pages/member/Edit.jsx Wyświetl plik

@@ -64,6 +64,21 @@ export default (props) => {
64 64
   };
65 65
 
66 66
   const columns = [
67
+    {
68
+      title: '套餐名称',
69
+      dataIndex: "taPackageName"
70
+    },
71
+    {
72
+      title: '套餐类型',
73
+      dataIndex: "taPackageLimitUnit",
74
+      valueType: 'select',
75
+      valueEnum: {
76
+        'year': '年卡',
77
+        'month': '月卡',
78
+        'day': '日卡',
79
+        'order': '次卡'
80
+      }
81
+    },
67 82
     {
68 83
       title: '会员名称',
69 84
       dataIndex: "memberName",
@@ -73,7 +88,7 @@ export default (props) => {
73 88
       dataIndex: "billType",
74 89
       render: (it) =>
75 90
         it == BILL_CONSUME
76
-          ? "消费"
91
+          ? "消费-核销"
77 92
           : it == BILL_REFUND
78 93
             ? "退款"
79 94
             : it == BILL_RECHARGE

+ 11
- 1
src/pages/member/components/MemberCardInfo.jsx Wyświetl plik

@@ -6,7 +6,6 @@ import { getTaPackage } from "@/services/taPackage";
6 6
 import { getTaOrder } from "@/services/taOrder";
7 7
 import { queryTable, queryDict } from "@/utils/request";
8 8
 import moment from "moment";
9
-import MemberOrderModal from "./MemberOrderModal";
10 9
 
11 10
 const PackageNameList = queryDict(getTaPackage, { labelKey: "packageName", valueKey: "packageId" });
12 11
 
@@ -26,6 +25,17 @@ export default (props) => {
26 25
       request: PackageNameList,
27 26
       ellipsis: true,
28 27
     },
28
+    {
29
+      title: "套餐类型",
30
+      dataIndex: "timeUnit",
31
+      valueType: 'select',
32
+      valueEnum: {
33
+        'year': '年卡',
34
+        'month': '月卡',
35
+        'day': '日卡',
36
+        'order': '次卡'
37
+      }
38
+    },
29 39
     {
30 40
       title: "开卡人姓名",
31 41
       dataIndex: "memberName",

+ 0
- 72
src/pages/member/components/MemberOrderModal.jsx Wyświetl plik

@@ -1,72 +0,0 @@
1
-import React, { useEffect, useState } from "react";
2
-import { Button } from "antd";
3
-import { ModalForm, ProTable } from "@ant-design/pro-components";
4
-import moment from "moment";
5
-import { getTaOrder } from "@/services/taOrder";
6
-import { queryTable } from "@/utils/request";
7
-
8
-import {
9
-  BILL_CONSUME,
10
-  BILL_REFUND,
11
-  BILL_RECHARGE,
12
-  BILL_WITHDRAW,
13
-} from "@/utils/biz";
14
-export default (props) => {
15
-  const { open, onCancel, id } = props;
16
-
17
-  const actionRef = React.useRef();
18
-  const TaTaOrderList = queryTable(() => getTaOrder({ memberCardId: id }));
19
-
20
-  const columns = [
21
-    {
22
-      title: "消费类型",
23
-      dataIndex: "billType",
24
-      render: (it) =>
25
-        it == BILL_CONSUME
26
-          ? "消费"
27
-          : it == BILL_REFUND
28
-          ? "退款"
29
-          : it == BILL_RECHARGE
30
-          ? "充值-开卡"
31
-          : it == BILL_WITHDRAW
32
-          ? "提现"
33
-          : "未知",
34
-    },
35
-    {
36
-      title: "消费时间",
37
-      dataIndex: "createdAt",
38
-      render: (it) => moment(it).format("YYYY-MM-DD HH:mm:ss"),
39
-    },
40
-  ];
41
-
42
-  return (
43
-    <ModalForm
44
-      title="消费记录"
45
-      open={open}
46
-      modalProps={{
47
-        destroyOnClose: true,
48
-        onCancel: onCancel,
49
-      }}
50
-      submitter={{
51
-        // 完全自定义整个区域
52
-        render: (props, doms) => {
53
-          return [
54
-            <Button onClick={onCancel}>取消</Button>,
55
-            <Button type="primary" onClick={onCancel}>
56
-              确定
57
-            </Button>,
58
-          ];
59
-        },
60
-      }}
61
-    >
62
-      <ProTable
63
-        actionRef={actionRef}
64
-        rowKey="cardId"
65
-        columns={columns}
66
-        options={false}
67
-        search={false}
68
-        request={TaTaOrderList}
69
-      />
70
-    </ModalForm>
71
-  );
72
-};

+ 4
- 21
src/pages/package/components/Package.jsx Wyświetl plik

@@ -55,9 +55,7 @@ export default (props) => {
55 55
             <Col offset={1}>
56 56
               <Button onClick={() => navigate(-1)}>返回</Button>
57 57
             </Col>
58
-          </Row>,
59
-          // doms.find((dom) => dom.props?.children === "提交"),
60
-          // <Button onClick={() => navigate(-1)}>返回</Button>,
58
+          </Row>
61 59
         ],
62 60
       }}
63 61
     >
@@ -67,11 +65,9 @@ export default (props) => {
67 65
         <UploadImage />
68 66
       </ProForm.Item>
69 67
       <ProFormMoney name="charge" label="套餐价格" />
70
-      {/* <ProFormText name="limitType" label="是否限制型消费" /> */}
71
-      <ProFormText name="limitNum" label="限制数目" />
72 68
       <ProFormSelect
73 69
         name="limitUnit"
74
-        label="限制单位"
70
+        label="套餐单位"
75 71
         options={[
76 72
           { value: "year", label: "年" },
77 73
           { value: "month", label: "月" },
@@ -79,28 +75,15 @@ export default (props) => {
79 75
           { value: "order", label: "次" },
80 76
         ]}
81 77
       />
78
+      <ProFormText name="limitNum" label="套餐数目" placeholder="请输入年、月、日卡时长或次卡次数" />
82 79
       <ProFormText name="desc" label="套餐说明" />
83
-      <ProFormRadio.Group
80
+      {/* <ProFormRadio.Group
84 81
         name="limitType"
85 82
         label="是否限制型消费"
86 83
         options={[
87 84
           { label: "是", value: 1 },
88 85
           { label: "否", value: 0 },
89 86
         ]}
90
-      />
91
-      {/* <ProFormSelect
92
-        name="status"
93
-        label="状态"
94
-        options={[
95
-          {
96
-            label: "下架",
97
-            value: 0,
98
-          },
99
-          {
100
-            label: "上架",
101
-            value: 1,
102
-          },
103
-        ]}
104 87
       /> */}
105 88
       <ProFormRadio.Group
106 89
         name="status"

+ 15
- 3
src/pages/query/index.jsx Wyświetl plik

@@ -27,15 +27,27 @@ export default (props) => {
27 27
     },
28 28
     {
29 29
       title: '套餐名称',
30
-      dataIndex: "packageName",
31
-      search: false
30
+      dataIndex: "taPackageName",
31
+      search: false,
32
+    },
33
+    {
34
+      title: '套餐类型',
35
+      dataIndex: "taPackageLimitUnit",
36
+      valueType: 'select',
37
+      search: false,
38
+      valueEnum: {
39
+        'year': '年卡',
40
+        'month': '月卡',
41
+        'day': '日卡',
42
+        'order': '次卡'
43
+      }
32 44
     },
33 45
     {
34 46
       title: "消费类型",
35 47
       dataIndex: "billType",
36 48
       valueType: "select",
37 49
       valueEnum: {
38
-        'consume': '消费',
50
+        'consume': '消费-核销',
39 51
         'refund': '退款',
40 52
         'recharge': '充值-开卡',
41 53
         'withdraw': '提现',

+ 0
- 2
src/utils/request.js Wyświetl plik

@@ -137,8 +137,6 @@ export function queryDict (
137 137
     })
138 138
       .then((res) => {
139 139
         return res?.records?.map((x) => (
140
-          console.log('xiaofang-->x', x),
141
-          // console.log('xiaofang-->', x[labelKey]),
142 140
           {
143 141
             label: x[labelKey],
144 142
             value: getValueOfType(x[valueKey], valueType),