Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms
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
wms
Commits
96171fa8
Commit
96171fa8
authored
Sep 06, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
d45398bb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
471 additions
and
390 deletions
+471
-390
mtable.jsx
src/components/AutoTable/mtable.jsx
+2
-2
index.jsx
src/components/Details/index.jsx
+38
-27
global.less
src/global.less
+5
-0
fields.js
src/pages/insertstore/Instore/fields.js
+1
-1
printdom.jsx
src/pages/insertstore/Instore/printdom.jsx
+12
-9
fields.js
src/pages/outsetstore/Outstore/fields.js
+1
-1
printdom.jsx
src/pages/outsetstore/Outstore/printdom.jsx
+28
-9
Formpage.jsx
src/pages/platform/Sendset/Formpage.jsx
+2
-1
index.jsx
src/pages/platform/Sendset/index.jsx
+382
-340
No files found.
src/components/AutoTable/mtable.jsx
View file @
96171fa8
...
...
@@ -187,7 +187,7 @@ const Mtable = (props) => {
//调用重新渲染表格
useAsyncEffect
(
async
()
=>
{
await
initDrage
();
},
[
columns
,
extraparams
,
path
,
activeTabKey
,
refreshDep
]);
},
[
columns
,
extraparams
,
path
,
activeTabKey
,
refreshDep
]);
//缩放表格
const
handleResize
=
...
...
@@ -209,7 +209,7 @@ const Mtable = (props) => {
(
index
)
=>
(
e
,
{
size
})
=>
{
e
.
stopImmediatePropagation
();
let
submitdata
=
{
...
valueColumns
}
??
{},
let
submitdata
=
{
...
valueColumns
}
??
{},
curkey
=
Object
.
keys
(
submitdata
)[
index
];
submitdata
[
curkey
].
width
=
parseInt
(
size
.
width
);
setvalueColumns
(
submitdata
);
...
...
src/components/Details/index.jsx
View file @
96171fa8
...
...
@@ -69,16 +69,16 @@ const Details = (props) => {
//获取每一项
const
getItem
=
(
itemData
)
=>
{
const
{
type
,
key
,
title
,
columns
,
path
,
urlName
,
col
,
rowKey
,
expandable
,
}
=
itemData
,
type
,
key
,
title
,
columns
,
path
,
urlName
,
col
,
rowKey
,
expandable
,
}
=
itemData
,
value
=
dataSource
[
key
];
if
(
!
type
||
type
==
"input"
)
{
return
value
==
0
||
value
?
(
...
...
@@ -86,8 +86,8 @@ const Details = (props) => {
<
pre
className=
{
col
?
""
:
styles
.
one
}
>
{
value
}
</
pre
>
</
Tooltip
>
)
:
(
<
div
>
-
</
div
>
);
<
div
>
-
</
div
>
);
}
else
if
(
type
==
"file"
)
{
return
(
<
div
style=
{
{
display
:
"flex"
,
flexFlow
:
"row wrap"
,
width
:
"100%"
}
}
>
...
...
@@ -113,24 +113,37 @@ const Details = (props) => {
);
})
)
:
(
"-"
)
}
"-"
)
}
</
div
>
);
}
else
if
(
type
==
"img"
)
{
return
(
<
div
style=
{
{
display
:
"flex"
,
flexFlow
:
"row wrap"
}
}
>
{
value
?
Array
.
isArray
(
value
)
&&
value
.
length
>
0
?
value
?.
map
(
el
=>
{
return
<
Image
style=
{
{
margin
:
'0 10px 0 0'
}
}
src=
{
el
?.
url
}
width=
{
30
}
height=
{
30
}
key=
{
el
?.
uid
}
></
Image
>
})
:
<
Image
style=
{
{
margin
:
'0 10px 0 0'
}
}
src=
{
value
}
width=
{
itemData
.
width
??
30
}
height=
{
itemData
.
height
??
30
}
></
Image
>
:
"-"
}
{
value
?
(
Array
.
isArray
(
value
)
&&
value
.
length
>
0
?
(
value
?.
map
((
el
)
=>
{
return
(
<
Image
style=
{
{
margin
:
"0 10px 0 0"
}
}
src=
{
el
?.
url
}
width=
{
30
}
height=
{
30
}
key=
{
el
?.
uid
}
></
Image
>
);
})
)
:
(
<
Image
style=
{
{
margin
:
"0 10px 0 0"
}
}
src=
{
value
}
width=
{
itemData
.
width
??
30
}
height=
{
itemData
.
height
??
30
}
></
Image
>
)
)
:
(
"-"
)
}
</
div
>
);
}
else
if
(
type
==
"table"
)
{
...
...
@@ -187,8 +200,6 @@ const Details = (props) => {
style=
{
{
flexShrink
:
0
,
display
:
`${it.title ? "block" : "none"}`
,
textAlign
:
"right"
,
width
:
126
,
}
}
>
{
it
.
title
}
:
...
...
src/global.less
View file @
96171fa8
...
...
@@ -375,3 +375,8 @@ table {
display: flex !important;
min-width: 210px !important;
}
#large {
*{
font-size: 22px !important;
}
}
\ No newline at end of file
src/pages/insertstore/Instore/fields.js
View file @
96171fa8
...
...
@@ -725,7 +725,7 @@ const one = {
noshow
:
"100%"
,
},
{
title
:
"工单
二维
码"
,
title
:
"工单
条形
码"
,
noshow
:
true
,
key
:
"qrCodeUrl"
,
type
:
"img"
,
...
...
src/pages/insertstore/Instore/printdom.jsx
View file @
96171fa8
...
...
@@ -41,8 +41,9 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style=
{
{
textAlign
:
"center"
,
width
:
"100%"
,
paddingTop
:
1
2
,
paddingTop
:
1
8
,
paddingBottom
:
16
,
fontSize
:
32
,
}
}
>
入库工单
...
...
@@ -51,8 +52,8 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style=
{
{
position
:
"absolute"
,
right
:
36
,
top
:
36
,
width
:
12
0
,
top
:
36
,
width
:
30
0
,
height
:
"auto"
,
}
}
src=
{
data
?.
qrCodeUrl
}
...
...
@@ -72,7 +73,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
marginRight
:
"1%"
,
marginBottom
:
10
,
padding
:
"4px"
,
fontSize
:
16
,
fontSize
:
20
,
overflow
:
"hidden"
,
}
}
>
...
...
@@ -82,10 +83,11 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
);
})
}
</
div
>
<
p
style=
{
{
margin
:
0
,
padding
:
"4px 2%"
,
fontSize
:
18
}
}
>
<
b
>
{
totalCard
&&
totalCard
[
1
].
cardTitle
}
</
b
>
</
p
>
<
div
style=
{
{
margin
:
0
,
padding
:
"4px 2%"
,
fontSize
:
18
}
}
>
<
div
style=
{
{
padding
:
"4px 0"
,
position
:
"relative"
}
}
id=
"large"
>
<
div
style=
{
{
position
:
"absolute"
,
top
:
0
,
left
:
0
,
zIndex
:
999
,
left
:
"2%"
,
top
:
16
}
}
>
<
b
>
{
totalCard
&&
totalCard
[
1
].
cardTitle
}
</
b
>
</
div
>
<
AutoTable
dataSource=
{
data
?.
materialList
}
x=
"96%"
...
...
@@ -100,7 +102,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
(
row
.
materieCode
??
""
)
+
" - "
+
(
row
.
materieName
??
""
)
(
row
.
materieCode
??
"
"
)
+
" - "
+
(
row
.
materieName
??
""
)
);
},
},
...
...
@@ -134,6 +136,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
search
:
false
,
},
]
}
bordered=
{
true
}
></
AutoTable
>
</
div
>
</
div
>
...
...
src/pages/outsetstore/Outstore/fields.js
View file @
96171fa8
...
...
@@ -689,7 +689,7 @@ const one = {
noshow
:
"100%"
,
},
{
title
:
"工单
二维
码"
,
title
:
"工单
条形
码"
,
key
:
"qrCodeUrl"
,
type
:
"img"
,
noshow
:
true
,
...
...
src/pages/outsetstore/Outstore/printdom.jsx
View file @
96171fa8
...
...
@@ -41,8 +41,9 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style=
{
{
textAlign
:
"center"
,
width
:
"100%"
,
paddingTop
:
1
2
,
paddingTop
:
1
8
,
paddingBottom
:
16
,
fontSize
:
32
,
}
}
>
出库工单
...
...
@@ -51,15 +52,22 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style=
{
{
position
:
"absolute"
,
right
:
36
,
top
:
36
,
width
:
12
0
,
top
:
28
,
width
:
30
0
,
height
:
"auto"
,
}
}
src=
{
data
?.
qrCodeUrl
}
alt=
""
/>
<
div
style=
{
{
display
:
"flex"
,
flexWrap
:
"wrap"
,
paddingLeft
:
"2%"
}
}
>
<
div
style=
{
{
display
:
"flex"
,
flexWrap
:
"wrap"
,
paddingLeft
:
"2%"
,
marginTop
:
24
,
}
}
>
{
totalCard
&&
totalCard
[
0
].
itemData
.
filter
((
it
)
=>
!
(
it
.
noshow
===
true
))
...
...
@@ -72,7 +80,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
marginRight
:
"1%"
,
marginBottom
:
10
,
padding
:
"4px"
,
fontSize
:
16
,
fontSize
:
20
,
overflow
:
"hidden"
,
}
}
>
...
...
@@ -82,10 +90,19 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
);
})
}
</
div
>
<
p
style=
{
{
margin
:
0
,
padding
:
"4px 2%"
,
fontSize
:
18
}
}
>
<
b
>
{
totalCard
&&
totalCard
[
1
].
cardTitle
}
</
b
>
</
p
>
<
div
style=
{
{
margin
:
0
,
padding
:
"4px 2%"
,
fontSize
:
18
}
}
>
<
div
style=
{
{
padding
:
"4px 0"
,
position
:
"relative"
}
}
id=
"large"
>
<
div
style=
{
{
position
:
"absolute"
,
top
:
0
,
left
:
0
,
zIndex
:
999
,
left
:
"2%"
,
top
:
16
,
}
}
>
<
b
>
{
totalCard
&&
totalCard
[
1
].
cardTitle
}
</
b
>
</
div
>
<
AutoTable
dataSource=
{
data
?.
materialList
}
x=
"96%"
...
...
@@ -115,8 +132,10 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
search
:
false
,
width
:
60
,
},
]
}
bordered=
{
true
}
></
AutoTable
>
</
div
>
</
div
>
...
...
src/pages/platform/Sendset/Formpage.jsx
View file @
96171fa8
...
...
@@ -16,7 +16,7 @@ import {
Typography
,
}
from
"antd"
;
import
{
connect
,
useRequest
}
from
"umi"
;
import
AutoTable
from
"@/components/
AutoT
able"
;
import
AutoTable
from
"@/components/
Tableform/mt
able"
;
import
getPrem
from
"@/utils/getPrem"
;
//权限判断fn
import
InitForm
from
"@/components/InitForm"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
...
...
@@ -375,6 +375,7 @@ const Formpage = (props) => {
}
},
});
let
extrarender
=
[
<
Button
size=
{
"middle"
}
...
...
src/pages/platform/Sendset/index.jsx
View file @
96171fa8
import
React
,
{
memo
,
useEffect
,
useRef
,
useState
,
useReducer
}
from
'react'
;
import
{
Image
,
Divider
,
Menu
,
Dropdown
,
Button
,
Modal
,
Row
,
Col
,
Tooltip
,
Drawer
}
from
'antd'
;
import
React
,
{
memo
,
useEffect
,
useRef
,
useState
,
useReducer
}
from
"react"
;
import
{
Image
,
Divider
,
Menu
,
Dropdown
,
Button
,
Modal
,
Row
,
Col
,
Tooltip
,
Drawer
,
}
from
"antd"
;
import
{
connect
,
useRequest
}
from
"umi"
;
import
AutoTable
from
'@/components/AutoTable'
;
import
getPrem
from
'@/utils/getPrem'
;
//权限判断fn
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
AutoTable
from
"@/components/AutoTable"
;
import
getPrem
from
"@/utils/getPrem"
;
//权限判断fn
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
paBusinessMsgScene
,
paBusinessMsgOption
}
from
"@/services/platform"
;
import
{
addFields
}
from
"./fields"
;
import
Formpage
from
"./Formpage"
;
import
Details
from
"@/components/Details"
;
const
initState
=
{
vs
:
false
,
fields
:
{},
iftype
:
{},
details
:
{
vs
:
false
,
fields
:
{},
iftype
:
{},
details
:
{
totalTitle
:
""
,
visible
:
false
,
dataSource
:
{},
totalCard
:
[],
},
shown
:
false
,
rowMessage
:
{},
};
function
reducer
(
state
,
action
)
{
if
(
action
.
type
==
"add"
)
{
return
{
...
state
,
vs
:
true
,
fields
:
action
.
fields
,
iftype
:
{
val
:
"add"
,
title
:
"新增推送配置"
,
},
rowMessage
:
{},
};
}
else
if
(
action
.
type
==
"close"
)
{
return
{
...
state
,
vs
:
false
,
iftype
:
{},
fields
:
{},
details
:
{
totalTitle
:
""
,
visible
:
false
,
dataSource
:
{},
totalCard
:
[]
},
shown
:
false
,
rowMessage
:
{}
}
function
reducer
(
state
,
action
)
{
if
(
action
.
type
==
"add"
)
{
return
{
...
state
,
vs
:
true
,
fields
:
action
.
fields
,
iftype
:
{
val
:
"add"
,
title
:
"新增推送配置"
},
rowMessage
:
{}
}
}
else
if
(
action
.
type
==
"close"
)
{
return
{
...
state
,
vs
:
false
,
iftype
:
{},
fields
:
{},
details
:
{
totalTitle
:
""
,
visible
:
false
,
dataSource
:
{},
totalCard
:
[]
},
shown
:
false
}
}
else
if
(
action
.
type
==
"edit"
)
{
return
{
...
state
,
vs
:
true
,
fields
:
action
.
fields
,
iftype
:
{
val
:
"edit"
,
title
:
"修改推送配置"
,
id
:
action
.
rowMessage
.
id
},
rowMessage
:
action
.
rowMessage
}
}
else
if
(
action
.
type
==
"seeDetails"
)
{
return
{
...
state
,
details
:
{
totalTitle
:
"推送详情"
,
visible
:
true
,
dataSource
:
{
...
action
.
dataSource
},
totalCard
:
[...
action
.
totalCard
]
}
}
}
else
if
(
action
.
type
==
"changeShown"
)
{
return
{
...
state
,
shown
:
action
.
shown
}
}
totalCard
:
[],
},
shown
:
false
,
};
}
else
if
(
action
.
type
==
"edit"
)
{
return
{
...
state
,
vs
:
true
,
fields
:
action
.
fields
,
iftype
:
{
val
:
"edit"
,
title
:
"修改推送配置"
,
id
:
action
.
rowMessage
.
id
,
},
rowMessage
:
action
.
rowMessage
,
};
}
else
if
(
action
.
type
==
"seeDetails"
)
{
return
{
...
state
,
details
:
{
totalTitle
:
"推送详情"
,
visible
:
true
,
dataSource
:
{
...
action
.
dataSource
},
totalCard
:
[...
action
.
totalCard
],
},
};
}
else
if
(
action
.
type
==
"changeShown"
)
{
return
{
...
state
,
shown
:
action
.
shown
,
};
}
}
const
Pushdeploy
=
(
props
)
=>
{
let
actionRef
=
useRef
(),
ChildRef
=
null
;
function
reload
()
{
actionRef
?.
current
?.
reload
();
ChildRef
?.
onRefresh
();
}
const
[
state
,
dispatch
]
=
useReducer
(
reducer
,
initState
),
{
vs
,
fields
,
iftype
,
details
,
shown
,
rowMessage
}
=
state
,
columns
=
[
{
"title"
:
"推送类型"
,
"dataIndex"
:
"msgSceneName"
,
"key"
:
"businessMsgSceneId"
,
"valueType"
:
"select"
,
render
:
(
_
,
row
)
=>
{
return
<
div
style=
{
{
padding
:
'3px 0'
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
}
}
>
<
Tooltip
title=
{
row
.
msgSceneName
}
>
<
a
onClick=
{
()
=>
{
let
commons
=
[
{
"title"
:
"推送类型"
,
"key"
:
"msgSceneName"
},
{
"title"
:
"推送方式"
,
"key"
:
"sendMethodName"
},
{
"title"
:
"适用类型"
,
"key"
:
"fitFieldName"
},
],
table
=
{
"key"
:
"detailList"
,
col
:
{
span
:
24
},
type
:
"table"
,
columns
:
[
{
"title"
:
"推送流程"
,
"dataIndex"
:
"sendProcessName"
,
"key"
:
"sendProcessName"
,
"search"
:
false
},
{
"title"
:
"推送对象"
,
"dataIndex"
:
"sendToName"
,
"key"
:
"sendToName"
,
"search"
:
false
},
{
"title"
:
"选择对象"
,
"dataIndex"
:
"targetNames"
,
"key"
:
"targetNames"
,
"search"
:
false
},
{
"title"
:
"初始触发时长"
,
"dataIndex"
:
"initialTime"
,
"key"
:
"initialTime"
,
"search"
:
false
},
{
"title"
:
"初始触发时长单位"
,
"dataIndex"
:
"initialUnitName"
,
"key"
:
"initialUnitName"
,
"search"
:
false
},
{
"title"
:
"间隔时长"
,
"dataIndex"
:
"intervalTime"
,
"key"
:
"intervalTime"
,
"search"
:
false
},
{
"title"
:
"间隔时长单位"
,
"dataIndex"
:
"intervalUnitName"
,
"key"
:
"intervalUnitName"
,
"search"
:
false
},
{
"title"
:
"触发次数"
,
"dataIndex"
:
"sendNum"
,
"key"
:
"sendNum"
,
"search"
:
false
}
]
},
totalCardsc
,
contentMsg
,
fieldMsg
;
contentMsg
=
{
"title"
:
"推送内容"
,
"key"
:
"sendContent"
,
col
:
{
span
:
24
}
};
if
(
row
.
fitField
==
1
)
{
fieldMsg
=
null
;
}
else
{
fieldMsg
=
{
"title"
:
"类型名称"
,
"key"
:
"fieldName"
}
}
totalCardsc
=
[
{
cardTitle
:
'推送信息'
,
itemData
:
[
...
commons
,
fieldMsg
&&
{
...
fieldMsg
},
contentMsg
&&
{
...
contentMsg
},
]
},
{
cardTitle
:
'基础配置'
,
itemData
:
[
{
...
table
}
]
}
];
totalCardsc
.
map
(
it
=>
{
let
newData
=
it
.
itemData
.
filter
(
item
=>
item
);
it
.
itemData
=
[...
newData
];
})
paBusinessMsgOption
({
id
:
row
.
id
}).
then
(
res
=>
{
if
(
res
.
code
==
"0000"
)
{
let
data
=
res
?.
data
?.
data
||
{};
dispatch
({
type
:
"seeDetails"
,
totalCard
:
[...
totalCardsc
],
dataSource
:
{
...
data
}
})
}
})
}
}
>
{
row
.
msgSceneName
}
</
a
>
</
Tooltip
>
</
div
>
},
options
:
{
database
:
paBusinessMsgScene
,
params
:
{}
}
},
{
"title"
:
"推送方式"
,
"dataIndex"
:
"sendMethodName"
,
"key"
:
"sendMethodName"
,
search
:
false
},
{
"title"
:
"适用类型"
,
"dataIndex"
:
"fitFieldName"
,
"key"
:
"fitField"
,
"valueType"
:
"select"
,
"options"
:
[
{
"label"
:
"全部"
,
"value"
:
1
},
{
"label"
:
"工厂"
,
"value"
:
2
},
{
"label"
:
"组织"
,
"value"
:
3
},
{
"label"
:
"仓库"
,
"value"
:
4
let
actionRef
=
useRef
(),
ChildRef
=
null
;
function
reload
()
{
actionRef
?.
current
?.
reload
();
ChildRef
?.
onRefresh
();
}
const
[
state
,
dispatch
]
=
useReducer
(
reducer
,
initState
),
{
vs
,
fields
,
iftype
,
details
,
shown
,
rowMessage
}
=
state
,
columns
=
[
{
title
:
"推送类型"
,
dataIndex
:
"msgSceneName"
,
key
:
"businessMsgSceneId"
,
valueType
:
"select"
,
render
:
(
_
,
row
)
=>
{
return
(
<
div
style=
{
{
padding
:
"3px 0"
,
overflow
:
"hidden"
,
whiteSpace
:
"nowrap"
,
textOverflow
:
"ellipsis"
,
}
}
>
<
Tooltip
title=
{
row
.
msgSceneName
}
>
<
a
onClick=
{
()
=>
{
let
commons
=
[
{
title
:
"推送类型"
,
key
:
"msgSceneName"
,
},
{
title
:
"推送方式"
,
key
:
"sendMethodName"
,
},
{
title
:
"适用类型"
,
key
:
"fitFieldName"
,
},
],
table
=
{
key
:
"detailList"
,
col
:
{
span
:
24
},
type
:
"table"
,
columns
:
[
{
title
:
"推送流程"
,
dataIndex
:
"sendProcessName"
,
key
:
"sendProcessName"
,
search
:
false
,
},
{
title
:
"推送对象"
,
dataIndex
:
"sendToName"
,
key
:
"sendToName"
,
search
:
false
,
},
{
title
:
"选择对象"
,
dataIndex
:
"targetNames"
,
key
:
"targetNames"
,
search
:
false
,
},
{
title
:
"初始触发时长"
,
dataIndex
:
"initialTime"
,
key
:
"initialTime"
,
search
:
false
,
},
{
title
:
"初始触发时长单位"
,
dataIndex
:
"initialUnitName"
,
key
:
"initialUnitName"
,
search
:
false
,
},
{
title
:
"间隔时长"
,
dataIndex
:
"intervalTime"
,
key
:
"intervalTime"
,
search
:
false
,
},
{
title
:
"间隔时长单位"
,
dataIndex
:
"intervalUnitName"
,
key
:
"intervalUnitName"
,
search
:
false
,
},
{
title
:
"触发次数"
,
dataIndex
:
"sendNum"
,
key
:
"sendNum"
,
search
:
false
,
},
],
},
totalCardsc
,
contentMsg
,
fieldMsg
;
contentMsg
=
{
title
:
"推送内容"
,
key
:
"sendContent"
,
col
:
{
span
:
24
},
};
if
(
row
.
fitField
==
1
)
{
fieldMsg
=
null
;
}
else
{
fieldMsg
=
{
title
:
"类型名称"
,
key
:
"fieldName"
,
};
}
]
},
{
"title"
:
"类型名称"
,
"dataIndex"
:
"fieldName"
,
"key"
:
"fieldName"
},
{
"title"
:
"推送内容"
,
"dataIndex"
:
"sendContent"
,
"key"
:
"sendContent"
,
"search"
:
false
},
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
extraAction
(
text
,
row
,
_
,
action
)
}
],
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
formatResult
:
(
res
)
=>
res
,
onSuccess
:
(
result
,
params
)
=>
{
if
(
result
.
code
==
"0000"
)
{
reload
();
dispatch
({
type
:
"close"
});
}
}
});
function
extraAction
(
text
,
record
,
_
,
action
)
{
return
(
<
div
>
{
getPrem
(
"paBusinessMsgOption_save"
,
action
,
"修改"
,
()
=>
{
paBusinessMsgOption
({
id
:
record
.
id
}).
then
(
res
=>
{
if
(
res
.
code
==
"0000"
)
{
let
data
=
res
?.
data
?.
data
||
{};
for
(
let
i
in
addFields
)
{
addFields
[
i
].
value
=
data
[
i
]
}
dispatch
({
type
:
"edit"
,
rowMessage
:
data
,
fields
:
addFields
})
}
})
})
}
{
getPrem
(
"paBusinessMsgOption_save"
,
"ifs"
)
&&
<
Divider
type=
"vertical"
/>
}
{
getPrem
(
"paBusinessMsgOption_deleteById"
,
action
,
"删除"
,
null
,
{
title
:
"确认删除该推送配置?"
,
onConfirm
:
()
=>
{
run
({
url
:
"/ngic-base-business/paBusinessMsgOption/deleteById"
,
params
:
{
id
:
record
.
id
}
})
}
})
}
totalCardsc
=
[
{
cardTitle
:
"推送信息"
,
itemData
:
[
...
commons
,
fieldMsg
&&
{
...
fieldMsg
},
contentMsg
&&
{
...
contentMsg
},
],
},
{
cardTitle
:
"基础配置"
,
itemData
:
[{
...
table
}],
},
];
totalCardsc
.
map
((
it
)
=>
{
let
newData
=
it
.
itemData
.
filter
((
item
)
=>
item
);
it
.
itemData
=
[...
newData
];
});
paBusinessMsgOption
({
id
:
row
.
id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
let
data
=
res
?.
data
?.
data
||
{};
dispatch
({
type
:
"seeDetails"
,
totalCard
:
[...
totalCardsc
],
dataSource
:
{
...
data
},
});
}
});
}
}
>
{
row
.
msgSceneName
}
</
a
>
</
Tooltip
>
</
div
>
);
};
function
reset
()
{
reload
();
dispatch
({
type
:
"close"
})
}
let
extrarender
=
([
<
Button
disabled=
{
!
getPrem
(
"paBusinessMsgOption_save"
,
"ifs"
)
}
size=
{
"middle"
}
type=
"primary"
onClick=
{
()
=>
{
for
(
let
i
in
addFields
)
{
addFields
[
i
].
value
=
null
;
);
},
options
:
{
database
:
paBusinessMsgScene
,
params
:
{},
},
},
{
title
:
"推送方式"
,
dataIndex
:
"sendMethodName"
,
key
:
"sendMethodName"
,
search
:
false
,
},
{
title
:
"适用类型"
,
dataIndex
:
"fitFieldName"
,
key
:
"fitField"
,
valueType
:
"select"
,
options
:
[
{
label
:
"全部"
,
value
:
1
,
},
{
label
:
"工厂"
,
value
:
2
,
},
{
label
:
"组织"
,
value
:
3
,
},
{
label
:
"仓库"
,
value
:
4
,
},
],
},
{
title
:
"类型名称"
,
dataIndex
:
"fieldName"
,
key
:
"fieldName"
,
},
{
title
:
"推送内容"
,
dataIndex
:
"sendContent"
,
key
:
"sendContent"
,
search
:
false
,
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
extraAction
(
text
,
row
,
_
,
action
),
},
],
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
formatResult
:
(
res
)
=>
res
,
onSuccess
:
(
result
,
params
)
=>
{
if
(
result
.
code
==
"0000"
)
{
reload
();
dispatch
({
type
:
"close"
});
}
},
});
function
extraAction
(
text
,
record
,
_
,
action
)
{
return
(
<
div
>
{
getPrem
(
"paBusinessMsgOption_save"
,
action
,
"修改"
,
()
=>
{
paBusinessMsgOption
({
id
:
record
.
id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
let
data
=
res
?.
data
?.
data
||
{};
for
(
let
i
in
addFields
)
{
addFields
[
i
].
value
=
data
[
i
];
}
dispatch
({
type
:
"edit"
,
rowMessage
:
data
,
fields
:
addFields
});
}
dispatch
({
type
:
"add"
,
fields
:
addFields
});
}
}
>
新增
</
Button
>
]);
return
<
div
>
<
AutoTable
pagetitle=
{
props
.
route
.
name
}
pageextra=
{
extrarender
}
columns=
{
columns
}
bordered=
{
false
}
actionRef=
{
actionRef
}
onRef=
{
node
=>
ChildRef
=
node
}
path=
"/ngic-base-business/paBusinessMsgOption/queryList"
></
AutoTable
>
<
Drawer
title=
{
iftype
.
title
}
closable=
{
true
}
visible=
{
vs
}
onClose=
{
()
=>
dispatch
({
type
:
"close"
})
}
destroyOnClose=
{
true
}
afterVisibleChange=
{
(
v
)
=>
{
dispatch
({
type
:
"changeShown"
,
shown
:
v
});
}
}
width=
"100%"
>
{
shown
&&
<
Formpage
fields=
{
fields
}
rowMessage=
{
rowMessage
}
reset=
{
reset
}
iftypeParent=
{
iftype
}
/>
}
</
Drawer
>
<
Drawer
title=
{
details
.
totalTitle
}
closable=
{
true
}
visible=
{
details
.
visible
}
onClose=
{
()
=>
dispatch
({
type
:
"close"
})
}
destroyOnClose=
{
true
}
afterVisibleChange=
{
(
v
)
=>
{
dispatch
({
type
:
"changeShown"
,
shown
:
v
});
}
}
width=
"100%"
className=
"drawerDetails"
>
{
shown
&&
<
Details
{
...
details
}
></
Details
>
}
</
Drawer
>
});
})
}
{
getPrem
(
"paBusinessMsgOption_save"
,
"ifs"
)
&&
(
<
Divider
type=
"vertical"
/>
)
}
{
getPrem
(
"paBusinessMsgOption_deleteById"
,
action
,
"删除"
,
null
,
{
title
:
"确认删除该推送配置?"
,
onConfirm
:
()
=>
{
run
({
url
:
"/ngic-base-business/paBusinessMsgOption/deleteById"
,
params
:
{
id
:
record
.
id
},
});
},
})
}
</
div
>
);
}
function
reset
()
{
reload
();
dispatch
({
type
:
"close"
});
}
let
extrarender
=
[
<
Button
disabled=
{
!
getPrem
(
"paBusinessMsgOption_save"
,
"ifs"
)
}
size=
{
"middle"
}
type=
"primary"
onClick=
{
()
=>
{
for
(
let
i
in
addFields
)
{
addFields
[
i
].
value
=
null
;
}
dispatch
({
type
:
"add"
,
fields
:
addFields
});
}
}
>
新增
</
Button
>,
];
return
(
<
div
>
<
AutoTable
pagetitle=
{
props
.
route
.
name
}
pageextra=
{
extrarender
}
columns=
{
columns
}
bordered=
{
false
}
actionRef=
{
actionRef
}
onRef=
{
(
node
)
=>
(
ChildRef
=
node
)
}
path=
"/ngic-base-business/paBusinessMsgOption/queryList"
></
AutoTable
>
<
Drawer
title=
{
iftype
.
title
}
closable=
{
true
}
visible=
{
vs
}
onClose=
{
()
=>
dispatch
({
type
:
"close"
})
}
destroyOnClose=
{
true
}
getContainer=
{
false
}
afterVisibleChange=
{
(
v
)
=>
{
dispatch
({
type
:
"changeShown"
,
shown
:
v
});
}
}
style=
{
{
position
:
"absolute"
}
}
width=
"100%"
>
{
shown
&&
(
<
Formpage
fields=
{
fields
}
rowMessage=
{
rowMessage
}
reset=
{
reset
}
iftypeParent=
{
iftype
}
/>
)
}
</
Drawer
>
<
Details
{
...
details
}
title=
{
details
.
totalTitle
}
onClose=
{
()
=>
dispatch
({
type
:
"close"
})
}
getContainer=
{
false
}
style=
{
{
position
:
"absolute"
}
}
width=
{
800
}
></
Details
>
</
div
>
}
export
default
Pushdeploy
;
\ No newline at end of file
);
};
export
default
Pushdeploy
;
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