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
8e54e4e8
Commit
8e54e4e8
authored
Aug 14, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug清单处理
parent
a81576ce
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
185 additions
and
18 deletions
+185
-18
ServiceHGCG003.java
.../java/com/baosight/hggp/hg/cg/service/ServiceHGCG003.java
+9
-0
HGCG003.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003.xml
+2
-0
ServiceHGSC009A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
+3
-2
HGCG001.js
src/main/webapp/HG/CG/HGCG001.js
+5
-1
HGCG001A.js
src/main/webapp/HG/CG/HGCG001A.js
+16
-2
HGCG002.js
src/main/webapp/HG/CG/HGCG002.js
+6
-0
HGCG002B.js
src/main/webapp/HG/CG/HGCG002B.js
+18
-2
HGCG003.js
src/main/webapp/HG/CG/HGCG003.js
+79
-1
HGCG003.jsp
src/main/webapp/HG/CG/HGCG003.jsp
+2
-2
HGCG003B.js
src/main/webapp/HG/CG/HGCG003B.js
+18
-3
HGSC009A.js
src/main/webapp/HG/SC/HGSC009A.js
+27
-5
No files found.
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG003.java
View file @
8e54e4e8
...
...
@@ -11,9 +11,11 @@ import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC009
;
import
com.baosight.hggp.hg.sj.domain.HGSJ002
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.*
;
...
...
@@ -50,6 +52,13 @@ public class ServiceHGCG003 extends ServiceBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SUP_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
Map
qarma
=
new
HashMap
();
Map
userCompany
=
HGSBTools
.
getUserCompany
();
qarma
.
put
(
HGSC009
.
FIELD_COMPANY_CODE
,
userCompany
.
get
(
HGSC009
.
FIELD_COMPANY_CODE
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BY_ROLE_BLOCK_ID
),
qarma
);
qarma
.
clear
();
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
EiInfoUtils
.
addBlock
(
inInfo
,
"userByCompany"
,
HGXSTools
.
XsUser
.
listAll
(
UserSessionUtils
.
getAccountCode
()),
User
.
class
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCG003
().
eiMetadata
);
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003.xml
View file @
8e54e4e8
...
...
@@ -271,6 +271,8 @@
RECEIVE_WEIGHT = #receiveWeight#,
<!-- 收货重量 -->
AMOUNT = #amount#,
<!-- 金额 -->
RECEIVE_DATE = REPLACE(#receiveDate#, '-', ''),
<!-- 收货日期 -->
PROJ_CODE = #projCode#,
<!-- 项目编号 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
<include
refid=
"updateRevise"
/>
WHERE
ID = #id#
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
View file @
8e54e4e8
...
...
@@ -127,8 +127,9 @@ public class ServiceHGSC009A extends ServiceBase {
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGSC009A
hgsc009A
=
new
HGSC009A
();
hgsc009A
.
fromMap
(
resultRows
.
get
(
i
));
AssertUtils
.
isTrue
(
hgsc009A
.
getGrossAmount
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"重量不能小于等于0"
);
AssertUtils
.
isTrue
(
hgsc009A
.
getQuantity
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"数量不能小于等于0"
);
AssertUtils
.
isTrue
(
hgsc009A
.
getGrossAmount
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
&&
hgsc009A
.
getQuantity
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"数量、重量必须有一项大于0"
);
// AssertUtils.isTrue(hgsc009A.getQuantity().compareTo(BigDecimal.ZERO) <= 0, "数量不能小于等于0");
}
}
...
...
src/main/webapp/HG/CG/HGCG001.js
View file @
8e54e4e8
...
...
@@ -147,7 +147,10 @@ let submit = function () {
}
});
}
function
windowCallback
()
{
query
();
JSColorbox
.
close
();
}
/**
* 显示详情
...
...
@@ -158,6 +161,7 @@ function showDetail(id,status) {
title
:
"<div style='text-align: center;'>详情</div>"
,
width
:
"80%"
,
height
:
"80%"
,
callbackName
:
windowCallback
});
}
...
...
src/main/webapp/HG/CG/HGCG001A.js
View file @
8e54e4e8
...
...
@@ -105,7 +105,14 @@ let save = function () {
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGCG001A"
,
"save"
,
true
);
JSUtils
.
submitGridsData
(
"result"
,
"HGCG001A"
,
"save"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
...
...
@@ -126,7 +133,14 @@ let remove = function () {
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGCG001A"
,
"remove"
,
true
);
JSUtils
.
submitGridsData
(
"result"
,
"HGCG001A"
,
"remove"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
...
...
src/main/webapp/HG/CG/HGCG002.js
View file @
8e54e4e8
...
...
@@ -298,5 +298,11 @@ function showDetail(id,status) {
title
:
"<div style='text-align: center;'>详情</div>"
,
width
:
"80%"
,
height
:
"80%"
,
callbackName
:
windowCallback
});
}
function
windowCallback
()
{
query
();
JSColorbox
.
close
();
}
src/main/webapp/HG/CG/HGCG002B.js
View file @
8e54e4e8
...
...
@@ -191,7 +191,14 @@ let save = function () {
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGCG002B"
,
"save"
,
true
);
JSUtils
.
submitGridsData
(
"result"
,
save
,
"remove"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
...
...
@@ -207,8 +214,17 @@ let remove = function () {
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGCG002B"
,
"remove"
,
true
);
JSUtils
.
submitGridsData
(
"result"
,
"HGCG002B"
,
"remove"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
src/main/webapp/HG/CG/HGCG003.js
View file @
8e54e4e8
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"roleCompany"
).
getMappedRows
();
var
userByCompany
=
__eiInfo
.
getBlock
(
"userByCompany"
).
getMappedRows
();
var
projCodeBox
=
__eiInfo
.
getBlock
(
"projRecordByRole_block_id"
).
getMappedRows
();
IPLATUI
.
EFGrid
=
{
"result"
:
{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
...
...
@@ -76,13 +77,53 @@ $(function () {
filter
:
"contains"
});
}
},
{
field
:
"projCode"
,
title
:
"项目编码"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
projCodeBox
.
length
;
i
++
)
{
if
(
projCodeBox
[
i
][
'valueField'
]
===
dataItem
[
'projCode'
])
{
dataItem
[
'projName'
]
=
projCodeBox
[
i
][
'textField'
]
return
projCodeBox
[
i
][
'valueField'
];
}
}
return
dataItem
[
"projCode"
];
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
inInfo
.
set
(
"inqu_status-0-approvalStatus"
,
2
);
inInfo
.
set
(
"field"
,
options
.
field
);
let
dataSource
;
EiCommunicator
.
send
(
"HGSC003"
,
"projComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"projRecordByRole_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
dataSource
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#"
,
filter
:
"contains"
});
}
}
],
beforeEdit
:
function
(
e
)
{
let
item
=
e
.
model
;
//只有合同生成的不能编辑
if
(
item
.
source
===
'0'
){
//选择收货的指定列
可以
修改
//选择收货的指定列
不让
修改
for
(
let
i
=
0
;
i
<
e
.
sender
.
columns
.
length
;
i
++
)
{
//指定的列不让修改
if
(
e
.
sender
.
columns
[
i
][
"name"
]
===
"companyCode"
)
{
...
...
@@ -97,6 +138,31 @@ $(function () {
e
.
sender
.
columns
[
i
][
"enable"
]
=
false
;
e
.
sender
.
columns
[
i
][
"readonly"
]
=
true
;
}
if
(
e
.
sender
.
columns
[
i
][
"name"
]
===
"projCode"
)
{
e
.
sender
.
columns
[
i
][
"enable"
]
=
false
;
e
.
sender
.
columns
[
i
][
"readonly"
]
=
true
;
}
}
}
else
{
//手动添加的需要修改
for
(
let
i
=
0
;
i
<
e
.
sender
.
columns
.
length
;
i
++
)
{
//指定的列不让修改
if
(
e
.
sender
.
columns
[
i
][
"name"
]
===
"companyCode"
)
{
e
.
sender
.
columns
[
i
][
"enable"
]
=
true
;
e
.
sender
.
columns
[
i
][
"readonly"
]
=
false
;
}
if
(
e
.
sender
.
columns
[
i
][
"name"
]
===
"supCode"
)
{
e
.
sender
.
columns
[
i
][
"enable"
]
=
true
;
e
.
sender
.
columns
[
i
][
"readonly"
]
=
false
;
}
if
(
e
.
sender
.
columns
[
i
][
"name"
]
===
"purUserName"
)
{
e
.
sender
.
columns
[
i
][
"enable"
]
=
true
;
e
.
sender
.
columns
[
i
][
"readonly"
]
=
false
;
}
if
(
e
.
sender
.
columns
[
i
][
"name"
]
===
"projCode"
)
{
e
.
sender
.
columns
[
i
][
"enable"
]
=
true
;
e
.
sender
.
columns
[
i
][
"readonly"
]
=
false
;
}
}
}
},
...
...
@@ -113,6 +179,13 @@ $(function () {
}
}
}
if
(
e
.
field
==
"projCode"
)
{
for
(
let
i
=
0
;
i
<
projCodeBox
.
length
;
i
++
)
{
if
(
projCodeBox
[
i
][
'valueField'
]
===
e
.
items
[
0
][
'projCode'
])
{
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"projName"
,
projCodeBox
[
i
][
'textField'
]);
}
}
}
});
},
onSave
:
function
(
e
)
{
...
...
@@ -294,8 +367,13 @@ function showDetail(id,status,source) {
title
:
"<div style='text-align: center;'>详情</div>"
,
width
:
"80%"
,
height
:
"80%"
,
callbackName
:
windowCallback
});
}
function
windowCallback
()
{
query
();
JSColorbox
.
close
();
}
function
updateStatus
(
id
,
status
)
{
let
inEiInfo
=
new
EiInfo
();
...
...
src/main/webapp/HG/CG/HGCG003.jsp
View file @
8e54e4e8
...
...
@@ -55,8 +55,8 @@
<EF:EFOptions
blockId=
"roleCompany"
textField=
"companyName"
valueField=
"companyCode"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"
false"
width=
"100"
align=
"center"
hidden=
"true
"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"130"
align=
"center
"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"
true"
width=
"120"
align=
"center
"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"120"
align=
"center"
enable=
"false
"
/>
<EF:EFColumn
ename=
"receiveDate"
cname=
"收货日期"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
<EF:EFColumn
ename=
"receiveNo"
cname=
"收货单号"
enable=
"false"
width=
"120"
align=
"center"
/>
...
...
src/main/webapp/HG/CG/HGCG003B.js
View file @
8e54e4e8
...
...
@@ -45,7 +45,7 @@ $(function () {
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#
|#:param4Field#
"
,
filter
:
"contains"
});
}
...
...
@@ -104,6 +104,7 @@ $(function () {
if
(
inventRecordBoxBlockId
[
i
][
'valueField'
]
===
e
.
items
[
0
].
inventCode
)
{
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'inventName'
,
inventRecordBoxBlockId
[
i
][
'textField'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'inventTypeDetail'
,
inventRecordBoxBlockId
[
i
][
'param1Field'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'inventType'
,
inventRecordBoxBlockId
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'spec'
,
inventRecordBoxBlockId
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'material'
,
inventRecordBoxBlockId
[
i
][
'param5Field'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'unit'
,
inventRecordBoxBlockId
[
i
][
'param6Field'
])
...
...
@@ -212,7 +213,14 @@ let save = function () {
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGCG003B"
,
"save"
,
true
);
JSUtils
.
submitGridsData
(
"result"
,
"HGCG003B"
,
"save"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
...
...
@@ -228,7 +236,14 @@ let remove = function () {
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGCG003B"
,
"remove"
,
true
);
JSUtils
.
submitGridsData
(
"result"
,
"HGCG003B"
,
"remove"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
...
...
src/main/webapp/HG/SC/HGSC009A.js
View file @
8e54e4e8
...
...
@@ -188,9 +188,12 @@ let save = function () {
return
;
}
let
flag
=
true
;
let
quantityMsg
=
""
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
inventCode
=
item
.
get
(
"inventCode"
);
let
spec
=
item
.
get
(
"spec"
);
let
quantity
=
item
.
get
(
"quantity"
);
let
grossAmount
=
item
.
get
(
"grossAmount"
);
if
(
isBlank
(
inventCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
存货编号
\"
,不能为空!"
);
flag
=
false
;
...
...
@@ -201,13 +204,32 @@ let save = function () {
flag
=
false
;
return
false
;
}
if
((
isBlank
(
quantity
)
||
parseInt
(
quantity
)
<=
0
)
&&
(
isBlank
(
grossAmount
)
||
parseInt
(
grossAmount
)
<=
0
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
数量、重量
\"
,必须有一项大于0!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
quantity
)
||
parseInt
(
quantity
)
<=
0
){
quantityMsg
=
"选中的第"
+
(
index
+
1
)
+
"行
\"
数量
\"
,小于等于0!
\
n"
;
}
if
(
isBlank
(
grossAmount
)
||
parseInt
(
grossAmount
)
<=
0
){
quantityMsg
=
"选中的第"
+
(
index
+
1
)
+
"行
\"
重量
\"
,小于等于0!
\
n"
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSC009A"
,
"save"
,
true
);
}
});
if
(
!
isBlank
(
quantityMsg
)){
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? 其中:"
+
quantityMsg
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSC009A"
,
"save"
,
true
);
}
});
}
else
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作?"
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSC009A"
,
"save"
,
true
);
}
});
}
}
}
...
...
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