|
@@ -0,0 +1,911 @@
|
|
|
|
+<%@ 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" src="${ctxStatic}/layui/layui.js"></script>
|
|
|
|
+ <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
|
|
|
|
+ <style>
|
|
|
|
+ #workInvoiceProjectRelationList td{
|
|
|
|
+ padding-left: 0px;
|
|
|
|
+ padding-right: 0px;
|
|
|
|
+ }
|
|
|
|
+ </style>
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
+ var validateForm;
|
|
|
|
+ var count = 0;
|
|
|
|
+ var numcount=0;//验证导入发票号是否重复
|
|
|
|
+ function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
|
+ if(validateForm.form()){
|
|
|
|
+ var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
|
|
|
|
+ $("#opinion").val(ss);
|
|
|
|
+ if(obj == 1) {
|
|
|
|
+ //非空验证
|
|
|
|
+ var ff=true;
|
|
|
|
+ $(".judgment").each(function(){
|
|
|
|
+ var zhi=$(this).val();
|
|
|
|
+ if (''==zhi || null == zhi){
|
|
|
|
+ $(this).css("border","1px solid red")
|
|
|
|
+ ff=false;
|
|
|
|
+ }else{
|
|
|
|
+ $(this).css("border","1px solid #f1f1f1")
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ if (!ff){
|
|
|
|
+ parent.layer.msg("发票号或开票金额未填写完整!", {icon: 5});
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ $("#flag").val("yes");
|
|
|
|
+ }else {
|
|
|
|
+ $("#flag").val("no");
|
|
|
|
+ }
|
|
|
|
+ if( obj == 1 && $("#workAccountList tr").length==0){
|
|
|
|
+ top.layer.alert('请添加发票明细!', {icon: 0});
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var m = ${workInvoice.money};
|
|
|
|
+ var money = "0.00";
|
|
|
|
+ //自动计算出结果并填充在相应的输入框中
|
|
|
|
+ var size = $("#workAccountList tr").length+count;
|
|
|
|
+ for (var i = 0;i<size;i++){
|
|
|
|
+ var _totalMoney = $("#workAccountList"+i+"_totalMoney").val();
|
|
|
|
+
|
|
|
|
+ var delFlag = $("#workAccountList"+i+"_delFlag").val();
|
|
|
|
+ if (_totalMoney!=undefined && isNumber(_totalMoney) && delFlag==0){
|
|
|
|
+ if(money==""){
|
|
|
|
+ money = parseFloat(_totalMoney).toFixed(2);
|
|
|
|
+ }else {
|
|
|
|
+ money = (parseFloat(money) + parseFloat(_totalMoney)).toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(obj == 1 && money != m ){
|
|
|
|
+ top.layer.alert('发票明细总开票金额与主信息开票金额不等,请重新填写!', {icon: 0});
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $("#inputForm").submit();
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
+ layui.use('form', function () {
|
|
|
|
+ var form = layui.form;
|
|
|
|
+ form.render();
|
|
|
|
+ });
|
|
|
|
+ $("#name").focus();
|
|
|
|
+ validateForm = $("#inputForm").validate({
|
|
|
|
+ submitHandler: function(form){
|
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
|
+ form.submit();
|
|
|
|
+ },
|
|
|
|
+ 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: '#invoiceDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
|
|
|
|
+ event: 'focus', //响应事件。如果没有传入event,则按照默认的click
|
|
|
|
+ type : 'date'
|
|
|
|
+, trigger: 'click'
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ laydate.render({
|
|
|
|
+ elem: '#takeDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
|
|
|
|
+ event: 'focus', //响应事件。如果没有传入event,则按照默认的click
|
|
|
|
+ type : 'date'
|
|
|
|
+, trigger: 'click'
|
|
|
|
+ });
|
|
|
|
+ String.prototype.endWith=function(endStr){
|
|
|
|
+ var d=this.length-endStr.length;
|
|
|
|
+ return (d>=0&&this.lastIndexOf(endStr)==d)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ function addRow(list, idx, tpl, row,flag){
|
|
|
|
+ var idx1 = $("#workAccountList tr").length;
|
|
|
|
+ if(list == '#workAccountList' && idx1 < 100){
|
|
|
|
+ bornTemplete(list, idx, tpl, row, idx1);
|
|
|
|
+ if($("#invoiceType").val()=="专票"){
|
|
|
|
+ $("#workAccountList"+idx+"_code").attr("minlength","10");
|
|
|
|
+ $("#workAccountList"+idx+"_code").attr("maxlength","10");
|
|
|
|
+ }else if($("#invoiceType").val()=="普票"){
|
|
|
|
+ $("#workAccountList"+idx+"_code").attr("minlength","12");
|
|
|
|
+ $("#workAccountList"+idx+"_code").attr("maxlength","12");
|
|
|
|
+ }
|
|
|
|
+ if (idx==0 && flag){
|
|
|
|
+ $("#workAccountList"+idx+"_totalMoney").val(row);
|
|
|
|
+ }
|
|
|
|
+ //$("#workAccountList"+idx+"_number").val(("0000000" + 100000000 * Math.random()).match(/(\d{8})(\.|$)/)[1]);
|
|
|
|
+ // if(idx>0){
|
|
|
|
+ // var i = idx-1;
|
|
|
|
+ // var code = $("#workAccountList"+i+"_code").val();
|
|
|
|
+ // if(code == null || code == undefined || code == ""){
|
|
|
|
+ // i = idx-2;
|
|
|
|
+ // code = $("#workAccountList"+i+"_code").val();
|
|
|
|
+ // }
|
|
|
|
+ // $("#workAccountList"+idx+"_code").val(code);
|
|
|
|
+ //
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ 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) {
|
|
|
|
+ count++;
|
|
|
|
+ var id = $(prefix + "_id");
|
|
|
|
+ var delFlag = $(prefix + "_delFlag");
|
|
|
|
+ if (id.val() == "") {
|
|
|
|
+ $(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");
|
|
|
|
+ }
|
|
|
|
+ // var idx1 = $("#workAccountList tr").length; //tr 总数
|
|
|
|
+ // for (var i = 0; i < idx1; i++) {
|
|
|
|
+ // $("#workAccountList tr").eq(i).find("td").eq(1).html(i + 1);
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
|
|
+ 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 setVs(obj){
|
|
|
|
+ var a = $(obj).attr("id");
|
|
|
|
+ var b = a.replace('allPrice','proportion');
|
|
|
|
+ var value = obj.value;
|
|
|
|
+ var p = $("#price").val() || 0;
|
|
|
|
+ if(!p || p == 0){
|
|
|
|
+ parent.layer.msg("请先填写造价指标,且不能为零",{icon:5});
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var num = value/p ;
|
|
|
|
+ if(!/^\d+(\.\d{1,2})?$/.test( value )){
|
|
|
|
+ parent.layer.msg("合价必须输入数字",{icon:5});
|
|
|
|
+ }else{
|
|
|
|
+ $("#" + b ).val(parseFloat(num.toFixed(2)));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ function setTaxMoney(obj){
|
|
|
|
+ var a = $(obj).attr("id");
|
|
|
|
+ //金额
|
|
|
|
+ var b = a.replace('tax','taxMoney');
|
|
|
|
+ //开票金额
|
|
|
|
+ var t = a.replace('tax','totalMoney');
|
|
|
|
+ //税额
|
|
|
|
+ var tr = a.replace('tax','taxRate');
|
|
|
|
+ var value = obj.value || 0;
|
|
|
|
+ if(!value){
|
|
|
|
+ parent.layer.msg("请正确填写税率",{icon:5});
|
|
|
|
+ $("#" + b ).val("");
|
|
|
|
+ $("#" + tr ).val("");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var m = ${workInvoice.money};
|
|
|
|
+ var t2 = $("#" + t ).val();
|
|
|
|
+ if(!/^\d+(\.\d{1,4})?$/.test( t2 )){
|
|
|
|
+ parent.layer.msg("请正确填写开票金额",{icon:5});
|
|
|
|
+ return;
|
|
|
|
+ }/*else if(t2 > m) {
|
|
|
|
+ $("#" + b ).val("");
|
|
|
|
+ $("#" + tr ).val("");
|
|
|
|
+ parent.layer.msg("所填值大于发票总开票金额",{icon:5});
|
|
|
|
+ return;
|
|
|
|
+ }*/
|
|
|
|
+ var tax = 1 + value/100;
|
|
|
|
+ var p = $("#" + t ).val() || 0;//获取开票金额
|
|
|
|
+ if(!p || p == 0){
|
|
|
|
+ parent.layer.msg("请先填写开票金额,且不能为零",{icon:5});
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var num = p/tax || 0;
|
|
|
|
+ $("#" + b ).val(parseFloat(num.toFixed(2)));
|
|
|
|
+ var taxRate = p - num;
|
|
|
|
+ $("#" + tr ).val(parseFloat(taxRate.toFixed(2)));
|
|
|
|
+ }
|
|
|
|
+ function setCheck(obj){
|
|
|
|
+ var aa = $(obj).attr("id");
|
|
|
|
+ //金额
|
|
|
|
+ var b = aa.replace('totalMoney','taxMoney');
|
|
|
|
+ //税额
|
|
|
|
+ var tr = aa.replace('totalMoney','taxRate');
|
|
|
|
+ //开票金额
|
|
|
|
+ var t = aa.replace('totalMoney','totalMoney');
|
|
|
|
+ var tm = $("#" + t ).val();
|
|
|
|
+ //税率
|
|
|
|
+ var sl = aa.replace('totalMoney','tax');
|
|
|
|
+ var sc = $("#" + sl ).val();
|
|
|
|
+ //处理百分比税率
|
|
|
|
+ var tax = 1 + sc/100;
|
|
|
|
+
|
|
|
|
+ $("#" + b ).val("");
|
|
|
|
+ $("#" + tr ).val("");
|
|
|
|
+ var m = ${workInvoice.money};
|
|
|
|
+ var a = obj.value;
|
|
|
|
+ /*if(a > m) {
|
|
|
|
+ $("#" + b ).val("");
|
|
|
|
+ $("#" + tr ).val("");
|
|
|
|
+ parent.layer.msg("所填值大于发票总开票金额",{icon:5});
|
|
|
|
+ return;
|
|
|
|
+ }else{*/
|
|
|
|
+ var num = tm/tax || 0;
|
|
|
|
+ $("#" + b ).val(parseFloat(num.toFixed(2)));
|
|
|
|
+ var taxRate = tm - num;
|
|
|
|
+ $("#" + tr ).val(parseFloat(taxRate.toFixed(2)));
|
|
|
|
+ /*}*/
|
|
|
|
+ }
|
|
|
|
+ function getMoney(value,obj){
|
|
|
|
+ /*var aa = $(obj).attr("id");
|
|
|
|
+ //金额
|
|
|
|
+ var b = aa.replace('totalMoney','taxMoney');
|
|
|
|
+ console.log("b====="+b);
|
|
|
|
+ //税额
|
|
|
|
+ var tr = aa.replace('totalMoney','taxRate');
|
|
|
|
+ //开票金额
|
|
|
|
+ var t = aa.replace('totalMoney','totalMoney');
|
|
|
|
+ var tm = $("#" + t ).val();
|
|
|
|
+ //税率
|
|
|
|
+ var sl = aa.replace('totalMoney','tax');
|
|
|
|
+ var sc = $("#" + sl ).val();
|
|
|
|
+ //处理百分比税率
|
|
|
|
+ var tax = 1 + sc/100;
|
|
|
|
+
|
|
|
|
+ var m = ${workInvoice.money};
|
|
|
|
+ var money = "0.00";
|
|
|
|
+ //自动计算出结果并填充在相应的输入框中
|
|
|
|
+ var size = $("#workAccountList tr").length+count;
|
|
|
|
+ for (var i = 0;i<size;i++){
|
|
|
|
+ var _totalMoney = $("#workAccountList"+i+"_totalMoney").val();
|
|
|
|
+
|
|
|
|
+ var delFlag = $("#workAccountList"+i+"_delFlag").val();
|
|
|
|
+ if (_totalMoney!=undefined && isNumber(_totalMoney) && delFlag==0){
|
|
|
|
+ if(money==""){
|
|
|
|
+ money = parseFloat(_totalMoney).toFixed(2);
|
|
|
|
+ }else {
|
|
|
|
+ money = (parseFloat(money) + parseFloat(_totalMoney)).toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(money >m){
|
|
|
|
+ console.log("money--------"+money);
|
|
|
|
+ $("#" + aa ).val("");
|
|
|
|
+ $("#" + b ).val("");
|
|
|
|
+ $("#" + tr ).val("");
|
|
|
|
+ parent.layer.msg("发票明细开票金额总值大于主申请发票开票金额",{icon:5});
|
|
|
|
+ return;
|
|
|
|
+ }else{
|
|
|
|
+ var num = tm/tax || 0;
|
|
|
|
+ $("#" + b ).val(parseFloat(num.toFixed(2)));
|
|
|
|
+ var taxRate = tm - num;
|
|
|
|
+ $("#" + tr ).val(parseFloat(taxRate.toFixed(2)));
|
|
|
|
+ }*/
|
|
|
|
+ }
|
|
|
|
+ function setV(obj){
|
|
|
|
+ var a = $(obj).attr("id");
|
|
|
|
+ var c = "京";
|
|
|
|
+ var date=new Date;
|
|
|
|
+ var year=date.getFullYear();
|
|
|
|
+ var month=date.getMonth()+1;
|
|
|
|
+ month =(month<10 ? "0"+month:month);
|
|
|
|
+ var mydate = (year.toString()+month.toString());
|
|
|
|
+ var timestamp="["+mydate+"]";//获取固定格式年月
|
|
|
|
+ var number = c+timestamp;
|
|
|
|
+ $("#" + a ).val(number);
|
|
|
|
+ }
|
|
|
|
+ function checkSame(obj){
|
|
|
|
+ var value =obj.value;
|
|
|
|
+ var a = $(obj).attr("id");
|
|
|
|
+ var idx = a.replace('_number','');
|
|
|
|
+ var idxx = idx.replace('workAccountList','')
|
|
|
|
+ var b = a.replace('number','oldNumber');
|
|
|
|
+ var oldValue = $("#" + b ).val();
|
|
|
|
+ var size = $("#workAccountList tr").length+count;
|
|
|
|
+ for (var i = 0;i<size;i++){
|
|
|
|
+ var _number = $("#workAccountList"+i+"_number").val();
|
|
|
|
+ var delFlag = $("#workAccountList"+i+"_delFlag").val();
|
|
|
|
+ if (_number!=undefined&& delFlag==0 && i!= idxx ){
|
|
|
|
+ if(_number == value){
|
|
|
|
+ $("#" + a ).val("");
|
|
|
|
+ numcount++;
|
|
|
|
+ parent.layer.msg("重复的发票号,请重新输入",{icon:5});
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:'post',
|
|
|
|
+ url:'${ctx}/workinvoicedetail/workInvoiceDetail/checkSame',
|
|
|
|
+ data:{
|
|
|
|
+ "number":value,"oldNumber":oldValue
|
|
|
|
+ },
|
|
|
|
+ success:function(data){
|
|
|
|
+ if("false" == data){
|
|
|
|
+ $("#" + a ).val("");
|
|
|
|
+ numcount++;
|
|
|
|
+ parent.layer.msg("重复的发票号,请重新输入",{icon:5});
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ function openDialogreExcel(title,url,width,height,target){
|
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width='auto';
|
|
|
|
+ height='auto';
|
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ top.layer.open({
|
|
|
|
+ type: 1,
|
|
|
|
+ area: [500,300],
|
|
|
|
+ title:"导入数据",
|
|
|
|
+ skin: 'three-btns with-demo',
|
|
|
|
+ content:$("#import").html() ,
|
|
|
|
+ btn: ['导入全部','仅导入当前纳税人识别号', '关闭'],
|
|
|
|
+ btn1: function(index, layero){
|
|
|
|
+ var impType='0';
|
|
|
|
+ importExcel(impType,url)
|
|
|
|
+ top.layer.close(index);
|
|
|
|
+ },
|
|
|
|
+ btn2: function(index, layero){
|
|
|
|
+ var impType='1';
|
|
|
|
+ importExcel(impType,url)
|
|
|
|
+ top.layer.close(index);
|
|
|
|
+ },
|
|
|
|
+ btn3: function(index){
|
|
|
|
+ top.layer.close(index);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function importExcel(impType,url){
|
|
|
|
+ var orUnicode=$("#orUnicode").val();
|
|
|
|
+ var invoiceType=$("#invoiceType").val();
|
|
|
|
+ url=url+"?impType="+encodeURIComponent(impType)+"&orUnicode="+encodeURIComponent(orUnicode)+"&invoiceType="+encodeURIComponent(invoiceType);
|
|
|
|
+ var formData = new FormData();
|
|
|
|
+ formData.append("file",top.$("#uploadFile")[0].files[0]);
|
|
|
|
+ var obj =top.$("#uploadFile")[0].files[0];
|
|
|
|
+ if(obj==undefined){
|
|
|
|
+ parent.layer.alert('请选择上传文件',{icon:0,title:'系统提示'});
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var fileType = obj.name;
|
|
|
|
+ if(!fileType.endWith("xml")){
|
|
|
|
+ top.layer.alert('请上传*.xml格式的文件',{icon:0,title:'系统提示'});
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: 'post',
|
|
|
|
+ url:url,
|
|
|
|
+ data: formData,
|
|
|
|
+ dataType: "json",
|
|
|
|
+ cache: false,
|
|
|
|
+ processData: false,
|
|
|
|
+ contentType: false,
|
|
|
|
+ }).success(function (data) {
|
|
|
|
+ for (var i = 0; i < data.data.length; i++) {
|
|
|
|
+ addExcelRow('#workAccountList', workAccountListRowIdx, workAccountListTpl,data.data[i]);
|
|
|
|
+ if($("#invoiceType").val()=="专票"){
|
|
|
|
+ $("#workAccountList"+workAccountListRowIdx+"_code").attr("minlength","10");
|
|
|
|
+ $("#workAccountList"+workAccountListRowIdx+"_code").attr("maxlength","10");
|
|
|
|
+ }else if($("#invoiceType").val()=="普票"){
|
|
|
|
+ $("#workAccountList"+workAccountListRowIdx+"_code").attr("minlength","12");
|
|
|
|
+ $("#workAccountList"+workAccountListRowIdx+"_code").attr("maxlength","12");
|
|
|
|
+ }
|
|
|
|
+ workAccountListRowIdx=workAccountListRowIdx+1;
|
|
|
|
+ }
|
|
|
|
+ if(numcount>0){
|
|
|
|
+ top.layer.alert(data.message+" 存在发票号重复数据!",{icon:5});
|
|
|
|
+ }else{
|
|
|
|
+ top.layer.alert(data.message,{icon:5});
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }).error(function () {
|
|
|
|
+ top.layer.msg("导入文件失败!");
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function addExcelRow(list, idx, tpl, row){
|
|
|
|
+ var idx1 = $("#workAccountList tr").length;
|
|
|
|
+ bornTemplete(list, idx, tpl, row, idx1);
|
|
|
|
+ $("#workAccountList"+idx+"_number").change();
|
|
|
|
+ }
|
|
|
|
+ </script>
|
|
|
|
+</head>
|
|
|
|
+<body>
|
|
|
|
+<div class="single-form">
|
|
|
|
+ <div class="container">
|
|
|
|
+ <form:form id="inputForm" modelAttribute="workInvoice" action="${ctx}/workinvoice/workInvoice/saveWorkInvoiceNotProjectAudit" method="post" class="form-horizontal layui-form">
|
|
|
|
+ <form:hidden path="id"/>
|
|
|
|
+ <form:hidden path="home"/>
|
|
|
|
+ <form:hidden path="act.taskId"/>
|
|
|
|
+ <form:hidden path="act.taskName"/>
|
|
|
|
+ <form:hidden path="act.taskDefKey"/>
|
|
|
|
+ <form:hidden path="act.procInsId"/>
|
|
|
|
+ <form:hidden path="act.procDefId"/>
|
|
|
|
+ <form:hidden id="flag" path="act.flag"/>
|
|
|
|
+ <c:set var="status" value="${workInvoice.act.status}" />
|
|
|
|
+ <input type="hidden" id="opinion" name="act.comment" value="" maxlength="255">
|
|
|
|
+ <div class="form-group layui-row first lw14">
|
|
|
|
+ <div class="form-group-label"><h2>基本信息</h2></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>
|
|
|
|
+<%-- <th width="100px">操作</th>--%>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody id="workInvoiceProjectRelationList">
|
|
|
|
+ <c:forEach items="${workInvoice.workInvoiceProjectRelationList}" var="list">
|
|
|
|
+ <tr>
|
|
|
|
+ <td>
|
|
|
|
+ <input type="text" value="${list.projectName}" readonly="readonly" class="form-control"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input type="text" value="${list.workContractName}" readonly="readonly" class="form-control"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td style="text-align:center;">
|
|
|
|
+ <input type="text" value="${list.projectNum}" readonly="readonly" class="form-control"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input type="text" value="${list.clientName}" readonly="readonly" class="form-control"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input type="text" value="${list.reportDataNum}" readonly="readonly" class="form-control"/>
|
|
|
|
+ </td>
|
|
|
|
+<%-- <td class="text-center op-td" >--%>
|
|
|
|
+<%-- {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workInvoiceProjectRelationList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>{{/delBtn}}--%>
|
|
|
|
+<%-- </td>--%>
|
|
|
|
+ </tr>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <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" readonly="true" class="form-control layui-input" value="<c:choose><c:when test="${workInvoice.ext eq '0'}">本公司开票 </c:when><c:when test="${workInvoice.ext eq '1'}">上级公司开票</c:when></c:choose>"/>
|
|
|
|
+ </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" id="invoiceType" class="form-control layui-input" value="<c:choose><c:when test="${workInvoice.invoiceType eq '1'}">专票</c:when><c:when test="${workInvoice.invoiceType eq '2'}">普票</c:when></c:choose>"/>
|
|
|
|
+ </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" class="form-control layui-input" value="${workInvoice.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" id="orUnicode" class="form-control layui-input" value="${workInvoice.orUnicode}"/>
|
|
|
|
+ </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" class="form-control layui-input" value="${workInvoice.address}"/>
|
|
|
|
+ </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" class="form-control layui-input" value="${workInvoice.telephone}"/>
|
|
|
|
+ </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" class="form-control layui-input" value="${workInvoice.bank}"/>
|
|
|
|
+ </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" class="form-control layui-input" value="${workInvoice.bankNumber}"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">收款类型:</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <input id="chargeType" htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.chargeType}" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">开票内容:</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <input id="billingContent" htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.billingContent}" />
|
|
|
|
+ </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="kaipiao" htmlEscape="false" readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${workInvoice.money}" pattern="##00.00"/>"/>
|
|
|
|
+ </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" class="form-control layui-input" value="${workInvoice.content}"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">开票人:</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <form:input path="drawerName" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">开票时间:</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <input class="form-control layer-date laydate-icon layui-input laydate-icondate" id="invoiceDate" name="invoiceDate" 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">
|
|
|
|
+ <input placeholder="请选择领票时间" class="form-control layer-date laydate-icon layui-input laydate-icondate" id="takeDate" name="takeDate" value="<fmt:formatDate
|
|
|
|
+ value="${workInvoice.takeDate}" 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 type="text" readonly="true" value="${workInvoice.accountCheckingUserName}" class="form-control layui-input" style="background-color: #f1f1f1" >
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
|
+ <label class="layui-form-label">对账地区:</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <input type="text" readonly="true" value="${workInvoice.area.name}" class="form-control layui-input" style="background-color: #f1f1f1" >
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm12 with-textarea">
|
|
|
|
+ <label class="layui-form-label double-line">备注:</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <form:textarea path="remarks" readonly="true" htmlEscape="false" rows="4" class="form-control" style="background-color: #f1f1f1" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+<%-- <div class="form-group layui-row">--%>
|
|
|
|
+<%-- <div class="form-group-label"><h2>审批意见</h2></div>--%>
|
|
|
|
+<%-- <div class="layui-item layui-col-sm8 lw6 with-textarea">--%>
|
|
|
|
+<%-- <div class="layui-input-block" style="margin-left:10px;position: relative">--%>
|
|
|
|
+<%-- <form:textarea placeholder="请输入意见:" path="act.comment" id="opinion" class="form-control" rows="4" cssStyle="height: 200px;" maxlength="127" />--%>
|
|
|
|
+<%-- <a id="clearOpinon" class="layui-btn" style="position: absolute;bottom: 10px;right: 20px;">清空</a>--%>
|
|
|
|
+<%-- <input type="file" name="upload_files" style="display: none;">--%>
|
|
|
|
+<%-- </div>--%>
|
|
|
|
+<%-- </div>--%>
|
|
|
|
+<%-- <div class="layui-item layui-col-sm4 lw6 with-textarea">--%>
|
|
|
|
+<%-- <div class="layui-input-block" style="margin-left:10px;">--%>
|
|
|
|
+<%-- <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="同意" title="同意" style="cursor:pointer" class="apen"/></div>--%>
|
|
|
|
+<%-- <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="不同意" title="不同意" style="cursor:pointer" class="apen"/></div>--%>
|
|
|
|
+<%-- <div style="padding: 5px 0px;"><input type="checkbox" lay-filter="raopinion" name="sh" value="请领导审核" title="请领导审核" style="cursor:pointer" class="apen"/></div>--%>
|
|
|
|
+<%-- <div style="padding: 5px 0px;">--%>
|
|
|
|
+<%-- <form:select path="act.comment" id="auditOpinion" lay-filter="opinion" lay-verify="opinion" class="form-control simple-select">--%>
|
|
|
|
+<%-- <form:option value=""/>--%>
|
|
|
|
+<%-- <form:options items="${fns:getMainDictListOnProjectAdvent('audit_opinion_template')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
|
|
|
|
+<%-- </form:select>--%>
|
|
|
|
+<%-- </div>--%>
|
|
|
|
+<%-- </div>--%>
|
|
|
|
+<%-- </div>--%>
|
|
|
|
+<%-- </div>--%>
|
|
|
|
+<%-- <div class="layui-item layui-col-sm12 with-textarea">--%>
|
|
|
|
+<%-- <label class="layui-form-label">审批意见:</label>--%>
|
|
|
|
+<%-- <div class="layui-input-block">--%>
|
|
|
|
+<%-- <form:textarea path="act.comment" class="form-control " rows="5" maxlength="20"/>--%>
|
|
|
|
+<%-- </div>--%>
|
|
|
|
+<%-- </div>--%>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group layui-row">
|
|
|
|
+ <div class="form-group-label"><h2>附件信息</h2></div>
|
|
|
|
+ <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="200px">操作</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody id="file_attachment">
|
|
|
|
+ <c:forEach items="${workInvoice.workAttachments}" var = "workClientAttachment" varStatus="status">
|
|
|
|
+ <tr>
|
|
|
|
+ <%-- <td>${status.index + 1}</td>--%>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${workInvoice.uploadMode == 2}">
|
|
|
|
+ <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.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <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="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </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" >
|
|
|
|
+ <%--附件下载删除--%>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${workInvoice.uploadMode == 2}">
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
|
+ <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ <c:if test="${workClientAttachment.collectFlag != 1}">
|
|
|
|
+ <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>
|
|
|
|
+ </c:if>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </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>
|
|
|
|
+ <a href="javascript:void(0)" onclick="openDialogreExcel('导入数据', '${ctx}/workAccount/workAccount/import','90%','90%')" class="nav-btn nav-btn-import" ><i class="fa fa-plus"></i> 导入</a>
|
|
|
|
+ <div id="import" class="hide" style="padding: 5px">
|
|
|
|
+ <input id="uploadFile" name="file" type="file" style="width:330px"/>导入文件不能超过5M,仅允许导入“xml”格式文件!<br/>
|
|
|
|
+ <%--<input type="radio" name="impType" checked id="all" value="0">
|
|
|
|
+ <label for="all">导入全部</label>
|
|
|
|
+ <input type="radio" name="impType" id="noAll" value="1">
|
|
|
|
+ <label for="noAll">仅导入当前纳税人识别号</label>--%>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-xs12 form-table-container">
|
|
|
|
+ <table id="contentTable" class="table table-bordered table-condensed can-edit">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th>发票代码</th>
|
|
|
|
+ <th class="judgment-item"><span class="require-item">*</span>发票号</th>
|
|
|
|
+ <th class="judgment-item"><span class="require-item">*</span>开票金额</th>
|
|
|
|
+ <th width="80px">税率</th>
|
|
|
|
+ <th width="100px">金额</th>
|
|
|
|
+ <th width="100px">税额</th>
|
|
|
|
+ <%--<th width="100px">累计登记金额</th>--%>
|
|
|
|
+ <th width="80px">操作</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>--%>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody id="workAccountList">
|
|
|
|
+
|
|
|
|
+ </tbody>
|
|
|
|
+ </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}}_delFlag" name="workAccountList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input id="workAccountList{{idx}}_code" name="workAccountList[{{idx}}].code" type="text" value="{{row.code}}" class="form-control number"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input id="workAccountList{{idx}}_number" name="workAccountList[{{idx}}].number" onchange="checkSame(this)" type="text" value="{{row.number}}" minlength="8" maxlength="8" class="form-control number judgment"/>
|
|
|
|
+ <input type="hidden" id="workAccountList{{idx}}_oldNumber" value="{{row.number}}"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input id="workAccountList{{idx}}_totalMoney" onblur="setCheck(this)" onchange="getMoney(this.value,this)" name="workAccountList[{{idx}}].totalMoney" type="text" value="{{row.totalMoney}}" class="form-control number judgment"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <div class="input-group">
|
|
|
|
+ <input id="workAccountList{{idx}}_tax" onblur="setTaxMoney(this)" name="workAccountList[{{idx}}].tax" type="text" value="{{row.tax}}" class="form-control number"/><span class="input-group-addon input-height">%</span>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input id="workAccountList{{idx}}_taxMoney" name="workAccountList[{{idx}}].taxMoney" type="text" value="{{row.taxMoney}}" class="form-control number"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input id="workAccountList{{idx}}_taxRate" name="workAccountList[{{idx}}].taxRate" type="text" value="{{row.taxRate}}" class="form-control number"/>
|
|
|
|
+ </td>
|
|
|
|
+ <%--<td>
|
|
|
|
+ <input id="workAccountList{{idx}}_incomeMoney" name="workAccountList[{{idx}}].incomeMoney" type="text" value="0" readonly="true" class="form-control"/>
|
|
|
|
+ </td>--%>
|
|
|
|
+
|
|
|
|
+ <input id="workAccountList{{idx}}_state" name="workAccountList[{{idx}}].state" type="hidden" value="正常" class="form-control"/>
|
|
|
|
+
|
|
|
|
+ <input id="workAccountList{{idx}}_backSign" name="workAccountList[{{idx}}].backSign" type="hidden" value="正常" readonly="true" class="form-control"/>
|
|
|
|
+
|
|
|
|
+ <input id="workAccountList{{idx}}_backNumber" name="workAccountList[{{idx}}].backNumber" type="hidden" value="" readonly="true" class="form-control "/>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <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>
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
+ var workAccountListRowIdx = 0, workAccountListTpl = $("#workAccountListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
+ var data = ${fns:toJson(workInvoice.workAccountList)};
|
|
|
|
+ var kaipiao=$("#kaipiao").val();
|
|
|
|
+ if (data.length==0){
|
|
|
|
+ addRow('#workAccountList', workAccountListRowIdx, workAccountListTpl, kaipiao,"true");
|
|
|
|
+ workAccountListRowIdx = workAccountListRowIdx + 1;
|
|
|
|
+ }
|
|
|
|
+ for (var i=0; i<data.length; i++){
|
|
|
|
+ addRow('#workAccountList', workAccountListRowIdx, workAccountListTpl, data[i]);
|
|
|
|
+ workAccountListRowIdx = workAccountListRowIdx + 1;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ function f1(row) {
|
|
|
|
+ // window.parent.document.getElementById('opinion').value = row;
|
|
|
|
+ $("#opinion").val(row)
|
|
|
|
+ }
|
|
|
|
+ function openDialogre(title,url,width,height,target,buttons) {
|
|
|
|
+ if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width = 'auto';
|
|
|
|
+ height = 'auto';
|
|
|
|
+ } else {//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+ }
|
|
|
|
+ var split = buttons.split(",");
|
|
|
|
+ top.layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ area: [width, height],
|
|
|
|
+ title: title,
|
|
|
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
|
+ skin: 'three-btns',
|
|
|
|
+ content: url,
|
|
|
|
+ btn: split,
|
|
|
|
+ btn1: function(index, layero){
|
|
|
|
+ top.layer.close(index)
|
|
|
|
+ document.getElementById('iframe').contentWindow.location.reload();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ </script>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <div class="form-group layui-row page-end"></div>
|
|
|
|
+ </form:form>
|
|
|
|
+ <div class="form-group-label">
|
|
|
|
+ <div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('个人模板列表', '${ctx}/auditTemplate/auditTemplate/templateList?identification=${identification}&name=${identificationName}','80%', '70%','','关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 审核意见模板列表</a></div>
|
|
|
|
+ <h2>审批意见</h2>
|
|
|
|
+ </div>
|
|
|
|
+ <iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
|
|
|
|
+
|
|
|
|
+ <div class="form-group layui-row">
|
|
|
|
+ <div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
|
|
|
|
+ <div class="layui-item layui-col-xs12 form-table-container" >
|
|
|
|
+ <act:flowChart procInsId="${workInvoice.act.procInsId}"/>
|
|
|
|
+ <act:histoicFlow procInsId="${workInvoice.act.procInsId}" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+</body>
|
|
|
|
+</html>
|