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
867588d0
Commit
867588d0
authored
Jun 28, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购员、税率修改为下拉框修改
parent
a8956c16
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
13 deletions
+111
-13
ServiceHGCG002.java
.../java/com/baosight/hggp/hg/cg/service/ServiceHGCG002.java
+3
-1
ServiceHGCG002A.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG002A.java
+12
-8
HGCG002.js
src/main/webapp/HG/CG/HGCG002.js
+43
-1
HGCG002.jsp
src/main/webapp/HG/CG/HGCG002.jsp
+3
-1
HGCG002A.js
src/main/webapp/HG/CG/HGCG002A.js
+49
-1
HGCG002A.jsp
src/main/webapp/HG/CG/HGCG002A.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG002.java
View file @
867588d0
...
@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.cg.tools.HGCGTools;
...
@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.cg.tools.HGCGTools;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.DateUtils
;
...
@@ -46,8 +47,9 @@ public class ServiceHGCG002 extends ServiceBase {
...
@@ -46,8 +47,9 @@ public class ServiceHGCG002 extends ServiceBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SUP_RECORD_BLOCK_ID
));
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
.
INVENT_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
EiInfoUtils
.
addBlock
(
inInfo
,
"userByCompany"
,
UserSessionUtils
.
getUserByCompany
(
UserSessionUtils
.
getAccountCode
()),
User
.
class
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCG002
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCG002
().
eiMetadata
);
}
catch
(
Plat
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
return
inInfo
;
return
inInfo
;
...
...
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG002A.java
View file @
867588d0
...
@@ -4,11 +4,14 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
...
@@ -4,11 +4,14 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cg.domain.HGCG001
;
import
com.baosight.hggp.hg.cg.domain.HGCG001
;
import
com.baosight.hggp.hg.cg.domain.HGCG002
;
import
com.baosight.hggp.hg.cg.domain.HGCG002
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.BeanUtils
;
import
com.baosight.hggp.util.BeanUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.CommonMethod
;
...
@@ -32,7 +35,7 @@ import java.util.Map;
...
@@ -32,7 +35,7 @@ import java.util.Map;
* @date:2024/5/9,11:04
* @date:2024/5/9,11:04
*/
*/
public
class
ServiceHGCG002A
extends
ServiceBase
{
public
class
ServiceHGCG002A
extends
ServiceBase
{
/**
/**
* 画面初始化
* 画面初始化
*
*
...
@@ -47,13 +50,14 @@ public class ServiceHGCG002A extends ServiceBase {
...
@@ -47,13 +50,14 @@ public class ServiceHGCG002A extends ServiceBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SUP_RECORD_BLOCK_ID
));
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
.
INVENT_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
EiInfoUtils
.
addBlock
(
inInfo
,
"userByCompany"
,
UserSessionUtils
.
getUserByCompany
(
UserSessionUtils
.
getAccountCode
()),
User
.
class
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCG001
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCG001
().
eiMetadata
);
}
catch
(
Plat
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 查询操作
* 查询操作
*
*
...
@@ -74,7 +78,7 @@ public class ServiceHGCG002A extends ServiceBase {
...
@@ -74,7 +78,7 @@ public class ServiceHGCG002A extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 确认操作.
* 确认操作.
*
*
...
@@ -100,7 +104,7 @@ public class ServiceHGCG002A extends ServiceBase {
...
@@ -100,7 +104,7 @@ public class ServiceHGCG002A extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 数据校验
* 数据校验
*
*
...
@@ -116,7 +120,7 @@ public class ServiceHGCG002A extends ServiceBase {
...
@@ -116,7 +120,7 @@ public class ServiceHGCG002A extends ServiceBase {
String
.
format
(
"计划[%s]状态不是\"审核通过\",不允许操作"
,
planNo
));
String
.
format
(
"计划[%s]状态不是\"审核通过\",不允许操作"
,
planNo
));
}
}
}
}
/**
/**
* 数据保存
* 数据保存
*
*
...
@@ -139,8 +143,8 @@ public class ServiceHGCG002A extends ServiceBase {
...
@@ -139,8 +143,8 @@ public class ServiceHGCG002A extends ServiceBase {
HGCGTools
.
HgCg001
.
updateStatus
(
planNo
,
HGConstant
.
CgPlanStatus
.
S_4
);
HGCGTools
.
HgCg001
.
updateStatus
(
planNo
,
HGConstant
.
CgPlanStatus
.
S_4
);
}
}
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
...
src/main/webapp/HG/CG/HGCG002.js
View file @
867588d0
$
(
function
()
{
$
(
function
()
{
var
userByCompany
=
__eiInfo
.
getBlock
(
"userByCompany"
).
getMappedRows
();
IPLATUI
.
EFGrid
=
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
"result"
:
{
...
@@ -7,7 +8,48 @@ $(function () {
...
@@ -7,7 +8,48 @@ $(function () {
pageSize
:
20
,
pageSize
:
20
,
pageSizes
:
[
20
,
50
,
70
,
100
],
pageSizes
:
[
20
,
50
,
70
,
100
],
},
},
columns
:
[],
columns
:
[
{
field
:
"purUserName"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
userByCompany
.
length
;
i
++
)
{
let
purUserName
=
dataItem
[
'purUserName'
];
if
(
purUserName
){
if
(
userByCompany
[
i
][
'userName'
]
===
purUserName
.
userName
)
{
return
userByCompany
[
i
][
'userName'
];
}
}
}
return
dataItem
[
"purUserName"
];
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
inInfo
.
set
(
"field"
,
options
.
field
);
EiCommunicator
.
send
(
"HGSC001"
,
"userByCompanyComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
userByCompany
=
ei
.
getBlock
(
"userByCompany"
).
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
:
userByCompany
,
minLength
:
0
,
dataTextField
:
"userName"
,
dataValueField
:
"userName"
,
optionLabelTemplate
:
"[#:loginName#]#:userName#-#:depName#"
,
valueTemplate
:
"[#:loginName#]#:userName#-#:depName#"
,
template
:
"[#:loginName#]#:userName#-#:depName#"
,
filter
:
"contains"
});
}
}
],
beforeEdit
:
function
(
e
)
{
beforeEdit
:
function
(
e
)
{
let
item
=
e
.
model
;
let
item
=
e
.
model
;
if
(
item
.
status
!=
'0'
){
if
(
item
.
status
!=
'0'
){
...
...
src/main/webapp/HG/CG/HGCG002.jsp
View file @
867588d0
...
@@ -69,7 +69,9 @@
...
@@ -69,7 +69,9 @@
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"receiveQty"
cname=
"已收货数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"receiveQty"
cname=
"已收货数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"taxRate"
cname=
"税率(%)"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFComboColumn
ename=
"taxRate"
cname=
"税率(%)"
enable=
"true"
width=
"80"
align=
"center"
required=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cw.taxPoints"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"amount"
cname=
"不含税金额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"amount"
cname=
"不含税金额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"taxAmount"
cname=
"税额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"taxAmount"
cname=
"税额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"taxIncludeAmount"
cname=
"含税金额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"taxIncludeAmount"
cname=
"含税金额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
...
...
src/main/webapp/HG/CG/HGCG002A.js
View file @
867588d0
$
(
function
()
{
$
(
function
()
{
var
userByCompany
=
__eiInfo
.
getBlock
(
"userByCompany"
).
getMappedRows
();
IPLATUI
.
EFGrid
=
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
"result"
:
{
columns
:
[],
pageable
:
false
,
columns
:
[
{
field
:
"purUserName"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
userByCompany
.
length
;
i
++
)
{
let
purUserName
=
dataItem
[
'purUserName'
];
if
(
purUserName
){
if
(
userByCompany
[
i
][
'userName'
]
===
purUserName
.
userName
)
{
return
userByCompany
[
i
][
'userName'
];
}
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
inInfo
.
set
(
"field"
,
options
.
field
);
EiCommunicator
.
send
(
"HGSC001"
,
"userByCompanyComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
userByCompany
=
ei
.
getBlock
(
"userByCompany"
).
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
:
userByCompany
,
minLength
:
0
,
dataTextField
:
"userName"
,
dataValueField
:
"userName"
,
optionLabelTemplate
:
"[#:loginName#]#:userName#-#:depName#"
,
valueTemplate
:
"[#:loginName#]#:userName#-#:depName#"
,
template
:
"[#:loginName#]#:userName#-#:depName#"
,
filter
:
"contains"
});
}
}
],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
supCodeChange
(
e
);
supCodeChange
(
e
);
...
@@ -19,8 +62,11 @@ $(function () {
...
@@ -19,8 +62,11 @@ $(function () {
$
(
"#CONFIRM"
).
on
(
"click"
,
confirm
);
$
(
"#CONFIRM"
).
on
(
"click"
,
confirm
);
downKeyUp
();
downKeyUp
();
});
});
/**
/**
* 页面加载时执行
* 页面加载时执行
*/
*/
...
@@ -54,6 +100,8 @@ let confirm = function () {
...
@@ -54,6 +100,8 @@ let confirm = function () {
message
(
"勾选的第"
+
(
i
+
1
)
+
"行采购员不能为空"
);
message
(
"勾选的第"
+
(
i
+
1
)
+
"行采购员不能为空"
);
return
;
return
;
}
}
let
purUserName
=
rows
[
i
][
'purUserName'
];
rows
[
i
][
'purUserName'
]
=
purUserName
.
userName
;
}
}
JSUtils
.
confirm
(
"确定对勾选的["
+
rows
.
length
+
"]条数据生成
\"
采购合同
\"
吗? "
,
{
JSUtils
.
confirm
(
"确定对勾选的["
+
rows
.
length
+
"]条数据生成
\"
采购合同
\"
吗? "
,
{
ok
:
function
()
{
ok
:
function
()
{
...
...
src/main/webapp/HG/CG/HGCG002A.jsp
View file @
867588d0
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<EF:EFOptions
blockId=
"sup_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
<EF:EFOptions
blockId=
"sup_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"supName"
cname=
"供应商名称"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"supName"
cname=
"供应商名称"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"purUserName"
cname=
"采购员"
width=
"1
0
0"
align=
"center"
maxLength=
"100"
required=
"true"
/>
<EF:EFColumn
ename=
"purUserName"
cname=
"采购员"
width=
"1
2
0"
align=
"center"
maxLength=
"100"
required=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"sepcId"
cname=
"规格ID"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"sepcId"
cname=
"规格ID"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"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