Commit d423d2ab by 宋祥

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

parents 736581bd 2efd8db8
...@@ -254,6 +254,14 @@ public class HPSqlConstant { ...@@ -254,6 +254,14 @@ public class HPSqlConstant {
public static final String UPDATE_COMPLETE_NUM = "HPSC005A.updateCompleteNum"; public static final String UPDATE_COMPLETE_NUM = "HPSC005A.updateCompleteNum";
} }
public class HPSC006 {
// 锁
public static final String LOCK = "HPSC006.lock";
// 更新完成数量
public static final String UPDATE_COMPLETE_NUM = "HPSC006.updateCompleteNum";
}
/** /**
* 质量巡检单 * 质量巡检单
* *
......
...@@ -56,6 +56,8 @@ public class HPSC006 extends DaoEPBase { ...@@ -56,6 +56,8 @@ public class HPSC006 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_MATERIAL = "material"; /* 材质*/ public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_PART_NAME = "partName"; /* 零件名称*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
...@@ -90,7 +92,8 @@ public class HPSC006 extends DaoEPBase { ...@@ -90,7 +92,8 @@ public class HPSC006 extends DaoEPBase {
public static final String COL_FILE_PATH1 = "FILE_PATH1"; /* 文件地址1*/ public static final String COL_FILE_PATH1 = "FILE_PATH1"; /* 文件地址1*/
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_MATERIAL = "MATERIAL"; /* 材质*/ public static final String COL_MATERIAL = "MATERIAL"; /* 材质*/
public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 产品名称*/
public static final String COL_PART_NAME = "PART_NAME"; /* 零件名称*/
public static final String QUERY = "HPSC006.query"; public static final String QUERY = "HPSC006.query";
public static final String COUNT = "HPSC006.count"; public static final String COUNT = "HPSC006.count";
...@@ -131,7 +134,8 @@ public class HPSC006 extends DaoEPBase { ...@@ -131,7 +134,8 @@ public class HPSC006 extends DaoEPBase {
private String filePath1 = " "; /* 文件地址1*/ private String filePath1 = " "; /* 文件地址1*/
private Integer inventRecordId = new Integer(0); /* 存货档案ID*/ private Integer inventRecordId = new Integer(0); /* 存货档案ID*/
private String material = " "; /* 材质*/ private String material = " "; /* 材质*/
private String prdtName = " "; /* 产品名称*/
private String partName = " "; /* 零件名称*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
...@@ -232,6 +236,13 @@ public class HPSC006 extends DaoEPBase { ...@@ -232,6 +236,13 @@ public class HPSC006 extends DaoEPBase {
eiColumn.setDescName("实际完工数量"); eiColumn.setDescName("实际完工数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACTUAL_COMPLETION_TOTAL_WT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("实际完工重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0-计划中,1-生产中,2-已完成"); eiColumn.setDescName("状态 0-计划中,1-生产中,2-已完成");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -288,7 +299,13 @@ public class HPSC006 extends DaoEPBase { ...@@ -288,7 +299,13 @@ public class HPSC006 extends DaoEPBase {
eiColumn.setDescName("材质"); eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_NAME);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_NAME);
eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -590,7 +607,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -590,7 +607,7 @@ public class HPSC006 extends DaoEPBase {
* get the actualCompletionTotalWt - 实际完工重量. * get the actualCompletionTotalWt - 实际完工重量.
* @return the actualCompletionTotalWt * @return the actualCompletionTotalWt
*/ */
public BigDecimal getactualCompletionTotalWt() { public BigDecimal getActualCompletionTotalWt() {
return this.actualCompletionTotalWt; return this.actualCompletionTotalWt;
} }
...@@ -599,7 +616,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -599,7 +616,7 @@ public class HPSC006 extends DaoEPBase {
* *
* @param actualCompletionTotalWt - 实际完工重量 * @param actualCompletionTotalWt - 实际完工重量
*/ */
public void setactualCompletionTotalWt(BigDecimal actualCompletionTotalWt) { public void setActualCompletionTotalWt(BigDecimal actualCompletionTotalWt) {
this.actualCompletionTotalWt = actualCompletionTotalWt; this.actualCompletionTotalWt = actualCompletionTotalWt;
} }
/** /**
...@@ -827,6 +844,39 @@ public class HPSC006 extends DaoEPBase { ...@@ -827,6 +844,39 @@ public class HPSC006 extends DaoEPBase {
this.material = material; this.material = material;
} }
/** /**
* get the prdtName - 产品名称.
* @return the prdtName
*/
public String getPrdtName() {
return this.prdtName;
}
/**
* set the prdtName - 产品名称.
*
* @param prdtName - 产品名称
*/
public void setPrdtName(String prdtName) {
this.prdtName = prdtName;
}
/**
* get the partName - 零件名称.
* @return the partName
*/
public String getPartName() {
return this.partName;
}
/**
* set the partName - 零件名称.
*
* @param partName - 零件名称
*/
public void setPartName(String partName) {
this.partName = partName;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
...@@ -852,7 +902,7 @@ public class HPSC006 extends DaoEPBase { ...@@ -852,7 +902,7 @@ public class HPSC006 extends DaoEPBase {
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt)); setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt));
setActualCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_DATE)), actualCompletionDate)); setActualCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_DATE)), actualCompletionDate));
setActualCompletionNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum)); setActualCompletionNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum));
setactualCompletionTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_TOTAL_WT)), actualCompletionTotalWt)); setActualCompletionTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_TOTAL_WT)), actualCompletionTotalWt));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo)); setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo));
setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName)); setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName));
...@@ -867,6 +917,8 @@ public class HPSC006 extends DaoEPBase { ...@@ -867,6 +917,8 @@ public class HPSC006 extends DaoEPBase {
setFilePath1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH1)), filePath1)); setFilePath1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH1)), filePath1));
setInventRecordId(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId)); setInventRecordId(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material)); setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setPartName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_NAME)), partName));
} }
/** /**
...@@ -909,7 +961,8 @@ public class HPSC006 extends DaoEPBase { ...@@ -909,7 +961,8 @@ public class HPSC006 extends DaoEPBase {
map.put(FIELD_FILE_PATH1, StringUtils.toString(filePath1, eiMetadata.getMeta(FIELD_FILE_PATH1))); map.put(FIELD_FILE_PATH1, StringUtils.toString(filePath1, eiMetadata.getMeta(FIELD_FILE_PATH1)));
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_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL))); map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME)));
map.put(FIELD_PART_NAME, StringUtils.toString(partName, eiMetadata.getMeta(FIELD_PART_NAME)));
return map; return map;
} }
} }
...@@ -37,6 +37,7 @@ public class HPSC007 extends DaoEPBase { ...@@ -37,6 +37,7 @@ public class HPSC007 extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_HPSC006_ID = "HPSC006_ID"; /* 生产下料ID*/ public static final String COL_HPSC006_ID = "HPSC006_ID"; /* 生产下料ID*/
...@@ -52,6 +53,9 @@ public class HPSC007 extends DaoEPBase { ...@@ -52,6 +53,9 @@ public class HPSC007 extends DaoEPBase {
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_REMARK = "REMARK"; /* 备注*/ public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String QUERY = "t_hpsc007.query"; public static final String QUERY = "t_hpsc007.query";
public static final String COUNT = "t_hpsc007.count"; public static final String COUNT = "t_hpsc007.count";
public static final String INSERT = "t_hpsc007.insert"; public static final String INSERT = "t_hpsc007.insert";
...@@ -73,6 +77,9 @@ public class HPSC007 extends DaoEPBase { ...@@ -73,6 +77,9 @@ public class HPSC007 extends DaoEPBase {
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
...@@ -143,6 +150,7 @@ public class HPSC007 extends DaoEPBase { ...@@ -143,6 +150,7 @@ public class HPSC007 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -376,6 +384,8 @@ public class HPSC007 extends DaoEPBase { ...@@ -376,6 +384,8 @@ public class HPSC007 extends DaoEPBase {
public void setRemark(String remark) { public void setRemark(String remark) {
this.remark = remark; this.remark = remark;
} }
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -398,6 +408,8 @@ public class HPSC007 extends DaoEPBase { ...@@ -398,6 +408,8 @@ public class HPSC007 extends DaoEPBase {
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
} }
/** /**
...@@ -422,6 +434,7 @@ public class HPSC007 extends DaoEPBase { ...@@ -422,6 +434,7 @@ public class HPSC007 extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK))); map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
return map; return map;
} }
} }
...@@ -177,7 +177,7 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -177,7 +177,7 @@ public class ServiceHPSC003 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HPSC003.fromMap(map); HPSC003.fromMap(map);
this.dao.delete("HPPZ001.delete", HPSC003.toMap()); this.dao.delete("HPSC003.delete", HPSC003.toMap());
} }
} catch (PlatException e) { } catch (PlatException e) {
......
...@@ -106,7 +106,7 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -106,7 +106,7 @@ public class ServiceHPSC004 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HPSC004.fromMap(map); HPSC004.fromMap(map);
this.dao.delete("HPPZ001.delete", HPSC004.toMap()); this.dao.delete("HPSC004.delete", HPSC004.toMap());
} }
} catch (PlatException e) { } catch (PlatException e) {
......
...@@ -122,7 +122,7 @@ public class ServiceHPSC005 extends ServiceBase { ...@@ -122,7 +122,7 @@ public class ServiceHPSC005 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HPSC005.fromMap(map); HPSC005.fromMap(map);
this.dao.delete("HPPZ001.delete", HPSC005.toMap()); this.dao.delete("HPSC005.delete", HPSC005.toMap());
} }
} catch (PlatException e) { } catch (PlatException e) {
......
...@@ -297,6 +297,7 @@ ...@@ -297,6 +297,7 @@
SET SET
STATUS = #status#, <!-- 状态 0-未派工,1-已派工 --> STATUS = #status#, <!-- 状态 0-未派工,1-已派工 -->
ORG_NO = #orgNo#, <!-- 生产组编码 --> ORG_NO = #orgNo#, <!-- 生产组编码 -->
ORG_NAME = #orgName#,
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 --> FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 --> FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
...@@ -304,4 +305,24 @@ ...@@ -304,4 +305,24 @@
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<update id="lock">
UPDATE ${hpjxSchema}.T_HPSC006
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</update>
<update id="updateCompleteNum">
UPDATE ${hpjxSchema}.T_HPSC006
SET
ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_TOTAL_WT = #actualCompletionTotalWt#,
STATUS = #status# <!-- 状态 0-计划中,1-生产中,2-已完成 -->
WHERE
ID = #id#
</update>
</sqlMap> </sqlMap>
...@@ -8,15 +8,10 @@ import com.baosight.hpjx.hp.kc.domain.HPKC003; ...@@ -8,15 +8,10 @@ import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.domain.HPKC005; import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC010; import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.pz.domain.HPPZ004; import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.sc.domain.HPSC001; import com.baosight.hpjx.hp.sc.domain.*;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtils; import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -461,4 +456,69 @@ public class HPSCTools { ...@@ -461,4 +456,69 @@ public class HPSCTools {
} }
} }
public static class Hpsc006 {
/**
* 锁
*
* @param id
* @return
*/
public static void lock(Long id) {
AssertUtils.isNull(id, "生产下料号不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
DaoBase.getInstance().update(HPSqlConstant.HPSC006.LOCK, queryMap);
}
/**
* 更新已完成数量
*
* @param prodTaskNo
* @param completeNum
*/
public static void updateCompleteNum(Long id, BigDecimal actualCompletionNum,BigDecimal actualCompletionTotalWt,
Integer status, String actualCompletionDate) {
AssertUtils.isNull(id, "生产下料号不能为空");
AssertUtils.isGt(BigDecimal.ZERO, actualCompletionNum, "更新后的实际完成数量小于0,请检查");
Map queryMap = new HashMap();
queryMap.put("id", id);
queryMap.put("status", status);
queryMap.put("actualCompletionNum", actualCompletionNum);
queryMap.put("actualCompletionTotalWt", actualCompletionTotalWt);
queryMap.put("actualCompletionDate", actualCompletionDate);
DaoBase.getInstance().update(HPSqlConstant.HPSC006.UPDATE_COMPLETE_NUM, queryMap);
}
/**
* 查询
*
* @param id
* @return
*/
public static HPSC006 getById(Long id) {
AssertUtils.isNull(id, "生产下料ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPSC006> results = DaoBase.getInstance().query(HPSC006.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产下料ID[%s]信息不存在", id));
return results.get(0);
}
}
public static class Hpsc007 {
/**
* 查询
*
* @param id
* @return
*/
public static HPSC007 getById(Long id) {
AssertUtils.isNull(id, "生产下料ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPSC007> results = DaoBase.getInstance().query(HPSC007.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产下料ID[%s]信息不存在", id));
return results.get(0);
}
}
} }
...@@ -95,30 +95,22 @@ $(function () { ...@@ -95,30 +95,22 @@ $(function () {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let filePath1 = item.id; let filePath1 = item.id;
let status = item.status;
let template = ''; let template = '';
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(' + filePath1 + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
return template if (status >= 1) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
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 + ')" >附件清单</a>'; + 'onclick="checkIn(' + filePath1 + ')" >登记</a>';
if (lv === '3') {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',1)" >提交</a>';
} /*else {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>';
}*/
} }
return template; return template
} }
},{ },{
field: "inventName", field: "inventName",
query: function (container, options) { query: function (container, options) {
let eiInfo = new EiInfo(); let eiInfo = new EiInfo();
eiInfo.set("inventType", options.model["inventType"]); eiInfo.set("inventType", "7");
return eiInfo; return eiInfo;
} }
} }
...@@ -139,6 +131,19 @@ function showUploadFile(id) { ...@@ -139,6 +131,19 @@ function showUploadFile(id) {
height: "80%", height: "80%",
}); });
} }
function checkIn(id) {
JSColorbox.open({
href: "HPSC007?methodName=initLoad&inqu_status-0-hpsc006Id=" + id,
title: "<div style='text-align: center;'>下料登记</div>",
width: "80%",
height: "80%",
callbackName: checkInCallback
});
}
checkInCallback = function () {
}
assignCallback = function (id) { assignCallback = function (id) {
var info = new EiInfo() var info = new EiInfo()
info.set("ids",ids.join(',')); info.set("ids",ids.join(','));
......
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
<EF:EFInput ename="productionOrderNo" type="hidden"/> <EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no"> <EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn cname="材料类型" ename="inventType" width="90" align="center" required="true"> <%-- <EF:EFComboColumn cname="材料类型" ename="inventType" width="90" 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"
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
backFillColumnIds="textField,valueField" backFillColumnIds="textField,valueField"
backFillFieldIds="inventName,inventCode" backFillFieldIds="inventName,inventCode"
valueField="textField" textField="textField"/> valueField="textField" textField="textField"/>
<EF:EFColumn ename="inventCode" enable="false" cname="材料编码"/> <EF:EFColumn ename="inventCode" enable="false" cname="材料编码" hidden="true"/>
<EF:EFColumn ename="inventLength" cname="长" format="{0:N3}"/> <EF:EFColumn ename="inventLength" cname="长" format="{0:N3}"/>
<EF:EFColumn ename="inventWidth" cname="宽" format="{0:N3}"/> <EF:EFColumn ename="inventWidth" cname="宽" format="{0:N3}"/>
<EF:EFColumn ename="inventThick" cname="厚" format="{0:N3}"/> <EF:EFColumn ename="inventThick" cname="厚" format="{0:N3}"/>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
enable="false"/> enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="实际完工数量" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionNum" cname="实际完工数量" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionUnitWt" cname="实际完工重量" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionTotalWt" cname="实际完工重量" readonly="true"/>
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态"> <EF:EFComboColumn enable="false" align="center" ename="status" cname="状态">
<EF:EFOption label="计划中" value="0"/> <EF:EFOption label="计划中" value="0"/>
<EF:EFOption label="生产中" value="1"/> <EF:EFOption label="生产中" value="1"/>
......
...@@ -6,21 +6,17 @@ $(function () { ...@@ -6,21 +6,17 @@ $(function () {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 50, 70, 100], pageSizes: [10, 20, 50, 70, 100],
}, },
columns: [{
field: "factoryName",
attributes: {
class: "i-input-readonly"
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) { onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除 // 阻止后台删除请求,使用自定义删除
e.preventDefault(); e.preventDefault();
deleteFunc(); deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
} }
} }
} }
...@@ -45,22 +41,6 @@ function query() { ...@@ -45,22 +41,6 @@ function query() {
} }
/** /**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC005A", "save", true);
}
});
}
/**
* 删除 * 删除
*/ */
let deleteFunc = function () { let deleteFunc = function () {
...@@ -71,7 +51,7 @@ let deleteFunc = function () { ...@@ -71,7 +51,7 @@ let deleteFunc = function () {
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HPSC005A", "delete", true); JSUtils.submitGridsData("result", "HPSC007", "delete", true);
} }
}); });
} }
...@@ -7,41 +7,48 @@ ...@@ -7,41 +7,48 @@
<EF:EFPage title="下料登记"> <EF:EFPage title="下料登记">
<EF:EFRegion id="inqu" title="订单详情"> <EF:EFRegion id="inqu" title="订单详情">
<EF:EFInput ename="detail-0-id" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partName" cname="零部件名称" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-partName" cname="零部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-inventName" cname="材料名称" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-inventName" cname="材料名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="计划数量" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-num" cname="计划数量" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-unitWt" cname="单重" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-unitWt" cname="单重" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="计划重量" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-totalWt" cname="计划重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-actualCompletionNum" cname="完工数量" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-actualCompletionNum" cname="完工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-actualCompletionUnitWt" cname="完工重量" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完工重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-status" cname="状态" colWidth="4" readonly="true"> <EF:EFSelect ename="detail-0-status" cname="状态" colWidth="4" readonly="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:EFSelect> </EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="actualCompletionDate" cname="完成日期" enable="false" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="userId" cname="完成人" enable="false" align="center"/> <EF:EFColumn ename="actualCompletionDate" required='true' cname="完成日期" editType="date" dateFormat="yyyy/MM/dd" />
<EF:EFPopupColumn ename="userId" cname="完成人" popupType="ServiceGrid"
popupTitle="人员信息" serviceName="HPXSUser" methodName="queryComboBox" resultId="user_block_id"
columnEnames="textField,valueField"
columnCnames="登录名称,用户名"
backFillColumnIds="textField,valueField"
backFillFieldIds="userName,userId"
valueField="valueField" textField="valueField"/>
<EF:EFColumn ename="userName" cname="完成名称" hidden="true"/>
<EF:EFColumn ename="actualCompletionNum" cname="完成数量" format="{0:N3}" /> <EF:EFColumn ename="actualCompletionNum" cname="完成数量" format="{0:N3}" />
<EF:EFColumn ename="totalWt" cname="分派重量" enable="false" format="{0:N3}"/> <EF:EFColumn ename="actualCompletionTotalWt" cname="完成重量" enable="false" format="{0:N3}"/>
</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