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
f07881b4
Commit
f07881b4
authored
Jun 16, 2023
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '台账配置父台账功能添加'
parent
4789f572
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
5 deletions
+63
-5
BookConfigNew.jsx
src/pages/bsmanager/base/standingBook/BookConfigNew.jsx
+58
-3
api.js
src/services/standingBook/api.js
+5
-2
No files found.
src/pages/bsmanager/base/standingBook/BookConfigNew.jsx
View file @
f07881b4
...
...
@@ -25,6 +25,7 @@ import {
Ledger_ReloadLedgerFields
,
Ledger_QueryLedger
,
Ledger_SaveLedger
,
Ledger_ParentLedgers
,
}
from
'@/services/standingBook/api'
;
import
{
Account
,
getFieldInfo
}
from
'panda-xform'
;
import
ChangeAdd
from
'./changeAdd'
;
...
...
@@ -61,6 +62,7 @@ const BookConfigNew = props => {
const
[
submitObj
,
setSubmitObj
]
=
useState
({});
// 表单预览弹窗
const
[
modalLoading
,
setModalLoading
]
=
useState
(
false
);
// 提交数据
const
[
viewModalLoading
,
setViewModalLoading
]
=
useState
(
false
);
// 表单预览弹窗
const
[
parentData
,
setParentData
]
=
useState
([]);
// 父级台账下拉框数据
const
[
form
]
=
Form
.
useForm
();
const
tableRef
=
useRef
(
null
);
const
accountRef
=
useRef
(
null
);
...
...
@@ -89,6 +91,14 @@ const BookConfigNew = props => {
span
:
19
,
},
};
const
itemLayout
=
{
labelCol
:
{
span
:
10
,
},
wrapperCol
:
{
span
:
14
,
},
};
const
switchLayout
=
{
labelCol
:
{
span
:
10
,
...
...
@@ -223,6 +233,7 @@ const BookConfigNew = props => {
form
.
setFieldsValue
({
EnableBatchOperation
:
true
});
form
.
setFieldsValue
({
EnableImportExport
:
true
});
}
getParentData
({
ledgerId
:
type
===
'edit'
?
formObj
.
ID
:
'0'
});
}
else
{
setFiled
({});
form
.
resetFields
();
...
...
@@ -232,6 +243,18 @@ const BookConfigNew = props => {
}
},
[
visible
]);
// 获取父台账表
const
getParentData
=
params
=>
{
Ledger_ParentLedgers
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setParentData
(
res
.
data
);
console
.
log
(
res
,
'ressssssssssssssssss'
);
}
else
{
setParentData
([]);
}
});
};
// 获取台账表
const
getTableData
=
()
=>
{
GetCM_Ledger_LoadLedgerTable
().
then
(
res
=>
{
...
...
@@ -529,6 +552,15 @@ const BookConfigNew = props => {
form
.
setFieldsValue
({
Type
:
value
});
}
};
// 表单值监听
const
handleValuesChange
=
(
changedValues
,
allValues
)
=>
{
if
(
'TableName'
in
changedValues
)
{
let
AccountType
=
standingTable
.
filter
(
item
=>
{
return
item
.
value
===
changedValues
.
TableName
;
})[
0
].
text
;
form
.
setFieldsValue
({
AccountType
});
}
};
return
(
<
Modal
...
...
@@ -571,7 +603,7 @@ const BookConfigNew = props => {
okText=
"保存并查看"
>
<
div
className=
{
styles
.
top
}
>
<
Form
form=
{
form
}
{
...
layout
}
>
<
Form
form=
{
form
}
{
...
layout
}
onValuesChange=
{
handleValuesChange
}
>
<
Row
>
<
Col
span=
{
8
}
>
<
Item
...
...
@@ -598,10 +630,32 @@ const BookConfigNew = props => {
</
Item
>
</
Col
>
<
Col
span=
{
8
}
>
<
Item
label=
"父级台账"
name=
"PreName"
// rules={[{ required: true, message: '请选择分组' }]}
>
<
Select
showSearch
filterOption=
{
false
}
// onSearch={onSearch}
placeholder=
"请选择父级台账"
allowClear
>
{
parentData
.
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
.
name
}
key=
{
index
}
>
{
item
.
name
}
</
Option
>
))
}
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
4
}
>
<
Item
label=
"台账分组"
name=
"Type"
rules=
{
[{
required
:
true
,
message
:
'请选择分组'
}]
}
{
...
itemLayout
}
>
<
Select
showSearch
...
...
@@ -618,13 +672,14 @@ const BookConfigNew = props => {
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
8
}
>
<
Col
span=
{
4
}
>
<
Item
label=
"台账类型"
name=
"AccountType"
rules=
{
[{
required
:
true
,
message
:
'请选择类型'
}]
}
{
...
itemLayout
}
>
<
Select
placeholder=
"请选择台账类型"
>
<
Select
placeholder=
"请选择台账类型"
disabled
>
<
Option
value=
"台账"
>
台账
</
Option
>
<
Option
value=
"反馈"
>
反馈
</
Option
>
<
Option
value=
"设备"
>
设备
</
Option
>
...
...
src/services/standingBook/api.js
View file @
f07881b4
...
...
@@ -141,4 +141,8 @@ export const Ledger_ReloadLedgerFields = query =>
// 提交台账配置数据
export
const
Ledger_SaveLedger
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/Ledger_SaveLedger`
,
data
);
\ No newline at end of file
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/Ledger_SaveLedger`
,
data
);
// 获取副台账配置信息
export
const
Ledger_ParentLedgers
=
query
=>
get
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/Ledger_ParentLedgers`
,
query
);
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