提交 11bd2b46 编写于 作者: doc_wei's avatar doc_wei

feat: 公文管理完成

上级 3de9e568
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
// 加载列表数据权限
loadAuthBtnGroup('messageTable', '1714464811697');
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.admBasePath + 'queryGwSendDocumentList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'title', title: '标题', width: 300 },
{ field: 'sendDepartmentMation', title: '发文部门', width: 150, templet: function (d) {
return d.sendDepartmentMation?.name;
}},
{ field: 'year', title: '年份', align: 'center', width: 100 },
{ field: 'number', title: '第几号文', align: 'center', width: 100 },
{ field: 'enterprise', title: '企字', align: 'center', width: 100 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#messageTableBar' }
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入标题", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
// 操作事件
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'preview') {//预览
systemCommonUtil.showPicImg(systemCommonUtil.getFilePath(data.picPath));
} else if (layEvent === 'download') {//下载
download(fileBasePath + data.path, data.title);
}
});
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('gwDocumentSeeList', {});
});
......@@ -12,6 +12,9 @@ layui.config({
var serviceClassName = sysServiceMation["gwSendDocumentService"]["key"];
authBtn('1714130289379');
// 加载列表数据权限
loadAuthBtnGroup('messageTable', '1714130296761');
table.render({
id: 'messageTable',
......@@ -54,7 +57,7 @@ layui.config({
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#messageTableBar' }
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 280, toolbar: '#messageTableBar' }
]],
done: function(json) {
matchingLanguage();
......@@ -80,7 +83,11 @@ layui.config({
cancellation(data);
} else if (layEvent === 'revoke') {//撤销
revoke(data);
}
} else if (layEvent === 'preview') {//预览
systemCommonUtil.showPicImg(systemCommonUtil.getFilePath(data.picPath));
} else if (layEvent === 'download') {//下载
download(fileBasePath + data.path, data.title);
}
});
// 撤销
......@@ -149,7 +156,7 @@ layui.config({
}
});
}
// 添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="messageTableBar">
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="preview">预览</a>
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="download">下载</a>
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/gw/'}).use('gwDocumentSeeList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -32,6 +32,8 @@
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="preview">预览</a>
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="download">下载</a>
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
......
......@@ -28,7 +28,7 @@ layui.config({
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'holderMation', title: '客户', align: 'left', width: 150, templet: function (d) {
return d.holderMation.name;
return d.holderMation?.name;
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
......
......@@ -28,7 +28,7 @@ layui.config({
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'holderMation', title: '供应商', align: 'left', width: 150, templet: function (d) {
return d.holderMation.name;
return d.holderMation?.name;
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
......
......@@ -28,7 +28,7 @@ layui.config({
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'holderMation', title: '供应商', align: 'left', width: 150, templet: function (d) {
return d.holderMation.name;
return d.holderMation?.name;
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
......
......@@ -32,7 +32,7 @@ layui.config({
return str;
}},
{ field: 'holderMation', title: '供应商', align: 'left', width: 150, templet: function (d) {
return d.holderMation.name;
return d.holderMation?.name;
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
......
......@@ -28,7 +28,7 @@ layui.config({
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'holderMation', title: '供应商', align: 'left', width: 150, templet: function (d) {
return d.holderMation.name;
return d.holderMation?.name;
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
......
......@@ -74,9 +74,9 @@ layui.config({
cols: [[
{ type: 'radio'},
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'name', title: '产品名称', align: 'left',width: 150, templet: function (d) {return d.materialMation.name}},
{ field: 'model', title: '产品型号', align: 'left',width: 150, templet: function (d) {return d.materialMation.model}},
{ field: 'norms', title: '产品规格', align: 'left',width: 150, templet: function (d) {return d.normsMation.name}},
{ field: 'name', title: '产品名称', align: 'left',width: 150, templet: function (d) {return d.materialMation?.name}},
{ field: 'model', title: '产品型号', align: 'left',width: 150, templet: function (d) {return d.materialMation?.model}},
{ field: 'norms', title: '产品规格', align: 'left',width: 150, templet: function (d) {return d.normsMation?.name}},
{ field: 'operNumber', title: '数量', align: 'left', width: 80 },
{ field: 'unitPrice', title: '单价', align: 'left', width: 120 },
{ field: 'allPrice', title: '金额', align: 'left', width: 80 },
......
......@@ -28,7 +28,7 @@ layui.config({
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'holderMation', title: '客户', align: 'left', width: 150, templet: function (d) {
return d.holderMation.name;
return d.holderMation?.name;
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
......
......@@ -32,7 +32,7 @@ layui.config({
return str;
}},
{ field: 'holderMation', title: '客户', align: 'left', width: 150, templet: function (d) {
return d.holderMation.name;
return d.holderMation?.name;
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
......
......@@ -32,7 +32,7 @@ layui.config({
return str;
}},
{ field: 'holderMation', title: '客户', align: 'left', width: 150, templet: function (d) {
return d.holderMation.name;
return d.holderMation?.name;
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册