Commit c1dfd1c0 by wancheng

未按销售交货日期出库的数据高亮提示

parent 7ae756fd
...@@ -52,6 +52,7 @@ public class HPKC011 extends DaoEPBase { ...@@ -52,6 +52,7 @@ public class HPKC011 extends DaoEPBase {
public static final String FIELD_VERSION = "version"; /* 版本号*/ public static final String FIELD_VERSION = "version"; /* 版本号*/
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/ public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 工厂*/ public static final String FIELD_FACTORY_NAME = "factoryName"; /* 工厂*/
public static final String FIELD_DELIVERY_DATE = "deliveryDate"; /* 交货日期*/
public static final String COL_ID = "FIELD_ID"; public static final String COL_ID = "FIELD_ID";
public static final String COL_COMPANY_CODE = "FIELD_COMPANY_CODE"; /* 企业编码*/ public static final String COL_COMPANY_CODE = "FIELD_COMPANY_CODE"; /* 企业编码*/
...@@ -82,6 +83,7 @@ public class HPKC011 extends DaoEPBase { ...@@ -82,6 +83,7 @@ public class HPKC011 extends DaoEPBase {
public static final String COL_VERSION = "FIELD_VERSION"; /* 版本号*/ public static final String COL_VERSION = "FIELD_VERSION"; /* 版本号*/
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/ public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 工厂*/ public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 工厂*/
public static final String COL_DELIVERY_DATE = "DELIVERY_DATE"; /* 交货日期*/
public static final String QUERYKC = "HPKC011.queryKc"; public static final String QUERYKC = "HPKC011.queryKc";
public static final String QUERY = "HPKC011.query"; public static final String QUERY = "HPKC011.query";
...@@ -122,6 +124,8 @@ public class HPKC011 extends DaoEPBase { ...@@ -122,6 +124,8 @@ public class HPKC011 extends DaoEPBase {
private String factoryCode = " "; /* 厂区编码*/ private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 工厂*/ private String factoryName = " "; /* 工厂*/
private String deliveryDate = " "; /*交货日期*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
...@@ -263,7 +267,9 @@ public class HPKC011 extends DaoEPBase { ...@@ -263,7 +267,9 @@ public class HPKC011 extends DaoEPBase {
eiColumn.setDescName("工厂"); eiColumn.setDescName("工厂");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("deliveryDate");
eiColumn.setDescName("交货日期");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -662,6 +668,14 @@ public class HPKC011 extends DaoEPBase { ...@@ -662,6 +668,14 @@ public class HPKC011 extends DaoEPBase {
this.factoryName = factoryName; this.factoryName = factoryName;
} }
public String getDeliveryDate() {
return deliveryDate;
}
public void setDeliveryDate(String deliveryDate) {
this.deliveryDate = deliveryDate;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -699,6 +713,7 @@ public class HPKC011 extends DaoEPBase { ...@@ -699,6 +713,7 @@ public class HPKC011 extends DaoEPBase {
setVersion(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_VERSION)), version)); setVersion(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_VERSION)), version));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode)); setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName)); setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate));
} }
/** /**
...@@ -737,7 +752,7 @@ public class HPKC011 extends DaoEPBase { ...@@ -737,7 +752,7 @@ public class HPKC011 extends DaoEPBase {
map.put(FIELD_VERSION, StringUtils.toString(version, eiMetadata.getMeta(FIELD_VERSION))); map.put(FIELD_VERSION, StringUtils.toString(version, eiMetadata.getMeta(FIELD_VERSION)));
map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE))); map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME))); map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_DELIVERY_DATE,StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE)));
return map; return map;
} }
} }
...@@ -3,114 +3,116 @@ ...@@ -3,114 +3,116 @@
<sqlMap namespace="HPKC011"> <sqlMap namespace="HPKC011">
<sql id="column"> <sql id="column">
ID as "id", a.ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 --> a.COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 --> a.DEP_CODE as "depCode", <!-- 部门编码 -->
WH_CODE as "whCode", <!-- 仓库编码 --> a.WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 --> a.WH_NAME as "whName", <!-- 仓库名称 -->
PROD_NO as "prodNo", <!-- 生产单号 --> a.PROD_NO as "prodNo", <!-- 生产单号 -->
PROJ_CODE as "projCode", <!-- 生产单号 --> a.PROJ_CODE as "projCode", <!-- 生产单号 -->
PROJ_NAME as "projName", <!-- 生产单号 --> a.PROJ_NAME as "projName", <!-- 生产单号 -->
INVENT_CODE as "inventCode", <!-- 部件编码 --> a.INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 --> a.INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 --> a.SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 --> a.SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
LENGTH as "length", <!-- 长 --> a.LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> a.WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> a.THICK as "thick", <!-- 厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 --> a.PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
AMOUNT as "amount", <!-- 数量 --> a.AMOUNT as "amount", <!-- 数量 -->
UNIT_WEIGHT as "unitWeight", <!-- 单重 --> a.UNIT_WEIGHT as "unitWeight", <!-- 单重 -->
WEIGHT as "weight", <!-- 重量 --> a.WEIGHT as "weight", <!-- 重量 -->
REMARK as "remark", <!-- 备注 --> a.REMARK as "remark", <!-- 备注 -->
CREATED_BY as "createdBy", <!-- 创建人 --> a.CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 --> a.CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> a.CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> a.UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> a.UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> a.UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
VERSION as "version", <!-- 版本号 --> a.VERSION as "version", <!-- 版本号 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 --> a.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName" <!-- 工厂 --> a.FACTORY_NAME as "factoryName", <!-- 工厂 -->
b.DELIVERY_DATE as "deliveryDate"
</sql> </sql>
<sql id="authCondition"> <sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# a.DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes"> <isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate> a.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# a.ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode"> <isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode# a.WH_CODE = #whCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whName"> <isNotEmpty prepend=" AND " property="whName">
WH_NAME LIKE CONCAT('%', #whName#, '%') a.WH_NAME LIKE CONCAT('%', #whName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prodNo"> <isNotEmpty prepend=" AND " property="prodNo">
PROD_NO = #prodNo# a.PROD_NO = #prodNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE CONCAT('%', #projCode#, '%') a.PROJ_CODE LIKE CONCAT('%', #projCode#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%', #projName#, '%') a.PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode"> <isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode# a.INVENT_CODE = #inventCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', #inventName#, '%') a.INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventCode"> <isNotEmpty prepend=" AND " property="subInventCode">
SUB_INVENT_CODE = #subInventCode# a.SUB_INVENT_CODE = #subInventCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventName"> <isNotEmpty prepend=" AND " property="subInventName">
SUB_INVENT_NAME LIKE CONCAT('%', #subInventName#, '%') a.SUB_INVENT_NAME LIKE CONCAT('%', #subInventName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy"> <isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy# a.CREATED_BY = #createdBy#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime"> <isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime# a.CREATED_TIME = #createdTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy"> <isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy# a.UPDATED_BY = #updatedBy#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime"> <isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime# a.UPDATED_TIME = #updatedTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="version"> <isNotEmpty prepend=" AND " property="version">
VERSION = #version# a.VERSION = #version#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode"> <isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode# a.FACTORY_CODE = #factoryCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName"> <isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName# a.FACTORY_NAME = #factoryName#
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
<isNotEmpty prepend=" AND " property="ids"> <isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> a.ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011"> <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 FROM hpjx.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
...@@ -119,15 +121,16 @@ ...@@ -119,15 +121,16 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID DESC a.ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="queryKc" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011"> <select id="queryKc" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 FROM hpjx.T_HPKC011 a
WHERE 1=1 AND AMOUNT!=0 JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 AND a.AMOUNT!=0
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -135,21 +138,24 @@ ...@@ -135,21 +138,24 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID DESC a.ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="queryByCondition" resultClass="java.util.HashMap"> <select id="queryByCondition" resultClass="java.util.HashMap">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 FROM hpjx.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPKC011 SELECT COUNT(*)
FROM hpjx.T_HPKC011 a
JOIN hpjx.T_HPSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
......
...@@ -2,7 +2,13 @@ $(function () { ...@@ -2,7 +2,13 @@ $(function () {
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result": { "result": {
columns: [], columns: [],
dataBound: function () { dataBound: function (e) {
$.each(e.sender.getDataItems(),function(index,item){
let currentDate = getCurrentDate();
if(currentDate>item.deliveryDate){
$('tr[data-uid='+item.uid+']').css({'color':'red'});
}
})
} }
} }
}; };
...@@ -67,3 +73,12 @@ let select = function () { ...@@ -67,3 +73,12 @@ let select = function () {
}); });
} }
function getCurrentDate() {
const now = new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, '0');
const day = now.getDate().toString().padStart(2, '0');
return year.toString() + month + day;
}
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="subInventCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="subInventCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="prodNo" cname="生产订单号" enable="false" width="140" align="center" hidden="true"/> <EF:EFColumn ename="prodNo" cname="生产订单号" enable="false" width="140" align="center" hidden="true"/>
<EF:EFColumn ename="deliveryDate" cname="交货日期" width="90" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion title="提示">
<span style="color: red">说明:红色数据是未按销售交货日期出库的数据。</span>
</EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -56,13 +56,13 @@ ...@@ -56,13 +56,13 @@
<EF:EFColumn ename="prdtName" cname="部件名称" width="140" align="center" maxLength="50" <EF:EFColumn ename="prdtName" cname="部件名称" width="140" align="center" maxLength="50"
required="true"/> required="true"/>
<EF:EFColumn ename="length" cname="长/φ(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0" <EF:EFColumn ename="length" cname="长/φ(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,9}$/"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/> data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0" <EF:EFColumn ename="width" cname="宽(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,9}$/"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/> data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0" <EF:EFColumn ename="thick" cname="厚(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,9}$/"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/> data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级部件名称"/> <EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级部件名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" hidden="true" cname="上级部件名称"/> <EF:EFColumn enable="false" ename="parentPrdtName" hidden="true" cname="上级部件名称"/>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/>
<EF:EFColumn ename="unitWt" format="{0:N1}" cname="单重(KG)" maxLength="15" displayType="0.0" <EF:EFColumn ename="unitWt" format="{0:N1}" cname="单重(KG)" maxLength="15" displayType="0.0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,12}([.][0-9])?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和1位小数!"/> data-errorprompt="请输入数字,该值最大可设置12位整数和1位小数!"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFComboColumn enable="false" ename="status" align="center" <EF:EFComboColumn enable="false" ename="status" align="center"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment