Commit 3fb1220f by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hp-smart into dev-ly

 Conflicts:
	src/main/java/com/baosight/hpjx/hp/zl/tools/HPZLTools.java
parents 40914985 bb4ce4f6
...@@ -404,6 +404,17 @@ public class HPSqlConstant { ...@@ -404,6 +404,17 @@ public class HPSqlConstant {
public static final String DO_PROCESS2 = "HPZL001.doProcess2"; public static final String DO_PROCESS2 = "HPZL001.doProcess2";
} }
/**
* @author:songx
* @date:2024/8/13,10:24
*/
public class HpZl002 {
// 锁
public static final String LOCK = "HPZL002.lock";
// 确认
public static final String CONFIRM = "HPZL002.confirm";
}
/** /**
* @author:songx * @author:songx
......
...@@ -133,8 +133,8 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -133,8 +133,8 @@ public class ServiceHPPZ009 extends ServiceBase {
// 此处不能使用DaoUtils方法insert // 此处不能使用DaoUtils方法insert
dao.insert(HPPZ009.INSERT, fPz009); dao.insert(HPPZ009.INSERT, fPz009);
// 默认新增企业管理员账号 // 默认新增企业管理员账号
HPXSTools.XsUser.addUser(fPz009.getCompanyCode(), fPz009.getCompanyCode(), fPz009.getCompanyName(), String userId = fPz009.getLoginPrefix() + "0000";
null, null); HPXSTools.XsUser.addUser(fPz009.getCompanyCode(), userId, fPz009.getCompanyName());
// 关联企业管理员角色 // 关联企业管理员角色
this.insertGroupMember(fPz009); this.insertGroupMember(fPz009);
} }
......
...@@ -97,6 +97,18 @@ public class HPXSTools { ...@@ -97,6 +97,18 @@ public class HPXSTools {
/** /**
* 初始化新增用户 * 初始化新增用户
* *
* @param accountCode
* @param userId
* @param userName
* @throws Exception
*/
public static void addUser(String accountCode, String userId, String userName) throws Exception {
addUser(accountCode, userId, userName, null, null);
}
/**
* 初始化新增用户
*
* @param companyCode * @param companyCode
* @param userId * @param userId
* @param userName * @param userName
......
package com.baosight.hpjx.hp.zl.constant;
/**
* @author songx
* @date 2024/11/16,15:39
*/
public class HpZlSqlConst {
/**
* @author:songx
* @date:2024/8/29,15:54
*/
public static class HpZl002 {
// 锁
public static final String LOCK = "HPZL002.lock";
// 修改
public static final String UPDATE_DEAL = "HPZL002.updateDeal";
}
}
package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.zl.constant.HpZlSqlConst;
import com.baosight.hpjx.hp.zl.domain.HPZL002;
import com.baosight.hpjx.hp.zl.utils.HpZlUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
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:songx
* @date:2024/9/24,17:47
*/
public class ServiceHPZL002 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPZL002().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HPZL002.FIELD_RECEIPT_DATE,
DateUtils.formatShort(queryMap.get(HPZL002.FIELD_RECEIPT_DATE)));
inInfo = super.query(inInfo, HPZL002.QUERY, new HPZL002());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo remove(EiInfo inInfo) {
try {
List<HPZL002> fZl002s = MapUtils.toDaoEPBases(inInfo, HPZL002.class);
// db数据
Map<String, HPZL002> dbZl002Map = HpZlUtils.HpZl002.lockGetDataEp(fZl002s);
// 数据校验
this.checkRemoveData(fZl002s, dbZl002Map);
// 保存数据
this.removeData(fZl002s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fZl002s.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fZl002s
* @param dbFw002Map
*/
private void checkRemoveData(List<HPZL002> fZl002s, Map<String, HPZL002> dbFw002Map) {
for (HPZL002 fZl002 : fZl002s) {
String checkNo = fZl002.getCheckNo();
HPZL002 dbZl002 = dbFw002Map.get(checkNo);
this.checkData(checkNo, dbZl002);
}
}
/**
* 数据保存
*
* @param fZl002s
*/
private void removeData(List<HPZL002> fZl002s) {
for (HPZL002 fZl002 : fZl002s) {
fZl002.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPZL002.DELETE, fZl002.toMap());
}
}
/**
* 检查状态
*
* @param inInfo
* @return
*/
public EiInfo checkStatus(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String checkNo = MapUtils.getString(queryMap, HPZL002.FIELD_CHECK_NO);
HPZL002 dbZl002 = HpZlUtils.HpZl002.lockGetData(checkNo);
this.checkData(checkNo, dbZl002);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
/**
* 处理
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "审核")
public EiInfo deal(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<HPZL002> fZl002s = MapUtils.toDaoEPBases(inInfo, HPZL002.class);
// db数据
Map<String, HPZL002> dbZl002Map = HpZlUtils.HpZl002.lockGetDataEp(fZl002s);
// 数据校验
this.checkDealData(fZl002s, dbZl002Map);
// 保存数据
this.dealData(fZl002s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fZl002s.size() + "]条数据处理成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "处理失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fZl002s
* @param dbZl002Map
*/
private void checkDealData(List<HPZL002> fZl002s, Map<String, HPZL002> dbZl002Map) {
for (HPZL002 fZl002 : fZl002s) {
String checkNo = fZl002.getCheckNo();
HPZL002 dbZl002 = dbZl002Map.get(checkNo);
this.checkData(checkNo, dbZl002);
}
}
/**
* 数据保存
*
* @param fZl002s
*/
private void dealData(List<HPZL002> fZl002s) {
for (HPZL002 fZl002 : fZl002s) {
fZl002.setStatus(HPConstant.dealStatus.S1);
fZl002.setDealUserId(UserSessionUtils.getLoginName());
fZl002.setDealUserName(UserSessionUtils.getLoginCName());
fZl002.setDealDate(DateUtils.shortDateTime());
DaoUtils.update(HpZlSqlConst.HpZl002.UPDATE_DEAL, fZl002.toMap());
}
}
/**
* 数据校验
*
* @param checkNo
* @param dbZl002
*/
private void checkData(String checkNo, HPZL002 dbZl002) {
AssertUtils.isNull(dbZl002, String.format("质检单号[%s]不存在", checkNo));
AssertUtils.isNotEquals(dbZl002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("质检单号【%s】不是\"未删除\"状态,不允许操作", checkNo));
AssertUtils.isNotEquals(dbZl002.getStatus(), HPConstant.dealStatus.S0,
String.format("质检单号【%s】不是\"待处理\"状态,不允许操作", checkNo));
}
}
package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.zl.domain.HPZL002;
import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.hp.zl.utils.HpZlUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Map;
/**
* 新增修改
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPZL002A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
this.setBaseInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
public EiInfo save(EiInfo inInfo) {
try {
HPZL002 fZl002 = MapUtils.toDaoEPBase(inInfo, HPZL002.class);
fZl002.setReceiptDate(DateUtils.formatShort(fZl002.getReceiptDate()));
// 计算不合格数量
fZl002.setUnqualifyQty(fZl002.getReceiveQty().subtract(fZl002.getQualifyQty()));
if (StringUtils.isBlank(fZl002.getCheckNo())) {
this.add(fZl002);
} else {
this.modify(fZl002);
}
// 回填实体信息,移动端更新数据使用
inInfo.set("detail", fZl002);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param fZl002
*/
private void add(HPZL002 fZl002) {
fZl002.setCheckNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CHECK_NO));
fZl002.setStatus(HPConstant.dealStatus.S0);
fZl002.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPZL002.INSERT, fZl002);
}
/**
* 修改数据
*
* @param fZl002
*/
private void modify(HPZL002 fZl002) {
HPZL002 dbZl002 = HpZlUtils.HpZl002.lockGetData(fZl002.getCheckNo());
this.checkData(fZl002, dbZl002);
DaoUtils.update(HPZL002.UPDATE, fZl002);
}
/**
* 设置信息
*
* @param inInfo
*/
public void setBaseInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String checkNo = MapUtils.getString(queryRow, HPZL002.FIELD_CHECK_NO);
if (StringUtils.isBlank(checkNo)) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HPZLTools.HpZl002.get(checkNo));
resultBlock.addBlockMeta(new HPZL002().eiMetadata);
inInfo.setBlock(resultBlock);
}
/**
* 数据校验
*
* @param fZl002
* @param dbZl002
*/
private void checkData(HPZL002 fZl002, HPZL002 dbZl002) {
AssertUtils.isNull(dbZl002, String.format("售后服务单【%s】不存在", fZl002.getCheckNo()));
AssertUtils.isNotEquals(dbZl002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("售后服务单【%s】不是\"未删除\"状态,不允许操作", fZl002.getCheckNo()));
AssertUtils.isNotEquals(dbZl002.getStatus(), HPConstant.dealStatus.S0,
String.format("售后服务单【%s】不是\"待处理\"状态,不允许操作", fZl002.getCheckNo()));
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPZL002">
<sql id="column">
ID as "id", <!-- -->
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-已删除 -->
STATUS as "status", <!-- 状态:0-质检中,1-质检完成 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
CHECK_NO as "checkNo", <!-- 检查单号 -->
RECEIVE_NO as "receiveNo", <!-- 收货单号 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
QUALIFY_QTY as "qualifyQty", <!-- 合格数量 -->
UNQUALIFY_QTY as "unqualifyQty", <!-- 不合格数量 -->
RECEIVE_UNIT_WEIGHT as "receiveUnitWeight", <!-- 收货单重 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
DEAL_USER_ID as "dealUserId", <!-- 处理人ID -->
DEAL_USER_NAME as "dealUserName", <!-- 处理人姓名 -->
DEAL_DATE as "dealDate" <!-- 处理时间 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="idCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveNo">
RECEIVE_NO = #receiveNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserId">
DEAL_USER_ID = #dealUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserName">
DEAL_USER_NAME = #dealUserName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealDate">
DEAL_DATE = #dealDate#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNos">
CHECK_NO IN <iterate close=")" open="(" conjunction="," property="checkNos">#checkNos[]#</iterate>
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL002">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPZL002 WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPZL002 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPZL002 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
STATUS, <!-- 状态:0-质检中,1-质检完成 -->
RECEIPT_DATE, <!-- 单据日期 -->
CHECK_NO, <!-- 检查单号 -->
RECEIVE_NO, <!-- 收货单号 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
RECEIVE_QTY, <!-- 收货数量 -->
QUALIFY_QTY, <!-- 合格数量 -->
UNQUALIFY_QTY, <!-- 不合格数量 -->
RECEIVE_UNIT_WEIGHT, <!-- 收货单重 -->
RECEIVE_WEIGHT, <!-- 收货重量 -->
DEAL_USER_ID, <!-- 处理人ID -->
DEAL_USER_NAME, <!-- 处理人姓名 -->
DEAL_DATE <!-- 处理时间 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #status#, #receiptDate#, #checkNo#, #receiveNo#, #inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #receiveQty#, #qualifyQty#, #unqualifyQty#, #receiveUnitWeight#, #receiveWeight#, #dealUserId#, #dealUserName#, #dealDate#
)
</insert>
<delete id="delete">
UPDATE ${hpjxSchema}.T_HPZL002 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPZL002
SET
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
RECEIVE_NO = #receiveNo#, <!-- 收货单号 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
MATERIAL = #material#, <!-- 材质 -->
UNIT = #unit#, <!-- 单位 -->
LENGTH = #length#, <!-- 长度 -->
WIDTH = #width#, <!-- 宽度 -->
THICK = #thick#, <!-- 厚度 -->
RECEIVE_QTY = #receiveQty#, <!-- 收货数量 -->
QUALIFY_QTY = #qualifyQty#, <!-- 合格数量 -->
UNQUALIFY_QTY = #unqualifyQty#, <!-- 不合格数量 -->
RECEIVE_UNIT_WEIGHT = #receiveUnitWeight#, <!-- 收货单重 -->
RECEIVE_WEIGHT = #receiveWeight#, <!-- 收货重量 -->
<include refid="SqlBase.updateRevise"/>
WHERE CHECK_NO = #checkNo#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPZL002
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<!-- 修改 -->
<update id="updateDeal">
UPDATE ${hpjxSchema}.T_HPZL002
SET
STATUS = #status#,
DEAL_USER_ID = #dealUserId#, <!-- 处理人ID -->
DEAL_USER_NAME = #dealUserName#, <!-- 处理人名称 -->
DEAL_DATE = #dealDate#,
<include refid="SqlBase.updateRevise"/>
WHERE CHECK_NO = #checkNo#
</update>
</sqlMap>
\ No newline at end of file
...@@ -2,7 +2,9 @@ package com.baosight.hpjx.hp.zl.tools; ...@@ -2,7 +2,9 @@ package com.baosight.hpjx.hp.zl.tools;
import com.baosight.hpjx.core.dao.DaoBase; import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.zl.constant.HpZlSqlConst;
import com.baosight.hpjx.hp.zl.domain.HPZL001; import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.hp.zl.domain.HPZL002;
import com.baosight.hpjx.hp.zl.domain.HPZL003; import com.baosight.hpjx.hp.zl.domain.HPZL003;
import com.baosight.hpjx.hp.zl.domain.HPZL004; import com.baosight.hpjx.hp.zl.domain.HPZL004;
import com.baosight.hpjx.hp.zl.domain.HPZL004C; import com.baosight.hpjx.hp.zl.domain.HPZL004C;
...@@ -68,49 +70,81 @@ public class HPZLTools { ...@@ -68,49 +70,81 @@ public class HPZLTools {
return CollectionUtils.isEmpty(results)? null:results; return CollectionUtils.isEmpty(results)? null:results;
} }
public static class THGZL002 { /**
* 入库质检单
*
* @author:songx
* @date:2024/8/13,10:20
*/
public static class HpZl002 {
/** /**
* @param id * 锁
*
* @param checkNo
* @return
*/ */
public static HPZL003 get(Long id) { public static void lock(String checkNo) {
AssertUtils.isNull(id, "ID不能为空"); if (StringUtils.isBlank(checkNo)) {
Map paramMap = new HashMap(); return;
paramMap.put(HPZL003.FIELD_id, id); }
List<HPZL003> results = DaoBase.getInstance().query(HPZL003.QUERY, paramMap); Map queryMap = new HashMap();
return CollectionUtils.isEmpty(results) ? null : results.get(0); queryMap.put(HPZL002.FIELD_CHECK_NO, checkNo);
DaoBase.getInstance().update(HPSqlConstant.HpZl002.LOCK, queryMap);
}
/**
* 锁
*
* @param checkNos
* @return
*/
public static void lock(List<String> checkNos) {
if (CollectionUtils.isEmpty(checkNos)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("checkNos", checkNos);
DaoBase.getInstance().update(HpZlSqlConst.HpZl002.LOCK, queryMap);
} }
/** /**
* @param ids * GET
*
* @param checkNo
*/ */
public static List<HPZL003> list(List<Long> ids) { public static HPZL002 get(String checkNo) {
AssertUtils.isEmpty(ids, "ID不能为空"); AssertUtils.isNull(checkNo, "质检单号不能为空");
Map paramMap = new HashMap(); Map paramMap = new HashMap();
paramMap.put("ids", ids); paramMap.put(HPZL002.FIELD_CHECK_NO, checkNo);
List<HPZL003> results = DaoBase.getInstance().query(HPZL003.QUERY, paramMap); List<HPZL002> results = DaoBase.getInstance().query(HPZL002.QUERY, paramMap);
return results; return CollectionUtils.isEmpty(results) ? null : results.get(0);
} }
private static void cleanBaseInfo(HPZL003 hgzl002) { /**
hgzl002.setCreatedBy(null); * 查询
hgzl002.setCreatedName(null); *
hgzl002.setCreatedTime(null); * @param checkNos
hgzl002.setUpdatedBy(null); * @return
hgzl002.setUpdatedName(null); */
hgzl002.setUpdatedTime(null); public static List<HPZL002> list(List<String> checkNos) {
hgzl002.setDepCode(null); AssertUtils.isEmpty(checkNos, "ID不能为空");
hgzl002.setId(null); Map<String, Object> paramMap = new HashMap();
paramMap.put("checkNos", checkNos);
return DaoBase.getInstance().query(HPZL002.QUERY, paramMap);
} }
public static List<HPZL003> listByWorkIds(List<Long> workIds) { /**
if (CollectionUtils.isEmpty(workIds)) { * 查询
return null; *
} * @param checkNos
Map queryMap = new HashMap(); * @return
queryMap.put("workIds", workIds); */
return DaoBase.getInstance().query(HPZL003.QUERY, queryMap); public static Map<String, HPZL002> map(List<String> checkNos) {
List<HPZL002> results = list(checkNos);
return results.stream().collect(Collectors.toMap(HPZL002::getCheckNo, item -> item));
} }
} }
/** /**
......
package com.baosight.hpjx.hp.zl.utils; package com.baosight.hpjx.hp.zl.utils;
import com.baosight.hpjx.hp.zl.domain.HPZL002;
import com.baosight.hpjx.hp.zl.domain.HPZL004; import com.baosight.hpjx.hp.zl.domain.HPZL004;
import com.baosight.hpjx.hp.zl.tools.HPZLTools; import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.util.ObjectUtils; import com.baosight.hpjx.util.ObjectUtils;
...@@ -17,6 +18,50 @@ public class HpZlUtils { ...@@ -17,6 +18,50 @@ public class HpZlUtils {
* @author:songx * @author:songx
* @date:2024/8/13,16:32 * @date:2024/8/13,16:32
*/ */
public static class HpZl002 {
/**
* 锁并且获取数据
*
* @param checkNo
* @return
*/
public static HPZL002 lockGetData(String checkNo) {
// 锁
HPZLTools.HpZl002.lock(checkNo);
// db数据
return HPZLTools.HpZl002.get(checkNo);
}
/**
* 锁并且获取数据
*
* @param zl002s
* @return
*/
public static Map<String, HPZL002> lockGetDataEp(List<? extends HPZL002> zl002s) {
return lockGetData(ObjectUtils.listEpKey(zl002s, HPZL002.FIELD_CHECK_NO));
}
/**
* 锁并且获取数据
*
* @param checkNos
* @return
*/
public static Map<String, HPZL002> lockGetData(List<String> checkNos) {
// 锁
HPZLTools.HpZl002.lock(checkNos);
// db数据
return HPZLTools.HpZl002.map(checkNos);
}
}
/**
* @author:songx
* @date:2024/8/13,16:32
*/
public static class HpZl004 { public static class HpZl004 {
/** /**
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<sqlMap resource="com/baosight/hpjx/hp/sb/sql/HPSB099.xml"/> <sqlMap resource="com/baosight/hpjx/hp/sb/sql/HPSB099.xml"/>
<!-- 质量管理 --> <!-- 质量管理 -->
<sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL002.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL004.xml"/> <sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL004.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL004A.xml"/> <sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL004A.xml"/>
......
...@@ -8,16 +8,7 @@ $(function () { ...@@ -8,16 +8,7 @@ $(function () {
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>'; + 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template; return template;
} }
}], }]
loadComplete: function (grid) {
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#BTN_DELETE").on("click", deleteFunc);
},
dataBound: function () {
}
} }
}; };
...@@ -25,6 +16,10 @@ $(function () { ...@@ -25,6 +16,10 @@ $(function () {
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#REMOVE").on("click", remove);
}); });
...@@ -46,47 +41,23 @@ var query = function (e) { ...@@ -46,47 +41,23 @@ var query = function (e) {
/** /**
* 文件上传 * 文件上传
*
* @param id
*/ */
function uploadFile(id) { function uploadFile() {
JSColorbox.open({ let bizId = $("#inqu_status-0-bizId").val();
href: "HPDM099A", let bizType = $("#inqu_status-0-bizType").val();
title: "<div style='text-align: center;'>附件上传</div>", CommonUtils.uploadFile(bizType, bizId, function (res) {
width: "60%", // 刷新列表
height: "50%", resultGrid.dataSource.page(1);
callbackName: uploadFileCallback // 关闭弹窗
}); JSColorbox.close();
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(res) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-bizId", $("#inqu_status-0-bizId").val());
inEiInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val());
inEiInfo.set("result-0-docId", res.docId);
inEiInfo.set("result-0-docName", res.docName);
EiCommunicator.send('HPDM099', 'upload', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}); });
} }
/** /**
* 删除 * 删除
*/ */
function deleteFunc() { function remove() {
var rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length == 0) { if (rows.length == 0) {
message("请先勾选数据!"); message("请先勾选数据!");
return; return;
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<EF:EFPage title="附件清单"> <EF:EFPage title="附件清单">
<EF:EFRegion id="inqu" title="查询区域" type="query"> <EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="业务ID" ename="bizId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="业务ID" ename="bizId" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
$(function () { $(function () {
$.extend(true, IPLATUI.Config, { // $.extend(true, IPLATUI.Config, {
EFGrid: { // EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100, // height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
} // }
}); // });
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
copyToAdd:false, copyToAdd:false,
...@@ -16,46 +16,41 @@ $(function () { ...@@ -16,46 +16,41 @@ $(function () {
template: function (item) { template: function (item) {
let template = ''; let template = '';
// banner清单 // banner清单
if (item.id) { if (!CommonUtils.isBlank(item.id)) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ',\''+item.companyCode+'\')" >banner清单</a>'; + 'onclick="showUploadFile(' + item.id + ',\'' + item.companyCode
+ '\')" >banner清单</a>';
} }
return template return template
} }
}, { }, {
field: "docIdPc", field: "docIdPc", title: "PC端log", template: function (item) {
title: "PC端log", let docId = item.docIdPc;
template: function (item) { let template = '';
let docId = item.docIdPc; if (docId != null && docId.trim().length > 0) {
let template = ''; let src = downloadHref(docId);
if (docId!= null && docId.trim().length>0){ template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" '
let src = downloadHref(docId); + 'href="' + src + '" target="_blank">' +
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" ' '<img src="' + src + '" style="width:200px;height:50px;background-image: none;" '
+ 'href="' + src + '" target="_blank">' + + 'alt="PC端log"/></a>';
'<img src="'+src+'" style="width:200px;height:50px;background-image: none;" alt="PC端log"/></a>';
}
return template;
} }
}, return template;
{ }
field: "docIdApp", }, {
title: "APP端log", field: "docIdApp", title: "APP端log", template: function (item) {
template: function (item) { let docId = item.docIdApp;
let docId = item.docIdApp; let template = '';
let template = ''; if (docId != null && docId.trim().length > 0) {
if (docId!= null && docId.trim().length>0){ let src = downloadHref(docId);
let src = downloadHref(docId); template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" '
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" ' + 'href="' + src + '" target="_blank">' + '<img src="' + downloadHref(docId, true)
+ 'href="' + src + '" target="_blank">' + + '" style="width:200px;height:50px;background-image: none;" alt="APP端log"/></a>';
'<img src="'+downloadHref(docId,true)+'" style="width:200px;height:50px;background-image: none;" alt="APP端log"/></a>';
}
return template;
} }
return template;
} }
], }],
onSuccess: function (e) { onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){ if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query(); query();
} }
}, },
......
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 20,
pageSizes: [20, 50, 100, 200],
},
columns: [{
field: "operator",
template: function (item) {
let status = item.status;
let template = '';
if (status && status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(\'' + item.checkNo + '\')" >修改</a>&nbsp;&nbsp;';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showFile(\'' + item.checkNo + '\')" >附件清单</a>';
return template;
}
}],
loadComplete: function (grid) {
},
onSuccess: function (e) {
},
onRowClick: function (e) {
}
}
}
// 查询
$("#QUERY").on("click", query);
// 新增
$("#ADD").on("click", add);
// 删除
$("#REMOVE").on("click", remove);
// 处理
$("#DEAL").on("click", deal);
// 键盘按键
downKeyUp();
});
/**
* 页面加载完成
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
let add = function () {
addOrUpdate("");
}
/**
* 修改
*/
let modify = function (checkNo) {
let params = "inqu_status-0-checkNo=" + checkNo;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HPZL002A?" + params,
title: "<div style='text-align: center;'>" + (isBlank(params) ? "新增入库质检单" : "修改入库质检单") + "</div>",
width: "60%",
height: "90%",
callbackName: addOrUpdateCallback
});
}
/**
* 新增成功后回调
*/
let addOrUpdateCallback = function (res) {
// 消息
message(res.msg);
// 刷新列表
query();
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除
*/
function remove() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPZL002", "remove", true);
}
})
}
/**
* 处理
*/
function deal() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.submitGridsData("result", "HPZL002", "deal", true);
}
/**
* 附件清单
*
* @param bizId
*/
function showFile(bizId) {
CommonUtils.showFile("CONTRACT", bizId);
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ 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:EFDatePicker ename="receiptDate" cname="单据日期" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect ename="status" cname="状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFSelect>
<EF:EFInput ename="receiveNo" cname="收货单号" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="inventName" cname="存货名称" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="ID" enable="false" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="checkNo" cname="质检单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiveNo" cname="收货单号" enable="false" width="100" align="left"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="100" align="left"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="100" align="center"/>
<EF:EFColumn ename="length" cname="长度" enable="false" width="100" align="right"/>
<EF:EFColumn ename="width" cname="宽度" enable="false" width="100" align="right"/>
<EF:EFColumn ename="thick" cname="厚度" enable="false" width="100" align="right"/>
<EF:EFColumn ename="receiveQty" cname="收货数量" enable="false" width="100" align="right"/>
<EF:EFColumn ename="qualifyQty" cname="合格数量" enable="false" width="100" align="right"/>
<EF:EFColumn ename="unqualifyQty" cname="不合格数量" enable="false" width="100" align="right"/>
<EF:EFColumn ename="receiveUnitWeight" cname="单重" enable="false" width="100" align="right"/>
<EF:EFColumn ename="receiveWeight" cname="收货重量" enable="false" width="100" align="right"/>
<EF:EFColumn ename="dealUserId" cname="处理人ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealDate" cname="处理时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<EF:EFWindow id="dealWindow" title="处理内容" width="50%" height="30%">
<EF:EFRegion id="deal" title="">
<div class="row">
<EF:EFInput blockId="deal" row="0" ename="content" cname="处理内容" colWidth="12" ratio="2:10"
type="textarea" rows="4" required="true"/>
</div>
</EF:EFRegion>
</EF:EFWindow>
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: false,
exportGrid: false,
toolbarConfig: {
hidden: false,
},
columns: []
}
};
// 确认
$('#SAVE').on('click', save);
// 键盘按键
downKeyUp();
})
/**
* 保存
*/
let save = function () {
let receiptDate = $("#result-0-receiptDate").val();
if (isBlank(receiptDate)) {
message("单据日期不能为空");
return;
}
let receiveQty = $("#result-0-receiveQty").val();
if (!isPositiveNumber(receiveQty)) {
message("收货数量必须是大于的数字");
return;
}
let qualifyQty = $("#result-0-qualifyQty").val();
if (!isPositiveNumber(qualifyQty)) {
message("合格数量必须是大于的数字");
return;
}
let receiveUnitWeight = $("#result-0-receiveUnitWeight").val();
if (!isPositiveNumber(receiveUnitWeight)) {
message("单重必须是大于的数字");
return;
}
let receiveWeight = $("#result-0-receiveWeight").val();
if (!isPositiveNumber(receiveWeight)) {
message("收货重量必须是大于的数字");
return;
}
JSUtils.submitGridsData("", "HPZL002A", "save", true, function (res) {
if (res.status > -1) {
parent.JSColorbox.setValueCallback(res);
} else {
message(res.msg);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="入库质检单详情">
<EF:EFRegion id="result" title="数据区域">
<EF:EFInput cname="ID" blockId="result" ename="id" row="0" type="hidden"/>
<div class="row">
<EF:EFInput ename="checkNo" cname="质检单号" blockId="result" row="0" colWidth="6" ratio="2:10"
required="true" readonly="true"/>
<EF:EFDatePicker ename="receiptDate" cname="单据日期" blockId="result" row="0" colWidth="6" ratio="2:10"
format="yyyy-MM-dd" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="receiveNo" cname="收货单号" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="inventName" cname="存货名称" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="spec" cname="规格" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="material" cname="材质" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="unit" cname="单位" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="length" cname="长度(MM)" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="width" cname="宽度(MM)" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="thick" cname="厚度(MM)" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="receiveQty" cname="收货数量" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="qualifyQty" cname="合格数量" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="receiveUnitWeight" cname="单重" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="receiveWeight" cname="收货重量" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<br/>
<span style="color: red; ">说明:质检单号由系统自动生成</span><br>
</EF:EFRegion>
</EF:EFPage>
...@@ -536,6 +536,26 @@ function loadChange(grid,e,field) { ...@@ -536,6 +536,26 @@ function loadChange(grid,e,field) {
(function ($) { (function ($) {
/** /**
* 附件清单
*
* @param bizType
* @param bizId
*/
function showFile(bizType, bizId) {
let params = {
"inqu_status-0-bizType": bizType,
"inqu_status-0-bizId": bizId
}
JSColorbox.open({
href: "HPDM099",
title: "<div style='text-align: center;'>附件清单-HPDM099</div>",
width: "80%",
height: "80%",
params: params
});
}
/**
* 上传文件 * 上传文件
* *
* @param bizType * @param bizType
...@@ -592,6 +612,7 @@ function loadChange(grid,e,field) { ...@@ -592,6 +612,7 @@ function loadChange(grid,e,field) {
// export 到全局作用域 window对象 // export 到全局作用域 window对象
$.extend(window, { $.extend(window, {
CommonUtils: { CommonUtils: {
showFile: showFile,
uploadFile: uploadFile, uploadFile: uploadFile,
isBlank: isBlank, isBlank: isBlank,
importData: importData importData: importData
......
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