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
dc3a3377
Commit
dc3a3377
authored
Dec 06, 2024
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料主数据增加物料组大类和物料组级联关系
parent
ff6ffd52
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
170 additions
and
107 deletions
+170
-107
job.js
huigou-xt/src/main/webapp/system/bpm/job.js
+21
-2
materialApplyNext.js
...n/webapp/biz/topsun/sap/nonProdApply/materialApplyNext.js
+18
-2
materialApplyNext.jsp
.../webapp/biz/topsun/sap/nonProdApply/materialApplyNext.jsp
+3
-1
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+29
-101
nonProdApplyNext.jsp
...n/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
+3
-1
ResourceSearchController.java
...om/huigou/topsun/controller/ResourceSearchController.java
+80
-0
NonProdApplyApplicationImpl.java
...odApply/application/impl/NonProdApplyApplicationImpl.java
+2
-0
SapNonProdApplyDept.java
...u/topsun/sap/nonProdApply/domain/SapNonProdApplyDept.java
+6
-0
NonProdApplyBasicVo.java
...opsun/sap/nonProdApply/domain/vo/NonProdApplyBasicVo.java
+2
-0
NonProdApplyDeptBaseInfoVo.java
...ap/nonProdApply/domain/vo/NonProdApplyDeptBaseInfoVo.java
+6
-0
No files found.
huigou-xt/src/main/webapp/system/bpm/job.js
View file @
dc3a3377
...
...
@@ -184,7 +184,8 @@ function initializeToolBar(){
//{ id: 'print', remark: '打印',name:'common.button.print', icon: 'fa-print', event: print },
{
id
:
'showChart'
,
remark
:
'流程图'
,
name
:
'common.button.flowchart'
,
icon
:
'fa-sitemap'
,
event
:
showChart
},
{
id
:
'showApprovalHistory'
,
remark
:
'流程轨迹'
,
name
:
'common.button.approvalhistory'
,
icon
:
'fa-table'
,
event
:
showApprovalHistory
},
{
id
:
'taskCollect'
,
remark
:
'收藏任务'
,
name
:
'common.button.taskcollect'
,
icon
:
'fa-star'
,
event
:
saveTaskCollect
}
{
id
:
'taskCollect'
,
remark
:
'收藏任务'
,
name
:
'common.button.taskcollect'
,
icon
:
'fa-star'
,
event
:
saveTaskCollect
},
{
id
:
'forceAbortTask'
,
remark
:
'强制终止'
,
name
:
'强制终止'
,
icon
:
'fa-circle'
,
event
:
forceAbortTask
},
]
};
$
(
'#toolBar'
).
toolBar
(
toolBarOptions
);
...
...
@@ -1318,7 +1319,8 @@ function refreshBtnStatus() {
if
(
!
canRecallProcessInstance
())
{
$
(
"#toolBar"
).
toolBar
(
"removeItem"
,
"recallProcessInstance"
);
}
}
$
(
"#toolBar"
).
toolBar
(
"disable"
,
"forceAbortTask"
);
refreshBtnStatusExtend
();
}
...
...
@@ -1355,6 +1357,23 @@ function saveTaskCollect() {
});
}
//强制终止任务
function
forceAbortTask
(){
if
(
!
taskId
||
!
bizId
)
{
return
;
}
var
url
=
""
;
if
(
processDefinitionKey
==
"sapPurchaseProc"
){
//采购申请审批
url
=
'/sapPurchaseApproval/forceAbortTask.ajax'
;
}
else
if
(
processDefinitionKey
==
"sapPurchaseOrderProc"
){
//采购订单审批
url
=
"/sapPurchaseOrder/forceAbortTask.ajax"
}
Public
.
ajax
(
web_app
.
name
+
url
,{
jobPageId
:
taskId
,
id
:
bizId
},
function
()
{
closeJobPageAndReloadTaskCenter
();
});
}
function
queryHiTaskinstRelations
(
fn
)
{
if
(
!
bizId
||
bizId
==
''
)
return
;
Public
.
ajax
(
web_app
.
name
+
"/workflow/queryHiTaskinstRelations.ajax"
,
{
bizId
:
bizId
},
function
(
data
)
{
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/materialApplyNext.js
View file @
dc3a3377
...
...
@@ -305,10 +305,26 @@ function confirmForm(val){
function
bindEvent
()
{
//物料组
$
(
'#matklTypeName'
).
searchbox
({
type
:
"system"
,
name
:
"matklDictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKLTYPE"
,
//filterValue: $("#mtart").val()
}
},
onChange
:
function
(
value
,
data
)
{
$
(
'#matklType'
).
val
(
data
.
MATKL
);
$
(
'#matklTypeName'
).
val
(
data
.
WGBEZ
);
}
});
$
(
'#matklName'
).
searchbox
({
type
:
"system"
,
name
:
"
d
ictionary"
,
type
:
"system"
,
name
:
"
matklD
ictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKL"
}
return
{
fieldName
:
"MATKL"
,
filterValue
:
$
(
"#matklType"
).
val
()
}
},
onChange
:
function
(
value
,
data
)
{
$
(
'#matkl'
).
val
(
data
.
MATKL
);
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/materialApplyNext.jsp
View file @
dc3a3377
...
...
@@ -113,7 +113,9 @@
<!--x:inputC name="mbrsh" label="行业" labelCol="1" fieldCol="2"/-->
<x:selectC
name=
"mtart"
label=
"物品类型"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"suppliesType"
/>
<x:inputC
name=
"matklName"
label=
"物料组"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:inputC
name=
"matklTypeName"
label=
"物料组"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:hidden
name=
"matklType"
/>
<x:inputC
name=
"matklName"
label=
"物料组小类"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:hidden
name=
"matkl"
/>
<x:inputC
name=
"groes"
label=
"规格"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<%-- <x:inputC name="spartName" value="通用产品组" label="产品组" required="true" labelCol="1" fieldCol="2" wrapper="select"/>--%>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
dc3a3377
...
...
@@ -818,112 +818,29 @@ function confirmForm(val){
});
}
/**
* 分发表单到各个部门
*/
/*function distributeForm() {
$("#status").val(2);
if (control.isDistribute) {
Public.successTip("已分发");
return false;
}
let deptStaffResult = gridManager.getData();
if (deptStaffResult.length<1){
Public.tip('未选择业务用途!');
return false
}
let hasSaleView = false;
for (var i = 0; i < deptStaffResult.length; i++) {
if (deptStaffResult[i].deptCode == "V") { //销售视图
hasSaleView = true;
break;
}
}
let hasWarehouseView = false;
for (var i = 0; i < deptStaffResult.length; i++) {
if (deptStaffResult[i].deptCode == "S") { //仓库视图
hasWarehouseView = true;
break;
}
}
let hasPurchaseView = false;
for (var i = 0; i < deptStaffResult.length; i++) {
if (deptStaffResult[i].deptCode == "E") { //采购视图
hasPurchaseView = true;
break;
}
}
let hasMRPView = false;
for (var i = 0; i < deptStaffResult.length; i++) {
if (deptStaffResult[i].deptCode == "D") { //MRP视图
hasMRPView = true;
break;
}
}
let hasProduceView = false;
for (var i = 0; i < deptStaffResult.length; i++) {
if (deptStaffResult[i].deptCode == "A") { //生产视图
hasProduceView = true;
break;
}
}
let hasStoreView = false;
for (var i = 0; i < deptStaffResult.length; i++) {
if (deptStaffResult[i].deptCode == "L") { //存储视图
hasStoreView = true;
break;
}
}
if (hasPurchaseView||hasStoreView||hasMRPView||hasProduceView) {
if ($("#werks").val() == "") {
Public.tip("工厂必输!");
return false;
}
}
if (hasPurchaseView||hasWarehouseView||hasStoreView || hasMRPView) {
if ($("#lgort").val() == "") {
Public.tip("库存地点必输!");
return false;
}
}
if (hasWarehouseView){
if ($("#lgnum").val() == "") {
Public.tip("仓库号必输!");
return false;
}
}
if (hasSaleView) {
if ($("#vkorg").val() == "") {
Public.tip("销售组织必输!");
return false;
}
if ($("#vtweg").val() == "") {
Public.tip("分销渠道必输!");
return false;
}
}
let extendedData = getExtendedData();
if (!extendedData) return false;
$('#submitForm').ajaxSubmit({
url: web_app.name + '/sapNonProdApplyNext/distributeSapNonProdApplyDept.ajax?distribute=2',
param: extendedData,
success: function (data) {
Public.successTip("分发成功!");
$("#buttonBox").remove();
control.isDistribute = true;
_self.close();
}
});
} */
function
bindEvent
()
{
//物料组
$
(
'#matklTypeName'
).
searchbox
({
type
:
"system"
,
name
:
"matklDictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKLTYPE"
,
//filterValue: $("#mtart").val()
}
},
onChange
:
function
(
value
,
data
)
{
$
(
'#matklType'
).
val
(
data
.
MATKL
);
$
(
'#matklTypeName'
).
val
(
data
.
WGBEZ
);
}
});
$
(
'#matklName'
).
searchbox
({
type
:
"system"
,
name
:
"
d
ictionary"
,
type
:
"system"
,
name
:
"
matklD
ictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKL"
}
return
{
fieldName
:
"MATKL"
,
filterValue
:
$
(
'#matklType'
).
val
()
}
},
onChange
:
function
(
value
,
data
)
{
$
(
'#matkl'
).
val
(
data
.
MATKL
);
...
...
@@ -983,6 +900,17 @@ function bindEvent() {
onChange
:
function
(
value
,
data
)
{
$
(
'#werks'
).
val
(
data
.
WERKS
);
$
(
'#werksName'
).
val
(
data
.
NAME1
);
//如果是1010工厂,不维护仓库管理视图
if
(
"1010"
==
data
.
WERKS
){
//不勾选仓库管理视图
$
(
"#businessUsageS"
).
prop
(
"checked"
,
false
);
hideBusiness
(
"S"
);
Public
.
tip
(
"广州市宝绅科技有限公司RFID工厂不维护仓库管理视图"
)
}
else
{
$
(
"#businessUsageS"
).
prop
(
"checked"
,
true
);
showBusiness
(
"S"
);
}
}
});
//库存地点
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
View file @
dc3a3377
...
...
@@ -114,7 +114,9 @@
<x:inputC
name=
"copyMatnr"
label=
"参考物料"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<!--x:inputC name="mbrsh" label="行业" labelCol="1" fieldCol="2"/-->
<x:selectC
name=
"mtart"
label=
"物品类型"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
dictionary=
"suppliesType"
/>
<x:inputC
name=
"matklName"
label=
"物料组"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:inputC
name=
"matklTypeName"
label=
"物料组"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:hidden
name=
"matklType"
/>
<x:inputC
name=
"matklName"
label=
"物料组小类"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
<x:hidden
name=
"matkl"
/>
<x:inputC
name=
"groes"
label=
"规格"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"spartName"
label=
"产品组"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
wrapper=
"select"
/>
...
...
topsun/src/main/java/com/huigou/topsun/controller/ResourceSearchController.java
View file @
dc3a3377
...
...
@@ -653,4 +653,84 @@ public class ResourceSearchController {
return
sapDictionaryApplication
.
initEasySearchModel
(
mapList
,
param
,
sdo
);
}
/**
* 物料组字典选择
* @param sdo
* @return
* @throws IOException
*/
@EasySearch
(
queryName
=
"matklDictionary"
)
public
Map
<
String
,
Object
>
queryMatklDictionary
(
SDO
sdo
)
throws
IOException
{
String
param
=
sdo
.
getString
(
"paramValue"
);
String
fieldName
=
sdo
.
getString
(
"fieldName"
);
String
filterValue
=
sdo
.
getString
(
"filterValue"
);
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
resultMapList
=
new
ArrayList
<>();
mapList
=
sapDictionaryApplication
.
getSapDictionary
(
"MATKL"
);
List
<
QuerySchemeField
>
fields
=
new
ArrayList
<>();
Long
totalWidths
=
200L
;
if
(
CollectionUtil
.
isNotEmpty
(
mapList
)){
//只返回分类
if
(
"MATKLTYPE"
.
equals
(
fieldName
)){
resultMapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
containsKey
(
"MATKL"
)
&&
map
.
get
(
"MATKL"
).
length
()
==
3
).
collect
(
Collectors
.
toList
());
}
else
{
//原材料 1/2/3开头,去掉二级分类(三位数)
if
(
StringUtil
.
isNotBlank
(
filterValue
)){
//固定条件过滤,前3位为大类编码
resultMapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
containsKey
(
"MATKL"
)
&&
map
.
get
(
"MATKL"
).
startsWith
(
filterValue
)
&&
map
.
get
(
"MATKL"
).
length
()
>
3
)
.
collect
(
Collectors
.
toList
());
//不包含子类时,返回大类
if
(
CollectionUtil
.
isEmpty
(
resultMapList
)){
resultMapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
containsKey
(
"MATKL"
)
&&
map
.
get
(
"MATKL"
).
equals
(
filterValue
)
&&
map
.
get
(
"MATKL"
).
length
()
==
3
)
.
collect
(
Collectors
.
toList
());
}
}
}
if
(
StringUtil
.
isNotBlank
(
param
)){
//输入查询条件过滤
resultMapList
=
resultMapList
.
stream
()
.
filter
(
map
->
map
.
values
().
stream
().
anyMatch
(
value
->
value
.
contains
(
param
)))
.
collect
(
Collectors
.
toList
());
}
if
(!
CollectionUtils
.
isEmpty
(
resultMapList
)){
Map
<
String
,
String
>
map
=
resultMapList
.
get
(
0
);
String
[]
widths
=
sapDictionaryApplication
.
getWidths
(
resultMapList
);
for
(
int
y
=
0
;
y
<
widths
.
length
;
y
++){
totalWidths
+=
Long
.
valueOf
(
widths
[
y
]);
}
int
x
=
0
;
for
(
String
key
:
map
.
keySet
())
{
QuerySchemeField
querySchemeField
=
new
QuerySchemeField
(
key
,
key
,
"string"
,
Long
.
valueOf
(
widths
[
x
]));
fields
.
add
(
querySchemeField
);
x
++;
}
}
}
System
.
out
.
println
(
"数据条数:"
+
mapList
.
size
());
Integer
intPage
=
sdo
.
getInteger
(
"intPage"
,
1
);
Integer
pageSize
=
sdo
.
getInteger
(
"pageSize"
,
10
);
PageRequest
pageRequest
=
new
PageRequest
(
intPage
-
1
,
pageSize
);
EasySearchParse
easySearchParse
=
new
EasySearchParse
();
easySearchParse
.
setFields
(
fields
);
easySearchParse
.
setWidth
(
totalWidths
);
MemEasySearcher
<
Map
<
String
,
String
>>
memEasySearcher
=
new
MemEasySearcherImpl
<>();
Map
<
String
,
Object
>
model
=
memEasySearcher
.
search
(
resultMapList
,
easySearchParse
,
pageRequest
,
null
);
return
model
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyApplicationImpl.java
View file @
dc3a3377
...
...
@@ -132,6 +132,8 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
}
else
{
newSapNonProdApplyDept
.
setMatnr
(
sapNonProdApplyDept
.
getMatnr
());
newSapNonProdApplyDept
.
setMatkl
(
sapNonProdApplyDept
.
getMatkl
());
newSapNonProdApplyDept
.
setMatklTypeName
(
sapNonProdApplyDept
.
getMatklTypeName
());
newSapNonProdApplyDept
.
setMatklType
(
sapNonProdApplyDept
.
getMatklType
());
newSapNonProdApplyDept
.
setMatklName
(
sapNonProdApplyDept
.
getMatklName
());
newSapNonProdApplyDept
.
setGroes
(
sapNonProdApplyDept
.
getGroes
());
newSapNonProdApplyDept
.
setMtart
(
sapNonProdApplyDept
.
getMtart
());
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/domain/SapNonProdApplyDept.java
View file @
dc3a3377
...
...
@@ -866,6 +866,12 @@ public class SapNonProdApplyDept implements Serializable {
@Column
(
name
=
"matkl_name"
)
private
String
matklName
;
@Column
(
name
=
"matkl_type"
)
private
String
matklType
;
@Column
(
name
=
"matkl_type_name"
)
private
String
matklTypeName
;
@Column
(
name
=
"spart_name"
)
private
String
spartName
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/domain/vo/NonProdApplyBasicVo.java
View file @
dc3a3377
...
...
@@ -134,6 +134,8 @@ public class NonProdApplyBasicVo extends NonProdApplyDeptVo {
private
String
lgtyp
;
//存储类型
private
String
matklName
;
private
String
matklTypeName
;
private
String
matklType
;
private
String
spartName
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/domain/vo/NonProdApplyDeptBaseInfoVo.java
View file @
dc3a3377
...
...
@@ -775,6 +775,12 @@ public class NonProdApplyDeptBaseInfoVo implements Serializable {
@Column
(
name
=
"matkl_name"
)
private
String
matklName
;
@Column
(
name
=
"matkl_type"
)
private
String
matklType
;
@Column
(
name
=
"matkl_type_name"
)
private
String
matklTypeName
;
@Column
(
name
=
"spart_name"
)
private
String
spartName
;
...
...
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