优化项目文档搜索项所属项目的选择操作

This commit is contained in:
HDM58\hdm58 2024-01-15 17:18:40 +08:00
parent 0a21a1b738
commit 5e74ebd8af
3 changed files with 13 additions and 16 deletions

View File

@ -11,13 +11,9 @@
<div id="documentList" class="p-3">
<div class="gg-form-bar border-t border-x">
<form id="documentForm" class="layui-form">
<div class="layui-input-inline" style="width:200px;">
<select name="project_id" lay-filter="project">
<option value="">所属项目</option>
{volist name="project" id="vo"}
<option value="{$vo.id}">{$vo.name}</option>
{/volist}
</select>
<div class="layui-input-inline" style="width:240px;">
<input type="text" name="project_name" placeholder="所属项目" readonly class="layui-input picker-project" autocomplete="off" />
<input name="project_id" style="display: none;" value="" />
</div>
<div class="layui-input-inline" style="width:300px;">
<input type="text" name="keywords" placeholder="关键字" class="layui-input" autocomplete="off" />
@ -41,15 +37,16 @@
<!-- 脚本 -->
{block name="script"}
<script>
const moduleInit = ['tool'];
const moduleInit = ['tool','tablePlus','oaTool'];
function gouguInit() {
var table = layui.table, form = layui.form, tool = layui.tool;
var table = layui.tablePlus, form = layui.form, tool = layui.tool;
layui.documentTable = table.render({
elem: '#document',
title: '文档列表',
toolbar: '#toolbarDemo',
defaultToolbar: false,
defaultToolbar:false,
is_excel:true,
cellMinWidth: 80,
url: "/project/document/index",
page: true, //开启分页
@ -66,7 +63,7 @@
return html;
}
}
, { field: 'project_name', title: '关联项目', width: 200,}
, { field: 'project_name', title: '关联项目', width: 300,}
, { field: 'admin_name', title: '创建人', align: 'center', width: 80 }
, { field: 'create_time', title: '创建时间', align: 'center', width: 132 }
,{

View File

@ -39,7 +39,7 @@ function project_task(){
var html = '<span class="layui-badge layui-bg-'+d.priority+'">'+d.priority_name+'</span> <a class="side-a" lay-event="detail">'+d.title+'</a>';
return html;
}}
, { field: 'before_task', title: '前置任务编号',align: 'center', width: 100, templet: function (d) {
, { field: 'before_task', title: '前置任务编号',align: 'center', width: 110, templet: function (d) {
var html = '-';
if(d.before_task > 0){
html = '<a class="blue" lay-event="before" style="cursor:pointer">T' + d.before_task + '</a>';
@ -47,7 +47,7 @@ function project_task(){
return html;
}
}
, { field: 'after_num', title: '后置任务数', align: 'center',width: 90, templet: function (d) {
, { field: 'after_num', title: '后置任务数', align: 'center',width: 100, templet: function (d) {
var html = '-';
if(d.after_num > 0){
html = '<a class="blue" lay-event="more" style="cursor:pointer;">'+d.after_num+'</a>';

View File

@ -101,7 +101,7 @@
return html;
}
}
, { field: 'before_task', title: '前置任务编号',align: 'center', width: 100, templet: function (d) {
, { field: 'before_task', title: '前置任务编号',align: 'center', width: 110, templet: function (d) {
var html = '-';
if(d.before_task > 0){
html = '<a class="side-a" data-href="/project/task/view/id/' + d.before_task + '">T' + d.before_task + '</a>';
@ -109,7 +109,7 @@
return html;
}
}
, { field: 'after_num', title: '后置任务数', align: 'center',width: 90, templet: function (d) {
, { field: 'after_num', title: '后置任务数', align: 'center',width: 100, templet: function (d) {
var html = '-';
if(d.after_num > 0){
html = '<a class="blue" lay-event="more" style="cursor:pointer;">'+d.after_num+'</a>';
@ -120,7 +120,7 @@
return html;
}
}
, { field: 'project_name', title: '关联项目', width: 200 }
, { field: 'project_name', title: '关联项目', width: 300 }
, { field: 'director_name', title: '负责人', align: 'center', width: 80 }
, { field: 'assist_admin_names', title: '协作人', width: 200 }
, { field: 'plan_hours', title: '预估工时', align: 'center', width: 80 }