Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
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
鲁鑫
topsun-bpm
Commits
2bb90fdc
Commit
2bb90fdc
authored
Jul 03, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用报销增加发票类型字段,并校验有发票时必填发票号
parent
28b62171
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
105 additions
and
23 deletions
+105
-23
costReimbursement.js
...app/biz/topsun/sap/costReimbursement/costReimbursement.js
+41
-9
employeeLoan.js
...n/webapp/biz/topsun/sap/costReimbursement/employeeLoan.js
+3
-1
payApply.js
.../main/webapp/biz/topsun/sap/costReimbursement/payApply.js
+3
-1
payApplyNoPO.js
...n/webapp/biz/topsun/sap/costReimbursement/payApplyNoPO.js
+38
-5
refundApply.js
...in/webapp/biz/topsun/sap/costReimbursement/refundApply.js
+3
-2
SapCostReimbursementApplicationImpl.java
...application/impl/SapCostReimbursementApplicationImpl.java
+10
-5
SapCostReimbursementDetailApplicationImpl.java
...ation/impl/SapCostReimbursementDetailApplicationImpl.java
+1
-0
SapCostReimbursementDetail.java
.../costReimbursement/domain/SapCostReimbursementDetail.java
+6
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/costReimbursement.js
View file @
2bb90fdc
...
...
@@ -189,10 +189,25 @@ var tableArray = [
{
display
:
"内部订单描述"
,
name
:
"ktext"
,
width
:
200
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
},
{
display
:
""
,
name
:
"zyl05"
,
width
:
80
,
minwidth
:
80
,
type
:
"string"
,
align
:
"left"
,
hide
:
true
},
{
display
:
"发票
号码"
,
name
:
"zyl06"
,
width
:
20
0
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
display
:
"发票
类型"
,
name
:
"zyl05TextView"
,
width
:
12
0
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
type
:
'dictionary'
,
data
:
{
name
:
'zyl05'
},
textField
:
'zyl05TextView'
,
valueField
:
'zyl05'
,
required
:
true
,
render
:
function
(
item
)
{
return
item
.
zyl05TextView
;
}
},
},
{
display
:
"发票号码"
,
name
:
"zyl06"
,
width
:
300
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
true
,
}
},
{
...
...
@@ -617,6 +632,7 @@ function loadGrid(obj) {
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
autoApplyNextEditor
:
false
,
onBeforeCheckRow
:
function
(
checked
,
data
)
{
//同时选定或取消所有表格中的对应行
tableArray
.
forEach
((
item
)
=>
{
...
...
@@ -760,11 +776,30 @@ function loadGrid(obj) {
column
.
editor
.
required
=
zepPayFlag
;
}
})
UICtrl
.
setGridColumns
(
obj
.
gridManager
,
columns
);
obj
.
gridManager
.
set
(
'columns'
,
columns
);
//UICtrl.setGridColumns(obj.gridManager,columns);
}
//发票类型无的时候,发票号码默认无
if
(
item
.
column
.
name
==
"zyl05TextView"
){
var
value
=
item
.
record
.
zyl05
;
var
text
=
""
;
if
(
value
==
0
){
text
=
"无"
;
}
var
_grid
=
UICtrl
.
getGridManager
(
'#reimbursementApplierGrid'
);
var
zepItemno
=
item
.
record
.
zepItemno
;
$
.
each
(
_grid
.
currentData
.
Rows
,
function
(
i
,
row
)
{
if
(
zepItemno
==
row
.
zepItemno
){
_grid
.
updateRow
(
row
,{
zyl06
:
text
,
})
}
})
}
//费用报销单据发票号码栏,校验发票号码是否重复,重复(状态是已完成,申请,审批中)则提示该发票已经提交过,发票无效
if
(
item
.
column
.
name
==
"zyl06"
){
if
(
item
.
column
.
name
==
"zyl06"
&&
!
isNaN
(
item
.
record
.
zyl06
)
){
Public
.
ajax
(
web_app
.
name
+
"/sapCostReimbursement/checkzyl06.ajax"
,{
zyl06
:
item
.
record
.
zyl06
},
function
(
data
)
{
if
(
data
>
0
){
Public
.
tip
(
"该发票 '"
+
item
.
value
+
"' 已经提交过,发票无效"
);
...
...
@@ -969,7 +1004,7 @@ function getExtendedData(processAction) {
}
var
checked4
=
false
var
checked5
=
false
var
checked7
=
false
//
var checked7 = false
var
num
=
0
;
$
.
each
(
datas
,
function
(
i
,
o
)
{
//判断不含税金额(审批)=含税金额(审批)- 税额(审批)
...
...
@@ -984,9 +1019,6 @@ function getExtendedData(processAction) {
checked5
=
true
;
num
=
i
+
1
}
if
(
o
.
zepPay
==
"N"
){
checked7
=
true
}
});
if
(
checked4
)
{
Public
.
tip
(
"行项目:"
+
num
+
"中,不含税金额(审批)+ 税额(审批)不等于 含税金额(审批)请检查"
)
...
...
@@ -1012,7 +1044,7 @@ function getExtendedData(processAction) {
return
false
;
}
var
checked7
=
false
var
num
=
0
;
//
var num = 0;
$
.
each
(
financialDatas
,
function
(
i
,
o
)
{
if
(
o
.
zepPay
==
"Y"
){
checked7
=
true
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/employeeLoan.js
View file @
2bb90fdc
...
...
@@ -359,6 +359,7 @@ var tableArray = [
}
]
var
isAllData
=
true
;
var
zepPayFlag
=
false
,
changed
=
false
;
//创建表格(参数、列、插入的节点、数据源)
function
loadGrid
(
obj
)
{
...
...
@@ -565,7 +566,8 @@ function loadGrid(obj) {
column
.
editor
.
required
=
zepPayFlag
;
}
})
UICtrl
.
setGridColumns
(
obj
.
gridManager
,
columns
);
obj
.
gridManager
.
set
(
'columns'
,
columns
);
//UICtrl.setGridColumns(obj.gridManager,columns);
}
return
item
;
},
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/payApply.js
View file @
2bb90fdc
...
...
@@ -268,6 +268,7 @@ var tableArray = [
}
];
var
isAllData
=
true
;
var
zepPayFlag
=
false
,
changed
=
false
;
//创建表格(参数、列、插入的节点、数据源)
...
...
@@ -537,7 +538,8 @@ function loadGrid(obj) {
column
.
editor
.
required
=
zepPayFlag
;
}
})
UICtrl
.
setGridColumns
(
obj
.
gridManager
,
columns
);
obj
.
gridManager
.
set
(
'columns'
,
columns
);
//UICtrl.setGridColumns(obj.gridManager,columns);
}
return
item
;
},
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/payApplyNoPO.js
View file @
2bb90fdc
...
...
@@ -315,9 +315,24 @@ function getColumns() {
columns
.
push
({
display
:
"费用类型名称"
,
name
:
"zepExtypename"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,});
columns
.
push
({
display
:
"费用会计科目"
,
name
:
"hkont"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,});
columns
.
push
({
display
:
"总账科目描述"
,
name
:
"txt50"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,});
columns
.
push
({
display
:
"发票号码"
,
name
:
"zyl06"
,
width
:
200
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
columns
.
push
({
display
:
""
,
name
:
"zyl05"
,
width
:
80
,
minwidth
:
80
,
type
:
"string"
,
align
:
"left"
,
hide
:
true
},);
columns
.
push
({
display
:
"发票类型"
,
name
:
"zyl05TextView"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
type
:
'dictionary'
,
data
:
{
name
:
'zyl05'
},
textField
:
'zyl05TextView'
,
valueField
:
'zyl05'
,
required
:
false
,
render
:
function
(
item
)
{
return
item
.
zyl05TextView
;
}
},
},);
columns
.
push
({
display
:
"发票号码"
,
name
:
"zyl06"
,
width
:
300
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
false
,
}});
columns
.
push
({
display
:
"不含税金额"
,
name
:
"netwr"
,
width
:
120
,
minwidth
:
120
,
type
:
"money"
,
align
:
"left"
,
...
...
@@ -415,7 +430,7 @@ function loadGrid(obj) {
canEdit
=
true
;
var
columns
=
obj
.
columns
;
columns
.
some
(
column
=>
{
if
(
column
.
name
==
"zepExtype"
){
if
(
column
.
name
==
"zepExtype"
||
column
.
name
==
"zyl06"
||
column
.
name
==
"zyl05TextView"
){
column
.
editor
.
required
=
true
;
}
})
...
...
@@ -652,10 +667,28 @@ function loadGrid(obj) {
column
.
editor
.
required
=
zepPayFlag
;
}
})
UICtrl
.
setGridColumns
(
obj
.
gridManager
,
columns
);
obj
.
gridManager
.
set
(
'columns'
,
columns
);
//UICtrl.setGridColumns(obj.gridManager,columns);
}
//发票类型无的时候,发票号码默认无
if
(
item
.
column
.
name
==
"zyl05TextView"
){
var
value
=
item
.
record
.
zyl05
;
var
text
=
""
;
if
(
value
==
0
){
text
=
"无"
;
}
var
_grid
=
UICtrl
.
getGridManager
(
'#reimbursementApplierGrid'
);
var
zepItemno
=
item
.
record
.
zepItemno
;
$
.
each
(
_grid
.
currentData
.
Rows
,
function
(
i
,
row
)
{
if
(
zepItemno
==
row
.
zepItemno
){
_grid
.
updateRow
(
row
,{
zyl06
:
text
,
})
}
})
}
//费用报销单据发票号码栏,校验发票号码是否重复,重复(状态是已完成,申请,审批中)则提示该发票已经提交过,发票无效
if
(
item
.
column
.
name
==
"zyl06"
){
if
(
item
.
column
.
name
==
"zyl06"
&&
!
isNaN
(
item
.
record
.
zyl06
)
){
Public
.
ajax
(
web_app
.
name
+
"/sapCostReimbursement/checkzyl06.ajax"
,{
zyl06
:
item
.
record
.
zyl06
},
function
(
data
)
{
if
(
data
>
0
){
Public
.
tip
(
"该发票 '"
+
item
.
value
+
"' 已经提交过,发票无效"
);
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/refundApply.js
View file @
2bb90fdc
...
...
@@ -277,7 +277,7 @@ var tableArray = [
}
];
var
isAllData
=
true
;
var
zepPayFlag
=
false
,
changed
=
false
;
//创建表格(参数、列、插入的节点、数据源)
function
loadGrid
(
obj
)
{
...
...
@@ -483,7 +483,8 @@ function loadGrid(obj) {
column
.
editor
.
required
=
zepPayFlag
;
}
})
UICtrl
.
setGridColumns
(
obj
.
gridManager
,
columns
);
obj
.
gridManager
.
set
(
'columns'
,
columns
);
//UICtrl.setGridColumns(obj.gridManager,columns);
}
//选择了客户编码后,根据客户编码查询异常单
...
...
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/application/impl/SapCostReimbursementApplicationImpl.java
View file @
2bb90fdc
...
...
@@ -284,20 +284,25 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
String
zpayStaus
=
(
String
)
detailMap
.
get
(
"ZPAY_STAUS"
);
if
(
"已支付"
.
equals
(
zpayStaus
)){
detailMap
.
put
(
"ZPAY_STAUS"
,
"S"
);
String
budat
=
DateUtil
.
getDateFormat
(
new
Date
(),
"yyyyMMdd"
);
detailMap
.
put
(
"BUDAT"
,
budat
);
detailMap
.
put
(
"BLDAT"
,
budat
);
costReimbursementDetail
.
setBudat
(
new
Date
());
costReimbursementDetail
.
setBldat
(
new
Date
());
}
else
{
detailMap
.
put
(
"ZPAY_STAUS"
,
""
);
}
String
budat
=
DateUtil
.
getDateFormat
(
new
Date
(),
"yyyyMMdd"
);
detailMap
.
put
(
"BUDAT"
,
budat
);
detailMap
.
put
(
"BLDAT"
,
budat
);
costReimbursementDetail
.
setBudat
(
new
Date
());
costReimbursementDetail
.
setBldat
(
new
Date
());
if
(
costReimbursementDetail
.
getZepFpldate
()
!=
null
){
String
dateFormat
=
DateUtil
.
getDateFormat
(
costReimbursementDetail
.
getZepFpldate
(),
"yyyyMMdd"
);
detailMap
.
put
(
"ZEP_FPLDATE"
,
dateFormat
);
}
//对账单号
detailMap
.
put
(
"ZYL04"
,
costReimbursementDetail
.
getXblnr
());
//ZYL05按照规则传0,但实体发票号这个字段就不用传“空”这个字符给我了,直接就不传值
if
(
"0"
.
equals
(
costReimbursementDetail
.
getZyl05
())){
detailMap
.
put
(
"ZYL06"
,
""
);
}
detailMap
.
putAll
(
map
);
itemList
.
add
(
detailMap
);
costReimbursementDetail
.
setBankn1
(
sapCostReimbursement
.
getBankn1
());
...
...
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/application/impl/SapCostReimbursementDetailApplicationImpl.java
View file @
2bb90fdc
...
...
@@ -25,6 +25,7 @@ public class SapCostReimbursementDetailApplicationImpl extends BaseApplication i
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
query
);
queryModel
.
putDictionary
(
"mwskz"
,
DictUtil
.
getDictionary
(
"mwskz"
));
queryModel
.
putDictionary
(
"zlsch"
,
DictUtil
.
getDictionary
(
"zlsch"
));
queryModel
.
putDictionary
(
"zyl05"
,
DictUtil
.
getDictionary
(
"zyl05"
));
return
this
.
sqlExecutorDao
.
executeQuery
(
queryModel
);
}
@Autowired
...
...
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/domain/SapCostReimbursementDetail.java
View file @
2bb90fdc
...
...
@@ -466,5 +466,11 @@ public class SapCostReimbursementDetail implements Serializable {
@Column
(
name
=
"XBLNR"
)
private
String
xblnr
;
/**
* 发票类型(1专票;2普票;0空)
*/
@Column
(
name
=
"ZYL05"
)
private
String
zyl05
;
}
\ No newline at end of file
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