Commit db3bf768 authored by cellee's avatar cellee

二级权限禁止展开,预约部分退款状态重新判断

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 841925d4
......@@ -21,10 +21,9 @@ const Account = (props: any) => {
const [expandedKeys, setExpandedKeys] = useState<string[]>(['0']); // 展开栏目
const [checkedKeys, setCheckedKeys] = useState([] as any); // 默认已选栏目
const [selectedKeys, setSelectedKeys] = useState<string[]>([]); // 设置选中的树节点
const [autoExpandParent, setAutoExpandParent] = useState<boolean>(true); // 树形菜单展开关闭
const [autoExpandParent, setAutoExpandParent] = useState<boolean>(false); // 树形菜单展开关闭
// 单选 二级还是三级管理员
const [values, setvalues] = useState(2); // 树形菜单展开关闭
const [values, setvalues] = useState(2); // 单选 二级还是三级管理员
const [disab, setdisab] = useState(false); // 是否禁止选择二级
const [towAccountId, settowAccountId] = useState(null); // 二级账户id
const [treeDataList, settreeDataList] = useState(treeData); // 权限列表
......@@ -156,7 +155,6 @@ const Account = (props: any) => {
message.error('Please enter the correct name and contact information!');
return false;
} else if (checkedKeys.length == 0) {
// 如果存在key 就是没有选择
// 权限
message.error('Please Select Permission!');
return false;
......@@ -208,8 +206,8 @@ const Account = (props: any) => {
console.log(value);
console.log(obj);
RA(38, value, module, dispatch); // 信息上传
RA(42, obj, module, dispatch); // 权限上传
// RA(38, value, module, dispatch); // 信息上传
// RA(42, obj, module, dispatch); // 权限上传
return true;
}
};
......@@ -221,8 +219,13 @@ const Account = (props: any) => {
// 展开/收起树形菜单触发
const onExpand = (expandedKeys: any) => {
setExpandedKeys(expandedKeys);
setAutoExpandParent(false);
if (values == 2) {
return false;
} else {
setExpandedKeys(expandedKeys);
setAutoExpandParent(false);
return true;
}
};
// 点击单个触发
......@@ -233,7 +236,6 @@ const Account = (props: any) => {
// 点击树节点触发 - 大栏目
const onSelect = (selectedKeys: any, info: any) => {
// console.log('onSelect', info);
setSelectedKeys(selectedKeys);
};
......
......@@ -165,7 +165,7 @@ const Account = (props: any) => {
// 姓名联系方式
message.error('Please enter the correct name and contact information!');
return false;
} else if (checkedKeys[0].key) {
} else if (checkedKeys.length == 0) {
// 如果存在key 就是没有选择
// 权限
message.error('Please Select Permission!');
......@@ -226,9 +226,9 @@ const Account = (props: any) => {
permissionArray: newData,
subPermissionArray,
};
RA(38, value, module, dispatch); // 信息上传
RA(42, obj, module, dispatch); // 权限上传
return true;
}
};
......@@ -276,8 +276,13 @@ const Account = (props: any) => {
// 展开/收起树形菜单触发
const onExpand = (expandedKeys: any) => {
setExpandedKeys(expandedKeys);
setAutoExpandParent(false);
if (values == 2) {
return false;
} else {
setExpandedKeys(expandedKeys);
setAutoExpandParent(false);
return true;
}
};
// 点击单个触发
......
......@@ -34,7 +34,7 @@ const BookingDetail = (props: any) => {
const [modalVisible, setModalVisible] = useState(false);
const [modalItem, setModalIteme] = useState({ title: '', tab: 1 });
const [backFeeFlag, setBackFeeFlag] = useState(false); // 部分退费 与 全部退费
const [backFeeFlag, setBackFeeFlag] = useState(false); // 部分退费true 与 全部退费false
const [curbackFee, setCurBackFee] = useState(0);
const [ExtractTime, setExtractTime] = useState(null as any); // 已预约时间段
......@@ -70,7 +70,7 @@ const BookingDetail = (props: any) => {
backMarginFee: curbackFee.toString(),
backMarginFeeReason: val.backMarginFeeReason,
accountName: DataSave.accountName,
backFeeStatus: curbackFee == DataSaveDetail.marginFee ? '0' : '1',
backFeeStatus: backFeeFlag ? '1' : '0', // 0是全退款,1是部分退款
marginFee: DataSaveDetail.marginFee.toString(),
};
console.log(RAVAL);
......
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2020-12-08 16:20:13
* @LastEditTime: 2021-01-28 09:28:38
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\tip.ts
......@@ -105,9 +105,9 @@ export const BookingsTip = [
[reqMes('Please input Name ')],
[{ ...reqMes('Please input contact information (8-11 digits)'), validator: inputNumberTel }],
// [{ required: true, pattern: new RegExp(/^[1-9]\d*$/, 'g'), message: 'Only numbers!')],
[{ required: true, message: 'Only numbers!', validator: inputNumber }],
[{ required: true, message: 'Only numbers!', validator: inputNumber }],
[{ required: true, message: 'Only numbers!', validator: inputNumberStr }],
[{ required: true, message: 'Letters or numbers!', validator: inputNumberStr }],
[{ required: true, message: 'Letters or numbers!', validator: inputNumberStr }],
[{ required: true, message: 'Letters or numbers!', validator: inputNumberStr }],
[reqMes('Please Select The Date')],
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment