Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
ems3.3
Commits
7120c0d2
Commit
7120c0d2
authored
Dec 01, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12011738
parent
c89192a7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
276 additions
and
163 deletions
+276
-163
index.jsx
src/components/AutoTable/index.jsx
+1
-1
index.jsx
src/pages/device/account/index.jsx
+1
-1
columns.js
src/pages/device/supplier/columns.js
+6
-1
index.jsx
src/pages/device/supplier/index.jsx
+267
-53
index.jsx
src/pages/setting/users/index.jsx
+1
-107
No files found.
src/components/AutoTable/index.jsx
View file @
7120c0d2
...
...
@@ -27,7 +27,7 @@ export default (props) => {
),
};
//右上角
page
extra 类型 1.reactDom 2.string 以逗号隔开 为none时不显示
//右上角
extra 类型 1.reactDom 2.string 以逗号隔开 为none时不显示
const
renderextra
=
()
=>
{
if
(
props
.
pageextra
&&
!
isString
(
props
.
pageextra
))
{
if
(
typeof
props
?.
pageextra
==
'function'
)
{
...
...
src/pages/device/account/index.jsx
View file @
7120c0d2
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-01 1
5:05:17
* @Last Modified time: 2022-12-01 1
6:49:23
*/
import
*
as
React
from
'react'
;
...
...
src/pages/device/supplier/columns.js
View file @
7120c0d2
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
Switch
}
from
'antd'
;
import
fieldsDetail
from
'@/utils/fieldsDetail'
;
function
getcolumns
(
setdrawer
)
{
return
[
{
title
:
'供应商编号'
,
dataIndex
:
'supplierNo'
,
key
:
'supplierNo'
,
width
:
120
,
},
{
title
:
'供应商名称'
,
dataIndex
:
'supplierName'
,
key
:
'supplierName'
,
width
:
150
,
formItemProps
:
{
rules
:
[
{
...
...
@@ -65,7 +69,7 @@ function getcolumns(setdrawer) {
title
:
'地址'
,
dataIndex
:
'address'
,
key
:
'address'
,
width
:
3
0
0
,
width
:
3
2
0
,
formItemProps
:
{
rules
:
[
{
...
...
@@ -126,6 +130,7 @@ function getcolumns(setdrawer) {
title
:
'评分'
,
dataIndex
:
'score'
,
key
:
'score'
,
width
:
50
,
valueType
:
'rate'
,
fieldProps
:
{
defaultValue
:
1
,
...
...
src/pages/device/supplier/index.jsx
View file @
7120c0d2
This diff is collapsed.
Click to expand it.
src/pages/setting/users/index.jsx
View file @
7120c0d2
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-01 1
1:13:59
* @Last Modified time: 2022-12-01 1
5:10:22
*/
import
*
as
React
from
'react'
;
...
...
@@ -136,112 +136,6 @@ function User(props) {
);
};
const
Adduser
=
()
=>
{
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
fieldscolumns
,
setfieldscolumns
]
=
useState
(
columns
);
const
selectValueType
=
(
type
,
options
)
=>
{
switch
(
type
)
{
case
1
:
return
{
valueType
:
'input'
,
};
case
2
:
return
{
valueType
:
'select'
,
options
,
};
case
3
:
return
{
valueType
:
'radio'
,
options
,
};
case
4
:
return
{
valueType
:
'select'
,
options
,
};
default
:
break
;
}
};
useEffect
(()
=>
{
const
fn
=
async
()
=>
{
let
res
=
await
doFetch
({
url
:
'/base/paFormField/queryList'
,
params
:
{
formId
:
'1'
,
},
});
if
(
res
?.
data
?.
dataList
)
{
let
column
=
[
{
title
:
'扩展字段'
,
valueType
:
'split'
,
},
];
res
?.
data
?.
dataList
?.
forEach
((
el
)
=>
{
column
.
push
({
...
selectValueType
(
el
.
fieldChar
,
el
.
valueList
),
title
:
el
.
fieldName
,
dataIndex
:
el
.
fieldName
,
key
:
el
.
id
,
});
});
setfieldscolumns
(
fieldscolumns
.
concat
(
column
));
}
};
fn
();
},
[]);
return
(
<>
<
InitForm
extendField=
"userCharList"
detailpath=
{
urlParams
.
detail
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
fields=
{
fieldscolumns
}
onFinish=
{
async
(
vals
)
=>
{
let
userCharReqList
=
[];
for
(
let
i
in
vals
)
{
if
(
!
isNaN
(
Number
(
i
)))
{
userCharReqList
.
push
({
fieldId
:
i
,
fieldRealValue
:
vals
[
i
],
});
delete
vals
[
i
];
}
}
let
params
=
{
...
vals
,
id
:
drawer
?.
title
==
'编辑'
?
drawer
?.
item
?.
id
:
''
,
shopIdList
:
vals
.
shopId
,
userCharReqList
,
};
delete
params
.
shopId
;
console
.
log
(
params
,
'!!!!'
);
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
if
(
drawer
?.
title
==
'编辑'
)
{
message
.
success
(
'编辑成功!'
);
}
else
{
message
.
success
(
'新增成功!'
);
}
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
}));
actionRef
.
current
.
reload
();
}
}
}
/>
</>
);
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setDrawer
);
return
defcolumn
.
concat
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment