|
@@ -6,6 +6,7 @@
|
|
|
<meta name="decorator" content="default"/>
|
|
|
<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
|
|
|
<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
|
|
|
+ <script src="${ctxStatic}/common/html/js/script.js"></script>
|
|
|
<style>
|
|
|
td input{
|
|
|
margin-left:0px !important;
|
|
@@ -15,52 +16,71 @@
|
|
|
padding-left: 0px;
|
|
|
padding-right: 0px;
|
|
|
}
|
|
|
+ #workInvoiceProjectRelationList td{
|
|
|
+ padding-left: 0px;
|
|
|
+ padding-right: 0px;
|
|
|
+ }
|
|
|
</style>
|
|
|
<script type="text/javascript">
|
|
|
var validateForm;
|
|
|
function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
if(validateForm.form()){
|
|
|
- var length = $("#workReceiptList tr").length;
|
|
|
- var invoiceMoneyStr = $("#invoiceMoney").val();
|
|
|
- invoiceMoneyStr = invoiceMoneyStr.replace(/\,/g, "");
|
|
|
- var invoiceMoney = parseFloat(invoiceMoneyStr);
|
|
|
- if(length==0){
|
|
|
- parent.layer.msg('请录入收款信息',{icon:5});
|
|
|
- return false;
|
|
|
- }else{
|
|
|
- var moneys = 0;
|
|
|
- for(var i=0; i<length; i++) {
|
|
|
- //获取每一行的汇款金额
|
|
|
- var money = parseFloat(workReceiptList.rows[i].cells[2].getElementsByTagName("INPUT")[0].value);
|
|
|
- //计算所有汇款综合
|
|
|
- moneys = moneys+money;
|
|
|
- }
|
|
|
- }
|
|
|
if(obj == 2){
|
|
|
- if(moneys<invoiceMoney){
|
|
|
- layer.confirm('收款金额小于发票金额,确定收款吗?', {
|
|
|
- btn: ['确定', '关闭'],
|
|
|
- btn1: function(index, layero){
|
|
|
- $("#inputForm").attr("action","${ctx}/workinvoiceAll/workInvoiceAll/saveAffirmReceipt");
|
|
|
- $("#inputForm").submit();
|
|
|
- top.layer.close(index);//关闭对话框。
|
|
|
- //关闭iframe页面
|
|
|
- var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
|
|
- parent.layer.close(index);
|
|
|
- },btn2: function(index){
|
|
|
- }
|
|
|
- });
|
|
|
- }else if(moneys>invoiceMoney){
|
|
|
- parent.layer.msg('收款金额不得大于开票金额',{icon:5});
|
|
|
- return false;
|
|
|
- }else if(moneys == invoiceMoney){
|
|
|
- $("#inputForm").attr("action","${ctx}/workinvoiceAll/workInvoiceAll/saveAffirmReceipt");
|
|
|
- $("#inputForm").submit();
|
|
|
- top.layer.close();//关闭对话框。
|
|
|
- //关闭iframe页面
|
|
|
- var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
|
|
- parent.layer.close(index);
|
|
|
- }
|
|
|
+ var length = $("#workReceiptList tr").length;
|
|
|
+ var invoiceMoneyStr = $("#invoiceMoney").val();
|
|
|
+ invoiceMoneyStr = invoiceMoneyStr.replace(/\,/g, "");
|
|
|
+ var invoiceMoney = parseFloat(invoiceMoneyStr);
|
|
|
+ if(length==0){
|
|
|
+ parent.layer.msg('请录入收款信息',{icon:5});
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ var moneys = 0;
|
|
|
+ for(var i=0; i<length; i++) {
|
|
|
+ //获取每一行的汇款金额
|
|
|
+ var money = parseFloat(workReceiptList.rows[i].cells[2].getElementsByTagName("INPUT")[0].value);
|
|
|
+ //计算所有汇款综合
|
|
|
+ moneys = moneys+money;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var flags=judgment();
|
|
|
+ if (flags){
|
|
|
+ if(moneys<invoiceMoney){
|
|
|
+ layer.confirm('收款金额小于发票金额,确定收款吗?', {
|
|
|
+ btn: ['确定', '关闭'],
|
|
|
+ btn1: function(index, layero){
|
|
|
+ var flags=judgment();
|
|
|
+ if (flags){
|
|
|
+ $("#inputForm").attr("action","${ctx}/workinvoiceAll/workInvoiceAll/saveAffirmReceipt");
|
|
|
+ }else{
|
|
|
+ return flags;
|
|
|
+ }
|
|
|
+ $("#inputForm").submit();
|
|
|
+ top.layer.close(index);//关闭对话框。
|
|
|
+ //关闭iframe页面
|
|
|
+ var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
|
|
+ parent.layer.close(index);
|
|
|
+ },btn2: function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else if(moneys>invoiceMoney){
|
|
|
+ parent.layer.msg('收款金额不得大于开票金额',{icon:5});
|
|
|
+ return false;
|
|
|
+ }else if(moneys == invoiceMoney){
|
|
|
+ var flags=judgment();
|
|
|
+ if (flags){
|
|
|
+ $("#inputForm").attr("action","${ctx}/workinvoiceAll/workInvoiceAll/saveAffirmReceipt");
|
|
|
+ }else{
|
|
|
+ return flags;
|
|
|
+ }
|
|
|
+ $("#inputForm").submit();
|
|
|
+ top.layer.close();//关闭对话框。
|
|
|
+ //关闭iframe页面
|
|
|
+ var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
|
|
+ parent.layer.close(index);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return flags;
|
|
|
+ }
|
|
|
}else{
|
|
|
if(moneys > invoiceMoney){
|
|
|
parent.layer.msg('收款金额不能大于开票金额',{icon:5});
|
|
@@ -98,7 +118,29 @@
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-
|
|
|
+ function addRow1(list, idx, tpl, row){
|
|
|
+ var idx1 = $("#workInvoiceProjectRelationList tr").length;
|
|
|
+ if(list == '#workInvoiceProjectRelationList'){
|
|
|
+ bornTemplete1(list, idx, tpl, row, idx1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function bornTemplete1(list, idx, tpl, row, idx1){
|
|
|
+ $(list).append(Mustache.render(tpl, {
|
|
|
+ idx: idx, delBtn: true, row: row,
|
|
|
+ order:idx1 + 1
|
|
|
+ }));
|
|
|
+ $(list+idx).find("select").each(function(){
|
|
|
+ $(this).val($(this).attr("data-value"));
|
|
|
+ });
|
|
|
+ $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
|
|
|
+ var ss = $(this).attr("data-value").split(',');
|
|
|
+ for (var i=0; i<ss.length; i++){
|
|
|
+ if($(this).val() == ss[i]){
|
|
|
+ $(this).attr("checked","checked");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
function addRow(list, idx, tpl, row){
|
|
|
var idx1 = $("#workReceiptList tr").length;
|
|
@@ -157,53 +199,58 @@
|
|
|
|
|
|
<div class="form-group layui-row first lw14">
|
|
|
<div class="form-group-label"><h2>基本信息</h2></div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${workInvoice.project.projectName}"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">发票申请编号:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <div class="input-group">
|
|
|
- <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${workInvoice.number}"/>
|
|
|
- <span class="input-group-btn">
|
|
|
- <label class="form-status"><c:choose><c:when test="${ empty workInvoice.invoiceState}">新添</c:when><c:otherwise>${fns:getDictLabel(workInvoice.invoiceState, 'audit_state','')}</c:otherwise> </c:choose></label>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">合同名称:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" style="background-color: #f1f1f1" class="form-control layui-input" value="${workInvoice.project.workContractInfo.name}"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">项目编号:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" style="background-color: #f1f1f1" class="form-control layui-input" value="${workInvoice.project.projectId}"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">委托方:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" style="background-color: #f1f1f1" class="form-control layui-input" value="${workInvoice.project.workContractInfo.client.name}"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">报告号:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" style="background-color: #f1f1f1" class="form-control layui-input" value="${workInvoice.project.reportData.number}"/>
|
|
|
- </div>
|
|
|
+ <div class="layui-table-body layui-item layui-col-xs12 form-table-container" style="padding:0px">
|
|
|
+ <table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th width="200px"><font color="red">*</font>项目名称</th>
|
|
|
+ <th width="200px">合同名称</th>
|
|
|
+ <th width="200px">项目编号</th>
|
|
|
+ <th width="200px">委托方</th>
|
|
|
+ <th width="200px">报告号</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="workInvoiceProjectRelationList">
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <script type="text/template" id="workInvoiceProjectRelationListTpl">//<!--
|
|
|
+ <tr id="workInvoiceProjectRelationList{{idx}}">
|
|
|
+ <td class="hide">
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_invoiceId" name="workInvoiceProjectRelationList[{{idx}}].invoiceId" type="hidden" value="{{row.invoiceId}}"/>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_projectId" name="workInvoiceProjectRelationList[{{idx}}].projectId" type="hidden" value="{{row.projectId}}"/>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_delFlag" name="workInvoiceProjectRelationList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_projectName" type="text" value="{{row.projectName}}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_workContractName" type="text" value="{{row.workContractName}}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_projectNum" type="text" value="{{row.projectNum}}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_clientName" type="text" value="{{row.clientName}}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_reportDataNum" type="text" value="{{row.reportDataNum}}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ </tr>//-->
|
|
|
+ </script>
|
|
|
+ <script type="text/javascript">
|
|
|
+ var workInvoiceProjectRelationListRowIdx = 0, workInvoiceProjectRelationListTpl = $("#workInvoiceProjectRelationListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
+ /*if($("#id").val()){
|
|
|
+ workInvoiceProjectRelationListRowIdx = ${fn:length(workInvoice.workInvoiceProjectRelationList)};
|
|
|
+ }*/
|
|
|
+ $(document).ready(function() {
|
|
|
+ var data = ${fns:toJson(workInvoice.workInvoiceProjectRelationList)};
|
|
|
+ for (var i=0; i<data.length; i++){
|
|
|
+ addRow1('#workInvoiceProjectRelationList', workInvoiceProjectRelationListRowIdx, workInvoiceProjectRelationListTpl, data[i])
|
|
|
+ workInvoiceProjectRelationListRowIdx = workInvoiceProjectRelationListRowIdx + 1;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ </script>
|
|
|
</div>
|
|
|
- <%--<div class="layui-item layui-col-sm6">--%>
|
|
|
- <%--<label class="layui-form-label"><span class="require-item">*</span>所属部门:</label>--%>
|
|
|
- <%--<div class="layui-input-block">--%>
|
|
|
- <%--<input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.office.name}"/>--%>
|
|
|
- <%--</div>--%>
|
|
|
- <%--</div>--%>
|
|
|
</div>
|
|
|
<div class="form-group layui-row first lw14">
|
|
|
<div class="form-group-label"><h2>发票详情</h2></div>
|
|
@@ -220,6 +267,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>发票申请编号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <div class="input-group">
|
|
|
+ <input htmlEscape="false" readonly="true" style="background-color: #f1f1f1" class="form-control layui-input" value="${workInvoice.number}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
<label class="layui-form-label"><span class="require-item">*</span>实际开票单位:</label>
|
|
|
<div class="layui-input-block">
|
|
|
<input htmlEscape="false" readonly="true" style="background-color: #f1f1f1" class="form-control layui-input" value="${workInvoice.client.name}"/>
|
|
@@ -258,7 +313,7 @@
|
|
|
<div class="layui-item layui-col-sm6">
|
|
|
<label class="layui-form-label"><span class="require-item">*</span>开票金额(元):</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" style="background-color: #f1f1f1" id="invoiceMoney" class="form-control layui-input" value="<fmt:formatNumber value="${workInvoice.money}" pattern="#,#00.00"/>"/>
|
|
|
+ <input htmlEscape="false" readonly="true" style="background-color: #f1f1f1" id="invoiceMoney" class="form-control layui-input" value="<fmt:formatNumber value="${workInvoice.money}" pattern="##00.00"/>"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6">
|
|
@@ -279,6 +334,12 @@
|
|
|
<input htmlEscape="false" readonly="true" style="background-color: #f1f1f1" class="form-control layui-input" value="<fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">对账人:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.accountCheckingUserName}" style="background-color: #f1f1f1"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="layui-item layui-col-sm12">
|
|
|
<label class="layui-form-label">领票时间:</label>
|
|
|
<div class="layui-input-block">
|
|
@@ -292,15 +353,15 @@
|
|
|
<table id="contentTable" class="table table-bordered table-condensed details">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
- <th><span class="require-item">*</span>发票代码</th>
|
|
|
- <th><span class="require-item">*</span>发票号</th>
|
|
|
- <th><span class="require-item">*</span>开票金额</th>
|
|
|
- <th><span class="require-item">*</span>税率</th>
|
|
|
- <th><span class="require-item">*</span>金额</th>
|
|
|
- <th><span class="require-item">*</span>税额</th>
|
|
|
- <th><span class="require-item">*</span>累计登记金额</th>
|
|
|
- <th><span class="require-item">*</span>发票状态</th><%--正常--%>
|
|
|
- <th><span class="require-item">*</span>被退标记</th>
|
|
|
+ <th>发票代码</th>
|
|
|
+ <th>发票号</th>
|
|
|
+ <th>开票金额</th>
|
|
|
+ <th>税率</th>
|
|
|
+ <th>金额</th>
|
|
|
+ <th>税额</th>
|
|
|
+ <th>累计登记金额</th>
|
|
|
+ <th>发票状态</th><%--正常--%>
|
|
|
+ <th>被退标记</th>
|
|
|
<%--<th><span class="require-item">*</span>被退票号</th>
|
|
|
<th><span class="require-item">*</span>开票日期</th>--%>
|
|
|
</tr>
|
|
@@ -316,20 +377,20 @@
|
|
|
${workAccount.number}
|
|
|
</td>
|
|
|
|
|
|
- <td title="<fmt:formatNumber value="${workAccount.totalMoney}" pattern="#,#00.00"/>">
|
|
|
- <fmt:formatNumber value="${workAccount.totalMoney}" pattern="#,#00.00"/>
|
|
|
+ <td title="<fmt:formatNumber value="${workAccount.totalMoney}" pattern="##00.00"/>">
|
|
|
+ <fmt:formatNumber value="${workAccount.totalMoney}" pattern="##00.00"/>
|
|
|
</td>
|
|
|
<td title="${workAccount.tax}">
|
|
|
${workAccount.tax}
|
|
|
</td>
|
|
|
- <td title="<fmt:formatNumber value="${workAccount.taxMoney}" pattern="#,#00.00"/>">
|
|
|
- <fmt:formatNumber value="${workAccount.taxMoney}" pattern="#,#00.00"/>
|
|
|
+ <td title="<fmt:formatNumber value="${workAccount.taxMoney}" pattern="##00.00"/>">
|
|
|
+ <fmt:formatNumber value="${workAccount.taxMoney}" pattern="##00.00"/>
|
|
|
</td>
|
|
|
- <td title="<fmt:formatNumber value="${workAccount.taxRate}" pattern="#,#00.00"/>">
|
|
|
- <fmt:formatNumber value="${workAccount.taxRate}" pattern="#,#00.00"/>
|
|
|
+ <td title="<fmt:formatNumber value="${workAccount.taxRate}" pattern="##00.00"/>">
|
|
|
+ <fmt:formatNumber value="${workAccount.taxRate}" pattern="##00.00"/>
|
|
|
</td>
|
|
|
- <td title="<fmt:formatNumber value="${workAccount.incomeMoney}" pattern="#,#00.00"/>">
|
|
|
- <fmt:formatNumber value="${workAccount.incomeMoney}" pattern="#,#00.00"/>
|
|
|
+ <td title="<fmt:formatNumber value="${workAccount.incomeMoney}" pattern="##00.00"/>">
|
|
|
+ <fmt:formatNumber value="${workAccount.incomeMoney}" pattern="##00.00"/>
|
|
|
</td>
|
|
|
<td title="${workAccount.state}">
|
|
|
${workAccount.state}
|
|
@@ -377,14 +438,14 @@
|
|
|
<input id="workReceiptList{{idx}}_delFlag" name="workReceiptList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input id="workReceiptList{{idx}}_companyName" placeholder="请输入汇款单位" name="workReceiptList[{{idx}}].companyName" value="{{row.companyName}}" style="text-align: center" class="form-control required"/>
|
|
|
+ <input id="workReceiptList{{idx}}_companyName" placeholder="请输入汇款单位" name="workReceiptList[{{idx}}].companyName" value="{{row.companyName}}" style="text-align: center" class="form-control judgment "/>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input id="workReceiptList{{idx}}_money" name="workReceiptList[{{idx}}].money" placeholder="请输入汇款金额" value="{{row.money}}" style="text-align: center" class="form-control number required"/>
|
|
|
+ <input id="workReceiptList{{idx}}_money" name="workReceiptList[{{idx}}].money" placeholder="请输入汇款金额" value="{{row.money}}" style="text-align: center" class="form-control number judgment"/>
|
|
|
</td>
|
|
|
|
|
|
<td>
|
|
|
- <input lay-verify="date" readonly="true" placeholder="yyyy-MM-dd" autocomplete="off" id="workReceiptList{{idx}}_receiptDate" name="workReceiptList[{{idx}}].receiptDate" type="text" value="{{row.receiptDate}}" style="text-align: center" class="form-control required datetime"/>
|
|
|
+ <input lay-verify="date" readonly="true" placeholder="yyyy-MM-dd" autocomplete="off" id="workReceiptList{{idx}}_receiptDate" name="workReceiptList[{{idx}}].receiptDate" type="text" value="{{row.receiptDate}}" style="text-align: center" class="form-control judgment datetime required"/>
|
|
|
</td>
|
|
|
|
|
|
<td class="text-center op-td" width="10">
|