Commit 1e8f8ce7 by 宋祥

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

parents 0b0b26c3 dbaedf35
...@@ -47,6 +47,7 @@ public class HPCG003A extends DaoEPBase { ...@@ -47,6 +47,7 @@ public class HPCG003A extends DaoEPBase {
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_PARENT_ID = "parentId"; /* 父级ID*/ public static final String FIELD_PARENT_ID = "parentId"; /* 父级ID*/
public static final String FIELD_CUST_CODE = "custCode"; /* 供应商编码*/
public static final String COL_ID = "ID"; /* ID*/ public static final String COL_ID = "ID"; /* ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
...@@ -121,6 +122,7 @@ public class HPCG003A extends DaoEPBase { ...@@ -121,6 +122,7 @@ public class HPCG003A extends DaoEPBase {
private String material = " "; /* 材质*/ private String material = " "; /* 材质*/
private BigDecimal coefficient = new BigDecimal(0.000); /* 系数*/ private BigDecimal coefficient = new BigDecimal(0.000); /* 系数*/
private String unit = " "; /* 单位*/ private String unit = " "; /* 单位*/
private String custCode = " "; /* 供应商编码*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -284,6 +286,9 @@ public class HPCG003A extends DaoEPBase { ...@@ -284,6 +286,9 @@ public class HPCG003A extends DaoEPBase {
eiColumn.setDescName("单位"); eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_CODE);
eiColumn.setDescName("供应商编码");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -807,6 +812,14 @@ public class HPCG003A extends DaoEPBase { ...@@ -807,6 +812,14 @@ public class HPCG003A extends DaoEPBase {
this.unit = unit; this.unit = unit;
} }
public String getCustCode() {
return custCode;
}
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -848,6 +861,7 @@ public class HPCG003A extends DaoEPBase { ...@@ -848,6 +861,7 @@ public class HPCG003A extends DaoEPBase {
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material)); setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient)); setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit)); setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_CODE)), custCode));
} }
/** /**
...@@ -890,6 +904,7 @@ public class HPCG003A extends DaoEPBase { ...@@ -890,6 +904,7 @@ public class HPCG003A extends DaoEPBase {
map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL))); map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT))); map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT))); map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_CUST_CODE, StringUtils.toString(custCode, eiMetadata.getMeta(FIELD_CUST_CODE)));
return map; return map;
} }
......
...@@ -180,45 +180,34 @@ public class ServiceHPCG002A extends ServiceBase { ...@@ -180,45 +180,34 @@ public class ServiceHPCG002A extends ServiceBase {
DaoUtils.update(HPCG002.CHECK, hpcg002.toMap()); DaoUtils.update(HPCG002.CHECK, hpcg002.toMap());
//全部提交后,生成采购订单 //全部提交后,生成采购订单
List<Map<Object,Object>> list = outBlock.getRows(); List<Map<Object,Object>> list = outBlock.getRows();
Map<Object,List<Map>> listMap = list.stream().collect(Collectors.groupingBy(map -> map.get(HPCG002A.FIELD_CUST_CODE))); //Map<Object,List<Map>> listMap = list.stream().collect(Collectors.groupingBy(map -> map.get(HPCG002A.FIELD_CUST_CODE)));
//获取采购计划 //获取采购计划
List<HPCG002> hpcg002s = this.dao.query(HPCG002.QUERY,new HashMap<String,Object>(){{ List<HPCG002> hpcg002s = this.dao.query(HPCG002.QUERY,new HashMap<String,Object>(){{
put(HPCG002.FIELD_ID,hpcg002.getId()); put(HPCG002.FIELD_ID,hpcg002.getId());
}}); }});
//生成采购订单详情
for (Object str: listMap.keySet()) {
HPCG003 hpcg003 = new HPCG003(); HPCG003 hpcg003 = new HPCG003();
hpcg003.toMap(); hpcg003.toMap();
hpcg003.setProOrderDate(StringUtil.removeHorizontalLine(DateUtils.date())); hpcg003.setProOrderDate(StringUtil.removeHorizontalLine(DateUtils.date()));
hpcg003.setCustCode(str.toString()); //hpcg003.setCustCode(str.toString());
hpcg003.setInventType(inventType); hpcg003.setInventType(inventType);
hpcg003.setProPlanNo(hpcg002s.get(0).getProPlanNo()); hpcg003.setProPlanNo(hpcg002s.get(0).getProPlanNo());
//生成采购订单单号 //生成采购订单单号
hpcg003.setProOrderNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PRO_ORDER_NO)); hpcg003.setProOrderNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PRO_ORDER_NO));
//添加采购订单 //添加采购订单
DaoUtils.insert(HPCG003.INSERT,hpcg003); DaoUtils.insert(HPCG003.INSERT,hpcg003);
List<HPCG003> hpcg003s = this.dao.query(HPCG003.QUERY,new HashMap<String,Object>(){{ //生成采购订单详情
put(HPCG003.FIELD_INVENT_TYPE,hpcg003.getInventType()); for (Map value : list) {
put(HPCG003.FIELD_PRO_ORDER_DATE,hpcg003.getProOrderDate());
put(HPCG003.FIELD_PRO_ORDER_NO,hpcg003.getProOrderNo());
put(HPCG003.FIELD_PRO_PLAN_NO,hpcg003.getProPlanNo());
put(HPCG003.COL_CUST_CODE,hpcg003.getCustCode());
}});
List<Map> hpcg002aList = listMap.get(str);
for (Map value : hpcg002aList) {
HPCG002A hpcg002a = new HPCG002A(); HPCG002A hpcg002a = new HPCG002A();
hpcg002a.fromMap(value); hpcg002a.fromMap(value);
//添加采购订单详情 //添加采购订单详情
HPCG003A hpcg003a = new HPCG003A(); HPCG003A hpcg003a = new HPCG003A();
hpcg003a.fromMap(value); hpcg003a.fromMap(value);
hpcg003a.setParentId(hpcg003s.get(0).getId()); hpcg003a.setParentId(hpcg003.getId());
hpcg003a.setId(0L); hpcg003a.setId(0L);
hpcg003a.setProAmount(hpcg002a.getPlanAmount()); hpcg003a.setProAmount(hpcg002a.getPlanAmount());
hpcg003a.setProWeight(hpcg002a.getPlanWeight()); hpcg003a.setProWeight(hpcg002a.getPlanWeight());
DaoUtils.insert(HPCG003A.INSERT, hpcg003a); DaoUtils.insert(HPCG003A.INSERT, hpcg003a);
} }
}
}else if(num!=outBlock.getRowCount()&&hpcg002.getProPlanStatus()!=1){ }else if(num!=outBlock.getRowCount()&&hpcg002.getProPlanStatus()!=1){
//部分交更新状态 //部分交更新状态
hpcg002.setProPlanStatus(1); hpcg002.setProPlanStatus(1);
......
...@@ -47,7 +47,7 @@ public class ServiceHPCG003A extends ServiceBase { ...@@ -47,7 +47,7 @@ public class ServiceHPCG003A extends ServiceBase {
queryMap.put("inventTypes", DEFAULT_INVENT_CODE); queryMap.put("inventTypes", DEFAULT_INVENT_CODE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), queryMap); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_ALL_BLOCK_ID), queryMap, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_ALL_BLOCK_ID,DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID), queryMap, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCG003A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCG003A().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
PRO_PLAN_DATE,CREATED_TIME desc PRO_PLAN_DATE desc, CREATED_TIME desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -189,6 +189,9 @@ ...@@ -189,6 +189,9 @@
INVENT_TYPE <!-- 存货类型 --> INVENT_TYPE <!-- 存货类型 -->
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #proOrderDate#, #proOrderNo#, #proPlanNo#, #custCode#, #inventType#) VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #proOrderDate#, #proOrderNo#, #proPlanNo#, #custCode#, #inventType#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) AS "id" FROM ${hpjxSchema}.T_HPCG003
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -115,6 +115,9 @@ ...@@ -115,6 +115,9 @@
<isNotEmpty prepend=" AND " property="parentId"> <isNotEmpty prepend=" AND " property="parentId">
A.PARENT_ID = #parentId# A.PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
A.CUST_CODE = #custCode#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -151,7 +154,8 @@ ...@@ -151,7 +154,8 @@
A.REMARK as "remark", <!-- 备注 --> A.REMARK as "remark", <!-- 备注 -->
A.FACTORY_CODE as "factoryCode", <!-- 厂区编码 --> A.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
A.FACTORY_NAME as "factoryName", <!-- 厂区名称 --> A.FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
A.PARENT_ID as "parentId" <!-- 父级ID --> A.PARENT_ID as "parentId", <!-- 父级ID -->
A.CUST_CODE as "custCode"
FROM ${hpjxSchema}.T_HPCG003A A FROM ${hpjxSchema}.T_HPCG003A A
LEFT JOIN ${hpjxSchema}.T_HPPZ006 B ON B.ID = A.INVENT_RECORD_ID LEFT JOIN ${hpjxSchema}.T_HPPZ006 B ON B.ID = A.INVENT_RECORD_ID
WHERE 1=1 WHERE 1=1
...@@ -277,9 +281,13 @@ ...@@ -277,9 +281,13 @@
REMARK, <!-- 备注 --> REMARK, <!-- 备注 -->
FACTORY_CODE, <!-- 厂区编码 --> FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 --> FACTORY_NAME, <!-- 厂区名称 -->
PARENT_ID <!-- 父级ID --> PARENT_ID, <!-- 父级ID -->
CUST_CODE
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #planAmount#, #planWeight#, #proAmount#, #proWeight#, #proMoney#, #remark#, #factoryCode#, #factoryName#, #parentId#) VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#,
#planAmount#, #planWeight#, #proAmount#, #proWeight#, #proMoney#, #remark#, #factoryCode#, #factoryName#,
#parentId#, #custCode#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -313,7 +321,8 @@ ...@@ -313,7 +321,8 @@
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 --> FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 --> FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
PARENT_ID = #parentId# <!-- 父级ID --> PARENT_ID = #parentId#, <!-- 父级ID -->
CUST_CODE = #custCode#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -182,14 +182,14 @@ public class ServiceHPPZ019 extends ServiceEPBase { ...@@ -182,14 +182,14 @@ public class ServiceHPPZ019 extends ServiceEPBase {
}else { }else {
hppz020.setSerialNum(1L); hppz020.setSerialNum(1L);
} }
BigDecimal notaxPrice = hppz020.getNotaxPrice(); //不含税单价 /*BigDecimal notaxPrice = hppz020.getNotaxPrice(); //不含税单价
BigDecimal taxRate = hppz020.getTaxRate(); //税率 BigDecimal taxRate = hppz020.getTaxRate(); //税率
BigDecimal quantity = BigDecimal.valueOf(hppz020.getQuantity()); BigDecimal quantity = BigDecimal.valueOf(hppz020.getQuantity());
BigDecimal nottaxAmount = notaxPrice.multiply(quantity); //不含税金额 BigDecimal nottaxAmount = notaxPrice.multiply(quantity); //不含税金额
BigDecimal taxAmount = nottaxAmount.multiply(taxRate.add(BigDecimal.valueOf(1))); BigDecimal taxAmount = nottaxAmount.multiply(taxRate.add(BigDecimal.valueOf(1)));
hppz020.setNotaxAmount(nottaxAmount); //不含税金额 hppz020.setNotaxAmount(nottaxAmount); //不含税金额
hppz020.setTaxAmount(taxAmount); //含税金额 hppz020.setTaxAmount(taxAmount); //含税金额
hppz020.setTheAmount(taxAmount.subtract(nottaxAmount)); //税额 hppz020.setTheAmount(taxAmount.subtract(nottaxAmount)); //税额*/
DaoUtils.insert(HPPZ020.INSERT, hppz020); DaoUtils.insert(HPPZ020.INSERT, hppz020);
} }
...@@ -197,14 +197,14 @@ public class ServiceHPPZ019 extends ServiceEPBase { ...@@ -197,14 +197,14 @@ public class ServiceHPPZ019 extends ServiceEPBase {
* 修改明细操作 * 修改明细操作
*/ */
public void modifyDetail(HPPZ020 hppz020) { public void modifyDetail(HPPZ020 hppz020) {
BigDecimal notaxPrice = hppz020.getNotaxPrice(); //不含税单价 /*BigDecimal notaxPrice = hppz020.getNotaxPrice(); //不含税单价
BigDecimal taxRate = hppz020.getTaxRate(); //税率 BigDecimal taxRate = hppz020.getTaxRate(); //税率
BigDecimal quantity = BigDecimal.valueOf(hppz020.getQuantity()); BigDecimal quantity = BigDecimal.valueOf(hppz020.getQuantity());
BigDecimal nottaxAmount = notaxPrice.multiply(quantity); //不含税金额 BigDecimal nottaxAmount = notaxPrice.multiply(quantity); //不含税金额
BigDecimal taxAmount = nottaxAmount.multiply(taxRate.add(BigDecimal.valueOf(1))); BigDecimal taxAmount = nottaxAmount.multiply(taxRate.add(BigDecimal.valueOf(1)));
hppz020.setNotaxAmount(nottaxAmount); //不含税金额 hppz020.setNotaxAmount(nottaxAmount); //不含税金额
hppz020.setTaxAmount(taxAmount); //含税金额 hppz020.setTaxAmount(taxAmount); //含税金额
hppz020.setTheAmount(taxAmount.subtract(nottaxAmount)); //税额 hppz020.setTheAmount(taxAmount.subtract(nottaxAmount)); //税额*/
DaoUtils.update(HPPZ020.UPDATE, hppz020); DaoUtils.update(HPPZ020.UPDATE, hppz020);
} }
......
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ022;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.List;
import java.util.Map;
/**
* 抛帐管理
*
* @author:
* @date:2024/1/15,11:20
*/
public class ServiceHPPZ022 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ022().eiMetadata);
} catch (PlatException e) {
logError("初始化失败", e.getMessage());
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "抛帐管理", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPPZ022.QUERY, new HPPZ022());
} catch (Exception e) {
logError("查询失败", e.getMessage());
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPPZ022 hppz022 = new HPPZ022();
hppz022.fromMap(resultRow);
DaoUtils.update(HPPZ022.DELETE, hppz022);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
logError("删除失败", e.getMessage());
}
return inInfo;
}
/**
* 红冲操作
*
* @param inInfo
* @return
*/
public EiInfo redFlush(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPPZ022 hppz022 = new HPPZ022();
hppz022.fromMap(resultRow);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据红冲成功!");
} catch (Exception e) {
logError("红冲失败", e.getMessage());
}
return inInfo;
}
/**
* 重抛操作
*
* @param inInfo
* @return
*/
public EiInfo againSend(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPPZ022 hppz022 = new HPPZ022();
hppz022.fromMap(resultRow);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据重抛成功!");
} catch (Exception e) {
logError("重抛失败", e.getMessage());
}
return inInfo;
}
}
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.hp.pz.domain.HPPZ022A;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
/**
* 抛帐管理明细
*
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPPZ022A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ022A().eiMetadata);
} catch (PlatException e) {
logError("初始化失败", e.getMessage());
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPPZ022A.query", new HPPZ022A());
} catch (Throwable e) {
logError("查询失败", e.getMessage());
}
return inInfo;
}
}
...@@ -132,25 +132,7 @@ ...@@ -132,25 +132,7 @@
<select id="queryMax" parameterClass="java.util.HashMap" <select id="queryMax" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ020"> resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ020">
SELECT SELECT
ID as "id", <!-- ID --> MAX(SERIAL_NUM) as "serialNum" <!-- 序号 -->
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CONTRACT_CODE as "contractCode", <!-- 合同号 -->
MAX(SERIAL_NUM) as "serialNum", <!-- 序号 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
QUANTITY as "quantity", <!-- 数量 -->
TAX_RATE as "taxRate", <!-- 税率 -->
NOTAX_PRICE as "notaxPrice", <!-- 不含税单价 -->
NOTAX_AMOUNT as "notaxAmount", <!-- 不含税金额 -->
THE_AMOUNT as "theAmount", <!-- 税额 -->
TAX_AMOUNT as "taxAmount" <!-- 含税金额 -->
FROM ${hpjxSchema}.T_HPPZ020 WHERE 1=1 FROM ${hpjxSchema}.T_HPPZ020 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
......
...@@ -382,4 +382,39 @@ public class ServiceHPSC103 extends ServiceEPBase { ...@@ -382,4 +382,39 @@ public class ServiceHPSC103 extends ServiceEPBase {
} }
} }
} }
@OperationLogAnnotation(operModul = "生产计划", operType = "排产", operDesc = "提交排产")
public EiInfo submitProduc(EiInfo inInfo) {
try {
List<HPSC003> hpsc003s = MapUtils.toDaoEPBases(inInfo, HPSC003.class);
for (HPSC003 hpsc003 : hpsc003s) {
List<HPSC004> hpsc004s = HPSCTools.HpSc004.queryByParent(hpsc003.getPlanInfoNo());
for (HPSC004 hpsc004:hpsc004s) {
String startDate =handleEndDate(hpsc004.getPlanCommentDate());
String endDate =handleEndDate(hpsc004.getPlanCompletionDate());
hpsc004.setPlanCommentDate(startDate);
hpsc004.setPlanCompletionDate(endDate);
DaoUtils.update(HPSC004.UPDATE, hpsc004);
}
String planCompletionDate =handleEndDate(hpsc003.getPlanCompletionDate());
hpsc003.setPlanCompletionDate(planCompletionDate);
DaoUtils.update(HPSC003.UPDATE, hpsc003);
}
}catch (PlatException e){
LogUtils.setMsg(inInfo,e,"提交排产失败");
}
return inInfo;
}
/**
* 处理计划完成日期
* @param endDate 计划完成日期
* @return 处理后的计划完成日期减3天
*/
private static String handleEndDate(String endDate){
if(StringUtils.isNotBlank(endDate)){
endDate = DateUtils.toDateStr(DateUtils.addDays(DateUtils.toDate(endDate,DateUtils.DATE8_PATTERN),-3),DateUtils.DATE8_PATTERN);
}
return endDate;
}
} }
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
MATERIAL_STATUS as "materialStatus", MATERIAL_STATUS as "materialStatus",
PROJECT_SOURCE as "projectSource", PROJECT_SOURCE as "projectSource"
FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1 FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<img :src="`${ctx}/common/img/device-img4-content.png`" class="device-img1-content img" style="margin: 0;" alt/> <img :src="`${ctx}/common/img/device-img4-content.png`" class="device-img1-content img" style="margin: 0;" alt/>
</div> </div>
<div style="width: 100%;height: 30%;display: flex;margin-top: 2vh;"> <div style="width: 100%;height: 30%;display: flex;margin-top: 2vh;">
<div class="content-content-title" style="width: 40%;">激光焊接机</div> <div class="content-content-title" style="width: 40%;">龙门加工中心</div>
<img :src="`${ctx}/common/img/device-img5-content.png`" class="device-img1-content img" style="margin: 0;" alt/> <img :src="`${ctx}/common/img/device-img5-content.png`" class="device-img1-content img" style="margin: 0;" alt/>
</div> </div>
</div> </div>
......
...@@ -73,10 +73,6 @@ let initSpec = function () { ...@@ -73,10 +73,6 @@ let initSpec = function () {
} }
function check(id, auditStatus,custCode,parentid,proPlanStatus) { function check(id, auditStatus,custCode,parentid,proPlanStatus) {
if (isBlank(custCode)) {
message("行供应商不能为空");
return;
}
const inEiInfo = new EiInfo(); const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id); inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-parentId", parentid); inEiInfo.set("result-0-parentId", parentid);
...@@ -126,10 +122,10 @@ function save() { ...@@ -126,10 +122,10 @@ function save() {
message("勾选的第" + (i + 1) + "行已提交不允许修改!"); message("勾选的第" + (i + 1) + "行已提交不允许修改!");
return; return;
} }
if (isBlank(rows[i]['custCode'])) { /*if (isBlank(rows[i]['custCode'])) {
message("勾选的第" + (i + 1) + "行\"供应商\"不能为空"); message("勾选的第" + (i + 1) + "行\"供应商\"不能为空");
return; return;
} }*/
if (isBlank(rows[i]['planAmount'])) { if (isBlank(rows[i]['planAmount'])) {
message("勾选的第" + (i + 1) + "行\"计划数量\"不能为空"); message("勾选的第" + (i + 1) + "行\"计划数量\"不能为空");
return; return;
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="采购申请单号" ename="inqu_status-0-proApplyNo" colWidth="3"/> <EF:EFInput cname="采购申请单号" ename="inqu_status-0-proApplyNo" colWidth="3"/>
<EF:EFSelect cname="供应商名称" ename="inqu_status-0-custCode" colWidth="3" filter="contains" defultValue=""> <%--<EF:EFSelect cname="供应商名称" ename="inqu_status-0-custCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>--%>
<EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains" defultValue=""> <EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
...@@ -43,11 +43,11 @@ ...@@ -43,11 +43,11 @@
<EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/> <EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="custCode" cname="供应商名称" width="120" align="center" required="true" <%--<EF:EFComboColumn ename="custCode" cname="供应商名称" width="120" align="center" required="true"
blockName="supplier_record_block_id" textField="textField" valueField="valueField" blockName="supplier_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>--%>
<EF:EFColumn ename="proApplyNo" cname="采购申请单号" enable="false" width="140" align="center" readonly="true"/> <EF:EFColumn ename="proApplyNo" cname="采购申请单号" enable="false" width="140" align="center" readonly="true"/>
<EF:EFColumn ename="proApplyDate" cname="采购申请日期" width="100" align="center" editType="date" readonly="true" <EF:EFColumn ename="proApplyDate" cname="采购申请日期" width="100" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" /> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" />
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
startName="createdDateFrom" endName="createdDateTo" row="0" role="date" startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFSelect cname="供应商名称" ename="inqu_status-0-custCode" colWidth="3" filter="contains" defultValue=""> <%--<EF:EFSelect cname="供应商名称" ename="inqu_status-0-custCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>--%>
<EF:EFInput cname="采购计划单号" ename="inqu_status-0-proPlanNo" colWidth="3"/> <EF:EFInput cname="采购计划单号" ename="inqu_status-0-proPlanNo" colWidth="3"/>
<EF:EFInput cname="采购订单单号" ename="inqu_status-0-proOrderNo" colWidth="3"/> <EF:EFInput cname="采购订单单号" ename="inqu_status-0-proOrderNo" colWidth="3"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains"> <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,11 @@
<EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/> <EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center" sort="false"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center" sort="false"/>
<EF:EFComboColumn ename="custCode" cname="供应商名称" width="120" align="center" required="true" <%--<EF:EFComboColumn ename="custCode" cname="供应商名称" width="120" align="center" required="true"
blockName="supplier_record_block_id" textField="textField" valueField="valueField" blockName="supplier_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>--%>
<EF:EFColumn ename="proOrderDate" cname="采购订单日期" width="100" align="center" editType="date" readonly="true" <EF:EFColumn ename="proOrderDate" cname="采购订单日期" width="100" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" /> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" />
<EF:EFColumn ename="proPlanNo" cname="采购计划单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="proPlanNo" cname="采购计划单号" enable="false" width="140" align="center"/>
......
...@@ -62,6 +62,10 @@ function save() { ...@@ -62,6 +62,10 @@ function save() {
return; return;
} }
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
if (isBlank(rows[i]['custCode'])) {
message("勾选的第" + (i + 1) + "行\"供应商\"不能为空");
return;
}
if (!isPositiveInteger(rows[i]['proAmount'])) { if (!isPositiveInteger(rows[i]['proAmount'])) {
message("勾选的第" + (i + 1) + "行\"采购数量\"必须是大于0的整数"); message("勾选的第" + (i + 1) + "行\"采购数量\"必须是大于0的整数");
return; return;
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
<EF:EFPage title="采购订单详情"> <EF:EFPage title="采购订单详情">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect cname="供应商名称" ename="inqu_status-0-custCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue=""> <EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
...@@ -28,6 +32,11 @@ ...@@ -28,6 +32,11 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/> <EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
<EF:EFComboColumn ename="custCode" cname="供应商名称" width="120" align="center" required="true"
blockName="supplier_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" align="center" readonly="true"/> <EF:EFColumn ename="inventCode" cname="存货编码" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="150" align="center" readonly="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="150" align="center" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" align="center" readonly="true" hidden="true"/> <EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" align="center" readonly="true" hidden="true"/>
......
...@@ -89,6 +89,27 @@ $(function () { ...@@ -89,6 +89,27 @@ $(function () {
}, },
"detail":{ "detail":{
pageable:false, pageable:false,
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
if (e.field == "quantity" || e.field == "notaxPrice") {
// 获取此model元素信息
var item = e.items[0];
// 计算总金额
var taxPoints = isBlank(item.taxRate) ? 0: item.taxRate / 100; //税额
var quantity = !isBlank(item.quantity) ? item.quantity : 0; //数量
var notaxPrice = !isBlank(item.notaxPrice) ? item.notaxPrice : 0; //不含税单价
var totalPriceExcluding = quantity * notaxPrice; //不含税金额
var totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints)); //含税金额
let taxAmount = Number((totalPriceIncluding-totalPriceExcluding).toFixed(2));
detailGrid.setCellValue(item, 'notaxAmount', totalPriceExcluding.toFixed(2));
detailGrid.setCellValue(item, 'taxAmount', totalPriceIncluding.toFixed(2));
detailGrid.setCellValue(item, 'theAmount', taxAmount);
}
});
},
onSave: function (e) { onSave: function (e) {
// 阻止默认请求,使用自定义保存 // 阻止默认请求,使用自定义保存
e.preventDefault(); e.preventDefault();
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
displayType="0.000" sort="true" align="right" defaultValue="0" required="true" displayType="0.000" sort="true" align="right" defaultValue="0" required="true"
data-regex="/^-?[0-9]{1,20}?$/" maxLength="20" data-regex="/^-?[0-9]{1,20}?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置20位整数!"/> data-errorprompt="请输入数字,该值最大可设置20位整数!"/>
<EF:EFColumn ename="taxRate" cname="税率" width="120" format="{0:0.00%}" editType="text" <EF:EFColumn ename="taxRate" cname="税率" width="120" format="{0:N2}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0" required="true" displayType="0.000" sort="true" align="right" defaultValue="0" required="true"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
......
$(function () {
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "operator",
template: function (item) {
let template = '';
// 抛帐详情
if (item.billMainId) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(\'' + item.billMainId + '\')" >抛帐详情</a>';
}
return template
}
}],
loadComplete: function (grid) {
$("#RESEND").on("click", resend);
$("#REDFLUSH").on("click", redFlush);
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
}
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 抛帐明细
*
* @param id
*/
function showDetail(id) {
JSColorbox.open({
href: "HPPZ022A?methodName=initLoad&inqu_status-0-billMainId=" + id,
title: "<div style='text-align: center;'>抛帐明细</div>",
width: "80%",
height: "80%",
});
}
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 重新抛帐
*/
function resend(){
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"重新抛帐\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ022", "againSend", true,
function (ei) {
if (ei.getStatus() != -1){
query();
}
});
}
});
}
/**
* 红冲
*/
function redFlush(){
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"红冲\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ022", "redFlush", true,
function (ei) {
if (ei.getStatus() != -1){
query();
}
});
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="抛帐管理">
<EF:EFRegion id="inqu" title="查询区">
<div class="row">
<EF:EFInput ename="inqu_status-0-billMainNo" cname="抛帐单据号" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput ename="inqu_status-0-sourceBillNo" cname="业务单据号" colWidth="3" placeholder="模糊查询"/>
<EF:EFSelect ename="inqu_status-0-billStatus" cname="抛帐状态" colWidth="3" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="发送中" value="10"/>
<EF:EFOption label="抛帐成功" value="20"/>
<EF:EFOption label="抛帐失败" value="30"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-voucherCode" cname="凭证号" colWidth="3" placeholder="模糊查询"/>
<EF:EFDatePicker ename="inqu_status-0-voucherDateStar" cname="凭证日期开始" colWidth="3" placeholder="凭证日期" role="date" readonly="true"
parseFormats="['yyyyMMdd','yyyy-MM-dd']"/>
<EF:EFDatePicker ename="inqu_status-0-voucherDateEnd" cname="凭证日期结束" colWidth="3" placeholder="凭证日期" role="date" readonly="true"
parseFormats="['yyyyMMdd','yyyy-MM-dd']"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集" fitHeight="true" autoBind="false">
<EF:EFGrid blockId="result" autoDraw="false" checkMode="checkbox, row">
<EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn cname="billMainId" ename="billMainId" width="100" align="left" fix="yes" enable="false" hidden="true"/>
<%-- <EF:EFColumn cname="账套" ename="inAccount" align="center" width="120" enable="false" />--%>
<EF:EFColumn cname="抛帐单据号" ename="billMainNo" align="center" width="120" enable="false" />
<EF:EFColumn cname="单据金额" ename="totalAmount" align="right" width="120" enable="false" data-rules="number" sumType="total"/>
<EF:EFColumn cname="摘要" ename="voucherSummary" align="left" width="120" enable="false"/>
<EF:EFComboColumn cname="抛帐状态" ename="billStatus" width="120" enable="false" readonly="true" >
<EF:EFOption label="" value=" "/>
<EF:EFOption label="发送中" value="10"/>
<EF:EFOption label="抛帐成功" value="20"/>
<EF:EFOption label="抛帐失败" value="30"/>
</EF:EFComboColumn>
<EF:EFColumn cname="标财反馈" ename="msgReturn" align="center" width="120" enable="false" />
<EF:EFColumn cname="凭证号" ename="voucherCode" align="center" width="90" enable="false" />
<EF:EFColumn cname="凭证日期" ename="voucherDate" align="left" enable="false" />
<EF:EFColumn cname="业务单据号" ename="sourceBillNo" align="left" enable="false" />
<%-- <EF:EFColumn cname="业务单据名称" ename="deptName" align="left" enable="false" />--%>
<EF:EFColumn cname="单据日期" ename="billDate" align="left" enable="false" />
</EF:EFGrid>
</EF:EFRegion>
<EF:EFWindow id="pzDetail" url=" " lazyload="true" width="90%" height="90%"></EF:EFWindow>
</EF:EFPage>
$(function () {
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [
],
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<EF:EFPage title="抛帐管理明细">
<EF:EFInput blockId="inqu_status" row="0" ename="billMainId" type="hidden" colWidth="3"/>
<%-- <EF:EFRegion id="inqu" title="查询区">--%>
<%-- <div class="row">--%>
<%-- --%>
<%-- </div>--%>
<%-- </EF:EFRegion>--%>
<EF:EFRegion id="result" title="记录集" fitHeight="true" autoBind="false">
<EF:EFGrid blockId="result" autoDraw="false" checkMode="single, row">
<EF:EFColumn cname="billLineId" ename="billLineId" width="100" align="left" fix="yes" enable="false" hidden="true"/>
<EF:EFColumn cname="抛帐单据号" ename="billLineNo" align="center" width="120" enable="false" />
<EF:EFColumn cname="责任中心编码" ename="costCenter" align="center" width="120" enable="false"/>
<EF:EFColumn cname="责任中心名称" ename="costCenterName" align="center" width="120" enable="false"/>
<EF:EFColumn cname="项目编号" ename="projectCode" align="center" width="120" enable="false" />
<EF:EFColumn cname="金额" ename="functionalAmount" align="center" width="90" enable="false" />
<EF:EFColumn cname="抛帐辅助1" ename="detailReserveC1" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助2" ename="detailReserveC2" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助3" ename="detailReserveC3" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助4" ename="detailReserveC4" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助5" ename="detailReserveC5" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助6" ename="detailReserveC6" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字1" ename="detailReserveN1" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字2" ename="detailReserveN2" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字3" ename="detailReserveN3" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字4" ename="detailReserveN4" align="left" enable="false" />
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -66,6 +66,10 @@ $(function () { ...@@ -66,6 +66,10 @@ $(function () {
pageOffset = e.page; pageOffset = e.page;
console.log(e.page); console.log(e.page);
}, },
loadComplete: function (grid) {
//此grid对象
$("#SUBMIT_PRODUC").on("click",submitProduc);
},
onSave: function (e) { onSave: function (e) {
// 阻止默认请求,使用自定义保存 // 阻止默认请求,使用自定义保存
e.preventDefault(); e.preventDefault();
...@@ -462,3 +466,39 @@ let imgClick = function (docId) { ...@@ -462,3 +466,39 @@ let imgClick = function (docId) {
$(this).fadeOut("fast"); $(this).fadeOut("fast");
}); });
} }
let submitProduc = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let status= item.get("status");
if(status == "1"){
message("选中的第"+(index+1)+"行\"任务已提交\",不能排产!");
flag = false;
return false;
}
});
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"排产\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC003", "submitProduc", true,
function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
query();
} else {
NotificationUtil(ei, "error");
}
})
}
});
}
}
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