Commit f1f9d8c5 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents f93594d2 846bc38a
...@@ -35,6 +35,7 @@ public class HPKC003 extends DaoEPBase { ...@@ -35,6 +35,7 @@ public class HPKC003 extends DaoEPBase {
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/ public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/ public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/ public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_AMOUNT = "amount"; /* 数量*/ public static final String FIELD_AMOUNT = "amount"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/ public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
...@@ -60,6 +61,7 @@ public class HPKC003 extends DaoEPBase { ...@@ -60,6 +61,7 @@ public class HPKC003 extends DaoEPBase {
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/ public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/ public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/ public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String COL_AMOUNT = "AMOUNT"; /* 数量*/ public static final String COL_AMOUNT = "AMOUNT"; /* 数量*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/ public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
public static final String COL_REMARK = "REMARK"; /* 备注*/ public static final String COL_REMARK = "REMARK"; /* 备注*/
...@@ -83,6 +85,7 @@ public class HPKC003 extends DaoEPBase { ...@@ -83,6 +85,7 @@ public class HPKC003 extends DaoEPBase {
private Integer inventType; /* 存货类型*/ private Integer inventType; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/ private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/ private String inventName = " "; /* 存货名称*/
private Long inventRecordId = new Long(0); /* 存货档案ID*/
private BigDecimal amount = new BigDecimal(0.00); /* 数量*/ private BigDecimal amount = new BigDecimal(0.00); /* 数量*/
private BigDecimal weight = new BigDecimal(0.00); /* 重量*/ private BigDecimal weight = new BigDecimal(0.00); /* 重量*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
...@@ -137,6 +140,10 @@ public class HPKC003 extends DaoEPBase { ...@@ -137,6 +140,10 @@ public class HPKC003 extends DaoEPBase {
eiColumn.setDescName("仓库名称"); eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("存货档案ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE); eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型"); eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -397,6 +404,22 @@ public class HPKC003 extends DaoEPBase { ...@@ -397,6 +404,22 @@ public class HPKC003 extends DaoEPBase {
this.inventName = inventName; this.inventName = inventName;
} }
/** /**
* get the inventRecordId - 存货档案ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 存货档案ID.
*
* @param inventRecordId - 存货档案ID
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the amount - 数量. * get the amount - 数量.
* @return the amount * @return the amount
*/ */
...@@ -577,6 +600,7 @@ public class HPKC003 extends DaoEPBase { ...@@ -577,6 +600,7 @@ public class HPKC003 extends DaoEPBase {
setInventType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType)); setInventType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode)); setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName)); setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount)); setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight)); setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
...@@ -609,6 +633,7 @@ public class HPKC003 extends DaoEPBase { ...@@ -609,6 +633,7 @@ public class HPKC003 extends DaoEPBase {
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE))); map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE))); map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME))); map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT))); map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT))); map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK))); map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
......
...@@ -4,6 +4,7 @@ import com.baosight.hpjx.common.DdynamicEnum; ...@@ -4,6 +4,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003; import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.domain.HPPZ009; import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
...@@ -15,6 +16,7 @@ import com.baosight.iplat4j.core.ei.EiBlock; ...@@ -15,6 +16,7 @@ import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.DateUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
...@@ -75,7 +77,6 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -75,7 +77,6 @@ public class ServiceHPKC003 extends ServiceBase {
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据写入 // 数据写入
...@@ -92,7 +93,10 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -92,7 +93,10 @@ public class ServiceHPKC003 extends ServiceBase {
DaoUtils.insert("HPKC003.insert", fKc003); DaoUtils.insert("HPKC003.insert", fKc003);
//同步生产计划 //同步生产计划
this.synchronousPlan(fKc003); DaoUtils.update("HPSC004.update",this.synchronousPlan(fKc003));
// 修改库存
HPKCTools.updateStock(fKc003.getWhCode(), fKc003.getInventRecordId(), fKc003.getAmount().negate(),
fKc003.getWeight().negate());
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
...@@ -155,7 +159,10 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -155,7 +159,10 @@ public class ServiceHPKC003 extends ServiceBase {
hpkc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO)); hpkc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert("HPKC003.insert", hpkc003); DaoUtils.insert("HPKC003.insert", hpkc003);
//同步生产计划 //同步生产计划
this.synchronousPlan(hpkc003); DaoUtils.update("HPSC004.update",this.synchronousPlan(hpkc003));
// 修改库存
HPKCTools.updateStock(hpkc003.getWhCode(), hpkc003.getInventRecordId(), hpkc003.getAmount().negate(),
hpkc003.getWeight().negate());
} }
eiInfo.setStatus(EiConstant.STATUS_SUCCESS); eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!"); eiInfo.setMsg("删除成功!");
...@@ -170,25 +177,23 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -170,25 +177,23 @@ public class ServiceHPKC003 extends ServiceBase {
* 新增入库及删除入库单做同步计划订单 * 新增入库及删除入库单做同步计划订单
* @param hpkc003 * @param hpkc003
*/ */
public void synchronousPlan(HPKC003 hpkc003) { public HPSC004 synchronousPlan(HPKC003 hpkc003) {
HPSC004 HPSC004 = (HPSC004) this.dao.get("HPSC004.queryDetail","productionOrderNo",hpkc003.getProductionOrderNo()); HPSC004 hpsc004 = (HPSC004) this.dao.get("HPSC004.queryDetail","productionOrderNo",hpkc003.getProductionOrderNo());
if (HPSC004 != null) { if (hpsc004 != null) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); BigDecimal actualCompletionNum = hpkc003.getAmount().add(hpsc004.getNum());
BigDecimal actualCompletionNum = hpkc003.getAmount().add(HPSC004.getNum()); BigDecimal actualCompletionUnitWt = hpkc003.getWeight().add(hpsc004.getActualCompletionUnitWt());
BigDecimal actualCompletionUnitWt = hpkc003.getWeight().add(HPSC004.getActualCompletionUnitWt()); hpsc004.setActualCompletionNum(actualCompletionNum);
HPSC004.setActualCompletionNum(actualCompletionNum); hpsc004.setActualCompletionUnitWt(actualCompletionUnitWt);
HPSC004.setActualCompletionUnitWt(actualCompletionUnitWt);
HPSC004.setUpdatedBy(UserSession.getUserId());
HPSC004.setUpdatedTime(sdf.format(new Date()));
//计算是否生产完成 //计算是否生产完成
if (HPSC004.getNum().compareTo(actualCompletionNum) < 0 if (hpsc004.getNum().compareTo(actualCompletionNum) < 0
&& HPSC004.getUnitWt().compareTo(actualCompletionUnitWt) < 0) { && hpsc004.getUnitWt().compareTo(actualCompletionUnitWt) < 0) {
HPSC004.setActualCompletionDate(sdf.format(new Date())); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
hpsc004.setActualCompletionDate(DateUtils.toDateStr(new Date(),DateUtils.DEFAULT_DATETIME_PATTERN));
} else { } else {
HPSC004.setActualCompletionDate(""); hpsc004.setActualCompletionDate("");
} }
this.dao.update("HPSC004.update", HPSC004.toMap());
} }
return hpsc004;
} }
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
INVENT_TYPE as "inventType", <!-- 存货类型 --> INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 --> INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 --> INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
AMOUNT as "amount", <!-- 数量 --> AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 --> WEIGHT as "weight", <!-- 重量 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
...@@ -54,8 +55,11 @@ ...@@ -54,8 +55,11 @@
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName# INVENT_NAME = #inventName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companCode"> <isNotEmpty prepend=" AND " property="inventRecordId">
COMPANY_CODE = #companCode# INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag# DELETE_FLAG = #deleteFlag#
...@@ -63,6 +67,14 @@ ...@@ -63,6 +67,14 @@
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
<isNotEmpty prepend=" AND " property="spec">
<isEqual property="spec" compareValue="无规格">
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = '')
</isEqual>
<isNotEqual property="spec" compareValue="无规格">
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom"> <isNotEmpty prepend=" AND " property="createdDateFrom">
CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000') CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty> </isNotEmpty>
...@@ -109,6 +121,7 @@ ...@@ -109,6 +121,7 @@
INVENT_TYPE, <!-- 存货类型 --> INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 --> INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 --> INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 存货档案ID -->
AMOUNT, <!-- 数量 --> AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 --> WEIGHT, <!-- 重量 -->
REMARK, <!-- 备注 --> REMARK, <!-- 备注 -->
...@@ -118,7 +131,7 @@ ...@@ -118,7 +131,7 @@
DELETE_FLAG DELETE_FLAG
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #documentDate#, #prodNo#, #prodNoOld#, #productionOrderNo#, #whCode#, #whName#, #companyCode#, #depCode#, #documentDate#, #prodNo#, #prodNoOld#, #productionOrderNo#, #whCode#, #whName#,
#inventType#, #inventCode#, #inventName#, #amount#, #weight#, #remark#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#, #remark#,
#createdBy#, #createdName#, #createdTime#, 0 #createdBy#, #createdName#, #createdTime#, 0
) )
</insert> </insert>
...@@ -140,6 +153,7 @@ ...@@ -140,6 +153,7 @@
INVENT_TYPE = #inventType#, <!-- 存货类型 --> INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 --> INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 --> INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
AMOUNT = #amount#, <!-- 数量 --> AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 --> WEIGHT = #weight#, <!-- 重量 -->
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
...@@ -157,6 +171,7 @@ ...@@ -157,6 +171,7 @@
WH_CODE AS "whCode", WH_CODE AS "whCode",
INVENT_TYPE AS "inventType", INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode", INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(AMOUNT), 0) AS "amount", COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight" COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC003 FROM ${hpjxSchema}.T_HPKC003
...@@ -164,7 +179,7 @@ ...@@ -164,7 +179,7 @@
<isNotEmpty prepend=" AND " property="createdTimeFrom"> <isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo# CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty> </isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select> </select>
</sqlMap> </sqlMap>
...@@ -184,7 +184,7 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -184,7 +184,7 @@ public class ServiceHPSC003 extends ServiceBase {
DaoUtils.update("HPSC003.update", HPSC003.toMap()); DaoUtils.update("HPSC003.update", HPSC003.toMap());
//生成生产订单 //生成生产订单
HashMap params = new HashMap(); HashMap params = new HashMap();
params.put("parentPrdtCode",HPSC003.getId()); params.put("parentPrdtCode",HPSC003.getPlanInfoNo());
List list = dao.query("HPSC004.queryDetail",params,0,-999999); List list = dao.query("HPSC004.queryDetail",params,0,-999999);
for (int i = 0; i < list.size(); i ++) { for (int i = 0; i < list.size(); i ++) {
HPSC004 HPSC004 = (HPSC004) list.get(i); HPSC004 HPSC004 = (HPSC004) list.get(i);
......
let inventNameGlobalData = []; let inventNameGlobalData = [];
let whNameGlobalData = [];
$(function () { $(function () {
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
...@@ -11,42 +13,29 @@ $(function () { ...@@ -11,42 +13,29 @@ $(function () {
pageSizes: [10, 20, 30, 50, 100, 200], pageSizes: [10, 20, 30, 50, 100, 200],
}, },
columns: [{ columns: [{
field: "inventCode", field: "whCode",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let i = 0; i < whNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) { if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) {
return inventNameGlobalData[i]['textField']; return whNameGlobalData[i]['textField'];
} }
} }
return ""; return "";
}, },
editor: function (container, options) { editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid"); let inInfo = new EiInfo();
var cellIndex = grid.cellIndex(container); inInfo.set("inqu_status-0-inventTypes", [3, 4]);
var input = $('<input />'); inInfo.set("inqu_status-0-whType", options.model["inventType"]);
input.attr("name", options.field); inInfo.set("serviceName", "HPPZ007");
input.attr("id", options.field); inInfo.set("methodName", "queryComboBox");
input.appendTo(container); inInfo.set("blockId", "wh_record_block_id");
let eiInfo = new EiInfo(); inInfo.set("field", options.field);
eiInfo.set("inventType", options.model["inventType"]); refreshSelect(container, inInfo);
var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
inventNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
dataSource: dataSource,
template: "#=textField#"
});
} }
}] }],
loadComplete: function (grid) {
// 此grid对象
}
} }
}); });
...@@ -55,8 +44,17 @@ $(function () { ...@@ -55,8 +44,17 @@ $(function () {
* 页面加载时执行 * 页面加载时执行
*/ */
$(window).load(function () { $(window).load(function () {
// 存货名称 // 仓库名称
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [3, 4]);
EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, {
onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 存货名称
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, { EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows(); inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
......
...@@ -43,20 +43,17 @@ ...@@ -43,20 +43,17 @@
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true" <EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn cname="仓库名称" ename="whCode" columnTemplate="#=textField#" <EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
itemTemplate="#=textField#" blockName="wh_record_block_id" <EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}"
textField="textField" valueField="valueField" readonly="true"
align="center" filter="contains" width="100">
</EF:EFComboColumn>
<EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}" enable="false"
sumType="all" readonly="true"/> sumType="all" readonly="true"/>
<EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}" enable="false" <EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}"
sumType="all" readonly="true"/> sumType="all" readonly="true"/>
<EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center" enable="false"> <EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn cname="存货代码" ename="inventCode" width="120" align="center" enable="false"/> <EF:EFColumn cname="存货代码" ename="inventCode" width="120" align="center" enable="false"/>
<EF:EFColumn cname="存货名称" ename="inventName" width="120" align="center" enable="false"/> <EF:EFColumn cname="存货名称" ename="inventName" width="120" align="center" enable="false"/>
<EF:EFColumn ename="inventRecordId" cname="存货档案ID" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" editType="textarea" readonly="true"/> <EF:EFColumn ename="remark" cname="备注" width="150" editType="textarea" readonly="true"/>
<EF:EFColumn cname="原生产单号" ename="ProdNoOld" enable="false" width="140" align="center"/> <EF:EFColumn cname="原生产单号" ename="ProdNoOld" enable="false" width="140" align="center"/>
<EF:EFColumn cname="创建人名称" ename="createdName" enable="false" width="120" align="center"/> <EF:EFColumn cname="创建人名称" ename="createdName" enable="false" width="120" align="center"/>
......
...@@ -7,7 +7,7 @@ $(function () { ...@@ -7,7 +7,7 @@ $(function () {
$("#inqu_status-0-orgNo").on("click", function () { $("#inqu_status-0-orgNo").on("click", function () {
JSColorbox.open({ JSColorbox.open({
href: "HPSC098?methodName=initLoad", href: "HPSC098?methodName=initLoad&isInput",
title: "<div style='text-align: center;'>选择组织</div>", title: "<div style='text-align: center;'>选择组织</div>",
width: "40%", width: "40%",
height: "70%", height: "70%",
...@@ -26,20 +26,20 @@ $(function () { ...@@ -26,20 +26,20 @@ $(function () {
/** /**
* 生产入库单 * 生产入库单
*/ */
let generateRK = function () { generateRK = function () {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length < 1) { if (rows.length < 1) {
message("请选择数据"); message("请选择数据");
return; return;
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据\"取消\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成\"入库\"? ", {
ok: function () { ok: function () {
parent.JSColorbox.setValueCallback(rows); parent.JSColorbox.setValueCallback(rows);
} }
}); });
} }
let getOrgCallback = function (orgId) { getOrgCallback = function (orgId) {
$("#inqu_status-0-orgNo").val(orgId); $("#inqu_status-0-orgNo").val(orgId);
JSColorbox.close(); JSColorbox.close();
} }
\ No newline at end of file
...@@ -21,10 +21,7 @@ ...@@ -21,10 +21,7 @@
<EF:EFInput blockId="inqu_status" ename="productionOrderNo" cname="生产订单号:" row="0"/> <EF:EFInput blockId="inqu_status" ename="productionOrderNo" cname="生产订单号:" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" format="yyyy-MM-dd" /> <EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" format="yyyy-MM-dd" />
<EF:EFInput blockId="inqu_status" ename="orgNo" cname="生产组:" row="0"/> <EF:EFInput blockId="inqu_status" ename="orgNo" cname="生产组:" row="0"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0" defaultValue=""> <EF:EFInput blockId="inqu_status" ename="status" row="0" value="1" hidden="true"/>
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="已派工" value="1"/>
</EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%> <%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/> <EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center"> <EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="prdtCode" required="true" cname="产品名称"/> <EF:EFColumn ename="prdtCode" required="true" cname="产品名称"/>
......
...@@ -49,8 +49,8 @@ $(function () { ...@@ -49,8 +49,8 @@ $(function () {
detailGrid.setEiBlock(block); detailGrid.setEiBlock(block);
} }
var info = new EiInfo() var info = new EiInfo()
var parentPrdtCode = e.model['id']; var planInfoNo = e.model['planInfoNo'];
info.set("parentPrdtCode",parentPrdtCode); info.set("parentPrdtCode",planInfoNo);
EiCommunicator.send("HPSC004","queryDetail",info,{ EiCommunicator.send("HPSC004","queryDetail",info,{
onSuccess:function(ei){//返回结果集 onSuccess:function(ei){//返回结果集
detailGrid.setEiInfo(ei); detailGrid.setEiInfo(ei);
......
...@@ -7,7 +7,7 @@ $(function () { ...@@ -7,7 +7,7 @@ $(function () {
$("#inqu_status-0-orgNo").on("click", function () { $("#inqu_status-0-orgNo").on("click", function () {
JSColorbox.open({ JSColorbox.open({
href: "HPSC098?methodName=initLoad", href: "HPSC098?methodName=initLoad&isInput",
title: "<div style='text-align: center;'>选择组织</div>", title: "<div style='text-align: center;'>选择组织</div>",
width: "40%", width: "40%",
height: "70%", height: "70%",
...@@ -32,19 +32,19 @@ $(function () { ...@@ -32,19 +32,19 @@ $(function () {
callbackName: assignCallback callbackName: assignCallback
}); });
//分派可修改,不做判断 //分派可修改,不做判断
/*let num = 0; let num = 0;
rows.forEach(function(element) { rows.forEach(function(element) {
if (element.status == 1) { if (element.status == 1) {
num++; num++;
} }
ids.push(element.id) ids.push(element.id)
}); });
if (num > 0) { // if (num > 0) {
message("勾选的数据中有已经分派的数据!"); // message("勾选的数据中有已经分派的数据!");
return; // return;
} else { // } else {
//
}*/ // }
}); });
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single,row">
<EF:EFColumn ename="orgId" cname="内码" hidden="true"/> <EF:EFColumn ename="orgId" cname="内码" hidden="true"/>
<EF:EFColumn ename="orgEname" cname="组织编码" enable="false" width="130" align="center"/> <EF:EFColumn ename="orgEname" cname="组织编码" enable="false" width="130" align="center"/>
<EF:EFColumn cname="组织名称" ename="orgCname" width="100" readonly="false" align="center"/> <EF:EFColumn cname="组织名称" ename="orgCname" width="100" readonly="false" 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