Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
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
ReactWeb5
CivManage
Commits
f00acf68
Commit
f00acf68
authored
Jun 19, 2024
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 打印配置自定义化
parent
79d7a6c5
Pipeline
#89978
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
19 deletions
+51
-19
WorkflowHomePage.jsx
...ges/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
+6
-7
FlowModal.jsx
...r/workOrder/workflowEdit/workFlowComponents/FlowModal.jsx
+45
-12
No files found.
src/pages/bsmanager/workOrder/workflowEdit/WorkflowHomePage.jsx
View file @
f00acf68
...
@@ -134,7 +134,6 @@ const WorkflowHomePage = () => {
...
@@ -134,7 +134,6 @@ const WorkflowHomePage = () => {
// setCurrentList(list);
// setCurrentList(list);
// }
// }
setCurrentList
(
list
);
setCurrentList
(
list
);
console
.
log
(
flowNameList
,
'flowNameList'
);
setFlowNames
(
flowNameList
);
setFlowNames
(
flowNameList
);
}
else
{
}
else
{
message
.
error
(
res
.
msg
);
message
.
error
(
res
.
msg
);
...
@@ -294,7 +293,7 @@ const WorkflowHomePage = () => {
...
@@ -294,7 +293,7 @@ const WorkflowHomePage = () => {
}
}
});
});
},
},
onCancel
()
{},
onCancel
()
{
},
});
});
}
else
{
}
else
{
confirm
({
confirm
({
...
@@ -323,7 +322,7 @@ const WorkflowHomePage = () => {
...
@@ -323,7 +322,7 @@ const WorkflowHomePage = () => {
message
.
error
(
'网络异常请稍后再试'
);
message
.
error
(
'网络异常请稍后再试'
);
});
});
},
},
onCancel
()
{},
onCancel
()
{
},
});
});
}
}
}
else
{
}
else
{
...
@@ -397,7 +396,7 @@ const WorkflowHomePage = () => {
...
@@ -397,7 +396,7 @@ const WorkflowHomePage = () => {
<
div
className=
{
styles
.
left
}
>
<
div
className=
{
styles
.
left
}
>
<
div
<
div
className=
{
classnames
(
styles
.
allFlows
,
{
[
styles
.
allFlowsChoose
]:
true
})
}
className=
{
classnames
(
styles
.
allFlows
,
{
[
styles
.
allFlowsChoose
]:
true
})
}
// onClick={chageAll}
// onClick={chageAll}
/>
/>
<
div
className=
{
styles
.
flows
}
>
<
div
className=
{
styles
.
flows
}
>
{
/* <Anchor affix={false} onClick={toFlowGroup}>
{
/* <Anchor affix={false} onClick={toFlowGroup}>
...
@@ -491,9 +490,9 @@ const WorkflowHomePage = () => {
...
@@ -491,9 +490,9 @@ const WorkflowHomePage = () => {
onInput=
{
e
=>
{
onInput=
{
e
=>
{
e
.
currentTarget
.
style
.
width
=
e
.
currentTarget
.
value
.
length
*
14
+
'px'
;
e
.
currentTarget
.
style
.
width
=
e
.
currentTarget
.
value
.
length
*
14
+
'px'
;
}
}
}
}
// onPressEnter=
{
e
=
>
{
// onPressEnter=
{
e
=
>
{
// console.log(e, '触发咯');
// console.log(e, '触发咯');
//
}
}
//
}
}
/
>
/
>
</
div
>
</
div
>
<
EditOutlined
<
EditOutlined
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowModal.jsx
View file @
f00acf68
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
CreateFlow
}
from
'@/services/workflow/workflow'
;
import
{
CreateFlow
}
from
'@/services/workflow/workflow'
;
import
{
Form
,
Modal
,
Input
,
notification
,
Select
,
Radio
,
Switch
,
Tooltip
,
Row
,
Col
}
from
'antd'
;
import
{
Form
,
Modal
,
Input
,
notification
,
Select
,
Radio
,
Switch
,
Tooltip
,
Row
,
Col
,
Checkbox
}
from
'antd'
;
import
{
InfoCircleOutlined
}
from
'@ant-design/icons'
;
import
{
InfoCircleOutlined
}
from
'@ant-design/icons'
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
{
TextArea
}
=
Input
;
const
FlowModal
=
props
=>
{
const
FlowModal
=
props
=>
{
const
{
onSubumit
,
handleCancel
,
visible
,
msg
,
modalType
,
treeData
,
keep
}
=
props
;
const
{
onSubumit
,
handleCancel
,
visible
,
msg
,
modalType
,
treeData
,
keep
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
isPrint
,
setIsPrint
]
=
useState
(
Boolean
(
msg
.
isPrint
))
const
[
oMultiDiff
,
setOMultiDiff
]
=
useState
({
const
[
oMultiDiff
,
setOMultiDiff
]
=
useState
({
'19969'
:
'DZ'
,
'19969'
:
'DZ'
,
'19975'
:
'WM'
,
'19975'
:
'WM'
,
...
@@ -391,11 +393,10 @@ const FlowModal = props => {
...
@@ -391,11 +393,10 @@ const FlowModal = props => {
useEffect
(()
=>
{
useEffect
(()
=>
{
form
.
resetFields
();
form
.
resetFields
();
if
(
visible
)
{
if
(
visible
)
{
console
.
log
(
keep
);
console
.
log
(
msg
);
if
(
modalType
===
'edit'
)
{
if
(
modalType
===
'edit'
)
{
getFormData
();
getFormData
();
}
else
{
}
else
{
setIsPrint
(
Boolean
(
msg
.
isPrint
))
form
.
setFieldsValue
({
Type
:
msg
.
name
,
Prefix
:
''
,
DoneView
:
0
});
form
.
setFieldsValue
({
Type
:
msg
.
name
,
Prefix
:
''
,
DoneView
:
0
});
setFlag
(
flag
+
1
);
setFlag
(
flag
+
1
);
}
}
...
@@ -403,9 +404,14 @@ const FlowModal = props => {
...
@@ -403,9 +404,14 @@ const FlowModal = props => {
},
[
visible
]);
},
[
visible
]);
// 获取表单回显
// 获取表单回显
const
getFormData
=
()
=>
{
const
getFormData
=
()
=>
{
form
.
setFieldsValue
({
...
msg
,
isPrint
:
Boolean
(
msg
.
isPrint
),
IsPrintAux
:
Boolean
(
msg
.
IsPrintAux
)
});
setIsPrint
(
Boolean
(
msg
.
isPrint
))
form
.
setFieldsValue
({
...
msg
,
isPrint
:
Boolean
(
msg
?.
isPrint
),
IsPrintFlow
:
Boolean
(
msg
?.
IsPrintAux
),
IsPrintRelationForm
:
Boolean
(
msg
?.
PrintConfig
?.
IsPrintRelationForm
),
});
setFlag
(
flag
+
1
);
setFlag
(
flag
+
1
);
console
.
log
(
form
.
getFieldValue
(
'Prefix'
),
form
.
getFieldValue
(
'IsPrintAux'
),
'fffff'
);
};
};
// 提交表单
// 提交表单
const
onFinish
=
()
=>
{
const
onFinish
=
()
=>
{
...
@@ -420,6 +426,11 @@ const FlowModal = props => {
...
@@ -420,6 +426,11 @@ const FlowModal = props => {
datas
[
key
]
=
1
;
datas
[
key
]
=
1
;
}
}
}
}
if
(
key
===
'IsPrintRelationForm'
)
{
datas
.
PrintConfig
=
{
IsPrintRelationForm
:
datas
[
'IsPrintRelationForm'
]
?
1
:
0
}
}
}
}
let
obj
=
{};
let
obj
=
{};
if
(
modalType
===
'add'
)
{
if
(
modalType
===
'add'
)
{
...
@@ -459,6 +470,16 @@ const FlowModal = props => {
...
@@ -459,6 +470,16 @@ const FlowModal = props => {
setFlag
(
flag
+
1
);
setFlag
(
flag
+
1
);
}
}
};
};
const
onValuesChange
=
(
values
)
=>
{
if
(
'isPrint'
in
values
)
{
setIsPrint
(
values
.
isPrint
)
if
(
values
.
isPrint
)
{
form
.
setFieldsValue
({
IsPrintRelationForm
:
true
})
}
}
}
const
prefix
=
value
=>
{
const
prefix
=
value
=>
{
let
str
=
value
;
let
str
=
value
;
if
(
typeof
str
!==
'string'
)
{
if
(
typeof
str
!==
'string'
)
{
...
@@ -517,7 +538,6 @@ const FlowModal = props => {
...
@@ -517,7 +538,6 @@ const FlowModal = props => {
}
}
}
}
let
data
=
arrRslt
.
toString
().
slice
(
0
,
6
);
let
data
=
arrRslt
.
toString
().
slice
(
0
,
6
);
console
.
log
(
arrRslt
.
toString
().
slice
(
0
,
6
));
return
data
;
return
data
;
};
};
return
(
return
(
...
@@ -527,6 +547,7 @@ const FlowModal = props => {
...
@@ -527,6 +547,7 @@ const FlowModal = props => {
onOk=
{
onFinish
}
onOk=
{
onFinish
}
onCancel=
{
handleCancel
}
onCancel=
{
handleCancel
}
maskClosable=
{
false
}
maskClosable=
{
false
}
width=
{
580
}
destroyOnClose
destroyOnClose
>
>
<
Form
<
Form
...
@@ -534,6 +555,7 @@ const FlowModal = props => {
...
@@ -534,6 +555,7 @@ const FlowModal = props => {
labelCol=
{
{
span
:
5
}
}
labelCol=
{
{
span
:
5
}
}
wrapperCol=
{
{
span
:
18
}
}
wrapperCol=
{
{
span
:
18
}
}
onFieldsChange=
{
changeValue
}
onFieldsChange=
{
changeValue
}
onValuesChange=
{
onValuesChange
}
>
>
<
Form
.
Item
<
Form
.
Item
label=
"流程名称"
label=
"流程名称"
...
@@ -732,12 +754,23 @@ const FlowModal = props => {
...
@@ -732,12 +754,23 @@ const FlowModal = props => {
</
Radio
>
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"是否打印"
name=
"isPrint"
valuePropName=
"checked"
>
<
Row
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
<
Col
span=
{
8
}
>
</
Form
.
Item
>
<
Form
.
Item
labelCol=
{
{
span
:
15
}
}
label=
"是否打印"
name=
"isPrint"
valuePropName=
"checked"
>
<
Form
.
Item
label=
"打印附加"
name=
"IsPrintAux"
valuePropName=
"checked"
>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
<
Switch
checkedChildren=
"是"
unCheckedChildren=
"否"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
8
}
style=
{
{
display
:
isPrint
?
'block'
:
'none'
}
}
>
<
Form
.
Item
label=
""
name=
"IsPrintRelationForm"
valuePropName=
"checked"
>
<
Checkbox
>
附表:关联表单
</
Checkbox
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
8
}
style=
{
{
display
:
isPrint
?
'block'
:
'none'
}
}
>
<
Form
.
Item
label=
""
name=
"IsPrintAux"
valuePropName=
"checked"
>
<
Checkbox
>
附表:流程信息
</
Checkbox
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Form
.
Item
label=
"打印模板"
name=
"printTemp"
>
<
Form
.
Item
label=
"打印模板"
name=
"printTemp"
>
<
Input
placeholder=
"本项为空,使用默认模板,支持定制"
/>
<
Input
placeholder=
"本项为空,使用默认模板,支持定制"
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
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