Commit 9b4d14a0 by liuyang

2024-08-22

1、销售管理添加部件逻辑调整,
2、物料清单不能修改部件并且部件总量部不根据零件重量汇总
3、报工删除同步删除生产入库
parent 12d7ea33
......@@ -105,6 +105,7 @@ public class HPKC003 extends DaoEPBase {
public static final String INSERT = "HPKC003.insert";
public static final String UPDATE = "HPKC003.update";
public static final String DELETE = "HPKC003.delete";
public static final String DELETE_PROJ_CODE = "HPKC003.deleteByProdNo";
private Long id; /* ID*/
private String companyCode = " "; /* 企业编码 预留*/
......
......@@ -180,6 +180,10 @@
UPDATE ${hpjxSchema}.T_HPKC003 SET DELETE_FLAG = 1 WHERE ID = #id#
</update>
<update id="deleteByProdNo">
UPDATE ${hpjxSchema}.T_HPKC003 SET DELETE_FLAG = 1 WHERE PROD_NO = #prodNo#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPKC003
......
......@@ -238,7 +238,7 @@ public class HPKCTools {
HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
HPKC003 newKc003 = BeanUtils.copy(dbSc005b, HPKC003.class);
newKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
newKc003.setProdNo(hpsc106.getProdNo());
newKc003.setDocumentDate(DateUtils.shortDate());
newKc003.setWhCode(mapList.get(0).get("whCode"));
newKc003.setWhName(mapList.get(0).get("whName"));
......@@ -255,6 +255,40 @@ public class HPKCTools {
HPKCTools.updateProdStock(newKc003.getWhCode(), newKc003.getProdOrderNo(),
newKc003.getAmount(), newKc003.getWeight(),fSc005b.getFactoryCode());
}
public static void deleteHpKc003(List<Map> resultRows) {
//List<Map> resultRows = eiInfo.getBlock(EiConstant.resultBlock).getRows();
List<String> prodNos = ObjectUtils.listKey(resultRows, "prodNo"); //生产单号
List<String> prodOrderNos = ObjectUtils.listKey(resultRows, "prodOrderNo"); //生产订单号
// 锁库存
HPKCTools.HpKc003.lock(prodNos);
// 锁生产计划明细
HPSCTools.HpSc004.lock(prodOrderNos);
// 查询数据
Map<String, HPKC003> dbKc003Map = HPKCTools.HpKc003.map(prodNos);
for (Map resultRow : resultRows) {
HPSC106 hpsc106 = new HPSC106();
hpsc106.fromMap(resultRow);
DaoUtils.update(HPKC003.DELETE_PROJ_CODE, hpsc106);
// 生产一条负数量和产量的红冲记录
HPKC003 dbKc003 = dbKc003Map.get(hpsc106.getProdNo());
HPKC003 newKc003 = BeanUtils.copy(dbKc003, HPKC003.class);
newKc003.setAmount(dbKc003.getAmount().negate());
newKc003.setWeight(dbKc003.getWeight().negate());
newKc003.setDeleteFlag(1);
newKc003.setProdNoOld(hpsc106.getProdNo());
newKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert(HPKC003.INSERT, newKc003);
// 同步生产计划
//HPSCTools.syncPlan(newKc003.getProdOrderNo(), newKc003.getAmount());
HPSCTools.syncPlan(newKc003.getProdOrderNo(), newKc003.getAmount(), newKc003.getWeight());
// 更新生产任务已完成数量
HPSCTools.HpSc005a.updateCompleteNum(newKc003.getProdTaskNo(), newKc003.getAmount());
// 修改库存
HPKCTools.updateProdStock(newKc003.getWhCode(), newKc003.getProdOrderNo(),
newKc003.getAmount(), newKc003.getWeight(),newKc003.getFactoryCode());
}
}
}
/**
......
......@@ -68,6 +68,7 @@ public class HPSC002 extends DaoEPBase {
public static final String FIELD_CKNUM = "cknum"; /* 树的层级*/
public static final String FIELD_RKNUM = "rknum"; /* 树的层级*/
public static final String FIELD_QUANTITY = "quantity";
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
......@@ -170,6 +171,7 @@ public class HPSC002 extends DaoEPBase {
private Integer rknum;/* 出库数量*/
private Integer projStatus;/* app项目状态*/
private BigDecimal quantity = new BigDecimal(0);
/**
* initialize the metadata.
*/
......@@ -363,6 +365,11 @@ public class HPSC002 extends DaoEPBase {
eiColumn.setDescName("APP项目状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -1033,6 +1040,14 @@ public class HPSC002 extends DaoEPBase {
this.cknum = cknum;
}
public BigDecimal getQuantity() {
return quantity;
}
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
/**
* get the value from Map.
*
......@@ -1084,6 +1099,7 @@ public class HPSC002 extends DaoEPBase {
setPgStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PGSTATUS)), pgStatus));
setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate));
setProjStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PROJ_STATUS)), projStatus));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
}
/**
......@@ -1135,6 +1151,7 @@ public class HPSC002 extends DaoEPBase {
map.put(FIELD_PGSTATUS, StringUtils.toString(pgStatus, eiMetadata.getMeta(FIELD_PGSTATUS)));
map.put(FIELD_DELIVERY_DATE,StringUtils.toString(deliveryDate,eiMetadata.getMeta(FIELD_DELIVERY_DATE)));
map.put(FIELD_PROJ_STATUS, StringUtils.toString(projStatus, eiMetadata.getMeta(FIELD_PROJ_STATUS)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
return map;
}
}
......@@ -29,6 +29,7 @@ public class HPSC005B extends HPSC005 {
public static final String FIELD_COMPLETE_NUM = "completeNum"; /* 已完成数量*/
public static final String FIELD_UN_COMPLETE_NUM = "unCompleteNum"; /* 剩余数量*/
public static final String FIELD_ZL_PROD_TASK_NO = "zlprodTaskNo"; /* 质检单任务号*/
public static final String FIELD_IS_COMPLETE = "isComplete";
public static final String COL_CHILD_ID = "CHILD_ID";
public static final String COL_PROD_TASK_NO = "PROD_TASK_NO";
......@@ -49,6 +50,7 @@ public class HPSC005B extends HPSC005 {
private BigDecimal completeNum = new BigDecimal(0.000); /* 已完成数量*/
private BigDecimal unCompleteNum = new BigDecimal(0.000); /* 剩余数量*/
private String zlprodTaskNo = " ";
private Integer isComplete = 0;
/**
* the constructor.
......@@ -93,6 +95,10 @@ public class HPSC005B extends HPSC005 {
eiColumn = new EiColumn(FIELD_ZL_PROD_TASK_NO);
eiColumn.setDescName("质检单任务号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_IS_COMPLETE);
eiColumn.setDescName("状态");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -161,6 +167,13 @@ public class HPSC005B extends HPSC005 {
public void setZlProdTaskNo(String zlprodTaskNo) {
this.zlprodTaskNo = zlprodTaskNo;
}
public Integer getIsComplete() {
return isComplete;
}
public void setIsComplete(Integer isComplete) {
this.isComplete = isComplete;
}
/**
* get the value from Map.
*
......@@ -175,6 +188,7 @@ public class HPSC005B extends HPSC005 {
setCompleteNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COMPLETE_NUM)), completeNum));
setUnCompleteNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UN_COMPLETE_NUM)), unCompleteNum));
setZlProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ZL_PROD_TASK_NO)), zlprodTaskNo));
setIsComplete(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_IS_COMPLETE)), isComplete));
}
/**
......@@ -190,6 +204,7 @@ public class HPSC005B extends HPSC005 {
map.put(FIELD_COMPLETE_NUM, StringUtils.toString(completeNum, eiMetadata.getMeta(FIELD_COMPLETE_NUM)));
map.put(FIELD_UN_COMPLETE_NUM, StringUtils.toString(unCompleteNum, eiMetadata.getMeta(FIELD_UN_COMPLETE_NUM)));
map.put(FIELD_ZL_PROD_TASK_NO, StringUtils.toString(zlprodTaskNo, eiMetadata.getMeta(FIELD_ZL_PROD_TASK_NO)));
map.put(FIELD_IS_COMPLETE, StringUtils.toString(isComplete, eiMetadata.getMeta(FIELD_IS_COMPLETE)));
return map;
}
}
......@@ -47,6 +47,7 @@ public class HPSC106 extends DaoEPBase {
public static final String FIELD_updated_by = "updatedBy"; /* 更改人*/
public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/
public static final String FIELD_updated_time = "updatedTime"; /* 修改时间*/
public static final String FIELD_PROD_NO = "prodNo"; /* 生产单号*/
//补充字段
public static final String FIELD_registered_quantity = "registeredQuantity";
......@@ -80,6 +81,7 @@ public class HPSC106 extends DaoEPBase {
public static final String COL_updated_by = "updated_by"; /* 更改人*/
public static final String COL_updated_name = "updated_name"; /* 修改人名称*/
public static final String COL_updated_time = "updated_time"; /* 修改时间*/
public static final String COL_PROD_NO = "PROD_NO"; /* 生产单号*/
public static final String QUERY = "HPSC106.query";
public static final String COUNT = "HPSC106.count";
......@@ -113,6 +115,7 @@ public class HPSC106 extends DaoEPBase {
private String updatedBy = " "; /* 更改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private String prodNo = " "; /* 生产单号*/
private BigDecimal registeredQuantity = new BigDecimal("0");
private BigDecimal registeredWeight = new BigDecimal(0);
......@@ -317,6 +320,10 @@ public class HPSC106 extends DaoEPBase {
eiColumn.setFieldLength(20);
eiColumn.setDescName("任务重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_NO);
eiColumn.setDescName("生产单号");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -719,6 +726,14 @@ public class HPSC106 extends DaoEPBase {
this.workCode = workCode;
}
public String getProdNo() {
return prodNo;
}
public void setProdNo(String prodNo) {
this.prodNo = prodNo;
}
/**
* get the value from Map.
*
......@@ -752,6 +767,7 @@ public class HPSC106 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_by)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_name)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_time)), updatedTime));
setProdNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_NO)), prodNo));
setRegisteredQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_registered_quantity)), registeredQuantity));
setRegisteredWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_registered_weight)), registeredWeight));
......@@ -793,6 +809,7 @@ public class HPSC106 extends DaoEPBase {
map.put(FIELD_updated_by, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_updated_by)));
map.put(FIELD_updated_name, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_updated_name)));
map.put(FIELD_updated_time, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_updated_time)));
map.put(FIELD_PROD_NO, StringUtils.toString(prodNo, eiMetadata.getMeta(FIELD_PROD_NO)));
map.put(FIELD_registered_quantity, StringUtils.toString(registeredQuantity, eiMetadata.getMeta(FIELD_registered_quantity)));
map.put(FIELD_registered_weight, StringUtils.toString(registeredWeight, eiMetadata.getMeta(FIELD_registered_weight)));
......
......@@ -140,7 +140,6 @@ public class ServiceHPSC101 extends ServiceEPBase {
this.modify(hpsc001);
}
}
inInfo = this.query(inInfo);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
......
......@@ -209,7 +209,9 @@ public class ServiceHPSC102 extends ServiceEPBase {
// if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) {
// hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
// }
hpsc002.setSpec(HPPZTools.HpPz006.jointSpec(hpsc002.getLength(),hpsc002.getWidth(),hpsc002.getThick()));
if (hpsc002.getSpec().trim().isEmpty()){
hpsc002.setSpec(HPPZTools.HpPz006.jointSpec(hpsc002.getLength(),hpsc002.getWidth(),hpsc002.getThick()));
}
if(hpsc002.getParentId().equals("root")){
hpsc002.setLv(new Integer(1));
}else{
......@@ -221,7 +223,7 @@ public class ServiceHPSC102 extends ServiceEPBase {
//更新零件后,更新部件重量
if(hpsc002.getPrdtType()==3){
this.updatePrdtWt(hpsc002.getParentId());
//this.updatePrdtWt(hpsc002.getParentId());
}
if (!hpsc002.getParentId().equals("root")) {
this.checkTreeNodeLeaf(hpsc002.getParentId());
......@@ -505,11 +507,14 @@ public class ServiceHPSC102 extends ServiceEPBase {
//BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()/1000));
//hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
//hppz002.setTotalWt(totalWt);
hppz002.setSpec(HPPZTools.HpPz006.jointSpec(hppz002.getLength(),hppz002.getWidth(),hppz002.getThick()));
if (hppz002.getSpec().trim().isEmpty()){
hppz002.setSpec(HPPZTools.HpPz006.jointSpec(hppz002.getLength(),hppz002.getWidth(),hppz002.getThick()));
}
DaoUtils.update(HPSC002.UPDATE, hppz002.toMap());
//更新零件后,更新部件重量
if(hppz002.getPrdtType()==3){
this.updatePrdtWt(hppz002.getParentId());
//this.updatePrdtWt(hppz002.getParentId());
}
}
......
......@@ -102,6 +102,7 @@ public class ServiceHPSC105B extends ServiceEPBase {
hpsc106.setFactoryName(dbSc005b.getFactoryName());
hpsc106.setProdTaskNo(dbSc005b.getProdTaskNo());
hpsc106.setProdOrderNo(dbSc005b.getProdOrderNo());
hpsc106.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
hpsc106.setRegisterDate(StringUtil.removeHorizontalLine(resultMap.get(HPSC106.FIELD_register_date).toString()));
//hgsc008.setTotalWeight(hgsc007.getSingleWeight().multiply(new BigDecimal(hpsc106.getQuantity())));
checkAddDate(hpsc106);
......
......@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.sc.domain.HPSC106;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
......@@ -53,8 +54,9 @@ public class ServiceHPSC106 extends ServiceEPBase {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 销售单号
List<Long> ids = ObjectUtils.listKey(resultRows, HPSC106.FIELD_ID);
//checkDeleteDate(ids);
DaoUtils.update(HPSC106.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
HPKCTools.HpKc003.deleteHpKc003(resultRows);
//HGZLTools.THGZL002.deleteByWorkIds(ids);
/*ids.forEach( id -> {
HGSCTools.THGSC099.deleteByMatId(id, HGConstant.FileBizType.SCBG);
......
......@@ -38,7 +38,8 @@
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
DELIVERY_DATE as "deliveryDate"
DELIVERY_DATE as "deliveryDate",
QUANTITY as "quantity"
</sql>
<sql id="column1">
......@@ -78,7 +79,8 @@
A.WIDTH as "width", <!-- 宽 -->
A.THICK as "thick", <!-- 厚 -->
B.STATUS as "pgStatus", <!-- 派工状态 -->
A.DELIVERY_DATE as "deliveryDate"
A.DELIVERY_DATE as "deliveryDate",
A.QUANTITY as "quantity"
</sql>
<sql id="condition">
......@@ -281,12 +283,13 @@
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
DELIVERY_DATE )
DELIVERY_DATE,
QUANTITY )
VALUES (#id#, #companyCode#, #depCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#,
#type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#,
#unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#,
#delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#, #lv#, #spec#,
#length#, #width#, #thick#, #deliveryDate#)
#length#, #width#, #thick#, #deliveryDate#, #quantity#)
</insert>
<!-- 删除 -->
......@@ -336,7 +339,8 @@
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
DELIVERY_DATE = #deliveryDate#
DELIVERY_DATE = #deliveryDate#,
QUANTITY = #quantity#
WHERE
ID = #id#
</update>
......
......@@ -40,7 +40,11 @@
B.ORG_NO as "orgNo",
B.ORG_NAME as "orgName",
C.PROD_TASK_NO as "zlprodTaskNo",
A.DELIVERY_DATE as "deliveryDate"
A.DELIVERY_DATE as "deliveryDate",
case when B.NUM - B.COMPLETE_NUM = 0 then 2
when B.NUM - B.COMPLETE_NUM &gt; 0 then 1
else 0
end as "isComplete"
</sql>
<sql id="authCondition">
......@@ -121,9 +125,12 @@
A.STATUS IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty>
<isEqual prepend=" AND " property="isComplete" compareValue="0">
B.NUM - B.COMPLETE_NUM &gt; 0
B.COMPLETE_NUM = 0
</isEqual>
<isEqual prepend=" AND " property="isComplete" compareValue="1">
B.NUM - B.COMPLETE_NUM &gt; 0
</isEqual>
<isEqual prepend=" AND " property="isComplete" compareValue="2">
B.NUM - B.COMPLETE_NUM = 0
</isEqual>
</sql>
......
......@@ -58,7 +58,8 @@
created_time as "createdTime", <!-- 创建时间 -->
updated_by as "updatedBy", <!-- 更改人 -->
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime" <!-- 修改时间 -->
updated_time as "updatedTime", <!-- 修改时间 -->
prod_no as "prodNo"
</sql>
<sql id="condition">
......@@ -137,6 +138,12 @@
<isNotEmpty prepend=" AND " property="updatedTime">
updated_time = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodNo">
prod_no = #prodNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodNos">
prod_no IN <iterate close=")" open="(" conjunction="," property="prodNos">#prodNos[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HPSC106">
......@@ -260,12 +267,13 @@
created_time, <!-- 创建时间 -->
updated_by, <!-- 更改人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 修改时间 -->
updated_time, <!-- 修改时间 -->
prod_no
)
VALUES (#id#, #companyCode#, #depCode#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #projCode#,
#projName#, #prodOrderNo#, #prodTaskNo#, #workCode#, #productType#, #productCode#, #productName#,
#registerDate#, #quantity#, #singleWeight#, #totalWeight#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#)
#updatedBy#, #updatedName#, #updatedTime#, #prodNo#)
<selectKey resultClass="java.lang.Long" keyProperty="id">
SELECT MAX(ID) FROM ${hpjxSchema}.T_HPSC106
</selectKey>
......@@ -306,7 +314,8 @@
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更改人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 修改时间 -->
updated_time = #updatedTime#, <!-- 修改时间 -->
prod_no = #prodNo#
WHERE
ID = #id#
</update>
......
......@@ -415,7 +415,8 @@ function saveDetail() {
let prdtType= item.get("prdtType");
let prdtName= item.get("prdtName");
let num= item.get("num");
let unitWt= item.get("unitWt");
let quantity= item.get("quantity");
let totalWt= item.get("totalWt");
if(isBlank(prdtType)){
message("选中的第"+(index+1)+"行\"部件类型\",不能为空!");
flag = false;
......@@ -431,8 +432,13 @@ function saveDetail() {
flag = false;
return;
}
if(isBlank(unitWt)){
message("选中的第"+(index+1)+"行\"单重\",不能为空!");
if (!isPositiveInteger(quantity)) {
message("勾选的第" + (index + 1) + "行\"数量\"必须是大于0的整数");
flag = false;
return;
}
if(isBlank(totalWt)){
message("选中的第"+(index+1)+"行\"总重\",不能为空!");
flag = false;
return false;
}
......@@ -449,7 +455,7 @@ function saveDetail() {
//JSUtils.submitGridsData("detail", "HPSC002", "saveDetail", true);
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail"));
EiCommunicator.send("HPSC002", "saveDetail", info, {
EiCommunicator.send("HPSC102", "saveDetail", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
var info = new EiInfo()
......
......@@ -90,24 +90,30 @@
</EF:EFComboColumn>
<EF:EFColumn ename="prdtCode" cname="部件编码" hidden='true'/>
<EF:EFColumn ename="prdtName" cname="部件名称" width="140" align="center" maxLength="50" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/>
<EF:EFColumn ename="length" cname="长(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/" hidden = "true"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/" hidden = "true"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/" hidden = "true"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn ename="deliveryDate" cname="交货日期" width="100" editType="date" required='true' align="center"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="num" cname="数量" maxLength="15" displayType="0.000" format="{0:N0}%" required="true"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" defaultValue="100"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" defaultValue="100" hidden = "true"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/>
<EF:EFColumn ename="quantity" cname="数量" maxLength="15" width="120" displayType="0.000" format="{0:N0}" required="true"
data-regex="/^-?[0-9]{1,15}?$/" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="unitWt" format="{0:N3}" cname="单重(T)" maxLength="15" displayType="0.000" required="true"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" defaultValue="0" hidden = "true"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}" defaultValue="0" hidden="true"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="true" width="120" align="right" format="{0:N3}" required="true"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/>
<EF:EFColumn ename="remark" cname="备注" editType="textarea"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -110,9 +110,13 @@ $(function () {
* e.tr 行的tr,包括固定列和数据列 jquery对象
*/
onCheckRow: function (e) {
if (e.checked) {
console.log('选中');
let lv = IPLATUI.EFTree.materialTree.selectTreeNode.lv;
if (lv === '1'){
resultGrid.setUnCheckedRows(e.row);
}
/* if (e.checked) {
console.log('选中');
}*/
},
/**
* EFGrid新增行之前触发的事件,可以根据业务逻辑控制是否进行新增
......@@ -131,7 +135,15 @@ $(function () {
title: '提示'
});
e.preventDefault();
} else {
}else if (lv === "1"){
/*IPLAT.alert({
message: '<b>不能在物料清单下进行新增部件</b>',
okFn: function (e) {
},
title: '提示'
});*/
e.preventDefault();
}else {
if (logic) { // 通过业务逻辑判断, 控制是否进行新增
IPLAT.alert({
message: '<b>请选择项目列表</b>',
......
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