shenwu 5 months ago
parent
commit
b94f8df326

+ 28 - 9
src/pages/MiniApp/Consume/tableConfig.tsx

@@ -1,7 +1,7 @@
 import { ProColumns } from "@ant-design/pro-components";
 import { ProColumns } from "@ant-design/pro-components";
 
 
-export const columns = (enumList:any): ProColumns<any>[] => {
-    let arr: any =enumList?.CHANGE_TYPE.values
+export const columns = (enumList: any): ProColumns<any>[] => {
+    let arr: any = enumList?.CHANGE_TYPE.values
     return [
     return [
         {
         {
             title: 'openId',
             title: 'openId',
@@ -10,7 +10,7 @@ export const columns = (enumList:any): ProColumns<any>[] => {
             width: 70,
             width: 70,
             ellipsis: true,
             ellipsis: true,
             render: (_, row) => {
             render: (_, row) => {
-                return row?.wechatMiniappUser?.openId
+                return row?.wechatMiniappUser?.openId || "-"
             }
             }
         },
         },
         {
         {
@@ -19,7 +19,16 @@ export const columns = (enumList:any): ProColumns<any>[] => {
             key: "bookInfo",
             key: "bookInfo",
             align: "center",
             align: "center",
             render: (a, b) => {
             render: (a, b) => {
-                return b?.bookInfo?.bookName || b?.bookInfo?.bookName
+                return b?.bookInfo?.bookName || b?.bookInfo?.bookName || "-"
+            },
+        },
+        {
+            title: "作者笔名",
+            dataIndex: 'authorName',
+            key: "authorName",
+            align: "center",
+            render: (a, b) => {
+                return b?.bookInfo?.authorInfo?.authorName || "-"
             },
             },
         },
         },
         {
         {
@@ -29,7 +38,7 @@ export const columns = (enumList:any): ProColumns<any>[] => {
             align: "center",
             align: "center",
             hideInSearch: true,
             hideInSearch: true,
             render: (a, b) => {
             render: (a, b) => {
-                return b?.paragraphId || b?.chapterInfo?.chapterName
+                return b?.paragraphId || b?.chapterInfo?.chapterName || "-"
             },
             },
         },
         },
         {
         {
@@ -61,7 +70,7 @@ export const columns = (enumList:any): ProColumns<any>[] => {
             hideInSearch: true,
             hideInSearch: true,
             align: "center",
             align: "center",
             render: (a: any) => {
             render: (a: any) => {
-                return new Map(arr?.map((item: { value: any; description: any; })=>[item.value,item.description])).get(a)
+                return new Map(arr?.map((item: { value: any; description: any; }) => [item.value, item.description])).get(a)
             }
             }
         },
         },
         {
         {
@@ -71,13 +80,23 @@ export const columns = (enumList:any): ProColumns<any>[] => {
             hideInSearch: true,
             hideInSearch: true,
             align: "center",
             align: "center",
         },
         },
+        {
+            title: "用户注册时间",
+            dataIndex: 'createTime',
+            key: "createTime",
+            hideInSearch: true,
+            align: "center",
+            render: (_, row) => {
+                return row?.wechatMiniappUser?.createTime
+            }
+        },
         // 搜索条件
         // 搜索条件
         {
         {
             hideInTable: true,
             hideInTable: true,
             dataIndex: 'changeType',
             dataIndex: 'changeType',
-            title:"书币变更类型",
-            valueType:'select',
-            valueEnum:new Map(arr?.map((item: { value: any; description: any; })=>[item.value,item.description]))
+            title: "书币变更类型",
+            valueType: 'select',
+            valueEnum: new Map(arr?.map((item: { value: any; description: any; }) => [item.value, item.description]))
         },
         },
         {
         {
             title: "开始时间",
             title: "开始时间",

+ 1 - 1
src/pages/MiniApp/EmsCnpl/Users/index.tsx

@@ -11,7 +11,7 @@ const Page: React.FC = () => {
         title={false}
         title={false}
     >
     >
         <ProTable<any, any>
         <ProTable<any, any>
-            scroll={{ x: true}}
+          scroll={{ x: 'max-content' }}
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",
                 appType: initialState?.selectApp?.appType || ""
                 appType: initialState?.selectApp?.appType || ""

+ 1 - 1
src/pages/MiniApp/EntWeChat/Users/index.tsx

@@ -19,7 +19,7 @@ const Page: React.FC = () => {
     return <PageContainer title={false}
     return <PageContainer title={false}
     >
     >
         <ProTable<any, any>
         <ProTable<any, any>
-            scroll={{ x: true}}
+          scroll={{ x: 'max-content' }}
             params={publicData}
             params={publicData}
             headerTitle={"企微用户列表"}
             headerTitle={"企微用户列表"}
             rowKey={(r) => r.corpUserId}
             rowKey={(r) => r.corpUserId}

+ 10 - 2
src/pages/MiniApp/PayLog/Long/index.tsx

@@ -3,14 +3,22 @@ import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { longBookOrderList } from "@/services/miniApp/payLog"
 import { longBookOrderList } from "@/services/miniApp/payLog"
+import { useCallback } from "react"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
     let getList = useAjax((params) => longBookOrderList(params), { type: 'table' })
     let getList = useAjax((params) => longBookOrderList(params), { type: 'table' })
+    const submit = useCallback((params: { orderNo: string }) => {
+        // ShortBookOrderReportOrder.run(params).then(res => {
+        //     if (res.code === 200) {
+        //         actionRef?.current?.reload()
+        //     }
+        // })
+    }, [])
     return <PageContainer title={false}
     return <PageContainer title={false}
     >
     >
         <ProTable<any, any>
         <ProTable<any, any>
-            scroll={{ x: true}}
+            scroll={{ x: 'max-content' }}
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",
                 distributorId: initialState?.currentUser?.distributorId,
                 distributorId: initialState?.currentUser?.distributorId,
@@ -24,7 +32,7 @@ const Page: React.FC = () => {
             request={async (params) => {
             request={async (params) => {
                 return await getList.run(params)
                 return await getList.run(params)
             }}
             }}
-            columns={columns()}
+            columns={columns(submit)}
         // bordered
         // bordered
         />
         />
     </PageContainer>
     </PageContainer>

+ 34 - 5
src/pages/MiniApp/PayLog/Long/tableConfig.tsx

@@ -22,7 +22,7 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             key: "bookName",
             key: "bookName",
             align: "center",
             align: "center",
             render: (a, b: any) => {
             render: (a, b: any) => {
-                return b?.bookInfo?.bookName
+                return b?.bookInfo?.bookName || "-"
             }
             }
         },
         },
         {
         {
@@ -31,7 +31,7 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             key: "payChannel",
             key: "payChannel",
             align: "center",
             align: "center",
             valueType: 'select',
             valueType: 'select',
-            valueEnum: getEnum("PAY_CHANNEL",'map'),
+            valueEnum: getEnum("PAY_CHANNEL", 'map'),
         },
         },
         {
         {
             title: "支付金额",
             title: "支付金额",
@@ -45,7 +45,7 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             dataIndex: 'orderType',
             dataIndex: 'orderType',
             key: "orderType",
             key: "orderType",
             valueType: 'select',
             valueType: 'select',
-            valueEnum: getEnum("ORDER_TYPE","map"),
+            valueEnum: getEnum("ORDER_TYPE", "map"),
             align: "center",
             align: "center",
         },
         },
         {
         {
@@ -54,7 +54,7 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             key: "orderStatus",
             key: "orderStatus",
             valueType: 'select',
             valueType: 'select',
             align: "center",
             align: "center",
-            valueEnum:getEnum("ORDER_STATUS",'stateObj',{2:'success',1:"warning"})
+            valueEnum: getEnum("ORDER_STATUS", 'stateObj', { 2: 'success', 1: "warning" })
         },
         },
         {
         {
             title: "用户订单号",
             title: "用户订单号",
@@ -90,6 +90,16 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             hideInSearch: true,
             hideInSearch: true,
             align: "center",
             align: "center",
         },
         },
+        {
+            title: "充值次数",
+            dataIndex: 'chargeNum',
+            key: "chargeNum",
+            hideInSearch: true,
+            align: "center",
+            render: (_, row) => {
+                return row?.wechatMiniappUser?.chargeNum
+            }
+        },
         {
         {
             title: "上报金额",
             title: "上报金额",
             dataIndex: 'backMoney',
             dataIndex: 'backMoney',
@@ -106,7 +116,7 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             render: (_, row) => {
             render: (_, row) => {
                 let obj = getEnum("BACK_STATUS", "stateObj", { "0": 'default', "-1": "error", "1": "processing", "2": "success", "3": "warning" })
                 let obj = getEnum("BACK_STATUS", "stateObj", { "0": 'default', "-1": "error", "1": "processing", "2": "success", "3": "warning" })
                 let isShowBtn = [1, -1].includes(row?.backStatus)
                 let isShowBtn = [1, -1].includes(row?.backStatus)
-                return <Space>{obj[row.backStatus]?.text}{isShowBtn && <Tag.CheckableTag checked onClick={() => {submit({orderNo:row.orderNo}) }}>上报</Tag.CheckableTag>}</Space>
+                return <Space>{obj[row.backStatus]?.text}{isShowBtn && <Tag.CheckableTag checked onClick={() => { submit({ orderNo: row.orderNo }) }}>上报</Tag.CheckableTag>}</Space>
             }
             }
         },
         },
         {
         {
@@ -122,6 +132,25 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
                 return str
                 return str
             }
             }
         },
         },
+        {
+            title: '渠道名称',
+            dataIndex: 'userSource',
+            align: 'center',
+            ellipsis: true,
+            render: (_, row) => {
+                return row?.wechatMiniappUser?.userSource
+            }
+        },
+        {
+            title: "用户注册时间",
+            dataIndex: 'createTime',
+            key: "createTime",
+            hideInSearch: true,
+            align: "center",
+            render: (_, row) => {
+                return row?.wechatMiniappUser?.createTime
+            }
+        },
         // 搜索条件
         // 搜索条件
         {
         {
             title: "开始时间",
             title: "开始时间",

+ 1 - 1
src/pages/MiniApp/PayLog/Short/index.tsx

@@ -21,7 +21,7 @@ const Page: React.FC = () => {
     >
     >
         <ProTable<any, any>
         <ProTable<any, any>
             actionRef={actionRef}
             actionRef={actionRef}
-            scroll={{ x: true }}
+            scroll={{ x: 'max-content' }}
             loading={getList?.loading || ShortBookOrderReportOrder?.loading}
             loading={getList?.loading || ShortBookOrderReportOrder?.loading}
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",

+ 34 - 7
src/pages/MiniApp/PayLog/Short/tableConfig.tsx

@@ -10,7 +10,6 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             title: 'openId',
             title: 'openId',
             dataIndex: 'openId',
             dataIndex: 'openId',
             align: 'center',
             align: 'center',
-            width: 70,
             ellipsis: true,
             ellipsis: true,
             render: (_, row) => {
             render: (_, row) => {
                 return row?.wechatMiniappUser?.openId
                 return row?.wechatMiniappUser?.openId
@@ -22,7 +21,7 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             key: "bookName",
             key: "bookName",
             align: "center",
             align: "center",
             render: (a, b: any) => {
             render: (a, b: any) => {
-                return b?.bookInfo?.bookName
+                return b?.bookInfo?.bookName || "-"
             }
             }
         },
         },
         {
         {
@@ -31,7 +30,7 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             key: "payChannel",
             key: "payChannel",
             align: "center",
             align: "center",
             valueType: 'select',
             valueType: 'select',
-            valueEnum: getEnum("PAY_CHANNEL",'map'),
+            valueEnum: getEnum("PAY_CHANNEL", 'map'),
         },
         },
         {
         {
             title: "支付金额",
             title: "支付金额",
@@ -45,7 +44,7 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             dataIndex: 'orderType',
             dataIndex: 'orderType',
             key: "orderType",
             key: "orderType",
             valueType: 'select',
             valueType: 'select',
-            valueEnum: getEnum("ORDER_TYPE","map"),
+            valueEnum: getEnum("ORDER_TYPE", "map"),
             align: "center",
             align: "center",
         },
         },
         {
         {
@@ -54,7 +53,7 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             key: "orderStatus",
             key: "orderStatus",
             valueType: 'select',
             valueType: 'select',
             align: "center",
             align: "center",
-            valueEnum:getEnum("ORDER_STATUS",'stateObj',{2:'success',1:"warning"})
+            valueEnum: getEnum("ORDER_STATUS", 'stateObj', { 2: 'success', 1: "warning" })
         },
         },
         {
         {
             title: "用户订单号",
             title: "用户订单号",
@@ -90,6 +89,16 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             hideInSearch: true,
             hideInSearch: true,
             align: "center",
             align: "center",
         },
         },
+        {
+            title: "充值次数",
+            dataIndex: 'chargeNum',
+            key: "chargeNum",
+            hideInSearch: true,
+            align: "center",
+            render: (_, row) => {
+                return row?.wechatMiniappUser?.chargeNum
+            }
+        },
         {
         {
             title: "上报金额",
             title: "上报金额",
             dataIndex: 'backMoney',
             dataIndex: 'backMoney',
@@ -106,13 +115,12 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
             render: (_, row) => {
             render: (_, row) => {
                 let obj = getEnum("BACK_STATUS", "stateObj", { "0": 'default', "-1": "error", "1": "processing", "2": "success", "3": "warning" })
                 let obj = getEnum("BACK_STATUS", "stateObj", { "0": 'default', "-1": "error", "1": "processing", "2": "success", "3": "warning" })
                 let isShowBtn = [1, -1].includes(row?.backStatus)
                 let isShowBtn = [1, -1].includes(row?.backStatus)
-                return <Space>{obj[row.backStatus]?.text}{isShowBtn && <Tag.CheckableTag checked onClick={() => {submit({orderNo:row.orderNo}) }}>上报</Tag.CheckableTag>}</Space>
+                return <Space>{obj[row.backStatus]?.text}{isShowBtn && <Tag.CheckableTag checked onClick={() => { submit({ orderNo: row.orderNo }) }}>上报</Tag.CheckableTag>}</Space>
             }
             }
         },
         },
         {
         {
             title: '归因渠道',
             title: '归因渠道',
             dataIndex: 'userChannel',
             dataIndex: 'userChannel',
-            width: 170,
             align: 'center',
             align: 'center',
             ellipsis: true,
             ellipsis: true,
             valueType: 'select',
             valueType: 'select',
@@ -122,6 +130,25 @@ export const columns = (submit: (params: { orderNo: string }) => void): ProColum
                 return str
                 return str
             }
             }
         },
         },
+        {
+            title: '渠道名称',
+            dataIndex: 'userSource',
+            align: 'center',
+            ellipsis: true,
+            render: (_, row) => {
+                return row?.wechatMiniappUser?.userSource
+            }
+        },
+        {
+            title: "用户注册时间",
+            dataIndex: 'createTime',
+            key: "createTime",
+            hideInSearch: true,
+            align: "center",
+            render: (_, row) => {
+                return row?.wechatMiniappUser?.createTime
+            }
+        },
         // 搜索条件
         // 搜索条件
         {
         {
             title: "开始时间",
             title: "开始时间",

+ 1 - 1
src/pages/MiniApp/ReadLog/Long/index.tsx

@@ -10,7 +10,7 @@ const Page: React.FC = () => {
     return <PageContainer title={false}
     return <PageContainer title={false}
     >
     >
         <ProTable<any, any>
         <ProTable<any, any>
-            scroll={{ x: true}}
+          scroll={{ x: 'max-content' }}
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",
                 distributorId: initialState?.currentUser?.distributorId,
                 distributorId: initialState?.currentUser?.distributorId,

+ 1 - 1
src/pages/MiniApp/ReadLog/Short/index.tsx

@@ -11,7 +11,7 @@ const Page: React.FC = () => {
         title={false}
         title={false}
     >
     >
         <ProTable<any, any>
         <ProTable<any, any>
-            scroll={{ x: true}}
+          scroll={{ x: 'max-content' }}
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",
                 distributorId: initialState?.currentUser?.distributorId,
                 distributorId: initialState?.currentUser?.distributorId,