Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
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
platform
hp-smart
Commits
ee990627
Commit
ee990627
authored
Feb 26, 2024
by
liulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增材料,材料名称做输入下拉.工厂与下料组在新增时录入.取消批量派单功能
parent
922bf3cd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
126 additions
and
26 deletions
+126
-26
ServiceHPSC006.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
+7
-2
HPSC005.js
src/main/webapp/HP/SC/HPSC005.js
+6
-0
HPSC006.js
src/main/webapp/HP/SC/HPSC006.js
+87
-4
HPSC006.jsp
src/main/webapp/HP/SC/HPSC006.jsp
+26
-20
No files found.
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
View file @
ee990627
...
...
@@ -44,6 +44,8 @@ public class ServiceHPSC006 extends ServiceBase {
HPSC005
HPSC005
=
new
HPSC005
();
EiInfo
outInfo
=
super
.
initLoad
(
inInfo
,
HPSC005
);
outInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
HPSC005
.
eiMetadata
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
),
null
,
false
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
...
...
@@ -72,11 +74,13 @@ public class ServiceHPSC006 extends ServiceBase {
//添加返回到前台的块,块名和前台的对应
EiBlock
eiBlock
=
outInfo
.
addBlock
(
"result"
);
HashMap
params
=
new
HashMap
();
params
.
put
(
"productionOrderNo"
,
inInfo
.
get
(
"prod
uction
OrderNo"
));
params
.
put
(
"productionOrderNo"
,
inInfo
.
get
(
"prodOrderNo"
));
List
list
=
dao
.
query
(
"HPSC006.queryDetail"
,
params
,
0
,-
999999
);
outInfo
.
addBlock
(
"detail"
).
addBlockMeta
(
HPSC006
.
eiMetadata
);
outInfo
.
addBlock
(
"detail"
).
addRows
(
list
);
outInfo
.
getBlock
(
"detail"
).
set
(
"limit"
,
list
.
size
());
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
),
null
,
false
);
return
outInfo
;
}
...
...
@@ -106,6 +110,7 @@ public class ServiceHPSC006 extends ServiceBase {
HPSC006
.
setStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
HPSC006
.
setTotalWt
(
totalWt
);
HPSC006
.
setInventCode
(
HPPZTools
.
checkAndSavePZ04
(
HPSC006
.
getInventType
(),
HPSC006
.
getInventName
()));
HPSC006
.
setStatus
(
1
);
DaoUtils
.
insert
(
"HPSC006.insert"
,
HPSC006
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
@@ -166,7 +171,7 @@ public class ServiceHPSC006 extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"生产下料"
,
operType
=
"删除"
,
operDesc
=
"删除"
)
public
EiInfo
delete
(
EiInfo
eiInfo
)
{
HPSC006
HPSC006
=
new
HPSC006
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
"detail"
);
try
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
...
...
src/main/webapp/HP/SC/HPSC005.js
View file @
ee990627
...
...
@@ -60,6 +60,7 @@ function query() {
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 拆单派工
*
...
...
@@ -166,3 +167,8 @@ function showGroupDetail(prodOrderNo) {
window
.
open
(
"HPSC005B?methodName=initLoad&inqu_status-0-prodOrderNo="
+
prodOrderNo
)
}
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
src/main/webapp/HP/SC/HPSC006.js
View file @
ee990627
ids
=
[];
prdtNameGlobalData
=
[];
factoryGroupGlobalData
=
[];
$
(
function
()
{
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
...
...
@@ -60,7 +62,7 @@ $(function () {
var
projCode
=
e
.
model
[
'projCode'
];
var
projName
=
e
.
model
[
'projName'
];
info
.
set
(
"prodOrderNo"
,
prodOrderNo
);
info
.
set
(
"prodOrderNo"
,
prod
uction
OrderNo
);
EiCommunicator
.
send
(
"HPSC006"
,
"queryDetail"
,
info
,{
onSuccess
:
function
(
ei
){
//返回结果集
detailGrid
.
setEiInfo
(
ei
);
...
...
@@ -108,10 +110,69 @@ $(function () {
}
},{
field
:
"inventName"
,
query
:
function
(
container
,
options
)
{
title
:
"材料名称"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
prdtNameGlobalData
.
length
;
i
++
)
{
if
(
prdtNameGlobalData
[
i
][
'textField'
]
===
dataItem
[
'prdtName'
])
{
//dataItem["prdtCode"] = prdtNameGlobalData[i]['valueField']
resultGrid
.
setCellValue
(
0
,
"prdtCode"
,
prdtNameGlobalData
[
i
][
'valueField'
]);
return
prdtNameGlobalData
[
i
][
'textField'
];
}
}
return
dataItem
[
"inventName"
];
},
editor
:
function
(
container
,
options
)
{
var
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
var
cellIndex
=
grid
.
cellIndex
(
container
);
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
let
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"inventType"
,
"7"
);
return
eiInfo
;
eiInfo
.
set
(
"inventType"
,
7
);
eiInfo
.
set
(
"isSplicingSymbol"
,
false
);
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
prdtNameGlobalData
=
dataSource
;
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
input
.
kendoAutoComplete
({
valuePrimitive
:
true
,
dataSource
:
dataSource
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
required
:
"true"
,
optionLabelTemplate
:
"#:textField#"
,
valueTemplate
:
"#:valueField#"
,
template
:
"#:textField#"
,
filter
:
"contains"
});
}
},
{
field
:
"orgNo"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryGroupGlobalData
.
length
;
i
++
)
{
if
(
factoryGroupGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'orgNo'
])
{
return
factoryGroupGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-factoryCode"
,
options
.
model
[
"factoryCode"
]);
// 1:生产组
inInfo
.
set
(
"inqu_status-0-groupType"
,
1
);
inInfo
.
set
(
"serviceName"
,
"HPPZ011"
);
inInfo
.
set
(
"methodName"
,
"queryGroupComboBox"
);
inInfo
.
set
(
"blockId"
,
"group_record_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
}
],
...
...
@@ -119,10 +180,32 @@ $(function () {
}
}
});
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 生产组名称
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-groupType"
,
1
);
EiCommunicator
.
send
(
"HPPZ011"
,
"queryGroupComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
factoryGroupGlobalData
=
ei
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
});
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HPSC002A?methodName=initLoad&inqu_status-0-bizType=XL&inqu_status-0-id="
+
id
,
...
...
src/main/webapp/HP/SC/HPSC006.jsp
View file @
ee990627
...
...
@@ -46,38 +46,44 @@
<EF:EFInput
ename=
"productionOrderNo"
type=
"hidden"
/>
<EF:EFGrid
blockId=
"detail"
autoDraw=
"no"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<
%
--
<
EF:EFComboColumn
cname=
"材料类型"
ename=
"inventType"
width=
"90"
align=
"center"
required=
"true"
>
--%
>
<
%
--
<
EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
condition=
"ITEM_CODE IN ('7')"
/>
--%
>
<
%
--
</
EF:EFComboColumn
>
--%
>
<EF:EFPopupColumn
ename=
"inventName"
cname=
"材料名称"
width=
"200"
popupType=
"ServiceGrid"
<EF:EFComboColumn
cname=
"材料类型"
ename=
"inventType"
width=
"80"
align=
"center"
required=
"true"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
condition=
"ITEM_CODE IN ('7')"
/
>
</EF:EFComboColumn
>
<
%
--
<
EF:EFPopupColumn
ename=
"inventName"
cname=
"材料名称"
width=
"200"
popupType=
"ServiceGrid"
popupTitle=
"材料信息"
serviceName=
"HPPZ004"
methodName=
"queryComboBox"
resultId=
"invent_name_block_id"
columnEnames=
"textField,valueField"
columnCnames=
"材料名称,材料编码"
backFillColumnIds=
"textField,valueField"
backFillFieldIds=
"inventName,inventCode"
valueField=
"textField"
textField=
"textField"
/>
valueField=
"textField"
textField=
"textField"
/>
--%>
<EF:EFColumn
ename=
"inventName"
cname=
"材料名称"
width=
"200"
align=
"center"
required=
"true"
maxLength=
"50"
/>
<EF:EFColumn
ename=
"inventCode"
enable=
"false"
cname=
"材料编码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventLength"
cname=
"长"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"inventWidth"
cname=
"宽"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"inventThick"
cname=
"厚"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"material"
cname=
"材质"
/>
<EF:EFColumn
ename=
"inventLength"
width=
"80"
cname=
"长"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"inventWidth"
width=
"80"
cname=
"宽"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"inventThick"
width=
"80"
cname=
"厚"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"material"
width=
"80"
cname=
"材质"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
/>
<EF:EFColumn
ename=
"num"
cname=
"计划
数量"
/>
<EF:EFColumn
ename=
"unitWt"
format=
"{0:N3}"
cname=
"计划
单重"
/>
<EF:EFColumn
enable=
"false"
format=
"{0:N3}"
ename=
"totalWt"
cname=
"计划
总重"
/>
<EF:EFColumn
ename=
"planCompletionDate"
required=
'true'
cname=
"计划完成时间"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"1
5
0"
/>
<EF:EFColumn
ename=
"actualCompletionDate"
cname=
"实际完成时间"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"1
5
0"
<EF:EFColumn
ename=
"num"
width=
"80"
cname=
"
数量"
/>
<EF:EFColumn
ename=
"unitWt"
format=
"{0:N3}"
width=
"80"
cname=
"
单重"
/>
<EF:EFColumn
enable=
"false"
format=
"{0:N3}"
ename=
"totalWt"
width=
"80"
cname=
"
总重"
/>
<EF:EFColumn
ename=
"planCompletionDate"
required=
'true'
cname=
"计划完成时间"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"1
2
0"
/>
<EF:EFColumn
ename=
"actualCompletionDate"
cname=
"实际完成时间"
editType=
"date"
dateFormat=
"yyyy/MM/dd"
width=
"1
2
0"
enable=
"false"
/>
<EF:EFColumn
enable=
"false"
ename=
"actualCompletionNum"
cname=
"实际完工数量"
readonly=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"actualCompletionTotalWt"
cname=
"实际完工重量"
readonly=
"true"
/>
<EF:EFComboColumn
enable=
"false"
align=
"center"
ename=
"status"
cname=
"状态"
>
<EF:EFColumn
enable=
"false"
ename=
"actualCompletionNum"
cname=
"实际完工数量"
width=
"100"
readonly=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"actualCompletionTotalWt"
cname=
"实际完工重量"
width=
"100"
readonly=
"true"
/>
<EF:EFComboColumn
enable=
"false"
align=
"center"
ename=
"status"
width=
"80"
cname=
"状态"
>
<EF:EFOption
label=
"计划中"
value=
"0"
/>
<EF:EFOption
label=
"生产中"
value=
"1"
/>
<EF:EFOption
label=
"已完成"
value=
"2"
/>
</EF:EFComboColumn>
<EF:EFColumn
enable=
"false"
ename=
"factoryName"
cname=
"厂区名称"
/>
<EF:EFColumn
enable=
"false"
ename=
"orgName"
cname=
"生产组"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
width=
"100"
enable=
"false"
readonly=
"false"
/>
<EF:EFComboColumn
ename=
"factoryCode"
cname=
"厂区"
width=
"110"
align=
"center"
required=
"true"
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"factory_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
enable=
"false"
ename=
"factoryName"
cname=
"厂区名称"
hidden=
"true"
/>
<EF:EFColumn
ename=
"orgNo"
cname=
"生产组"
width=
"110"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"orgName"
cname=
"生产组"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
width=
"140"
enable=
"false"
readonly=
"false"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...
...
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