Commit ea3f0bf1 by yukang

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

# Conflicts:
#	src/main/webapp/HP/SC/HPSC010.js
parents 9fe96665 8af5b219
...@@ -351,6 +351,12 @@ public enum DdynamicEnum { ...@@ -351,6 +351,12 @@ public enum DdynamicEnum {
*/ */
GROUP_RECORD1_BLOCK_ID("group_record_block_id","orgId","orgCname","HPSC010.queryGroupComboBox"), GROUP_RECORD1_BLOCK_ID("group_record_block_id","orgId","orgCname","HPSC010.queryGroupComboBox"),
FACTORY_CODE_BOX_BLOCK_ID("factoryCodeBox_block_id","factoryCode","factoryName","HPSB001.queryFactoryCodeBox"),
GROUP_CODE_BOX_BLOCK_ID("groupCodeBox_block_id","groupCode","groupName","factoryCode","factoryName","HPSB001.queryGroupCodeBox"),
USER_ID_BOX_BLOCK_ID("userIdBox_block_id","userId","userName","HPSB001.queryUserIdBox"),
/** /**
* 模块:工人管理 * 模块:工人管理
* 用途:工人管理下拉框 * 用途:工人管理下拉框
......
...@@ -3,13 +3,11 @@ package com.baosight.hpjx.hp.sc.service; ...@@ -3,13 +3,11 @@ package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC008;
import com.baosight.hpjx.hp.sc.domain.HPSC009;
import com.baosight.hpjx.hp.sc.domain.HPSC010; import com.baosight.hpjx.hp.sc.domain.HPSC010;
import com.baosight.hpjx.hp.sc.domain.HPSC010A;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.ErrorCodeUtils; import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.hpjx.util.contants.ACConstants; import com.baosight.hpjx.util.contants.ACConstants;
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;
...@@ -32,7 +30,7 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -32,7 +30,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC009.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final EiInfo outEiInfo = super.query(inInfo, HPSC010.QUERY, new HPSC010().eiMetadata); final EiInfo outEiInfo = super.query(inInfo, HPSC010.QUERY, new HPSC010().eiMetadata);
CommonMethod.initBlock(outEiInfo, CommonMethod.initBlock(outEiInfo,
Arrays.asList(DdynamicEnum.FACTORY_CODE_BLOCK_ID), new HashMap<String,Object>()); Arrays.asList(DdynamicEnum.FACTORY_CODE_BLOCK_ID), new HashMap<String,Object>());
...@@ -50,7 +48,7 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -50,7 +48,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
if (!startDate.isEmpty()) { if (!startDate.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"createdDateFrom",StringUtil.removeHorizontalLine(startDate)); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"createdDateFrom",StringUtil.removeHorizontalLine(startDate));
} }
inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HPSC008.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0); inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HPSC010.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
return super.query(inInfo,HPSC010.QUERY,new HPSC010()); return super.query(inInfo,HPSC010.QUERY,new HPSC010());
} }
...@@ -64,7 +62,7 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -64,7 +62,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hpxs010.fromMap(map); hpxs010.fromMap(map);
hpxs010.setDeleteFlag(CommonConstant.YesNo.YES_1); hpxs010.setDeleteFlag(CommonConstant.YesNo.YES_1);
delRows(hpxs010.getId().toString()); delRows(hpxs010.getId());
DaoUtils.update(HPSC010.DELETE_FLAG, hpxs010.toMap()); DaoUtils.update(HPSC010.DELETE_FLAG, hpxs010.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
...@@ -115,9 +113,9 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -115,9 +113,9 @@ public class ServiceHPSC010 extends ServiceEPBase {
//BigDecimal weight = new BigDecimal("0"); //BigDecimal weight = new BigDecimal("0");
for (i = 0; i < list.size(); i++) { for (i = 0; i < list.size(); i++) {
Map<?, ?> map = list.get(i); Map<?, ?> map = list.get(i);
HPSC008 hpsc008 = new HPSC008(); HPSC010A hpsc010A = new HPSC010A();
hpsc008.fromMap(map); hpsc010A.fromMap(map);
weight = weight+hpsc008.getWeight().doubleValue()+hpsc008.getWeightJh().doubleValue(); weight = weight+hpsc010A.getWeight().doubleValue()+hpsc010A.getWeightJh().doubleValue();
} }
String registerDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_REGISTER_DATE); String registerDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_REGISTER_DATE);
hpxs010.fromMap(eiBlock.getRow(0)); hpxs010.fromMap(eiBlock.getRow(0));
...@@ -138,10 +136,10 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -138,10 +136,10 @@ public class ServiceHPSC010 extends ServiceEPBase {
return inInfo; return inInfo;
} }
public void delRows(String id){ public void delRows(Long id){
HPSC008 hpxs001 = new HPSC008(); HPSC010A hpsc010A = new HPSC010A();
hpxs001.setRemark(id); hpsc010A.setParentId(id);
hpxs001.setDeleteFlag(CommonConstant.YesNo.YES_1); hpsc010A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPSC008.DELETE_REMARK, hpxs001); DaoUtils.update(HPSC010A.DELETE_PARENT_ID, hpsc010A);
} }
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.baosight.hpjx.common.DdynamicEnum; ...@@ -4,6 +4,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC008; import com.baosight.hpjx.hp.sc.domain.HPSC008;
import com.baosight.hpjx.hp.sc.domain.HPSC010A;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants; import com.baosight.hpjx.util.contants.ACConstants;
...@@ -24,10 +25,10 @@ public class ServiceHPSC010A extends ServiceEPBase { ...@@ -24,10 +25,10 @@ public class ServiceHPSC010A extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC008.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC008.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final EiInfo outEiInfo = super.query(inInfo, HPSC008.QUERY_RESULT, new HPSC008()); final EiInfo outEiInfo = super.query(inInfo, HPSC010A.QUERY_RESULT, new HPSC010A());
EiInfo detailEiInfo = super.query(inInfo, HPSC008.QUERY_DETAIL, new HPSC008()); EiInfo detailEiInfo = super.query(inInfo, HPSC010A.QUERY_DETAIL, new HPSC010A());
EiBlock detailBlock = new EiBlock(CommonConstant.Field.DETAIL); EiBlock detailBlock = new EiBlock(CommonConstant.Field.DETAIL);
detailBlock.setBlockMeta(new HPSC008().eiMetadata); detailBlock.setBlockMeta(new HPSC010A().eiMetadata);
detailBlock.setRows(detailEiInfo.getBlock(EiConstant.resultBlock).getRows()); detailBlock.setRows(detailEiInfo.getBlock(EiConstant.resultBlock).getRows());
outEiInfo.setBlock(detailBlock); outEiInfo.setBlock(detailBlock);
CommonMethod.initBlock(outEiInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(outEiInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
...@@ -47,7 +48,7 @@ public class ServiceHPSC010A extends ServiceEPBase { ...@@ -47,7 +48,7 @@ public class ServiceHPSC010A extends ServiceEPBase {
if (!startDate.isEmpty()) { if (!startDate.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"createdDateFrom",StringUtil.removeHorizontalLine(startDate)); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"createdDateFrom",StringUtil.removeHorizontalLine(startDate));
} }
inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HPSC008.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0); inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HPSC010A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
return super.query(inInfo, HPSC008.QUERY,new HPSC008()); return super.query(inInfo, HPSC010A.QUERY,new HPSC010A());
} }
} }
...@@ -5,10 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum; ...@@ -5,10 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC008; import com.baosight.hpjx.hp.sc.domain.*;
import com.baosight.hpjx.hp.sc.domain.HPSC010;
import com.baosight.hpjx.hp.sc.domain.HPSC096;
import com.baosight.hpjx.hp.sc.domain.HPSC098;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.ErrorCodeUtils; import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
...@@ -37,8 +34,8 @@ public class ServiceHPSC096 extends ServiceEPBase { ...@@ -37,8 +34,8 @@ public class ServiceHPSC096 extends ServiceEPBase {
List<Map> listFactoryCode; List<Map> listFactoryCode;
if ("update".equals(methodType)) { if ("update".equals(methodType)) {
String id = inInfo.getString("inqu_status-0-id"); String id = inInfo.getString("inqu_status-0-id");
listFactoryCode = this.dao.query(HPSC008.QUERY,new HashMap<String,Object>(){{ listFactoryCode = this.dao.query(HPSC010A.QUERY,new HashMap<String,Object>(){{
put(HPSC008.FIELD_REMARK,id); put(HPSC010A.FIELD_PARENT_ID,id);
}},EiConstant.defaultOffset,100); }},EiConstant.defaultOffset,100);
EiInfo eiInfo = super.query(inInfo,HPSC010.QUERY,new HPSC010()); EiInfo eiInfo = super.query(inInfo,HPSC010.QUERY,new HPSC010());
if (eiInfo.getBlock(EiConstant.resultBlock).getRows().size() >0) { if (eiInfo.getBlock(EiConstant.resultBlock).getRows().size() >0) {
...@@ -61,16 +58,16 @@ public class ServiceHPSC096 extends ServiceEPBase { ...@@ -61,16 +58,16 @@ public class ServiceHPSC096 extends ServiceEPBase {
rowNo++; rowNo++;
Map result = new HashMap(); Map result = new HashMap();
result.putAll(listFactoryCode.get(i)); result.putAll(listFactoryCode.get(i));
result.put(HPSC008.FIELD_WEIGHT,0); result.put(HPSC010A.FIELD_WEIGHT,0);
result.put(HPSC008.FIELD_WEIGHT_JH,0); result.put(HPSC010A.FIELD_WEIGHT_JH,0);
result.put(HPSC008.FIELD_GROUP_TYPE,1); result.put(HPSC010A.FIELD_GROUP_TYPE,1);
result.put("rowNo",rowNo); result.put("rowNo",rowNo);
listResult.add(result); listResult.add(result);
}else if ("cutGroup".equals(listFactoryCode.get(i).get(HPSC096.FIELD_ORG_TYPE))){ }else if ("cutGroup".equals(listFactoryCode.get(i).get(HPSC096.FIELD_ORG_TYPE))){
Map detailMap = new HashMap(); Map detailMap = new HashMap();
detailMap.putAll(listFactoryCode.get(i)); detailMap.putAll(listFactoryCode.get(i));
detailMap.put(HPSC008.FIELD_WEIGHT,0); detailMap.put(HPSC010A.FIELD_WEIGHT,0);
detailMap.put(HPSC008.FIELD_WEIGHT_JH,0); detailMap.put(HPSC010A.FIELD_WEIGHT_JH,0);
detailMap.put("rowNo",detrowNo); detailMap.put("rowNo",detrowNo);
listdetail.add(detailMap); listdetail.add(detailMap);
detrowNo++; detrowNo++;
...@@ -85,7 +82,7 @@ public class ServiceHPSC096 extends ServiceEPBase { ...@@ -85,7 +82,7 @@ public class ServiceHPSC096 extends ServiceEPBase {
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.GROUP_RECORD1_BLOCK_ID,DdynamicEnum.FACTORY_CODE_BLOCK_ID), Arrays.asList(DdynamicEnum.GROUP_RECORD1_BLOCK_ID,DdynamicEnum.FACTORY_CODE_BLOCK_ID),
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{
put(HPSC008.FIELD_COMPANY_CODE, UserSessionUtils.getCompanyCode()); put(HPSC010A.FIELD_COMPANY_CODE, UserSessionUtils.getCompanyCode());
}} }}
); );
return inInfo; return inInfo;
...@@ -101,13 +98,13 @@ public class ServiceHPSC096 extends ServiceEPBase { ...@@ -101,13 +98,13 @@ public class ServiceHPSC096 extends ServiceEPBase {
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
int i = 0; int i = 0;
try { try {
HPSC008 hpxs002 = new HPSC008(); HPSC010A hpsc010A = new HPSC010A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) { for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hpxs002.fromMap(map); hpsc010A.fromMap(map);
hpxs002.setDeleteFlag(CommonConstant.YesNo.NO_0); hpsc010A.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.update(HPSC008.UPDATE, hpxs002); DaoUtils.update(HPSC010A.UPDATE, hpsc010A);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
...@@ -135,16 +132,16 @@ public class ServiceHPSC096 extends ServiceEPBase { ...@@ -135,16 +132,16 @@ public class ServiceHPSC096 extends ServiceEPBase {
List<Map> listResult = eiBlock.getRows(); List<Map> listResult = eiBlock.getRows();
listResult.addAll(inInfo.getBlock(CommonConstant.Field.DETAIL).getRows()); listResult.addAll(inInfo.getBlock(CommonConstant.Field.DETAIL).getRows());
String registerDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_REGISTER_DATE); String registerDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_REGISTER_DATE);
HPSC008 hpxs008 = new HPSC008(); HPSC010A hpsc010A = new HPSC010A();
for (i = 0; i < listResult.size(); i++) { for (i = 0; i < listResult.size(); i++) {
Map<?, ?> map = listResult.get(i); Map<?, ?> map = listResult.get(i);
hpxs008.fromMap(map); hpsc010A.fromMap(map);
hpxs008.setRegisterDate(StringUtil.removeHorizontalLine(registerDate)); hpsc010A.setRegisterDate(StringUtil.removeHorizontalLine(registerDate));
hpxs008.setDeleteFlag(CommonConstant.YesNo.NO_0); hpsc010A.setDeleteFlag(CommonConstant.YesNo.NO_0);
for (Map map1:list) { for (Map map1:list) {
hpxs008.setRemark(map1.get(HPSC010.FIELD_ID).toString()); hpsc010A.setParentId((Long) map1.get(HPSC010.FIELD_ID));
} }
DaoUtils.insert(HPSC008.INSERT, hpxs008); DaoUtils.insert(HPSC010A.INSERT, hpsc010A);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.insert", "新增")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.insert", "新增")});
......
...@@ -329,6 +329,7 @@ ...@@ -329,6 +329,7 @@
hpjx.t_hpsc002 hpjx.t_hpsc002
WHERE WHERE
1=1 1=1
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
PARENT_ID = #pEname# PARENT_ID = #pEname#
</isNotEmpty> </isNotEmpty>
...@@ -363,6 +364,7 @@ ...@@ -363,6 +364,7 @@
hpjx.t_hpsc002 hpjx.t_hpsc002
WHERE WHERE
1=1 AND PARENT_ID NOT IN ('root') AND LV != 3 1=1 AND PARENT_ID NOT IN ('root') AND LV != 3
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
PARENT_ID = #pEname# PARENT_ID = #pEname#
</isNotEmpty> </isNotEmpty>
...@@ -398,6 +400,7 @@ ...@@ -398,6 +400,7 @@
hpjx.t_hpsc002 hpjx.t_hpsc002
WHERE WHERE
1=1 1=1
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
PARENT_ID = #pEname# PARENT_ID = #pEname#
</isNotEmpty> </isNotEmpty>
......
...@@ -119,49 +119,61 @@ $(function() { ...@@ -119,49 +119,61 @@ $(function() {
} }
}], }],
loadComplete: function (grid) { loadComplete: function (grid) {
// 此grid对象 // 此grid对象
grid.dataSource.bind("change", function(e) { grid.dataSource.bind("change", function(e) {
if (e.field == "inventName") { if (e.field == "inventName") {
console.log();
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
if (inventNameGlobalData[i]['textField'] === item.inventName) { for (let i = 0; i < inventNameGlobalData.length; i++) {
//dataItem['spec'] = inventNameGlobalData[i]['param2Field']; if (inventNameGlobalData[i]['textField'] === item.inventName) {
/* dataItem['material'] = inventNameGlobalData[i]['param3Field']; //dataItem['spec'] = inventNameGlobalData[i]['param2Field'];
dataItem['unit'] = inventNameGlobalData[i]['param4Field']; /* dataItem['material'] = inventNameGlobalData[i]['param3Field'];
dataItem['length'] = inventNameGlobalData[i]['param5Field']; dataItem['unit'] = inventNameGlobalData[i]['param4Field'];
dataItem['width'] = inventNameGlobalData[i]['param6Field']; dataItem['length'] = inventNameGlobalData[i]['param5Field'];
dataItem['thick'] = inventNameGlobalData[i]['param7Field']; dataItem['width'] = inventNameGlobalData[i]['param6Field'];
dataItem['coefficient'] = inventNameGlobalData[i]['param8Field']; dataItem['thick'] = inventNameGlobalData[i]['param7Field'];
dataItem['inventRecordId'] = inventNameGlobalData[i]['param9Field'];*/ dataItem['coefficient'] = inventNameGlobalData[i]['param8Field'];
resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']); dataItem['inventRecordId'] = inventNameGlobalData[i]['param9Field'];*/
resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']); resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']); resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']); resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']);
resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']); resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']);
resultGrid.refresh(); resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']);
//resultGrid.refresh();
$("#locked_datacell_0_"+k+" input").attr("checked",true);
break;
}
} }
} }
} }
if (e.field == "spec") { if (e.field == "spec") {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let i = 0; i < inventAllGlobalData.length; i++) { for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
if (inventAllGlobalData[i]['textField'] === item.spec) { for (let i = 0; i < inventAllGlobalData.length; i++) {
resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']); if (inventAllGlobalData[i]['textField'] === item.spec) {
resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']); resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']); resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']);
resultGrid.refresh(); resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']);
} $("#locked_datacell_0_"+k+" input").attr("checked",true);
} //resultGrid.refresh();
break;
}
}
}
} }
}); });
}, },
......
...@@ -127,17 +127,21 @@ $(function() { ...@@ -127,17 +127,21 @@ $(function() {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
if (inventNameGlobalData[i]['textField'] === item.inventName) { for (let i = 0; i < inventNameGlobalData.length; i++) {
resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']); if (inventNameGlobalData[i]['textField'] === item.inventName) {
resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']); resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']); resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']); resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']);
resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']); resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']);
resultGrid.refresh(); resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']);
$("#locked_datacell_0_"+k+" input").attr("checked",true);
//resultGrid.refresh();
break;
}
} }
} }
} }
...@@ -145,15 +149,19 @@ $(function() { ...@@ -145,15 +149,19 @@ $(function() {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let i = 0; i < inventAllGlobalData.length; i++) { for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
if (inventAllGlobalData[i]['textField'] === item.spec) { for (let i = 0; i < inventAllGlobalData.length; i++) {
resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']); if (inventAllGlobalData[i]['textField'] === item.spec) {
resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']); resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']); resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']);
resultGrid.refresh(); resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']);
$("#locked_datacell_0_"+k+" input").attr("checked",true);
//resultGrid.refresh();
break;
}
} }
} }
} }
......
$(function () { $(function () {
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
copyToAdd:false,
pageable: { pageable: {
pageSize: 20, pageSize: 10,
pageSizes: [10, 20, 50, 70, 100], pageSizes: [10, 20, 50, 70, 100],
}, },
columns: [
{
field: "docIdPc",
title: "PC端log",
template: function (item) {
let docId = item.docIdPc;
let template = '';
if (docId!= null && docId.length>0){
let src = downloadHref(docId);
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" '
+ 'href="' + src + '" target="_blank">' +
'<img src="'+src+'" style="width:200px;height:50px;background-image: none;" alt="APP端log"/></a>';
}
return template;
}
},
{
field: "docIdApp",
title: "APP端log",
template: function (item) {
let docId = item.docIdApp;
let template = '';
if (docId!= null && docId.length>0){
let src = downloadHref(docId);
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;background-color: #e7e7e7" '
+ 'href="' + src + '" target="_blank">' +
'<img src="'+src+'" style="width:200px;height:50px;background-image: none;" alt="APP端log"/></a>';
}
return template;
}
}
],
onSuccess: function (e) { onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){ if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query(); query();
...@@ -14,6 +47,7 @@ $(function () { ...@@ -14,6 +47,7 @@ $(function () {
$("#type").val("insert") $("#type").val("insert")
$("#companyName").val(""); $("#companyName").val("");
$("#loginPrefix").val(""); $("#loginPrefix").val("");
$("#loginPrefix").removeAttr("readonly");
$("#validFlag").val(1); $("#validFlag").val(1);
$("#PCfileDocId").val(""); $("#PCfileDocId").val("");
$("#APPfileDocId").val(""); $("#APPfileDocId").val("");
...@@ -28,7 +62,7 @@ $(function () { ...@@ -28,7 +62,7 @@ $(function () {
onSave: function (e) { onSave: function (e) {
// 阻止后台保存请求,使用自定义保存 // 阻止后台保存请求,使用自定义保存
e.preventDefault(); e.preventDefault();
//save(); updateCompany();
}, },
onDelete: function (e) { onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除 // 阻止后台删除请求,使用自定义删除
...@@ -44,21 +78,7 @@ $(function () { ...@@ -44,21 +78,7 @@ $(function () {
* e.tr tr, jquery * e.tr tr, jquery
*/ */
onRowClick: function (e) { onRowClick: function (e) {
let app = $("#app-img"),
pc = $("#pc-img");
$("#type").val("update");
$("#companyCode").val(e.model.companyCode);
$("#companyName").val(e.model.companyName);
$("#loginPrefix").val(e.model.loginPrefix);
$("#validFlag").val(e.model.validFlag);
$("#PCfileDocId").val(e.model.docIdPc);
$("#APPfileDocId").val(e.model.docIdApp);
$("#remark").val(e.model.remark);
$("#id").val(e.model.id);
addImgLabel(app,e.model.docIdApp);
addImgLabel(pc,e.model.docIdPc);
$("#insertGroup_wnd_title").text("修改企业管理");
addCompany($("#insertGroup"));
/*WindowUtil({ /*WindowUtil({
"title": "", "title": "",
"content": "<div class='kendo-del-message'>" + e.row + "</div>" "content": "<div class='kendo-del-message'>" + e.row + "</div>"
...@@ -86,6 +106,11 @@ $(function () { ...@@ -86,6 +106,11 @@ $(function () {
localization: { localization: {
invalidFileExtension: "文件格式不支持, 上传失败" invalidFileExtension: "文件格式不支持, 上传失败"
}, },
loadComplete: function(e) {
var uploader = e.sender.uploader;
uploader.clearAllFiles();
// 清空所有历史上传文件
},
success: function(e) { success: function(e) {
let docId = e.response.docId; let docId = e.response.docId;
if (isBlank(docId)) { if (isBlank(docId)) {
...@@ -108,6 +133,11 @@ $(function () { ...@@ -108,6 +133,11 @@ $(function () {
localization: { localization: {
invalidFileExtension: "文件格式不支持, 上传失败" invalidFileExtension: "文件格式不支持, 上传失败"
}, },
loadComplete: function(e) {
var uploader = e.sender.uploader;
uploader.clearAllFiles();
// 清空所有历史上传文件
},
success: function(e) { success: function(e) {
let docId = e.response.docId; let docId = e.response.docId;
if (isBlank(docId)) { if (isBlank(docId)) {
...@@ -157,6 +187,7 @@ let save = function (){ ...@@ -157,6 +187,7 @@ let save = function (){
onSuccess: function (ei) { onSuccess: function (ei) {
btnNode.attr("disabled", false); btnNode.attr("disabled", false);
$("#insertGroup").data("kendoWindow").close(); $("#insertGroup").data("kendoWindow").close();
// 清除上传队列
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
// onFail 表示失败回掉函数 // onFail 表示失败回掉函数
}, onFail: function (ei) { }, onFail: function (ei) {
...@@ -168,52 +199,6 @@ let save = function (){ ...@@ -168,52 +199,6 @@ let save = function (){
}; };
/** /**
* 保存
*/
/*let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length = 1) {
$("#type").val("update")
}
let result = new EiInfo();
let docId = e.response.docId;
let docName = e.response.docName;
let docSize = e.response.docSize;
let docTag = e.response.docTag;
let docUrl = e.response.docUrl;
result.set("result-0-docId",docId);
result.set("result-0-docName",docName);
result.set("result-0-docSize",docSize);
result.set("result-0-docTag",docTag);
result.set("result-0-realPath",docUrl);
EiCommunicator.send("HPXS003", "insert", result, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
resultGrid.dataSource.page(1);
},
onFail: function (ei) {
// 发生异常
NotificationUtil("执行失败,原因[" + ei + "]", "error");
}
}, {
async: false
});
/!*JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ009", "save", true);
}
});*!/
}*/
/**
* 删除 * 删除
*/ */
let deleteFunc = function () { let deleteFunc = function () {
...@@ -236,11 +221,36 @@ let deleteFunc = function () { ...@@ -236,11 +221,36 @@ let deleteFunc = function () {
* @param id * @param id
*/ */
function addCompany(id) { function addCompany(id) {
let rows = resultGrid.getCheckedRows(); $(".k-upload-status-total").remove();
//打开弹窗
id.data("kendoWindow").open().center(); id.data("kendoWindow").open().center();
} }
function updateCompany() {
//获取grid选中数据
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let app = $("#app-img"),
pc = $("#pc-img");
$("#type").val("update");
$("#companyCode").val(rows[0]["companyCode"]);
$("#companyName").val(rows[0]["companyName"]);
$("#loginPrefix").val(rows[0]["loginPrefix"]);
$("#loginPrefix").attr("readonly","true");
$("#validFlag").val(rows[0]["validFlag"]);
$("#PCfileDocId").val(rows[0]["docIdPc"]);
$("#APPfileDocId").val(rows[0]["docIdApp"]);
$("#remark").val(rows[0]["remark"]);
$("#id").val(rows[0]["id"]);
addImgLabel(app,rows[0]["docIdApp"]);
addImgLabel(pc,rows[0]["docIdPc"]);
$("#insertGroup_wnd_title").text("修改企业管理");
addCompany($("#insertGroup"));
}
$("#update").click(function () { $("#update").click(function () {
var btnNode = $(this); var btnNode = $(this);
btnNode.attr("disabled", true); btnNode.attr("disabled", true);
...@@ -261,6 +271,7 @@ $("#update").click(function () { ...@@ -261,6 +271,7 @@ $("#update").click(function () {
} }
}); });
}); });
/** /**
* 附件上传回调 * 附件上传回调
* *
......
...@@ -15,12 +15,14 @@ ...@@ -15,12 +15,14 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="single"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="single">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="docIdPc" cname="主键" hidden="true"/> <%--<EF:EFColumn ename="docIdPc" cname="主键" hidden="true"/>
<EF:EFColumn ename="docIdApp" cname="主键" hidden="true"/> <EF:EFColumn ename="docIdApp" cname="主键" hidden="true"/>--%>
<EF:EFColumn cname="企业编码" ename="companyCode" enable="false" width="120" align="center"/> <EF:EFColumn cname="企业编码" ename="companyCode" enable="false" width="120" height="50" align="center"/>
<EF:EFColumn cname="企业名称" ename="companyName" width="140" required="true"/> <EF:EFColumn cname="企业名称" ename="companyName" width="140" align="center" required="true"/>
<EF:EFColumn cname="登录前缀" ename="loginPrefix" width="100" align="center" readonly="true"/> <EF:EFColumn cname="登录前缀" ename="loginPrefix" width="80" align="center" readonly="true"/>
<EF:EFComboColumn cname="是否启用" ename="validFlag" width="80" align="center" required="true"> <EF:EFColumn cname="PC端log" ename="docIdPc" align="center" width="200" readonly="true" enable="false"/>
<EF:EFColumn cname="APP端log" ename="docIdApp" align="center" width="200" readonly="true" enable="false"/>
<EF:EFComboColumn cname="是否启用" ename="validFlag" width="70" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hppz.validFlag"/> <EF:EFCodeOption codeName="hpjx.hppz.validFlag"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn cname="备注" ename="remark" width="150" editType="textarea"/> <EF:EFColumn cname="备注" ename="remark" width="150" editType="textarea"/>
......
...@@ -283,6 +283,7 @@ $(function () { ...@@ -283,6 +283,7 @@ $(function () {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
} }
}, { }, {
field: "parentPrdtName", field: "parentPrdtName",
......
...@@ -80,6 +80,7 @@ $(function () { ...@@ -80,6 +80,7 @@ $(function () {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
}, },
/*afterEdit: function (e) { /*afterEdit: function (e) {
for (let i = 0; i < princ2Data.length; i++) { for (let i = 0; i < princ2Data.length; i++) {
...@@ -255,6 +256,7 @@ $(function () { ...@@ -255,6 +256,7 @@ $(function () {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
} }
} }
] ]
......
...@@ -288,16 +288,20 @@ $(function () { ...@@ -288,16 +288,20 @@ $(function () {
} }
}, {async: false}); }, {async: false});
input.kendoAutoComplete({ input.kendoAutoComplete({
valuePrimitive: true,
dataSource: dataSource, dataSource: dataSource,
minLength: 0,
dataTextField: "textField", dataTextField: "textField",
dataValueField: "valueField", dataValueField: "valueField",
required: "true",
optionLabelTemplate: "#:textField#", optionLabelTemplate: "#:textField#",
valueTemplate: "#:valueField#", valueTemplate: "#:valueField#",
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
//input.trigger("change", {sender: input, open: true});
//enforceMinLength: true,
//suggest: false,
//open: true,
} }
}, { }, {
field: "parentPrdtName", field: "parentPrdtName",
......
...@@ -198,6 +198,7 @@ $(function () { ...@@ -198,6 +198,7 @@ $(function () {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
} }
}, },
{ {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/> <EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
......
...@@ -109,45 +109,50 @@ $(function (){ ...@@ -109,45 +109,50 @@ $(function (){
* 确认 * 确认
*/ */
$('#confirm').on('click', function () { $('#confirm').on('click', function () {
let rows = resultGrid.getCheckedRows(); let resultRows = resultGrid.getDataItems();
if (rows.length < 1) { let detailRows = detailGrid.getDataItems();
message("请选择数据");
return;
}
let methodType = $("#inqu_status-0-methodType").val(); let methodType = $("#inqu_status-0-methodType").val();
let registerDate = $("#inqu_status-0-registerDate").val(); let registerDate = $("#inqu_status-0-registerDate").val();
if (registerDate.length<=0){ if (registerDate.length<=0){
registerDate = currShortDate() registerDate = currShortDate()
} }
let flag = true; let flag = true;
$.each(rows, function(index, item) { $.each(resultRows, function(index, item) {
let prdtName= item.get("prdtName"); let prdtName= item.get("prdtName");
if(isBlank(prdtName)){ if(isBlank(prdtName)){
message("选中的第"+(index+1)+"行\"产品\",不能为空!"); message("选中的生产组第"+(index+1)+"行\"产品\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
let weight= item.get("weight"); let weight= item.get("weight");
if(isBlank(weight)){ if(isBlank(weight)){
message("选中的第"+(index+1)+"行\"组拼产量(T)\",不能为空!"); message("选中的生产组第"+(index+1)+"行\"组拼产量(T)\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
let weightJh= item.get("weightJh"); let weightJh= item.get("weightJh");
if(isBlank(weightJh)){ if(isBlank(weightJh)){
message("选中的第"+(index+1)+"行\"加焊产量(T)\",不能为空!"); message("选中的生产组第"+(index+1)+"行\"加焊产量(T)\",不能为空!");
flag = false;
return false;
}
});
$.each(detailRows, function(index, item) {
let prdtName= item.get("prdtName");
if(isBlank(prdtName)){
message("选中的下料组第"+(index+1)+"行\"产品\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
}); });
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () { ok: function () {
var info = new EiInfo(); var info = new EiInfo();
info.set("inqu_status-0-userCount",$("#inqu_status-0-userCount").val()); info.set("inqu_status-0-userCount",$("#inqu_status-0-userCount").val());
info.set("inqu_status-0-registerDate",registerDate); info.set("inqu_status-0-registerDate",registerDate);
info.addBlock(JSUtils.checkedRows2Block("result")); info.addBlock(rowsBlock("result"));
info.addBlock(JSUtils.checkedRows2Block("detail")) info.addBlock(rowsBlock("detail"))
EiCommunicator.send("HPSC010", methodType, info, { EiCommunicator.send("HPSC010", methodType, info, {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei.getStatus() >= 0) { if (ei.getStatus() >= 0) {
...@@ -286,4 +291,40 @@ let detailRefreshRowNo = function (rowNo) { ...@@ -286,4 +291,40 @@ let detailRefreshRowNo = function (rowNo) {
detailGrid.refresh(); detailGrid.refresh();
} }
} }
}
var rowsBlock = function (grid_id) {
var resultGrid = window[grid_id + 'Grid'];
var columns = resultGrid.columns;
var dateColumns = _.filter(columns,
function (column) {
return column.editType === "date"
|| column.editType === "datetime";
}
);
var eiblock = new EiBlock(grid_id);
var rowsDate = resultGrid.getDataItems();
for (var int = 0; int < rowsDate.length; int++) {
if (int == 0) {
for (var key in rowsDate[0].toJSON()) {
var eColumn = new EiColumn(key);
eiblock.getBlockMeta().addMeta(eColumn);
}
}
var model = rowsDate[int];
$.each(dateColumns, function (index, dateColumn) {
var field = dateColumn.field, dateFormat = dateColumn.dateFormat;
model[field] = kendo.toString(model[field],
dateFormat
);// 日期转String
});
eiblock.addRow(eiblock.getMappedArray(model, true));
}
var showCount = eiblock.get(EiConstant.SHOW_COUNT) || "true";
eiblock.set(EiConstant.SHOW_COUNT, showCount);
eiblock.set(EiConstant.LIMIT, resultGrid.dataSource['_pageSize']);
// eiblock.set(EiConstant.OFFSET, resultGrid.dataSource['_skip']);
// 默认查询第一页
eiblock.set(EiConstant.OFFSET, 0);
return eiblock;
} }
\ No newline at end of file
...@@ -208,6 +208,7 @@ function refreshInputSelect(container, inInfo) { ...@@ -208,6 +208,7 @@ function refreshInputSelect(container, inInfo) {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
return dataSource; return dataSource;
} }
......
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