123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
- <meta http-equiv="Cache-Control" content="no-siteapp"/>
- <#include "/base/add_base.ftl">
- <style>
- .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
- .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
- .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
- .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
- #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
- .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
- .ac_results li {border:1px solid #fff}
- .ac_results li a span {float:right}
- .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
- .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 15px;}
- .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
- .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
- .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent #32a3d8 transparent transparent;font-size:0; line-height:0;}
- .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
- .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
- .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
- .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
- .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
- .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
- .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent transparent transparent #32a3d8;font-size:0; line-height:0;}
- .time-line-list>li:first-child .arrow{display: none;}
- .table-bg th{background-color: #e2f6ff;}
- .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
- .msg-phone{height: 35px;line-height: 35px;}
- .col-sm-1{width: 150px;}
- .all_down{text-decoration: underline;color: #00c;}
- </style>
- <title>发票上传 - 发票管理 - RST</title>
- </head>
- <body>
- <article class="page-container" style="padding: 10px;">
- <div class="pd-20 cl">
- <form action="${path}/admin/ei_billing/update_file" method="post" class="form form-horizontal" id="form-order-add" onkeydown="if(event.keyCode==13)return false;">
- <input type="hidden" id="billId" name="billId" value="${billId}">
- <input type="hidden" id="billInvoiceFileUrl" name="billInvoiceFileUrl" value="">
- <div class="row cl">
- <label class="form-label col-1 col-sm-1" style="float: left;text-align: right;"><span class="c-red">*</span>PDF文件:</label>
- <div class="formControls col-8 col-sm-8" style="margin-top: 3px;float: left;">
- <div class="select_invo" style="display: none;float: left;"><a href="javascript:void(0)" class=" all_down" onclick="toReadPdf()">查看发票</a></div>
- <input type="file" class="up_file" name="file" upload_type="file" id="upload_file_pdf" style="display: none">
- <div class="upload_file" style="margin-left: 10px;float: left;"><a href="javascript:void(0)" class=" all_down" onclick="fileOnclick(this)">点击上传发票</a></div>
- </div>
- </div>
- <div class="row cl" id="" style="">
- <label class="form-label col-1 col-sm-1" style="float: left;text-align: right;">发票代码 :</label>
- <div class="formControls col-5 col-sm-5" style="float: left;">
- <input type="text" class="input-text trim_input" value="" placeholder="发票代码" id="billInvoiceCode" datatype="/^.{0,50}$/" name="billInvoiceCode" >
- </div>
- </div>
- <div class="row cl" id="" style="">
- <label class="form-label col-1 col-sm-1" style="float: left;text-align: right;">发票号码 :</label>
- <div class="formControls col-5 col-sm-5" style="float: left;">
- <input type="text" class="input-text trim_input" value="" placeholder="发票号码" id="billInvoiceNum" datatype="/^.{0,50}$/" name="billInvoiceNum" >
- </div>
- </div>
- <div class="row cl" id="" style="">
- <label class="form-label col-1 col-sm-1" style="float: left;text-align: right;">开票日期 :</label>
- <div class="formControls col-5 col-sm-5" style="float: left;">
- <input type="text" placeholder="开票日期" id="billInvoiceDate" name="billInvoiceDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate: '%y-%M-%d'})" readonly="readonly">
- </div>
- </div>
- <div class="row cl" id="" style="margin-top: 50px;">
- <div class="formControls col-11 col-sm-11" style="text-align: center;">
- <input type="submit" class="btn btn-primary add-order-button" value="确定上传" >
- </div>
- </div>
- </form>
- </div>
- </article>
- <script type="text/javascript">
- var url_path = "${path}";
- </script>
- <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
- <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <script type="text/javascript">
- var billId = "${billId}";
- var FILE_URL = "";
- $(function(){
- $("#upload_file_pdf").change(function() {
- fileUpload("upload_file_pdf");
- });
- });
- function fileOnclick(node){
- $(node).parent().siblings('.up_file').click();
- }
- /***
- * 发票上传
- */
- function fileUpload(idValue) {
- $.ajaxFileUpload({
- url:"/admin/ei_billing/upload_invoice?billId="+billId,
- secureuri:false,
- fileElementId : idValue,//文件选择框的id属性/名称
- dataType: 'json', //json
- success: function (data) {
- if(data.returnCode == 200){
- $("#billInvoiceFileUrl").val(data.returnMsg.path);
- FILE_URL = data.returnMsg.path;
- $(".select_invo").show();
- $(".upload_file").find("a").eq(0).html("重新上传发票");
- }else{
- layer.msg('上传文件失败,请重试!',{icon: 5,time:2000});
- }
- $("#upload_file_pdf").change(function() {
- fileUpload("upload_file_pdf");
- });
- }
- });
- }
- $(function(){
- var loadIndex = 0;
- $("#form-order-add").Validform({
- tiptype: function (msg, o, cssctl) {
- if (o.type == 3) {//失败
- layer.msg(msg, {icon: 5, time: 3000});
- $(window).scrollTop(o.obj.offset().top - 40);
- }
- },
- datatype: {//自定义验证类型
- },
- ignoreHidden: true,
- tipSweep: true, //若为true,则只在表单提交时验证
- ajaxPost: true, //异步提交
- beforeCheck: function (curform) { //验证通过之前执行的函数
- var flag = false;
- },
- beforeSubmit: function (curform) { //验证通过之后执行的函数
- var billInvoiceFileUrl = $("#billInvoiceFileUrl").val();
- if(!isEmpty(billInvoiceFileUrl)){
- layer.msg("请上传发票文件!", {icon: 5, time: 3000});
- return false;
- }
- loadIndex = layer.load(1, {
- shade: [0.5,'#fff'] //0.1透明度的白色背景
- });
- },
- callback: function (data) {//异步回调函数
- if (data) {
- if (data.resultCode == 200) {
- layer.msg(data.resultMsg,{icon: 5,time:3000});
- parent.layer.close(parent.layer.getFrameIndex(window.name));
- }else {
- layer.msg("上传发票失败!", {icon: 5, time: 3000});
- }
- if(loadIndex != 0 ){
- layer.close(loadIndex);
- }
- }
- return false;
- }
- });
- });
- /**
- * 查看pdf
- * @param url
- */
- function toReadPdf() {
- window.open("/"+FILE_URL);
- }
- </script>
- </body>
- </html>
|