Commit bba725d5 by 宋祥

1.售后服务,报工数字支持小数位,下料单增加完成状态

parent 577b5953
...@@ -147,7 +147,7 @@ public class DaoUtils { ...@@ -147,7 +147,7 @@ public class DaoUtils {
userId = "System"; userId = "System";
} }
map.put("createdBy", userId); map.put("createdBy", userId);
map.put("updatedBy", ""); map.put("updatedBy", userId);
// 创建人姓名 // 创建人姓名
String userName = MapUtils.getString(map, "createdName"); String userName = MapUtils.getString(map, "createdName");
try { try {
...@@ -158,7 +158,7 @@ public class DaoUtils { ...@@ -158,7 +158,7 @@ public class DaoUtils {
userName = "System"; userName = "System";
} }
map.put("createdName", userName); map.put("createdName", userName);
map.put("updatedName", ""); map.put("updatedName", userName);
// 创建人企业编码 // 创建人企业编码
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
AssertUtils.isEmpty(companyCode, "当前用户未绑定公司,无法操作数据,请联系管理员!"); AssertUtils.isEmpty(companyCode, "当前用户未绑定公司,无法操作数据,请联系管理员!");
...@@ -177,8 +177,9 @@ public class DaoUtils { ...@@ -177,8 +177,9 @@ public class DaoUtils {
} }
// 创建时刻 // 创建时刻
try { try {
map.put("createdTime", DateUtils.shortDateTime()); String dateTime = DateUtils.shortDateTime();
map.put("updatedTime", ""); map.put("createdTime", dateTime);
map.put("updatedTime", dateTime);
} catch (PlatException e) { } catch (PlatException e) {
log.warn("写入创建时刻失败", e); log.warn("写入创建时刻失败", e);
} }
......
...@@ -95,6 +95,8 @@ public class HPConstant { ...@@ -95,6 +95,8 @@ public class HPConstant {
public static final String HPCW001_BILL_NUMBER = "HPCW001_BILL_NUMBER"; public static final String HPCW001_BILL_NUMBER = "HPCW001_BILL_NUMBER";
//发票单号 //发票单号
public static final String HPCW002_BILL_NUMBER = "HPCW002_BILL_NUMBER"; public static final String HPCW002_BILL_NUMBER = "HPCW002_BILL_NUMBER";
// 售后单号
public static final String AFTER_SALE_NO = "AFTER_SALE_NO";
} }
/** /**
......
package com.baosight.hpjx.hp.fw.constant;
/**
* @author:songx
* @date:2024/9/24,17:53
*/
public class HpFwConstant {
/**
* HPFW001 定义
*
* @author:songx
* @date:2024/9/24,17:54
*/
public static class HpFw001 {
/**
* 售后状态
*
* @author:songx
* @date:2024/5/7,16:36
*/
public static class Status {
// 待处理
public static final Integer S0 = 0;
// 已处理
public static final Integer S1 = 1;
}
}
}
package com.baosight.hpjx.hp.fw.constant;
/**
* @author:songx
* @date:2024/9/24,18:09
*/
public class HpFwSqlConstant {
/**
* @author:songx
* @date:2024/8/29,15:54
*/
public static class HpFw001 {
// 锁
public static final String LOCK = "HPFW001.lock";
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
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.fw.domain.HPFW001;
import com.baosight.hpjx.hp.xs.domain.HPXS006;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
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.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 售后服务
*
* @author:songx
* @date:2024/9/24,17:47
*/
public class ServiceHPFW001 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "售后维修", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
@OperationLogAnnotation(operModul = "售后维修", operType = "查询")
public EiInfo query(EiInfo inInfo) {
try {
super.query(inInfo, HPFW001.QUERY, new HPFW001());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.fw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
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.fw.constant.HpFwConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
import com.baosight.hpjx.hp.fw.utils.HpFwUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
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.Arrays;
import java.util.Map;
/**
* 新增修改
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPFW001B extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
this.setBaseInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
HPFW001 fFw001 = MapUtils.toDaoEPBase(inInfo, HPFW001.class);
fFw001.setAfterSaleDate(DateUtils.formatShort(fFw001.getAfterSaleDate()));
if (StringUtils.isBlank(fFw001.getAfterSaleNo())) {
this.add(fFw001);
} else {
this.modify(fFw001);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param fFw001
*/
private void add(HPFW001 fFw001) {
fFw001.setAfterSaleNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.AFTER_SALE_NO));
fFw001.setStatus(HpFwConstant.HpFw001.Status.S0);
DaoUtils.insert(HPFW001.INSERT, fFw001);
}
/**
* 修改数据
*
* @param fFw001
*/
private void modify(HPFW001 fFw001) {
HPFW001 dbFw001 = HpFwUtils.HpFw001.lockAndGet(fFw001);
this.checkData(dbFw001);
DaoUtils.update(HPFW001.UPDATE, fFw001);
}
/**
* 设置信息
*
* @param inInfo
*/
public void setBaseInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String afterSaleNo = MapUtils.getString(queryRow, HPFW001.FIELD_AFTER_SALE_NO);
if (StringUtils.isBlank(afterSaleNo)) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HpFwTools.HpFw001.get(afterSaleNo));
resultBlock.addBlockMeta(new HPFW001().eiMetadata);
inInfo.setBlock(resultBlock);
}
/**
* 数据校验
*
* @param dbFw001
*/
private void checkData(HPFW001 dbFw001) {
AssertUtils.isNotEquals(dbFw001.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("回访单【%s】不是\"未删除\"状态,不允许操作", dbFw001.getAfterSaleNo()));
AssertUtils.isNotEquals(dbFw001.getStatus(), HpFwConstant.HpFw001.Status.S0,
String.format("回访单【%s】不是\"待回访\"状态,不允许操作", dbFw001.getAfterSaleNo()));
}
}
<?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="HPFW001">
<sql id="column">
ID as "id", <!-- 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-已维修 -->
AFTER_SALE_DATE as "afterSaleDate", <!-- 售后日期 -->
AFTER_SALE_NO as "afterSaleNo", <!-- 售后单号 -->
AFTER_SALE_TYPE as "afterSaleType", <!-- 售后方式 -->
URGENCY as "urgency", <!-- 紧急程度 -->
CUSTOM_ID as "customId", <!-- 客户ID -->
CUSTOM_NAME as "customName", <!-- 客户名称 -->
DEAL_USER_ID as "dealUserId", <!-- 处理人ID -->
DEAL_USER_NAME as "dealUserName" <!-- 处理人名称 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<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="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="afterSaleDate">
AFTER_SALE_DATE = #afterSaleDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="afterSaleNo">
AFTER_SALE_NO = #afterSaleNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="afterSaleType">
AFTER_SALE_TYPE = #afterSaleType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="urgency">
URGENCY = #urgency#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customId">
CUSTOM_ID = #customId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="customName">
CUSTOM_NAME = #customName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserId">
DEAL_USER_ID = #dealUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserName">
DEAL_USER_NAME = #dealUserName#
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.fw.domain.HPFW001">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPFW001 WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPFW001 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPFW001 (
COMPANY_CODE, <!-- 公司编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
STATUS, <!-- 维修状态 0-未处理 1-已维修 -->
AFTER_SALE_DATE, <!-- 售后日期 -->
AFTER_SALE_NO, <!-- 售后单号 -->
AFTER_SALE_TYPE, <!-- 售后方式 -->
URGENCY, <!-- 紧急程度 -->
CUSTOM_ID, <!-- 客户ID -->
CUSTOM_NAME, <!-- 客户名称 -->
DEAL_USER_ID, <!-- 处理人ID -->
DEAL_USER_NAME <!-- 处理人名称 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #status#, #afterSaleDate#, #afterSaleNo#, #afterSaleType#, #urgency#, #customId#,
#customName#, #dealUserId#, #dealUserName#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPFW001 WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPFW001
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
AFTER_SALE_DATE = #afterSaleDate#, <!-- 售后日期 -->
AFTER_SALE_TYPE = #afterSaleType#, <!-- 售后方式 -->
URGENCY = #urgency#, <!-- 紧急程度 -->
CUSTOM_ID = #customId#, <!-- 客户ID -->
CUSTOM_NAME = #customName#, <!-- 客户名称 -->
DEAL_USER_ID = #dealUserId#, <!-- 处理人ID -->
DEAL_USER_NAME = #dealUserName# <!-- 处理人名称 -->
WHERE AFTER_SALE_NO = #afterSaleNo#
</update>
</sqlMap>
package com.baosight.hpjx.hp.fw.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant;
import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.util.AssertUtils;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/9/24,18:08
*/
public class HpFwTools {
/**
* @author:songx
* @date:2024/9/24,18:08
*/
public static class HpFw001 {
/**
* 锁.
*
* @param afterSaleNo
*/
public static void lock(String afterSaleNo) {
AssertUtils.isEmpty(afterSaleNo, "售后单号不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put(HPFW001.FIELD_AFTER_SALE_NO, afterSaleNo);
DaoBase.getInstance().update(HpFwSqlConstant.HpFw001.LOCK, paramMap);
}
/**
* 查询
*
* @param afterSaleNo
* @return
*/
public static HPFW001 get(String afterSaleNo) {
AssertUtils.isEmpty(afterSaleNo, "售后单号不能为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put(HPFW001.FIELD_AFTER_SALE_NO, afterSaleNo);
List<HPFW001> results = DaoBase.getInstance().query(HPFW001.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
}
package com.baosight.hpjx.hp.fw.utils;
import com.baosight.hpjx.hp.fw.domain.HPFW001;
import com.baosight.hpjx.hp.fw.tools.HpFwTools;
/**
* @author:songx
* @date:2024/9/24,18:06
*/
public class HpFwUtils {
/**
* @author:songx
* @date:2024/9/24,18:07
*/
public static class HpFw001 {
/**
* 锁并获取数据
*
* @param fFw001
* @return
*/
public static HPFW001 lockAndGet(HPFW001 fFw001) {
return lockAndGet(fFw001.getAfterSaleNo());
}
/**
* 锁并获取数据
*
* @param afterSaleNo
* @return
*/
public static HPFW001 lockAndGet(String afterSaleNo) {
// 锁
HpFwTools.HpFw001.lock(afterSaleNo);
// 查询数据
return HpFwTools.HpFw001.get(afterSaleNo);
}
}
}
...@@ -183,8 +183,8 @@ public class HPKC003 extends DaoEPBase { ...@@ -183,8 +183,8 @@ public class HPKC003 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_AMOUNT); eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(0); eiColumn.setScaleLength(1);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(15);
eiColumn.setDescName("数量"); eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
......
package com.baosight.hpjx.hp.sc.constant;
/**
* @author:songx
* @date:2024/9/25,10:06
*/
public class HpScConst {
/**
* 完成状态
*
* @author:songx
* @date:2024/9/25,10:07
*/
public static class CompleteStatus {
// 未完成
public static final Integer S0 = 0;
// 已完成
public static final Integer S1 = 1;
// 部分完成
public static final Integer S2 = 2;
}
}
...@@ -72,6 +72,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -72,6 +72,7 @@ public class HPSC005 extends DaoEPBase {
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/ public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_MAT_ID = "matId"; /* 材料ID*/ public static final String FIELD_MAT_ID = "matId"; /* 材料ID*/
public static final String FIELD_DELIVERY_DATE = "deliveryDate"; public static final String FIELD_DELIVERY_DATE = "deliveryDate";
public static final String FIELD_COMPLETE_STATUS = "completeStatus"; /* 完成状态*/
public static final String COL_MAT_ID = "MAT_ID"; /* 材料ID*/ public static final String COL_MAT_ID = "MAT_ID"; /* 材料ID*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
...@@ -122,6 +123,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -122,6 +123,7 @@ public class HPSC005 extends DaoEPBase {
public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/ public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/ public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String COL_DELIVERY_DATE = "DELIVERY_DATE"; public static final String COL_DELIVERY_DATE = "DELIVERY_DATE";
public static final String COL_COMPLETE_STATUS = "COMPLETE_STATUS";
public static final String QUERY = "HPSC005.query"; public static final String QUERY = "HPSC005.query";
public static final String COUNT = "HPSC005.count"; public static final String COUNT = "HPSC005.count";
...@@ -178,6 +180,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -178,6 +180,7 @@ public class HPSC005 extends DaoEPBase {
private Long inventRecordId; /* 存货档案ID*/ private Long inventRecordId; /* 存货档案ID*/
private Long matId; /* 材料ID*/ private Long matId; /* 材料ID*/
private String deliveryDate = " "; private String deliveryDate = " ";
private Integer completeStatus = new Integer(0);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -414,6 +417,10 @@ public class HPSC005 extends DaoEPBase { ...@@ -414,6 +417,10 @@ public class HPSC005 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_DELIVERY_DATE); eiColumn = new EiColumn(FIELD_DELIVERY_DATE);
eiColumn.setDescName("交货日期"); eiColumn.setDescName("交货日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPLETE_STATUS);
eiColumn.setDescName("完成状态");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -1193,6 +1200,14 @@ public class HPSC005 extends DaoEPBase { ...@@ -1193,6 +1200,14 @@ public class HPSC005 extends DaoEPBase {
this.deliveryDate = deliveryDate; this.deliveryDate = deliveryDate;
} }
public Integer getCompleteStatus() {
return completeStatus;
}
public void setCompleteStatus(Integer completeStatus) {
this.completeStatus = completeStatus;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1250,6 +1265,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1250,6 +1265,7 @@ public class HPSC005 extends DaoEPBase {
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId)); setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId)); setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate)); setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate));
setCompleteStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_COMPLETE_STATUS)), completeStatus));
} }
...@@ -1309,6 +1325,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1309,6 +1325,7 @@ public class HPSC005 extends DaoEPBase {
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID))); map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID))); map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DELIVERY_DATE, StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE))); map.put(FIELD_DELIVERY_DATE, StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE)));
map.put(FIELD_COMPLETE_STATUS, StringUtils.toString(completeStatus, eiMetadata.getMeta(FIELD_COMPLETE_STATUS)));
return map; return map;
} }
......
...@@ -56,6 +56,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -56,6 +56,7 @@ public class HPSC006 extends DaoEPBase {
public static final String FIELD_FILE_PATH1 = "filePath1"; /* 文件地址1*/ public static final String FIELD_FILE_PATH1 = "filePath1"; /* 文件地址1*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/ public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_MATERIAL = "material"; /* 材质*/ public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String FIELD_COMPLETE_STATUS = "completeStatus"; /* 完成状态*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/ public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_PART_NAME = "partName"; /* 零件名称*/ public static final String FIELD_PART_NAME = "partName"; /* 零件名称*/
...@@ -104,6 +105,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -104,6 +105,7 @@ public class HPSC006 extends DaoEPBase {
public static final String COL_CUT_SCHEDULE = "CUT_SCHEDULE"; /* 下料进度*/ public static final String COL_CUT_SCHEDULE = "CUT_SCHEDULE"; /* 下料进度*/
public static final String COL_REQ_NUM = "REQ_NUM"; /* 领料记录*/ public static final String COL_REQ_NUM = "REQ_NUM"; /* 领料记录*/
public static final String COL_DELIVERY_DATE = "DELIVERY_DATE"; public static final String COL_DELIVERY_DATE = "DELIVERY_DATE";
public static final String COL_COMPLETE_STATUS = "COMPLETE_STATUS";
public static final String QUERY = "HPSC006.query"; public static final String QUERY = "HPSC006.query";
...@@ -161,6 +163,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -161,6 +163,7 @@ public class HPSC006 extends DaoEPBase {
private Integer reqNum = new Integer(0); private Integer reqNum = new Integer(0);
private String deliveryDate = " "; private String deliveryDate = " ";
private Integer completeStatus = new Integer(0);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -344,6 +347,11 @@ public class HPSC006 extends DaoEPBase { ...@@ -344,6 +347,11 @@ public class HPSC006 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_DELIVERY_DATE); eiColumn = new EiColumn(FIELD_DELIVERY_DATE);
eiColumn.setDescName("交货日期"); eiColumn.setDescName("交货日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPLETE_STATUS);
eiColumn.setDescName("完成状态");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -948,6 +956,14 @@ public class HPSC006 extends DaoEPBase { ...@@ -948,6 +956,14 @@ public class HPSC006 extends DaoEPBase {
this.deliveryDate = deliveryDate; this.deliveryDate = deliveryDate;
} }
public Integer getCompleteStatus() {
return completeStatus;
}
public void setCompleteStatus(Integer completeStatus) {
this.completeStatus = completeStatus;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -994,6 +1010,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -994,6 +1010,7 @@ public class HPSC006 extends DaoEPBase {
setCutSchedule(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUT_SCHEDULE)), cutSchedule)); setCutSchedule(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUT_SCHEDULE)), cutSchedule));
setReqNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REQ_NUM)), reqNum)); setReqNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REQ_NUM)), reqNum));
setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate)); setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate));
setCompleteStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_COMPLETE_STATUS)), completeStatus));
} }
/** /**
...@@ -1041,6 +1058,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -1041,6 +1058,7 @@ public class HPSC006 extends DaoEPBase {
map.put(FIELD_CUT_SCHEDULE, StringUtils.toString(cutSchedule, eiMetadata.getMeta(FIELD_CUT_SCHEDULE))); map.put(FIELD_CUT_SCHEDULE, StringUtils.toString(cutSchedule, eiMetadata.getMeta(FIELD_CUT_SCHEDULE)));
map.put(FIELD_REQ_NUM, StringUtils.toString(reqNum, eiMetadata.getMeta(FIELD_REQ_NUM))); map.put(FIELD_REQ_NUM, StringUtils.toString(reqNum, eiMetadata.getMeta(FIELD_REQ_NUM)));
map.put(FIELD_DELIVERY_DATE, StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE))); map.put(FIELD_DELIVERY_DATE, StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE)));
map.put(FIELD_COMPLETE_STATUS, StringUtils.toString(completeStatus, eiMetadata.getMeta(FIELD_COMPLETE_STATUS)));
return map; return map;
} }
} }
...@@ -51,7 +51,8 @@ ...@@ -51,7 +51,8 @@
FILE_PATH4 as "filePath4", <!-- 文件地址4 --> FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 --> FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID --> INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
DELIVERY_DATE as "deliveryDate" DELIVERY_DATE as "deliveryDate",
COMPLETE_STATUS as "completeStatus"
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -132,6 +133,9 @@ ...@@ -132,6 +133,9 @@
<isNotEmpty prepend=" AND " property="prodOrderNos"> <isNotEmpty prepend=" AND " property="prodOrderNos">
PROD_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate> PROD_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="completeStatus">
COMPLETE_STATUS = #completeStatus#
</isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <sql id="authCondition">
...@@ -410,4 +414,24 @@ ...@@ -410,4 +414,24 @@
STATUS IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate> STATUS IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty> </isNotEmpty>
</select> </select>
<!-- 修改完成状态 -->
<update id="updateCompleteStatus">
UPDATE ${hpjxSchema}.T_HPSC005
SET
COMPLETE_STATUS = #completeStatus#,
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE PROD_ORDER_NO = #prodOrderNo#
</update>
<!-- 按状态统计 -->
<select id="statByCompleteStatus" resultClass="java.util.HashMap">
SELECT COMPLETE_STATUS AS "completeStatus", COUNT(1) AS "num"
FROM ${hpjxSchema}.T_HPSC005
WHERE 1=1
<include refid="condition"/>
GROUP BY COMPLETE_STATUS
</select>
</sqlMap> </sqlMap>
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 --> FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID --> INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
DELIVERY_DATE as "deliveryDate" DELIVERY_DATE as "deliveryDate",
COMPLETE_STATUS as "completeStatus"
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="authCondition"/> <include refid="authCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -151,6 +153,12 @@ ...@@ -151,6 +153,12 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<sql id="order"> <sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -162,18 +170,17 @@ ...@@ -162,18 +170,17 @@
</dynamic> </dynamic>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC006">
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC006">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1 FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
<include refid="order" /> <include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
</select> </select>
<select id="queryDetail" parameterClass="java.util.HashMap" <select id="queryDetail" parameterClass="java.util.HashMap"
...@@ -294,7 +301,11 @@ ...@@ -294,7 +301,11 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</update> </update>
<update id="updateCompleteNum"> <update id="updateCompleteNum">
UPDATE ${hpjxSchema}.T_HPSC006 UPDATE ${hpjxSchema}.T_HPSC006
SET SET
...@@ -306,4 +317,14 @@ ...@@ -306,4 +317,14 @@
ID = #id# ID = #id#
</update> </update>
<!-- 修改完成状态 -->
<update id="updateCompleteStatus">
UPDATE ${hpjxSchema}.T_HPSC006
SET
COMPLETE_STATUS = #completeStatus#,
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
</sqlMap> </sqlMap>
...@@ -7,6 +7,7 @@ import com.baosight.hpjx.core.security.UserSessionUtils; ...@@ -7,6 +7,7 @@ import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.core.utils.QrCodeUtils; import com.baosight.hpjx.core.utils.QrCodeUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.sc.domain.*; import com.baosight.hpjx.hp.sc.domain.*;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -1180,8 +1181,13 @@ public class HPSCTools { ...@@ -1180,8 +1181,13 @@ public class HPSCTools {
} }
} }
/**
*
* @author:songx
* @date:2024/9/25,9:32
*/
public static class Hpsc006 { public static class Hpsc006 {
/** /**
* 锁 * 锁
* *
...@@ -1194,6 +1200,20 @@ public class HPSCTools { ...@@ -1194,6 +1200,20 @@ public class HPSCTools {
queryMap.put("id", id); queryMap.put("id", id);
DaoBase.getInstance().update(HPSqlConstant.HPSC006.LOCK, queryMap); DaoBase.getInstance().update(HPSqlConstant.HPSC006.LOCK, queryMap);
} }
/**
* 锁
*
* @param ids
* @return
*/
public static void lock(List<Long> ids) {
AssertUtils.isEmpty(ids, "生产下料号不能为空");
Map queryMap = new HashMap();
queryMap.put("ids", ids);
DaoBase.getInstance().update(HPSqlConstant.HPSC006.LOCK, queryMap);
}
/** /**
* 更新已完成数量 * 更新已完成数量
* *
...@@ -1242,6 +1262,36 @@ public class HPSCTools { ...@@ -1242,6 +1262,36 @@ public class HPSCTools {
AssertUtils.isEmpty(results, String.format("生产订单[%s]信息不存在", productionOrderNo)); AssertUtils.isEmpty(results, String.format("生产订单[%s]信息不存在", productionOrderNo));
return results; return results;
} }
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public static List<HPSC006> list(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("ids", ids);
return DaoBase.getInstance().query(HPSC006.QUERY, queryMap);
}
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public static Map<Long, HPSC006> map(List<Long> ids) {
List<HPSC006> results = list(ids);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPSC006::getId, item -> item));
}
} }
public static class Hpsc007 { public static class Hpsc007 {
......
package com.baosight.hpjx.hp.sc.utils;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.ObjectUtils;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/9/25,9:29
*/
public class HpScUtils {
/**
* @author:songx
* @date:2024/9/24,18:07
*/
public static class HpSc006 {
/**
* 锁并获取数据
*
* @param fSc006s
* @return
*/
public static Map<Long, HPSC006> lockAndGet(List<HPSC006> fSc006s) {
List<Long> ids = ObjectUtils.listEpKey(fSc006s, HPSC006.FIELD_ID);
// 锁
HPSCTools.Hpsc006.lock(ids);
// 查询数据
return HPSCTools.Hpsc006.map(ids);
}
/**
* 锁并获取数据
*
* @param id
* @return
*/
public static HPSC006 lockAndGet(Long id) {
// 锁
HPSCTools.Hpsc006.lock(id);
// 查询数据
return HPSCTools.Hpsc006.getById(id);
}
}
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.baosight.iplat4j.core.FrameworkInfo" %>
<%@ page import="java.io.File" %>
<%
String domain = FrameworkInfo.getProjectAppTopDomain();
if (domain != null && domain.startsWith(".")) {
domain = domain.substring(1);
%>
<script type="text/javascript">
try {
document.domain = '<%= domain %>';
} catch (ex) {
alert('model not valid[<%= domain %>]');
}
</script>
<%
}
%>
<%
String directmode = request.getParameter("maintain") != null ? request.getParameter("maintain").toString() : "";
RequestDispatcher rd;
String appName = FrameworkInfo.getProjectAppName();
org.springframework.security.core.context.SecurityContextHolder.clearContext();
session.setAttribute("iplat.logout", "1");
session.invalidate();
String entryChoice = FrameworkInfo.getText("entryChoice");
String url = "/DispatchAction.do?efFormEname=ECTM40&nodeId=0000000099999999&nodeType=s&templateType=0";
if (entryChoice.equals("template")) {
//从模板进入登录页面
rd = request.getRequestDispatcher(url);
try {
rd.forward(request, response);
} catch (ServletException e1) {
e1.printStackTrace();
} finally {
out.clear();
out = pageContext.pushBody();
}
} else if (entryChoice.equals("static")) {
// 从静态页面进入登录页面
// 判断缓存文件是否存在
String requestURL = request.getRequestURL().toString();
String _url = requestURL.substring(0, requestURL.indexOf(request.getContextPath())) + request.getContextPath();
String _urlHtml = "/login.html";
java.io.File file = new java.io.File(request.getRealPath("") + _urlHtml);
if (!file.exists()) {
//生成对应的html静态文件
try {
//+url;
java.io.FileOutputStream blankFile = new java.io.FileOutputStream(request.getRealPath("") + _urlHtml);
blankFile.write(new byte[0]);
java.net.URL requestUrl = new java.net.URL(_url);
System.out.println(_url);
java.net.HttpURLConnection con = (java.net.HttpURLConnection) requestUrl.openConnection();
con.connect();
java.io.FileOutputStream fileout = new java.io.FileOutputStream(request.getRealPath("") + _urlHtml);
byte[] bytes = new byte[1024];
int len = 0;
while ((len = con.getInputStream().read(bytes)) != -1) {
fileout.write(bytes, 0, len);
}
} catch (Exception e) {
e.printStackTrace();
out.print("生成静态html文件出错!");
}
}
File _file = new File(request.getRealPath("") + _urlHtml);
if (_file.length() == 0) {
rd = request.getRequestDispatcher(url);
try {
rd.forward(request, response);
} catch (ServletException e1) {
e1.printStackTrace();
} finally {
out.clear();
out = pageContext.pushBody();
}
} else {
response.sendRedirect(request.getContextPath() + _urlHtml);
}
} else {
//以正常方式进入登录首页
rd = request.getRequestDispatcher("iPlatV7-login.jsp");
try {
rd.forward(request, response);
} catch (ServletException e1) {
e1.printStackTrace();
} finally {
out.clear();
out = pageContext.pushBody();
}
}
%>
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
<!-- 用户服务 --> <!-- 用户服务 -->
<sqlMap resource="com/baosight/hpjx/hp/xs/sql/HPXS007A.xml"/> <sqlMap resource="com/baosight/hpjx/hp/xs/sql/HPXS007A.xml"/>
<!-- 产品服务 -->
<sqlMap resource="com/baosight/hpjx/hp/fw/sql/HPFW001.xml"/>
<!--财务服务--> <!--财务服务-->
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW001.xml"/> <sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW001.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW002.xml"/> <sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW002.xml"/>
......
$(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.afterSaleNo + '\')" >修改</a>&nbsp;&nbsp;';
}
return template;
}
}],
loadComplete: function (grid) {
},
onSuccess: function (e) {
},
onRowClick: function (e) {
}
}
}
// 查询
$("#QUERY").on("click", query);
// 新增
$("#ADD").on("click", add);
// 删除
$("#REMOVE").on("click", remove);
// 处理
$("#CHECK").on("click", check);
// 键盘按键
downKeyUp();
});
/**
* 页面加载完成
*/
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
let add = function () {
addOrUpdate("");
}
/**
* 修改
*/
let modify = function (afterSaleNo) {
let params = "inqu_status-0-afterSaleNo=" + afterSaleNo;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HPFW001B?" + params,
title: "<div style='text-align: center;'>" + (isBlank(params) ? "新增售后服务" : "修改售后服务") + "</div>",
width: "60%",
height: "70%",
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", "HPFW001", "remove", true);
}
})
}
/**
* 审核
*
* @param id
* @param auditStatus
*/
function check(id) {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"处理\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPFW001", "check", true);
}
})
}
<!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="afterSaleDate" cname="售后日期" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect ename="afterSaleType" cname="售后方式" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.hpfw.afterSaleType"/>
</EF:EFSelect>
<EF:EFSelect ename="status" cname="售后状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.hpfw.afterSaleStatus"/>
</EF:EFSelect>
<EF:EFInput ename="customName" cname="客户名称" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput ename="dealUserName" cname="处理人名称" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<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="afterSaleNo" cname="售后单号" enable="false" width="100" align="center"/>
<EF:EFColumn ename="afterSaleDate" cname="售后日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFComboColumn ename="afterSaleType" cname="售后方式" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.afterSaleType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="售后状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.afterSaleStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="urgency" cname="紧急程度" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.hpfw.afterSaleUrgency"/>
</EF:EFComboColumn>
<EF:EFColumn ename="customId" cname="客户ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="customName" cname="客户名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealUserId" cname="处理人ID" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/>
<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:EFColumn cname="修改人" ename="updatedName" enable="false" width="100" align="center"/>
<EF:EFColumn cname="修改时间" ename="updatedTime" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFSelect = {
"result-0-companyCode": {
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = dataItem['textField'];
if (valueField) {
textField = textField.indexOf("-") > -1 ? textField.split("-")[1] : textField;
$("#result-0-companyName").val(textField);
} else {
$("#result-0-companyName").val("");
}
}
}
}
IPLATUI.EFGrid = {
"result": {
pageable: false,
exportGrid: false,
toolbarConfig: {
hidden: false,
},
columns: [],
loadComplete: function (grid) {
},
onSuccess: function (e) {
}
}
};
// 确认
$('#SAVE').on('click', save);
// 键盘按键
downKeyUp();
})
/**
* 保存
*/
let save = function () {
let companyCode = $("#result-0-companyCode").val();
if (isBlank(companyCode)) {
message("企业名称不能为空");
return;
}
let folDate = $("#result-0-folDate").val();
if (isBlank(folDate)) {
message("回访日期不能为空");
return;
}
let folType = $("#result-0-folType").val();
if (isBlank(folType)) {
message("回访方式不能为空");
return;
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("", "HGXS007B", "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 cname="售后服务单号" blockId="result" ename="afterSaleNo" row="0" colWidth="6" ratio="2:10"
required="true" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker cname="售后日期" ename="afterSaleDate" blockId="result" row="0" colWidth="6" ratio="2:10"
format="yyyy-MM-dd" readonly="true"/>
</div>
<div class="row">
<EF:EFSelect cname="售后方式" ename="afterSaleType" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.hpfw.afterSaleType"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="urgency" cname="紧急程度" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.hpfw.afterSaleUrgency"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="customId" cname="客户名称" blockId="result" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="customName" cname="公司名称" blockId="result" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
</div>
<br/>
<span style="color: red; ">说明:售后服务单号由系统自动生成</span><br>
</EF:EFRegion>
</EF:EFPage>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/> <EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="amount" cname="数量" enable="false" width="120" align="right" format="{0:N1}"/>
<EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
......
...@@ -93,8 +93,8 @@ let select = function () { ...@@ -93,8 +93,8 @@ let select = function () {
message("第" + (i + 1) + "行请选择仓库名称"); message("第" + (i + 1) + "行请选择仓库名称");
return; return;
} }
if (!isPositiveInteger(applyNum)) { if (!isPositiveNumber(applyNum)) {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数"); message("勾选的第" + (i + 1) + "行数量必须是大于0的数字");
return; return;
} }
if (parseFloat(applyNum) > parseFloat(num) - parseFloat(completeNum)) { if (parseFloat(applyNum) > parseFloat(num) - parseFloat(completeNum)) {
......
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true"/> <EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="applyNum" cname="入库数量" width="120" align="right" format="{0:N0}" required="true"/> <EF:EFColumn ename="applyNum" cname="入库数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="remark1" cname="入库说明" width="150"/> <EF:EFColumn ename="remark1" cname="入库说明" width="150"/>
<EF:EFColumn ename="completeNum" cname="已入库数量" enable="false" width="120" align="right" format="{0:N0}" <EF:EFColumn ename="completeNum" cname="已入库数量" enable="false" width="120" align="right" format="{0:N1}"
hidden="true"/> hidden="true"/>
<EF:EFColumn ename="unCompleteNum" cname="待入库数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="unCompleteNum" cname="待入库数量" enable="false" width="120" align="right" format="{0:N1}"/>
<EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N1}"/>
<EF:EFColumn ename="totalWt" cname="任务重量(T)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="任务重量(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="150" align="center"/> <EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/> <EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/>
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<EF:EFColumn ename="length" cname="长(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/> <EF:EFColumn ename="length" cname="长(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/>
<EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/> <EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/>
<EF:EFColumn ename="thick" cname="厚(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/> <EF:EFColumn ename="thick" cname="厚(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N1}"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFComboColumn ename="isPrint" cname="是否制单" width="80" align="center"> <EF:EFComboColumn ename="isPrint" cname="是否制单" width="80" align="center">
......
...@@ -50,8 +50,8 @@ let select = function () { ...@@ -50,8 +50,8 @@ let select = function () {
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
let applyAmount = rows[i]['applyAmount']; let applyAmount = rows[i]['applyAmount'];
let amount = rows[i]['amount']; let amount = rows[i]['amount'];
if (!isPositiveInteger(applyAmount)) { if (!isPositiveNumber(applyAmount)) {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数"); message("勾选的第" + (i + 1) + "行数量必须是大于0的数字");
return; return;
} }
if (parseFloat(applyAmount) > parseFloat(amount)) { if (parseFloat(applyAmount) > parseFloat(amount)) {
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N0}" required="true"/> <EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N1}" required="true"/>
<EF:EFColumn ename="applyRemark" cname="申请说明" width="150" editType="textarea" copy="true"/> <EF:EFColumn ename="applyRemark" cname="申请说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N1}"/>
<EF:EFColumn ename="weight" cname="库存重量(T)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="库存重量(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150" hidden="true"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150" hidden="true"/>
<EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="140" align="center" hidden="true"/> <EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="140" align="center" hidden="true"/>
......
...@@ -45,8 +45,8 @@ let select = function () { ...@@ -45,8 +45,8 @@ let select = function () {
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
let applyAmount = rows[i]['applyAmount']; let applyAmount = rows[i]['applyAmount'];
let amount = rows[i]['amount']; let amount = rows[i]['amount'];
if (!isPositiveInteger(applyAmount)) { if (!isPositiveNumber(applyAmount)) {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数"); message("勾选的第" + (i + 1) + "行数量必须是大于0的数字");
return; return;
} }
if (parseFloat(applyAmount) > parseFloat(amount)) { if (parseFloat(applyAmount) > parseFloat(amount)) {
......
...@@ -53,9 +53,9 @@ ...@@ -53,9 +53,9 @@
filter="contains" > filter="contains" >
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField" /> <EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N0}" required="true"/> <EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N1}" required="true"/>
<EF:EFColumn ename="applyRemark" cname="申请说明" width="200" editType="textarea" copy="true"/> <EF:EFColumn ename="applyRemark" cname="申请说明" width="200" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}" <EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N1}"
sumType="all"/> sumType="all"/>
<EF:EFColumn ename="unitWeight" cname="单量(KG)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="unitWeight" cname="单量(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="库存重量(T)" enable="false" width="120" align="right" format="{0:N3}" <EF:EFColumn ename="weight" cname="库存重量(T)" enable="false" width="120" align="right" format="{0:N3}"
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="100" align="center" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="assignedNum" cname="派工数量" enable="false" width="80" align="right" format="{0:N0}"/> <EF:EFColumn ename="assignedNum" cname="派工数量" enable="false" width="80" align="right" format="{0:N1}"/>
<EF:EFColumn ename="unassignedNum" cname="剩余数量" enable="false" width="80" align="right" format="{0:N0}"/> <EF:EFColumn ename="unassignedNum" cname="剩余数量" enable="false" width="80" align="right" format="{0:N1}"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="80" align="right" format="{0:N0}"/> <EF:EFColumn ename="num" cname="数量" enable="false" width="80" align="right" format="{0:N0}"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="80" align="right" format="{0:N3}"/>
<%--<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>--%> <%--<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>--%>
......
...@@ -112,8 +112,8 @@ let save = function () { ...@@ -112,8 +112,8 @@ let save = function () {
message("勾选的第" + (i + 1) + "行\"分派数量\",不能为空"); message("勾选的第" + (i + 1) + "行\"分派数量\",不能为空");
return; return;
} }
if (!isPositiveInteger(rows[i]['num'])) { if (!isPositiveNumber(rows[i]['num'])) {
message("勾选的第" + (i + 1) + "行\"分派数量\"必须是大于0的整数"); message("勾选的第" + (i + 1) + "行\"分派数量\"必须是大于0的数字");
return; return;
} }
} }
......
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
valueField="textField" textField="textField" readonly="true" required="true"/>--%> valueField="textField" textField="textField" readonly="true" required="true"/>--%>
<%--<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" hidden="true"/> <%--<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="厂区" enable="false" align="center"/>--%> <EF:EFColumn ename="factoryName" cname="厂区" enable="false" align="center"/>--%>
<EF:EFColumn ename="num" cname="分派数量" format="{0:N0}" required="true"/> <EF:EFColumn ename="num" cname="分派数量" format="{0:N1}" required="true"/>
<EF:EFColumn ename="totalWt" cname="分派重量(T)" enable="false" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="分派重量(T)" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="completeNum" cname="已完工数量" enable="false" format="{0:N0}"/> <EF:EFColumn ename="completeNum" cname="已完工数量" enable="false" format="{0:N1}"/>
</EF:EFGrid> </EF:EFGrid>
<br/> <br/>
<span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span> <span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span>
......
...@@ -43,9 +43,9 @@ ...@@ -43,9 +43,9 @@
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="completeNum" cname="完成数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="completeNum" cname="完成数量" enable="false" width="100" align="right" format="{0:N1}"/>
<EF:EFColumn ename="unCompleteNum" cname="剩余数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="unCompleteNum" cname="剩余数量" enable="false" width="100" align="right" format="{0:N1}"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="num" cname="数量" enable="false" width="100" align="right" format="{0:N1}"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="140" align="center"/> <EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="140" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/> <EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/>
......
...@@ -3,9 +3,9 @@ prdtNameGlobalData = []; ...@@ -3,9 +3,9 @@ prdtNameGlobalData = [];
factoryGroupGlobalData = []; factoryGroupGlobalData = [];
$(function () { $(function () {
$("#QUERY").on("click", function () { $("#QUERY").on("click", query);
query();
}); $("#COMPLETE").on("click", complete);
$("#ASSIGN").on("click", function () { $("#ASSIGN").on("click", function () {
//重置全局变量 //重置全局变量
...@@ -389,7 +389,8 @@ $(function () { ...@@ -389,7 +389,8 @@ $(function () {
}); });
downKeyUp(); downKeyUp();
}); });
query = function () {
let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
...@@ -398,6 +399,8 @@ query = function () { ...@@ -398,6 +399,8 @@ query = function () {
* 页面加载时执行 * 页面加载时执行
*/ */
$(window).load(function () { $(window).load(function () {
// 查询
query();
// 生产组名称 // 生产组名称
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-orgType", 'cutGroup'); inInfo.set("inqu_status-0-orgType", 'cutGroup');
...@@ -547,3 +550,18 @@ function saveFunc() { ...@@ -547,3 +550,18 @@ function saveFunc() {
} }
} }
/**
* 完成
*/
let complete = function (){
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"完成\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result,detail", "HPSC006", "complete", true);
}
});
}
...@@ -14,16 +14,25 @@ ...@@ -14,16 +14,25 @@
<EF:EFPage title="生产下料"> <EF:EFPage title="生产下料">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%> <EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row">
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projCode" cname="项目号:" colWidth="3" row="0"/> <EF:EFInput blockId="inqu_status" ename="projCode" cname="项目号:" colWidth="3" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" colWidth="3" row="0"/> <EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" colWidth="3" row="0"/>
<EF:EFInput blockId="inqu_status" ename="prodOrderNo" cname="生产订单号:" colWidth="3" row="0"/> <EF:EFInput blockId="inqu_status" ename="prodOrderNo" cname="生产订单号:" colWidth="3" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="deliveryDate" cname="交货日期" row="0" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3" /> <EF:EFDatePicker blockId="inqu_status" ename="deliveryDate" cname="交货日期" row="0" role="date"
<EF:EFDatePicker blockId="inqu_status" ename="workDate" cname="派工时间" row="0" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3" /> format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" colWidth="3" format="yyyy-MM-dd" /> </div>
<div class="row">
<EF:EFDatePicker blockId="inqu_status" ename="workDate" cname="派工时间" row="0" role="date" format="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" colWidth="3"
format="yyyy-MM-dd"/>
<EF:EFSelect ename="completeStatus" cname="状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="未完成" value="0"/>
<EF:EFOption label="部分完成" value="2"/>
<EF:EFOption label="已完成" value="1"/>
</EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="生产任务集"> <EF:EFRegion id="result" title="生产任务集">
...@@ -42,7 +51,10 @@ ...@@ -42,7 +51,10 @@
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn enable="false" ename="planCompletionDate" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" <EF:EFColumn enable="false" ename="planCompletionDate" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"
cname="计划完成日期"/> cname="计划完成日期"/>
<EF:EFComboColumn ename="completeStatus" cname="状态" enable="false" align="center" width="80">
<EF:EFOption label="未完成" value="0"/>
<EF:EFOption label="已完成" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
...@@ -52,14 +64,13 @@ ...@@ -52,14 +64,13 @@
<EF:EFInput ename="productionOrderNo" type="hidden"/> <EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFInput ename="deliveryDate" type="hidden"/> <EF:EFInput ename="deliveryDate" type="hidden"/>
<EF:EFInput ename="factoryCode" type="hidden"/> <EF:EFInput ename="factoryCode" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no"> <EF:EFGrid blockId="detail" autoDraw="no" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="标识" enable="false" width="60" align="center"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="100" align="center"/>
<EF:EFColumn enable="false" ename="reqNum" cname="领料记录" width="80" align="center" readonly="true"/> <EF:EFColumn enable="false" ename="reqNum" cname="领料记录" width="80" align="center" readonly="true"/>
<%-- <EF:EFComboColumn cname="材料类型" ename="inventType" width="80" align="center" required="true" >--%>
<%-- <EF:EFComboColumn cname="材料类型" ename="inventType" width="80" align="center" required="true" >--%> <%-- <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('7')"/>--%>
<%-- <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('7')"/>--%> <%-- </EF:EFComboColumn>--%>
<%-- </EF:EFComboColumn>--%>
<%-- <EF:EFPopupColumn ename="inventName" cname="材料名称" width="200" popupType="ServiceGrid" <%-- <EF:EFPopupColumn ename="inventName" cname="材料名称" width="200" popupType="ServiceGrid"
popupTitle="材料信息" serviceName="HPPZ004" methodName="queryComboBox" resultId="invent_name_block_id" popupTitle="材料信息" serviceName="HPPZ004" methodName="queryComboBox" resultId="invent_name_block_id"
columnEnames="textField,valueField" columnEnames="textField,valueField"
...@@ -107,12 +118,15 @@ ...@@ -107,12 +118,15 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" width="120" enable="false"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" width="120" enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="完工数量" width="100" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionNum" cname="完工数量" width="100" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionTotalWt" cname="完工重量(T)" width="100" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionTotalWt" cname="完工重量(T)" width="100" readonly="true"/>
<EF:EFComboColumn enable="false" align="center" ename="status" width="80" cname="状态"> <EF:EFComboColumn enable="false" align="center" ename="status" width="80" cname="状态" hidden="true">
<EF:EFOption label="计划中" value="0"/> <EF:EFOption label="计划中" value="0"/>
<EF:EFOption label="生产中" value="1"/> <EF:EFOption label="生产中" value="1"/>
<EF:EFOption label="已完成" value="2"/> <EF:EFOption label="已完成" value="2"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="completeStatus" cname="状态" enable="false" align="center" width="80">
<EF:EFOption label="未完成" value="0"/>
<EF:EFOption label="已完成" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
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