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
a666c2d2
Commit
a666c2d2
authored
May 08, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-08 优化工序单价导入提示显示
parent
c73ae9be
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
10 deletions
+89
-10
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+1
-1
ServiceHGSJ002A.java
...java/com/baosight/hggp/hg/sj/service/ServiceHGSJ002A.java
+2
-1
ServiceHGSJ003.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
+3
-1
HGSJ001.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
+4
-2
ExcelUtils.java
src/main/java/com/baosight/hggp/util/ExcelUtils.java
+1
-1
HGSJ003.js
src/main/webapp/HG/SJ/HGSJ003.js
+78
-4
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
a666c2d2
...
@@ -83,7 +83,7 @@ public enum DdynamicEnum {
...
@@ -83,7 +83,7 @@ public enum DdynamicEnum {
* 用途:工序编码下拉框
* 用途:工序编码下拉框
* 编写:ly
* 编写:ly
*/
*/
PROCESS_CODE_BLOCK_ID
(
"processCode_block_id"
,
"processCode"
,
"processName"
,
"HGSJ001.queryProcessCode"
)
PROCESS_CODE_BLOCK_ID
(
"processCode_block_id"
,
"processCode"
,
"processName"
,
"
factoryCode"
,
"factoryName"
,
"
HGSJ001.queryProcessCode"
)
;
;
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ002A.java
View file @
a666c2d2
...
@@ -33,12 +33,13 @@ public class ServiceHGSJ002A extends ServiceEPBase {
...
@@ -33,12 +33,13 @@ public class ServiceHGSJ002A extends ServiceEPBase {
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSJ002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSJ002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_PARENT_ID,inInfo.get("inqu_status-0-parendId"));
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_PARENT_ID,inInfo.get("inqu_status-0-parendId"));
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_FLOW_CODE,inInfo.get("inqu_status-0-flowCode"));
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_FLOW_CODE,inInfo.get("inqu_status-0-flowCode"));
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_FLOW_NAME,inInfo.get("inqu_status-0-flowName")
);
String
factoryCode
=
inInfo
.
getCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGSJ002A
.
FIELD_FACTORY_CODE
).
toString
(
);
inInfo
=
super
.
query
(
inInfo
,
HGSJ002A
.
QUERY
,
new
HGSJ002A
());
inInfo
=
super
.
query
(
inInfo
,
HGSJ002A
.
QUERY
,
new
HGSJ002A
());
CommonMethod
.
initBlock
(
inInfo
,
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
,
DdynamicEnum
.
PROCESS_CODE_BLOCK_ID
),
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
,
DdynamicEnum
.
PROCESS_CODE_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
new
HashMap
<
String
,
Object
>(){{
put
(
"orgType"
,
OrgTypeEnum
.
COMPANY
.
getCode
());
put
(
"orgType"
,
OrgTypeEnum
.
COMPANY
.
getCode
());
put
(
HGSJ002A
.
FIELD_FACTORY_CODE
,
factoryCode
);
put
(
HGSJ002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);}}
put
(
HGSJ002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);}}
);
);
return
inInfo
;
return
inInfo
;
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
View file @
a666c2d2
...
@@ -158,9 +158,11 @@ public class ServiceHGSJ003 extends ServiceEPBase {
...
@@ -158,9 +158,11 @@ public class ServiceHGSJ003 extends ServiceEPBase {
// 重复校验
// 重复校验
String
msg
;
String
msg
;
Map
queryParam
=
new
HashMap
();
Map
queryParam
=
new
HashMap
();
queryParam
.
put
(
HGSJ003
.
FIELD_ACCOUNT_CODE
,
hgsj003
.
getAccountCode
());
//queryParam.put(HGSJ003.FIELD_ACCOUNT_CODE,hgsj003.getAccountCode());
queryParam
.
put
(
HGSJ003
.
FIELD_FACTORY_CODE
,
hgsj003
.
getFactoryCode
());
queryParam
.
put
(
HGSJ003
.
FIELD_PROCESS_CODE
,
hgsj003
.
getProcessCode
());
queryParam
.
put
(
HGSJ003
.
FIELD_PROCESS_CODE
,
hgsj003
.
getProcessCode
());
queryParam
.
put
(
HGSJ003
.
FIELD_PROCESS_CLASS
,
hgsj003
.
getProcessClass
());
queryParam
.
put
(
HGSJ003
.
FIELD_PROCESS_CLASS
,
hgsj003
.
getProcessClass
());
queryParam
.
put
(
HGSJ003
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
if
(
StringUtils
.
isBlank
(
hgsj003
.
getSpec
()))
{
if
(
StringUtils
.
isBlank
(
hgsj003
.
getSpec
()))
{
queryParam
.
put
(
"notSpec"
,
CommonConstant
.
YesNo
.
YES
);
queryParam
.
put
(
"notSpec"
,
CommonConstant
.
YesNo
.
YES
);
msg
=
String
.
format
(
"工序编码[%s]已存在无规格,请勿重复添加!"
,
hgsj003
.
getProcessCode
());
msg
=
String
.
format
(
"工序编码[%s]已存在无规格,请勿重复添加!"
,
hgsj003
.
getProcessCode
());
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
View file @
a666c2d2
...
@@ -281,10 +281,12 @@
...
@@ -281,10 +281,12 @@
<select
id=
"queryProcessCode"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryProcessCode"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
SELECT
PROCESS_CODE as "processCode",
<!-- 工序编码 -->
PROCESS_CODE as "processCode",
<!-- 工序编码 -->
PROCESS_NAME as "processName"
<!-- 工序名称 -->
CONCAT('[',FACTORY_NAME,']',PROCESS_NAME) as "processName",
<!-- 工序名称 -->
FACTORY_CODE as "factoryCode",
<!-- 厂区编码 -->
FACTORY_NAME as "factoryName"
<!-- 厂区名称 -->
FROM ${hggpSchema}.HGGY001 WHERE 1=1
FROM ${hggpSchema}.HGGY001 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
group by PROCESS_CODE,PROCESS_NAME
group by PROCESS_CODE,PROCESS_NAME
,FACTORY_CODE,FACTORY_NAME
</select>
</select>
...
...
src/main/java/com/baosight/hggp/util/ExcelUtils.java
View file @
a666c2d2
...
@@ -499,7 +499,7 @@ public class ExcelUtils {
...
@@ -499,7 +499,7 @@ public class ExcelUtils {
msg
=
String
.
format
(
"工序编码[%s]已存在无规格,请勿重复添加!"
,
hgsj003
.
getProcessCode
());
msg
=
String
.
format
(
"工序编码[%s]已存在无规格,请勿重复添加!"
,
hgsj003
.
getProcessCode
());
}
else
{
}
else
{
queryParam
.
put
(
"spec"
,
hgsj003
.
getSpec
());
queryParam
.
put
(
"spec"
,
hgsj003
.
getSpec
());
msg
=
String
.
format
(
"
工厂[%s]工序编码[%s]已存在规格[%s],请勿重复添加!"
,
hgsj003
.
getFactoryCode
(),
hgsj003
.
getProcessCod
e
(),
hgsj003
.
getSpec
());
msg
=
String
.
format
(
"
公司[%s]工序名称[%s]已存在规格[%s],请勿重复添加!"
,
hgsj003
.
getFactoryName
(),
hgsj003
.
getProcessNam
e
(),
hgsj003
.
getSpec
());
}
}
List
<
HGSJ003
>
hgsj003List
=
dao
.
query
(
HGSJ003
.
QUERY
,
queryParam
);
List
<
HGSJ003
>
hgsj003List
=
dao
.
query
(
HGSJ003
.
QUERY
,
queryParam
);
AssertUtils
.
isNotEmpty
(
hgsj003List
,
msg
);
AssertUtils
.
isNotEmpty
(
hgsj003List
,
msg
);
...
...
src/main/webapp/HG/SJ/HGSJ003.js
View file @
a666c2d2
...
@@ -51,6 +51,18 @@ $(function (){
...
@@ -51,6 +51,18 @@ $(function (){
},
},
},
{
},
{
field
:
"processCode"
,
field
:
"processCode"
,
filter
:
function
(
options
)
{
var
factoryCode
=
options
.
model
[
'factoryCode'
];
if
(
factoryCode
)
{
// 返回我们过滤后的数据集
/*return options.values[0][province];*/
return
_
.
filter
(
processCodes
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
factoryCode
;
})
}
else
{
return
processCodes
;
}
},
template
:
function
(
dataItem
)
{
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
processCodes
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
processCodes
.
length
;
i
++
)
{
if
(
processCodes
[
i
][
'valueField'
]
===
dataItem
[
'processCode'
])
{
if
(
processCodes
[
i
][
'valueField'
]
===
dataItem
[
'processCode'
])
{
...
@@ -88,8 +100,28 @@ $(function (){
...
@@ -88,8 +100,28 @@ $(function (){
}
}
],
],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
// 判断父级节点是否发生变化
if
(
e
.
field
==
"factoryCode"
)
{
loadChange
(
grid
,
e
,
"processCode"
);
}
else
if
(
e
.
field
==
"processCode"
)
{
if
(
e
.
items
[
0
].
factoryCode
.
length
===
0
){
loadChange
(
grid
,
e
,
"factoryCode"
);
}
}
});
},
},
afterEdit
:
function
(
e
)
{
afterEdit
:
function
(
e
)
{
if
(
e
.
field
===
"processCode"
&&
e
.
model
[
"factoryCode"
].
length
===
0
){
for
(
let
i
=
0
;
i
<
processCodes
.
length
;
i
++
)
{
if
(
e
.
model
[
e
.
field
]
===
processCodes
[
i
][
"valueField"
]){
e
.
model
[
"factoryCode"
]
=
processCodes
[
i
][
"param1Field"
]
break
;
}
}
}
},
},
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
// 阻止默认请求,使用自定义保存
...
@@ -166,6 +198,7 @@ $(function (){
...
@@ -166,6 +198,7 @@ $(function (){
{
msg
:
ei
.
msg
,
detailMsg
:
ei
.
detailMsg
},
"error"
);
{
msg
:
ei
.
msg
,
detailMsg
:
ei
.
detailMsg
},
"error"
);
}
else
{
}
else
{
NotificationUtil
(
ei
.
msg
);
NotificationUtil
(
ei
.
msg
);
query
();
}
}
},
},
onFail
(
ei
)
{
onFail
(
ei
)
{
...
@@ -183,6 +216,26 @@ $(function (){
...
@@ -183,6 +216,26 @@ $(function (){
}
}
}
}
//工厂类型下拉联动
$
(
'input[name="inqu_status-0-factoryCode"]'
).
change
(
function
()
{
let
dataEdition
=
processCodes
;
var
factoryCode
=
$
(
"#inqu_status-0-factoryCode"
).
val
();
if
(
factoryCode
){
dataEdition
=
_
.
filter
(
processCodes
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
factoryCode
;
})
}
var
input
=
$
(
"#inqu_status-0-processCode"
);
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabel
:
"请选择"
,
dataSource
:
dataEdition
,
template
:
"#=textField#"
});
});
//grush.downloadFile(`${ctx}\\DC\\BB\\template\\DCAMIN02_附加费用管理.xls`);
//grush.downloadFile(`${ctx}\\DC\\BB\\template\\DCAMIN02_附加费用管理.xls`);
})
})
...
@@ -217,11 +270,9 @@ let save = function (btnNode) {
...
@@ -217,11 +270,9 @@ let save = function (btnNode) {
if
(
flag
)
{
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSJ003"
,
"save"
,
true
,
JSUtils
.
submitGridsData
(
"result"
,
"HGSJ003"
,
"save"
,
true
);
function
(
e
)
{
query
();
});
btnNode
.
attr
(
"disabled"
,
false
);
btnNode
.
attr
(
"disabled"
,
false
);
}
}
});
});
}
}
...
@@ -244,3 +295,25 @@ function updateStatus(id,status) {
...
@@ -244,3 +295,25 @@ function updateStatus(id,status) {
}
}
);
);
}
}
function
loadChange
(
grid
,
e
,
field
)
{
var
cell_label
=
field
,
that
=
grid
;
// locked 表示是否为固定列
var
locked
=
that
.
isCellLocked
(
cell_label
);
// tr 表示 locked 和非 locked 的行,index 表示此行的第几列
var
tr
,
index
;
// 获取此 model 元素信息
var
item
=
e
.
items
[
0
];
var
_uid
=
item
.
uid
;
if
(
locked
)
{
tr
=
$
(
".k-grid-content-locked tr[data-uid="
+
_uid
+
"]"
);
index
=
$
(
"th[data-field='"
+
cell_label
+
"']"
).
data
(
"index"
);
}
else
{
tr
=
$
(
".k-grid-content tr[data-uid="
+
_uid
+
"]"
);
index
=
parseInt
(
$
(
"th[data-field='"
+
cell_label
+
"']"
).
data
(
"index"
))
-
that
.
lockedHeader
.
find
(
"th"
).
length
;
}
// 获取子 cell(td)
var
td
=
tr
.
children
(
"td:eq("
+
index
+
")"
);
// 触发 td.click 事件,
td
.
trigger
(
"click"
);
}
\ No newline at end of file
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