前台页面上报表请求的数据如下
- var cname = $("#account_namec option:selected").text();
- var ename = $("#account_namee option:selected").text();
- var reachTime = $("#account_inDate").val();
- var leaveDate = $("#account_leavedate").val();
- var personsNum = 1;
- var roomPrice = $("#account_roomprice").val();
- var folioNo = '';
- var roomNo = $("#account_roomid").val();
- var data = '';
- var map = _accountGrid.getSelected();
- var _accountSelected = map.get('rowArr');
- //借项总额
- var borrow=0;
- //贷项总额
- var lent=0;
- for(var i=0;i<_accountSelected.length;i++){
- var row = _accountSelected[i];
- if(row.dataItem.cname!=''){
- data+=row.dataItem.oper_time+','+row.dataItem.cname+','+changeTwoDecimal_f(parseFloat(row.dataItem.balance)+parseFloat(row.dataItem.svc_charge))+"|";
- borrow+=parseFloat(row.dataItem.balance)+parseFloat(row.dataItem.svc_charge);
- }
- if(row.dataItem.sname!=''){
- data+=row.dataItem.oper_time+','+row.dataItem.sname+','+changeTwoDecimal_f(row.dataItem.balance)+" CR"+'|';
- lent+=parseFloat(row.dataItem.balance);
- }
- }
- if($("#checkOutOddment").val()!=''){
- data+= new Date().format('yyyy-MM-dd')+',零头'+$("#checkOutOddment").val()+'|';
- borrow+=parseFloat($("#checkOutOddment").val());
- }
- if($("#checkOutTipMoney").val()!=''){
- data+= new Date().format('yyyy-MM-dd')+',小费'+$("#checkOutTipMoney").val()+'|';
- borrow+=parseFloat($("#checkOutTipMoney").val());
- }
- var rows = _checkOutObj.flexGrid.rows;
- var payArr = [];
- for(var i=0;i<rows.length;i++){
- data+=new Date().format('yyyy-MM-dd')+','+rows[i].dataItem.setlName+','+rows[i].dataItem.balance+" CR";
- if(i!=rows.length-1){
- data+='|';
- }
- lent+=parseFloat(rows[i].dataItem.balance);
- }
- var yuSum = changeTwoDecimal_f(borrow - lent);
- var zhangYe = _guestObj.billType()=='1'?'A':'B';
- var operInfo = $("#operInfo").text();
- $.ajax({
- url : basePath+"/reportdoc/getreportdoclist",
- type : "post",
- dataType : 'json',
- data : {
- isShortCut : "0",
- rptType : "3",
- rptId : ""
- },
- success : function(result) {
- var reportPath = result.reportPath;
- //报表服务器路径不为空,初始化报表控件
- if(reportPath == "" || reportPath == "null" || reportPath == undefined){
- altWaringMsg("请先配置报表服务器路径。");
- return;
- }else{
- //初始化报表控件
- var viewer = GrapeCity.ActiveReports.Viewer({
- element: "#viewerContainer",
- reportService: {
- url: reportPath + "/ReportService.asmx"
- },
- uiType: "desktop",
- localeUri: basePath+"/report/Scripts/i18n/zh.txt"
- ,is_suceefull:function()
- {
- viewer.print();
- }
- });
- var reportOption = {
- id: 'masterFolio.rdlx',
- parameters: [
- {
- name:'Title',
- value:''
- },
- {
- name:'guestname',
- value:cname + ename
- }
- ,{
- name:'reachTime',
- value:reachTime
- },
- {
- name:'leaveDate',
- value:leaveDate
- },
- {
- name:'personsNum',
- value:personsNum
- },
- {
- name:'roomPrice',
- value:roomPrice
- },
- {
- name:'folioNo',
- value:folioNo
- },
- {
- name:'roomNo',
- value:roomNo
- },
- {
- name:'data',
- value:data
- },
- {
- name:'jieSum',
- value:borrow
- },
- {
- name:'daiSum',
- value:lent
- },
- {
- name:'yuSum',
- value:yuSum
- },
- {
- name:'zhangYe',
- value:zhangYe
- },
- {
- name:'operInfo',
- value:operInfo
- }]
- };
- console.log(JSON.stringify(reportOption))
- viewer.option('report', reportOption);
- }
- }
- });
复制代码
在后台能接收到请求,但却拿不到参数值,都是null 怎么回事? |
|