Commit ef14de96 by wuwenlong

分页查询bugfix

parent f9ef2c88
...@@ -5,23 +5,17 @@ import com.baosight.hggp.common.DdynamicEnum; ...@@ -5,23 +5,17 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC001A; import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Dept; import com.baosight.hggp.hg.xs.domain.Dept;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
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.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
...@@ -34,7 +28,8 @@ public class ServiceHGSC001 extends ServiceBase { ...@@ -34,7 +28,8 @@ public class ServiceHGSC001 extends ServiceBase {
@OperationLogAnnotation(operModul = "项目立项", operType = "查询", operDesc = "初始化页面") @OperationLogAnnotation(operModul = "项目立项", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGSC001.QUERY, new HGSC001()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC001().eiMetadata);
// inInfo = super.query(inInfo, HGSC001.QUERY, new HGSC001());
Map map = new HashMap(); Map map = new HashMap();
map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode()); map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID), map,false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID), map,false);
......
...@@ -30,7 +30,8 @@ public class ServiceHGSC002 extends ServiceBase { ...@@ -30,7 +30,8 @@ public class ServiceHGSC002 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
List<Company> companyList = UserSessionUtils.getRoleCompany(); List<Company> companyList = UserSessionUtils.getRoleCompany();
inInfo = super.query(inInfo, HGSC002.QUERY, new HGSC002()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC002().eiMetadata);
// inInfo = super.query(inInfo, HGSC002.QUERY, new HGSC002());
EiInfoUtils.addBlock(inInfo,"roleCompany", companyList, Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", companyList, Company.class);
Map map = new HashMap(); Map map = new HashMap();
map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode()); map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode());
......
...@@ -27,7 +27,8 @@ public class ServiceHGSC005 extends ServiceBase { ...@@ -27,7 +27,8 @@ public class ServiceHGSC005 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产计划", operType = "查询", operDesc = "初始化页面") @OperationLogAnnotation(operModul = "生产计划", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGSC005.QUERY, new HGSC005()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC005().eiMetadata);
// inInfo = super.query(inInfo, HGSC005.QUERY, new HGSC005());
List<Map> rows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> rows = inInfo.getBlock(EiConstant.resultBlock).getRows();
if(CollectionUtils.isNotEmpty(rows)){ if(CollectionUtils.isNotEmpty(rows)){
List<HGSC005> hgsc005List = HGSCTools.THGSC005.buildFinishRate(HGSCTools.THGSC005.convertToObj(rows)); List<HGSC005> hgsc005List = HGSCTools.THGSC005.buildFinishRate(HGSCTools.THGSC005.convertToObj(rows));
......
...@@ -27,7 +27,8 @@ public class ServiceHGSC005A extends ServiceBase { ...@@ -27,7 +27,8 @@ public class ServiceHGSC005A extends ServiceBase {
String planCode = inInfo.getCellStr(EiConstant.queryBlock,0,HGSC005A.FIELD_plan_code); String planCode = inInfo.getCellStr(EiConstant.queryBlock,0,HGSC005A.FIELD_plan_code);
HGSC005 hgsc005 = HGSCTools.THGSC005.queryByPlanCode(planCode); HGSC005 hgsc005 = HGSCTools.THGSC005.queryByPlanCode(planCode);
inInfo.setCell(EiConstant.queryBlock,0,HGSC005.FIELD_is_schedule,hgsc005.getIsSchedule()); inInfo.setCell(EiConstant.queryBlock,0,HGSC005.FIELD_is_schedule,hgsc005.getIsSchedule());
inInfo = super.query(inInfo, HGSC005A.QUERY, new HGSC005A()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC005A().eiMetadata);
// inInfo = super.query(inInfo, HGSC005A.QUERY, new HGSC005A());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PLAN_PROCESS_BLOCK_ID), new HashMap<String, Object>(){{ CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PLAN_PROCESS_BLOCK_ID), new HashMap<String, Object>(){{
put(HGSC005A.FIELD_plan_code,planCode); put(HGSC005A.FIELD_plan_code,planCode);
}},false); }},false);
......
...@@ -22,7 +22,8 @@ public class ServiceHGSC006 extends ServiceBase { ...@@ -22,7 +22,8 @@ public class ServiceHGSC006 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产订单", operType = "查询", operDesc = "初始化页面") @OperationLogAnnotation(operModul = "生产订单", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGSC006.QUERY, new HGSC006()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC006().eiMetadata);
// inInfo = super.query(inInfo, HGSC006.QUERY, new HGSC006());
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
......
...@@ -29,7 +29,8 @@ public class ServiceHGSC006A extends ServiceBase { ...@@ -29,7 +29,8 @@ public class ServiceHGSC006A extends ServiceBase {
@OperationLogAnnotation(operModul = "生产订单详情", operType = "查询", operDesc = "初始化页面") @OperationLogAnnotation(operModul = "生产订单详情", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGSC006A.QUERY, new HGSC006A()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC006A().eiMetadata);
// inInfo = super.query(inInfo, HGSC006A.QUERY, new HGSC006A());
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
......
...@@ -37,7 +37,8 @@ import java.util.*; ...@@ -37,7 +37,8 @@ import java.util.*;
@OperationLogAnnotation(operModul = "生产任务", operType = "查询", operDesc = "初始化页面") @OperationLogAnnotation(operModul = "生产任务", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC007().eiMetadata);
// inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007());
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
......
...@@ -26,6 +26,7 @@ public class ServiceHGSC008 extends ServiceEPBase { ...@@ -26,6 +26,7 @@ public class ServiceHGSC008 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "生产报工单", operType = "查询", operDesc = "初始化页面") @OperationLogAnnotation(operModul = "生产报工单", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC008().eiMetadata);
inInfo = super.query(inInfo, HGSC008.QUERY, new HGSC008()); inInfo = super.query(inInfo, HGSC008.QUERY, new HGSC008());
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -36,7 +36,8 @@ public class ServiceHGZL002 extends ServiceBase { ...@@ -36,7 +36,8 @@ public class ServiceHGZL002 extends ServiceBase {
@OperationLogAnnotation(operModul = "工序质检单", operType = "查询", operDesc = "初始化查询") @OperationLogAnnotation(operModul = "工序质检单", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = customQuery(inInfo); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL002().eiMetadata);
// inInfo = customQuery(inInfo);
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class); EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -36,7 +36,8 @@ public class ServiceHGZL003 extends ServiceBase { ...@@ -36,7 +36,8 @@ public class ServiceHGZL003 extends ServiceBase {
@OperationLogAnnotation(operModul = "日常巡检单", operType = "查询", operDesc = "初始化查询") @OperationLogAnnotation(operModul = "日常巡检单", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGZL003.QUERY, new HGZL003()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL003().eiMetadata);
// inInfo = super.query(inInfo, HGZL003.QUERY, new HGZL003());
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class); EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
// EiInfoUtils.addBlock(inInfo,"workUserBlockId", UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()), User.class); // EiInfoUtils.addBlock(inInfo,"workUserBlockId", UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()), User.class);
CommonMethod.objConvertComboBox(UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()),inInfo, "workUserBlockId","loginName","userName"); CommonMethod.objConvertComboBox(UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()),inInfo, "workUserBlockId","loginName","userName");
......
...@@ -21,7 +21,8 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase; ...@@ -21,7 +21,8 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
@OperationLogAnnotation(operModul = "日常巡检单-生产任务", operType = "查询", operDesc = "初始化页面") @OperationLogAnnotation(operModul = "日常巡检单-生产任务", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC007().eiMetadata);
// inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007());
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
......
...@@ -5,7 +5,6 @@ import com.baosight.hggp.common.HandleStatusEnum; ...@@ -5,7 +5,6 @@ import com.baosight.hggp.common.HandleStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.zl.domain.HGZL004; import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.hg.zl.tools.HGZLTools; import com.baosight.hggp.hg.zl.tools.HGZLTools;
...@@ -36,7 +35,8 @@ public class ServiceHGZL004 extends ServiceBase { ...@@ -36,7 +35,8 @@ public class ServiceHGZL004 extends ServiceBase {
@OperationLogAnnotation(operModul = "整改通知单", operType = "查询", operDesc = "初始化查询") @OperationLogAnnotation(operModul = "整改通知单", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGZL004.QUERY, new HGZL004()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL004().eiMetadata);
// inInfo = super.query(inInfo, HGZL004.QUERY, new HGZL004());
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class); EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -31,7 +31,8 @@ public class ServiceHGZL004A extends ServiceBase { ...@@ -31,7 +31,8 @@ public class ServiceHGZL004A extends ServiceBase {
@OperationLogAnnotation(operModul = "整改通知单-沟通记录", operType = "查询", operDesc = "初始化查询") @OperationLogAnnotation(operModul = "整改通知单-沟通记录", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGZL004A.QUERY, new HGZL004A()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL004A().eiMetadata);
// inInfo = super.query(inInfo, HGZL004A.QUERY, new HGZL004A());
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class); EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -66,6 +66,18 @@ $(function () { ...@@ -66,6 +66,18 @@ $(function () {
} }
}); });
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
function showInfo(id) { function showInfo(id) {
JSColorbox.open({ JSColorbox.open({
href: "HGSC001D?inqu_status-0-id=" + id + "&efParentFormEname=HGSC001", href: "HGSC001D?inqu_status-0-id=" + id + "&efParentFormEname=HGSC001",
......
...@@ -2,10 +2,7 @@ $(function () { ...@@ -2,10 +2,7 @@ $(function () {
var userByCompany ;//= __eiInfo.getBlock("userByCompany").getMappedRows(); var userByCompany ;//= __eiInfo.getBlock("userByCompany").getMappedRows();
IPLATUI.EFGrid.detail = { IPLATUI.EFGrid.detail = {
pageable: { pageable:false,
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{ columns: [{
field: "userCode", field: "userCode",
template: function (dataItem) { template: function (dataItem) {
......
...@@ -2,10 +2,7 @@ $(function () { ...@@ -2,10 +2,7 @@ $(function () {
var userByCompany = __eiInfo.getBlock("userByCompany").getMappedRows(); var userByCompany = __eiInfo.getBlock("userByCompany").getMappedRows();
IPLATUI.EFGrid.detail = { IPLATUI.EFGrid.detail = {
pageable: { pageable:false,
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{ columns: [{
field: "userCode", field: "userCode",
template: function (dataItem) { template: function (dataItem) {
......
...@@ -2,10 +2,7 @@ $(function () { ...@@ -2,10 +2,7 @@ $(function () {
var userByCompany = __eiInfo.getBlock("userByCompany").getMappedRows(); var userByCompany = __eiInfo.getBlock("userByCompany").getMappedRows();
IPLATUI.EFGrid.detail = { IPLATUI.EFGrid.detail = {
pageable: { pageable:false,
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{ columns: [{
field: "userCode", field: "userCode",
template: function (dataItem) { template: function (dataItem) {
...@@ -60,11 +57,6 @@ $(function () { ...@@ -60,11 +57,6 @@ $(function () {
onDelete: function(e) { onDelete: function(e) {
detailGrid.removeRows(detailGrid.getCheckedRowsIndex()) detailGrid.removeRows(detailGrid.getCheckedRowsIndex())
e.preventDefault(); e.preventDefault();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
} }
} }
......
...@@ -179,3 +179,14 @@ function showUploadFile(id) { ...@@ -179,3 +179,14 @@ function showUploadFile(id) {
}); });
} }
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
\ No newline at end of file
...@@ -35,6 +35,18 @@ $(function () { ...@@ -35,6 +35,18 @@ $(function () {
}); });
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
function showInfo(planCode) { function showInfo(planCode) {
JSColorbox.open({ JSColorbox.open({
href: "HGSC005A?methodName=initLoad&inqu_status-0-planCode=" + planCode + "&efParentFormEname=HGSC005", href: "HGSC005A?methodName=initLoad&inqu_status-0-planCode=" + planCode + "&efParentFormEname=HGSC005",
......
...@@ -7,7 +7,7 @@ $(function () { ...@@ -7,7 +7,7 @@ $(function () {
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 10, pageSize: 20,
pageSizes: [10, 20, 50, 70, 100], pageSizes: [10, 20, 50, 70, 100],
}, },
columns: [ columns: [
...@@ -33,7 +33,7 @@ function query() { ...@@ -33,7 +33,7 @@ function query() {
$(window).load(function () { $(window).load(function () {
// 查 // 查
// query(); query();
}); });
function schedule() { function schedule() {
......
...@@ -33,6 +33,18 @@ $(function () { ...@@ -33,6 +33,18 @@ $(function () {
}); });
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
function showInfo(orderCode) { function showInfo(orderCode) {
JSColorbox.open({ JSColorbox.open({
href: "HGSC006A?methodName=initLoad&inqu_status-0-orderCode=" + orderCode + "&efParentFormEname=HGSC006", href: "HGSC006A?methodName=initLoad&inqu_status-0-orderCode=" + orderCode + "&efParentFormEname=HGSC006",
......
...@@ -36,7 +36,17 @@ $(function () { ...@@ -36,7 +36,17 @@ $(function () {
}); });
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/** /**
* 批量分派 * 批量分派
......
...@@ -34,7 +34,17 @@ $(function () { ...@@ -34,7 +34,17 @@ $(function () {
}); });
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/** /**
* 显示附件详情 * 显示附件详情
......
...@@ -20,6 +20,16 @@ $(function () { ...@@ -20,6 +20,16 @@ $(function () {
} }
} }
} }
}); });
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
...@@ -53,9 +53,11 @@ $(function () { ...@@ -53,9 +53,11 @@ $(function () {
var nowStr = now.getFullYear() + "-" + String(now.getMonth() + 1).padStart(2, '0') + "-" + String(now.getDate()).padStart(2, '0'); var nowStr = now.getFullYear() + "-" + String(now.getMonth() + 1).padStart(2, '0') + "-" + String(now.getDate()).padStart(2, '0');
resultGrid.setCellValue(e.row, "checkDate", nowStr); resultGrid.setCellValue(e.row, "checkDate", nowStr);
} }
if(loginUser.length>0) {
resultGrid.setCellValue(e.row, "checkBy", loginUser[0].userId); resultGrid.setCellValue(e.row, "checkBy", loginUser[0].userId);
resultGrid.setCellValue(e.row, "checkName", loginUser[0].userName); resultGrid.setCellValue(e.row, "checkName", loginUser[0].userName);
} }
}
// else{ // else{
// if(e.model.checkStatus === '0'){ // if(e.model.checkStatus === '0'){
// resultGrid.setCellValue(e.row,"checkDate",""); // resultGrid.setCellValue(e.row,"checkDate","");
...@@ -81,10 +83,14 @@ $(function () { ...@@ -81,10 +83,14 @@ $(function () {
/** /**
* 查询 * 查询
*/ */
let query = function () { function query() {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
$(window).load(function () {
// 查
query();
});
/** /**
* 提交操作 * 提交操作
...@@ -102,17 +108,24 @@ let save = function () { ...@@ -102,17 +108,24 @@ let save = function () {
let passQuantity = rows[i]['passQuantity']; let passQuantity = rows[i]['passQuantity'];
let unpassQuantity = rows[i]['unpassQuantity']; let unpassQuantity = rows[i]['unpassQuantity'];
let quantity = rows[i]['quantity']; let quantity = rows[i]['quantity'];
let checkBy = rows[i]['checkBy'];
let checkCode = rows[i]['checkCode'];
if (!isNumber(passQuantity)||!isNumber(unpassQuantity)) { if (!isNumber(passQuantity)||!isNumber(unpassQuantity)) {
message("第" + (i + 1) + "行合格数量与不合格数量必须是大于等于0的数字!"); message("质检单号[" + checkCode + "]合格数量与不合格数量必须是大于等于0的数字!");
return; return;
} }
if (passQuantity > quantity) { if (passQuantity > quantity) {
message("第" + (i + 1) + "行合格数量不能大于报工数量!"); message("质检单号[" + checkCode + "]合格数量不能大于报工数量!");
return; return;
} }
if (unpassQuantity > quantity) { if (unpassQuantity > quantity) {
message("第" + (i + 1) + "行不合格数量不能大于报工数量!"); message("质检单号[" + checkCode + "]不合格数量不能大于报工数量!");
return;
}
if(!checkBy||checkBy===' '){
message("质检单号[" + checkCode + "]质检人员不能为空!");
return; return;
} }
......
...@@ -131,10 +131,14 @@ $(function () { ...@@ -131,10 +131,14 @@ $(function () {
/** /**
* 查询 * 查询
*/ */
let query = function () { function query() {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
$(window).load(function () {
// 查
query();
});
/** /**
* 提交操作 * 提交操作
......
...@@ -42,3 +42,14 @@ $(function () { ...@@ -42,3 +42,14 @@ $(function () {
}); });
}); });
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
\ No newline at end of file
...@@ -56,10 +56,14 @@ $(function () { ...@@ -56,10 +56,14 @@ $(function () {
/** /**
* 查询 * 查询
*/ */
let query = function () { function query() {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
$(window).load(function () {
// 查
query();
});
/** /**
* 提交操作 * 提交操作
......
...@@ -33,10 +33,14 @@ $(function () { ...@@ -33,10 +33,14 @@ $(function () {
/** /**
* 查询 * 查询
*/ */
let query = function () { function query() {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
$(window).load(function () {
// 查
query();
});
let save = function () { let save = function () {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length < 1) { if (rows.length < 1) {
......
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