Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
6a9f796d
Commit
6a9f796d
authored
May 24, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产派工dev
parent
de16b42b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
182 additions
and
292 deletions
+182
-292
ServiceHGSC006B.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC006B.java
+1
-1
HGSC005A.jsp
src/main/webapp/HG/SC/HGSC005A.jsp
+4
-4
HGSC006A.jsp
src/main/webapp/HG/SC/HGSC006A.jsp
+4
-4
HGSC006B.js
src/main/webapp/HG/SC/HGSC006B.js
+131
-17
HGSC006B.jsp
src/main/webapp/HG/SC/HGSC006B.jsp
+42
-37
HGSC006C.js
src/main/webapp/HG/SC/HGSC006C.js
+0
-169
HGSC006C.jsp
src/main/webapp/HG/SC/HGSC006C.jsp
+0
-60
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC006
C
.java
→
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC006
B
.java
View file @
6a9f796d
...
...
@@ -30,7 +30,7 @@ import java.util.stream.Collectors;
* 拆单派工
*
*/
public
class
ServiceHGSC006
C
extends
ServiceBase
{
public
class
ServiceHGSC006
B
extends
ServiceBase
{
/**
* 画面初始化.
...
...
src/main/webapp/HG/SC/HGSC005A.jsp
View file @
6a9f796d
...
...
@@ -37,10 +37,10 @@
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
required=
"true"
/>
<EF:EFColumn
ename=
"planEndDate"
cname=
"计划完工日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
required=
"true"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"计划重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishWeight"
cname=
"完成重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unfinishWeight"
cname=
"未完成重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重
(kg)
"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"计划重量
(kg)
"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishWeight"
cname=
"完成重量
(kg)
"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unfinishWeight"
cname=
"未完成重量
(kg)
"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"计划数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishQuantity"
cname=
"完成数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unfinishQuantity"
cname=
"未完成数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
...
...
src/main/webapp/HG/SC/HGSC006A.jsp
View file @
6a9f796d
...
...
@@ -36,10 +36,10 @@
<EF:EFColumn
ename=
"processName"
cname=
"工序"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"planEndDate"
cname=
"计划完工日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"订单重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"assignWeight"
cname=
"派工重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unassignWeight"
cname=
"待派工重量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重
(kg)
"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"订单重量
(kg)
"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"assignWeight"
cname=
"派工重量
(kg)
"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unassignWeight"
cname=
"待派工重量
(kg)
"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"订单数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"assignQuantity"
cname=
"派工数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unassignQuantity"
cname=
"待派工数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
...
...
src/main/webapp/HG/SC/HGSC006B.js
View file @
6a9f796d
let
factoryGroupGlobalData
=
[];
$
(
function
()
{
var
factoryGlobalData
=
__eiInfo
.
getBlock
(
"factory_record_block_id"
).
getMappedRows
();
let
groupGlobalData
=
__eiInfo
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
IPLATUI
.
EFGrid
=
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[{
field
:
"
org
Name"
,
field
:
"
group
Name"
,
attributes
:
{
class
:
"i-input-readonly"
}
},
{
field
:
"orgNo"
,
field
:
"factoryCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryGlobalData
.
length
;
i
++
)
{
if
(
factoryGlobalData
[
i
][
'factoryCode'
]
===
dataItem
[
'factoryCode'
])
{
return
factoryGlobalData
[
i
][
'factoryName'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
factoryGlobalData
,
minLength
:
0
,
dataTextField
:
"factoryName"
,
dataValueField
:
"factoryCode"
,
optionLabelTemplate
:
"#:factoryName#"
,
valueTemplate
:
"#:factoryName#"
,
template
:
"#:factoryName#"
,
filter
:
"contains"
});
}
},
{
field
:
"groupCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryG
roupGlobalData
.
length
;
i
++
)
{
if
(
factoryGroupGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'orgNo
'
])
{
return
factoryGroupGlobalData
[
i
][
'textField
'
];
for
(
let
i
=
0
;
i
<
g
roupGlobalData
.
length
;
i
++
)
{
if
(
groupGlobalData
[
i
][
'groupCode'
]
===
dataItem
[
'groupCode
'
])
{
return
groupGlobalData
[
i
][
'groupName
'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
dataSource
;
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
(
"inqu_status-0-productType"
,
$
(
"#detail-0-productType"
).
val
());
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
}],
EiCommunicator
.
send
(
HGSC006B
,
groupRecordComboBox
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
let
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
let
cellIndex
=
grid
.
cellIndex
(
container
);
let
input
=
$
(
'<input />'
);
let
field
=
inInfo
.
get
(
"field"
);
input
.
attr
(
"name"
,
field
);
input
.
attr
(
"id"
,
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"groupName"
,
dataValueField
:
"groupCode"
,
dataSource
:
dataSource
,
template
:
"#=groupName#"
,
filter
:
"contains"
});
}
},{
field
:
"createdTime"
,
attributes
:
{
class
:
"i-input-readonly"
},
defaultValue
:
function
()
{
return
currShortDate
();
}
}],
onSave
:
function
(
e
)
{
// 阻止后台保存请求,使用自定义保存
e
.
preventDefault
();
...
...
@@ -43,13 +96,74 @@ $(function () {
// 阻止后台删除请求,使用自定义删除
e
.
preventDefault
();
deleteFunc
();
}
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
query
();
}
}
}
}
$
(
"#QUERY"
).
on
(
"click"
,
query
);
downKeyUp
();
});
/**
* 查询
*/
function
query
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 保存
*/
let
save
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
if
(
isBlank
(
rows
[
i
][
'factoryCode'
]))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行
\"
厂区
\"
,不能为空"
);
return
;
}
if
(
isBlank
(
rows
[
i
][
'groupCode'
]))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行
\"
生产组
\"
,不能为空"
);
return
;
}
if
(
isBlank
(
rows
[
i
][
'quantity'
]))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行
\"
分派数量
\"
,不能为空"
);
return
;
}
if
(
!
isPositiveInteger
(
rows
[
i
][
'quantity'
]))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行
\"
分派数量
\"
必须是大于0的整数"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSC006B"
,
"save"
,
true
);
}
});
}
/**
* 删除
*/
let
deleteFunc
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSC006B"
,
"delete"
,
true
);
}
});
}
src/main/webapp/HG/SC/HGSC006B.jsp
View file @
6a9f796d
...
...
@@ -7,54 +7,59 @@
<EF:EFPage
title=
"拆单派工"
>
<EF:EFRegion
id=
"inqu"
title=
"订单详情"
>
<EF:EFInput
ename=
"inqu_status-0-prodOrderNo"
cname=
"项目号"
type=
"hidden"
/>
<EF:EFInput
ename=
"detail-0-projCode"
cname=
"项目号"
type=
"hidden"
/>
<EF:EFInput
ename=
"detail-0-productType"
cname=
"产品类型"
type=
"hidden"
/>
<EF:EFInput
ename=
"detail-0-id"
cname=
"订单明细ID"
type=
"hidden"
/>
<EF:EFInput
ename=
"detail-0-companyCode"
cname=
"公司编码"
type=
"hidden"
/>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-productionOrderNo"
cname=
"生产订单号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-projCode"
cname=
"项目号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-projName"
cname=
"项目名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-orderNo"
cname=
"生产订单号"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-prdtName"
cname=
"部件名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-prdtLength"
cname=
"部件长(MM)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-prdtWidth"
cname=
"部件宽(MM)"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-prdtThick"
cname=
"部件厚(MM)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-num"
cname=
"部件数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-unitWt"
cname=
"部件重量(T)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-productCode"
cname=
"产品编码"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-productName"
cname=
"产品名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-processName"
cname=
"工序"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-remark"
cname=
"部件备注"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFSelect
ename=
"detail-0-partType"
cname=
"零件类型"
colWidth=
"4"
readonly=
"true"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFSelect>
<EF:EFInput
ename=
"detail-0-partName"
cname=
"零件名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-planCompletionDate"
cname=
"计划完成日期"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-singleWeight"
cname=
"单量(kg)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-totalWeight"
cname=
"订单重量(kg)"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-
partLength"
cname=
"零件长(MM
)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-
partWidth"
cname=
"零件宽(MM
)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-
partThick"
cname=
"零件厚(MM)
"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-
assignWeight"
cname=
"派工重量(kg
)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-
unassignWeight"
cname=
"待派工重量(kg
)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-
quantity"
cname=
"订单数量
"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-remark1"
cname=
"零件备注"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-num"
cname=
"零件数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-unitWt"
cname=
"零件重量(T)"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFDatePicker
ename=
"detail-0-workDate"
cname=
"派工时间"
role=
"date"
format=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-assignedNum"
cname=
"派工数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-totalWt"
cname=
"派工重量(T)"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-unassignedNum"
cname=
"剩余数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-unTotalWt"
cname=
"剩余重量(T)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-completeNum"
cname=
"完成数量"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-actualCompletionTotalWt"
cname=
"完成重量(T)"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFDatePicker
ename=
"detail-0-deliveryDate"
cname=
"交货日期"
role=
"date"
format=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFDatePicker
ename=
"detail-0-planCompletionDate"
cname=
"计划完成日期"
role=
"date"
format=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFDatePicker
ename=
"detail-0-actualCompletionDate"
cname=
"实际完成时间"
role=
"date"
format=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-assignQuantity"
cname=
"已派工数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-unassignQuantity"
cname=
"待派工数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFSelect
ename=
"detail-0-assignStatus"
cname=
"状态"
colWidth=
"4"
readonly=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.assignStatus"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"任务ID"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"taskCode"
cname=
"任务单号"
enable=
"false"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"factoryCode"
cname=
"厂区"
width=
"110"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"factory_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"factoryName"
cname=
"工厂"
enable=
"false"
align=
"center"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"groupCode"
cname=
"生产组"
width=
"110"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"group_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"groupName"
cname=
"生产组名称"
enable=
"false"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"派工时间"
enable=
"false"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"分派数量"
format=
"{0:N0}"
required=
"true"
/>
</EF:EFGrid>
<br/>
<span
style=
'color: red;font-size: 13px;'
>
说明:厂区和生产组仅新增的时候可以编辑
</span>
</EF:EFRegion>
</EF:EFPage>
src/main/webapp/HG/SC/HGSC006C.js
deleted
100644 → 0
View file @
de16b42b
$
(
function
()
{
var
factoryGlobalData
=
__eiInfo
.
getBlock
(
"factory_record_block_id"
).
getMappedRows
();
let
groupGlobalData
=
__eiInfo
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[{
field
:
"groupName"
,
attributes
:
{
class
:
"i-input-readonly"
}
},
{
field
:
"factoryCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryGlobalData
.
length
;
i
++
)
{
if
(
factoryGlobalData
[
i
][
'factoryCode'
]
===
dataItem
[
'factoryCode'
])
{
return
factoryGlobalData
[
i
][
'factoryName'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
factoryGlobalData
,
minLength
:
0
,
dataTextField
:
"factoryName"
,
dataValueField
:
"factoryCode"
,
optionLabelTemplate
:
"#:factoryName#"
,
valueTemplate
:
"#:factoryName#"
,
template
:
"#:factoryName#"
,
filter
:
"contains"
});
}
},
{
field
:
"groupCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
groupGlobalData
.
length
;
i
++
)
{
if
(
groupGlobalData
[
i
][
'groupCode'
]
===
dataItem
[
'groupCode'
])
{
return
groupGlobalData
[
i
][
'groupName'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
dataSource
;
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-factoryCode"
,
options
.
model
[
"factoryCode"
]);
inInfo
.
set
(
"inqu_status-0-productType"
,
$
(
"#detail-0-productType"
).
val
());
inInfo
.
set
(
"field"
,
options
.
field
);
EiCommunicator
.
send
(
HGSC006C
,
groupRecordComboBox
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
let
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
let
cellIndex
=
grid
.
cellIndex
(
container
);
let
input
=
$
(
'<input />'
);
let
field
=
inInfo
.
get
(
"field"
);
input
.
attr
(
"name"
,
field
);
input
.
attr
(
"id"
,
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"groupName"
,
dataValueField
:
"groupCode"
,
dataSource
:
dataSource
,
template
:
"#=groupName#"
,
filter
:
"contains"
});
}
},{
field
:
"createdTime"
,
attributes
:
{
class
:
"i-input-readonly"
},
defaultValue
:
function
()
{
return
currShortDate
();
}
}],
onSave
:
function
(
e
)
{
// 阻止后台保存请求,使用自定义保存
e
.
preventDefault
();
save
();
},
onDelete
:
function
(
e
)
{
// 阻止后台删除请求,使用自定义删除
e
.
preventDefault
();
deleteFunc
();
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'save'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
query
();
}
}
}
}
$
(
"#QUERY"
).
on
(
"click"
,
query
);
downKeyUp
();
});
/**
* 查询
*/
function
query
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 保存
*/
let
save
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
if
(
isBlank
(
rows
[
i
][
'factoryCode'
]))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行
\"
厂区
\"
,不能为空"
);
return
;
}
if
(
isBlank
(
rows
[
i
][
'groupCode'
]))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行
\"
生产组
\"
,不能为空"
);
return
;
}
if
(
isBlank
(
rows
[
i
][
'quantity'
]))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行
\"
分派数量
\"
,不能为空"
);
return
;
}
if
(
!
isPositiveInteger
(
rows
[
i
][
'quantity'
]))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行
\"
分派数量
\"
必须是大于0的整数"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSC006C"
,
"save"
,
true
);
}
});
}
/**
* 删除
*/
let
deleteFunc
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSC006C"
,
"delete"
,
true
);
}
});
}
src/main/webapp/HG/SC/HGSC006C.jsp
deleted
100644 → 0
View file @
de16b42b
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"拆单派工"
>
<EF:EFRegion
id=
"inqu"
title=
"订单详情"
>
<EF:EFInput
ename=
"detail-0-projCode"
cname=
"项目号"
type=
"hidden"
/>
<EF:EFInput
ename=
"detail-0-productType"
cname=
"产品类型"
type=
"hidden"
/>
<EF:EFInput
ename=
"detail-0-id"
cname=
"订单明细ID"
type=
"hidden"
/>
<EF:EFInput
ename=
"detail-0-companyCode"
cname=
"公司编码"
type=
"hidden"
/>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-projCode"
cname=
"项目号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-projName"
cname=
"项目名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-orderNo"
cname=
"生产订单号"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-productCode"
cname=
"产品编码"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-productName"
cname=
"产品名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-processName"
cname=
"工序"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-planCompletionDate"
cname=
"计划完成日期"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-quantity"
cname=
"计划数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-totalWeight"
cname=
"计划重量(kg)"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-assignQuantity"
cname=
"已派工数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-unassignQuantity"
cname=
"待派工数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFSelect
ename=
"detail-0-assignStatus"
cname=
"状态"
colWidth=
"4"
readonly=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.assignStatus"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"任务ID"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"taskCode"
cname=
"任务单号"
enable=
"false"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"factoryCode"
cname=
"厂区"
width=
"110"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"factory_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"factoryName"
cname=
"工厂"
enable=
"false"
align=
"center"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"groupCode"
cname=
"生产组"
width=
"110"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"group_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"groupName"
cname=
"生产组名称"
enable=
"false"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"派工时间"
enable=
"false"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"分派数量"
format=
"{0:N0}"
required=
"true"
/>
</EF:EFGrid>
<br/>
<span
style=
'color: red;font-size: 13px;'
>
说明:厂区和生产组仅新增的时候可以编辑
</span>
</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