From 67134ce4be327d7d6a0c40d7986c6171c5926f7f Mon Sep 17 00:00:00 2001 From: yangwenhua <1289978696@qq.com> Date: Thu, 22 Sep 2022 18:06:03 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=82=A8=E5=80=BC?= =?UTF-8?q?=E5=8D=A1=E8=B4=A6=E5=8F=B7=E7=AE=A1=E7=90=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/card/memberAccount/index.jsx | 57 ++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/src/pages/card/memberAccount/index.jsx b/src/pages/card/memberAccount/index.jsx index 3afb237..5a590a5 100644 --- a/src/pages/card/memberAccount/index.jsx +++ b/src/pages/card/memberAccount/index.jsx @@ -1,4 +1,4 @@ -import React, { useRef, useState } from "react"; +import React, { useRef, useState, useEffect } from "react"; import styles from "./index.less"; import { PageContainer } from '@ant-design/pro-layout'; import { PlusOutlined, UserOutlined } from '@ant-design/icons'; @@ -13,7 +13,11 @@ import cardAPI from "../service"; const memberAccount = () => { const actionRef = useRef(); const [isModalOpen, setIsModalOpen] = useState(false); - const [currentOption, setCurrentOption] = useState(); + const [currentOption, setCurrentOption] = useState({ + functionName: '', + record: {}, + type: 0 + }); const [current, setCurrent] = useState(1); const [pageSize, setPageSize] = useState(10); const [total, setTotal] = useState(0); @@ -37,6 +41,11 @@ const memberAccount = () => { "type": type } const response = await cardAPI.GetMemberAccountCardConsRecord(jsonData); + setCurrentOption({ + functionName: 'onFetchAccountConsRecord', + record: JSON.parse(JSON.stringify(record)), + type + }); if (response.statusCode === 200) { setConsList(response.data.data); setConsTotal(response.data.total); @@ -59,6 +68,11 @@ const memberAccount = () => { "type": type } const response = await cardAPI.GetMemberAccountCardConsRecord(jsonData); + setCurrentOption({ + functionName: 'onFetchCardConsRecord', + record: JSON.parse(JSON.stringify(record)), + type + }); if (response.statusCode === 200) { setConsList(response.data.data); setConsTotal(response.data.total); @@ -170,6 +184,11 @@ const memberAccount = () => { //消费列表 const consColumns = [ + { + title: '时间', + dataIndex: 'createAt', + width: 200 + }, { title: '类型', dataIndex: 'type', @@ -182,21 +201,43 @@ const memberAccount = () => { } }, - { - title: '消费金额', - dataIndex: 'money', - }, { title: '之前余额', dataIndex: 'beforeMoney', + render: (_, record) => { + return
+ {record.beforeMoney} +
+ } + }, + { + title: '消费金额', + dataIndex: 'money', + render: (_, record) => { + return
+ {record.money} +
+ } }, { title: '之后余额', dataIndex: 'afterMoney', + render: (_, record) => { + return
+ {record.afterMoney} +
+ } } ]; - + useEffect(() => { + if (consCurrent === 1) return; + if (currentOption.functionName === 'onFetchAccountConsRecord') { + onFetchAccountConsRecord(currentOption.record, currentOption.type); + } else if (currentOption.functionName === 'onFetchCardConsRecord') { + onFetchCardConsRecord(currentOption.record, currentOption.type); + } + }, [consCurrent]) return ( @@ -239,7 +280,7 @@ const memberAccount = () => { dateFormatter="string" headerTitle="储值卡账户管理" /> - setIsModalOpen(false)}> + {setIsModalOpen(false); setConsCurrent(1)}}> Date: Fri, 23 Sep 2022 09:44:30 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=B7=E5=8D=A1?= =?UTF-8?q?=E6=9C=BA=E7=AE=A1=E7=90=86=E8=AE=BE=E5=A4=87=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/card/machine/index.jsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/pages/card/machine/index.jsx b/src/pages/card/machine/index.jsx index 6025738..a601fcf 100644 --- a/src/pages/card/machine/index.jsx +++ b/src/pages/card/machine/index.jsx @@ -89,6 +89,11 @@ const Machine = () => { } }, + { + title: '设备地址', + dataIndex: 'address', + ellipsis: true, + }, { title: '状态', dataIndex: 'status', @@ -245,6 +250,7 @@ const Machine = () => { + { + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 组织配置 +
+ ID + + {props.quickStartObj.storeConfig.id} +
+ 编码 + + {props.quickStartObj.storeConfig.code} +
+ 名称 + + {props.quickStartObj.storeConfig.name} +
+ 上级组织 + + {(() => { + const pid = props.quickStartObj.storeConfig.pid; + const find = orgTree.find(item => item.id === pid); + if (find) { + return find.name; + } else { + return "无上级组织" + } + })()} +
+ 组织类型 + + {props.quickStartObj.storeConfig.type} +
+ 支付方式 + + {(() => { + const payTemplateId = props.quickStartObj.storeConfig.payTemplateId; + const find = payTypeList.find(item => item.id === payTemplateId); + if (find) { + return find.name; + } else { + return "无支付方式" + } + })()} +
+ 店铺地址 + + {props.quickStartObj.storeConfig.store_Addr} +
+ 店铺坐标 + + {props.quickStartObj.storeConfig.store_Loc} +
+ 联系电话 + + {props.quickStartObj.storeConfig.tel} +
+ 门店排序 + + {props.quickStartObj.storeConfig.sort} +
+ 备注 + + {props.quickStartObj.storeConfig.remark} +
+ {/* 2.设备配置 */} + + + + + + + + + + + + + + + + + + + + + + +
+ 设备配置 +
+ ID + + {props.quickStartObj.deviceConfig.id} +
+ 设备名称 + + {props.quickStartObj.deviceConfig.deviceName} +
+ 设备类型 + + {props.quickStartObj.deviceConfig.deviceTypeKey} +
+ 设备类型 + + {props.quickStartObj.deviceConfig.deviceTypeKey} +
} diff --git a/src/pages/quickStart/index.less b/src/pages/quickStart/index.less index e959ccb..79c9d67 100644 --- a/src/pages/quickStart/index.less +++ b/src/pages/quickStart/index.less @@ -25,4 +25,50 @@ top: 50%; transform: translateY(-50%); right: 0px +} + +.ant_descriptions_row { + display: flex; + border-bottom: 1px solid rgba(0,0,0,.06); +} + +.ant_descriptions_row:first-child { + border-top: 1px solid rgba(0,0,0,.06); + border-right: 1px solid rgba(0,0,0,.06); +} + +.ant_descriptions_item_title { + color: rgba(0,0,0,.85); + font-weight: 600; + font-size: 18px; + line-height: 1.5715; + text-align: start; + padding: 16px 24px; + border-left: 1px solid rgba(0,0,0,.06); +} + +.ant_descriptions_item_label { + flex-shrink: 0; + width: 20%; + color: rgba(0,0,0,.85); + font-weight: 400; + font-size: 14px; + line-height: 1.5715; + text-align: start; + background-color: #fafafa; + padding: 16px 24px; + border-left: 1px solid rgba(0,0,0,.06); + border-right: 1px solid rgba(0,0,0,.06); +} + +.ant_descriptions_item_content { + border-right: 1px solid rgba(0,0,0,.06); + padding: 16px 24px; + display: table-cell; + flex: 1 1; + color: rgba(0,0,0,.85); + font-size: 14px; + line-height: 1.5715; + word-break: break-word; + overflow-wrap: break-word; } \ No newline at end of file