|
@@ -0,0 +1,414 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>合同统计列表</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
|
|
|
+ <script type="text/javascript">
|
|
|
+ $(document).ready(function() {
|
|
|
+
|
|
|
+ //搜索框收放
|
|
|
+ $('#moresee').click(function(){
|
|
|
+ if($('#moresees').is(':visible'))
|
|
|
+ {
|
|
|
+ $('#moresees').slideUp(0,resizeListWindow2);
|
|
|
+ $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
|
|
|
+ }else{
|
|
|
+ $('#moresees').slideDown(0,resizeListWindow2);
|
|
|
+ $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
|
|
|
+ event: 'focus', //响应事件。如果没有传入event,则按照默认的click
|
|
|
+ type : 'date'
|
|
|
+ , trigger: 'click'
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
|
|
|
+ event: 'focus', //响应事件。如果没有传入event,则按照默认的click
|
|
|
+ type : 'date'
|
|
|
+ , trigger: 'click'
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ function reset() {
|
|
|
+ $("#searchForm").resetForm();
|
|
|
+ }
|
|
|
+ function openDialog(title,url,width,height,target,formId,tableId) {
|
|
|
+
|
|
|
+ if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
|
|
|
+ width = 'auto';
|
|
|
+ height = 'auto';
|
|
|
+ } else {//如果是PC端,根据用户设置的width和height显示。
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ top.layer.open({
|
|
|
+ type: 2,
|
|
|
+ area: [width, height],
|
|
|
+ title: title,
|
|
|
+ skin:"two-btns",
|
|
|
+ maxmin: false, //开启最大化最小化按钮
|
|
|
+ content: url ,
|
|
|
+ btn: ['确定','关闭'],
|
|
|
+ yes: function(index, layero){
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
+ var top_iframe;
|
|
|
+ if(target){
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
+ }else{
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
+ }
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
+ inputForm.attr("action","${ctx}/subProject/subProject/save");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
+
|
|
|
+ formSubmit2($document,formId,index,tableId);
|
|
|
+
|
|
|
+ },
|
|
|
+ cancel: function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function formSubmit2($document,inputForm,index,tableId){
|
|
|
+
|
|
|
+ var validateForm = $($document.getElementById(inputForm)).validate({
|
|
|
+ submitHandler: function(form){
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
+ form.submit();
|
|
|
+ },
|
|
|
+ errorContainer: "#messageBox",
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
+ } else {
|
|
|
+ error.insertAfter(element);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(validateForm.form()){
|
|
|
+ $($document.getElementById(inputForm)).ajaxSubmit({
|
|
|
+ success:function(data) {
|
|
|
+ var d = data;
|
|
|
+ //输出提示信息
|
|
|
+ if(d.str.length>0){
|
|
|
+ parent.layer.msg(d.str,{icon:1});
|
|
|
+ }
|
|
|
+ window.location.reload();
|
|
|
+ //关闭当前页
|
|
|
+ top.layer.close(index)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function openDialogre(title,url,width,height,target,formId,tableId) {
|
|
|
+ if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
|
|
|
+ width = 'auto';
|
|
|
+ height = 'auto';
|
|
|
+ } else {//如果是PC端,根据用户设置的width和height显示。
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ top.layer.open({
|
|
|
+ type: 2,
|
|
|
+ area: [width, height],
|
|
|
+ title: title,
|
|
|
+ skin:"two-btns",
|
|
|
+ maxmin: false, //开启最大化最小化按钮
|
|
|
+ content: url ,
|
|
|
+ btn: ['确定','关闭'],
|
|
|
+ yes: function(index, layero){
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
+ var top_iframe;
|
|
|
+ if(target){
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
+ }else{
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
+ }
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
+ inputForm.attr("action","${ctx}/subProject/subProject/save");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
+
|
|
|
+ formSubmit2($document,formId,index,tableId);
|
|
|
+
|
|
|
+ },
|
|
|
+ cancel: function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 确认对话框
|
|
|
+ function subConfirmx(mess, href, closed){
|
|
|
+
|
|
|
+ top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
|
|
|
+ //do something
|
|
|
+ if (typeof href == 'function') {
|
|
|
+ href();
|
|
|
+ }else{
|
|
|
+ $.ajax({
|
|
|
+ type:"post",
|
|
|
+ url:href,
|
|
|
+ dataType:"json",
|
|
|
+ success:function(data){
|
|
|
+ if(data.success) {
|
|
|
+ top.layer.msg(data.str, {icon: 1});
|
|
|
+ window.location.reload();
|
|
|
+ }else {
|
|
|
+ top.layer.msg(data.str, {icon: 0});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ top.layer.close(index);
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //打开对话框(查看)
|
|
|
+ function openDialogListView(title,url,id,width,height){
|
|
|
+
|
|
|
+
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
+ width='auto';
|
|
|
+ height='auto';
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
+
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ async: false,
|
|
|
+ url: "${ctx}/workinvoiceTwo/workinvoiceTwo/getInvoiceExist?id="+id,
|
|
|
+ dataType: "json",
|
|
|
+ success: function (data) {
|
|
|
+ if(data.success){
|
|
|
+ top.layer.open({
|
|
|
+ type: 2,
|
|
|
+ skin: 'one-btn',
|
|
|
+ area: [width, height],
|
|
|
+ title: title,
|
|
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
+ content: url ,
|
|
|
+ btn: ['关闭'],
|
|
|
+ cancel: function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ top.layer.msg("该发票信息已删除!", {icon: 0});
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ <style>
|
|
|
+ body{
|
|
|
+ background-color:transparent;
|
|
|
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
|
|
|
+ color:#ffffff;
|
|
|
+ background-color:rgba(255,255,255,0);
|
|
|
+ height:100%;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="wrapper wrapper-content">
|
|
|
+ <sys:message content="${message}"/>
|
|
|
+ <div class="full-width fl">
|
|
|
+ <div class="layui-row contentShadow shadowLR" id="queryDiv">
|
|
|
+ <form:form id="searchForm" modelAttribute="workContractInfo" action="${ctx}/workcontractinfo/workContractInfo/getWorkContractStatisticDetailList?id=${workContractInfo.id}" method="post" class="form-inline">
|
|
|
+ <input id="id" type="hidden" value="${workContractInfo.id}"/>
|
|
|
+ <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
|
|
+ <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
|
|
+ <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
|
|
|
+ <div class="commonQuery lw6">
|
|
|
+ <div class="layui-item query athird" style="width: 25%">
|
|
|
+ <label class="layui-form-label">项目编号:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <form:input path="projectNumber" htmlEscape="false" maxlength="64" class=" form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item query athird" style="width: 25%">
|
|
|
+ <label class="layui-form-label">项目名称:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="projectName" htmlEscape="false" maxlength="64" class=" form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item query athird" style="width: 25%">
|
|
|
+ <span class="layui-form-label">关联项目:</span>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:select path="isProject" class="form-control simple-select">
|
|
|
+ <form:option value="" label=""/>
|
|
|
+ <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
+ </form:select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item athird" style="width: 25%">
|
|
|
+ <div class="input-group">
|
|
|
+ <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
|
|
|
+ <div class="layui-btn-group search-spacing">
|
|
|
+ <button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
|
|
|
+ <button id="searchReset" class="layui-btn layui-btn-sm" onclick="resetSearch()">重置</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style=" clear:both;"></div>
|
|
|
+ </div>
|
|
|
+ <div id="moresees" style="clear:both;display:none;" class="lw6">
|
|
|
+
|
|
|
+ <div class="layui-item query athird ">
|
|
|
+ <label class="layui-form-label">报告号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="reportNumber" htmlEscape="false" maxlength="255" class=" form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item query athird ">
|
|
|
+ <label class="layui-form-label">发票编号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="invoiceNumber" htmlEscape="false" maxlength="255" class=" form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item query athird ">
|
|
|
+ <label class="layui-form-label">开票状态:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <form:select path="invoiceState" class="form-control simple-select">
|
|
|
+ <form:option value="" label=""/>
|
|
|
+ <form:option value="0" label="未开票"/>
|
|
|
+ <form:option value="2" label="开票中"/>
|
|
|
+ <form:option value="5" label="已开票"/>
|
|
|
+ </form:select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item query athird">
|
|
|
+ <label class="layui-form-label">收款类型:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <form:select path="chargeType" class="form-control simple-select">
|
|
|
+ <form:option value="" label=""/>
|
|
|
+ <form:options items="${fns:getMainDictList('receipt_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
+ </form:select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="clear:both;"></div>
|
|
|
+ </div>
|
|
|
+ </form:form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="full-width fl">
|
|
|
+ <div class="layui-form contentDetails contentShadow shadowLBR">
|
|
|
+ <div class="nav-btns">
|
|
|
+ <div class="layui-btn-group ">
|
|
|
+ <button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
|
|
|
+ </div>
|
|
|
+ <div style="clear: both;"></div>
|
|
|
+ </div>
|
|
|
+ <table class="oa-table layui-table" id="contentTable1"></table>
|
|
|
+
|
|
|
+ <!-- 分页代码 -->
|
|
|
+ <table:page page="${page}"></table:page>
|
|
|
+ <div style="clear: both;"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="changewidth"></div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
|
|
|
+<script>
|
|
|
+
|
|
|
+ layui.use('table', function(){
|
|
|
+ layui.table.render({
|
|
|
+ limit:${ page.pageSize }
|
|
|
+ ,elem: '#contentTable1'
|
|
|
+ ,page: false
|
|
|
+ ,cols: [[
|
|
|
+ // {checkbox: true, fixed: true},
|
|
|
+ {field:'index',align:'center', title: '序号',width:60}
|
|
|
+ /*,{field:'contractNum',align:'center', title: '合同编号', width:150}
|
|
|
+ ,{field:'name',align:'center', title: '合同名称', width:150}*/
|
|
|
+ ,{field:'projectNumber',align:'center', title: '项目编号', width:150}
|
|
|
+ ,{field:'projectName',align:'center', title: '项目名称',templet:function(d){
|
|
|
+ return "<a class=\"attention-info\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目信息', '${ctx}/subProject/subProject/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
|
|
|
+ }}
|
|
|
+ ,{field:'reportNumber',align:'center', title: '报告号', width:150}
|
|
|
+ ,{field:'clientName',align:'center', title: '委托方', width:150}
|
|
|
+ ,{field:'projectMasterName',align:'center', title: '项目责任人', width:100}
|
|
|
+ ,{field:'invoiceNumber',align:'center', title: '开票编号', width:120,templet:function(d){
|
|
|
+ return "<a class=\"attention-info\" title=\""+ d.invoiceNumber +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\">" + d.invoiceNumber + "</a>";
|
|
|
+ }}
|
|
|
+ ,{field:'invoiceStateStr',align:'center', title: '开票状态', width:100,templet:function(d){
|
|
|
+ if(d.invoiceState == "1" || d.invoiceState == "2" || d.invoiceState == "3" || d.invoiceState == "4"){
|
|
|
+ return "<a class=\"attention-info\" title=\""+ d.invoiceStateStr +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\" style=\"color:#5cb85c\">" + d.invoiceStateStr + "</a>";
|
|
|
+ }else if(d.invoiceState == "5"){
|
|
|
+ return "<a class=\"attention-info\" title=\""+ d.invoiceStateStr +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\" style=\"color:#1e9fff\">" + d.invoiceStateStr + "</a>";
|
|
|
+ }else{
|
|
|
+
|
|
|
+ return "<font >"+d.invoiceStateStr+"</font>";
|
|
|
+ }
|
|
|
+
|
|
|
+ }}
|
|
|
+ ,{field:'chargeTypeStr',align:'center', title: '发票收款类型', width:120,templet:function(d){
|
|
|
+ if(d.chargeType == "1"){
|
|
|
+ return "<a class=\"attention-info\" title=\""+ d.chargeTypeStr +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\" style=\"color:#ff5722\">" + d.chargeTypeStr + "</a>";
|
|
|
+ }else if(d.chargeType == "2"){
|
|
|
+ return "<a class=\"attention-info\" title=\""+ d.chargeTypeStr +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\" style=\"color:#1e9fff\">" + d.chargeTypeStr + "</a>";
|
|
|
+ }else{
|
|
|
+
|
|
|
+ return "<font >"+d.chargeTypeStr+"</font>";
|
|
|
+ }
|
|
|
+
|
|
|
+ }}
|
|
|
+ ,{field:'invoiceMoney',align:'center', title: '发票金额汇总', width:120}
|
|
|
+ ,{field:'invoiceDate',align:'center', title: '发票收款时间', width:120}
|
|
|
+ ]]
|
|
|
+ ,data: [
|
|
|
+ <c:if test="${ not empty page.list}">
|
|
|
+ <c:forEach items="${page.list}" var="workContractInfo" varStatus="index">
|
|
|
+ <c:if test="${index.index != 0}">,</c:if>
|
|
|
+ {
|
|
|
+ "index":"${index.index+1}"
|
|
|
+ ,"id":"${workContractInfo.id}"
|
|
|
+ ,"name":"<c:out value="${workContractInfo.name}" escapeXml="true"/>"
|
|
|
+ ,"contractNum":"${workContractInfo.contractNum}"
|
|
|
+ ,"projectId":"${workContractInfo.projectId}"
|
|
|
+ ,"projectNumber":"${workContractInfo.projectNumber}"
|
|
|
+ ,"projectName":"<c:out value="${workContractInfo.projectName}" escapeXml="true"/>"
|
|
|
+ ,"projectMasterName":"${workContractInfo.projectMasterName}"
|
|
|
+ ,"reportNumber":"${workContractInfo.reportNumber}"
|
|
|
+ ,"clientName":"${workContractInfo.clientName}"
|
|
|
+
|
|
|
+ ,"invoiceId":"${workContractInfo.invoiceId}"
|
|
|
+ ,"invoiceNumber":"${workContractInfo.invoiceNumber}"
|
|
|
+ ,"chargeType":"${workContractInfo.chargeType}"
|
|
|
+ ,"chargeTypeStr":"${workContractInfo.chargeTypeStr}"
|
|
|
+ ,"invoiceMoney":"${workContractInfo.invoiceMoney}"
|
|
|
+ ,"invoiceDate":"<fmt:formatDate value="${workContractInfo.invoiceDate}" pattern="yyyy-MM-dd"/>"
|
|
|
+ ,"invoiceState":"${workContractInfo.invoiceState}"
|
|
|
+ ,"invoiceStateStr":"${workContractInfo.invoiceStateStr}"
|
|
|
+ }
|
|
|
+ </c:forEach>
|
|
|
+ </c:if>
|
|
|
+ ]
|
|
|
+ // ,even: true
|
|
|
+ // ,height: 315
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
+ resizeListTable();
|
|
|
+ $("a").on("click",addLinkVisied);
|
|
|
+</script>
|
|
|
+<script>
|
|
|
+ resizeListWindow2();
|
|
|
+ $(window).resize(function(){
|
|
|
+ resizeListWindow2();
|
|
|
+ });
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|