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
e168f4a4
Commit
e168f4a4
authored
Mar 05, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
b7474cdb
b7238e57
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
264 additions
and
191 deletions
+264
-191
ServiceHPKC002.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002.java
+3
-3
ServiceHPKC002A.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002A.java
+3
-1
ServiceHPKC004B.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004B.java
+3
-3
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+0
-1
ServiceHPSC003.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC003.java
+1
-0
ServiceHPSC006A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006A.java
+32
-4
ServiceHPSC006B.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006B.java
+7
-3
HPSC002.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
+32
-2
HPKC002A.js
src/main/webapp/HP/KC/HPKC002A.js
+1
-44
HPKC002A.jsp
src/main/webapp/HP/KC/HPKC002A.jsp
+8
-5
HPKC004B.js
src/main/webapp/HP/KC/HPKC004B.js
+1
-44
HPKC004B.jsp
src/main/webapp/HP/KC/HPKC004B.jsp
+4
-1
HPSC002.js
src/main/webapp/HP/SC/HPSC002.js
+10
-17
HPSC003.js
src/main/webapp/HP/SC/HPSC003.js
+85
-60
HPSC006.js
src/main/webapp/HP/SC/HPSC006.js
+0
-1
HPSC006A.js
src/main/webapp/HP/SC/HPSC006A.js
+24
-2
HPSC006A.jsp
src/main/webapp/HP/SC/HPSC006A.jsp
+1
-0
HPSC006B.jsp
src/main/webapp/HP/SC/HPSC006B.jsp
+49
-0
No files found.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002.java
View file @
e168f4a4
...
...
@@ -104,14 +104,14 @@ public class ServiceHPKC002 extends ServiceBase {
HPKC002
dbKc002
=
dbMapKc002
.
get
(
fKc002
.
getReqNo
());
HPKC002
newKc002
=
BeanUtils
.
copy
(
dbKc002
,
HPKC002
.
class
);
newKc002
.
setReqNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC002_NUMBER
));
newKc002
.
setAmount
(
dbKc002
.
getAmount
()
.
negate
()
);
newKc002
.
setWeight
(
dbKc002
.
getWeight
()
.
negate
()
);
newKc002
.
setAmount
(
dbKc002
.
getAmount
());
newKc002
.
setWeight
(
dbKc002
.
getWeight
());
newKc002
.
setOldReqNo
(
dbKc002
.
getReqNo
());
newKc002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
insert
(
HPKC002
.
INSERT
,
newKc002
);
// 修改库存
HPKCTools
.
updateStock
(
dbKc002
.
getWhCode
(),
dbKc002
.
getInventRecordId
(),
dbKc002
.
getAmount
()
.
negate
(),
dbKc002
.
getUnitWeight
(),
dbKc002
.
getWeight
().
negate
());
dbKc002
.
getAmount
()
,
dbKc002
.
getUnitWeight
(),
dbKc002
.
getWeight
());
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002A.java
View file @
e168f4a4
...
...
@@ -151,7 +151,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
for
(
Map
row
:
resultRows
)
{
BigDecimal
applyAmount
=
MapUtils
.
getBigDecimal
(
row
,
"applyAmount"
);
String
applyRemark
=
MapUtils
.
getString
(
row
,
"applyRemark"
);
String
proj
Nam
e
=
MapUtils
.
getString
(
row
,
"projCode"
);
String
proj
Cod
e
=
MapUtils
.
getString
(
row
,
"projCode"
);
Long
kcId
=
MapUtils
.
getLong
(
row
,
"id"
);
HPKC010
dbKc010
=
dbKc010Map
.
get
(
kcId
);
HPKC002
newKc002
=
BeanUtils
.
copy
(
dbKc010
,
HPKC002
.
class
);
...
...
@@ -166,6 +166,8 @@ public class ServiceHPKC002A extends ServiceEPBase {
HPSC006
HPSC006
=
HPSCTools
.
Hpsc006
.
getById
(
NumberUtils
.
toLong
(
hpsc006Id
));
newKc002
.
setHpsc006Id
(
HPSC006
.
getId
());
newKc002
.
setProjCode
(
HPSC006
.
getProjCode
());
}
else
{
newKc002
.
setProjCode
(
projCode
);
}
DaoUtils
.
insert
(
HPKC002
.
INSERT
,
newKc002
);
// 修改库存数量
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004B.java
View file @
e168f4a4
...
...
@@ -134,7 +134,7 @@ public class ServiceHPKC004B extends ServiceEPBase {
for
(
Map
row
:
resultRows
)
{
BigDecimal
applyAmount
=
MapUtils
.
getBigDecimal
(
row
,
"applyAmount"
);
String
applyRemark
=
MapUtils
.
getString
(
row
,
"applyRemark"
);
String
proj
Nam
e
=
MapUtils
.
getString
(
row
,
"projCode"
);
String
proj
Cod
e
=
MapUtils
.
getString
(
row
,
"projCode"
);
Long
kcId
=
MapUtils
.
getLong
(
row
,
"id"
);
HPKC010
dbKc010
=
dbKc010Map
.
get
(
kcId
);
HPKC004
newKc004
=
BeanUtils
.
copy
(
dbKc010
,
HPKC004
.
class
);
...
...
@@ -147,9 +147,9 @@ public class ServiceHPKC004B extends ServiceEPBase {
newKc004
.
setIsPrint
(
CommonConstant
.
YesNo
.
NO_0
);
newKc004
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
//绑定项目
HPSC001
HPSC001
=
HPSCTools
.
HpSc001
.
get
Id
(
projNam
e
);
HPSC001
HPSC001
=
HPSCTools
.
HpSc001
.
get
(
projCod
e
);
newKc004
.
setProjCode
(
HPSC001
.
getProjCode
());
newKc004
.
setProjName
(
projName
);
newKc004
.
setProjName
(
HPSC001
.
getProjName
()
);
DaoUtils
.
insert
(
HPKC004
.
INSERT
,
newKc004
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
e168f4a4
...
...
@@ -95,7 +95,6 @@ public class ServiceHPSC002 extends ServiceBase {
this
.
modify
(
hpsc002
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC003.java
View file @
e168f4a4
...
...
@@ -121,6 +121,7 @@ public class ServiceHPSC003 extends ServiceBase {
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPSC003
.
fromMap
(
map
);
HPSC003
.
setPlanCompletionDate
(
DateUtils
.
formatShort
(
HPSC003
.
getPlanCompletionDate
()));
DaoUtils
.
update
(
"HPSC003.update"
,
HPSC003
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006A.java
View file @
e168f4a4
...
...
@@ -6,6 +6,7 @@ import com.baosight.hpjx.common.HPConstants;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.EiInfoUtils
;
...
...
@@ -16,11 +17,13 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.sun.org.apache.bcel.internal.generic.NEW
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.Arrays
;
import
java.util.Map
;
import
java.util.*
;
/**
*
...
...
@@ -59,9 +62,34 @@ public class ServiceHPSC006A extends ServiceBase {
HPSC006
HPSC006
=
new
HPSC006
();
/* 调用EI查询方法.*/
EiInfo
outInfo
=
super
.
query
(
inInfo
,
"HPSC006A.query"
,
new
HPSC006
());
EiBlock
blcok
=
outInfo
.
addBlock
(
HPConstants
.
BLOCK_DETAIL
);
List
<
Map
>
resultRows
=
outInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
list
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
resultRows
))
{
for
(
Map
resultRow
:
resultRows
)
{
HPSC006
hpsc006
=
new
HPSC006
();
hpsc006
.
fromMap
(
resultRow
);
String
projCode
=
hpsc006
.
getProjCode
();
if
(
StringUtils
.
isNotBlank
(
projCode
))
{
Map
map
=
new
HashMap
();
map
.
put
(
"projCode"
,
projCode
);
map
.
put
(
"hpsc006Id"
,
hpsc006
.
getId
());
List
reqNum
=
dao
.
query
(
"HPKC002.query"
,
map
);
hpsc006
.
setReqNum
(
reqNum
.
size
());
}
resultRow
=
hpsc006
.
toMap
();
list
.
add
(
resultRow
);
}
}
EiInfo
outInfo1
=
new
EiInfo
();
//添加返回到前台的块,块名和前台的对应
EiBlock
eiBlock
=
outInfo1
.
addBlock
(
EiConstant
.
resultBlock
);
EiBlock
blcok
=
outInfo1
.
addBlock
(
HPConstants
.
BLOCK_DETAIL
);
blcok
.
setBlockMeta
(
new
HPSC006
().
eiMetadata
);
return
outInfo
;
outInfo1
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
HPSC006
.
eiMetadata
);
outInfo1
.
addBlock
(
EiConstant
.
resultBlock
).
addRows
(
list
);
outInfo1
.
getBlock
(
EiConstant
.
resultBlock
).
set
(
"limit"
,
list
.
size
());
return
outInfo1
;
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006B.java
View file @
e168f4a4
...
...
@@ -6,9 +6,7 @@ import com.baosight.hpjx.common.HPConstants;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.EiInfoUtils
;
...
...
@@ -19,6 +17,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
...
...
@@ -39,6 +38,11 @@ public class ServiceHPSC006B extends ServiceBase {
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
prodOrderNo
=
MapUtils
.
getString
(
queryMap
,
CommonConstant
.
Field
.
ID
);
HPSC006
hpsc006
=
HPSCTools
.
Hpsc006
.
getById
(
NumberUtils
.
toLong
(
prodOrderNo
));
if
(
hpsc006
!=
null
)
{
HPSC005C
dbSc005
=
HPSCTools
.
HpSc005
.
getDetails
(
hpsc006
.
getProductionOrderNo
());
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addRow
(
dbSc005
);
}
HPSC006
dbSc006
=
HPSCTools
.
HpSc005
.
getHPSC006
(
prodOrderNo
);
inInfo
.
addBlock
(
CommonConstant
.
Field
.
DETAIL
).
addRow
(
dbSc006
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC006
().
eiMetadata
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
View file @
e168f4a4
...
...
@@ -109,13 +109,43 @@
</isNotEmpty>
</sql>
<sql
id=
"condition1"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
A.ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
A.PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtType"
>
A.PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtCode"
>
A.PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prdtName"
>
A.PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
A.INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
A.PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
A.STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"lv"
>
A.LV = #lv#
</isNotEmpty>
</sql>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"order"
>
$order$
</isNotEmpty>
<isEmpty
property=
"order"
>
ID DESC
A.
ID DESC
</isEmpty>
</dynamic>
</sql>
...
...
@@ -128,7 +158,7 @@
WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
<include
refid=
"condition"
/>
<include
refid=
"condition
1
"
/>
<include
refid=
"order"
/>
</select>
...
...
src/main/webapp/HP/KC/HPKC002A.js
View file @
e168f4a4
...
...
@@ -2,50 +2,7 @@ let projNameGlobalData = [];
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
columns
:
[{
field
:
"projCode"
,
title
:
"项目名称"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
projNameGlobalData
.
length
;
i
++
)
{
if
(
projNameGlobalData
[
i
][
'textField'
]
===
dataItem
[
'projName'
])
{
//dataItem["prdtCode"] = projNameGlobalData[i]['valueField']
resultGrid
.
setCellValue
(
0
,
"projCode"
,
projNameGlobalData
[
i
][
'valueField'
]);
return
projNameGlobalData
[
i
][
'textField'
];
}
}
return
dataItem
[
"projCode"
];
},
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
(
"isSplicingSymbol"
,
false
);
var
dataSource
;
EiCommunicator
.
send
(
"HPSC001"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"proj_record_block_id"
).
getMappedRows
();
projNameGlobalData
=
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"
});
}
}],
columns
:
[],
dataBound
:
function
()
{
}
}
...
...
src/main/webapp/HP/KC/HPKC002A.jsp
View file @
e168f4a4
...
...
@@ -31,22 +31,25 @@
<EF:EFInput
ename=
"inqu_result-0-hpsc006Id"
type=
"hidden"
/>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
autoFit=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"库存ID"
enable=
"false"
width=
"60"
align=
"center"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
enable=
"false"
width=
"10
0
"
align=
"center"
>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
enable=
"false"
width=
"10"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库名称"
enable=
"false"
width=
"1
2
0"
align=
"center"
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库名称"
enable=
"false"
width=
"1
0
0"
align=
"center"
blockName=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventCode"
cname=
"存货名称"
enable=
"false"
width=
"1
2
0"
align=
"center"
<EF:EFComboColumn
ename=
"inventCode"
cname=
"存货名称"
enable=
"false"
width=
"1
0
0"
align=
"center"
blockName=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventRecordId"
cname=
"规格"
enable=
"false"
width=
"1
2
0"
align=
"center"
<EF:EFComboColumn
ename=
"inventRecordId"
cname=
"规格"
enable=
"false"
width=
"1
0
0"
align=
"center"
blockName=
"invent_spec_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"projCode"
cname=
"项目名称"
width=
"200"
align=
"center"
required=
"true"
maxLength=
"50"
/>
<EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
width=
"300"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
>
<EF:EFOptions
blockId=
"proj_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"applyAmount"
cname=
"申请数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
required=
"true"
/>
<EF:EFColumn
ename=
"applyRemark"
cname=
"申请说明"
width=
"150"
editType=
"textarea"
copy=
"true"
/>
<EF:EFColumn
ename=
"amount"
cname=
"库存数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
...
...
src/main/webapp/HP/KC/HPKC004B.js
View file @
e168f4a4
...
...
@@ -2,50 +2,7 @@ let projNameGlobalData = [];
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
columns
:
[{
field
:
"projCode"
,
title
:
"项目名称"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
projNameGlobalData
.
length
;
i
++
)
{
if
(
projNameGlobalData
[
i
][
'textField'
]
===
dataItem
[
'projName'
])
{
//dataItem["prdtCode"] = projNameGlobalData[i]['valueField']
resultGrid
.
setCellValue
(
0
,
"projCode"
,
projNameGlobalData
[
i
][
'valueField'
]);
return
projNameGlobalData
[
i
][
'textField'
];
}
}
return
dataItem
[
"projCode"
];
},
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
(
"isSplicingSymbol"
,
false
);
var
dataSource
;
EiCommunicator
.
send
(
"HPSC001"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"proj_record_block_id"
).
getMappedRows
();
projNameGlobalData
=
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"
});
}
}],
columns
:
[],
dataBound
:
function
()
{
}
}
...
...
src/main/webapp/HP/KC/HPKC004B.jsp
View file @
e168f4a4
...
...
@@ -45,7 +45,10 @@
blockName=
"invent_spec_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"projCode"
cname=
"项目名称"
width=
"200"
align=
"center"
required=
"true"
maxLength=
"50"
/>
<EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
width=
"300"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
>
<EF:EFOptions
blockId=
"proj_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"applyAmount"
cname=
"申请数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
required=
"true"
/>
<EF:EFColumn
ename=
"applyRemark"
cname=
"申请说明"
width=
"150"
editType=
"textarea"
copy=
"true"
/>
<EF:EFColumn
ename=
"amount"
cname=
"库存数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
...
...
src/main/webapp/HP/SC/HPSC002.js
View file @
e168f4a4
...
...
@@ -178,14 +178,7 @@ $(function () {
onSave
:
function
(
e
)
{
e
.
preventDefault
();
saveFunc
();
// 不向后台保存
var
tree
=
$
(
"#materialTree"
).
data
(
"kendoTreeView"
);
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPSC002"
,
"queryTreeNode"
,
inInfo
,
{
//传入参数
onSuccess
:
function
(
inInfo
)
{
setTimeout
(
function
(){
tree
.
reload
(
"root"
);},
500
);
//更新树
}
});
},
/**
* 点击Grid删除按钮时触发的事件
...
...
@@ -195,15 +188,7 @@ $(function () {
onDelete
:
function
(
e
)
{
e
.
preventDefault
();
deleteFunc
();
// 不向后台保存
console
.
log
(
"DELETE -> "
,
e
)
var
tree
=
$
(
"#materialTree"
).
data
(
"kendoTreeView"
);
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPSC002"
,
"queryTreeNode"
,
inInfo
,
{
//传入参数
onSuccess
:
function
(
inInfo
)
{
tree
.
reload
(
"root"
);
//更新树
}
});
},
toolbarConfig
:
{
hidden
:
false
,
// true时,不显示功能按钮,但保留setting导出按钮
...
...
@@ -506,6 +491,14 @@ $(window).load(function () {
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
//更新树
var
tree
=
$
(
"#materialTree"
).
data
(
"kendoTreeView"
);
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPSC002"
,
"queryTreeNode"
,
inInfo
,
{
//传入参数
onSuccess
:
function
(
inInfo
)
{
tree
.
reload
(
"root"
);
//更新树
}
});
}
function
openUploadFile
(
id
)
{
uploadFileWindow
.
open
().
center
();
...
...
src/main/webapp/HP/SC/HPSC003.js
View file @
e168f4a4
...
...
@@ -40,6 +40,14 @@ $(function () {
return
template
;
}
}],
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
let
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
saveResult
(
btnNode
);
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'insert'
)
{
...
...
@@ -72,68 +80,12 @@ $(function () {
// delete: true, // 显示删除按钮
},
onSave
:
function
(
e
)
{
var
rowCount
=
detailGrid
.
getCheckedRows
();
// 检验是否选中数据
if
(
rowCount
==
null
||
rowCount
==
""
)
{
NotificationUtil
({
msg
:
'请选择一条或多条数据'
},
"warning"
);
}
let
flag
=
false
;
for
(
let
i
=
0
;
i
<
rowCount
.
length
;
i
++
)
{
let
startT
=
new
Date
(
rowCount
[
i
].
planCommentDate
).
getTime
();
let
endT
=
new
Date
(
rowCount
[
i
].
planCompletionDate
).
getTime
();
if
(
startT
>
endT
)
{
flag
=
true
;
break
}
}
if
(
flag
){
NotificationUtil
({
msg
:
'计划结束时间不能小于计划开始时间'
},
"warning"
);
return
false
;
}
var
btnNode
=
$
(
this
);
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
let
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
IPLAT
.
submitNode
(
$
(
"#HPSC003"
),
"HPSC003"
,
"updatePlanDetail"
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
NotificationUtil
({
msg
:
'修改成功'
});
// 绑定grid
detailGrid
.
setEiInfo
(
ei
);
resultGrid
.
dataSource
.
page
(
resultGrid
.
dataSource
.
_page
);
}
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
},
onFail
:
function
(
ei
)
{
// onFail 表示失败回调函数
// 发生异常
console
.
log
(
ei
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
}
});
},
afterEdit
:
function
(
e
)
{
if
(
e
.
field
===
"planCompletionDate"
)
{
let
startT
=
new
Date
(
e
.
model
.
planCommentDate
).
getTime
();
let
endT
=
new
Date
(
e
.
model
.
planCompletionDate
).
getTime
();
if
(
startT
>
endT
)
{
e
.
preventDefault
();
NotificationUtil
({
msg
:
'计划结束时间不能小于计划开始时间'
},
"warning"
);
}
}
saveDetail
(
btnNode
);
},
columns
:
[{
field
:
"operator"
,
...
...
@@ -282,3 +234,76 @@ function check_time(model,rows){
}
return
true
;
}
/**
* 保存汇总
*/
function
saveResult
(
btn
)
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
planCompletionDate
=
item
.
get
(
"planCompletionDate"
);
if
(
isBlank
(
planCompletionDate
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划结束时间
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPSC003"
,
"update"
,
true
);
//释放禁用按钮
btn
.
attr
(
"disabled"
,
false
);
}
});
}
}
/**
* 保存明细
*/
function
saveDetail
(
btn
)
{
let
rows
=
detailGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
planCommentDate
=
item
.
get
(
"planCommentDate"
);
let
planCompletionDate
=
item
.
get
(
"planCompletionDate"
);
if
(
isBlank
(
planCommentDate
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划开始时间
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
planCompletionDate
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划结束时间
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
let
startT
=
new
Date
(
planCommentDate
).
getTime
();
let
endT
=
new
Date
(
planCompletionDate
).
getTime
();
if
(
startT
>
endT
)
{
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划开始时间
\"
不能大于
\"
计划结束时间
\"
!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"detail"
,
"HPSC003"
,
"updatePlanDetail"
,
true
);
//释放禁用按钮
btn
.
attr
(
"disabled"
,
false
);
}
});
}
}
src/main/webapp/HP/SC/HPSC006.js
View file @
e168f4a4
...
...
@@ -412,7 +412,6 @@ assignCallback = function (row) {
*/
function
saveFunc
()
{
let
rows
=
detailGrid
.
getCheckedRows
();
rows
.
status
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
...
...
src/main/webapp/HP/SC/HPSC006A.js
View file @
e168f4a4
...
...
@@ -15,7 +15,18 @@ $(function () {
+
'onclick="tearDetails(
\'
'
+
id
+
'
\'
)" >查看详情</a>'
;
return
template
}
}]
},{
field
:
"reqNum"
,
template
:
function
(
item
)
{
let
reqNum
=
item
.
reqNum
;
let
projCode
=
item
.
projCode
;
let
template
=
''
;
template
+=
'<a style="cursor: pointer;display: inline-flex" '
+
' onclick="reqDetails(
\'
'
+
projCode
+
'
\'
)" >'
+
reqNum
+
'</a>'
;
return
template
}
}]
}
}
...
...
@@ -38,7 +49,18 @@ $(function () {
function
query
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 领料详情
* @param projCode
*/
function
reqDetails
(
projCode
)
{
JSColorbox
.
open
({
href
:
"HPSC006C?methodName=initLoad&inqu_status-0-projCode="
+
projCode
,
title
:
"<div style='text-align: center;'>领料记录</div>"
,
width
:
"80%"
,
height
:
"90%"
});
}
//厂区组类型下拉联动
$
(
'input[name="inqu_status-0-factoryCode"]'
).
change
(
function
()
{
var
inInfo
=
new
EiInfo
();
...
...
src/main/webapp/HP/SC/HPSC006A.jsp
View file @
e168f4a4
...
...
@@ -34,6 +34,7 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
enable=
"false"
ename=
"reqNum"
cname=
"领料记录"
width=
"80"
align=
"center"
readonly=
"true"
/>
<EF:EFColumn
ename=
"productionOrderNo"
cname=
"生产订单号"
enable=
"false"
width=
"150"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"factoryName"
cname=
"厂区名称"
enable=
"false"
width=
"100"
align=
"center"
/>
...
...
src/main/webapp/HP/SC/HPSC006B.jsp
View file @
e168f4a4
...
...
@@ -6,6 +6,55 @@
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"下料详情"
>
<EF:EFRegion
id=
"inqu"
title=
"任务详情"
>
<EF:EFInput
ename=
"inqu_status-0-prodOrderNo"
cname=
"项目号"
type=
"hidden"
/>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-productionOrderNo"
cname=
"生产订单号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-projCode"
cname=
"项目号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-projName"
cname=
"项目名称"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-prdtName"
cname=
"部件名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-prdtLength"
cname=
"部件长"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-prdtWidth"
cname=
"部件宽"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-prdtThick"
cname=
"部件厚"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-num"
cname=
"部件数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-unitWt"
cname=
"部件重量"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-remark"
cname=
"部件备注"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFSelect
ename=
"result-0-partType"
cname=
"零件类型"
colWidth=
"4"
readonly=
"true"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFSelect>
<EF:EFInput
ename=
"result-0-partName"
cname=
"零件名称"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-partLength"
cname=
"零件长"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-partWidth"
cname=
"零件宽"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-partThick"
cname=
"零件厚"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-remark1"
cname=
"零件备注"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-num"
cname=
"零件数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-unitWt"
cname=
"零件重量"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-assignedNum"
cname=
"派工数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-totalWt"
cname=
"派工重量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-unassignedNum"
cname=
"剩余数量"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-unTotalWt"
cname=
"剩余重量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-completeNum"
cname=
"完成数量"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-actualCompletionTotalWt"
cname=
"完成重量"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFDatePicker
ename=
"result-0-planCompletionDate"
cname=
"计划完成日期"
role=
"date"
format=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFDatePicker
ename=
"result-0-actualCompletionDate"
cname=
"实际完成时间"
role=
"date"
format=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
colWidth=
"4"
readonly=
"true"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"inqu"
title=
"下料详情"
>
<EF:EFInput
ename=
"inqu_status-0-prodOrderNo"
cname=
"项目号"
type=
"hidden"
/>
...
...
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