Commit de9a0b1a by wuwenlong

日常巡检单dev;

parent cb2d4d4f
...@@ -75,6 +75,8 @@ public class HGConstant { ...@@ -75,6 +75,8 @@ public class HGConstant {
public static final String HGSC008_WORK_CODE = "HGSC008_WORK_CODE"; public static final String HGSC008_WORK_CODE = "HGSC008_WORK_CODE";
//工序质检 //工序质检
public static final String HGZL002_CHECK_CODE = "HGZL002_CHECK_CODE"; public static final String HGZL002_CHECK_CODE = "HGZL002_CHECK_CODE";
//日常巡检
public static final String HGZL003_CHECK_CODE = "HGZL003_CHECK_CODE";
//生产任务订单 //生产任务订单
public static final String PROD_TASK_NO = "PROD_TASK_NO"; public static final String PROD_TASK_NO = "PROD_TASK_NO";
//售后维修单号 //售后维修单号
......
package com.baosight.hggp.hg.zl.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.CheckTypeEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.zl.domain.HGZL003;
import com.baosight.hggp.hg.zl.tools.HGZLTools;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author wwl
* @date 2025年05月29日 17:18
*/
public class ServiceHGZL003 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "日常巡检单", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL003.QUERY, new HGZL003());
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
// EiInfoUtils.addBlock(inInfo,"workUserBlockId", UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()), User.class);
CommonMethod.objConvertComboBox(UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()),inInfo, "workUserBlockId","loginName","userName");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "日常巡检单", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL003.QUERY, new HGZL003());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "日常巡检单", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<HGZL003> hgzl003List = MapUtils.toDaoEPBase(inInfo,HGZL003.class);
hgzl003List.forEach( o -> {
HGZLTools.THGZL003.add(o);
});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + hgzl003List.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
@Override
@OperationLogAnnotation(operModul = "日常巡检单", operType = "删除", operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Long> ids = ObjectUtils.listKey(resultRows, HGZL003.FIELD_id).stream().map(id -> Long.parseLong(String.valueOf(id))).collect(Collectors.toList());
DaoUtils.update(HGZL003.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
HGZLTools.THGZL004.deleteByCheckIds(ids, CheckTypeEnum.POLLING_CHECK);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 用户下拉框
* @param inInfo
* @return
*/
public EiInfo workUserComboBox(EiInfo inInfo) throws InstantiationException, IllegalAccessException {
String groupCode = inInfo.getCellStr(EiConstant.queryBlock,EiConstant.STATUS_DEFAULT, HGZL003.FIELD_group_code);
// EiInfoUtils.addBlock(inInfo,"workUserBlockId", HGXSTools.XsUser.queryByOrg(new ArrayList<String>(){{add(groupCode);}}), User.class);
CommonMethod.objConvertComboBox(HGXSTools.XsUser.queryByOrg(new ArrayList<String>(){{add(groupCode);}}),inInfo, "workUserBlockId","loginName","userName");
return inInfo;
}
}
package com.baosight.hggp.hg.zl.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
/**
* @author wwl
* @version 1.0 2024/5/24
*/
public class ServiceHGZL003A extends ServiceEPBase {
@OperationLogAnnotation(operModul = "日常巡检单-生产任务", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/*
* 查询*/
@OperationLogAnnotation(operModul = "日常巡检单-生产任务", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
EiBlock block = inInfo.getBlock(EiConstant.queryBlock);
String creatTime = block.getCellStr(ACConstants.ROW_CODE_0, HGSC007.FIELD_created_time);
if (!creatTime.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGSC007.FIELD_created_time, StringUtil.removeHorizontalLine(creatTime));
}
inInfo = super.query(inInfo,HGSC007.QUERY,new HGSC007() );
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
...@@ -8,12 +8,10 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -8,12 +8,10 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC006A; import com.baosight.hggp.hg.sc.domain.HGSC006A;
import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.hg.sc.domain.HGSC008; import com.baosight.hggp.hg.sc.domain.HGSC008;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.zl.domain.HGZL001; import com.baosight.hggp.hg.zl.domain.*;
import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.hg.zl.domain.HGZL004A;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
...@@ -136,6 +134,33 @@ public class HGZLTools { ...@@ -136,6 +134,33 @@ public class HGZLTools {
} }
} }
public static class THGZL003 {
public static HGZL003 add(HGZL003 hgzl003) {
HGSC007 hgsc007 = HGSCTools.THGSC007.getById(hgzl003.getTaskId());
BeanUtils.copyProperties(hgsc007, hgzl003);
cleanBaseInfo(hgzl003);
hgzl003.setCheckStatus(CheckStatusEnum.CHECKED.getCode());
hgzl003.setTaskId(hgsc007.getId());
hgzl003.setCheckCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGZL003_CHECK_CODE));
DaoUtils.insert(HGZL003.INSERT, hgzl003);
THGZL004.addByHGZL003(hgzl003);
return hgzl003;
}
private static void cleanBaseInfo(HGZL003 hgzl003) {
hgzl003.setCreatedBy(null);
hgzl003.setCreatedName(null);
hgzl003.setCreatedTime(null);
hgzl003.setUpdatedBy(null);
hgzl003.setUpdatedName(null);
hgzl003.setUpdatedTime(null);
hgzl003.setDepCode(null);
hgzl003.setDepName(null);
hgzl003.setId(null);
}
}
public static class THGZL004 { public static class THGZL004 {
/** /**
...@@ -176,11 +201,25 @@ public class HGZLTools { ...@@ -176,11 +201,25 @@ public class HGZLTools {
// } // }
} }
public static void addByHGZL003(HGZL003 hgzl003) {
List<HGZL004> hgzl004DbList = listByCheckId(hgzl003.getId(), CheckTypeEnum.POLLING_CHECK.getCode());
if (hgzl003.getUnpassQuantity() > 0 && CollectionUtils.isEmpty(hgzl004DbList)) {
HGZL004 hgzl004 = new HGZL004();
BeanUtils.copyProperties(hgzl003, hgzl004);
cleanBaseInfo(hgzl004);
hgzl004.setCheckId(hgzl003.getId());
hgzl004.setCheckType(CheckTypeEnum.PROCESS_CHECK.getCode());
hgzl004.setHandleStatus(HandleStatusEnum.UNPROCESS.getCode());
hgzl004.setCheckCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGZL002_CHECK_CODE));
DaoUtils.insert(HGZL004.INSERT, hgzl004);
}
}
public static void deleteByCheckIds(List<Long> checkIds,CheckTypeEnum checkType){ public static void deleteByCheckIds(List<Long> checkIds,CheckTypeEnum checkType){
List<HGZL004> hgzl004List = listByCheckIds(checkIds,checkType.getCode()); List<HGZL004> hgzl004List = listByCheckIds(checkIds,checkType.getCode());
List<Long> ids = hgzl004List.stream().map(HGZL004::getId).collect(Collectors.toList()); List<Long> ids = hgzl004List.stream().map(HGZL004::getId).collect(Collectors.toList());
DaoUtils.update(HGZL004.DELETE_BY_IDS,new HashMap<String,Object>(){{put("ids",ids);}}); DaoUtils.update(HGZL004.DELETE_BY_IDS,new HashMap<String,Object>(){{put("ids",ids);}});
// THGZL004A.deleteByInformIds(ids); THGZL004A.deleteByInformIds(ids);
ids.forEach( id -> { ids.forEach( id -> {
HGSCTools.THGSC099.deleteByMatId(id,HGConstant.FileBizType.CHECK_DEFECT); HGSCTools.THGSC099.deleteByMatId(id,HGConstant.FileBizType.CHECK_DEFECT);
HGSCTools.THGSC099.deleteByMatId(id,HGConstant.FileBizType.CHECK_HANDLE); HGSCTools.THGSC099.deleteByMatId(id,HGConstant.FileBizType.CHECK_HANDLE);
...@@ -226,6 +265,7 @@ public class HGZLTools { ...@@ -226,6 +265,7 @@ public class HGZLTools {
} }
public static class THGZL004A { public static class THGZL004A {
public static void deleteByInformIds(List<Long> informIds){ public static void deleteByInformIds(List<Long> informIds){
AssertUtils.isEmpty(informIds, "通知单ID不能为空"); AssertUtils.isEmpty(informIds, "通知单ID不能为空");
......
...@@ -16,12 +16,8 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession; ...@@ -16,12 +16,8 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import java.util.ArrayList; import java.util.*;
import java.util.Calendar; import java.util.stream.Collectors;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author xuao * @author xuao
...@@ -295,4 +291,32 @@ public class CommonMethod { ...@@ -295,4 +291,32 @@ public class CommonMethod {
newRows.addAll(rows); newRows.addAll(rows);
inInfo.getBlock(blockId).setRows(newRows); inInfo.getBlock(blockId).setRows(newRows);
} }
public static <T extends DaoEPBase> void objConvertComboBox(List<T> list,EiInfo inInfo, String blockId, String valueFieldName, String textFieldName) {
List rows = (List) Optional.ofNullable(list).orElse(new ArrayList()).stream().map(o -> {
Map map = ((DaoEPBase)o).toMap();
return new HashMap<String,Object>(){{
put(HGConstants.VALUE_FIELD,map.get(valueFieldName));
put(HGConstants.TEXT_FIELD,map.get(textFieldName));
}};
}).collect(Collectors.toList());
EiBlock eiBlock = new EiBlock(blockId);
eiBlock.addBlockMeta(initCodeMeta(HGConstants.TEXT_FIELD, HGConstants.VALUE_FIELD));
eiBlock.setRows(rows);
inInfo.setBlock(eiBlock);
}
public static <T extends DaoEPBase> void joiniObjConvertComboBox(List<T> list,EiInfo inInfo, String blockId, String valueFieldName, String textFieldName) {
List rows = (List) Optional.ofNullable(list).orElse(new ArrayList()).stream().map(o -> {
Map map = ((DaoEPBase)o).toMap();
return new HashMap<String,Object>(){{
put(HGConstants.VALUE_FIELD,map.get(valueFieldName));
put(HGConstants.TEXT_FIELD,String.format("[%s]%s",map.get(valueFieldName),map.get(textFieldName)));
}};
}).collect(Collectors.toList());
EiBlock eiBlock = new EiBlock(blockId);
eiBlock.addBlockMeta(initCodeMeta(HGConstants.TEXT_FIELD, HGConstants.VALUE_FIELD));
eiBlock.setRows(rows);
inInfo.setBlock(eiBlock);
}
} }
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/> <EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center"/>
<EF:EFColumn ename="companyCode" cname="公司名称" enable="true" width="120" align="center"/> <EF:EFColumn ename="companyCode" cname="公司名称" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center"/> <EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" readOnly="true" required="true"/>
<EF:EFColumn ename="personDepName" cname="所属部门" enable="true" width="120" align="center"/> <EF:EFColumn ename="personDepName" cname="所属部门" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="personName" cname="姓名" enable="true" width="120" align="center"/> <EF:EFColumn ename="personName" cname="姓名" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="personPhone" cname="电话" enable="true" width="120" align="center"/> <EF:EFColumn ename="personPhone" cname="电话" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="personIdCard" cname="身份证号" enable="true" width="120" align="center"/> <EF:EFColumn ename="personIdCard" cname="身份证号" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="120" align="center"/> <EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="120" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="120" align="center"/>
<EF:EFColumn ename="updatedTime" cname="修改日期" enable="false" width="120" align="center"/> <EF:EFColumn ename="updatedTime" cname="修改日期" enable="false" width="120" align="center"/>
......
let loginUser;
$(function () {
loginUser = __eiInfo.getBlock("userBlockId").getMappedRows();
var globalUserList = __eiInfo.getBlock("workUserBlockId").getMappedRows();
IPLATUI.EFGrid = {
"result": {
pageable: {
input: true,
numeric: false,
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "unpassQuantity",
template: function (item) {
let template = "";
if (item.unpassQuantity&&isNumber(item.unpassQuantity)) {
item['passQuantity'] = item['quantity'] - item.unpassQuantity;
}
return item.unpassQuantity;
}
},{
field: "passQuantity",
template: function (item) {
let template = "";
if (item.passQuantity&&isNumber(item.passQuantity)) {
item['unpassQuantity'] = item['quantity'] - item.passQuantity;
}
return item.passQuantity;
}
},{
field:"workBy",
template: function (item) {
let template = "";
if(item.workBy){
for(let i=0;i<globalUserList.length;i++){
if(item.workBy === globalUserList[i]['valueField']){
item['workName'] = globalUserList[i]['textField'];
template = globalUserList[i]['textField'];
}
}
}
return template;
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-groupCode", options.model["groupCode"]);
inInfo.set("field", options.field);
// let dataSource;
// EiCommunicator.send("HGZL003", "workUserComboBox", inInfo, {
// onSuccess: function (ei) {
// dataSource = ei.getBlock("workUserBlockId").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// var input = $('<input />');
// input.attr("name", options.field);
// input.attr("id", options.field);
// input.appendTo(container);
// input.kendoDropDownList({
// dataSource: dataSource,
// minLength: 0,
// dataTextField: "textField",
// dataValueField: "valueField",
// // optionLabelTemplate: "[#:valueField#]#:textField#",
// // valueTemplate: "[#:valueField#]#:textField#",
// // template: "[#:valueField#]#:textField#",
// filter: "contains"
// });
inInfo.set("serviceName", "HGZL003");
inInfo.set("methodName", "workUserComboBox");
inInfo.set("blockId", "workUserBlockId");
refreshSelect(container, inInfo);
}
}],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
loadComplete: function(grid) {
//选择生产任务
$("#BNT_SELECT").on("click", selectTask);
// 此 grid 对象
grid.dataSource.bind("change", function(e) {
if (e.field == "unpassQuantity") {
loadChange(grid,e,"passQuantity");
}
if (e.field == "passQuantity") {
loadChange(grid,e,"unpassQuantity");
}
if (e.field == "workBy") {
loadChange(grid,e,"workName");
}
});
},
onCheckRow: function (e){
if(e.checked){
// if(e.model.checkStatus === '0') {
// var now = new Date()
// resultGrid.setCellValue(e.row, "checkDate", now.getFullYear() + "-" + now.getMonth() + "-" + now.getDay());
// }
resultGrid.setCellValue(e.row, "checkBy", loginUser[0].userId);
resultGrid.setCellValue(e.row, "checkName", loginUser[0].userName);
}
// else{
// if(e.model.checkStatus === '0'){
// resultGrid.setCellValue(e.row,"checkDate","");
// }
//
// }
},
onSave: function(e){
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
}
}
}
// 查询
$("#QUERY").on("click", query);
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 提交操作
*
* @param id
* @param checkNo
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
// let passQuantity = rows[i]['passQuantity'];
let unpassQuantity = rows[i]['unpassQuantity'];
let quantity = rows[i]['quantity'];
let checkDate = rows[i]['checkDate'];
let workBy = rows[i]['workBy'];
if(!workBy){
message("第" + (i + 1) + "行请选择生产人员!");
return;
}
if(!unpassQuantity) {
message("第" + (i + 1) + "行请输入不合格数量!");
return;
}
if (!isNumber(unpassQuantity)) {
message("第" + (i + 1) + "行不合格数量必须是大于等于0的数字!");
return;
}
// if (passQuantity > quantity) {
// message("第" + (i + 1) + "行合格数量不能大于报工数量!");
// return;
// }
if (unpassQuantity > quantity) {
message("第" + (i + 1) + "行不合格数量不能大于报工数量!");
return;
}
if(!checkDate){
message("第" + (i + 1) + "行请选择质检日期!");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做保存操作吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGZL003", "save", true);
}
});
}
function selectTask(){
JSColorbox.open({
href: "HGZL003A?methodName=initLoad",
title: "<div style='text-align: center;'>选择生产任务</div>",
width: "90%",
height: "90%",
callbackName: function (row) {
var now = new Date();
row.checkDate = now.getFullYear() + "-" + now.getMonth() + "-" + now.getDay();
row.taskId = row.id;
row.id = "";
row.checkBy = loginUser[0].userId;
row.checkName = loginUser[0].userName;
row.workName = "";
row.workCode = "";
row.checkStatus = 1;
row.unpassQuantity = "";
resultGrid.addRows(row);
JSColorbox.close();
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="日常巡检单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDateSpan startCname="质检日期" endCname="到" blockId="inqu_status"
startName="checkDateFrom" endName="checkDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput blockId="inqu_status" row="0" ename="checkCode" cname="质检单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="checkName" cname="质检员" placeholder="模糊查询" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect cname="质检状态" ename="checkStatus" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.checkStatus" />
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="taskId" cname="生产任务" hidden="true"/>
<EF:EFColumn ename="checkBy" cname="质检员" hidden="true"/>
<EF:EFColumn ename="groupCode" cname="生产班组" hidden="true"/>
<EF:EFColumn ename="workName" cname="生产人员" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="taskCode" cname="生产任务单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="checkCode" cname="质检单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productCode" cname="存货编码" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productName" cname="存货名称" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="任务数量" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="checkName" cname="质检员" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="生产班组" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="workBy" cname="生产人员" width="90" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="passQuantity" cname="合格数量" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="unpassQuantity" cname="不合格数量" width="100" align="center" readonly="true" required="true"/>
<EF:EFColumn ename="checkDate" cname="质检日期" width="120" enable="true" readonly="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFComboColumn ename="checkStatus" cname="质检状态" width="80" align="center" enable="false"
readonly="true" hidden="true">
<EF:EFCodeOption codeName="hggp.checkStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
],
loadComplete: function(grid) {
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
$("#CONFIRM").on("click", function () {
let rows = resultGrid.getCheckedRows()
console.log(rows)
if (rows.length != 1) {
message("请选择一条数据 ");
return;
}
let row = rows[0];
let isInput= decodeURI(window.location.href.split("&")[1]);
if(isInput==="isInput"){
parent.JSColorbox.setValueCallback(row);
return;
};
JSUtils.confirm("确认生成质量巡检单? ", {
ok: function () {
parent.JSColorbox.setValueCallback(row);
}
});
});
});
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/10
Time: 15:29
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<EF:EFPage title="生产任务">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="班组名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="createdTime" cname="生产任务日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="completeDate" cname="生产完工日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single,row">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="groupCode" cname="生产班组" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="账套" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="createdTime" cname="生产任务日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="taskCode" cname="生产任务单号" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productCode" cname="产品编码" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productName" cname="产品名称" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="生产班组" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishWeight" cname="完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishWeight" cname="未完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="任务数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishQuantity" cname="完工数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishQuantity" cname="未完工数量" width="100" enable="false" readonly="true" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment