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
5f6cc8b7
Commit
5f6cc8b7
authored
May 16, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.入库质量异议单
parent
c24c5700
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
349 additions
and
534 deletions
+349
-534
HGZL001.java
src/main/java/com/baosight/hggp/hg/zl/domain/HGZL001.java
+34
-35
ServiceHGZL001.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL001.java
+5
-14
HGZL001.xml
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL001.xml
+89
-188
HGZLUtils.java
src/main/java/com/baosight/hggp/hg/zl/utils/HGZLUtils.java
+40
-0
HGZL001.js
src/main/webapp/HG/ZL/HGZL001.js
+163
-0
HGZL001.jsp
src/main/webapp/HG/ZL/HGZL001.jsp
+18
-12
HGZL001A.js
src/main/webapp/HG/ZL/HGZL001A.js
+0
-0
HGZL001A.jsp
src/main/webapp/HG/ZL/HGZL001A.jsp
+0
-0
HGZL001B.js
src/main/webapp/HG/ZL/HGZL001B.js
+0
-0
HGZL001B.jsp
src/main/webapp/HG/ZL/HGZL001B.jsp
+0
-0
HPZL001.js
src/main/webapp/HG/ZL/HPZL001.js
+0
-285
No files found.
src/main/java/com/baosight/hggp/hg/zl/domain/HGZL001.java
View file @
5f6cc8b7
package
com
.
baosight
.
hggp
.
hg
.
zl
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.math.BigDecimal
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
/**
* Project: <br>
...
...
@@ -17,7 +16,7 @@ import java.util.Map;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-1
5 16:04:5
4 create
* @history 2024-05-1
6 11:17:3
4 create
*/
public
class
HGZL001
extends
DaoEPBase
{
...
...
@@ -49,8 +48,8 @@ public class HGZL001 extends DaoEPBase {
public
static
final
String
FIELD_WIDTH
=
"width"
;
/* 宽度*/
public
static
final
String
FIELD_THICK
=
"thick"
;
/* 厚度*/
public
static
final
String
FIELD_RECEIVE_QTY
=
"receiveQty"
;
/* 收货数量*/
public
static
final
String
FIELD_
DELIVER_QTY
=
"deliverQty"
;
/* 退货
数量*/
public
static
final
String
FIELD_
DEPOSIT_QTY
=
"depositQty"
;
/* 入库
数量*/
public
static
final
String
FIELD_
QUALIFY_QTY
=
"qualifyQty"
;
/* 合格
数量*/
public
static
final
String
FIELD_
UNQUALIFY_QTY
=
"unqualifyQty"
;
/* 不合格
数量*/
public
static
final
String
FIELD_RECEIVE_UNIT_WEIGHT
=
"receiveUnitWeight"
;
/* 收货单重*/
public
static
final
String
FIELD_RECEIVE_WEIGHT
=
"receiveWeight"
;
/* 收货重量*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态:0-质检中,1-质检完成*/
...
...
@@ -81,8 +80,8 @@ public class HGZL001 extends DaoEPBase {
public
static
final
String
COL_WIDTH
=
"WIDTH"
;
/* 宽度*/
public
static
final
String
COL_THICK
=
"THICK"
;
/* 厚度*/
public
static
final
String
COL_RECEIVE_QTY
=
"RECEIVE_QTY"
;
/* 收货数量*/
public
static
final
String
COL_
DELIVER_QTY
=
"DELIVER_QTY"
;
/* 退货
数量*/
public
static
final
String
COL_
DEPOSIT_QTY
=
"DEPOSIT_QTY"
;
/* 入库
数量*/
public
static
final
String
COL_
QUALIFY_QTY
=
"QUALIFY_QTY"
;
/* 合格
数量*/
public
static
final
String
COL_
UNQUALIFY_QTY
=
"UNQUALIFY_QTY"
;
/* 不合格
数量*/
public
static
final
String
COL_RECEIVE_UNIT_WEIGHT
=
"RECEIVE_UNIT_WEIGHT"
;
/* 收货单重*/
public
static
final
String
COL_RECEIVE_WEIGHT
=
"RECEIVE_WEIGHT"
;
/* 收货重量*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态:0-质检中,1-质检完成*/
...
...
@@ -119,8 +118,8 @@ public class HGZL001 extends DaoEPBase {
private
BigDecimal
width
=
new
BigDecimal
(
0.000
);
/* 宽度*/
private
BigDecimal
thick
=
new
BigDecimal
(
0.000
);
/* 厚度*/
private
BigDecimal
receiveQty
=
new
BigDecimal
(
0.000
);
/* 收货数量*/
private
BigDecimal
deliverQty
=
new
BigDecimal
(
0.000
);
/* 退货
数量*/
private
BigDecimal
depositQty
=
new
BigDecimal
(
0.000
);
/* 入库
数量*/
private
BigDecimal
qualifyQty
=
new
BigDecimal
(
0.000
);
/* 合格
数量*/
private
BigDecimal
unqualifyQty
=
new
BigDecimal
(
0.000
);
/* 不合格
数量*/
private
BigDecimal
receiveUnitWeight
=
new
BigDecimal
(
0.000
);
/* 收货单重*/
private
BigDecimal
receiveWeight
=
new
BigDecimal
(
0.000
);
/* 收货重量*/
private
Integer
status
;
/* 状态:0-质检中,1-质检完成*/
...
...
@@ -248,18 +247,18 @@ public class HGZL001 extends DaoEPBase {
eiColumn
.
setDescName
(
"收货数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_
DELIVER
_QTY
);
eiColumn
=
new
EiColumn
(
FIELD_
QUALIFY
_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"
退货
数量"
);
eiColumn
.
setDescName
(
"
合格
数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_
DEPOSIT
_QTY
);
eiColumn
=
new
EiColumn
(
FIELD_
UNQUALIFY
_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"
入库
数量"
);
eiColumn
.
setDescName
(
"
不合格
数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_UNIT_WEIGHT
);
...
...
@@ -707,36 +706,36 @@ public class HGZL001 extends DaoEPBase {
this
.
receiveQty
=
receiveQty
;
}
/**
* get the
deliverQty - 退货
数量.
* @return the
deliver
Qty
* get the
qualifyQty - 合格
数量.
* @return the
qualify
Qty
*/
public
BigDecimal
get
Deliver
Qty
()
{
return
this
.
deliver
Qty
;
public
BigDecimal
get
Qualify
Qty
()
{
return
this
.
qualify
Qty
;
}
/**
* set the
deliverQty - 退货
数量.
* set the
qualifyQty - 合格
数量.
*
* @param
deliverQty - 退货
数量
* @param
qualifyQty - 合格
数量
*/
public
void
set
DeliverQty
(
BigDecimal
deliver
Qty
)
{
this
.
deliverQty
=
deliver
Qty
;
public
void
set
QualifyQty
(
BigDecimal
qualify
Qty
)
{
this
.
qualifyQty
=
qualify
Qty
;
}
/**
* get the
depositQty - 入库
数量.
* @return the
deposit
Qty
* get the
unqualifyQty - 不合格
数量.
* @return the
unqualify
Qty
*/
public
BigDecimal
get
Deposit
Qty
()
{
return
this
.
deposit
Qty
;
public
BigDecimal
get
Unqualify
Qty
()
{
return
this
.
unqualify
Qty
;
}
/**
* set the
depositQty - 入库
数量.
* set the
unqualifyQty - 不合格
数量.
*
* @param
depositQty - 入库
数量
* @param
unqualifyQty - 不合格
数量
*/
public
void
set
DepositQty
(
BigDecimal
deposit
Qty
)
{
this
.
depositQty
=
deposit
Qty
;
public
void
set
UnqualifyQty
(
BigDecimal
unqualify
Qty
)
{
this
.
unqualifyQty
=
unqualify
Qty
;
}
/**
* get the receiveUnitWeight - 收货单重.
...
...
@@ -820,8 +819,8 @@ public class HGZL001 extends DaoEPBase {
setWidth
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WIDTH
)),
width
));
setThick
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_THICK
)),
thick
));
setReceiveQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_QTY
)),
receiveQty
));
set
DeliverQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELIVER_QTY
)),
deliver
Qty
));
set
DepositQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_QTY
)),
deposit
Qty
));
set
QualifyQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QUALIFY_QTY
)),
qualify
Qty
));
set
UnqualifyQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNQUALIFY_QTY
)),
unqualify
Qty
));
setReceiveUnitWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_UNIT_WEIGHT
)),
receiveUnitWeight
));
setReceiveWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_WEIGHT
)),
receiveWeight
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
...
...
@@ -860,8 +859,8 @@ public class HGZL001 extends DaoEPBase {
map
.
put
(
FIELD_WIDTH
,
StringUtils
.
toString
(
width
,
eiMetadata
.
getMeta
(
FIELD_WIDTH
)));
map
.
put
(
FIELD_THICK
,
StringUtils
.
toString
(
thick
,
eiMetadata
.
getMeta
(
FIELD_THICK
)));
map
.
put
(
FIELD_RECEIVE_QTY
,
StringUtils
.
toString
(
receiveQty
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_QTY
)));
map
.
put
(
FIELD_
DELIVER_QTY
,
StringUtils
.
toString
(
deliverQty
,
eiMetadata
.
getMeta
(
FIELD_DELIVER
_QTY
)));
map
.
put
(
FIELD_
DEPOSIT_QTY
,
StringUtils
.
toString
(
depositQty
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT
_QTY
)));
map
.
put
(
FIELD_
QUALIFY_QTY
,
StringUtils
.
toString
(
qualifyQty
,
eiMetadata
.
getMeta
(
FIELD_QUALIFY
_QTY
)));
map
.
put
(
FIELD_
UNQUALIFY_QTY
,
StringUtils
.
toString
(
unqualifyQty
,
eiMetadata
.
getMeta
(
FIELD_UNQUALIFY
_QTY
)));
map
.
put
(
FIELD_RECEIVE_UNIT_WEIGHT
,
StringUtils
.
toString
(
receiveUnitWeight
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_UNIT_WEIGHT
)));
map
.
put
(
FIELD_RECEIVE_WEIGHT
,
StringUtils
.
toString
(
receiveWeight
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_WEIGHT
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL001.java
View file @
5f6cc8b7
...
...
@@ -2,21 +2,14 @@ package com.baosight.hggp.hg.zl.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.zl.domain.HGZL001
;
import
com.baosight.hggp.
util.Assert
Utils
;
import
com.baosight.hggp.
hg.zl.utils.HGZL
Utils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtil
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.MapUtils
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -34,7 +27,8 @@ public class ServiceHGZL001 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"质量巡检单"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
@Override
@OperationLogAnnotation
(
operModul
=
"入库质检单"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
null
);
...
...
@@ -53,14 +47,12 @@ public class ServiceHGZL001 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"质量巡检单"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@Override
@OperationLogAnnotation
(
operModul
=
"质量巡检单"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
receiptDate
=
MapUtils
.
getString
(
queryMap
,
"receiptDate"
);
queryMap
.
put
(
"receiptDate"
,
StringUtil
.
removeSpecifiedCharacter
(
receiptDate
,
StringUtil
.
DEFAULT_CHARACTER_TO_BE_REMOVED
));
HGZLUtils
.
HgZl001
.
setCondition
(
queryMap
);
inInfo
=
super
.
query
(
inInfo
,
HGZL001
.
QUERY
,
new
HGZL001
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
@@ -75,7 +67,6 @@ public class ServiceHGZL001 extends ServiceBase {
* @return
*/
@OperationLogAnnotation
(
operModul
=
"质量巡检单"
,
operType
=
"新增"
,
operDesc
=
"新增"
)
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
...
...
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL001.xml
View file @
5f6cc8b7
...
...
@@ -29,15 +29,17 @@
WIDTH as "width",
<!-- 宽度 -->
THICK as "thick",
<!-- 厚度 -->
RECEIVE_QTY as "receiveQty",
<!-- 收货数量 -->
DELIVER_QTY as "deliverQty",
<!-- 退货
数量 -->
DEPOSIT_QTY as "depositQty",
<!-- 入库
数量 -->
QUALIFY_QTY as "qualifyQty",
<!-- 合格
数量 -->
UNQUALIFY_QTY as "unqualifyQty",
<!-- 不合格
数量 -->
RECEIVE_UNIT_WEIGHT as "receiveUnitWeight",
<!-- 收货单重 -->
RECEIVE_WEIGHT as "receiveWeight",
<!-- 收货重量 -->
STATUS as "status"
<!-- 状态:0-质检中,1-质检完成 -->
</sql>
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
<include
refid=
"HGXSDataAuth.authCondition"
/>
<include
refid=
"idCondition"
/>
<include
refid=
"customCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
...
...
@@ -88,199 +90,98 @@
</isNotEmpty>
</sql>
<sql
id=
"idCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"reqNo"
>
REQ_NO = #reqNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"reqNos"
>
REQ_NO IN
<iterate
open=
"("
close=
")"
conjunction=
","
property=
"reqNos"
>
#reqNos[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<include
refid=
"BaseCondition.specCondition"
/>
<include
refid=
"BaseCondition.createdTimeCondition"
/>
</sql>
<!-- 公共修改字段 -->
<sql
id=
"updateRevise"
>
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
</sql>
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID DESC
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.zl.domain.HGZL001"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGZL001 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
</isEmpty>
</dynamic>
</select>
<include
refid=
"orderBy"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGZL001 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveNo">
RECEIVE_NO = #receiveNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveQty">
RECEIVE_QTY = #receiveQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliverQty">
DELIVER_QTY = #deliverQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositQty">
DEPOSIT_QTY = #depositQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveUnitWeight">
RECEIVE_UNIT_WEIGHT = #receiveUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveWeight">
RECEIVE_WEIGHT = #receiveWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGZL001 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGZL001 (ID,
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
UPDATED_BY,
<!-- 记录修改者 -->
UPDATED_NAME,
<!-- 记录修改名称 -->
UPDATED_TIME,
<!-- 记录修改时间 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_NAME,
<!-- 公司名称 -->
RECEIPT_DATE,
<!-- 单据日期 -->
CHECK_NO,
<!-- 检查单号 -->
RECEIVE_NO,
<!-- 收货单号 -->
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
SPEC_ID,
<!-- 规格ID -->
SPEC,
<!-- 规格 -->
MATERIAL,
<!-- 材质 -->
UNIT,
<!-- 单位 -->
LENGTH,
<!-- 长度 -->
WIDTH,
<!-- 宽度 -->
THICK,
<!-- 厚度 -->
RECEIVE_QTY,
<!-- 收货数量 -->
DELIVER_QTY,
<!-- 退货数量 -->
DEPOSIT_QTY,
<!-- 入库数量 -->
RECEIVE_UNIT_WEIGHT,
<!-- 收货单重 -->
RECEIVE_WEIGHT,
<!-- 收货重量 -->
STATUS
<!-- 状态:0-质检中,1-质检完成 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #receiptDate#, #checkNo#, #receiveNo#, #inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #receiveQty#, #deliverQty#, #depositQty#, #receiveUnitWeight#, #receiveWeight#, #status#)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGZL001 WHERE
ID = #id#
</delete>
INSERT INTO ${hggpSchema}.HGZL001 (
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_NAME,
<!-- 公司名称 -->
RECEIPT_DATE,
<!-- 单据日期 -->
CHECK_NO,
<!-- 检查单号 -->
RECEIVE_NO,
<!-- 收货单号 -->
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
SPEC_ID,
<!-- 规格ID -->
SPEC,
<!-- 规格 -->
MATERIAL,
<!-- 材质 -->
UNIT,
<!-- 单位 -->
LENGTH,
<!-- 长度 -->
WIDTH,
<!-- 宽度 -->
THICK,
<!-- 厚度 -->
RECEIVE_QTY,
<!-- 收货数量 -->
QUALIFY_QTY,
<!-- 合格数量 -->
UNQUALIFY_QTY,
<!-- 不合格数量 -->
RECEIVE_UNIT_WEIGHT,
<!-- 收货单重 -->
RECEIVE_WEIGHT,
<!-- 收货重量 -->
STATUS
<!-- 状态:0-质检中,1-质检完成 -->
) VALUES (
#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #receiptDate#, #checkNo#, #receiveNo#, #inventType#,
#inventCode#, #inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #receiveQty#,
#qualifyQty#, #unqualifyQty#, #receiveUnitWeight#, #receiveWeight#, #status#
)
</insert>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGZL001
SET
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
CREATED_NAME = #createdName#,
<!-- 记录创建名称 -->
CREATED_TIME = #createdTime#,
<!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#,
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
RECEIPT_DATE = #receiptDate#,
<!-- 单据日期 -->
CHECK_NO = #checkNo#,
<!-- 检查单号 -->
RECEIVE_NO = #receiveNo#,
<!-- 收货单号 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
SPEC_ID = #specId#,
<!-- 规格ID -->
SPEC = #spec#,
<!-- 规格 -->
MATERIAL = #material#,
<!-- 材质 -->
UNIT = #unit#,
<!-- 单位 -->
LENGTH = #length#,
<!-- 长度 -->
WIDTH = #width#,
<!-- 宽度 -->
THICK = #thick#,
<!-- 厚度 -->
RECEIVE_QTY = #receiveQty#,
<!-- 收货数量 -->
DELIVER_QTY = #deliverQty#,
<!-- 退货数量 -->
DEPOSIT_QTY = #depositQty#,
<!-- 入库数量 -->
RECEIVE_UNIT_WEIGHT = #receiveUnitWeight#,
<!-- 收货单重 -->
RECEIVE_WEIGHT = #receiveWeight#,
<!-- 收货重量 -->
STATUS = #status#
<!-- 状态:0-质检中,1-质检完成 -->
WHERE
ID = #id#
</update>
<delete
id=
"delete"
>
UPDATE ${hggpSchema}.HGZL001
SET
DELETE_FLAG = #deleteFlag#,
<include
refid=
"updateRevise"
/>
WHERE CHECK_NO = #checkNo#
</delete>
</sqlMap>
src/main/java/com/baosight/hggp/hg/zl/utils/HGZLUtils.java
0 → 100644
View file @
5f6cc8b7
package
com
.
baosight
.
hggp
.
hg
.
zl
.
utils
;
import
com.baosight.hggp.hg.utils.HGUtils
;
import
com.baosight.hggp.hg.zl.domain.HGZL001
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
java.util.Map
;
/**
* @author:songx
* @date:2024/5/16,11:26
*/
public
class
HGZLUtils
{
/**
* HGZL001 工具类
*
* @author:songx
* @date:2024/5/9,16:58
*/
public
static
class
HgZl001
{
/**
* 设置查询条件
*
* @param queryRow 集合
* @return
*/
public
static
void
setCondition
(
Map
queryRow
)
{
HGUtils
.
setCondition
(
queryRow
);
// 单据日期
String
receiptDate
=
MapUtils
.
getString
(
queryRow
,
HGZL001
.
FIELD_RECEIPT_DATE
);
if
(
StringUtils
.
isNotBlank
(
receiptDate
))
{
queryRow
.
put
(
HGZL001
.
FIELD_RECEIPT_DATE
,
DateUtils
.
formatShort
(
receiptDate
));
}
}
}
}
src/main/webapp/HG/ZL/HGZL001.js
0 → 100644
View file @
5f6cc8b7
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
input
:
true
,
numeric
:
false
,
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
]
},
columns
:
[{
field
:
"receiptDate"
,
attributes
:
{
class
:
"i-input-readonly"
}
},
{
field
:
"operator"
,
template
:
function
(
item
)
{
let
status
=
item
.
status
;
if
(
status
===
"0"
)
{
return
'<a style="cursor: pointer;display: flex;justify-content: center;" '
+
'onclick="doProcess('
+
item
.
id
+
',
\'
'
+
item
.
checkNo
+
'
\'
)" >处理</a>'
;
}
else
{
return
""
;
}
}
},
{
field
:
"problemPhoto"
,
template
:
function
(
item
)
{
if
(
!
isBlank
(
item
.
checkNo
))
{
return
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
', 1)" >附件清单</a>'
;
}
else
{
return
""
;
}
}
},
{
field
:
"processPhoto"
,
template
:
function
(
item
)
{
if
(
!
isBlank
(
item
.
checkNo
))
{
return
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
', 2)" >附件清单</a>'
;
}
else
{
return
""
;
}
}
},
{
field
:
"createdName"
,
template
:
function
(
options
)
{
return
showUserName
(
options
.
createdBy
,
options
.
createdName
);
}
}],
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
e
.
preventDefault
();
deleteFunc
();
},
onSuccess
:
function
(
e
)
{
}
}
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 选择生产任务
$
(
"#SELECT_PROD"
).
on
(
"click"
,
selectProd
);
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 显示附件清单
*
* @param id
* @param docType
*/
let
showUploadFile
=
function
(
id
,
docType
)
{
JSColorbox
.
open
({
href
:
"HPZL001A?methodName=initLoad&inqu_status-0-checkId="
+
id
+
"&inqu_status-0-docType="
+
docType
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
});
}
/**
* 提交操作
*
* @param id
* @param checkNo
*/
let
doProcess
=
function
(
id
,
checkNo
)
{
let
message
=
"确认将单号["
+
checkNo
+
"]的状态修改为已处理吗? "
;
JSUtils
.
confirm
(
message
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPZL001"
,
"doProcess"
,
true
);
}
});
}
/**
* 挑选生产任务
*/
let
selectProd
=
function
()
{
JSColorbox
.
open
({
href
:
"HPZL001B?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>生产任务查询</div>"
,
width
:
"90%"
,
height
:
"80%"
,
callbackName
:
selectStockCallback
});
}
/**
* 挑选生产任务回调
*/
let
selectStockCallback
=
function
()
{
// 刷新页面
query
();
// 关闭弹窗
JSColorbox
.
close
();
}
/**
* 删除
*/
function
deleteFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
status
=
item
.
get
(
"status"
);
if
(
status
===
"1"
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行记录已处理,不能删除!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
){
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPZL001"
,
"delete"
,
true
);
}
});
}
}
src/main/webapp/HG/ZL/H
P
ZL001.jsp
→
src/main/webapp/HG/ZL/H
G
ZL001.jsp
View file @
5f6cc8b7
...
...
@@ -41,17 +41,24 @@
required=
"true"
/>
<EF:EFColumn
ename=
"processPhoto"
cname=
"处理照片"
locked=
"true"
enable=
"false"
width=
"100"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"receiptDate"
cname=
"单据日期"
enable=
"false"
width=
"120"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"checkNo"
cname=
"检查单号"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"100"
align=
"center"
>
<EF:EFOption
label=
"已处理"
value=
"1"
></EF:EFOption>
<EF:EFOption
label=
"未处理"
value=
"0"
></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"receiptDate"
cname=
"单据日期"
enable=
"false"
width=
"120"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"部件名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"subInventName"
cname=
"零件名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"orgName"
cname=
"生产组名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"receiveNo"
cname=
"收货单号"
enable=
"false"
width=
"120"
align=
"center"
/>
<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=
"specId"
cname=
"规格ID"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"receiveQty"
cname=
"收货数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"receiveWeight"
cname=
"收货重量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"qualifyQty"
cname=
"合格数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
required=
"true"
/>
<EF:EFColumn
ename=
"unqualifyQty"
cname=
"不合格数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
required=
"true"
/>
<EF:EFComboColumn
ename=
"poorType"
cname=
"不良品类"
enable=
"false"
width=
"100"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hpjx.poorType"
/>
</EF:EFComboColumn>
...
...
@@ -60,12 +67,11 @@
blockName=
"user_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"prodOrderNo"
cname=
"生产订单号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"prodTaskNo"
cname=
"生产任务号"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"部件编码"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"subInventCode"
cname=
"零件编码"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"orgNo"
cname=
"生产组编码"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"material"
cname=
"材质"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"length"
cname=
"长(M)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(M)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(M)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"150"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
...
...
src/main/webapp/HG/ZL/H
P
ZL001A.js
→
src/main/webapp/HG/ZL/H
G
ZL001A.js
View file @
5f6cc8b7
File moved
src/main/webapp/HG/ZL/H
P
ZL001A.jsp
→
src/main/webapp/HG/ZL/H
G
ZL001A.jsp
View file @
5f6cc8b7
File moved
src/main/webapp/HG/ZL/H
P
ZL001B.js
→
src/main/webapp/HG/ZL/H
G
ZL001B.js
View file @
5f6cc8b7
File moved
src/main/webapp/HG/ZL/H
P
ZL001B.jsp
→
src/main/webapp/HG/ZL/H
G
ZL001B.jsp
View file @
5f6cc8b7
File moved
src/main/webapp/HG/ZL/HPZL001.js
deleted
100644 → 0
View file @
c24c5700
let
projNameGlobalData
=
[];
let
inventNameGlobalData
=
[];
let
subInventNameGlobalData
=
[];
let
orgNameGlobalData
=
[];
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
input
:
true
,
numeric
:
false
,
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
]
},
columns
:
[{
field
:
"receiptDate"
,
attributes
:
{
class
:
"i-input-readonly"
}
},
{
field
:
"operator"
,
template
:
function
(
item
)
{
let
status
=
item
.
status
;
if
(
status
===
"0"
)
{
return
'<a style="cursor: pointer;display: flex;justify-content: center;" '
+
'onclick="doProcess('
+
item
.
id
+
',
\'
'
+
item
.
checkNo
+
'
\'
)" >处理</a>'
;
}
else
{
return
""
;
}
}
},
{
field
:
"problemPhoto"
,
template
:
function
(
item
)
{
if
(
!
isBlank
(
item
.
checkNo
))
{
return
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
', 1)" >附件清单</a>'
;
}
else
{
return
""
;
}
}
},
{
field
:
"processPhoto"
,
template
:
function
(
item
)
{
if
(
!
isBlank
(
item
.
checkNo
))
{
return
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
', 2)" >附件清单</a>'
;
}
else
{
return
""
;
}
}
},
// {
// field: "projCode",
// template: function (dataItem) {
// for (let i = 0; i < projNameGlobalData.length; i++) {
// if (projNameGlobalData[i]['valueField'] === dataItem['projCode']) {
// return projNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let inInfo = new EiInfo();
// // 1.部分分派,2.全部分派
// inInfo.set("inqu_status-0-statuses", [1, 2]);
// inInfo.set("serviceName", "HPSC005");
// inInfo.set("methodName", "queryProjComboBox");
// inInfo.set("blockId", "proj_prod_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// }, {
// field: "inventCode",
// template: function (dataItem) {
// for (let i = 0; i < inventNameGlobalData.length; i++) {
// if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
// return inventNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let projCode = options.model["projCode"];
// let inInfo = new EiInfo();
// inInfo.set("inqu_status-0-projCode", isBlank(projCode) ? " " : projCode);
// inInfo.set("serviceName", "HPSC003");
// inInfo.set("methodName", "queryInventComboBox");
// inInfo.set("blockId", "invent_record_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// }, {
// field: "subInventCode",
// template: function (dataItem) {
// for (let i = 0; i < subInventNameGlobalData.length; i++) {
// if (subInventNameGlobalData[i]['valueField'] === dataItem['subInventCode']) {
// return subInventNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let inventCode = options.model["inventCode"];
// let inInfo = new EiInfo();
// inInfo.set("inqu_status-0-parentPrdtCode", isBlank(inventCode) ? " " : inventCode);
// inInfo.set("serviceName", "HPSC004");
// inInfo.set("methodName", "queryInventComboBox");
// inInfo.set("blockId", "sub_invent_record_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// }, {
// field: "orgNo",
// template: function (dataItem) {
// for (let i = 0; i < orgNameGlobalData.length; i++) {
// if (orgNameGlobalData[i]['valueField'] === dataItem['orgNo']) {
// return orgNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let subInventCode = options.model["subInventCode"];
// let inInfo = new EiInfo();
// inInfo.set("inqu_status-0-prdtCode", isBlank(subInventCode) ? " " : subInventCode);
// inInfo.set("serviceName", "HPSC005");
// inInfo.set("methodName", "queryOrgComboBox");
// inInfo.set("blockId", "org_prod_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// },
{
field
:
"createdName"
,
template
:
function
(
options
)
{
return
showUserName
(
options
.
createdBy
,
options
.
createdName
);
}
}],
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
e
.
preventDefault
();
deleteFunc
();
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'delete'
){
query
();
}
}
}
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 选择生产任务
$
(
"#SELECT_PROD"
).
on
(
"click"
,
selectProd
);
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 项目名称
// let inInfo = new EiInfo();
// EiCommunicator.send("HPSC001", "queryComboBox", inInfo, {
// onSuccess: function (ei) {
// projNameGlobalData = ei.getBlock("proj_record_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// // 部件名称
// EiCommunicator.send("HPSC003", "queryInventComboBox", inInfo, {
// onSuccess: function (ei) {
// inventNameGlobalData = ei.getBlock("invent_record_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// // 零件名称
// EiCommunicator.send("HPSC004", "queryInventComboBox", inInfo, {
// onSuccess: function (ei) {
// subInventNameGlobalData = ei.getBlock("sub_invent_record_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// // 生产组名称
// EiCommunicator.send("HPSC005", "queryOrgComboBox", inInfo, {
// onSuccess: function (ei) {
// orgNameGlobalData = ei.getBlock("org_prod_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// 查询
query
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 显示附件清单
*
* @param id
* @param docType
*/
let
showUploadFile
=
function
(
id
,
docType
)
{
JSColorbox
.
open
({
href
:
"HPZL001A?methodName=initLoad&inqu_status-0-checkId="
+
id
+
"&inqu_status-0-docType="
+
docType
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
});
}
/**
* 提交操作
*
* @param id
* @param checkNo
*/
let
doProcess
=
function
(
id
,
checkNo
)
{
let
message
=
"确认将单号["
+
checkNo
+
"]的状态修改为已处理吗? "
;
JSUtils
.
confirm
(
message
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPZL001"
,
"doProcess"
,
true
);
}
});
}
/**
* 挑选生产任务
*/
let
selectProd
=
function
()
{
JSColorbox
.
open
({
href
:
"HPZL001B?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>生产任务查询</div>"
,
width
:
"90%"
,
height
:
"80%"
,
callbackName
:
selectStockCallback
});
}
/**
* 挑选生产任务回调
*/
let
selectStockCallback
=
function
()
{
// 刷新页面
query
();
// 关闭弹窗
JSColorbox
.
close
();
}
/**
* 删除
*/
function
deleteFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
status
=
item
.
get
(
"status"
);
if
(
status
===
"1"
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行记录已处理,不能删除!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
){
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPZL001"
,
"delete"
,
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