diff --git a/src/pages/company/account/components/CreateForm.jsx b/src/pages/company/account/components/CreateForm.jsx
index f3c28d3..fab4c96 100644
--- a/src/pages/company/account/components/CreateForm.jsx
+++ b/src/pages/company/account/components/CreateForm.jsx
@@ -37,6 +37,22 @@ const CreateForm = (props) => {
message: '邮箱格式不正确', }]}>
+
+
+
diff --git a/src/pages/company/account/components/MenuForm.jsx b/src/pages/company/account/components/MenuForm.jsx
index db35e9e..cd21632 100644
--- a/src/pages/company/account/components/MenuForm.jsx
+++ b/src/pages/company/account/components/MenuForm.jsx
@@ -16,7 +16,9 @@ const MenuForm = (props) => {
});
setCheckedKeys(arr)
- var ret = await api.GetMenu('ALL');
+ console.log("props.values",props.datas)
+ var parm={getType:'ALL',type:props.datas.type}
+ var ret = await api.GetMenu(parm);
var data = Enumerable.from(ret.data).toArray();
setLoad(data);
}, [props.modalVisible])
diff --git a/src/pages/company/account/index.jsx b/src/pages/company/account/index.jsx
index 7c3220c..0ce10ce 100644
--- a/src/pages/company/account/index.jsx
+++ b/src/pages/company/account/index.jsx
@@ -120,7 +120,8 @@ const companyManage = () => {
const [row, setRow] = useState();
useEffect(() => {
- api.GetMenu().then((r) => {
+ var parm={getType:'ALL',type:0}
+ api.GetMenu(parm).then((r) => {
if(r.data){
setTreeData(r.data.data);
}
@@ -164,7 +165,23 @@ const companyManage = () => {
dataIndex: 'email',
ellipsis: true,
},
-
+ {
+ title: '所属平台',
+ dataIndex: 'type',
+ valueType: 'select',
+ ellipsis:true,
+ valueEnum: {
+ 0: {
+ text: '团餐',
+ },
+ 1: {
+ text: '门店',
+ },
+ 2: {
+ text: '后厨',
+ },
+ },
+ },
{
title: '电话',
dataIndex: 'phone',
@@ -423,6 +440,7 @@ const companyManage = () => {
}}
modalVisible={updateMenuModalVisible}
values={row || {}}
+ datas={stepFormValues || {}}
/>
) : null}
{
- {RadioKey != 0 && props.values.type != 0 ? (
- ''
- ) : (
-
-
+
+
+
- )}
+
diff --git a/src/pages/sys/menus/index.jsx b/src/pages/sys/menus/index.jsx
index 5dbf35b..c15e07b 100644
--- a/src/pages/sys/menus/index.jsx
+++ b/src/pages/sys/menus/index.jsx
@@ -28,7 +28,7 @@ const menuManager = () => {
*/
const handleAdd = async (fields) => {
- fields.type=3
+ fields.type=fields.type.join(',');
await api.add({ ...fields }).then((r) => {
if (r.succeeded) {
message.success('添加成功');
@@ -47,6 +47,7 @@ const menuManager = () => {
*/
const handleUpdate = async (fields) => {
+ fields.type=fields.type.join(',');
api.update(fields).then((r) => {
if (r.succeeded) {
message.success('更新成功');
@@ -72,6 +73,7 @@ const handleUpdate = async (fields) => {
onClick={() => {
InitTree();
handleModalVisible(true);
+ record.type=record.type.split(',');
setStepFormValues(record);
}}
>
@@ -157,6 +159,32 @@ const handleUpdate = async (fields) => {
dataIndex: 'name',
ellipsis:true,
},
+ {
+ title: '所属平台',
+ dataIndex: 'typeName',
+
+ },
+ {
+ title: '所属平台',
+ dataIndex: 'type',
+ valueType: 'select',
+ ellipsis:true,
+ hideInTable: true,
+ valueEnum: {
+ 0: {
+ text: '团餐',
+ },
+ 1: {
+ text: '门店',
+ },
+ 2: {
+ text: '后厨',
+ },
+ 3: {
+ text: '公共',
+ },
+ },
+ },
{
title: '菜单编码',
dataIndex: 'code',
@@ -232,7 +260,8 @@ const handleUpdate = async (fields) => {
let UserData = [];
//添加机构组织
await api.menutreepage(value).then((r) => {
- UserData = r.data;
+ UserData=r.data
+ console.log("UserData",UserData)
});
return {
data: UserData,
diff --git a/src/pages/sys/menus/service.js b/src/pages/sys/menus/service.js
index 8fff673..d331e64 100644
--- a/src/pages/sys/menus/service.js
+++ b/src/pages/sys/menus/service.js
@@ -36,7 +36,7 @@ function update(params) {
}
function trees() {
- return request(`/saasbase/api/menu/menutrees?getType=ALL`, {
+ return request(`/saasbase/api/menu/menutreesall`, {
method: 'Get',
});
}