Commit 5f2b5322 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents 3d867afc abfd56a0
......@@ -14,14 +14,16 @@ $(function () {
title: "操作",
template: function (item) {
let template = '';
if (!isBlank(item.id)) {
if (isBlank(item.id)) {
return template;
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(\'' + item.receiveNo + '\')" >详情</a>';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showFile(\'' + item.receiveNo + '\')" >附件</a>';
if (item.status == 0 && item.source == 1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',2)" >确认收货</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateStatus(' + item.id + ',2)" >确认收货</a>';
}
return template;
}
......@@ -385,6 +387,25 @@ function windowCallback() {
JSColorbox.close();
}
/**
* 附件清单
*
* @param bizId
*/
let showFile = function (bizId) {
let params = {
"inqu_status-0-bizId": bizId,
"inqu_status-0-bizType": "PUR_RECEIVE",
}
JSColorbox.open({
href: "HGDM099",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
params: params
});
}
function updateStatus(id,status) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
......
......@@ -4,15 +4,16 @@ $(function () {
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>';
let template = "";
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + CommonUtils.previewFile(item.docId, item.docName)
+ '" target="_blank">预览</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + CommonUtils.downloadFile(item.docId, false)
+ '" target="_blank">下载</a>';
return template;
}
}],
loadComplete: function (grid) {
},
dataBound: function () {
}
}]
}
};
......@@ -43,40 +44,15 @@ var query = function (e) {
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HGDM099A",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(e) {
let res = e.response;
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-bizId", $("#inqu_status-0-bizId").val());
inEiInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val());
inEiInfo.set("result-0-docId", res.docId);
inEiInfo.set("result-0-docName", res.docName);
EiCommunicator.send('HGDM099', 'upload', inEiInfo, {
onSuccess(response) {
function uploadFile() {
let bizId = $("#inqu_status-0-bizId").val();
let bizType = $("#inqu_status-0-bizType").val();
CommonUtils.uploadFile(bizType, bizId, function (res) {
// 刷新列表
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
// 关闭弹窗
JSColorbox.close();
});
}
......
......@@ -7,10 +7,10 @@
<EF:EFPage title="附件清单">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="业务ID" ename="bizId" 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" />
<EF:EFInput cname="业务单号" ename="bizId" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
......@@ -19,6 +19,7 @@
<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="docType" cname="文件类型" enable="false" width="100"/>
<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"/>
......
......@@ -320,7 +320,8 @@ $(function () {
if (e.button !== 2) {
return
}
if ("工程设计图" === e.target.textContent || "外来制造图" === e.target.textContent || "其他" === e.target.textContent) {
if ("工程设计图" === e.target.textContent || "外来涉密图" === e.target.textContent
|| "备件制造图" === e.target.textContent || "其他" === e.target.textContent) {
$("#isAdd").css('display', 'none');
$("#isDel").css('display', 'none');
$("#isEdit").css('display', 'none');
......@@ -331,8 +332,7 @@ $(function () {
$("#isEdit").css('display', 'block');
$("#isAuth").css('display', 'block');
}
}
);
});
$("#menumenu").kendoContextMenu({
target: "#" + options.treeId,
select: function (e) {
......
......@@ -29,7 +29,11 @@
<EF:EFColumn ename="orgCname" cname="部门名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="userId" cname="用户账号" enable="false" width="100" align="center"/>
<EF:EFColumn ename="userName" cname="用户姓名" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="isProjectManager" cname="是否项目经理" width="100" align="center"
<EF:EFComboColumn ename="isProjectManager" cname="是否项目经理" width="120" align="center"
required="true" copy="true">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="downloadFlag" cname="是否可以下载" width="120" align="center"
required="true" copy="true">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFComboColumn>
......
......@@ -679,6 +679,7 @@ function loadChange(grid,e,field) {
// Base64转码
let urlEncode;
try {
docName = encodeURIComponent(docName);
urlEncode = encodeURIComponent(btoa(url + docName));
} catch (e) {
console.error("encodeURIComponent fail:", e)
......
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