Commit 01f88f00 by liuyang

2024-06-28 采购添加存货类型大类

parent 8a671043
......@@ -92,7 +92,7 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框 (不默认状态)
* 编写:
*/
INVENT_RECORD_BOX_BLOCK_ID("invent_record_box_block_id","inventCode","inventName","status","id","inventType","spec","material","unit", "length", "width", "thick","inventTypeDetail","HGPZ005.queryInventCodeBox"),
INVENT_RECORD_BOX_BLOCK_ID("invent_record_box_block_id","inventCode","inventName","inventTypeDetail","id","inventType","spec","material","unit", "length", "width", "thick","COEFFICIENT","HGPZ005.queryInventCodeBox"),
/**
* 模块:存货档案
......
......@@ -62,7 +62,7 @@ public enum InventTypeDetailEnum {
}
public static Integer[] getInentTypeThree(){
return new Integer[]{RAW.code,CONSUMABLE.code,CONSUMABLE.code,SEMI_FINISHED_PRODUCT.code};
return new Integer[]{RAW.code,CONSUMABLE.code,SEMI_FINISHED_PRODUCT.code};
}
public static Integer[] getProdTypeFour(){
......
......@@ -61,6 +61,7 @@ public class HGCG002 extends DaoEPBase {
public static final String FIELD_AUDIT_USER_ID = "auditUserId"; /* 审核人ID*/
public static final String FIELD_AUDIT_USER_NAME = "auditUserName"; /* 审核人名称*/
public static final String FIELD_AUDIT_REASON = "auditReason"; /* 审核原因*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额(不含税金额)*/
......@@ -159,6 +160,7 @@ public class HGCG002 extends DaoEPBase {
private String auditUserId = " "; /* 审核人ID*/
private String auditUserName = " "; /* 审核人名称*/
private String auditReason = " "; /* 审核原因*/
private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
private BigDecimal price = new BigDecimal(0.000); /* 单价*/
private BigDecimal amount = new BigDecimal(0.000); /* 金额(不含税金额)*/
......@@ -387,6 +389,10 @@ public class HGCG002 extends DaoEPBase {
eiColumn.setFieldLength(20);
eiColumn.setDescName("税率");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -1061,6 +1067,14 @@ public class HGCG002 extends DaoEPBase {
this.taxRate = taxRate;
}
public Integer getInventTypeDetail() {
return inventTypeDetail;
}
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the value from Map.
*
......@@ -1113,6 +1127,7 @@ public class HGCG002 extends DaoEPBase {
setTaxIncludeAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_INCLUDE_AMOUNT)), taxIncludeAmount));
setTaxAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_AMOUNT)), taxAmount));
setTaxRate(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_RATE)), taxRate));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
}
/**
......@@ -1166,6 +1181,7 @@ public class HGCG002 extends DaoEPBase {
map.put(FIELD_TAX_INCLUDE_AMOUNT, StringUtils.toString(taxIncludeAmount, eiMetadata.getMeta(FIELD_TAX_INCLUDE_AMOUNT)));
map.put(FIELD_TAX_AMOUNT, StringUtils.toString(taxAmount, eiMetadata.getMeta(FIELD_TAX_AMOUNT)));
map.put(FIELD_TAX_RATE, StringUtils.toString(taxRate, eiMetadata.getMeta(FIELD_TAX_RATE)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
return map;
}
......
......@@ -60,6 +60,7 @@ public class HGCG003 extends DaoEPBase {
public static final String FIELD_STATUS = "status"; /* 状态:0-已收货,1-已入库,2-部分入库,3-退货*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -144,6 +145,7 @@ public class HGCG003 extends DaoEPBase {
private Integer status; /* 状态:0-已收货,1-已入库,2-部分入库,3-退货*/
private BigDecimal price = new BigDecimal(0.000); /* 单价*/
private BigDecimal amount = new BigDecimal(0.000); /* 金额*/
private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
/**
* initialize the metadata.
......@@ -333,6 +335,10 @@ public class HGCG003 extends DaoEPBase {
eiColumn.setFieldLength(12);
eiColumn.setDescName("金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -935,6 +941,14 @@ public class HGCG003 extends DaoEPBase {
this.amount = amount;
}
public Integer getInventTypeDetail() {
return inventTypeDetail;
}
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the value from Map.
*
......@@ -981,6 +995,7 @@ public class HGCG003 extends DaoEPBase {
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
}
/**
......@@ -1028,6 +1043,7 @@ public class HGCG003 extends DaoEPBase {
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
return map;
}
......
......@@ -46,7 +46,8 @@
AUDIT_TIME as "auditTime", <!-- 审核时间 -->
AUDIT_USER_ID as "auditUserId", <!-- 审核人ID -->
AUDIT_USER_NAME as "auditUserName", <!-- 审核人名称 -->
AUDIT_REASON as "auditReason" <!-- 审核原因 -->
AUDIT_REASON as "auditReason", <!-- 审核原因 -->
INVENT_TYPE_DETAIL as "inventTypeDetail" <!-- 存货类型明细 -->
</sql>
<sql id="qtyColumn">
......@@ -109,6 +110,12 @@
<isNotEmpty prepend=" AND " property="auditUserName">
AUDIT_USER_NAME = #auditUserName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetails">
INVENT_TYPE_DETAIL IN <iterate close=")" open="(" conjunction="," property="inventTypeDetails">#inventTypeDetails[]#</iterate>
</isNotEmpty>
</sql>
<sql id="idCondition">
......@@ -197,14 +204,15 @@
AMOUNT, <!-- 金额(不含税金额) -->
TAX_INCLUDE_AMOUNT, <!-- 含税金额 -->
TAX_AMOUNT, <!-- 税额 -->
TAX_RATE <!-- 税率 -->
TAX_RATE, <!-- 税率 -->
INVENT_TYPE_DETAIL
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #contractDate#, #contractNo#, #planNo#,
#supCode#, #supName#, #purUserId#, #purUserName#, #inventCode#, #inventName#,
#specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#purQty#, #purUnitWeight#, #purWeight#, #status#,
#price#, #amount#, #taxIncludeAmount#, #taxAmount#, #taxRate#
#price#, #amount#, #taxIncludeAmount#, #taxAmount#, #taxRate#, #inventTypeDetail#
)
</insert>
......
......@@ -40,7 +40,8 @@
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 -->
STATUS as "status" <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
STATUS as "status", <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
INVENT_TYPE_DETAIL as "inventTypeDetail" <!-- 存货类型明细 -->
</sql>
<sql id="condition">
......@@ -102,6 +103,12 @@
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetails">
INVENT_TYPE_DETAIL IN <iterate close=")" open="(" conjunction="," property="inventTypeDetails">#inventTypeDetails[]#</iterate>
</isNotEmpty>
</sql>
<sql id="idCondition">
......@@ -185,14 +192,15 @@
RECEIVE_WEIGHT, <!-- 收货重量 -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
STATUS <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
STATUS, <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
INVENT_TYPE_DETAIL
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #receiveDate#, #receiveNo#,
#planNo#, #contractNo#, #supCode#, #supName#, #purUserId#, #purUserName#,
#inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #receiveQty#, #receiveUnitWeight#,
#receiveWeight#,#price#, #amount#, #status#
#receiveWeight#,#price#, #amount#, #status#,#inventTypeDetail#
)
</insert>
......
......@@ -120,7 +120,7 @@ public class HGKC010 extends DaoEPBase {
private BigDecimal invWeight = new BigDecimal(0.000); /* 库存重量*/
private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
private String inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
/**
* initialize the metadata.
......@@ -741,11 +741,11 @@ public class HGKC010 extends DaoEPBase {
this.factoryName = factoryName;
}
public String getInventTypeDetail() {
public Integer getInventTypeDetail() {
return inventTypeDetail;
}
public void setInventTypeDetail(String inventTypeDetail) {
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
......@@ -786,7 +786,7 @@ public class HGKC010 extends DaoEPBase {
setInvWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INV_WEIGHT)), invWeight));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setInventTypeDetail(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
}
/**
......
......@@ -2,11 +2,13 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -40,6 +42,7 @@ public class ServiceHGKC006A extends ServiceBase {
map.put(HGKC006A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC006A.FIELD_WH_CODE, whCode);
map.put(HGKC006A.FIELD_COMPANY_CODE, companyCode);
map.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_RECORD_BLOCK_ID,DdynamicEnum.INVENT_SPEC_BOX_BLOCK_ID),map,false
);
......
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC008;
import com.baosight.hggp.hg.kc.domain.HGKC008A;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -31,6 +33,7 @@ public class ServiceHGKC008A extends ServiceBase {
Map map = new HashMap();
map.put(HGKC008A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC008A.FIELD_WH_CODE, whCode);
map.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getInentTypeThree());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false
);
......
......@@ -112,7 +112,7 @@ public class ServiceHGKC013A extends ServiceEPBase {
if ( result > 0){
throw new PlatException("实时库存数量不够,无法保存!");
}
hgkc013a.setInventTypeDetail(Integer.parseInt(hgkc010.getInventTypeDetail()));
hgkc013a.setInventTypeDetail(hgkc010.getInventTypeDetail());
}
if (hgkc013a.getId() == null || hgkc013a.getId() == 0) {
this.add(hgkc013a);
......
......@@ -230,7 +230,7 @@
</select>
<!--存货名称下拉框-->
<select id="queryInventCodeBox" resultClass="java.util.HashMap">
<select id="queryInventCodeBox" resultClass="com.baosight.hggp.hg.kc.domain.HGKC010">
SELECT distinct
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
......
......@@ -269,6 +269,8 @@ public class ServiceHGPZ005 extends ServiceBase {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ005.FIELD_STATUS,1);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
......
......@@ -328,7 +328,7 @@
ORDER BY INVENT_CODE
</select>
<select id="queryInventCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
<select id="queryInventCodeBox" parameterClass="java.util.HashMap" resultClass="HGPZ005">
SELECT DISTINCT
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName",
......@@ -337,11 +337,12 @@
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
ifnull(LENGTH,0) as "length", <!-- 长 -->
ifnull(WIDTH,0) as "width", <!-- 宽 -->
ifnull(THICK,0) as "thick", <!-- 厚 -->
STATUS as "status",
COEFFICIENT as "coefficient" <!-- 系数 -->
ifnull(COEFFICIENT,0) as "coefficient", <!-- 系数 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
......
......@@ -47,6 +47,7 @@ public class HGSC009A 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_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 账套*/
......@@ -107,6 +108,7 @@ public class HGSC009A extends DaoEPBase {
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private String inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
/**
* initialize the metadata.
......@@ -233,6 +235,9 @@ public class HGSC009A extends DaoEPBase {
eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
}
......@@ -643,6 +648,14 @@ public class HGSC009A extends DaoEPBase {
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
public String getInventTypeDetail() {
return inventTypeDetail;
}
public void setInventTypeDetail(String inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the value from Map.
*
......@@ -676,6 +689,7 @@ public class HGSC009A 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));
setInventTypeDetail(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
}
/**
......@@ -710,6 +724,7 @@ public class HGSC009A 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_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
return map;
}
......
......@@ -3,10 +3,12 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.AssignStatusEnum;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.*;
......@@ -44,7 +46,11 @@ public class ServiceHGSC009A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID),
new HashMap<String, Object>(){{
put(HGPZ005.FIELD_STATUS,1);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getInentTypeThree());
}}, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC009A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......@@ -238,6 +244,7 @@ public class ServiceHGSC009A extends ServiceBase {
hgcg001.setLength(hgsc009.getLength());
hgcg001.setWidth(hgsc009.getWidth());
hgcg001.setThick(hgsc009.getThick());
hgcg001.setInventTypeDetail(Integer.parseInt(hgsc009.getInventTypeDetail()));
hgcg001.setStatus(0);
hgcg001.setPlanDate(DateUtils.formatShort(DateUtils.date()));
hgcg001.setPlanUnitWeight(hgsc009.getSingleWeight());//单量
......@@ -247,7 +254,7 @@ public class ServiceHGSC009A extends ServiceBase {
hgcg001.setUnit(inventUnitMap.get(hgsc009.getInventCode()));
DaoUtils.insert(HGCG001.INSERT, hgcg001);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("操作成功!本次对[" + orderDetailIds.length + "]条数据生成采购计划成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成采购计划失败");
......
......@@ -529,9 +529,9 @@
select
a.factoryCode ,
a.factoryName ,
sum(a.dayWt) as dayWeight,
sum(a.monthWt) as monthWeight,
sum(a.yearWt) as yearWeight
ROUND(ifnull(sum(a.dayWt),0)/1000, 4) as dayWeight,
ROUND(ifnull(sum(a.monthWt),0)/1000, 4) as monthWeight,
ROUND(ifnull(sum(a.yearWt),0)/1000, 4) as yearWeight
from (
select
h2.factory_code as factoryCode ,
......@@ -578,7 +578,7 @@
</isNotEmpty>
group by h.DEPOSIT_DATE, h2.factory_code, h2.factory_name
) a
group by a.factoryCode , a.factoryName
group by a.factoryCode, a.factoryName
</select>
<!--查询工序日产量-->
<select id="queryWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
......@@ -588,7 +588,7 @@
h2.factory_name as "factoryName",
h2.process_code as "processCode",
h2.process_name as "processName",
SUM(h.INV_WEIGHT) "totalWeight"
ROUND(ifnull(SUM(h.INV_WEIGHT),0)/1000, 4) "totalWeight"
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<include refid="appCondition"/>
......@@ -607,7 +607,7 @@
h2.factory_name as "factoryName",
h2.process_code as "processCode",
h2.process_name as "processName",
SUM(h.INV_WEIGHT) "totalWeight"
ROUND(ifnull(SUM(h.INV_WEIGHT),0)/1000, 4) "totalWeight"
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<include refid="appCondition"/>
......@@ -626,7 +626,7 @@
h2.factory_name as "factoryName",
h2.process_code as "processCode",
h2.process_name as "processName",
SUM(h.INV_WEIGHT) "totalWeight"
ROUND(ifnull(SUM(h.INV_WEIGHT),0)/1000, 4) "totalWeight"
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<include refid="appCondition"/>
......@@ -642,15 +642,15 @@
select
a.proj_code as projCode,
a.proj_name as projName,
a.plan_end_date as completeDate,
sum(a.total_weight) as totalWeight,
sum(a.finish_weight) as finishWeight,
a.finish_date as completeDate,
ROUND(ifnull(sum(a.total_weight),0)/1000, 4) as totalWeight,
ROUND(ifnull(sum(a.finish_weight),0)/1000, 4) as finishWeight,
a.updated_time as updatedTime
from (
select
h.proj_code,
h.proj_name,
h.plan_end_date,
h.finish_date,
h.total_weight,
0 as finish_weight,
left(h1.updated_time,8) as updated_time
......@@ -681,7 +681,7 @@
select
h.proj_code,
h.proj_name,
h.plan_end_date,
h.finish_date,
0 as totalWeight,
h.finish_weight,
left(h1.updated_time,8) as updated_time
......@@ -709,7 +709,7 @@
left(h1.updated_time,8) = #updatedTime#
</isNotEmpty>
)a
group by a.proj_code, a.proj_name, a.plan_end_date, a.updated_time
group by a.proj_code, a.proj_name, a.finish_date, a.updated_time
order by a.updated_time desc
</select>
</sqlMap>
......@@ -137,7 +137,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.hgsj003a WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -236,32 +237,36 @@
<insert id="insert">
INSERT INTO ${hggpSchema}.hgsj003a (ID, <!-- 主键id -->
ACCOUNT_CODE, <!-- 账套 -->
DEP_CODE, <!-- 部门编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PLAN_MATERIAL_CODE, <!-- 材料计划编码 -->
PLAN_MATERIAL_NAME, <!-- 材料计划名称 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
QUANTITY, <!-- 数量 -->
SINGLE_WEIGHT, <!-- 单重 -->
GROSS_AMOUNT, <!-- 总量 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME <!-- 修改时间 -->
)
VALUES (#id#, #accountCode#, #depCode#, #companyCode#, #companyName#, #projCode#, #projName#, #planMaterialCode#, #planMaterialName#, #inventCode#, #inventName#, #spec#, #material#, #length#, #width#, #thick#, #quantity#, #singleWeight#, #grossAmount#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
ACCOUNT_CODE, <!-- 账套 -->
DEP_CODE, <!-- 部门编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PLAN_MATERIAL_CODE, <!-- 材料计划编码 -->
PLAN_MATERIAL_NAME, <!-- 材料计划名称 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
QUANTITY, <!-- 数量 -->
SINGLE_WEIGHT, <!-- 单重 -->
GROSS_AMOUNT, <!-- 总量 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
INVENT_TYPE_DETAIL
)
VALUES (#id#, #accountCode#, #depCode#, #companyCode#, #companyName#, #projCode#, #projName#,
#planMaterialCode#, #planMaterialName#, #inventCode#, #inventName#, #spec#, #material#, #length#, #width#,
#thick#, #quantity#, #singleWeight#, #grossAmount#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#,#inventTypeDetail#)
</insert>
<delete id="delete">
......@@ -272,32 +277,33 @@
<update id="update">
UPDATE ${hggpSchema}.hgsj003a
SET
ACCOUNT_CODE = #accountCode#, <!-- 账套 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PLAN_MATERIAL_CODE = #planMaterialCode#, <!-- 材料计划编码 -->
PLAN_MATERIAL_NAME = #planMaterialName#, <!-- 材料计划名称 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
MATERIAL = #material#, <!-- 材质 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
QUANTITY = #quantity#, <!-- 数量 -->
SINGLE_WEIGHT = #singleWeight#, <!-- 单重 -->
GROSS_AMOUNT = #grossAmount#, <!-- 总量 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE
ID = #id#
ACCOUNT_CODE = #accountCode#, <!-- 账套 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PLAN_MATERIAL_CODE = #planMaterialCode#, <!-- 材料计划编码 -->
PLAN_MATERIAL_NAME = #planMaterialName#, <!-- 材料计划名称 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
MATERIAL = #material#, <!-- 材质 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
QUANTITY = #quantity#, <!-- 数量 -->
SINGLE_WEIGHT = #singleWeight#, <!-- 单重 -->
GROSS_AMOUNT = #grossAmount#, <!-- 总量 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#
WHERE
ID = #id#
</update>
<update id="lock">
......@@ -339,7 +345,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.hgsj003a WHERE 1=1
<isNotEmpty prepend=" AND " property="planMaterialCode">
PLAN_MATERIAL_CODE = #planMaterialCode#
......
......@@ -53,6 +53,7 @@ public class HGZL001 extends DaoEPBase {
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-质检完成*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -123,6 +124,7 @@ public class HGZL001 extends DaoEPBase {
private BigDecimal receiveUnitWeight = new BigDecimal(0.000); /* 收货单重*/
private BigDecimal receiveWeight = new BigDecimal(0.000); /* 收货重量*/
private Integer status; /* 状态:0-质检中,1-质检完成*/
private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
/**
* initialize the metadata.
......@@ -279,7 +281,9 @@ public class HGZL001 extends DaoEPBase {
eiColumn.setDescName("状态:0-质检中,1-质检完成");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -785,6 +789,14 @@ public class HGZL001 extends DaoEPBase {
public void setStatus(Integer status) {
this.status = status;
}
public Integer getInventTypeDetail() {
return inventTypeDetail;
}
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the value from Map.
*
......@@ -824,6 +836,7 @@ public class HGZL001 extends DaoEPBase {
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));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
}
/**
......@@ -864,6 +877,7 @@ public class HGZL001 extends DaoEPBase {
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)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
return map;
}
......
......@@ -33,7 +33,8 @@
UNQUALIFY_QTY as "unqualifyQty", <!-- 不合格数量 -->
RECEIVE_UNIT_WEIGHT as "receiveUnitWeight", <!-- 收货单重 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
STATUS as "status" <!-- 状态:0-质检中,1-质检完成 -->
STATUS as "status", <!-- 状态:0-质检中,1-质检完成 -->
INVENT_TYPE_DETAIL as "inventTypeDetail" <!-- 存货类型明细 -->
</sql>
<sql id="condition">
......@@ -86,6 +87,12 @@
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetails">
INVENT_TYPE_DETAIL IN <iterate close=")" open="(" conjunction="," property="inventTypeDetails">#inventTypeDetails[]#</iterate>
</isNotEmpty>
</sql>
......@@ -163,12 +170,13 @@
RECEIVE_QTY, <!-- 收货数量 -->
RECEIVE_UNIT_WEIGHT, <!-- 收货单重 -->
RECEIVE_WEIGHT, <!-- 收货重量 -->
STATUS <!-- 状态:0-质检中,1-质检完成 -->
STATUS, <!-- 状态:0-质检中,1-质检完成 -->
INVENT_TYPE_DETAIL
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #receiptDate#, #checkNo#, #receiveNo#, #inventType#,
#inventCode#, #inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #receiveQty#,
#receiveUnitWeight#, #receiveWeight#, #status#
#receiveUnitWeight#, #receiveWeight#, #status#, #inventTypeDetail#
)
</insert>
......
......@@ -46,6 +46,7 @@
</EF:EFComboColumn>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" width="120" align="center" maxLength="100" required="true"/>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<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="sepcId" cname="规格ID" enable="false" width="120" align="center" hidden="true"/>
......
......@@ -57,6 +57,7 @@
<EF:EFColumn ename="supCode" cname="供应商编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<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"/>
......
......@@ -54,6 +54,7 @@
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hggp.hgcg.contractStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventType" cname="存货类型大类" enable="false" width="100" align="center" hidden="true"/>
<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="inventRecordId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
......
......@@ -159,6 +159,8 @@ $(function () {
if(item.inventCode === inventRecordBoxBlocks[i]['valueField']){
resultGrid.setCellValue(item, 'inventType', inventRecordBoxBlocks[i]['param1Field']);
resultGrid.setCellValue(item, 'inventName', inventRecordBoxBlocks[i]['textField']);
resultGrid.setCellValue(item, 'inventTypeDetail', inventRecordBoxBlocks[i]['param10Field']);
break
}
}
let specInInfo = new EiInfo();
......
......@@ -43,6 +43,7 @@
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventTypeDetail" cname="存货类别大类" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" width="220" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="160" align="center" required="true" enable="false"/>
<EF:EFColumn ename="partSpec" cname="规格" width="120" align="center" required="true" enable="true"/>
......
......@@ -172,6 +172,7 @@ $(function () {
resultGrid.setCellValue(item, 'invUnitWeight', inventRecordBoxBlocks[i]['param8Field']);
resultGrid.setCellValue(item, 'invWeight', inventRecordBoxBlocks[i]['param9Field']);
resultGrid.setCellValue(item, 'inventTypeDetail', inventRecordBoxBlocks[i]['param10Field']);
break
}
}
loadChange(grid,e,"price");
......@@ -186,6 +187,7 @@ $(function () {
resultGrid.setCellValue(item, 'invUnitWeight', specBoxBlocks[i]['param5Field'])
resultGrid.setCellValue(item, 'invWeight', specBoxBlocks[i]['param6Field'])
resultGrid.setCellValue(item, 'partSpecId', specBoxBlocks[i]['param7Field'])
break
}
}
resultGrid.setCellValue(item, 'price', "")
......
......@@ -70,8 +70,7 @@ $(function (){
item['whCode'] =$("#inqu_status-0-whCode").val();
return $("#inqu_status-0-whCode").val();
}
}
,
},
{
field: "companyCode",
template: function (item) {
......@@ -97,15 +96,17 @@ $(function (){
for(let i=0;i<inventRecordBoxBlocks.length;i++){
if(item.inventCode === inventRecordBoxBlocks[i]['valueField']){
resultGrid.setCellValue(item, 'inventName', inventRecordBoxBlocks[i]['textField'])
resultGrid.setCellValue(item, 'inventType', specBoxBlocks[i]['param1Field'])
resultGrid.setCellValue(item, 'invSpecId', specBoxBlocks[i]['param2Field'])
resultGrid.setCellValue(item, 'invSpec', specBoxBlocks[i]['param3Field'])
resultGrid.setCellValue(item, 'invLength', specBoxBlocks[i]['param4Field'])
resultGrid.setCellValue(item, 'invWidth', specBoxBlocks[i]['param5Field'])
resultGrid.setCellValue(item, 'invThick', specBoxBlocks[i]['param6Field'])
resultGrid.setCellValue(item, 'invQty', specBoxBlocks[i]['param7Field'])
resultGrid.setCellValue(item, 'invUnitWeight', specBoxBlocks[i]['param8Field'])
resultGrid.setCellValue(item, 'invWeight', specBoxBlocks[i]['param9Field'])
resultGrid.setCellValue(item, 'inventType', inventRecordBoxBlocks[i]['param1Field'])
resultGrid.setCellValue(item, 'invSpecId', inventRecordBoxBlocks[i]['param2Field'])
resultGrid.setCellValue(item, 'invSpec', inventRecordBoxBlocks[i]['param3Field'])
resultGrid.setCellValue(item, 'invLength', inventRecordBoxBlocks[i]['param4Field'])
resultGrid.setCellValue(item, 'invWidth', inventRecordBoxBlocks[i]['param5Field'])
resultGrid.setCellValue(item, 'invThick', inventRecordBoxBlocks[i]['param6Field'])
resultGrid.setCellValue(item, 'invQty', inventRecordBoxBlocks[i]['param7Field'])
resultGrid.setCellValue(item, 'invUnitWeight', inventRecordBoxBlocks[i]['param8Field'])
resultGrid.setCellValue(item, 'invWeight', inventRecordBoxBlocks[i]['param9Field'])
resultGrid.setCellValue(item, 'inventTypeDetail', inventRecordBoxBlocks[i]['param10Field'])
break
}
}
resultGrid.setCellValue(item, 'price', "")
......
......@@ -38,6 +38,7 @@
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true" enable="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFColumn ename="invSpecId" cname="规格id" hidden="true"/>
<EF:EFColumn ename="invSpec" cname="规格" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="invLength" cname="长度(MM)" width="120" align="center" enable="false"/>
......
......@@ -177,6 +177,7 @@ $(function() {
for (let i = 0; i < InventNameGlobalData.length; i++) {
if (InventNameGlobalData[i]['valueField'] === item['inventCode']) {
resultGrid.setCellValue(item, 'inventType', InventNameGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'inventTypeDetail', InventNameGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'inventRecordId', InventNameGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'inventName', InventNameGlobalData[i]['textField']);
resultGrid.setCellValue(item, 'material', InventNameGlobalData[i]['param5Field']);
......
......@@ -77,6 +77,7 @@ $(function () {
for (let i = 0; i < inventRecordBoxBlockId.length; i++) {
if (inventRecordBoxBlockId[i]['valueField'] === e.items[0].inventCode) {
resultGrid.setCellValue(e.items[0], 'inventName', inventRecordBoxBlockId[i]['textField'])
resultGrid.setCellValue(e.items[0], 'inventTypeDetail', inventRecordBoxBlockId[i]['param1Field'])
resultGrid.setCellValue(e.items[0], 'spec', inventRecordBoxBlockId[i]['param4Field'])
resultGrid.setCellValue(e.items[0], 'material', inventRecordBoxBlockId[i]['param5Field'])
resultGrid.setCellValue(e.items[0], 'length', inventRecordBoxBlockId[i]['param7Field'])
......@@ -85,6 +86,7 @@ $(function () {
//系数
let coefficient = inventRecordBoxBlockId[i]['param10Field']
calUnitWeight(e.items[0],e.items[0].length,e.items[0].width,e.items[0].thick,coefficient);
break
}
}
}
......@@ -207,9 +209,10 @@ let deleteFunc = function () {
}
let calUnitWeight = function (item,length,width,thick,coefficient) {
if(length && width && thick && coefficient){
let amount = length * width * thick * coefficient/1000000;
let l = Number(length)||1;
let w = Number(width)||1;
let t = Number(thick)||1;
let amount = (l * w * t )>1? l * w * t * Number(coefficient)/100000:0;
//item['amount'] = amount.toString();
resultGrid.setCellValue(item, 'singleWeight', amount);
}
resultGrid.setCellValue(item, 'singleWeight', amount);
}
......@@ -45,6 +45,7 @@
<%-- filter="contains">--%>
<%-- </EF:EFComboColumn>--%>
<EF:EFColumn ename="inventCode" required="true" cname="产品编号" />
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" enable="false" readonly="true" required="true"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center" enable="false" readonly="true" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" required="true" readonly="true" enable="false"/>
......
......@@ -50,6 +50,7 @@
<EF:EFColumn ename="supCode" cname="供应商编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<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"/>
......
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