Browse Source

一卡通bug修复

tags/小炒逻辑变更前
yangwenhua 2 years ago
parent
commit
d81e499aa8
6 changed files with 251 additions and 21 deletions
  1. +1
    -2
      src/pages/card/gate/index.jsx
  2. +1
    -1
      src/pages/card/machine/index.jsx
  3. +3
    -3
      src/pages/card/memberAccount/index.jsx
  4. +8
    -8
      src/pages/card/storedValueCard/index.jsx
  5. +192
    -7
      src/pages/quickStart/components/ConfirmConfig/index.jsx
  6. +46
    -0
      src/pages/quickStart/index.less

+ 1
- 2
src/pages/card/gate/index.jsx View File

@@ -66,7 +66,6 @@ const Gate = () => {
// 及时销毁 editor ,重要!
useEffect(() => {
if (editor == null) return;
console.log('销毁');
editor.destroy()
setEditor(null)
setHtml('');
@@ -237,7 +236,7 @@ const Gate = () => {
onChange: (page) => setCurrent(page),
}}
dateFormatter="string"
headerTitle="储值卡账户管理"
headerTitle="档口管理"
toolBarRender={() => [
<div className={styles.table_search_item}>
<div>


+ 1
- 1
src/pages/card/machine/index.jsx View File

@@ -197,7 +197,7 @@ const Machine = () => {
onChange: (page) => setCurrent(page)
}}
dateFormatter="string"
headerTitle="储值卡账户管理"
headerTitle="刷卡机管理"
toolBarRender={() => [
<div className={styles.table_search_item}>
<div>


+ 3
- 3
src/pages/card/memberAccount/index.jsx View File

@@ -155,15 +155,15 @@ const memberAccount = () => {
dataIndex: 'type',
valueType: 'select',
valueEnum: {
0: {
1: {
text: '人脸',
status: 'Success',
},
1: {
2: {
text: '实体卡',
status: 'Success',
},
2: {
3: {
text: '指纹',
status: 'Success',
}


+ 8
- 8
src/pages/card/storedValueCard/index.jsx View File

@@ -70,7 +70,7 @@ const storedValueCard = () => {
"memberCardId": currentOption.id
});
if (response.data === true) {
message.error('绑定成功');
message.success('绑定成功');
actionRef.current.reload();
setBindMemberDrawer(false);
} else {
@@ -172,15 +172,15 @@ const storedValueCard = () => {
dataIndex: 'type',
valueType: 'select',
valueEnum: {
0: {
1: {
text: '人脸',
status: 'Success',
},
1: {
2: {
text: '实体卡',
status: 'Success',
},
2: {
3: {
text: '指纹',
status: 'Success',
}
@@ -265,7 +265,7 @@ const storedValueCard = () => {
onChange: (page) => setCurrent(page),
}}
dateFormatter="string"
headerTitle="储值卡账户管理"
headerTitle="储值卡管理"
toolBarRender={() => [
<Button key="button" icon={<PlusOutlined />} type="primary" onClick={onCreateTableRow}>
新建
@@ -324,9 +324,9 @@ const storedValueCard = () => {
]}
>
<Select>
<Select.Option value={0}>人脸</Select.Option>
<Select.Option value={1}>实体卡</Select.Option>
<Select.Option value={2}>指纹</Select.Option>
<Select.Option value={1}>人脸</Select.Option>
<Select.Option value={2}>实体卡</Select.Option>
<Select.Option value={3}>指纹</Select.Option>
</Select>
</Form.Item>



+ 192
- 7
src/pages/quickStart/components/ConfirmConfig/index.jsx View File

@@ -1,21 +1,206 @@
import React, { useState, useEffect, useRef } from 'react';
import ProTable from '@ant-design/pro-table';
import { Form, Input, Select, InputNumber, TreeSelect, message, Button, Modal, Radio, Upload, Switch, Card } from 'antd';
import quickAPI from "../../service";
import indexStyles from "../../index.less";
import StepsButton from "../StepsButton";
import { message } from 'antd';

/**
* 确认配置
* @returns
*/
const ConfirmConfig = (props) => {
/**
* 1.组织配置
*/
//组织树
const [orgTree, setOrgTree] = useState([]);
//支付方式列表
const [payTypeList, setPayTypeList] = useState([]);
//获取组织树
const onFetchOrgTree = async () => {
const response = await await quickAPI.getpage({
current: 1,
pageSize: 1000
});
if (response.data.success) {
setOrgTree(response.data.data);
} else {
message.error(response.errors || '获取组织架构出错');
}
}

//获取支付配置
const getPayTemplateList = async () => {
const response = await quickAPI.getPayTemplateList();
if (response.statusCode === 200) {
setPayTypeList(response.data.data);
} else {
message.error(response.errors || '获取获取支付方式出错');
}
}

useEffect(() => {
onFetchOrgTree();
getPayTemplateList();
}, []);

return <>
<Card
title="门店信息"
>
<Card.Grid>组织名称:{quickStartObj.storeConfig.name}</Card.Grid>
</Card>
{/* 1.组织配置 */}
<table style={{ width: '50%', marginBottom: '10px' }}>
<tbody>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_title}>
组织配置
</th>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
ID
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.storeConfig.id}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
编码
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.storeConfig.code}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
名称
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.storeConfig.name}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
上级组织
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{(() => {
const pid = props.quickStartObj.storeConfig.pid;
const find = orgTree.find(item => item.id === pid);
if (find) {
return find.name;
} else {
return "无上级组织"
}
})()}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
组织类型
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.storeConfig.type}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
支付方式
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{(() => {
const payTemplateId = props.quickStartObj.storeConfig.payTemplateId;
const find = payTypeList.find(item => item.id === payTemplateId);
if (find) {
return find.name;
} else {
return "无支付方式"
}
})()}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
店铺地址
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.storeConfig.store_Addr}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
店铺坐标
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.storeConfig.store_Loc}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
联系电话
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.storeConfig.tel}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
门店排序
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.storeConfig.sort}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
备注
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.storeConfig.remark}
</td>
</tr>
</tbody>
</table>
{/* 2.设备配置 */}
<table style={{ width: '50%', marginBottom: '10px' }}>
<tbody>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_title}>
设备配置
</th>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
ID
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.deviceConfig.id}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
设备名称
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.deviceConfig.deviceName}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
设备类型
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.deviceConfig.deviceTypeKey}
</td>
</tr>
<tr className={indexStyles.ant_descriptions_row}>
<th className={indexStyles.ant_descriptions_item_label}>
设备类型
</th>
<td className={indexStyles.ant_descriptions_item_content}>
{props.quickStartObj.deviceConfig.deviceTypeKey}
</td>
</tr>
</tbody>
</table>
<StepsButton current={props.current} steps={props.steps} prev={props.prev}></StepsButton>
</>
}


+ 46
- 0
src/pages/quickStart/index.less View File

@@ -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;
}

Loading…
Cancel
Save