Bläddra i källkod

管理员账户修改为不能删除20241211-打包提交

ingredientmanage
gwbvipvip 2 veckor sedan
förälder
incheckning
972022cf35
39 ändrade filer med 65 tillägg och 149 borttagningar
  1. +2
    -2
      dist/asset-manifest.json
  2. +1
    -1
      dist/authorization/index.html
  3. +1
    -1
      dist/authorization/platformAuthorization/index.html
  4. +1
    -1
      dist/authorization/storeAuthorization/index.html
  5. +1
    -1
      dist/batching/batchinginfo/index.html
  6. +1
    -1
      dist/batching/index.html
  7. +1
    -1
      dist/company/account/index.html
  8. +1
    -1
      dist/company/index.html
  9. +1
    -1
      dist/device/deviceInfo/index.html
  10. +1
    -1
      dist/device/index.html
  11. +1
    -1
      dist/index.html
  12. +1
    -1
      dist/interfacedoc/index/index.html
  13. +1
    -1
      dist/order/index.html
  14. +1
    -1
      dist/order/orderflow/index.html
  15. +1
    -1
      dist/order/thirdAuthorize/index.html
  16. +1
    -1
      dist/order/thirdOrder/index.html
  17. +1
    -1
      dist/org/index.html
  18. +1
    -1
      dist/org/orgamange/index.html
  19. +1
    -1
      dist/org/roles/index.html
  20. +1
    -1
      dist/org/users/index.html
  21. +1
    -0
      dist/p__company__account.339cd85a.async.js
  22. +0
    -1
      dist/p__company__account.4546de50.async.js
  23. +1
    -1
      dist/recipe/index.html
  24. +1
    -1
      dist/recipe/recipegrouptemplate/index.html
  25. +1
    -1
      dist/recipe/recipeinfo/index.html
  26. +1
    -1
      dist/report/batchingreport/index.html
  27. +1
    -1
      dist/report/index.html
  28. +1
    -1
      dist/report/recipereport/index.html
  29. +1
    -1
      dist/store/index.html
  30. +1
    -1
      dist/store/storeinfo/index.html
  31. +1
    -1
      dist/sys/activationinfo/index.html
  32. +1
    -1
      dist/sys/devicelog/index.html
  33. +1
    -1
      dist/sys/index.html
  34. +1
    -1
      dist/sys/menus/index.html
  35. +1
    -1
      dist/umi.58392214.js
  36. +1
    -1
      dist/user/index.html
  37. +1
    -1
      dist/user/login/index.html
  38. +1
    -1
      dist/welcome/index.html
  39. +27
    -111
      src/pages/company/account/index.jsx

+ 2
- 2
dist/asset-manifest.json Visa fil

