wjx пре 1 година
родитељ
комит
9aa96d0451

+ 8 - 7
src/components/QueryForm/index.tsx

@@ -193,13 +193,14 @@ const QueryForm: React.FC<Props> = (props) => {
     useEffect(() => {
         if (isSysUserId) {
             getSubUserWithSelfList.run().then(res => {
-                let loginUserId = localStorage.getItem('userId')
-                let nameList = ['杨安明', '曹春林', '杨泽健', '金勇旭', '杨雨霏', '毛斌峰', '董平']
-                if (loginUserId && ['158', '120', '119', '289', '399'].includes(loginUserId)) {
-                    setUserIdList(res.filter((item: any) => nameList.includes(item.nickname)))
-                } else {
-                    setUserIdList(res)
-                }
+                // let loginUserId = localStorage.getItem('userId')
+                // let nameList = ['杨安明', '曹春林', '杨泽健', '金勇旭', '杨雨霏', '毛斌峰', '董平']
+                // if (loginUserId && ['158', '120', '119', '289', '399'].includes(loginUserId)) {
+                //     setUserIdList(res.filter((item: any) => nameList.includes(item.nickname)))
+                // } else {
+                //     setUserIdList(res)
+                // }
+                setUserIdList(res)
             })
         }
     }, [isSysUserId])

+ 46 - 2
src/pages/gameDataStatistics/order/tableConfig.tsx

@@ -133,13 +133,57 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: string, b: any) => (<WidthEllipsis value={a} />)
                 },
                 {
-                    title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 30,
+                    title: '注册充值时间差',
+                    dataIndex: 'regPayTimeDiff',
+                    align: 'center',
+                    width: 140,
+                    default: 30,
+                    render: (a: string, b: any) => {
+                        if (b?.payTime) {
+                            let diff = new Date(b.payTime).getTime() - new Date(b.regTime).getTime()
+                            function secondsToDhms(seconds: any) {
+                                const days = Math.floor(seconds / (3600 * 24));
+                                const hours = Math.floor((seconds % (3600 * 24)) / 3600);
+                                const minutes = Math.floor((seconds % 3600) / 60);
+                                const remainingSeconds = seconds % 60;
+                                return `${days ? days + "天" : ''}${hours ? hours + "小时" : ''}${minutes ? minutes + "分" : ''}${remainingSeconds ? remainingSeconds + "秒" : ''}`
+                            }
+                            return diff ? secondsToDhms(diff / 1000) : '--'
+                        } else {
+                            return '--'
+                        }
+                    }
+                },
+                {
+                    title: '最近充值时间距今',
+                    dataIndex: 'nowPayTimeDiff',
+                    align: 'center',
+                    width: 130,
+                    default: 31,
+                    render: (a: string, b: any) => {
+                        if (b?.payTime) {
+                            let diff = new Date().getTime() - new Date(b.payTime).getTime()
+                            function secondsToDhms(seconds: any) {
+                                const days = Math.floor(seconds / (3600 * 24));
+                                const hours = Math.floor((seconds % (3600 * 24)) / 3600);
+                                const minutes = Math.floor((seconds % 3600) / 60);
+                                const remainingSeconds = seconds % 60;
+                                return `${days ? days + "天" : ''}${hours ? hours + "小时" : ''}${minutes ? minutes + "分" : ''}${remainingSeconds ? remainingSeconds.toFixed(0) + "秒" : ''}`
+                            }
+                            return diff ? secondsToDhms(diff / 1000) : '--'
+                        } else {
+                            return '--'
+                        }
+                    }
+                },
+                {
+                    title: '支付状态', dataIndex: 'orderStatus', label: '订单明细', align: 'center', width: 85, default: 32,
                     render: (a: string, b: any) => {
                         return PayStatus[a]
                     }
                 },
                 {
-                    title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 31,
+                    title: '是否首充', dataIndex: 'isFirstRecharge', label: '订单明细', align: 'center', width: 45, default: 33,
                     render: (a: any) => {
                         return a == 1 ? '是' : '否'
                     }

+ 5 - 5
src/pages/gameDataStatistics/pitcher/total/index.tsx

@@ -54,13 +54,13 @@ const Total: React.FC = () => {
                         delete newQueryForm.beginDate
                         delete newQueryForm.endDate
                     }
-
+                
                     if (rechargeDay && rechargeDay?.length === 2) {
-                        newQueryForm['rechargeBeginDay'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
-                        newQueryForm['rechargeEndDay'] = moment(rechargeDay[1]).format('YYYY-MM-DD')
+                        newQueryForm['amountBeginDate'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                        newQueryForm['amountEndDate'] = moment(rechargeDay[1]).format('YYYY-MM-DD')
                     } else {
-                        delete newQueryForm['rechargeBeginDay']
-                        delete newQueryForm['rechargeEndDay']
+                        delete newQueryForm['amountBeginDate']
+                        delete newQueryForm['amountEndDate']
                     }
                     setQueryForm({ ...newQueryForm, ...params })
                 }}

+ 4 - 4
src/pages/gameDataStatistics/pitcher/totalGame/index.tsx

@@ -55,11 +55,11 @@ const TotalGame: React.FC = () => {
                     }
 
                     if (rechargeDay && rechargeDay?.length === 2) {
-                        newQueryForm['rechargeBeginDay'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
-                        newQueryForm['rechargeEndDay'] = moment(rechargeDay[1]).format('YYYY-MM-DD')
+                        newQueryForm['amountBeginDate'] = moment(rechargeDay[0]).format('YYYY-MM-DD')
+                        newQueryForm['amountEndDate'] = moment(rechargeDay[1]).format('YYYY-MM-DD')
                     } else {
-                        delete newQueryForm['rechargeBeginDay']
-                        delete newQueryForm['rechargeEndDay']
+                        delete newQueryForm['amountBeginDate']
+                        delete newQueryForm['amountEndDate']
                     }
                     queryForm['gameType'] = gameClassify
                     queryForm['gameCp'] = cpName

+ 2 - 1
src/services/gameData/index.ts

@@ -38,7 +38,8 @@ export async function getGameChoiceListApi() {
  * @returns 
  */
 export async function getSubUserWithSelfListApi() {
-    return request(gameApi + '/erp/user/subUserWithSelf');
+    // return request(gameApi + '/erp/user/subUserWithSelf');
+    return request(gameApi + '/erp/gameUserGroup/memberUser');
 }
 
 /**