Commit 6bc3b7b9 by liuyang

1、生产入库单,销售出库单,质量巡检单,整改通知单添加排序和导出功能

parent 8b630133
...@@ -314,7 +314,7 @@ public class HPKC004 extends DaoEPBase { ...@@ -314,7 +314,7 @@ public class HPKC004 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_CODE); eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("厂区编码"); eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME); eiColumn = new EiColumn(FIELD_FACTORY_NAME);
......
...@@ -4,22 +4,21 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; ...@@ -4,22 +4,21 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
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.core.tools.Iplat4jTools;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC003; import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.tools.HPKCTools; import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.tools.HPSCTools; import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.hp.yx.domain.HPYX001;
import com.baosight.hpjx.hp.zl.domain.HPZL001; import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.hp.zl.tools.HPZLTools; import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.BeanUtils; import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtil;
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;
...@@ -32,6 +31,7 @@ import org.apache.commons.collections.MapUtils; ...@@ -32,6 +31,7 @@ import org.apache.commons.collections.MapUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author:songx * @author:songx
...@@ -129,4 +129,26 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -129,4 +129,26 @@ public class ServiceHPKC003 extends ServiceBase {
return eiInfo; return eiInfo;
} }
@OperationLogAnnotation(operModul = "生产入库单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
CommonMethod.initBlock(inEiInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null);
List<Map> listMap = inEiInfo.getBlock(DdynamicEnum.FACTORY_RECORD_BLOCK_ID.getBlockId()).getRows();
Map params = HPXSTools.setAuthParam("HPKC003."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HPYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("prodNo","documentDate","factoryCode", "projCode","projName", "whCode","whName","prdtCode", "prdtName"
, "partCode", "partName", "partSpec", "amount", "weight", "remark"));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HPKC003());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> mapList = new ArrayList<>();
rows.forEach(row ->{
List<Map> factoryList = listMap.stream().filter(map -> row.get("factoryCode").equals(map.get("valueField"))).collect(Collectors.toList());
if (factoryList.size() > 0){
row.put("factoryCode", factoryList.get(0).get("textField"));
}
mapList.add(row);
});
inEiInfo.getBlock(EiConstant.resultBlock).setRows(mapList);
return inEiInfo;
}
} }
...@@ -7,27 +7,21 @@ import com.baosight.hpjx.common.ReturnStatusEnum; ...@@ -7,27 +7,21 @@ import com.baosight.hpjx.common.ReturnStatusEnum;
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.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC004; import com.baosight.hpjx.hp.kc.domain.*;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.kc.domain.HPKC011;
import com.baosight.hpjx.hp.kc.domain.HPKC013;
import com.baosight.hpjx.hp.kc.tools.HPKCTools; import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.util.BeanUtils; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.hp.yx.domain.HPYX001;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.ObjectUtils; import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.hpjx.util.StringUtil;
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.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import java.util.Arrays; import java.util.*;
import java.util.HashMap; import java.util.stream.Collectors;
import java.util.List;
import java.util.Map;
/** /**
* @author:songx * @author:songx
...@@ -175,4 +169,27 @@ public class ServiceHPKC004 extends ServiceBase { ...@@ -175,4 +169,27 @@ public class ServiceHPKC004 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "销售出库单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
CommonMethod.initBlock(inEiInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null);
List<Map> listMap = inEiInfo.getBlock(DdynamicEnum.FACTORY_RECORD_BLOCK_ID.getBlockId()).getRows();
Map params = HPXSTools.setAuthParam("HPKC004."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HPYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("saleNo","receiptDate","factoryCode", "factoryName", "projCode", "projName", "whCode", "whName","inventCode", "inventName"
, "subInventCode", "subInventName","length","width","thick","amount", "unitWeight", "weight", "remark", "createdName", "createdTime"));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HPKC004());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> mapList = new ArrayList<>();
rows.forEach(row ->{
List<Map> factoryList = listMap.stream().filter(map -> row.get("factoryCode").equals(map.get("valueField"))).collect(Collectors.toList());
if (factoryList.size() > 0){
row.put("factoryName", factoryList.get(0).get("textField"));
}
mapList.add(row);
});
inEiInfo.getBlock(EiConstant.resultBlock).setRows(mapList);
return inEiInfo;
}
} }
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
WH_CODE = #whCode# WH_CODE = #whCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whName"> <isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName# WH_NAME LIKE CONCAT('%', #whName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prodNo"> <isNotEmpty prepend=" AND " property="prodNo">
PROD_NO = #prodNo# PROD_NO = #prodNo#
......
...@@ -11,6 +11,7 @@ import com.baosight.hpjx.hp.wd.domain.HPWD099; ...@@ -11,6 +11,7 @@ import com.baosight.hpjx.hp.wd.domain.HPWD099;
import com.baosight.hpjx.hp.wd.tools.HPWDTools; import com.baosight.hpjx.hp.wd.tools.HPWDTools;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtils; 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.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -56,9 +57,11 @@ public class ServiceHPWD099 extends ServiceEPBase { ...@@ -56,9 +57,11 @@ public class ServiceHPWD099 extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
if (StringUtils.isNotEmpty(queryRow.get(HPWD001.FIELD_PARENT_ID).toString())){ String parentId = MapUtils.getString(queryRow, HPWD001.FIELD_PARENT_ID);
inInfo = super.query(inInfo, HPWD099.QUERY, new HPWD099()); if (StringUtils.isBlank(parentId)){
return inInfo;
} }
inInfo = super.query(inInfo, HPWD099.QUERY, new HPWD099());
} catch (Throwable e) { } catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
...@@ -143,7 +143,7 @@ public class HPZL004 extends DaoEPBase { ...@@ -143,7 +143,7 @@ public class HPZL004 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME); eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间"); eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY); eiColumn = new EiColumn(FIELD_UPDATED_BY);
......
...@@ -4,23 +4,23 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; ...@@ -4,23 +4,23 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
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.core.tools.Iplat4jTools;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.hp.yx.domain.HPYX001;
import com.baosight.hpjx.hp.zl.domain.HPZL001; import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
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.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import java.util.Arrays; import java.util.*;
import java.util.List; import java.util.stream.Collectors;
import java.util.Map;
/** /**
* @author ZJH * @author ZJH
...@@ -205,4 +205,35 @@ public class ServiceHPZL001 extends ServiceBase { ...@@ -205,4 +205,35 @@ public class ServiceHPZL001 extends ServiceBase {
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "质量巡检单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
CommonMethod.initBlock(inEiInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null);
List<Map> listMap = inEiInfo.getBlock(DdynamicEnum.FACTORY_RECORD_BLOCK_ID.getBlockId()).getRows();
Map params = HPXSTools.setAuthParam("HPZL001."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HPYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("checkNo", "status","receiptDate","factoryCode", "factoryName", "projCode","projName", "inventCode","inventName","subInventCode"
, "subInventName", "orgCode","orgName", "poorType", "problemDesc", "prodOrderNo", "prodTaskNo", "createdName", "createdTime"));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HPZL001());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
rows.forEach(row ->{
if (row.containsKey("status")){
if ("1".equals(MapUtils.getString(row, "status"))){
row.put("status", "已处理");
}else {
row.put("status", "未处理");
}
}
List<Map> factoryList = listMap.stream().filter(map -> row.get("factoryCode").equals(map.get("valueField"))).collect(Collectors.toList());
if (factoryList.size() > 0){
row.put("factoryName", factoryList.get(0).get("textField"));
}
});
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("poorType", "hpjx.hpjx.poorType");
}};
String codeSetCode = "CODESET_CODE in ('hpjx.hpjx.poorType')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
} }
package com.baosight.hpjx.hp.zl.service; package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.enums.HandleStatusEnum; import com.baosight.hpjx.core.enums.HandleStatusEnum;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.core.tools.Iplat4jTools;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.dm.constant.HpDmConstant; import com.baosight.hpjx.hp.dm.constant.HpDmConstant;
import com.baosight.hpjx.hp.xs.domain.User; import com.baosight.hpjx.hp.xs.domain.User;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.hp.yx.domain.HPYX001;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.hp.zl.domain.HPZL004; import com.baosight.hpjx.hp.zl.domain.HPZL004;
import com.baosight.hpjx.hp.zl.domain.HPZL004C; import com.baosight.hpjx.hp.zl.domain.HPZL004C;
import com.baosight.hpjx.hp.zl.tools.HPZLTools; import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.hp.zl.utils.HpZlUtils; import com.baosight.hpjx.hp.zl.utils.HpZlUtils;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
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.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.List; import java.util.*;
import java.util.Map; import java.util.stream.Collectors;
/** /**
* @author wwl * @author wwl
...@@ -128,5 +131,27 @@ public class ServiceHPZL004 extends ServiceBase { ...@@ -128,5 +131,27 @@ public class ServiceHPZL004 extends ServiceBase {
DaoUtils.update(HPSqlConstant.HpZl004.CONFIRM, fZl004); DaoUtils.update(HPSqlConstant.HpZl004.CONFIRM, fZl004);
} }
} }
@OperationLogAnnotation(operModul = "整改通知单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
CommonMethod.initBlock(inEiInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null);
Map params = HPXSTools.setAuthParam("HPZL004."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HPYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("rectifyId", "createdTime","status","receiptDate", "projCode","projName", "inventCode","prdtCode","prdtName"
, "qualityProblem", "processSugges","rectifySugges", "responDepName", "responUserName", "checkName", "checkTime"));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HPZL004());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map row: rows) {
if (row.containsKey("createdTime")){
row.put("createdTime", MapUtils.getString(row, "createdTime").substring(0,8));
}
}
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("status", "hpjx.hpzl.handleStatus");
}};
String codeSetCode = "CODESET_CODE in ('hpjx.hpzl.handleStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
} }
...@@ -12,6 +12,19 @@ $(function () { ...@@ -12,6 +12,19 @@ $(function () {
pageSizes: [10, 20, 30, 50, 100, 200], pageSizes: [10, 20, 30, 50, 100, 200],
}, },
columns: [], columns: [],
exportGrid: {
beforeExport: function (gridInstance) {
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产入库单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HPKC003",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) { loadComplete: function (grid) {
}, },
onSuccess: function (e) { onSuccess: function (e) {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="prodNo" cname="生产单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="prodNo" cname="生产单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true" <EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true"
......
...@@ -8,6 +8,19 @@ $(function () { ...@@ -8,6 +8,19 @@ $(function () {
return showUserName(options.createdBy, options.createdName); return showUserName(options.createdBy, options.createdName);
} }
}], }],
exportGrid: {
beforeExport: function (gridInstance) {
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "销售出库单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HPKC004",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) { loadComplete: function (grid) {
} }
}, },
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<EF:EFDatePicker cname="单据日期" ename="receiptDate" blockId="inqu_status" row="0" colWidth="3" <EF:EFDatePicker cname="单据日期" ename="receiptDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/> format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="销售单号" ename="saleNo" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="销售单号" ename="saleNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="项目号" ename="projCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="仓库名称" ename="whName" blockId="inqu_status" row="0" colWidth="3"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="saleNo" cname="销售单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="saleNo" cname="销售单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" width="90" align="center" <EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" width="90" align="center"
......
...@@ -873,7 +873,6 @@ let showAuthButton = function () { ...@@ -873,7 +873,6 @@ let showAuthButton = function () {
// 隐藏变更记录按钮 // 隐藏变更记录按钮
if (!isBlank(leafLevel) && leafLevel === 0) { if (!isBlank(leafLevel) && leafLevel === 0) {
CommonUtils.showButton("CHANGE_RECORD"); CommonUtils.showButton("CHANGE_RECORD");
CommonUtils.showButton("COPY_PROT_FILE");
} else { } else {
CommonUtils.hideButton("CHANGE_RECORD"); CommonUtils.hideButton("CHANGE_RECORD");
} }
...@@ -884,6 +883,7 @@ let showAuthButton = function () { ...@@ -884,6 +883,7 @@ let showAuthButton = function () {
CommonUtils.hideButton("COPY_FILE"); CommonUtils.hideButton("COPY_FILE");
CommonUtils.hideButton("PREVIEW"); CommonUtils.hideButton("PREVIEW");
CommonUtils.hideButton("BATCH_DOWNLOAD"); CommonUtils.hideButton("BATCH_DOWNLOAD");
CommonUtils.hideButton("COPY_PROT_FILE");
return return
} }
// 0:不授权 // 0:不授权
......
...@@ -136,6 +136,19 @@ $(function () { ...@@ -136,6 +136,19 @@ $(function () {
return showUserName(options.createdBy, options.createdName); return showUserName(options.createdBy, options.createdName);
} }
}], }],
exportGrid: {
beforeExport: function (gridInstance) {
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "质量巡检单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HPZL001",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
onDelete: function (e) { onDelete: function (e) {
// 阻止默认请求,使用自定义删除 // 阻止默认请求,使用自定义删除
e.preventDefault(); e.preventDefault();
......
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center" sort="false"/>
<EF:EFColumn ename="problemPhoto" cname="问题照片" locked="true" enable="false" width="100" align="center" <EF:EFColumn ename="problemPhoto" cname="问题照片" locked="true" enable="false" width="100" align="center" sort="false"
required="true"/> required="true"/>
<EF:EFColumn ename="processPhoto" cname="处理照片" locked="true" enable="false" width="100" align="center" <EF:EFColumn ename="processPhoto" cname="处理照片" locked="true" enable="false" width="100" align="center" sort="false"
required="true"/> required="true"/>
<EF:EFColumn ename="checkNo" cname="检查单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="checkNo" cname="检查单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center"> <EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center">
......
...@@ -38,6 +38,19 @@ $(function () { ...@@ -38,6 +38,19 @@ $(function () {
return template; return template;
} }
}], }],
exportGrid: {
beforeExport: function (gridInstance) {
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "整改通知单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HPZL004",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
onSuccess: function (e) { onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'complete') { if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'complete') {
query(); query();
......
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="checkBy" cname="质检员" hidden="true"/> <EF:EFColumn ename="checkBy" cname="质检员" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center" sort="false"/>
<EF:EFColumn ename="problemPic" cname="问题照片" width="90" enable="false" align="center"/> <EF:EFColumn ename="problemPic" cname="问题照片" width="90" enable="false" align="center" sort="false"/>
<EF:EFColumn ename="processPic" cname="处理照片" width="90" enable="false" align="center"/> <EF:EFColumn ename="processPic" cname="处理照片" width="90" enable="false" align="center" sort="false"/>
<EF:EFColumn ename="rectifyId" cname="单据ID" enable="false" width="130" align="center"/> <EF:EFColumn ename="rectifyId" cname="单据ID" enable="false" width="130" align="center"/>
<EF:EFColumn ename="createdTime" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" <EF:EFColumn ename="createdTime" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" enable="false" width="120" align="center" readOnly="true"/> parseFormats="['yyyyMMdd']" enable="false" width="120" align="center" readOnly="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