Commit 5f805854 by wancheng

app接口更新

parent c13865bd
...@@ -7,6 +7,7 @@ import com.baosight.hpjx.hp.ds.domain.HPDS002; ...@@ -7,6 +7,7 @@ import com.baosight.hpjx.hp.ds.domain.HPDS002;
import com.baosight.hpjx.hp.sc.domain.HPSC002A; import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ProjectInfo; import com.baosight.iplat4j.core.ProjectInfo;
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;
...@@ -63,9 +64,13 @@ public class ServiceHPDS002 extends ServiceEPBase { ...@@ -63,9 +64,13 @@ public class ServiceHPDS002 extends ServiceEPBase {
hpds002.setDirId(list.get(0).get("dirId").toString()); hpds002.setDirId(list.get(0).get("dirId").toString());
}*/ }*/
if(!StringUtils.isEmpty(hpds002.getCompanyCode())){
dao.insert(HPDS002.INSERT, hpds002);
}else{
DaoUtils.insert(HPDS002.INSERT, hpds002); DaoUtils.insert(HPDS002.INSERT, hpds002);
} }
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + block.getRowCount() + "]条数据新增成功!"); inInfo.setMsg("操作成功!本次对[" + block.getRowCount() + "]条数据新增成功!");
}catch (Exception e){ }catch (Exception e){
......
...@@ -417,4 +417,29 @@ public class ServiceHPMT002 extends ServiceBase { ...@@ -417,4 +417,29 @@ public class ServiceHPMT002 extends ServiceBase {
} }
} }
/**
* 生产管理-滚动图片
*
* @param inInfo
* @return
*/
public Map pmBannerList(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String companyCode = inInfo.getString("companyCode");
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
List<Map> rows = this.dao.query("HPMT002.pmBannerList", sqlMap);
resultMap.put("result",rows);
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
}
} }
...@@ -354,5 +354,10 @@ ...@@ -354,5 +354,10 @@
SELECT DISTINCT FVALUE AS "fvalue" FROM iplat.TEDCC03 WHERE FKEY='docRootDir' SELECT DISTINCT FVALUE AS "fvalue" FROM iplat.TEDCC03 WHERE FKEY='docRootDir'
</select> </select>
<select id="pmBannerList" resultClass="java.util.HashMap">
select DOC_ID from hpjx.T_HPPZ009A where 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
</select>
</sqlMap> </sqlMap>
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.ds.domain.HPDS002;
import com.baosight.hpjx.hp.pz.domain.HPPZ009A;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.FileUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ProjectInfo;
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;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPPZ009A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "banner清单",operType = "查询",operDesc = "物料清单-banner清单A-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ009A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "banner清单",operType = "查询",operDesc = "物料清单-banner清单A-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HPPZ009A.queryRun", new HPPZ009A());
} else {
inInfo = super.query(inInfo, "HPPZ009A.queryDev", new HPPZ009A());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "banner清单",operType = "新增",operDesc = "物料清单-banner清单A-新增操作")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPPZ009A hppz009A = new HPPZ009A();
hppz009A.fromMap(resultRows.get(i));
hppz009A.setCreatedBy(UserSession.getLoginName());
hppz009A.setCreatedName(UserSession.getLoginCName());
hppz009A.setCreatedTime(DateUtils.shortDateTime());
dao.insert(HPPZ009A.INSERT, hppz009A);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "banner清单",operType = "删除",operDesc = "物料清单-banner清单A-删除操作")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPPZ009A hppz009A = new HPPZ009A();
hppz009A.fromMap(resultRows.get(i));
DaoUtils.update(HPPZ009A.DELETE, hppz009A);
if (!hppz009A.getDocId().isEmpty()) {
this.delectDoc(hppz009A.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 删除文件
* @param docId 文件ID
*/
@OperationLogAnnotation(operModul = "banner清单",operType = "删除",operDesc = "删除附件文件")
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HPDS002> list = this.dao.query(HPDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HPPZ009A.FIELD_DOC_ID,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HPDS002.DELETE,map);
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-14 13:52:21
Version : 1.0
schema : hpjx
tableName : T_HPPZ009A
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR NOT NULL,
PARENT_ID BIGINT,
DOC_ID VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPPZ009A">
<sql id="column">
A.ID as "id", <!-- 主键ID -->
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.PARENT_ID as "parentId", <!-- 父级ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
</sql>
<sql id="columnDev">
<include refid="column"/>,
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnRun">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
A.PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.UPDATED_TIME = #updatedTime#
</isNotEmpty>
</sql>
<!-- 开发环境 -->
<sql id="conditionDev">
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- 正式环境 -->
<sql id="conditionRun">
AND A.DOC_ID = B.RES_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$order$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="queryDev" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002A">
SELECT
<include refid="columnDev"/>
FROM ${hpjxSchema}.T_HPPZ009A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countDev" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPPZ009A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
</select>
<select id="queryRun" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002A">
SELECT
<include refid="columnRun"/>
FROM ${hpjxSchema}.T_HPPZ009A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countRun" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPPZ009A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPPZ009A (ID, <!-- 主键ID -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
PARENT_ID, <!-- 父级ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME <!-- 修改时间 -->
)
VALUES (#id#, #companyCode#, #depCode#, #parentId#, #docId#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPPZ009A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPPZ009A
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
PARENT_ID = #parentId#, <!-- 父级ID -->
DOC_ID = #docId#, <!-- 文件ID -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -51,6 +51,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -51,6 +51,7 @@ public class ServiceHPSC001 extends ServiceBase {
false); false);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
inInfo.setStatus(500);
} }
return inInfo; return inInfo;
} }
...@@ -62,12 +63,16 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -62,12 +63,16 @@ public class ServiceHPSC001 extends ServiceBase {
@Override @Override
@OperationLogAnnotation(operModul = "销售管理",operType = "查询") @OperationLogAnnotation(operModul = "销售管理",operType = "查询")
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE, inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE,
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE))); DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE)));
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001()); inInfo=super.query(inInfo, "HPSC001.query", new HPSC001());
outInfo.addBlock(HPConstants.BLOCK_DETAIL).addBlockMeta(new HPSC002().eiMetadata); inInfo.addBlock(HPConstants.BLOCK_DETAIL).addBlockMeta(new HPSC002().eiMetadata);
return outInfo; } catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
inInfo.setStatus(500);
}
return inInfo;
} }
......
...@@ -11,7 +11,20 @@ $(function () { ...@@ -11,7 +11,20 @@ $(function () {
pageSize: 10, pageSize: 10,
pageSizes: [10, 20, 50, 70, 100], pageSizes: [10, 20, 50, 70, 100],
}, },
columns: [ columns: [{
field: "operator",
template: function (item) {
let template = '';
debugger;
// banner清单
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ',\''+item.companyCode+'\')" >banner清单</a>';
}
return template
}
},
{ {
field: "docIdPc", field: "docIdPc",
title: "PC端log", title: "PC端log",
...@@ -166,6 +179,21 @@ $(window).load(function () { ...@@ -166,6 +179,21 @@ $(window).load(function () {
query(); query();
}); });
/**
* 附件清单
*
* @param id
*/
function showUploadFile(id,companyCode) {
JSColorbox.open({
href: "HPPZ009A?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-companyCode="+companyCode,
title: "<div style='text-align: center;'>banner清单</div>",
width: "80%",
height: "80%",
});
}
/** /**
* 查询 * 查询
*/ */
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<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 ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn cname="企业编码" ename="companyCode" enable="false" width="120" height="50" align="center"/> <EF:EFColumn cname="企业编码" ename="companyCode" enable="false" width="120" height="50" align="center"/>
<EF:EFColumn cname="企业名称" ename="companyName" width="140" align="center" required="true"/> <EF:EFColumn cname="企业名称" ename="companyName" width="140" align="center" required="true"/>
<EF:EFColumn cname="登录前缀" ename="loginPrefix" width="80" align="center" readonly="true"/> <EF:EFColumn cname="登录前缀" ename="loginPrefix" width="80" align="center" readonly="true"/>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 查询
$("#BTN_DELETE").on("click", deleteFunc);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HPSC099?methodName=initLoad&inqu_status-0-matId="+$("#inqu_status-0-parentId").val()+"&inqu_status-0-companyCode="+$("#inqu_status-0-companyCode").val(),
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-parentId", $("#inqu_status-0-parentId").val());
inEiInfo.set("result-0-companyCode", $("#inqu_status-0-companyCode").val());
inEiInfo.set("result-0-docId", docId);
EiCommunicator.send('HPPZ009A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ009A", "delete", true);
}
})
}
<!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="查询区域" type="query">
<EF:EFInput cname="父级ID" ename="parentId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="企业编码" ename="companyCode" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -34,6 +34,9 @@ $(function () { ...@@ -34,6 +34,9 @@ $(function () {
result.set("result-0-realPath",docUrl); result.set("result-0-realPath",docUrl);
result.set("result-0-bizType",$("#inqu_status-0-bizType").val()); result.set("result-0-bizType",$("#inqu_status-0-bizType").val());
result.set("result-0-matId",$("#inqu_status-0-matId").val()); result.set("result-0-matId",$("#inqu_status-0-matId").val());
if(!isBlank($("#inqu_status-0-companyCode").val())){
result.set("result-0-companyCode",$("#inqu_status-0-companyCode").val());
}
EiCommunicator.send("HPDS002", "insert", result, { EiCommunicator.send("HPDS002", "insert", result, {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei.getStatus() >= 0) { if (ei.getStatus() >= 0) {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<EF:EFPage title="附件上传"> <EF:EFPage title="附件上传">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="企业编码" ename="companyCode" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result"> <EF:EFRegion id="result">
<EF:EFUpload blockId="result" ename="uploadFile" docTag="hk_file11" path="A"/> <EF:EFUpload blockId="result" ename="uploadFile" docTag="hk_file11" path="A"/>
</EF:EFRegion> </EF:EFRegion>
......
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