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
06fb1ac1
Commit
06fb1ac1
authored
Nov 21, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '台账编辑新增列计算规则项'
parent
7c4c8c9b
Pipeline
#82018
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
1 deletion
+55
-1
BookConfigNew.jsx
src/pages/bsmanager/base/standingBook/BookConfigNew.jsx
+37
-1
EditTable.jsx
src/pages/bsmanager/base/standingBook/EditTable.jsx
+18
-0
No files found.
src/pages/bsmanager/base/standingBook/BookConfigNew.jsx
View file @
06fb1ac1
/* eslint-disable no-unused-expressions */
/* eslint-disable no-lonely-if */
/* eslint-disable no-else-return */
/* eslint-disable prefer-promise-reject-errors */
...
...
@@ -134,6 +135,17 @@ const BookConfigNew = props => {
let
obj
=
type
===
'add'
?
{
...
datas
,
Order
:
maxLength
}
:
{
...
datas
,
Order
,
ID
:
formObj
.
ID
};
obj
.
LedgerFieids
=
tableRef
.
current
.
onFinish
();
obj
.
LedgerFieids
.
forEach
(
i
=>
{
if
(
i
.
ColumnCalculationRule
===
'无'
)
{
i
.
ColumnCalculationRule
=
0
;
}
else
if
(
i
.
ColumnCalculationRule
===
'合计'
)
{
i
.
ColumnCalculationRule
=
1
;
}
else
if
(
i
.
ColumnCalculationRule
===
'平均'
)
{
i
.
ColumnCalculationRule
=
2
;
}
else
if
(
i
.
ColumnCalculationRule
===
'计数'
)
{
i
.
ColumnCalculationRule
=
3
;
}
});
currentId
?
(
obj
.
ID
=
currentId
)
:
''
;
setSubmitObj
(
obj
);
Ledger_SaveLedger
(
obj
)
...
...
@@ -428,7 +440,17 @@ const BookConfigNew = props => {
item
.
AccurateSearch
=
0
;
item
.
LikeSearch
=
0
;
}
if
(
item
.
ColumnCalculationRule
===
0
)
{
item
.
ColumnCalculationRule
=
'无'
;
}
else
if
(
item
.
ColumnCalculationRule
===
1
)
{
item
.
ColumnCalculationRule
=
'合计'
;
}
else
if
(
item
.
ColumnCalculationRule
===
2
)
{
item
.
ColumnCalculationRule
=
'平均'
;
}
else
if
(
item
.
ColumnCalculationRule
===
3
)
{
item
.
ColumnCalculationRule
=
'计数'
;
}
});
tableRef
.
current
.
setTableData
(
false
,
editArr
);
}
else
{
// Fields 切换表后清空台账字段和表数据
...
...
@@ -496,6 +518,15 @@ const BookConfigNew = props => {
allArr
.
map
(
item
=>
{
tableArr
.
map
(
ele
=>
{
if
(
item
===
ele
.
FieldName
)
{
if
(
ele
.
ColumnCalculationRule
===
0
)
{
ele
.
ColumnCalculationRule
=
'无'
;
}
else
if
(
ele
.
ColumnCalculationRule
===
1
)
{
ele
.
ColumnCalculationRule
=
'合计'
;
}
else
if
(
ele
.
ColumnCalculationRule
===
2
)
{
ele
.
ColumnCalculationRule
=
'平均'
;
}
else
if
(
ele
.
ColumnCalculationRule
===
3
)
{
ele
.
ColumnCalculationRule
=
'计数'
;
}
arr
.
push
(
ele
);
}
});
...
...
@@ -507,6 +538,7 @@ const BookConfigNew = props => {
// }),
arr
,
);
form
.
setFieldsValue
(
obj
);
saveOutFieldsLength
(
prop
.
pickItem
,
allFileds
);
};
...
...
@@ -856,7 +888,11 @@ const BookConfigNew = props => {
confirmLoading=
{
viewModalLoading
}
// okText=
>
<
Account
ref=
{
accountRef
}
accountName=
{
form
.
getFieldValue
(
'Name'
)
}
notUse=
{
'other,edit,add,del'
}
/>
<
Account
ref=
{
accountRef
}
accountName=
{
form
.
getFieldValue
(
'Name'
)
}
notUse=
{
'other,edit,add,del'
}
/>
</
Modal
>
</
Modal
>
);
...
...
src/pages/bsmanager/base/standingBook/EditTable.jsx
View file @
06fb1ac1
...
...
@@ -191,6 +191,16 @@ const EditableCell = ({
</
Select
>
);
}
if
(
val
===
'列计算规则'
)
{
return
(
<
Select
ref=
{
inputRef
}
onPressEnter=
{
save
}
onBlur=
{
save
}
showSearch
>
<
Select
.
Option
value=
"合计"
>
合计
</
Select
.
Option
>
<
Select
.
Option
value=
"平均"
>
平均
</
Select
.
Option
>
<
Select
.
Option
value=
"计数"
>
计数
</
Select
.
Option
>
<
Select
.
Option
value=
"无"
>
(无)
</
Select
.
Option
>
</
Select
>
);
}
if
(
val
===
'字段长度'
)
{
return
(
<
InputNumber
...
...
@@ -725,6 +735,14 @@ const TableView = forwardRef((props, ref) => {
editable
:
true
,
align
:
'center'
,
},
{
title
:
'列计算规则'
,
dataIndex
:
'ColumnCalculationRule'
,
width
:
100
,
ellipsis
:
true
,
editable
:
true
,
align
:
'center'
,
},
{
title
:
'列表对齐'
,
dataIndex
:
'Alignment'
,
...
...
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