Commit a29560b8 by YG6494

HPKC008页面修改

parent 2a69c567
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Generate time : 2024-01-09 18:54:54 * Generate time : 2024-01-09 18:54:54
* Version : 1.0 * Version : 1.0
*/ */
package com.baosight.iplat4j.hp.kc.domain; package com.baosight.hpjx.hp.kc.domain;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
...@@ -15,7 +15,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -15,7 +15,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Thpkc008 * Thpkc008
* *
*/ */
public class Thpkc008 extends DaoEPBase { public class HPKC008 extends DaoEPBase {
private Long id = 0L; private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
...@@ -113,7 +113,7 @@ EiColumn eiColumn; ...@@ -113,7 +113,7 @@ EiColumn eiColumn;
/** /**
* the constructor * the constructor
*/ */
public Thpkc008() { public HPKC008() {
initMetaData(); initMetaData();
} }
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.CompanyTypeEnum; import com.baosight.hpjx.hp.kc.domain.HPKC008;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.hp.kc.domain.Thpkc008;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import java.util.Map; import java.util.Map;
/** /**
* @author xuao * @author zjh
* @date 2024年01月09日 10:18 * @date 2024年01月09日 10:18
*/ */
public class ServiceHPKC008 extends ServiceBase { public class ServiceHPKC008 extends ServiceBase {
...@@ -21,11 +20,10 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -21,11 +20,10 @@ public class ServiceHPKC008 extends ServiceBase {
* 画面初始化. * 画面初始化.
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
Thpkc008 HPKC008 = new Thpkc008(); HPKC008 HPKC008 = new HPKC008();
EiInfo outInfo = super.initLoad(inInfo, HPKC008); EiInfo outInfo = super.initLoad(inInfo, HPKC008);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPKC008.eiMetadata); outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPKC008.eiMetadata);
outInfo.setBlock(CompanyTypeEnum.generatorEiBlock()); return inInfo;
return outInfo;
} }
/** /**
...@@ -34,7 +32,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -34,7 +32,7 @@ public class ServiceHPKC008 extends ServiceBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPKC008.query", new Thpkc008()); EiInfo outInfo = super.query(inInfo, "HPKC008.query", new HPKC008());
return outInfo; return outInfo;
} }
...@@ -74,7 +72,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -74,7 +72,7 @@ public class ServiceHPKC008 extends ServiceBase {
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
Thpkc008 HPKC008 = new Thpkc008(); HPKC008 HPKC008 = new HPKC008();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
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);
...@@ -98,7 +96,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -98,7 +96,7 @@ public class ServiceHPKC008 extends ServiceBase {
* 删除操作. * 删除操作.
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
Thpkc008 HPKC008 = new Thpkc008(); HPKC008 HPKC008 = new HPKC008();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
......
package com.baosight.hpjx.hp.kc.service;
\ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<sqlMap namespace="HPKC008"> <sqlMap namespace="HPKC008">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.kc.domain.Thpkc008"> resultClass="com.baosight.hpjx.hp.kc.domain.HPKC008">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
...@@ -152,9 +152,7 @@ ...@@ -152,9 +152,7 @@
AMOUNT = #amount#, <!-- 数量 --> AMOUNT = #amount#, <!-- 数量 -->
PRICE = #price#, <!-- 单价 --> PRICE = #price#, <!-- 单价 -->
TOTAL_PRICE = #totalPrice#, <!-- 金额 --> TOTAL_PRICE = #totalPrice#, <!-- 金额 -->
NOTES = #notes#, <!-- 备注 --> NOTES = #notes#, <!-- 备注 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE WHERE
......
package com.baosight.hpjx.hp.kc.sql;
\ No newline at end of file
/** /**
* Generate time : 2024-01-10 10:58:04 * Generate time : 2024-01-10 14:47:08
* Version : 1.0 * Version : 1.0
*/ */
package com.baosight.iplat4j.hp.zl.domain; package com.baosight.hpjx.hp.zl.domain;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
...@@ -23,7 +23,7 @@ public class HPZL001 extends DaoEPBase { ...@@ -23,7 +23,7 @@ public class HPZL001 extends DaoEPBase {
private String itemCode = " "; /* 项目号*/ private String itemCode = " "; /* 项目号*/
private String itemName = " "; /* 项目名称*/ private String itemName = " "; /* 项目名称*/
private String unit = " "; /* 生产组*/ private String unit = " "; /* 生产组*/
private String desc = " "; /* 质量问题描述*/ private String notes = " "; /* 质量问题描述*/
private String princ = " "; /* 检查人*/ private String princ = " "; /* 检查人*/
private int status; /* 单据状态 0待审核 1已审核*/ private int status; /* 单据状态 0待审核 1已审核*/
private String affix = " "; /* 附件*/ private String affix = " "; /* 附件*/
...@@ -67,7 +67,7 @@ EiColumn eiColumn; ...@@ -67,7 +67,7 @@ EiColumn eiColumn;
eiColumn.setDescName("生产组"); eiColumn.setDescName("生产组");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("desc"); eiColumn = new EiColumn("notes");
eiColumn.setDescName("质量问题描述"); eiColumn.setDescName("质量问题描述");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -211,18 +211,18 @@ initMetaData(); ...@@ -211,18 +211,18 @@ initMetaData();
this.unit = unit; this.unit = unit;
} }
/** /**
* get the desc - 质量问题描述 * get the notes - 质量问题描述
* @return the desc * @return the notes
*/ */
public String getDesc() { public String getnotes() {
return this.desc; return this.notes;
} }
/** /**
* set the desc - 质量问题描述 * set the notes - 质量问题描述
*/ */
public void setDesc(String desc) { public void setnotes(String notes) {
this.desc = desc; this.notes = notes;
} }
/** /**
* get the princ - 检查人 * get the princ - 检查人
...@@ -348,7 +348,7 @@ public void fromMap(Map map) { ...@@ -348,7 +348,7 @@ public void fromMap(Map map) {
setItemCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemCode")), itemCode)); setItemCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemCode")), itemCode));
setItemName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemName")), itemName)); setItemName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemName")), itemName));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("unit")), unit)); setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("unit")), unit));
setDesc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("desc")), desc)); setnotes(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("notes")), notes));
setPrinc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("princ")), princ)); setPrinc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("princ")), princ));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status)); setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setAffix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("affix")), affix)); setAffix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("affix")), affix));
...@@ -372,7 +372,7 @@ Map map = new HashMap(); ...@@ -372,7 +372,7 @@ Map map = new HashMap();
map.put("itemCode",StringUtils.toString(itemCode, eiMetadata.getMeta("itemCode"))); map.put("itemCode",StringUtils.toString(itemCode, eiMetadata.getMeta("itemCode")));
map.put("itemName",StringUtils.toString(itemName, eiMetadata.getMeta("itemName"))); map.put("itemName",StringUtils.toString(itemName, eiMetadata.getMeta("itemName")));
map.put("unit",StringUtils.toString(unit, eiMetadata.getMeta("unit"))); map.put("unit",StringUtils.toString(unit, eiMetadata.getMeta("unit")));
map.put("desc",StringUtils.toString(desc, eiMetadata.getMeta("desc"))); map.put("notes",StringUtils.toString(notes, eiMetadata.getMeta("notes")));
map.put("princ",StringUtils.toString(princ, eiMetadata.getMeta("princ"))); map.put("princ",StringUtils.toString(princ, eiMetadata.getMeta("princ")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status"))); map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("affix",StringUtils.toString(affix, eiMetadata.getMeta("affix"))); map.put("affix",StringUtils.toString(affix, eiMetadata.getMeta("affix")));
......
package com.baosight.hpjx.hp.zl.domain;
\ No newline at end of file
package com.baosight.iplat4j.hp.zl.service; package com.baosight.hpjx.hp.zl.service;
import com.baosight.iplat4j.common.CompanyTypeEnum; import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.hp.zl.domain.HPZL001;
import com.baosight.iplat4j.util.CommonMethod;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @author xuao * @author ZJH
* @date 2024年01月09日 10:18 * @date 2024年01月09日 10:18
*/ */
public class ServiceHPZL001 extends ServiceBase { public class ServiceHPZL001 extends ServiceBase {
...@@ -23,9 +21,9 @@ public class ServiceHPZL001 extends ServiceBase { ...@@ -23,9 +21,9 @@ public class ServiceHPZL001 extends ServiceBase {
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
HPZL001 HPZL001 = new HPZL001(); HPZL001 HPZL001 = new HPZL001();
EiInfo outInfo = super.initLoad(inInfo, HPZL001); EiInfo outInfo = new EiInfo();
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPZL001.eiMetadata); outInfo.addBlock(EiConstant.resultBlock);
outInfo.setBlock(CompanyTypeEnum.generatorEiBlock()); outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(HPZL001.eiMetadata);
return outInfo; return outInfo;
} }
...@@ -48,12 +46,13 @@ public class ServiceHPZL001 extends ServiceBase { ...@@ -48,12 +46,13 @@ public class ServiceHPZL001 extends ServiceBase {
try { try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
super.insert(inInfo,"HPZL001.insert"); super.insert(inInfo,"HPZL001.insert");
// THPZL001 HPZL001 = new THPZL001(); // HPZL001 HPZL001 = new HPZL001();
// EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); // EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
// 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);
// HPZL001.fromMap(map); // HPZL001.fromMap(map);
// this.dao.insertBatch()//insert("HPZL001.insert", HPZL001.toMap()); //
// this.dao.insert("HPZL001.insert", HPZL001.toMap());
// } // }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!"); inInfo.setMsg("新增成功!");
...@@ -121,6 +120,4 @@ public class ServiceHPZL001 extends ServiceBase { ...@@ -121,6 +120,4 @@ public class ServiceHPZL001 extends ServiceBase {
return eiInfo; return eiInfo;
} }
} }
package com.baosight.hpjx.hp.zl.service;
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information <!-- table information
Generate time : 2024-01-10 10:58:04 Generate time : 2024-01-10 14:47:08
Version : 1.0 Version : 1.0
tableName :hpjx.t_hpzl001 tableName :hpjx.t_hpzl001
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
UPDATED_TIME VARCHAR, UPDATED_TIME VARCHAR,
DEP_CODE VARCHAR DEP_CODE VARCHAR
--> -->
<sqlMap namespace="tHpzl001"> <sqlMap namespace="HPZL001">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.zl.domain.HPZL001"> resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
ITEM_CODE as "itemCode", <!-- 项目号 --> ITEM_CODE as "itemCode", <!-- 项目号 -->
ITEM_NAME as "itemName", <!-- 项目名称 --> ITEM_NAME as "itemName", <!-- 项目名称 -->
UNIT as "unit", <!-- 生产组 --> UNIT as "unit", <!-- 生产组 -->
DESC as "desc", <!-- 质量问题描述 --> NOTES as "notes", <!-- 质量问题描述 -->
PRINC as "princ", <!-- 检查人 --> PRINC as "princ", <!-- 检查人 -->
STATUS as "status", <!-- 单据状态 0待审核 1已审核 --> STATUS as "status", <!-- 单据状态 0待审核 1已审核 -->
AFFIX as "affix", <!-- 附件 --> AFFIX as "affix", <!-- 附件 -->
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
UNIT = #unit# UNIT = #unit#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="desc"> <isNotEmpty prepend=" AND " property="desc">
DESC = #desc# NOTES = #notes#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="princ"> <isNotEmpty prepend=" AND " property="princ">
PRINC = #princ# PRINC = #princ#
...@@ -116,24 +116,21 @@ ...@@ -116,24 +116,21 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpzl001 (ID, INSERT INTO hpjx.t_hpzl001 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
RECEIPT_DATE, <!-- 单据日期 --> RECEIPT_DATE, <!-- 单据日期 -->
CHK_BILLNO, <!-- 检查单号 --> CHK_BILLNO, <!-- 检查单号 -->
ITEM_CODE, <!-- 项目号 --> ITEM_CODE, <!-- 项目号 -->
ITEM_NAME, <!-- 项目名称 --> ITEM_NAME, <!-- 项目名称 -->
UNIT, <!-- 生产组 --> UNIT, <!-- 生产组 -->
DESC, <!-- 质量问题描述 --> NOTES, <!-- 质量问题描述 -->
PRINC, <!-- 检查人 --> PRINC, <!-- 检查人 -->
STATUS, <!-- 单据状态 0待审核 1已审核 --> STATUS, <!-- 单据状态 0待审核 1已审核 -->
AFFIX, <!-- 附件 --> AFFIX, <!-- 附件 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE <!-- 部门编码 -->
) )
VALUES (#id#, #companyCode#, #receiptDate#, #chkBillno#, #itemCode#, #itemName#, #unit#, #desc#, #princ#, #status#, #affix#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#) VALUES (#companyCode#, #receiptDate#, #chkBillno#, #itemCode#, #itemName#, #unit#, #notes#, #princ#, #status#, #affix#, #createdBy#, #createdTime#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -144,21 +141,18 @@ ...@@ -144,21 +141,18 @@
<update id="update"> <update id="update">
UPDATE hpjx.t_hpzl001 UPDATE hpjx.t_hpzl001
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 --> RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
CHK_BILLNO = #chkBillno#, <!-- 检查单号 --> CHK_BILLNO = #chkBillno#, <!-- 检查单号 -->
ITEM_CODE = #itemCode#, <!-- 项目号 --> ITEM_CODE = #itemCode#, <!-- 项目号 -->
ITEM_NAME = #itemName#, <!-- 项目名称 --> ITEM_NAME = #itemName#, <!-- 项目名称 -->
UNIT = #unit#, <!-- 生产组 --> UNIT = #unit#, <!-- 生产组 -->
DESC = #desc#, <!-- 质量问题描述 --> NOTES = #notes#, <!-- 质量问题描述 -->
PRINC = #princ#, <!-- 检查人 --> PRINC = #princ#, <!-- 检查人 -->
STATUS = #status#, <!-- 单据状态 0待审核 1已审核 --> STATUS = #status#, <!-- 单据状态 0待审核 1已审核 -->
AFFIX = #affix#, <!-- 附件 --> AFFIX = #affix#, <!-- 附件 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
package com.baosight.hpjx.hp.zl.sql;
\ No newline at end of file
$(function () { $(function() {
// 查询
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
}); });
IPLATUI.EFGrid = {
"result": {
loadComplete: function (grid) {
// 新增
$("#BTN_INSERT").on("click", function () {
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPKC008"), "HPKC008", "insert", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
// 绑定grid
resultGrid.setEiInfo(ei);
NotificationUtil({
msg: '新增成功'
});
}
//释放禁用按钮
btnNode.attr("disabled", false);
resultGrid.dataSource.page(1);
},
onFail: function (ei) { // onFail 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
// 修改
$("#BTN_UPDATE").on("click", function () {
var rowCount = resultGrid.getCheckedRows();
// 检验是否选中数据
if (rowCount == null || rowCount == "") {
NotificationUtil({
msg : '请选择一条或多条数据'
}, "warning");
return false;
}
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPKC008"), "HPKC008", "update", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: '修改成功'
});
// 绑定grid
resultGrid.setEiInfo(ei);
}
//释放禁用按钮
btnNode.attr("disabled", false);
},
onFail: function (ei) { // onFail 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
//删除
$("#DELETE").on("click", function () {
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
var dataItems = resultGrid.getCheckedRows();
if (dataItems == null || dataItems == "") {
NotificationUtil({
msg: '选择要删除的数据'
}, "warning");
//释放禁用按钮
btnNode.attr("disabled", false);
return false;
}
IPLAT.submitNode($("#HPKC008"), "HPKC008", "delete", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: '删除成功'
});
// 绑定grid
resultGrid.setEiInfo(ei);
}
//释放禁用按钮
btnNode.attr("disabled", false);
},
onFail: function (ei) {// onFail
// 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
}
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
}, },
}
});
\ No newline at end of file };
});
...@@ -14,7 +14,7 @@ $(function() { ...@@ -14,7 +14,7 @@ $(function() {
var btnNode = $(this); var btnNode = $(this);
//禁用按钮 //禁用按钮
btnNode.attr("disabled", true); btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPKC008"), "HPKC008", "insert", { IPLAT.submitNode($("#HPZL001"), "HPZL001", "insert", {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei["status"] == -1) { if (ei["status"] == -1) {
NotificationUtil(ei, "error"); NotificationUtil(ei, "error");
...@@ -39,7 +39,7 @@ $(function() { ...@@ -39,7 +39,7 @@ $(function() {
}); });
// 修改 // 修改
$("#UPDATE").on("click", function () { $("#BTN_UPDATE").on("click", function () {
var rowCount = resultGrid.getCheckedRows(); var rowCount = resultGrid.getCheckedRows();
// 检验是否选中数据 // 检验是否选中数据
if (rowCount == null || rowCount == "") { if (rowCount == null || rowCount == "") {
...@@ -52,7 +52,7 @@ $(function() { ...@@ -52,7 +52,7 @@ $(function() {
//禁用按钮 //禁用按钮
btnNode.attr("disabled", true); btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPKC008"), "HPKC008", "update", { IPLAT.submitNode($("#HPZL001"), "HPZL001", "update", {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei["status"] == -1) { if (ei["status"] == -1) {
NotificationUtil(ei, "error"); NotificationUtil(ei, "error");
...@@ -94,7 +94,7 @@ $(function() { ...@@ -94,7 +94,7 @@ $(function() {
btnNode.attr("disabled", false); btnNode.attr("disabled", false);
return false; return false;
} }
IPLAT.submitNode($("#HPKC008"), "HPKC008", "delete", { IPLAT.submitNode($("#HPZL001"), "HPZL001", "delete", {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei["status"] == -1) { if (ei["status"] == -1) {
NotificationUtil(ei, "error"); NotificationUtil(ei, "error");
......
...@@ -5,16 +5,21 @@ ...@@ -5,16 +5,21 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="数据统计单"> <EF:EFPage title="质量巡检单">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFDatePicker ename="inqu_status-0-datemonth" cname="单据日期" <EF:EFDatePicker ename="inqu_status-0-receiptDate" cname="单据日期"
format="yyyy-MM" start="year" depth="year" required="true"/> format="yyyy/MM/dd" depth="year" required="true"/>
<EF:EFInput ename="inqu_status-0-statisticalNumber" cname="项目名称" colWidth="4" readonly="false"/> <EF:EFInput ename="inqu_status-0-itemName" cname="项目名称" colWidth="4" readonly="false"/>
<EF:EFInput ename="inqu_status-0-statisticalNumber" cname="检查人" colWidth="4" readonly="false"/> <EF:EFInput ename="inqu_status-0-princ" cname="检查人" colWidth="4" readonly="false"/>
<EF:EFInput ename="inqu_status-0-statisticalNumber" cname="处理状态" colWidth="4" readonly="false"/> <EF:EFSelect ename="inqu_status-0-status" cname="处理状态" colWidth="4">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOption label="审核" value="1"></EF:EFOption>
<EF:EFOption label="待审核" value="0"></EF:EFOption>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -22,23 +27,17 @@ ...@@ -22,23 +27,17 @@
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true"> <EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<%-- <EF:EFComboColumn ename="datemonth" cname="月份" align="center"
blockName="company_type_block_id" <EF:EFColumn ename="receiptDate" cname="单据日期" width="100" readonly="false" />
columnTemplate="#=textField#-#=valueField#" optionLabel=" " <EF:EFColumn ename="chkBillno" cname="检查单号" width="100" readonly="false" />
itemTemplate="#=textField#-#=valueField#" textField="textField" <EF:EFColumn ename="itemCode" cname="项目号" width="100" readonly="false"/>
valueField="valueField" width="100"> <EF:EFColumn ename="itemName" cname="项目名称" width="100" readonly="false"/>
</EF:EFComboColumn>--%>
<EF:EFColumn ename="datemonth" cname="单据日期" width="100" readonly="false" />
<EF:EFColumn ename="statisticalNumber" cname="检查单号" width="100" readonly="false" />
<EF:EFColumn ename="materialCode" cname="项目号" width="100" readonly="false"/>
<EF:EFColumn ename="materialName" cname="项目名称" width="100" readonly="false"/>
<EF:EFColumn ename="unit" cname="生产组" width="100" readonly="false"/> <EF:EFColumn ename="unit" cname="生产组" width="100" readonly="false"/>
<EF:EFColumn ename="amount" cname="质量问题描述" width="100" readonly="false"/> <EF:EFColumn ename="notes" cname="质量问题描述" width="100" readonly="false"/>
<EF:EFColumn ename="price" cname="检查人" width="100" readonly="false"/> <EF:EFColumn ename="princ" cname="检查人" width="100" readonly="false"/>
<EF:EFColumn ename="totalPrice" cname="单据状态" width="100" readonly="false"/> <EF:EFColumn ename="status" cname="单据状态" width="100" readonly="false"/>
<EF:EFColumn ename="totalPrice" cname="审核按钮" width="100" readonly="false"/> <%--<EF:EFColumn ename="valuestatus" cname="审核按钮" width="100" readonly="false"/>--%>
<EF:EFColumn ename="notes" cname="附件" width="100" readonly="false"/> <EF:EFColumn ename="affix" cname="附件" width="100" readonly="false"/>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="150" align="center" enable="false" <EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="150" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" hidden ="true" /> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" hidden ="true" />
<EF:EFColumn ename="createdBy" cname="创建人" readonly="true" width="150" align="center" enable="false" hidden ="true"/> <EF:EFColumn ename="createdBy" cname="创建人" readonly="true" width="150" align="center" enable="false" hidden ="true"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment