123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862 |
- 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() {
-
-
- $('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();
- });
-
- /**
- * 废弃方法
- $('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 = $('#ira').attr("action");
- action=encodeURI(action+"/"+irmMebSea);
-
- $('#ira').attr("action",action);
- $('#ira').submit();
- });
-
- $('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-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-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("");
- }
- });
- });
-
- $("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-alter]").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='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);
- });
-
- $("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-store=batchDel]").click(function() {
-
- var id_array=new Array();
- $('input[name="isBox"]:checked').each(function(){
- id_array.push($(this).val());//向数组中添加元素
- });
- var idstr=id_array.join(',');//将数组元素连接起来以构建一个字符串
- $("input[id=batchStoreKey]").val(idstr);
-
- });
-
- $("a[node-store=batchMail]").click(function() {
-
- var id_array=new Array();
- $('input[name="isBox"]:checked').each(function(){
- id_array.push($(this).val());
- });
- var idstr=id_array.join(',');
- $("input[id=BatchMailStoreKey]").val(idstr);
-
- });
- $("a[node-store=batchApproval]").click(function() {
-
- var id_array=new Array();
- $('input[name="isBox"]:checked').each(function(){
- id_array.push($(this).val());
- });
- var idstr=id_array.join(',');
- $("input[id=appBatchStoreKey]").val(idstr);
-
- });
-
-
-
- $("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);
- }
|