1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027 |
- var notify = null;
- var isNotifyShowing = false;
- var isError = false;
- //$(function() {
- // Notification.requestPermission(function(status) {});
- //
- // // 轮询查找是否有未处理的审批
- // var permission = Notification.permission;
- // if (permission === 'granted') {
- // var interval = setInterval(checkNotify, 90000);//
- // if (isError) {
- // clearInterval(interval);
- // }
- //
- // }
- //});
- /**
- * 获取未审批数量
- */
- function checkNotify() {
- $.ajax({
- url: '/ajaxInvoicePushNotice',
- type: 'get',
- data: '',
- dataType: 'json',
- error: function() {
- console.log('数据错误');
- isError = true;
- },
- success: function(response) {
- var isNotice = response.isNotice;
-
- if (isNotice && !isNotifyShowing) {
- notify = new Notification("你有发票需要审批", {
- // icon: '/global/img/wen.png111',
- body: '点击本消息可跳转至审批页',
- silent: true
- });
- notify.onclick = function() {
- notify.close();
- window.location.href = '/invoiceApproval';
- };
- notify.onshow = function () {
- isNotifyShowing = true;
- };
- notify.onclose = function () {
- isNotifyShowing = false;
- };
- }
- }
- });
- }
- //
- function receiptYear(){
- var form = $('#up');
- $('#year').val($('#Y').val());
- form.submit();
- }
- function sures()
- {
- if(confirm('请确认核销该发票,核销后不可更改!'))
- return true;
- else
- return false;
- }
- function submitForm(){
- var form = document.getElementById("iacd");
- form.submit();
- }
- function getRefundByDetail(irid){
- var url = "/getRefundByDetail";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- iridKey : irid
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("td[data-refundCompany]").html(data.irDetail.refundCompany);
- $("td[data-refundNumber]").html(data.irDetail.refundNumber);
- $("td[data-refundPrice]").html(data.irDetail.refundPrice);
- } else{
- $("td[data-refundCompany]").html('');
- $("td[data-refundNumber]").html('');
- $("td[data-refundPrice]").html('');
- }
- },
- error : function(err) {
- }
- });
- }
- function invoiceReceivblesDivShow(postData,type){
-
- var po='INVOICE';
- if(type=='receivables')
- po='RECEIVABLES';
-
- $("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoiceInfoByType";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- serial : postData,
- type:po
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("div[loading-msg='true']").html("");
- if(type=='receivables')
- $("#nr").html(data.html);
- else
- $("#nc").html(data.html);
- } else
- $("div[loading-msg='true']").html("illegal request");
- },
- error : function(err) {
- $("div[loading-msg='true']").html("");
- $("#nr").html('');
- }
- });
- }
- function padding1(num, length) {
- for(var len = (num + "").length; len < length; len = num.length) {
- num = "0" + num;
- }
- return num;
- }
- $(function() {
-
- $('#invoiceNoStart').keyup(function() {
-
- var start=$(this).val();
-
- var total=$('#invoiceNoTotal').val();
-
- var stLenght=start.length;
-
- var s=Number(start)+Number(total);
-
-
- //padding1(s,kl);
-
- $('#invoiceNoEnd').val('No.'+padding1(s,stLenght));
- });
-
- $('#invoiceNoTotal').keyup(function() {
- var start=$(this).val();
-
- var total=$('#invoiceNoStart').val();
-
-
-
-
- var s=Number(start)+Number(total);
-
- var k=Number(total);
- var stLenght=total.length;
-
-
- stLenght=Number(s.toString().length)+Number(stLenght)-Number(k.toString().length);
-
-
- $('#invoiceNoEnd').val('No.'+padding1(s,stLenght));
- });
-
- $('a[node-claim="receivables"]').click(function() {
- $("#iridKey").val($(this).attr("data-key"));
-
- });
-
- $('select[node-itSChange]').change(function() {
- var itsStatus=$(this).val();
-
- var action = $('#its').attr("action");
- action=encodeURI(action+'?trainStatus='+itsStatus);
- $('#its').attr("action",action);
- $('#its').submit();
- });
-
- $('select[node-iryChange]').change(function() {
- var year=$(this).val();
- var month="All";
- var irmMebSea=$('input[data-irmMebSea]').val();
- var action = $('#iras').attr("action");
- action=encodeURI(action+'/'+year+'/'+month+"/"+irmMebSea);
- $('#iras').attr("action",action);
- $('#iras').submit();
- });
-
- $('select[node-irmChange]').change(function() {
- var month=$(this).val();
- var year=$('select[node-iryChange]').val();
- var irmMebSea=$('input[data-irmMebSea]').val();
-
- var action = $('#iras').attr("action");
- action=encodeURI(action+'/'+year+'/'+month+"/"+irmMebSea);
- $('#iras').attr("action",action);
- $('#iras').submit();
- });
-
- $('select[node-invoiceType]').change(function() {
- $('#iaa').submit();
- });
- $('select[node-invoiceTrain]').change(function() {
- $('#iaa').submit();
- });
- $('select[node-invoiceTrainName]').change(function() {
- $('#iaa').submit();
- });
- /**
- * 废弃方法
- $('button[node-irmMebSea]').click(function() {
- var month=$('select[node-irmChange]').val();
- var year=$('select[node-iryChange]').val();
- var irmMebSea=$('input[data-irmMebSea]').val();
-
- var action = $('#iras').attr("action");
- action=encodeURI(action+'/'+year+'/'+month+"/"+irmMebSea);
-
- $('#iras').attr("action",action);
- $('#iras').submit();
- });
- */
- $('input[refreshData=time]').click(function() {
- $('#iras').submit();
- });
-
-
- $('button[node-iramMebSea]').click(function() {
-
- var irmMebSea=$('input[data-irmMebSea]').val();
-
- var action = $('#iaa').attr("action");
- action=encodeURI(action+"/"+irmMebSea);
-
- $('#iaa').attr("action",action);
- $('#iaa').submit();
- });
-
- $('a[node-rtm]').click(function() {
- $("#iridKey").val($(this).attr("data-key"));
- $("#recepitTitleMark").val($(this).attr("data-title"));
- });
-
- $('a[node-express="untread"]').click(function() {
- $('td[node-express="msg"]').html($(this).attr('title'));
- });
-
- $("input[name='untreadPost']").click(function() {
- $("table[post-box='ture']").hide();
- });
-
- $("input[node-untread='post']").click(function() {
- //$("table[post-box='ture']").show();
- });
-
- $("a[node-approval^='approval']").click(function() {
- $("input[name='status']").val($(this).attr("diss-data"));
- $("form[name='invoiceApproval']").submit();
- });
- $("a[node-invoice='droppedInvoice']").click(function() {
- $("input[name='droppedIidKey']").val($(this).attr("diss-data"));
- });
-
-
- $("a[node-invoice='untreadInvoice']").click(function() {
- $("input[name='untreadIidKey']").val($(this).attr("diss-data"));
- });
-
-
- // $('a[bind-receivables="true"]').click(function() {
- // console.log('ddd');
- // });
-
- $("button[invoice-search='title']").click(function() {
- var title=$("input[name='searchTitle']").val();
-
- if(title==''){
- alert('请填写开票单位');
- return '';
- }
- $("div[node-invoiceHtml='true']").html('');
- var url = "/ajaxGetInvoiceReceivablesByTitle";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- title : title
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("div[node-invoiceHtml='true']").html(data.invoiceHtml);
- }
- },
- error : function(err) {
- }
- });
-
- });
-
- //
- $("a[bind-invoice='receivables']").click(function() {
- var key = $(this).attr("node-key");
- $("input[name='key']").val('');
- $("div[node-receivablesHtml='true']").html('');
- $("div[node-invoiceHtml='true']").html('');
- $("blockquote[node-search='invoice']").hide();
- var url = "/ajaxGetInvoiceReceivablesByIrid";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- irid : key
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("div[node-receivablesHtml='true']").html(data.receivablesHtml);
- $("div[node-invoiceHtml='true']").html(data.invoiceHtml);
- $("input[name='key']").val(data.irkey);
- if(data.isInvoice)
- $("blockquote[node-search='invoice']").show();
- else
- $("blockquote[node-search='invoice']").hide();
- } else{
- $("input[name='key']").val('');
- $("div[node-receivablesHtml='true']").html('');
- $("div[node-invoiceHtml='true']").html('');
- $("blockquote[node-search='invoice']").hide();
- }
- },
- error : function(err) {
- }
- });
-
- });
-
-
- $("a[node-newReceivables]").click(function() {
- var postData = $(this).attr("dataKey");
- $("input[id='iridKey']").val(postData);
-
- });
-
-
- $("button[search-invoiceReceivables]").click(function() {
-
- var searchData=$("input[name='searchData']").val();
- if(searchData==''){
- alert('请填写完整的流水号');
- return ;
- }
- var url = "/ajaxGetInvoiceReceivablesBySerial";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- receivablesSerial : searchData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("tr[htmlReceivables]").html(data.html);
-
- } else
- $("tr[htmlReceivables]").html();
- },
- error : function(err) {
- }
- });
-
-
- });
-
- $("a[node-post='express']").click(function() {
- var postData = $(this).attr("post-data");
- $("input[name='iidKey']").val(postData);
-
- $("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoicePostDetail";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- iidKey : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("td[recipients-data='true']").html(data.invoiceDetail.recipients);
- $("td[recipientsPhone-data='true']").html(data.invoiceDetail.recipientsPhone);
- $("td[recipientsAddress-data='true']").html(data.invoiceDetail.recipientsAddress);
- $("td[mailItems-data='true']").html(data.invoiceDetail.mailItems);
- $("div[loading-msg='true']").html("");
- } else
- $("div[loading-msg='true']").html("illegal request");
- },
- error : function(err) {
- }
- });
- });
- $("a[node-post='express-msg']").click(function() {
- var postData = $(this).attr("post-data");
-
- $("div[loading-msg='express-msg']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoicePostDetail";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- iidKey : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
-
-
- $("td[recipients-data='express-msg']").html(data.invoiceDetail.recipients);
- $("td[recipientsPhone-data='express-msg']").html(data.invoiceDetail.recipientsPhone);
- $("td[recipientsAddress-data='express-msg']").html(data.invoiceDetail.recipientsAddress);
- $("td[mailItems-data='express-msg']").html(data.invoiceDetail.mailItems);
- $("td[actualItems-data='express-msg']").html(data.invoiceDetail.actualItems);
- $("td[expressCompany-data='express-msg']").html(data.invoiceDetail.expressCompany);
- if(data.invoiceDetail.expressCom=="SF")
- $("td[expressNumber-data='express-msg']").html(data.invoiceDetail.expressNumber+" <a target='_blank' href='http://www.sf-express.com/cn/sc/dynamic_function/waybill/#search/bill-number/'>点击查询快递信息</a>");
- else
- $("td[expressNumber-data='express-msg']").html(data.invoiceDetail.expressNumber+" <a target='_blank' href='/invoiceExpress/"+data.invoiceDetail.expressCom+"/"+data.invoiceDetail.expressNumber+".html'>点击查询快递信息</a>");
- $("div[loading-msg='express-msg']").html("");
- } else
- $("div[loading-msg='express-msg']").html("illegal request");
- },
- error : function(err) {
- }
- });
- });
-
- $("a[node-post='expressActual-msg']").click(function() {
- var postData = $(this).attr("post-data");
-
- $("div[loading-msg='express-msg']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoicePostDetail";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- iidKey : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
-
- $("td[mailItems-data='express-msg']").html(data.invoiceDetail.mailItems);
- $("td[actualItems-data='express-msg']").html(data.invoiceDetail.actualItems);
-
-
- if(data.invoiceDetail.expressCom=="SF")
- $("td[expressCompany-data='express-msg']").html(data.invoiceDetail.expressNumber+" <a target='_blank' href='http://www.sf-express.com/cn/sc/dynamic_function/waybill/#search/bill-number/'>点击查询快递信息</a>");
- else
- $("td[expressCompany-data='express-msg']").html(data.invoiceDetail.expressCompany+" <a target='_blank' href='/invoiceExpress/"+data.invoiceDetail.expressCom+"/"+data.invoiceDetail.expressNumber+".html'>点击查询快递信息</a>");
-
-
- $("td[actualItems-data='express-msg']").html(data.invoiceDetail.actualItems);
-
- // $("td[recipients-data='express-msg']").html(data.invoiceDetail.recipients);
- // $("td[recipientsPhone-data='express-msg']").html(data.invoiceDetail.recipientsPhone);
- // $("td[recipientsAddress-data='express-msg']").html(data.invoiceDetail.recipientsAddress);
- // $("td[mailItems-data='express-msg']").html(data.invoiceDetail.mailItems);
- // $("td[actualItems-data='express-msg']").html(data.invoiceDetail.actualItems);
- // $("td[expressCompany-data='express-msg']").html(data.invoiceDetail.expressCompany);
- // $("td[expressNumber-data='express-msg']").html(data.invoiceDetail.expressNumber+" <a target='_blank' href='http://www.kuaidi100.com/chaxun?com="+data.invoiceDetail.expressCom+"&nu="+data.invoiceDetail.expressNumber+"'>点击查询快递信息</a>");
- $("div[loading-msg='express-msg']").html("");
- } else
- $("div[loading-msg='express-msg']").html("illegal request");
- },
- error : function(err) {
- }
- });
- });
-
- $("select[name='receivablesCategory']").click(function() {
- var cid = $("select[name='receivablesCategory'] option:selected").attr("post-data");
- var url = "/ajaxGetStaffByCategory";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- cid : cid
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("select[name='receivablesStaff']").html(data.html);
- }
- //else
- // $("div[loading-msg='true']").html("illegal request");
- },
- error : function(err) {
- }
- });
- });
-
- $('a[node-receivables="true"]').click(function() {
- var postData = $(this).attr("data-key");
- var url = "/ajaxGetInvoiceReceivables";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- key : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("input[name='key']").val(postData);
-
- $("td[node-receivablesSerial]").html(data.detail.receivablesSerial);
- $("td[node-inputStaff]").html(data.detail.inputStaff+" "+data.detail.date);
- $("td[node-price]").html("<b>"+data.detail.receivablesPrice+"</b>");
- $("td[node-message]").html(data.detail.receivablesMessage);
- $("td[node-bank]").html(data.detail.receivablesBank);
- $("td[node-date]").html(data.detail.receivablesDate);
- }
-
- },
- error : function(err) {
- }
- });
- });
-
- /**
- * 废弃
- $('a[node-recording="true"]').click(function() {
- var postData = $(this).attr("data-key");
- $("input[name='key']").val(postData);
- $("input[name='invoiceKey']").val("");
- $("p[node-msg='true']").hide();
- $("p[node-loading='true']").hide();
- $('tbody[data-invoice="myClaim"]').html("");
- var url = "/ajaxGetInvoiceByStaff";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- key : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $('tbody[data-invoice="myClaim"]').html(data.html);
-
- }
- },
- error : function(err) {
- }
- });
- });
- */
- /**
- * 废弃
- $('a[node-receivalbles="bind"]').click(function() {
- var postData = $(this).attr("diss-data");
-
- $("input[name='key']").val(postData);
- $("input[name='invoiceKey']").val("");
- $("p[node-msg='true']").hide();
- $("p[node-msg='true2']").hide();
- $("p[node-loading='true']").hide();
- $('tbody[data-invoice="myReceivables"]').html("");
-
- var url = "/ajaxGetReceivalblesByStaff";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- key : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $('tbody[data-invoice="myReceivables"]').html(data.html);
- $('tbody[box-enter="true"]').html(data.html2);
- if(data.priceStatus == 1){
- $('p[node-msg="true"]').html("收款金额超出开票金额 ¥"+data.price+"元,请谨慎操作。");
- $('p[node-msg="true"]').show();
- }else if(data.priceStatus == 2&& data.isReceivables != 0){
- $('p[node-msg="true"]').html("收款金额少于开票金额 ¥"+data.price+"元,请谨慎操作。");
- $('p[node-msg="true"]').show();
- }
- if(data.isReceivables == 0){
- $('p[node-msg="true2"]').html("该发票还没有入账,请先进行选择收款入账");
- $('p[node-msg="true2"]').show();
- }
- }
- },
- error : function(err) {
- }
- });
- });
- */
-
- $("a[node-invoiceReceivables='INFO']").click(function() {
- var postData = $(this).attr("data-isKey");
-
- var po='IRTC';
-
- $("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoiceInfoByType";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- serial : postData,
- type:po
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("div[loading-msg='true']").html("");
- $("#inKey").val(data.iidKey);
- $("#irtc").html(data.html);
-
- $("input[name=receivablesPrice]").val(data.receivablesPrice);
- $("input[name=receivablesMessage]").val(data.receivablesMessage);
- $("input[name=receivablesDate]").val(data.receivablesDate);
-
- } else
- $("div[loading-msg='true']").html("illegal request");
- },
- error : function(err) {
- $("div[loading-msg='true']").html("");
- }
- });
- });
-
- $("a[node-invoiceLoss='INFO']").click(function() {
- var postData = $(this).attr("data-isKey");
-
- var po='IRTC';
-
- $("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoiceInfoByType";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- serial : postData,
- loss:true,
- type:po
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("div[loading-msg='true']").html("");
- $("#inKey").val(data.iidKey);
- $("#irtc").html(data.html);
-
- $("input[name=receivablesPrice]").val(data.receivablesPrice);
- $("input[name=receivablesMessage]").val(data.receivablesMessage);
- $("input[name=receivablesDate]").val(data.receivablesDate);
-
- } else
- $("div[loading-msg='true']").html("illegal request");
- },
- error : function(err) {
- $("div[loading-msg='true']").html("");
- }
- });
- });
-
-
-
- $("a[node-irDelete]").click(function() {
- var postData = $(this).attr("data-isKey");
- $('#claimdKey').val(postData);
- });
- $("a[node-invoice='INFO']").click(function() {
- var postData = $(this).attr("data-isKey");
- var type =$(this).attr("data-type");
-
- var po='INVOICE';
- if(type=='receivables')
- po='RECEIVABLES';
-
- $("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoiceInfoByType";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- serial : postData,
- type:po
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("div[loading-msg='true']").html("");
- if(type=='receivables')
- $("#nr").html(data.html);
- else
- $("#nc").html(data.html);
- } else
- $("div[loading-msg='true']").html("illegal request");
- },
- error : function(err) {
- $("div[loading-msg='true']").html("");
- $("#nr").html('');
- $("#nc").html('');
- }
- });
- });
-
- $("a[node-invoice=PRINT]").click(function() {
- var postData = $(this).attr("data-isKey");
- var type =$(this).attr("data-type");
-
-
- $("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoiceInfoByPrint";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- serial : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("div[loading-msg='true']").html("");
- $("#prIn").html(data.html);
- } else
- $("div[loading-msg='true']").html("illegal request");
- },
- error : function(err) {
- $("div[loading-msg='true']").html("");
- }
- });
- });
-
- $("a[node-refund]").click(function() {
- var postData = $(this).attr("dataKey");
- $("input[name='iridKey']").val(postData);
- });
-
-
- $("a[node-alter]").click(function() {
-
- var postData = $(this).attr("data-isKey");
-
- var url = "/ajaxGetInvoiceReceivablesByStaff";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- postData : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
-
- $("input[name='claimKey']").val(postData);
- $("select[html-category]").html(data.categoryHtml);
-
- $("select[html-staff]").html(data.staffHtml);
- } else
- $("div[loading-msg='categoryStaff']").html("illegal request");
- },
- error : function(err) {
- $("div[loading-msg='true']").html("");
- }
- });
- });
-
- $("a[node-unBundLing]").click(function() {
-
- var postData = $(this).attr("data-isKey");
- $("input[id='unBundKey']").val(postData);
- $("tbody[node-unBundInvoice]").html("loading");
- var url = "/ajaxGetInvoiceReceivablesByInvoice";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- postData : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
- $("tbody[node-unBundInvoice]").html(data.html);
- } else
- $("tbody[node-unBundInvoice]").html("illegal request");
- },
- error : function(err) {
- $("tbody[node-unBundInvoice]").html("illegal request");
- }
- });
-
-
- });
-
- $("a[node-irUpdate]").click(function() {
-
- var postData = $(this).attr("data-isKey");
-
- //$("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoiceReceivablesByStaff";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- postData : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
-
- $("input[name='receivablesPrice']").val(data.detail.receivablesPrice);
- $("input[name='receivablesMessage']").val(data.detail.receivablesMessage);
- $("input[name='receivablesDate']").val(data.detail.receivablesDate);
-
- $("select[html-rbank]").html(data.rbankHtml);
-
- $("input[id='claimuKey']").val(postData);
- $("select[html-rcategory]").html(data.categoryHtml);
- $("select[html-rstaff]").html(data.staffHtml);
- } else
- $("div[loading-msg='categoryStaff']").html("illegal request");
- },
- error : function(err) {
- $("div[loading-msg='true']").html("");
- }
- });
- });
-
-
- $("a[node-post='upEm']").click(function() {
- var postData = $(this).attr("post-data");
-
- $("div[loading-msg='express-msg']").html("<img src='/global/img/loadIco.gif' />");
- var url = "/ajaxGetInvoicePostDetail";
- $.ajax({
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {
- iidKey : postData
- },
- global : true,
- success : function(data) {
- if (data.status == 1) {
-
- $("input[name='iidKey']").val(postData);
-
- $("td[recipients-data='express-msgU']").html(data.invoiceDetail.recipients);
- $("td[recipientsPhone-data='express-msgU']").html(data.invoiceDetail.recipientsPhone);
- $("td[recipientsAddress-data='express-msgU']").html(data.invoiceDetail.recipientsAddress);
- $("td[mailItems-data='express-msgU']").html(data.invoiceDetail.mailItems);
- $("textarea[actualItems-data='express-msgU']").val(data.invoiceDetail.actualItems);
-
- $("select[name='express']").html(data.invoiceDetail.eaHtml);
-
- $("input[expressNumber-data='express-msgU']").val(data.invoiceDetail.expressNumber);
- $("div[loading-msg='express-msg']").html("");
- } else
- $("div[loading-msg='express-msg']").html("illegal request");
- },
- error : function(err) {
- }
- });
- });
-
-
- $("select[node-notification]").change(function(){
- var notificationType=$(this).attr('data');
- var notificationValue=$(this).val();
-
- var url="/ajaxSetNotificationConf";
- $.ajax({
- url:url,
- type:"post",
- cache:false,
- dataType:"json",
- data:{
- notificationType:notificationType,
- notificationValue:notificationValue
- },
- global:true,
- success:function(data){
- if(data.status!=1){
- $("#"+data.msgType+"Msg").addClass("colRed");
- $("#"+data.msgType+"Msg").html("设置失败").show(300).delay(3000).hide(300);
- }else{
- $("#"+data.msgType+"Msg").addClass("colGreen");
- $("#"+data.msgType+"Msg").html("设置成功").show(300).delay(3000).hide(300);
- }
- },
- error:function(err){
-
- }
- });
-
- });
-
-
- // $("a[node-iStore=del]").click(function() {
- // var iStoreKey = $(this).attr("data-key");
- // $("input[id=iStoreKey]").val(iStoreKey);
- // });
-
-
-
-
-
-
-
-
-
-
- $("a[node-training=del]").click(function() {
- var trainingKey = $(this).attr("data-key");
- $("input[id='trainingKey']").val(trainingKey);
- });
- })
- function invoiceStoreMail(Key){
-
-
- $("input[id=MailStoreKey]").val(Key);
-
- // var url="/ajaxGetMailItemByIstore";
- // $.ajax({
- // url:url,
- // type:"post",
- // cache:false,
- // dataType:"json",
- // data:{
- // storeKey:iStroreKey
- // },
- // global:true,
- // success:function(data){
- //
- // console.log(data);
- //
- // if(data!='null'){
- //
- // }
- //
- // if(data.status!=1){
- // $("#"+data.msgType+"Msg").addClass("colRed");
- // $("#"+data.msgType+"Msg").html("设置失败").show(300).delay(3000).hide(300);
- // }else{
- // $("#"+data.msgType+"Msg").addClass("colGreen");
- // $("#"+data.msgType+"Msg").html("设置成功").show(300).delay(3000).hide(300);
- // }
- // },
- // error:function(err){
- //
- // }
- // });
-
- }
- function invoiceStoreDel(iStoreKey){
- //var iStoreKey = $(this).attr("data-key");
- $("input[id=iStoreKey]").val(iStoreKey);
- }
- function invoiceStoreApproval(iStoreKey){
- $("input[id=appStoreKey]").val(iStoreKey);
- }
|