Commit c042b64d authored by TZW's avatar TZW

111

parent 7c22521b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03 * @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-08 13:22:34 * @Last Modified time: 2023-02-10 17:58:21
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -79,17 +79,7 @@ function Failure(props) { ...@@ -79,17 +79,7 @@ function Failure(props) {
</PremButton> </PremButton>
); );
} else { } else {
return ( return <></>;
<PremButton
btn={{
size: 'small',
type: 'danger',
disabled: true,
}}
>
删除
</PremButton>
);
} }
}; };
......
...@@ -12,7 +12,7 @@ function getcolumns(setDrawer, ifs, formRef) { ...@@ -12,7 +12,7 @@ function getcolumns(setDrawer, ifs, formRef) {
title: '用户名-姓名', title: '用户名-姓名',
dataIndex: 'username', dataIndex: 'username',
width: 120, width: 120,
key: 'username', key: 'usernamefullname',
hideInTable: true, hideInTable: true,
search: false, search: false,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44 * @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-19 10:32:30 * @Last Modified time: 2023-02-10 17:54:56
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -68,7 +68,7 @@ function User(props) { ...@@ -68,7 +68,7 @@ function User(props) {
setDrawer((s) => ({ setDrawer((s) => ({
...s, ...s,
visible: true, visible: true,
item: row, item: { ...row, usernamefullname: `${row?.username}-${row?.fullName}` },
type: 'edit', type: 'edit',
title: '编辑', title: '编辑',
val: 'only', val: 'only',
...@@ -176,10 +176,11 @@ function User(props) { ...@@ -176,10 +176,11 @@ function User(props) {
} }
let params = { let params = {
...vals, ...vals,
username: vals?.username.slice(0, vals?.username?.indexOf('-')), username: vals?.usernamefullname.slice(0, vals?.usernamefullname?.indexOf('-')),
id: drawer?.title == '编辑' ? drawer?.item?.id : '', id: drawer?.title == '编辑' ? drawer?.item?.id : '',
userCharReqList, userCharReqList,
}; };
delete params.usernamefullname;
delete params.shopId; delete params.shopId;
//console.log(params, '!!!!'); //console.log(params, '!!!!');
let res = await doFetch({ let res = await doFetch({
...@@ -212,6 +213,7 @@ function User(props) { ...@@ -212,6 +213,7 @@ function User(props) {
case 'edit': case 'edit':
return ( return (
<ExtendField <ExtendField
defaultFormValue={drawer.item}
setDrawer={setDrawer} setDrawer={setDrawer}
drawer={drawer} drawer={drawer}
actionRef={actionRef} actionRef={actionRef}
...@@ -231,10 +233,12 @@ function User(props) { ...@@ -231,10 +233,12 @@ function User(props) {
} }
let params = { let params = {
...vals, ...vals,
username: vals?.usernamefullname.slice(0, vals?.usernamefullname?.indexOf('-')),
id: drawer?.title == '编辑' ? drawer?.item?.id : '', id: drawer?.title == '编辑' ? drawer?.item?.id : '',
userCharReqList, userCharReqList,
}; };
delete params.shopId; delete params.shopId;
delete params.usernamefullname;
//console.log(params, '!!!!'); //console.log(params, '!!!!');
let res = await doFetch({ let res = await doFetch({
url: urlParams.save, url: urlParams.save,
......
...@@ -142,7 +142,7 @@ function Outstore(props) { ...@@ -142,7 +142,7 @@ function Outstore(props) {
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
open: true, open: true,
item: null, item: { outType: '2' },
title: '新增', title: '新增',
val: 'add', val: 'add',
})); }));
......
...@@ -121,6 +121,7 @@ function Setting(props) { ...@@ -121,6 +121,7 @@ function Setting(props) {
actionRef={actionRef} actionRef={actionRef}
path={pathconfig?.list || '/ngic-auth/sysUser/query/page'} path={pathconfig?.list || '/ngic-auth/sysUser/query/page'}
pageextra={pathconfig?.enableadd ? 'add' : null} pageextra={pathconfig?.enableadd ? 'add' : null}
childposition="left"
resizeable={false} resizeable={false}
addconfig={{ addconfig={{
// access: 'sysDepartment_save', // access: 'sysDepartment_save',
...@@ -130,7 +131,7 @@ function Setting(props) { ...@@ -130,7 +131,7 @@ function Setting(props) {
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
open: true, open: true,
item: null, item: { isLife: 1 },
title: '新增', title: '新增',
val: 'add', val: 'add',
})); }));
......
...@@ -158,7 +158,7 @@ function Supplier(props) { ...@@ -158,7 +158,7 @@ function Supplier(props) {
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
open: true, open: true,
item: null, item: { status: 1 },
title: '新增', title: '新增',
val: 'add', val: 'add',
})); }));
......
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