fourcal/src/main/resources/templates/admin/project_list.ftl

887 lines
50 KiB
Plaintext
Raw Normal View History

2021-10-29 10:15:36 +00:00
<#assign base=request.contextPath />
<#import "../common/defaultLayout.ftl" as defaultLayout>
2021-11-18 11:25:06 +00:00
2021-10-29 10:15:36 +00:00
<@defaultLayout.layout>
<link rel="stylesheet" href="../assets/css/amazeui.switch.css"/>
2022-05-05 10:08:57 +00:00
<style type="text/css">
.huanhang{
// 表格自动换行
table-layout:fixed;
word-break:break-all
}
</style>
2021-10-29 10:15:36 +00:00
<div class="admin-content">
<div class="am-cf am-padding" style="padding:1rem 1.6rem 1.6rem 1rem;margin:0px;">
<!-- padding:1px 2px 3px 4px;上、右、下,和左 -->
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">项目管理</strong> /
<small>项目管理</small>
</div>
</div>
<div class="am-g">
<div class="am-u-sm-12">
<form class="am-form" id="listForm" action="${base}/project/list" method="POST">
<input type="hidden" id="keywords" name="keywords" value='${keywords!""}'/>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr>
2022-08-12 07:55:28 +00:00
<th class="am-text-middle">项目编号</th>
<td>
<div class="am-u-sm-10">
<input type="text" id="projectNo" class="am-form-field am-input-sm"
value="${projectNo!}"/>
</div>
</td>
2021-10-29 10:15:36 +00:00
<th class="am-text-middle">项目名称</th>
<td>
<div class="am-u-sm-10">
<input type="text" id="name" class="am-form-field am-input-sm"
value="${name!}"/>
</div>
</td>
2022-08-12 07:55:28 +00:00
<th class="am-text-middle">项目状态</th>
<td>
<div class="am-u-sm-10">
<select data-am-selected id="status" name="status">
<option value="-1">全部</option>
<option value="1" <#if status?? && status='1'>selected</#if>>项目创建(概算)</option>
<option value="5" <#if status?? && status='5'>selected</#if>>预算</option>
<option value="10" <#if status?? && status='10'>selected</#if>>结算</option>
<option value="15" <#if status?? && status='15'>selected</#if>>决算</option>
</select>
</div>
</td>
2021-10-29 10:15:36 +00:00
<th class="am-text-middle">项目创建者</th>
<td>
<div class="am-u-sm-10">
<input type="text" id="creatorName" class="am-form-field am-input-sm"
value="${creatorName!}"/>
</div>
</td>
</tr>
2021-11-01 03:22:37 +00:00
2021-10-29 10:15:36 +00:00
<tr>
2022-08-12 07:55:28 +00:00
<th class="am-text-middle">是否二次合作</th>
2021-10-29 10:15:36 +00:00
<td>
<div class="am-u-sm-10">
2022-08-12 07:55:28 +00:00
<select data-am-selected id="isSecond" name="isSecond">
2021-10-29 10:15:36 +00:00
<option value="-1">全部</option>
2022-08-12 07:55:28 +00:00
<option value="1" <#if isSecond?? && isSecond='1'>selected</#if>>是</option>
<option value="2" <#if isSecond?? && isSecond='2'>selected</#if>>否</option>
2021-10-29 10:15:36 +00:00
</select>
</div>
</td>
2022-08-12 07:55:28 +00:00
<th class="am-text-middle">签单方式</th>
2021-10-29 10:15:36 +00:00
<td>
<div class="am-u-sm-10">
2022-08-12 07:55:28 +00:00
<select data-am-selected id="signType" name="signType">
2021-10-29 10:15:36 +00:00
<option value="-1">全部</option>
2022-08-12 07:55:28 +00:00
<option value="1" <#if signType?? && signType='1'>selected</#if>>紫光汇智直接投标</option>
2021-10-29 10:15:36 +00:00
</select>
</div>
</td>
2022-08-12 07:55:28 +00:00
<th class="am-text-middle">项目解决方案</th>
2021-10-29 10:15:36 +00:00
<td>
<div class="am-u-sm-10">
2022-08-12 07:55:28 +00:00
<select data-am-selected id="resolvePlan" name="resolvePlan">
2021-10-29 10:15:36 +00:00
<option value="-1">全部</option>
2022-08-12 07:55:28 +00:00
<option value="1" <#if resolvePlan?? && resolvePlan='1'>selected</#if>>公共服务(智慧交通、雪亮工程、治安防控体系等)</option>
<option value="2" <#if resolvePlan?? && resolvePlan='2'>selected</#if>>泛行业(智慧园区、智慧医疗、智慧工地等)</option>
<option value="3" <#if resolvePlan?? && resolvePlan='3'>selected</#if>>其他生态</option>
2021-10-29 10:15:36 +00:00
</select>
</div>
</td>
2021-11-01 03:22:37 +00:00
<th class="am-text-middle">审核状态</th>
<td>
<div class="am-u-sm-10">
<select data-am-selected id="approveStatus" name="approveStatus">
<option value="-1">全部</option>
2021-11-02 04:20:20 +00:00
<option value="0" <#if approveStatus?? && approveStatus='0'>selected</#if>>草稿</option>
<option value="1" <#if approveStatus?? && approveStatus='1'>selected</#if>>待审核</option>
<option value="2" <#if approveStatus?? && approveStatus='2'>selected</#if>>审核通过</option>
<option value="3" <#if approveStatus?? && approveStatus='3'>selected</#if>>审核不通过</option>
2021-11-01 03:22:37 +00:00
</select>
</div>
</td>
</tr>
<tr>
2022-08-12 07:55:28 +00:00
<th class="am-text-middle">部门名称</th>
<td>
<div class="am-u-sm-10">
<select data-am-selected id="deptId" name="deptId">
<option value="-1">全部</option>
<#list deptList as dept>
<option value=${dept.id!} <#if deptId! =="${dept.id}" >
selected
</#if>>${dept.name!}</option>
</#list>
</select>
</div>
</td>
<th class="am-text-middle">项目类型</th>
<td>
<div class="am-u-sm-10">
<select data-am-selected id="type" name="type">
<option value="-1">全部</option>
<option value="1" <#if type?? && type='1'>selected</#if>>工程集成类</option>
<option value="2" <#if type?? && type='2'>selected</#if>>设备集成类</option>
<option value="3" <#if type?? && type='3'>selected</#if>>战略合作类</option>
</select>
</div>
</td>
<th class="am-text-middle">垫资模式</th>
<td>
<div class="am-u-sm-10">
<select data-am-selected id="underwrittenMode" name="underwrittenMode">
<option value="-1">全部</option>
<option value="1" <#if underwrittenMode?? && underwrittenMode='1'>selected</#if>>A类-不垫资(战略合作)</option>
<option value="2" <#if underwrittenMode?? && underwrittenMode='2'>selected</#if>>B类-不垫资(背靠背)</option>
<option value="3" <#if underwrittenMode?? && underwrittenMode='3'>selected</#if>>C类-垫资(账期覆盖)</option>
<option value="4" <#if underwrittenMode?? && underwrittenMode='4'>selected</#if>>D类-垫资(账期不覆盖)</option>
</select>
</div>
</td>
<th class="am-text-middle">项目把握度</th>
<td>
<div class="am-u-sm-10">
<select data-am-selected id="certainty" name="certainty">
<option value="-1">全部</option>
<option value="1" <#if certainty?? && certainty='1'>selected</#if>>A基本确定中标待签合同合同签订中</option>
<option value="2" <#if certainty?? && certainty='2'>selected</#if>>B客户产品参数、商务评分、商务资质引导成功</option>
<option value="3" <#if certainty?? && certainty='3'>selected</#if>>C项目初期引导阶段</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="am-text-middle">行业场景应用</th>
<td>
<div class="am-u-sm-10">
<input type="text" id="industryScenario" class="am-form-field am-input-sm"
value="${industryScenario!}"/>
</div>
</td>
<th class="am-text-middle">客户名称</th>
<td>
<div class="am-u-sm-10">
<input type="text" id="customer" class="am-form-field am-input-sm"
value="${customer!}"/>
</div>
</td>
<th class="am-text-middle">终端客户名称</th>
<td>
<div class="am-u-sm-10">
<input type="text" id="terminalCustomer" class="am-form-field am-input-sm"
value="${terminalCustomer!}"/>
</div>
</td>
<th class="am-text-middle">项目负责人</th>
<td>
<div class="am-u-sm-10">
<input type="text" id="principal" class="am-form-field am-input-sm"
value="${principal!}"/>
</div>
</td>
</tr>
<tr>
<th class="am-text-middle">最后更新时间</th>
<td>
<div class="am-u-sm-10">
<div class="am-form am-form-inline">
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="startUpdateDate"
value="${startUpdateDate!}" placeholder="开始日期" autocomplete="off" data-am-datepicker>
</div>
<div class="am-form-group">至</div>
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="endUpdateDate"
value="${endUpdateDate!}" placeholder="结束日期" autocomplete="off" data-am-datepicker>
</div>
</div>
</div>
</td>
2021-11-01 03:22:37 +00:00
<th class="am-text-middle">项目周期</th>
2021-11-08 08:27:33 +00:00
<td>
2021-11-01 03:22:37 +00:00
<div class="am-u-sm-10">
<div class="am-form am-form-inline">
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="startDate"
2021-11-22 02:32:36 +00:00
value="${startDate!}" placeholder="开始日期" autocomplete="off" data-am-datepicker>
2021-11-01 03:22:37 +00:00
</div>
<div class="am-form-group">至</div>
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
<input type="text" class="am-form-field am-input-sm" id="endDate"
2021-11-22 02:32:36 +00:00
value="${endDate!}" placeholder="结束日期" autocomplete="off" data-am-datepicker>
2021-11-01 03:22:37 +00:00
</div>
</div>
</div>
</td>
2022-08-12 07:55:28 +00:00
<th class="am-text-middle">预计合同签订时间</th>
2021-11-08 08:27:33 +00:00
<td>
<div class="am-u-sm-10">
<div class="am-form am-form-inline">
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
2022-08-12 07:55:28 +00:00
<input type="text" class="am-form-field am-input-sm" id="contractStartTime"
value="${contractStartTime!}" placeholder="开始日期" autocomplete="off" data-am-datepicker>
2021-11-08 08:27:33 +00:00
</div>
<div class="am-form-group">至</div>
<div class="am-form-group am-form-icon">
<i class="am-icon-calendar"></i>
2022-08-12 07:55:28 +00:00
<input type="text" class="am-form-field am-input-sm" id="contractEndTime"
value="${contractEndTime!}" placeholder="结束日期" autocomplete="off" data-am-datepicker>
2021-11-08 08:27:33 +00:00
</div>
</div>
</div>
</td>
2022-08-12 07:55:28 +00:00
<td colspan="2">
2021-10-29 10:15:36 +00:00
<div align='right'>
2021-11-01 03:22:37 +00:00
<@shiro.hasPermission name="PROJECT_QUERY">
2021-10-29 10:15:36 +00:00
<button type="button" class="am-btn am-btn-default am-btn-sm am-text-secondary"
id="submit-btn">搜索
</button>
2021-11-01 03:22:37 +00:00
</@shiro.hasPermission>
<@shiro.hasPermission name="PROJECT_EXPORT">
2021-10-29 10:15:36 +00:00
<button type="button" class="am-btn am-btn-default am-btn-sm am-text-secondary"
id="submit-btn-export">导出
</button>
2021-11-01 03:22:37 +00:00
</@shiro.hasPermission>
2021-10-29 10:15:36 +00:00
</div>
</td>
</tr>
</tbody>
</table>
</form>
</div>
<div class="am-u-sm-12 am-u-md-12" style="padding:0 1.6rem 1.6rem 1rem;margin:0;">
<div class="am-btn-toolbar" style="padding-left:.5rem;">
<div class="am-btn-group am-btn-group-xs">
<@shiro.hasPermission name="PROJECT_ADD">
<button type="button" class="am-btn am-btn-default"
onclick="location.href='${base}/project/add'">
<span class="am-icon-plus"></span> 新增
</button>
</@shiro.hasPermission>
2021-11-08 08:55:37 +00:00
<@shiro.hasPermission name="PROJECT_APPROVE">
<button type="button" class="am-btn am-btn-default"
onclick="location.href='${base}/project/listApprove'">
2021-11-08 09:32:25 +00:00
<span class="am-icon-pencil"></span> 待我审核的项目
2021-11-08 08:55:37 +00:00
</button>
</@shiro.hasPermission>
2021-10-29 10:15:36 +00:00
</div>
</div>
</div>
</div>
<div class="am-g">
<div class="am-u-sm-12">
<div class="am-scrollable-horizontal">
<table class="am-table am-table-striped am-table-hover table-main">
<thead>
<tr class="am-text-nowrap">
<th class="table-title">序号</th>
2022-07-20 09:16:21 +00:00
<th class="table-title">项目编号</th>
2021-10-29 10:15:36 +00:00
<th class="table-title">项目名称</th>
<th class="table-title">项目类型</th>
2022-08-16 08:02:09 +00:00
<th class="table-title">垫资模式</th>
2022-08-16 08:24:10 +00:00
<th class="table-title">垫资利息</th>
<th class="table-title">垫资峰值</th>
2022-07-20 09:16:21 +00:00
<th class="table-title">项目合同金额</th>
2022-08-16 08:24:10 +00:00
<th class="table-title">项目毛利</th>
<th class="table-title">项目毛利率</th>
<th class="table-title">项目状态</th>
2022-08-12 07:55:28 +00:00
<th class="table-title">汇智产品金额</th>
2022-08-16 08:24:10 +00:00
<th class="table-title">华智产品金额</th>
2022-08-12 07:55:28 +00:00
<th class="table-title">华三产品金额</th>
2022-07-20 09:16:21 +00:00
<th class="table-title">其他产品金额</th>
2022-08-12 07:55:28 +00:00
<th class="table-title">项目把握度</th>
<th class="table-title">行业场景应用</th>
<th class="table-title">客户名称</th>
<th class="table-title">终端客户名称</th>
<th class="table-title">项目负责人</th>
<th class="table-title">预计合同签订时间</th>
<th class="table-title">项目计划招标时间</th>
<th class="table-title">是否二次合作</th>
<th class="table-title">签单方式</th>
2022-08-16 08:24:10 +00:00
<th class="table-title">合作对象</th>
2021-10-29 10:15:36 +00:00
<th class="table-title">审核状态</th>
<th class="table-title">当前审核人</th>
<th class="table-title">项目创建者</th>
<th class="table-title">部门名称</th>
<th class="table-title">项目周期</th>
2021-11-08 08:27:33 +00:00
<th class="table-title">最后更新时间</th>
2021-10-29 10:15:36 +00:00
<th class="table-title">操作</th>
</tr>
</thead>
<tbody>
2021-11-19 07:21:57 +00:00
<#list pager.list as list>
2021-10-29 10:15:36 +00:00
<tr>
2022-07-20 09:16:21 +00:00
<td>${list.tempId!}</td>
2022-07-22 08:50:33 +00:00
<td class="huanhang">${list.projectNo!}</td>
2022-05-05 10:08:57 +00:00
<td class="huanhang"><a style="cursor: pointer;text-decoration:none" onclick="location.href='${base}/project/approve?listFrom=list&type=1&id=${list.id}'">${list.name!}</a></td>
2021-10-29 10:15:36 +00:00
<td>${list.typeDesc!}</td>
2022-08-16 08:02:09 +00:00
<td>${list.underwrittenModeStr!}</td>
2022-08-16 08:24:10 +00:00
<td>${Utils.format(list.advanceInterestAmount, "0.00")}</td>
<td>${Utils.format(list.advancePeakAmount, "0.00")}</td>
2022-07-21 06:34:18 +00:00
<td>${Utils.format(list.contractAmount, "0.00")}</td>
2022-08-16 08:24:10 +00:00
<td>${Utils.format(list.grossProfit, "0.00")}</td>
<td>${Utils.format(list.grossProfitMargin, "0.00")}</td>
<td>${list.statusDesc!}</td>
2022-08-12 07:55:28 +00:00
<td>${Utils.format(list.huizhiProductAmount, "0.00")}</td>
2022-08-16 08:24:10 +00:00
<td>${Utils.format(list.huazhiProductAmount, "0.00")}</td>
2022-08-12 07:55:28 +00:00
<td>${Utils.format(list.huasanProductAmount, "0.00")}</td>
2022-07-21 06:34:18 +00:00
<td>${Utils.format(list.ziguangOtherAmount, "0.00")}</td>
2022-08-12 07:55:28 +00:00
<td>${list.certaintyStr!}</td>
<td>${list.industryScenario!}</td>
<td>${list.customer!}</td>
<td>${list.terminalCustomer!}</td>
<td>${list.principal!}</td>
2022-08-15 02:15:21 +00:00
<td>${(list.contractTime?string("yyyy-MM-dd HH:mm:ss"))!}</td>
<td>${(list.bidsTime?string("yyyy-MM-dd HH:mm:ss"))!}</td>
2022-08-12 07:55:28 +00:00
<td>${list.isSecondStr!}</td>
<td>${list.signTypeStr!}</td>
2022-08-16 08:24:10 +00:00
<td>${list.collaborator!}</td>
2021-10-29 10:15:36 +00:00
<td>${list.approveStatusDesc!}</td>
<td>${list.approveName!}</td>
<td>${list.creatorName!}</td>
<td>${list.deptName!}</td>
2022-08-15 02:15:21 +00:00
<td>${(list.startDate?string("yyyy-MM"))!} ~ ${(list.endDate?string("yyyy-MM"))!}</td>
<td>${(list.lastUpdateTime?string("yyyy-MM-dd HH:mm:ss"))!}</td>
2021-10-29 10:15:36 +00:00
<td>
2021-11-01 13:09:10 +00:00
<div class="am-btn-toolbar">
<div class="am-btn-group am-btn-group-xs">
<#if adminId==1>
2021-11-19 07:21:57 +00:00
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/selectRoleUser?projectId=${list.id}'"><span class="am-icon-pencil-square-o"></span>设置项目可见性
</button>
</#if>
2022-07-20 09:16:21 +00:00
2022-08-10 00:55:46 +00:00
<#if adminId==1 && !list.projectNo??>
2022-07-20 09:16:21 +00:00
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
2022-07-20 17:32:27 +00:00
onclick="projectNo(${list.id})"><span class="am-icon-pencil-square-o"></span>填写项目编号
2022-07-20 09:16:21 +00:00
</button>
</#if>
2022-08-04 09:00:23 +00:00
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/exportAll?id=${list.id}'"><span class="am-icon-pencil-square-o"></span>导出总表
</button>
2021-11-18 08:22:56 +00:00
<#--<@shiro.hasPermission name="PROJECT_EDIT">-->
<#-- 项目等于概算状态、概算审核为草稿和不通过状态-->
2021-11-26 08:43:47 +00:00
<#if list.creatorId==adminId && list.status==1 && (list.approveStatusEstimate==0 || list.approveStatusEstimate==3)>
2021-11-01 13:09:10 +00:00
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/edit?id=${list.id}'"><span
2021-11-18 08:07:33 +00:00
class="am-icon-pencil-square-o"></span>编辑概算
2021-11-01 13:09:10 +00:00
</button>
2021-11-18 08:22:56 +00:00
</#if>
2021-11-16 03:39:33 +00:00
<#-- 项目等于概算状态、概算审核为草稿状态-->
<#if list.creatorId==adminId && list.status==1 && list.approveStatusEstimate==0>
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="deleteProject('${list.id}')"><span
class="am-icon-pencil-square-o"></span>删除
</button>
</#if>
2021-11-12 08:58:41 +00:00
<#-- </@shiro.hasPermission>
<@shiro.hasPermission name="PROJECT_EDIT">-->
2021-12-07 07:57:41 +00:00
<#-- 概算审核等于通过状态、预算审核不等于待审核状态、 项目不等于决算状态-->
<#if list.creatorId==adminId && list.approveStatusEstimate=2 && list.approveStatusBudget!=1 && list.status!=15 >
2021-11-02 06:43:42 +00:00
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/budgetEdit?id=${list.id}'"><span
class="am-icon-pencil-square-o"></span>填写预算表
</button>
2021-11-18 08:22:56 +00:00
</#if>
2021-11-18 08:07:33 +00:00
<#-- </@shiro.hasPermission>-->
2021-11-17 03:14:52 +00:00
<#-- 项目等于预算状态、预算审核等于通过状态 -->
2021-11-30 03:38:13 +00:00
<#if admin.getRoleLevel() == 6 && ((list.status==5 && list.approveStatusBudget=2) || (list.status=10 && list.approveStatusSettle=2)) >
2021-11-17 03:14:52 +00:00
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/settle/add?id=${list.id}'"><span
class="am-icon-pencil-square-o"></span>填写结算表
</button>
2021-11-17 13:52:40 +00:00
</#if>
<#-- 项目等于结算状态、结算审核不等于待审核状态-->
2021-11-30 03:38:13 +00:00
<#if admin.getRoleLevel() = 6 && list.status==10 && list.approveStatusSettle!=1>
2021-11-17 13:52:40 +00:00
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/settle/edit?id=${list.id}'"><span
class="am-icon-pencil-square-o"></span>编辑结算表
</button>
2021-11-17 03:14:52 +00:00
</#if>
<#-- 项目等于结算状态、结算审核等于通过状态 -->
2021-11-30 03:38:13 +00:00
<#if (admin.getRoleLevel() = 2 || admin.getRoleLevel() = 6) && (list.status== 10 && list.approveStatusSettle==2) >
2021-11-17 06:49:11 +00:00
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
2021-11-18 07:19:13 +00:00
onclick="location.href='${base}/project/final/add?id=${list.id}'"><span
2021-11-17 06:49:11 +00:00
class="am-icon-pencil-square-o"></span>发起决算
</button>
</#if>
2021-11-17 03:14:52 +00:00
<#-- 项目等于决算状态、决算审核不等于待审核状态、 决算审核不等于通过状态-->
2021-11-30 03:38:13 +00:00
<#if (admin.getRoleLevel() = 2 || admin.getRoleLevel() = 6) && list.status== 15 && list.approveStatusFinal!=1 && list.approveStatusFinal!=2 >
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/final/edit?id=${list.id}'"><span
class="am-icon-pencil-square-o"></span>编辑决算
</button>
</#if>
2021-11-18 07:19:13 +00:00
2021-11-19 08:58:28 +00:00
<#--<button type="button"
2021-11-18 07:19:13 +00:00
class="am-btn am-btn-default am-btn-xs am-text-secondary"
2021-11-13 08:21:52 +00:00
onclick="location.href='${base}/project/detail?id=${list.id}'"><span
class="am-icon-pencil-square-o"></span>查看
2021-11-19 08:58:28 +00:00
</button>-->
<#if (list.creatorId==adminId && list.approveStatusEstimate == 0) || (list.creatorId==adminId && list.approveStatusBudget == 0) || (admin.getRoleLevel() = 6 && list.approveStatusSettle == 0 && list.approveStatusBudget == 2) || ((admin.getRoleLevel() = 2 || admin.getRoleLevel() = 6) && list.approveStatusFinal == 0)>
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="approveProject(${list.id})"><span
class="am-icon-pencil-square-o"></span>提交审核
</button>
</#if>
2021-11-16 03:39:33 +00:00
2021-11-23 09:32:08 +00:00
<#if adminId==list.approveId>
2021-11-16 03:39:33 +00:00
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
2022-04-12 09:10:48 +00:00
onclick="location.href='${base}/project/approve?listFrom=list&type=1&id=${list.id}'"><span
2021-11-16 03:39:33 +00:00
class="am-icon-pencil-square-o"></span>审核
</button>
</#if>
2022-08-16 08:48:29 +00:00
<#--预算状态 待审核状态 -->
<#if list.status==5 && list.approveStatusBudget==1 && list.actTaskName! != "执行董事" >
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="openHuiqianModal(${list.id}, '${list.name}')"><span class="am-icon-pencil-square-o"></span>会签
</button>
</#if>
2021-11-15 08:53:43 +00:00
2021-11-17 03:14:52 +00:00
<#if list.approveStatusEstimate != 0 >
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/taskRecords/${list.id?c}'"><span
class="am-icon-pencil-square-o"></span>查看审核流程
</button>
</#if>
2021-11-15 08:53:43 +00:00
2021-11-01 13:09:10 +00:00
</div>
</div>
2021-10-29 10:15:36 +00:00
</td>
</tr>
</#list>
</tbody>
</table>
</div>
<div class="am-cf">
<!-- 分页 -->
<#if (pager.list)?exists && (pager.list?size>0) >
<div class="am-fr">
2022-07-20 09:16:21 +00:00
<#include "../common/project_pager.ftl">
2021-10-29 10:15:36 +00:00
</div>
<#else>
<div class="am-kai" align="center">
<h3>没有找到任何记录!</h3>
</div>
</#if>
</div>
</div>
</div>
2021-11-18 11:25:06 +00:00
2021-11-19 06:47:59 +00:00
<#--<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt-select-role-user">
2021-11-18 11:25:06 +00:00
<div class="am-modal-dialog">
<div class="am-modal-hd">请选择项目可见性</div>
<div class="am-modal-bd">
请勾选能够看到该项目的人员或角色
<ul id="treeSelectRoleUser" class="ztree"></ul>
</div>
<div class="am-modal-footer">
<span class="am-modal-btn" data-am-modal-cancel>取消</span>
<span class="am-modal-btn" data-am-modal-confirm>提交</span>
</div>
</div>
2021-11-19 06:47:59 +00:00
</div>-->
2021-11-18 11:25:06 +00:00
2021-10-29 10:15:36 +00:00
<footer class="admin-content-footer">
<hr>
</footer>
</div>
2022-07-20 17:32:27 +00:00
<!-- 模态框Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">您正在编辑项目编号</h4>
</div>
<div>
2022-07-22 08:43:38 +00:00
<input type="text" id="newProjectNo" class="am-modal-prompt-input" placeholder="请输入项目编号" maxlength="50"/>
2022-07-20 17:32:27 +00:00
<input type="hidden" id="modelId" name="keywords" value=''/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" data-am-modal-cancel>关闭</button>
<button type="button" class="btn btn-primary" data-am-modal-confirm onclick="projectNoCheck('')">提交</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
<!-- /.modal -->
2022-08-16 08:48:29 +00:00
<#--会签弹窗-->
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">您正在进行项目会签,请确认该操作</h4>
<h5 class="modal-title" id="myModalLabel">项目名称:<span id="hqProjectName" style="color: red"></span></h5>
</div>
<input type="hidden" id="hqProjectId" name="hqProjectId" value=''/>
<div class="am-g am-form-group am-margin-top" style="display: flex;">
<div class="am-u-sm-4 am-u-md-4 am-text-right">
<span style="color: red;">*</span>请输入会签意见</div>
<div class="am-u-sm-6 am-u-md-6">
<textarea id="doc-vld-ta-2" minlength="10" maxlength="100"></textarea>
</div>
<div class="am-u-sm-2 am-u-md-2 input-msg"></div>
</div>
<div>
<div class="am-g am-form-group am-margin-top">
<div class="am-u-sm-4 am-u-md-4 am-text-right"><span style="color: red;">*</span>请上传会签单</div>
<div class="am-u-sm-6 am-u-md-6">
<input type="text" id="icon" name="icon" maxlength="500"
value="" required
placeholder="格式gif|jpg|jpeg|png|pdf"/>
</div>
<div class="am-form-file am-text-xs">
<button type="button" class="am-btn am-btn-primary am-btn-sm">
<i class="am-icon-cloud-upload"></i> 上传
</button>
<input id="fileupload_button_icon" type="file" name="files[]" multiple>
</div>
<!-- The global progress bar -->
<div id="progress-area-icon" class="am-margin-top-sm am-hide">
<div id="progress-text-icon" class="am-text-xs am-text-right"></div>
<div id="progress" class="am-progress am-progress-xs">
<div class="am-progress-bar" style="width: 0%"></div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" data-am-modal-cancel>关闭</button>
<button type="button" class="btn btn-primary" data-am-modal-confirm onclick="huiQian()">提交</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
<!-- /.modal -->
2021-10-29 10:15:36 +00:00
</@defaultLayout.layout>
2022-07-20 17:32:27 +00:00
<script type="text/javascript" src="../modal/js/modal.js"></script>
2021-10-29 10:15:36 +00:00
<script src="../assets/js/amazeui.switch.js"></script>
2021-11-18 11:25:06 +00:00
<script src="${base}/assets/js/project_common.js"></script>
2022-08-16 08:48:29 +00:00
<script src="${base}/common/jQuery-File-Upload/js/vendor/jquery.ui.widget.js"></script>
<script type="text/javascript" src="${base}/common/jQuery-File-Upload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="${base}/common/jQuery-File-Upload/js/jquery.fileupload.js"></script>
<script src="${base}/common/jQuery-File-Upload/js/jquery.fileupload-process.js"></script>
<script src="${base}/common/jQuery-File-Upload/js/jquery.fileupload-validate.js"></script>
2021-10-29 10:15:36 +00:00
<script type="text/javascript">
2021-12-29 02:49:01 +00:00
var approveProject = function (id) {
if (window.confirm('确定要提交审核吗?')) {
$.ajax({
url: '${base}/project/saveApprove',
2021-12-29 02:49:01 +00:00
data: {id:id},
dataType: "json",
async: false,
success: function (data) {
if (data.status == 0) {
alert(data.msg);
window.location.href = window.location.href;
} else if (data.status == 1) {
alert(data.msg);
}
}
});
}
};
2021-10-29 10:15:36 +00:00
$(function () {
$("#submit-btn").on("click", function () {
$("#pageNumber").val(1);
2021-11-02 01:39:33 +00:00
setKeywords();
$("#listForm").attr("action","${base}/project/list");
$("#listForm").submit();
});
$("#submit-btn-export").on("click", function () {
setKeywords();
$("#listForm").attr("action","${base}/project/export");
$("#listForm").submit();
});
function setKeywords() {
var keywordsObj = {};
2022-08-12 07:55:28 +00:00
if ($("#projectNo").val())
keywordsObj.projectNo = $("#projectNo").val();
2021-10-29 10:15:36 +00:00
if ($("#name").val())
keywordsObj.name = $("#name").val();
if ($("#creatorName").val())
keywordsObj.creatorName = $("#creatorName").val();
if ($("#status").val())
keywordsObj.status = $("#status").val();
2022-08-12 07:55:28 +00:00
if ($("#isSecond").val())
keywordsObj.isSecond = $("#isSecond").val();
if ($("#signType").val())
keywordsObj.signType = $("#signType").val();
if ($("#resolvePlan").val())
keywordsObj.resolvePlan = $("#resolvePlan").val();
2021-10-29 10:15:36 +00:00
if ($("#approveStatus").val())
keywordsObj.approveStatus = $("#approveStatus").val();
if ($("#deptId").val())
keywordsObj.deptId = $("#deptId").val();
if ($("#type").val())
keywordsObj.type = $("#type").val();
2022-08-12 07:55:28 +00:00
if ($("#underwrittenMode").val())
keywordsObj.underwrittenMode = $("#underwrittenMode").val();
if ($("#certainty").val())
keywordsObj.certainty = $("#certainty").val();
if ($("#industryScenario").val())
keywordsObj.industryScenario = $("#industryScenario").val();
if ($("#customer").val())
keywordsObj.customer = $("#customer").val();
if ($("#terminalCustomer").val())
keywordsObj.terminalCustomer = $("#terminalCustomer").val();
if ($("#principal").val())
keywordsObj.principal = $("#principal").val();
if ($("#startDate").val())
keywordsObj.startDate = $("#startDate").val();
if ($("#endDate").val())
keywordsObj.endDate = $("#endDate").val();
2021-11-08 08:27:33 +00:00
if ($("#startUpdateDate").val())
keywordsObj.startUpdateDate = $("#startUpdateDate").val();
if ($("#endUpdateDate").val())
2021-11-08 08:30:41 +00:00
keywordsObj.endUpdateDate = $("#endUpdateDate").val();
2022-08-12 07:55:28 +00:00
if ($("#contractStartTime").val())
keywordsObj.contractStartTime = $("#contractStartTime").val();
if ($("#contractEndTime").val())
keywordsObj.contractEndTime = $("#contractEndTime").val();
2021-10-29 10:15:36 +00:00
var keywords = "";
if (!$.isEmptyObject(keywordsObj)) {
keywords = JSON.stringify(keywordsObj);
}
console.log("keywords = " + keywords);
$("#keywords").val(keywords);
2021-11-02 01:39:33 +00:00
}
2021-10-29 10:15:36 +00:00
2022-08-16 08:48:29 +00:00
generateFileupload("icon");
2021-10-29 10:15:36 +00:00
});
2022-08-16 08:48:29 +00:00
//会签
var huiQian = function () {
var projectId = $("#hqProjectId").val();
var fileUrl = $("#icon").val();
if (fileUrl == '') {
alert("请上传会签单");
return;
}
var message = $("#doc-vld-ta-2").val();
if (message == '') {
alert("请填写会签意见");
return;
}
var params = {
message: message,
fileUrl: fileUrl
};
$.ajax({
url: '${base}/project/skipTask/' + projectId,
data: JSON.stringify(params),
dataType: "json",
contentType: "application/json",
type: 'post',
async: false,
success: function (data) {
if (data.status == 0) {
alert(data.msg);
window.location.href=window.location.href;
} else if (data.status == 1) {
alert(data.msg);
}
}
});
};
//上传会签单
var generateFileupload = function (name) {
var progressArea = $("#progress-area-" + name);//div
var progressText = $("#progress-text-" + name);//进度条提示
var progressBar = $(".am-progress-bar");//进度条
console.info(name);
$("#fileupload_button_" + name).fileupload({
url: "${base}/file/upload",
dataType: 'json',
acceptFileTypes: /(\.|\/)(gif|jpe?g|png|pdf)$/i,
maxFileSize: 20 * 1024 * 1024,
maxNumberOfFiles: 1,
messages: {
maxFileSize: '最大允许上传的图片大小为20M',
acceptFileTypes: '文件格式不正确请上传gif、jpg、jpeg、png、pdf类型的图片文件'
},
start: function (e) {
progressArea.removeClass("am-hide");
progressText.removeClass("am-text-danger");
progressText.html("");
progressBar.css("width", "0%");
},
done: function (e, data) {
console.log("--data-->"+ JSON.stringify(data.result.data));
//设置服务器返回的url
$("#" + name).val(data.result.data.url);
setTimeout(function () {
progressArea.addClass("am-hide");
}, 1500);
},
progressall: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
console.log(progress);
progressBar.css("width", progress + "%");
progressText.html(progress + "%");
},
error: function (jqXHR2, textStatus, errorThrown) {
progressArea.removeClass("am-hide");
progressText.addClass("am-text-danger");
progressText.html("imageupload error");
progressBar.css("width", "0%");
setTimeout(function () {
progressArea.addClass("am-hide");
}, 2000);
},
fail: function (jqXHR2, textStatus) {
progressArea.removeClass("am-hide");
progressText.addClass("am-text-danger");
progressText.html("imageupload fail");
progressBar.css("width", "0%");
setTimeout(function () {
progressArea.addClass("am-hide");
}, 2000);
},
processfail: function (e, data) {
var currentFile = data.files[data.index];
if (data.files.error && currentFile.error) {
parent.layer.msg(currentFile.error);
}
}
});
};
var deleteProject = function (id) {
if (window.confirm('确定要删除此项目吗?')) {
$.ajax({
url: '${base}/project/deleteProject/' + id,
dataType: "json",
async: false,
success: function (data) {
if (data.status == 0) {
alert(data.msg);
window.location.href = window.location.href;
} else if (data.status == 1) {
alert(data.msg);
}
}
});
}
2021-12-29 02:49:01 +00:00
};
2022-07-20 17:32:27 +00:00
var projectNo = function(id) {
console.log("~~~~~~~~~~~~~"+id);
$("#modelId").val(id);
// $('#myModal').modal('show');
$('#myModal').modal({
relatedElement: this,
onConfirm: function(id) {
console.log("提交");
projectNoCheck(id);
},
onCancel: function() {
console.log("取消");
}
});
};
2022-08-16 08:48:29 +00:00
var openHuiqianModal = function(id, name) {
console.log("~~~~~~~~~~~~~"+id);
$("#hqProjectId").val(id);
$("#hqProjectName").html(name);
$('#myModal2').modal({
relatedElement: this,
onConfirm: function(id) {
console.log("提交");
projectNoCheck(id);
},
onCancel: function() {
console.log("取消");
}
});
};
2022-07-20 17:32:27 +00:00
var projectNoCheck = function () {
var newProjectNo = $("#newProjectNo").val();
var id = $("#modelId").val();
$.ajax({
url: "${base}/project/editProjectNo?projectNo=" + newProjectNo + "&id=" + id,
type: "get",
dataType: "json",
async: false,
success: function (data) {
alert(data.msg);
window.location.href=window.location.href;
}
});
};
2021-10-29 10:15:36 +00:00
</script>