@@ -1,6 +1,6 @@
{
"/umi.css": "/umi.3663c81d.css",
"/umi.js": "/umi.a03e5fe9.js",
"/umi.js": "/umi.58392214.js",
"/t__plugin-layout__Layout.css": "/t__plugin-layout__Layout.e1129705.chunk.css",
"/t__plugin-layout__Layout.js": "/t__plugin-layout__Layout.2b13eb06.async.js",
"/p__user__login.css": "/p__user__login.2f84d6a8.chunk.css",
@@ -9,7 +9,7 @@
"/p__sys__devicelog.js": "/p__sys__devicelog.3eb303e0.async.js",
"/p__sys__activationinfo.js": "/p__sys__activationinfo.19877b3a.async.js",
"/p__company__account.css": "/p__company__account.f6838307.chunk.css",
"/p__company__account.js": "/p__company__account.4546de50.async.js",
"/p__company__account.js": "/p__company__account.339cd85a.async.js",
"/p__org__orgamange.css": "/p__org__orgamange.5d1001bb.chunk.css",
"/p__org__orgamange.js": "/p__org__orgamange.523bf01c.async.js",
"/p__org__roles.js": "/p__org__roles.30147346.async.js",


+ 1
- 1
dist/authorization/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/authorization/platformAuthorization/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/authorization/storeAuthorization/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/batching/batchinginfo/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/batching/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/company/account/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/company/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/device/deviceInfo/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/device/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/interfacedoc/index/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/order/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/order/orderflow/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/order/thirdAuthorize/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/order/thirdOrder/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/org/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/org/orgamange/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/org/roles/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/org/users/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 0
dist/p__company__account.339cd85a.async.js
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 0
- 1
dist/p__company__account.4546de50.async.js
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 1
dist/recipe/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/recipe/recipegrouptemplate/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/recipe/recipeinfo/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/report/batchingreport/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/report/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/report/recipereport/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/store/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/store/storeinfo/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/sys/activationinfo/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/sys/devicelog/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/sys/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/sys/menus/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

dist/umi.58392214.js
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 1
dist/user/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/user/login/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 1
- 1
dist/welcome/index.html Visa fil

@@ -221,6 +221,6 @@
</div>
</div>

<script src="/umi.a03e5fe9.js"></script>
<script src="/umi.58392214.js"></script>
</body>
</html>

+ 27
- 111
src/pages/company/account/index.jsx Visa fil

@@ -1,7 +1,7 @@
import { PlusOutlined } from '@ant-design/icons';
import { Button, message, Drawer, Popconfirm } from 'antd';
import React, { useState, useRef, useEffect } from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import { PageContainer } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import CreateForm from './components/CreateForm';
@@ -13,7 +13,6 @@ import api from './service';
*
* @param fields
*/

const handleAdd = async (fields) => {
try {
await api.addCompany(fields).then((r) => {
@@ -38,10 +37,8 @@ const handleAdd = async (fields) => {
*
* @param fields
*/

const handleUpdate = async (fields) => {
try {

await api.updateCompany(fields).then((r) => {
if (!r.succeeded) {
message.error(r.errors);
@@ -59,30 +56,6 @@ const handleUpdate = async (fields) => {
return false;
}
};
/**
* 删除节点
*
* @param selectedRows
*/

const handleRemove = async (selectedRows) => {
if (!selectedRows) return true;
try {
await api.removeCompany(selectedRows.map((row) => row.id)).then((r) => {
if (r) {
message.success('删除成功');
return true;
} else {
message.error('删除失败,请重试');
}
});
return true;
} catch (error) {
message.error('删除失败,请重试');
return false;
}
};


const handleMenu = async (fields) => {
try {
@@ -111,24 +84,20 @@ const companyManage = () => {
/*绑定数据 */
const actionRef = useRef();
const [currentRow, setCurrentRow] = useState();
/*选中*/
const [selectedRowsState, setSelectedRows] = useState();

//获取功能菜单数据
const [treeData, setTreeData] = useState();

const [row, setRow] = useState();

useEffect(() => {
var parm={getType:'ALL',type:0}
var parm = { getType: 'ALL', type: 0 }
api.GetMenu(parm).then((r) => {
if(r.data){
if (r.data) {
setTreeData(r.data);
}
});
}, []);

const handleResetPwd=(record)=>{
const handleResetPwd = (record) => {
api.ResetPwd(record.userId).then(r => {
r.data ? message.success("重置成功") : message.error("重置失败");
})
@@ -190,15 +159,16 @@ const companyManage = () => {
width: 400,
render: (_, record) => {
var template = [
<a
<Button
type='link'
style={{ padding: 0 }}
onClick={() => {
handleModalVisible(true);
setStepFormValues(record);
}}
>
{' '}
更新
</a>,
</Button>,
<Popconfirm
title="确认重置密码吗?"
onConfirm={() => { handleResetPwd(record) }}
@@ -206,11 +176,17 @@ const companyManage = () => {
okText="确定"
cancelText="取消"
>
<a>
<Button
type='link'
style={{ padding: 0 }}
>
重置密码
</a>
</Button>
</Popconfirm>,
<a
<Button
type='link'
style={{ padding: 0 }}
disabled={record.adminName === 'admin'}
onClick={() => {
api.GetRoleMenu(record.sysRoleId).then((r) => {
setRow(r.data);
@@ -219,10 +195,10 @@ const companyManage = () => {
setStepFormValues(record);
}}
>
{' '}
企业菜单授权
</a>,
</Button>,
<Popconfirm
disabled={record.adminName === 'admin'}
type="primary"
key="primary"
title="删除加盟商将会删除下面的用户以及菜单权限,确认删除吗?"
@@ -230,27 +206,19 @@ const companyManage = () => {
cancelText="否"
onConfirm={() => {
api.removeCompany([record.id]).then((r) => {

message.success('删除成功');
actionRef.current.reload();
});
}}
onCancel={() => { }}
>
<a href="#">删除</a>
<Button
type='link'
style={{ padding: 0 }}
disabled={record.adminName === 'admin'}
>
删除
</Button>
</Popconfirm>,
// <a
// // onClick={() => {
// // api.GetRoleMenu(record.sysRoleId).then((r) => {
// // setRow(r.data);
// // handleUpdateMenuModalVisible(true);
// // });
// // setStepFormValues(record);
// // }}
// >
// {' '}
// LOGO设置
// </a>,
];
return template;
},
@@ -294,55 +262,7 @@ const companyManage = () => {
};
}}
columns={columns}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}
/>
{selectedRowsState?.length > 0 && (
<FooterToolbar
extra={
<div>
已选择{' '}
<a
style={{
fontWeight: 600,
}}
>
{selectedRowsState.length}
</a>{' '}
项 &nbsp;&nbsp;
</div>
}
>
{/* <Button
type="primary"
onClick={async () => {
await handleRemove(selectedRowsState);
setSelectedRows([]);
actionRef.current?.reloadAndRest?.();
}}
>
批量删除
</Button> */}
<Popconfirm
type="primary"
key="primary"
title="确认删除吗?"
okText="是"
cancelText="否"
onConfirm={() => {
handleRemove(selectedRowsState);
setSelectedRows([]);
actionRef.current?.reloadAndRest?.();
}}
onCancel={() => { }}
>
<a href="#">批量删除</a>
</Popconfirm>
</FooterToolbar>
)}
<CreateForm
onFinish={async (value) => {
var success = false;
@@ -354,12 +274,8 @@ const companyManage = () => {
if (success) {
handleModalVisible(false);
setCurrentRow(undefined);

if (actionRef.current) {
actionRef.current.reload();
}
actionRef.current.reload();
}
actionRef.current?.reload();
}}
onCancel={() => {
handleModalVisible(false);


Laddar…
Avbryt
Spara