dev_oa/app/project/view/index/index.html
hdm 338038c8b4 重写上传文件的模板展示,及js方法,图片、PDF文件支持在线查看功能,其他文件下载查看,系统整体提升了文件更能的操作体验。
修复了客户模块的日志展示错误bug,发票到账模块支持上传附件功能,可以上传到账凭据等资料。
2023-04-17 23:11:29 +08:00

71 lines
2.4 KiB
HTML

{extend name="../../base/view/common/base" /}
<!-- 主体 -->
{block name="body"}
<div class="p-3">
<table class="layui-hide" id="projecttable" lay-filter="projecttable"></table>
</div>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<button class="layui-btn layui-btn-sm" lay-event="add">+ 新建项目</button>
</div>
</script>
{/block}
<!-- /主体 -->
<!-- 脚本 -->
{block name="script"}
<script>
const moduleInit = ['tool','tablePlus'];
function gouguInit() {
var table = layui.tablePlus, form = layui.form, tool = layui.tool;
layui.pageTable = table.render({
elem: '#projecttable',
toolbar: '#toolbarDemo',
title: '项目列表',
cellMinWidth: 80,
page: true, //开启分页
limit: 20,
is_excel:true,
height: 'full-24',
url: "/project/index/index", //数据接口
cols: [[
{
field: 'id', title: '项目编号', width: 80, align: 'center', fixed: 'left', rowspan: 2, templet: function (d) {
return 'P' + d.id;
}
}
, {
field: 'status', title: '状态', align: 'center', width: 70, rowspan: 2, templet: function (d) {
var html = '<span class="layui-btn layui-btn-xs layui-bg-' + d.status + '">' + d.status_name + '</span>';
return html;
}
}
, {
field: 'name', title: '项目名称',minWidth:240, rowspan: 2, templet: function (d) {
var html = '<a class="side-a" data-href="/project/index/view/id/' + d.id + '">' + d.name + '</a>';
return html;
}
}
, { field: 'plan_time', title: '项目周期', align: 'center', width: 190, rowspan: 2 }
,{field: 'step',title: '当前阶段及负责人',align: 'center',width: 140,rowspan: 2 }
, { align: 'center', title: '关联任务', colspan: 3 }
, { field: 'director_name', fixed: 'right', title: '负责人', align: 'center', width: 80, rowspan: 2 }
], [
{ field: 'tasks_unfinish', align: 'center', style: 'color: #91CC75;', width: 72, 'title': '进行中' }
, { field: 'tasks_finish', align: 'center', style: 'color: #FAC858;', width: 70, 'title': '已完成' }
, { field: 'tasks_pensent', align: 'center', style: 'color: #EE6666;', width: 72, 'title': '完成率' }
]]
});
//触发事件
table.on('toolbar(projecttable)', function(obj){
if(obj.event === 'add'){
tool.side('/project/index/add');
return;
}
});
}
</script>
{/block}
<!-- /脚本 -->