|
@@ -0,0 +1,959 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>报销单管理</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <script type="text/javascript">
|
|
|
+ var validateForm;
|
|
|
+ var count = 0;
|
|
|
+ $(document).ready(function() {
|
|
|
+ if($("#submitterDate").val()==null || $("#submitterDate").val()==''){
|
|
|
+ $("#submitterDate").val(getNowFormatDate());
|
|
|
+ }
|
|
|
+ /*$("input[name='ext']").on('ifChecked', function(event){
|
|
|
+ var radioVal = $(this).val();
|
|
|
+ if(radioVal == 0){
|
|
|
+ $(".td1").removeClass("hide");
|
|
|
+ $(".project_reimbursement_div").show();
|
|
|
+ $(".not_project_reimbursement_div").hide();
|
|
|
+ }else{
|
|
|
+ $(".td1").addClass("hide");
|
|
|
+ $(".project_reimbursement_div").hide();
|
|
|
+ $(".not_project_reimbursement_div").show();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if("${workReimbursement.ext}" == "1"){
|
|
|
+ $("#ext1").iCheck('check')
|
|
|
+ }else{
|
|
|
+ $("#ext").iCheck('check')
|
|
|
+ }*/
|
|
|
+ $("input[name='isPublic']").on('ifChecked', function(event){
|
|
|
+ var radioVal = $(this).val();
|
|
|
+ if(radioVal == 1){
|
|
|
+ $(".isPublic").removeClass("hide");
|
|
|
+ $("#comname").removeClass("required");
|
|
|
+ $("#bank").removeClass("required");
|
|
|
+ $("#bankNo").removeClass("required");
|
|
|
+ $("#reimbursementBackList tr").each(function () {
|
|
|
+ $(this).remove();
|
|
|
+ $("#backmoney").val("0.00");
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ $(".isPublic").addClass("hide");
|
|
|
+ $("#comname").addClass("required");
|
|
|
+ $("#bank").addClass("required");
|
|
|
+ $("#bankNo").addClass("required");
|
|
|
+ getLoan($("#achivesId").val());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if("${workReimbursement.isPublic}" == "1"){
|
|
|
+ $("#isPublic1").iCheck('check')
|
|
|
+ $(".isPublic").removeClass("hide");
|
|
|
+ }else{
|
|
|
+ $("#isPublic").iCheck('check')
|
|
|
+ $(".isPublic").addClass("hide");
|
|
|
+ }
|
|
|
+ validateForm = $("#inputForm").validate({
|
|
|
+ submitHandler: function(form){
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
+ form.submit();
|
|
|
+ },
|
|
|
+ rules:{
|
|
|
+ },
|
|
|
+ messages:{
|
|
|
+ },
|
|
|
+ errorContainer: "#messageBox",
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ $("#messageBox").text("输入有误,请先更正。");
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
+ } else {
|
|
|
+ error.insertAfter(element);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem: '#submitterDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
|
|
|
+ event: 'focus', //响应事件。如果没有传入event,则按照默认的click
|
|
|
+ type : 'date'
|
|
|
+, trigger: 'click'
|
|
|
+ });
|
|
|
+ $("#attachment_btn").click(function () {
|
|
|
+ $("#attachment_file").click();
|
|
|
+ });
|
|
|
+ // getRandom();
|
|
|
+
|
|
|
+ });
|
|
|
+ function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
+ var idArr = $("#workAccountList tr:visible");
|
|
|
+ if(idArr.length<1){
|
|
|
+ parent.layer.msg("请添加报销详情!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var trlen = $("#workAccountList tr").length;
|
|
|
+ var tdlen = $("#workAccountList tr td").length;
|
|
|
+ var trArr = [];
|
|
|
+ for(var i = 0;i < trlen;i++){
|
|
|
+ var tableMap = {};
|
|
|
+ tableMap["flag"] = $("#workAccountList tr").eq(i).find("td").eq(0).text();
|
|
|
+ tableMap["typeId"] = $("#workAccountList tr").eq(i).find("td").eq(1).text();
|
|
|
+ tableMap["money"] = $("#workAccountList tr").eq(i).find("td").eq(3).text();
|
|
|
+ tableMap["detail"] = $("#workAccountList tr").eq(i).find("td").eq(4).text();
|
|
|
+ tableMap["submitterId"] = $("#workAccountList tr").eq(i).find("td").eq(5).text();
|
|
|
+ tableMap["officeId"] = $("#workAccountList tr").eq(i).find("td").eq(6).text();
|
|
|
+ tableMap["billNumber"] = $("#workAccountList tr").eq(i).find("td").eq(7).text();
|
|
|
+ tableMap["payMode"] = $("#workAccountList tr").eq(i).find("td").eq(8).text();
|
|
|
+ tableMap["travelDays"] = $("#workAccountList tr").eq(i).find("td").eq(9).text();
|
|
|
+ trArr.push(tableMap);
|
|
|
+ }
|
|
|
+ if(obj == 2){
|
|
|
+ $("#inputForm").attr("action","${ctx}/workreimbursement/workReimbursementAll/store");
|
|
|
+ }else{
|
|
|
+ $("#inputForm").attr("action","${ctx}/workreimbursement/workReimbursementAll/save");
|
|
|
+ }
|
|
|
+ if(validateForm.form()){
|
|
|
+ var total=0 //价税合计总额
|
|
|
+ var specialTotal=0;
|
|
|
+ $("#reimbursementVATTaxes tr:visible .sumMoney").each(function () {
|
|
|
+ total= parseFloat($(this).val()) +total;
|
|
|
+ });
|
|
|
+
|
|
|
+ var falt=0;
|
|
|
+ /*$("#workAccountList tr:visible").each(function () {
|
|
|
+ var v_id = $(this).attr("id");
|
|
|
+ if($("#"+v_id+"_invoiceType").val()=="专票"){
|
|
|
+ falt=1;
|
|
|
+ specialTotal=specialTotal+parseFloat($("#"+v_id+"_money").val());
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(falt==1){
|
|
|
+ var idArr = $("#reimbursementVATTaxes tr:visible");
|
|
|
+ if(idArr.length<1){
|
|
|
+ parent.layer.msg("请添加专用发票信息!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(total!=specialTotal){
|
|
|
+ parent.layer.msg("专用发票报销金额应等于价税合计总额!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(parseFloat($("#backmoney").val())>parseFloat($("#moneys").val())){
|
|
|
+ parent.layer.msg("还款金额不能大于报销金额!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }*/
|
|
|
+ var size = $("#reimbursementBackList tr").length;
|
|
|
+ for (var i = 0;i<size;i++){
|
|
|
+ var backmoney = $("#reimbursementBackList"+i+"_6").val();
|
|
|
+ var notRepay = $("#reimbursementBackList"+i+"_5").val();
|
|
|
+ if(backmoney!=''){
|
|
|
+ if (backmoney!=undefined && isNumber(backmoney)){
|
|
|
+ if(parseFloat(backmoney)>parseFloat(notRepay)){
|
|
|
+ parent.layer.msg("还款金额不能大于未还款金额!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#inputForm").submit();
|
|
|
+ return true;
|
|
|
+ }else {
|
|
|
+ parent.layer.msg("信息未填写完整!", {icon: 5});
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ function deleteRow(obj,index){
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ str[index] = " ";
|
|
|
+ mon[index] = 0;
|
|
|
+ countMoney();
|
|
|
+ }
|
|
|
+ function countMoney(){
|
|
|
+ var m = 0;
|
|
|
+ $.each(mon,function (index,item) {
|
|
|
+ m += Number(item);
|
|
|
+ });
|
|
|
+ $("#mont").val(m);
|
|
|
+ }
|
|
|
+ /*function setValue(obj){
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'${ctx}/workreimbursement/workReimbursement/getProjectInfo',
|
|
|
+ data:{
|
|
|
+ "obj":obj
|
|
|
+ },
|
|
|
+ success:function(data){
|
|
|
+ var d = JSON.parse(data);
|
|
|
+ $("#businessType").val(d.projectType);
|
|
|
+ $("#projectMasterName").val(d.projectMasterName);
|
|
|
+ $("#officeName").val(d.officeName);
|
|
|
+ $("#officeId").val(d.officeId);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }*/
|
|
|
+ function getLoan(id){
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'${ctx}/workreimbursementback/workReimbursementBack/getLoan',
|
|
|
+ data:{
|
|
|
+ "id":id
|
|
|
+ },
|
|
|
+ success:function(data){
|
|
|
+ var idx1 = $("#reimbursementBackList tr").length;
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
+ addRowRecord('#reimbursementBackList', reimbursementBackIdx, reimbursementBackTpl,data[i]);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function selectUserInfo(id) {
|
|
|
+ if( $("#achivesId").val()!=id){
|
|
|
+ $("#reimbursementBackList tr").each(function () {
|
|
|
+ $(this).remove();
|
|
|
+ $("#backmoney").val("0.00");
|
|
|
+ })
|
|
|
+ if($('#isPublic').is(':checked')) {
|
|
|
+ getLoan(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ data:{
|
|
|
+ "id":id
|
|
|
+ },
|
|
|
+ url:'${ctx}/workregularapply/workRegularApply/userInfo',
|
|
|
+ success:function(data){
|
|
|
+ $("#bankCard").val(data.bankCard);
|
|
|
+ $("#achivesId").val(id);
|
|
|
+ $("#officeId").val(data.office.id);
|
|
|
+ $("#officeName").val(data.office.name);
|
|
|
+ $("#projectId").val("");
|
|
|
+ $("#projectName").val("");
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ function getNowFormatDate() {
|
|
|
+ var date = new Date();
|
|
|
+ var seperator1 = "-";
|
|
|
+ var seperator2 = ":";
|
|
|
+ var month = date.getMonth() + 1;
|
|
|
+ var strDate = date.getDate();
|
|
|
+ month = (month < 10)?"0"+month:month;
|
|
|
+ strDate = (strDate < 10)?"0"+strDate:strDate;
|
|
|
+ var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
|
|
|
+ return currentdate;
|
|
|
+ }
|
|
|
+
|
|
|
+ function getRandom(){
|
|
|
+ var GetRandomn = 1;
|
|
|
+ //js生成时间戳
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
+ //获取随机范围内数值的函数
|
|
|
+ function GetRandom(n){
|
|
|
+ //由随机数+时间戳+1组成
|
|
|
+ GetRandomn=Math.floor(Math.random()*n+timestamp+1);
|
|
|
+ }
|
|
|
+ //开始调用,获得一个1-100的随机数
|
|
|
+ GetRandom("30");
|
|
|
+ if(!$("#numberFlag").val()){
|
|
|
+ $("#number").val(GetRandomn)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function addRow(list, idx, tpl, row){
|
|
|
+ var idx1 = $("#workAccountList tr").length;
|
|
|
+ if(list == '#workAccountList'){
|
|
|
+ tpl = tpl.replace("workAccountList[0].financialSubjects","workAccountList["+idx1+"].financialSubjects");
|
|
|
+ tpl = tpl.replace("workAccountList[0].financialSubjectss","workAccountList["+idx1+"].financialSubjectss");
|
|
|
+ /*var ext = $("input[name='ext']:checked").val();
|
|
|
+ if(ext == 0){
|
|
|
+ tpl = tpl.replace("not_project_reimbursement_div","not_project_reimbursement_div\" style=\"display:none;\"");
|
|
|
+ tpl = tpl.replace("project_reimbursement_div\" style=\"display:none;\"","project_reimbursement_div");
|
|
|
+ }else {
|
|
|
+ tpl = tpl.replace("project_reimbursement_div","project_reimbursement_div\" style=\"display:none;\"");
|
|
|
+ tpl = tpl.replace("not_project_reimbursement_div\" style=\"display:none;\"","not_project_reimbursement_div\"");
|
|
|
+ }*/
|
|
|
+ tpl = tpl.replace("not_project_reimbursement_div","not_project_reimbursement_div\" style=\"display:none;\"");
|
|
|
+ tpl = tpl.replace("project_reimbursement_div\" style=\"display:none;\"","project_reimbursement_div");
|
|
|
+ bornTemplete(list, idx, tpl, row, idx1);
|
|
|
+ }
|
|
|
+ var idx2 = $("#reimbursementVATTaxes tr").length;
|
|
|
+ if(list == '#reimbursementVATTaxes'){
|
|
|
+ bornTemplete(list, idx, tpl, row, idx2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function bornTemplete(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 delRow(obj, prefix){
|
|
|
+ var id = $(prefix+"_id");
|
|
|
+ var workAccountmoney= $(prefix+"_money").val();
|
|
|
+ var money = $("#moneys").val();
|
|
|
+ if (isNumber(workAccountmoney)){
|
|
|
+ if(money==""){
|
|
|
+ money = parseFloat(workAccountmoney).toFixed(2);
|
|
|
+ }else {
|
|
|
+ money = (parseFloat(money) - parseFloat(workAccountmoney)).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(money>=0){
|
|
|
+ count++;
|
|
|
+ $("#moneys").val(money);
|
|
|
+ var delFlag = $(prefix+"_delFlag");
|
|
|
+ if (id.val() == ""){
|
|
|
+ delFlag.val("1");
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }else if(delFlag.val() == "0"){
|
|
|
+ delFlag.val("1");
|
|
|
+ $(obj).html("÷").attr("title", "撤回删除");
|
|
|
+ $(obj).parent().parent().addClass("error");
|
|
|
+ $(obj).parent().parent().addClass("hide");
|
|
|
+ }else if(delFlag.val() == "1"){
|
|
|
+ delFlag.val("0");
|
|
|
+ $(obj).html("×").attr("title", "删除");
|
|
|
+ $(obj).parent().parent().removeClass("error");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ parent.layer.msg('删除失败',{icon:2});
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ function delRowA(obj, prefix){
|
|
|
+ var id = $(prefix+"_id");
|
|
|
+ var delFlag = $(prefix+"_delFlag");
|
|
|
+ if (id.val() == ""){
|
|
|
+ delFlag.val("1");
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }else if(delFlag.val() == "0"){
|
|
|
+ delFlag.val("1");
|
|
|
+ $(obj).html("÷").attr("title", "撤销删除");
|
|
|
+ $(obj).parent().parent().addClass("error");
|
|
|
+ $(obj).parent().parent().addClass("hide");
|
|
|
+ }else if(delFlag.val() == "1"){
|
|
|
+ delFlag.val("0");
|
|
|
+ $(obj).html("×").attr("title", "删除");
|
|
|
+ $(obj).parent().parent().removeClass("error");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function urlRedict(file,attach){
|
|
|
+ parent.layer.confirm('确定删除吗?', {
|
|
|
+ btn: ['确认', '取消'] //可以无限个按钮
|
|
|
+ }, function(index, layero){
|
|
|
+ var index1 = parent.layer.load(0, {shade: false});
|
|
|
+ $.post("${ctx}/workfullmanage/workFullManage/deleteFile",
|
|
|
+ {"file":file,"attach":attach},
|
|
|
+ function(result){
|
|
|
+ var d = JSON.parse(result);
|
|
|
+ if(d.str){
|
|
|
+ location.reload();
|
|
|
+ parent.layer.msg("删除成功!!!",{icon:6});
|
|
|
+ parent.layer.close(index1);
|
|
|
+ parent.layer.close(index);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, function(index){
|
|
|
+ parent.layer.close(index)
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ function insertTitle(tValue){
|
|
|
+ var list = "${workReimbursement.workAttachments}";
|
|
|
+ var size = (list.split('url')).length-1;
|
|
|
+ var files = $("#attachment_file")[0].files; for(var i = 0;i<files.length;i++) { var file = files[i];
|
|
|
+ var attachmentId = "";
|
|
|
+ var attachmentFlag = "6";
|
|
|
+ console.log(file);
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
+
|
|
|
+ var storeAs = "wrkReimbursement";
|
|
|
+ var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
+ var divId = "_attachment";
|
|
|
+ $("#addFile"+divId).show();
|
|
|
+ multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
|
|
|
+ }
|
|
|
+
|
|
|
+ function getMoney(value){
|
|
|
+ var money = "0.00";
|
|
|
+ //方法一使用id选择器进行计算。
|
|
|
+ //获取输入的数字
|
|
|
+ //自动计算出结果并填充在相应的输入框中
|
|
|
+ var size = $("#workAccountList tr").length+count;
|
|
|
+ for (var i = 0;i<size;i++){
|
|
|
+ var workAccountmoney = $("#workAccountList"+i+"_money").val();
|
|
|
+ var delFlag = $("#workAccountList"+i+"_delFlag").val();
|
|
|
+ if (workAccountmoney!=undefined && isNumber(workAccountmoney) && delFlag==0){
|
|
|
+ if(money==""){
|
|
|
+ money = parseFloat(workAccountmoney).toFixed(2);
|
|
|
+ }else {
|
|
|
+ money = (parseFloat(money) + parseFloat(workAccountmoney)).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#moneys").val(money);
|
|
|
+ }
|
|
|
+ function getMoneyVATT(index){
|
|
|
+ var money = "0.00";
|
|
|
+ //方法一使用id选择器进行计算。
|
|
|
+ //获取输入的数字
|
|
|
+ //自动计算出结果并填充在相应的输入框中
|
|
|
+ var workmoney = $("#reimbursementVATTaxes"+index+"_money").val();
|
|
|
+ if(parseFloat(workmoney)<0){
|
|
|
+ workmoney=0;
|
|
|
+ $("#reimbursementVATTaxes"+index+"_money").val(0);
|
|
|
+ }
|
|
|
+ if(workmoney==undefined||!isNumber(workmoney)||workmoney==''){
|
|
|
+ workmoney=0;
|
|
|
+ }
|
|
|
+ var taxAmount = $("#reimbursementVATTaxes"+index+"_taxAmount").val();
|
|
|
+ if(parseFloat(taxAmount)<0){
|
|
|
+ taxAmount=0;
|
|
|
+ $("#reimbursementVATTaxes"+index+"_taxAmount").val(0);
|
|
|
+ }
|
|
|
+ if(taxAmount==undefined||!isNumber(taxAmount)||taxAmount==''){
|
|
|
+ taxAmount=0;
|
|
|
+ }
|
|
|
+ if (workmoney!=undefined && isNumber(workmoney) ){
|
|
|
+ money = (parseFloat(taxAmount) + parseFloat(workmoney)).toFixed(2);
|
|
|
+ }
|
|
|
+ $("#reimbursementVATTaxes"+index+"_sumMoney").val(money);
|
|
|
+ }
|
|
|
+
|
|
|
+ function getBackMoney(value){
|
|
|
+ var money = "0.00";
|
|
|
+ var size = $("#reimbursementBackList tr").length;
|
|
|
+ for (var i = 0;i<size;i++){
|
|
|
+ var backmoney = $("#reimbursementBackList"+i+"_6").val();
|
|
|
+ var notRepay = $("#reimbursementBackList"+i+"_5").val();
|
|
|
+ if (backmoney!=undefined && isNumber(backmoney)){
|
|
|
+ if(money==""){
|
|
|
+ money = parseFloat(backmoney).toFixed(2);
|
|
|
+ }else {
|
|
|
+ money = (parseFloat(money) + parseFloat(backmoney)).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#backmoney").val(money);
|
|
|
+ }
|
|
|
+
|
|
|
+ function isNumber(val){
|
|
|
+ if(val === "" || val ==null){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var regPos = /^\d+(\.\d+)?$/; //非负浮点数
|
|
|
+ var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
|
|
|
+ if(regPos.test(val) || regNeg.test(val)){
|
|
|
+ return true;
|
|
|
+ }else{
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function setParentInfo(parentId){
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/reimbursementType/reimbursementType/jsonData",
|
|
|
+ dataType:"json",
|
|
|
+ data:{id:parentId},
|
|
|
+ success:function (data) {
|
|
|
+ if(data.proofread==1&&data.grade==1){
|
|
|
+ $("#maxDeductTr").show();
|
|
|
+ }else {
|
|
|
+ $("#maxDeductTr").hide();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ <style>
|
|
|
+ /*超过5个汉字,调整label的长度,以下是配套的*/
|
|
|
+ .layui-item .layui-form-label{
|
|
|
+ width:90px;
|
|
|
+ }
|
|
|
+ .form-group .layui-item .layui-input-block,
|
|
|
+ .query .layui-input-block {
|
|
|
+ margin-left: 116px;
|
|
|
+ }
|
|
|
+ #workAccountList td{
|
|
|
+ padding-left: 0px;
|
|
|
+ padding-right: 0px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="single-form">
|
|
|
+<div class="container">
|
|
|
+ <form:form id="inputForm" modelAttribute="workReimbursement" action="${ctx}/workreimbursement/workReimbursementAll/save" method="post" class="form-horizontal" >
|
|
|
+ <form:hidden path="id"/>
|
|
|
+ <form:hidden path="achivesId"/>
|
|
|
+ <form:hidden path="submitterId"/>
|
|
|
+ <input type="hidden" id="numberFlag" value="${workReimbursement.number}" />
|
|
|
+ <input id="wId" type="hidden" value="${workReimbursement.id}">
|
|
|
+ <div class="form-group layui-row first">
|
|
|
+ <div class="form-group-label"><h2>基础信息</h2></div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">经办人:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <div class="input-group">
|
|
|
+ <form:input path="submitterName" htmlEscape="false" readonly="true" class="form-control layui-input" value = "${workReimbursement.submitterName}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">报销编号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <div class="input-group">
|
|
|
+ <form:input path="number" id="number" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ <span class="input-group-btn">
|
|
|
+ <label class="form-status"><c:choose><c:when test="${not empty workReimbursement.status}">${fns:getDictLabel(workReimbursement.status, 'audit_state', '')}</c:when><c:otherwise>新添</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">
|
|
|
+ <form:input path="officeName" htmlEscape="false" readonly="true" id="officeName" class="form-control required layui-input" value = "${workReimbursement.officeName}"/>
|
|
|
+ <input type="hidden" id="officeId" name="officeId" value="${workReimbursement.officeId}">
|
|
|
+ </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">
|
|
|
+ <form:input path="bankCard" htmlEscape="false" id="bankCard" minlength="16" maxlength="19" class="form-control number required layui-input" value = "${workReimbursement.bankCard}"/>
|
|
|
+ </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 type="radio" class="i-checks" name="ext" checked id="ext" value="0">
|
|
|
+ <label for="ext">项目报销</label>
|
|
|
+ <input type="radio" class="i-checks" name="ext" id="ext1" value="1">
|
|
|
+ <label for="ext1">非项目报销</label>
|
|
|
+ <%–<input type="text" name="title" lay-verify="title" autocomplete="off" readonly="true" placeholder="" class="layui-input" value="全过程管理用户01">–%>
|
|
|
+ </div>
|
|
|
+ </div>--%>
|
|
|
+
|
|
|
+ <%--<div class="layui-item layui-col-sm6 td1">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>报销项目:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <sys:gridselectReproject url="${ctx}/workreimbursement/workReimbursement/selectReproject" id="project" name="project.id" value="${workReimbursement.project.id}" title="选择报销项目" labelName="project.projectName"
|
|
|
+ labelValue="${workReimbursement.project.projectName}" cssClass="form-control layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName" ></sys:gridselectReproject>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">报销类别:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <sys:treeselectAccessoryNoParent id="reviewParent" name="type" value="${workReimbursement.workReimbursementTypeInfo.id}" labelName="typeName" labelValue="${workReimbursement.workReimbursementTypeInfo.standardDetail}"
|
|
|
+ title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId="${workReimbursement.workReimbursementTypeInfo.id}" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
+ </div>
|
|
|
+ </div>--%>
|
|
|
+ <%--<div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">报销类别:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:select id="type" path="type" class="form-control simple-select ">
|
|
|
+ <form:option value="" label=""/>
|
|
|
+ <form:options items="${fns:getMainDictList('reimbursement_type')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
|
|
|
+ </form:select>
|
|
|
+ </div>
|
|
|
+ </div>--%>
|
|
|
+ <%--<div class="layui-item layui-col-sm6 td1">
|
|
|
+ <label class="layui-form-label">项目负责人:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="projectMasterName" htmlEscape="false" readonly="true" id="projectMasterName" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>--%>
|
|
|
+ <%--<div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label double-line"><span class="require-item">*</span>是否对公报销:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input type="radio" class="i-checks" name="isPublic" checked id="isPublic" value="0">
|
|
|
+ <label for="isPublic">否</label>
|
|
|
+ <input type="radio" class="i-checks" name="isPublic" id="isPublic1" value="1">
|
|
|
+ <label for="isPublic1">是</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 isPublic">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>公司名称:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <div class="input-group">
|
|
|
+ <sys:gridworkSupplier id="comnameId" name="comnameId" value="${workReimbursement.comname}" labelName="comname" labelValue="${workReimbursement.comname}"
|
|
|
+ allowInput="true" title="供应商/客户" url="${ctx}/workreimbursement/workReimbursement/gridSelectComname" cssClass="form-control required layui-input" ></sys:gridworkSupplier>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 isPublic">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>开户行:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="bank" htmlEscape="false" id="bank" class="form-control layui-input" value = "${workReimbursement.bank}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 isPublic">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>银行账号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="bankNo" htmlEscape="false" id="bankNo" minlength="16" maxlength="19" class="form-control number layui-input" value = "${workReimbursement.bankNo}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">申请人:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="userName" htmlEscape="false" readonly="true" id="userName" class="form-control required layui-input" value="${workReimbursement.submitterName}"/>
|
|
|
+ <input type="hidden" id="createById" name="createBy.id" value="${workReimbursement.createBy.id}">
|
|
|
+ </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 id="submitterDate" name="submitterDate" type="text" readonly="true" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
|
|
|
+ value="<fmt:formatDate value="${submitterDate.submitterDate}" pattern="yyyy-MM-dd"/>"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 with-textarea">
|
|
|
+ <label class="layui-form-label ">备注:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" value="${workReimbursement.remarks}" class="form-control "/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>报销详情</h2></div>
|
|
|
+ <div class="layui-item nav-btns">
|
|
|
+ <a class="nav-btn nav-btn-add" onclick="addRow('#workAccountList', workAccountListRowIdx, workAccountListTpl);workAccountListRowIdx = workAccountListRowIdx + 1;" title="新增"><i class="fa fa-plus"></i> 新增</a>
|
|
|
+ </div>
|
|
|
+ <div class="layui-table-body layui-item layui-col-xs12 form-table-container" style="padding:0px">
|
|
|
+ <table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <%--<th width="60px">编号</th>--%>
|
|
|
+ <th width="200px"><font color="red">*</font>报销人</th>
|
|
|
+ <th width="200px">报销部门</th>
|
|
|
+ <th width="200px">报销项目</th>
|
|
|
+ <th width="200px">报告号</th>
|
|
|
+ <th width="200px">报销类型</th>
|
|
|
+ <th width="200px"><font color="red">*</font>费用(元)</th>
|
|
|
+ <th width="200px">收据张数</th>
|
|
|
+ <th width="200px">出差天数</th>
|
|
|
+ <th width="200px">内容</th>
|
|
|
+ <th width="100px">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="workAccountList">
|
|
|
+ <c:if test="${not empty workReimbursement.workAccountList}">
|
|
|
+ <c:forEach items="${workReimbursement.workAccountList}" var="workAccount" varStatus="index">
|
|
|
+ <tr id="workAccountList${index.index}">
|
|
|
+ <td class="hide">
|
|
|
+ <input id="workAccountList${index.index}_id" name="workAccountList[${index.index}].id" type="hidden" value="${workAccount.id}"/>
|
|
|
+ <input id="workAccountList${index.index}_projectRadio" name="workAccountList[${index.index}].projectRadio" type="hidden" value="${workAccount.projectRadio}"/>
|
|
|
+ <input id="workAccountList${index.index}_delFlag" name="workAccountList[${index.index}].delFlag" type="hidden" value="0"/>
|
|
|
+ </td>
|
|
|
+ <%--<td>
|
|
|
+ <div style="width: 60px">
|
|
|
+ <input readonly="readonly" style="text-align: center" value="${index.index+1}" type="text" class="form-control contentDetail"/>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </td>--%>
|
|
|
+ <td>
|
|
|
+ <div class="project_reimbursement_div" style="width: 200px">
|
|
|
+ <sys:reimburtreeselectUser id="workAccountList${index.index}_reimbursementName" name="workAccountList[${index.index}].reimbursementName" value="${projectRecords.leaderIds}" labelName="reimbursementNameName" labelValue="${workAccount.reimbursementName}"
|
|
|
+ title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workAccountList${index.index}_reimbursementNameofficeId" name="workAccountList[${index.index}].officeId" maxlength="32" type="text" value="${workAccount.officeId}" readonly="readonly" class="form-control required"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+
|
|
|
+ <td>
|
|
|
+ <div class="not_project_reimbursement_div" style="width: 200px">
|
|
|
+ <sys:reimburselectReproject url="${ctx}/workreimbursement/workReimbursementAll/selectReproject" id="workAccountList${index.index}_project" name="workAccountList[${index.index}].project.id" value="${workAccount.project.id}" title="选择报销项目" labelName="workAccountList[${index.index}].project.projectName"
|
|
|
+ labelValue="${workAccount.project.projectName}" cssClass="form-control layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName" />
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workAccountList${index.index}_projectReportNumber" name="workAccountList[${index.index}].projectReportNumber" type="text" value="${workAccount.projectReportNumber}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <div class="project_reimbursement_div" style="width: 200px">
|
|
|
+ <sys:treeselectAccessoryNoParent id="workAccountList${index.index}_type" name="workAccountList[${index.index}].type" value="${workAccount.type}" labelName="workAccountList[${index.index}].typeName" labelValue="${workAccount.typeName}"
|
|
|
+ title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId="" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td>
|
|
|
+ <input id="workAccountList${index.index}_money" onchange="getMoney(this.value)" name="workAccountList[${index.index}].money" type="text" value="${workAccount.money}" placeholder="请输入金额" maxlength="10" class="form-control number required"/>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <input id="workAccountList${index.index}_bills" name="workAccountList[${index.index}].bills" type="text" value="${workAccount.bills}" maxlength="32" placeholder="请输入单据张数" class="form-control number"/>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <input id="workAccountList${index.index}_evectionNumber" name="workAccountList[${index.index}].evectionNumber" type="text" value="${workAccount.evectionNumber}" maxlength="32" placeholder="请输入出差天数" class="form-control number"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workAccountList${index.index}_remarks" name="workAccountList[${index.index}].remarks" type="text" value="${workAccount.remarks}" maxlength="32" placeholder="请输入备注" class="form-control"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td class="text-center op-td" >
|
|
|
+ <span class="op-btn op-btn-delete" onclick="delRow(this, '#workAccountList${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </c:if>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <table id="contentMoneys" class="table table-bordered table-condensed can-edit no-bottom-margin details">
|
|
|
+ <thead>
|
|
|
+ <tr style="border: 0px">
|
|
|
+ <td width="200px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
|
|
|
+ <td width="200px"></td>
|
|
|
+ <td width="200px"></td>
|
|
|
+ <td width="200px"></td>
|
|
|
+ <td width="200px"></td>
|
|
|
+ <td width="200px" style="border: 0px">
|
|
|
+ <input htmlEscape="false" style="border: 0px; font-weight: bold;" id="moneys" name="money" readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
|
|
|
+ </td>
|
|
|
+ <td width="200px"></td>
|
|
|
+ <td width="200px"></td>
|
|
|
+ <td width="200px"></td>
|
|
|
+ <td width="100px"></td>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ </table>
|
|
|
+ <script type="text/template" id="workAccountListTpl">//<!--
|
|
|
+ <tr id="workAccountList{{idx}}">
|
|
|
+ <td class="hide">
|
|
|
+ <input id="workAccountList{{idx}}_id" name="workAccountList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
|
|
|
+ <input id="workAccountList{{idx}}_projectRadio" name="workAccountList[{{idx}}].projectRadio" type="hidden" value="{{row.projectRadio}}"/>
|
|
|
+ <input id="workAccountList{{idx}}_delFlag" name="workAccountList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
+ </td>
|
|
|
+ <%--<td>
|
|
|
+ <div style="width: 60px">
|
|
|
+ <input readonly="readonly" style="text-align: center" value="{{idx}}" type="text" class="form-control contentDetail"/>
|
|
|
+ </div>
|
|
|
+ </td>--%>
|
|
|
+ <td>
|
|
|
+ <div class="project_reimbursement_div" style="width: 200px">
|
|
|
+ <sys:reimburtreeselectUser id="workAccountList{{idx}}_reimbursementName" name="workAccountList[{{idx}}].reimbursementName" value="${projectRecords.leaderIds}" labelName="workAccountList[{{idx}}].name" labelValue="{{row.reimbursementName}}"
|
|
|
+ title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <div class="not_project_reimbursement_div" style="width: 200px">
|
|
|
+ <input id="workAccountList{{idx}}_reimbursementNameofficeId" type="text" value="{{row.officeId}}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <div class="not_project_reimbursement_div" style="width: 200px">
|
|
|
+ <sys:reimburselectReproject url="${ctx}/workreimbursement/workReimbursementAll/selectReproject" id="workAccountList{{idx}}_project" name="workAccountList[{{idx}}].project.id" value="${workReimbursement.project.id}" title="选择报销项目" labelName="workAccountList[{{idx}}].project.projectName"
|
|
|
+ labelValue="{{row.projectName}}" cssClass="form-control layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName" ></sys:reimburselectReproject>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workAccountList{{idx}}_projectReportNumber" name="workAccountList[{{idx}}].projectReportNumber" type="text" value="{{row.projectReportNumber}}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <div class="project_reimbursement_div" style="width: 200px">
|
|
|
+ <sys:treeselectAccessoryNoParent id="workAccountList{{idx}}_type" name="workAccountList[{{idx}}].type" value="${workReimbursement.workReimbursementTypeInfo.id}" labelName="workAccountList[{{idx}}].typeName" labelValue="${workReimbursement.workReimbursementTypeInfo.standardDetail}"
|
|
|
+ title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId="" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workAccountList{{idx}}_money" onchange="getMoney(this.value)" name="workAccountList[{{idx}}].money" type="text" value="{{row.money}}" placeholder="请输入费用" maxlength="10" class="form-control number"/>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <input id="workAccountList{{idx}}_bills" name="workAccountList[{{idx}}].bills" type="text" value="{{row.bills}}" maxlength="3" placeholder="请输入单据张数" class="form-control number"/>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <input id="workAccountList{{idx}}_evectionNumber" name="workAccountList[{{idx}}].evectionNumber" type="text" value="{{row.evectionNumber}}" maxlength="3" placeholder="请输入出差天数" class="form-control number"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workAccountList{{idx}}_remarks" name="workAccountList[{{idx}}].remarks" type="text" value="{{row.remarks}}" placeholder="请输入内容" maxlength="32" class="form-control "/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td class="text-center op-td" >
|
|
|
+ {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workAccountList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>{{/delBtn}}
|
|
|
+ </td>
|
|
|
+ </tr>//-->
|
|
|
+ </script>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>专用发票信息</h2></div>
|
|
|
+ <div class="layui-item nav-btns">
|
|
|
+ <a class="nav-btn nav-btn-add" onclick="addRow('#reimbursementVATTaxes', reimbursementVATTaxesRowIdx, reimbursementVATTaxesTpl);reimbursementVATTaxesRowIdx = reimbursementVATTaxesRowIdx + 1;" title="新增"><i class="fa fa-plus"></i> 新增</a>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-xs12 form-table-container">
|
|
|
+ <table id="contentTable2" class="table table-bordered table-condensed can-edit">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th width="300px"><font color="red">*</font>发票代码</th>
|
|
|
+ <th width="200px"><font color="red">*</font>发票号</th>
|
|
|
+ <th width="200px"><font color="red">*</font>金额</th>
|
|
|
+ <th width="200px"><font color="red">*</font>税额</th>
|
|
|
+ <th width="200px"><font color="red">*</font>价税合计</th>
|
|
|
+ <th width="150px">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="reimbursementVATTaxes">
|
|
|
+ <c:if test="${not empty workReimbursement.reimbursementVATTaxes}">
|
|
|
+ <c:forEach items="${workReimbursement.reimbursementVATTaxes}" var="reimbursementVATTaxes" varStatus="index">
|
|
|
+ <tr id="reimbursementVATTaxes${index.index}">
|
|
|
+ <td class="hide">
|
|
|
+ <input id="reimbursementVATTaxes${index.index}_id" name="reimbursementVATTaxes[${index.index}].id" type="hidden" value="${reimbursementVATTaxes.id}"/>
|
|
|
+ <input id="reimbursementVATTaxes${index.index}_delFlag" name="reimbursementVATTaxes[${index.index}].delFlag" type="hidden" value="0"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes${index.index}_invoiceCode" maxlength="10" minlength="10" name="reimbursementVATTaxes[${index.index}].invoiceCode" type="text" maxlength="32" value="${reimbursementVATTaxes.invoiceCode}" placeholder="请输入发票代码" class="form-control required number"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes${index.index}_invoiceNumber" maxlength="8" minlength="8" name="reimbursementVATTaxes[${index.index}].invoiceNumber" type="text" maxlength="32" value="${reimbursementVATTaxes.invoiceNumber}" placeholder="请输入发票号" class="form-control number required"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes${index.index}_money" onchange="getMoneyVATT(${index.index})" name="reimbursementVATTaxes[${index.index}].money" type="text" maxlength="32" value="${reimbursementVATTaxes.money}" placeholder="请输入金额" class="form-control number required"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes${index.index}_taxAmount" onchange="getMoneyVATT(${index.index})" name="reimbursementVATTaxes[${index.index}].taxAmount" type="text" maxlength="32" value="${reimbursementVATTaxes.taxAmount}" placeholder="请输入税额" class="form-control number required"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes${index.index}_sumMoney" readOnly="true" name="reimbursementVATTaxes[${index.index}].sumMoney" type="text" maxlength="32" value="${reimbursementVATTaxes.sumMoney}" class="form-control number required sumMoney"/>
|
|
|
+ </td>
|
|
|
+ <td class="text-center op-td">
|
|
|
+ <span class="op-btn op-btn-delete" onclick="delRowA(this, '#reimbursementVATTaxes${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </c:if>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <script type="text/template" id="reimbursementVATTaxesTpl">//<!--
|
|
|
+ <tr id="reimbursementVATTaxes{{idx}}">
|
|
|
+ <td class="hide">
|
|
|
+ <input id="reimbursementVATTaxes{{idx}}_id" name="reimbursementVATTaxes[{{idx}}].id" type="hidden" value="{{row.id}}"/>
|
|
|
+ <input id="reimbursementVATTaxes{{idx}}_delFlag" name="reimbursementVATTaxes[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes{{idx}}_invoiceCode" maxlength="10" minlength="10" name="reimbursementVATTaxes[{{idx}}].invoiceCode" type="text" value="{{row.invoiceCode}}" maxlength="32" placeholder="请输入发票代码" class="form-control number required"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes{{idx}}_invoiceNumber" maxlength="8" minlength="8" name="reimbursementVATTaxes[{{idx}}].invoiceNumber" type="text" value="{{row.invoiceNumber}}" maxlength="32" placeholder="请输入发票号" class="form-control number required"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes{{idx}}_money" onchange="getMoneyVATT({{idx}})" name="reimbursementVATTaxes[{{idx}}].money" type="text" value="{{row.money}}" maxlength="32" placeholder="请输入金额" class="form-control number required"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes{{idx}}_taxAmount" onchange="getMoneyVATT({{idx}})"name="reimbursementVATTaxes[{{idx}}].taxAmount" type="text" value="{{row.taxAmount}}" maxlength="32" placeholder="请输入税额" class="form-control number required"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="reimbursementVATTaxes{{idx}}_sumMoney" readOnly="true" name="reimbursementVATTaxes[{{idx}}].sumMoney" type="text" value="{{row.sumMoney}}" maxlength="32" class="form-control number required sumMoney"/>
|
|
|
+ </td>
|
|
|
+ <td class="text-center op-td">
|
|
|
+ {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRowA(this, '#reimbursementVATTaxes{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>{{/delBtn}}
|
|
|
+ </td>
|
|
|
+ </tr>//-->
|
|
|
+ </script>
|
|
|
+ <script type="text/javascript">
|
|
|
+ var workAccountListRowIdx = 0, workAccountListTpl = $("#workAccountListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
+ var reimbursementVATTaxesRowIdx = 0, reimbursementVATTaxesTpl = $("#reimbursementVATTaxesTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
+ if($("#id").val()){
|
|
|
+ workAccountListRowIdx = ${fn:length(workReimbursement.workAccountList)};
|
|
|
+ reimbursementVATTaxesRowIdx = ${fn:length(workReimbursement.reimbursementVATTaxes)};
|
|
|
+ }
|
|
|
+ $(document).ready(function() {
|
|
|
+ /*var data = ${fns:toJson(workReimbursement.reimbursementVATTaxes)};
|
|
|
+ for (var i=0; i<data.length; i++){
|
|
|
+ addRow('#reimbursementVATTaxes', reimbursementVATTaxesRowIdx, reimbursementVATTaxesTpl, data[i]);
|
|
|
+ reimbursementVATTaxesRowIdx = reimbursementVATTaxesRowIdx + 1;
|
|
|
+ }*/
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>报销附件信息</h2></div>
|
|
|
+ <div class="layui-item nav-btns">
|
|
|
+ <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
|
|
|
+ </div>
|
|
|
+ <div id="addFile_attachment" style="display: none" class="upload-progress">
|
|
|
+ <span id="fileName_attachment" ></span>
|
|
|
+ <b><span id="baifenbi_attachment" ></span></b>
|
|
|
+ <div class="progress">
|
|
|
+ <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
|
|
|
+ <span id="attachment_title"></span>
|
|
|
+ <div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
+ <table id="upTable" class="table table-bordered table-condensed details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <%-- <th>序号</th>--%>
|
|
|
+ <th>文件预览</th>
|
|
|
+ <th>上传人</th>
|
|
|
+ <th>上传时间</th>
|
|
|
+ <th width="150px">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="file_attachment">
|
|
|
+ <c:forEach items="${workReimbursement.workAttachments}" var = "workClientAttachment" varStatus="status">
|
|
|
+ <tr>
|
|
|
+ <%-- <td>${status.index + 1}</td>--%>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
|
|
|
+ <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ <td>${workClientAttachment.createBy.name}</td>
|
|
|
+ <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
|
|
|
+ <td class="op-td">
|
|
|
+ <div class="op-btn-box" >
|
|
|
+ <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+
|
|
|
+ <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
|
|
|
+ <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
|
|
|
+ </c:if>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group layui-row page-end"></div>
|
|
|
+ </form:form>
|
|
|
+</div>
|
|
|
+</div>
|
|
|
+</body>
|
|
|
+</html>
|