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
3d95d4a6
Commit
3d95d4a6
authored
Jul 27, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
呆滞物料或异常在审批节点最后一步,能上传附件:处理决议。最后一步选择知会人员。
parent
54660cab
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
148 additions
and
27 deletions
+148
-27
sapDullDetail.js
...n-xt/src/main/webapp/biz/topsun/sap/dull/sapDullDetail.js
+67
-22
sapDullDetail.jsp
...-xt/src/main/webapp/biz/topsun/sap/dull/sapDullDetail.jsp
+4
-2
sapDullList.js
topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullList.js
+22
-2
SapDullApplication.java
...uigou/topsun/sap/dull/application/SapDullApplication.java
+1
-0
SapDullApplicationImpl.java
...sun/sap/dull/application/impl/SapDullApplicationImpl.java
+33
-0
SapDullController.java
.../huigou/topsun/sap/dull/controller/SapDullController.java
+9
-1
SapDull.java
.../main/java/com/huigou/topsun/sap/dull/domain/SapDull.java
+12
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullDetail.js
View file @
3d95d4a6
var
gridManager
=
null
;
var
gridManager
=
null
,
canEdit
=
true
;
$
(
document
).
ready
(
function
()
{
initialize
();
...
...
@@ -14,6 +14,15 @@ function initialize(){
bizId
:
$
(
"#attbizId"
).
val
()
});
UICtrl
.
layout
(
"#layout"
,
{
leftWidth
:
3
});
if
(
isApplyProcUnit
()){
$
(
"#dutyDiv"
).
hide
();
UICtrl
.
setElRequiredFlag
(
"#dutyPersonName"
,
false
);
}
if
(
"audit"
==
getSubProcUnitId
()){
canEdit
=
false
;
$
(
"#dutyDiv"
).
show
();
UICtrl
.
setElRequiredFlag
(
"#dutyPersonName"
,
true
);
}
}
function
bindEvent
(){
...
...
@@ -29,6 +38,18 @@ function bindEvent(){
}
});
$
(
"#dutyPersonName"
).
orgTree
({
filter
:
"psm"
,
excludePos
:
0
,
param
:
{
orgKindId
:
"ogn,dpt,pos,psm"
,
orgRoot
:
"14636F3F48934EE7811768692A0AC5E1"
},
back
:
{
text
:
"#dutyPersonName"
,
value
:
'#dutyPersonId'
},
onChange
:
function
(
value
,
data
){
$
(
'#dutyPersonId'
).
val
(
data
.
id
);
$
(
'#dutyPersonName'
).
val
(
data
.
name
);
}
});
}
...
...
@@ -55,26 +76,28 @@ function getId() {
function
loadGrid
()
{
var
toolbarOptions
=
null
;
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
gridManager
);
},
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapDullItem/deleteSapDullItems.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
// copyHandler: copyHandler
// impExcelDataHandler:{id:'impExcelData',img:'fa-table',text:'导入数据',click:impExcelDataHandler},
if
(
canEdit
){
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
gridManager
);
},
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapDullItem/deleteSapDullItems.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
// copyHandler: copyHandler
// impExcelDataHandler:{id:'impExcelData',img:'fa-table',text:'导入数据',click:impExcelDataHandler},
});
});
}
// }
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
...
...
@@ -115,7 +138,7 @@ function loadGrid() {
editor
:
{
type
:
"text"
,
mask
:
'nnnnnn.nn'
,
required
:
true
}
},
{
display
:
"呆滞天数"
,
name
:
"dullDays"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
"text"
,
mask
:
'nnnnnn'
,
required
:
tru
e
}
editor
:
{
type
:
"text"
,
mask
:
'nnnnnn'
,
required
:
fals
e
}
},
{
display
:
"说明"
,
name
:
"remark"
,
width
:
360
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
...
...
@@ -128,7 +151,7 @@ function loadGrid() {
usePager
:
true
,
parms
:{
sapDullId
:
getId
()},
toolbar
:
toolbarOptions
,
enabledEdit
:
true
,
enabledEdit
:
canEdit
,
width
:
"100%"
,
height
:
"80%"
,
heightDiff
:
-
8
,
...
...
@@ -167,3 +190,25 @@ function getExtendedData(processAction) {
}
return
extendedData
;
}
//UICtrl中校验是否允许编辑
function
businessJudgmentUnit
()
{
var
isApply
=
''
;
if
(
typeof
(
isApplyProcUnit
)
==
'function'
){
isApply
=
isApplyProcUnit
();
}
if
(
isApply
){
return
true
}
else
{
var
subProcUnitId
=
getSubProcUnitId
();
if
(
subProcUnitId
===
"audit"
){
UICtrl
.
setEditable
(
$
(
"#submitForm"
));
UICtrl
.
disable
(
$
(
"#werksName"
));
UICtrl
.
disable
(
$
(
"#remark"
));
UICtrl
.
setElRequiredFlag
(
"#dutyPersonName"
,
true
);
return
true
}
}
return
false
;
}
topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullDetail.jsp
View file @
3d95d4a6
...
...
@@ -28,9 +28,11 @@
<div
class=
"hg-form-row"
>
<x:hidden
name=
"werks"
/>
<x:inputC
name=
"werksName"
required=
"true"
label=
"工厂"
labelCol=
"2"
wrapper=
"select"
fieldCol=
"4"
/>
<div
id=
"dutyDiv"
>
<x:hidden
name=
"dutyPersonId"
/>
<x:inputC
name=
"dutyPersonName"
required=
"false"
label=
"责任人"
labelCol=
"2"
fieldCol=
"4"
wrapper=
"tree"
/>
</div>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"remark"
required=
"false"
label=
"备注"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/dull/sapDullList.js
View file @
3d95d4a6
...
...
@@ -22,7 +22,12 @@ function initUI() {
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
addHandler
,
deleteHandler
:
deleteHandler
deleteHandler
:
deleteHandler
,
finishedHandler
:
{
id
:
'finishedHandler'
,
text
:
'已处理'
,
img
:
'fa-clipboard'
,
click
:
function
(){
finished
();
}
},
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
...
...
@@ -38,7 +43,8 @@ function loadGrid() {
// {display: "物料名称", name: "matnrName", width: 200, minWidth: 60, type: "string", align: "left"},
// {display: "批次", name: "batch", width: 120, minWidth: 60, type: "string", align: "left"},
// {display: "呆滞天数", name: "dullDays", width: 120, minWidth: 60, type: "string", align: "left"},
{
display
:
"说明"
,
name
:
"remark"
,
width
:
220
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
}
{
display
:
"说明"
,
name
:
"remark"
,
width
:
220
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"是否已处理"
,
name
:
"isFinishedTextView"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
}
],
dataAction
:
"server"
,
...
...
@@ -109,4 +115,18 @@ function doView(id) {
});
}
function
finished
(){
var
result
=
DataUtil
.
getSelectedRow
(
gridManager
);
if
(
!
result
)
{
return
;
}
if
(
result
.
status
!==
3
){
Public
.
tip
(
"请选择一条已审核后数据!"
)
return
false
;
}
Public
.
ajax
(
web_app
.
name
+
'/sapDull/updateStatus.ajax'
,{
id
:
result
.
id
,
status
:
"1"
},
function
(
data
){
reloadGrid
();
})
}
topsun/src/main/java/com/huigou/topsun/sap/dull/application/SapDullApplication.java
View file @
3d95d4a6
...
...
@@ -25,4 +25,5 @@ public interface SapDullApplication {
void
deleteByIds
(
List
<
String
>
ids
);
void
updateStatus
(
String
id
,
String
status
);
}
topsun/src/main/java/com/huigou/topsun/sap/dull/application/impl/SapDullApplicationImpl.java
View file @
3d95d4a6
...
...
@@ -14,10 +14,12 @@ import com.huigou.topsun.sap.dull.domain.SapDullItem;
import
com.huigou.topsun.sap.dull.domain.query.SapDullQueryRequest
;
import
com.huigou.topsun.sap.dull.repository.SapDullItemRepository
;
import
com.huigou.topsun.sap.dull.repository.SapDullRepository
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchase
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.doc.attachment.application.AttachmentApplication
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.DateUtil
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -66,6 +68,7 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica
queryModel
.
putLikeParam
(
"matnr"
,
queryRequest
.
getMatnrName
());
}
queryModel
.
putDictionary
(
"status"
,
DictUtil
.
getDictionary
(
"bizBillStatus"
));
queryModel
.
putDictionary
(
"isFinished"
,
DictUtil
.
getDictionary
(
"yesorno"
));
queryModel
.
addCriteria
(
" order by bill_code desc "
);
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
return
map
;
...
...
@@ -88,6 +91,13 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica
}
@Override
public
void
updateStatus
(
String
id
,
String
status
)
{
SapDull
sapDull
=
sapDullRepository
.
findOne
(
id
);
sapDull
.
setIsFinished
(
status
);
sapDullRepository
.
save
(
sapDull
);
}
@Override
protected
void
onBeforeComplete
(
DelegateTask
delegateTask
)
{
super
.
onBeforeComplete
(
delegateTask
);
...
...
@@ -153,6 +163,29 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica
return
dull
.
getId
();
}
/**
* 设置任务名称
*/
@Override
protected
void
setTaskDescription
(
DelegateTask
delegateTask
)
{
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
delegateTask
.
setDescription
(
this
.
getApprovalSubjectName
(
bizId
));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private
String
getApprovalSubjectName
(
String
bizId
)
{
SapDull
sapDull
=
this
.
sapDullRepository
.
findOne
(
bizId
);
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
sapDull
.
getFillinDate
());
//设置标题
return
String
.
format
(
"%s-%s(%s)"
,
"呆滞物料或异常物料"
,
sapDull
.
getBillCode
(),
fillinDateStr
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/dull/controller/SapDullController.java
View file @
3d95d4a6
...
...
@@ -54,7 +54,7 @@ public class SapDullController extends CommonController {
SapDull
sapDull
=
new
SapDull
();
sapDull
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
sapDull
.
setAttbizId
(
CommonUtil
.
createGUID
());
// 自动生成附件id
sapDull
.
setIsFinished
(
"0"
);
Operator
operator
=
getOperator
();
sapDull
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
// ExcelImportTemplate excelImportTemplate=excelImportApplication.loadExcelImportTemplateByCode("sapDullData");
...
...
@@ -77,4 +77,12 @@ public class SapDullController extends CommonController {
return
success
();
}
public
String
updateStatus
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getId
();
String
status
=
sdo
.
getString
(
"status"
);
sapDullApplication
.
updateStatus
(
id
,
status
);
return
success
();
}
}
topsun/src/main/java/com/huigou/topsun/sap/dull/domain/SapDull.java
View file @
3d95d4a6
...
...
@@ -55,6 +55,18 @@ public class SapDull extends FlowBillAbstractEntity {
@Column
(
name
=
"attbiz_id"
)
private
String
attbizId
;
@Column
(
name
=
"duty_person_name"
)
private
String
dutyPersonName
;
@Column
(
name
=
"duty_person_id"
)
private
String
dutyPersonId
;
/**
* 责任人处理完成修改状态,0未处理,1已处理。
*/
@Column
(
name
=
"is_finished"
)
private
String
isFinished
;
@Override
protected
String
getCodeRuleId
()
{
return
"sapDull"
;
...
...
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