//欠费统计 Ext.namespace('Shipping'); Shipping.MsRptCdTotalIndex = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.MsRptCdTotalIndex.superclass.constructor.call(this); }; Ext.extend(Shipping.MsRptCdTotalIndex, Ext.Panel, { PageSize: 100, OprationStatus: null, //仅当弹出界面时使用 SelectedRecord: null, sqlcontext: '1=2', bslistdrsortfield: '', bslistdrsortdire: '', bslistcrsortfield: '', bslistcrsortdire: '', feelistdrsortfield: '', feelistdrsortdire: '', feelistcrsortfield: '', feelistcrsortdire: '', salesumsortfield: '', salesumsortdire: '', custsumsortfield: '', custsumsortdire: '', vesselsumsortfield: '', vesselsumsortdire: '', initUIComponents: function () { //定义数据集 Ext.Ajax.timeout = 12000000; this.formname = 'MsRptCdTotalIndex'; this.sqlcontext = '1=2'; this.isinputmode = '0'; this.selectbsno = '1'; this.selectcust ='1'; this.selectcurr = '1'; this.selectfeename = '1'; this.selectinputmode = '1'; _thiscd = this; this.storeFeeListDr = Ext.create('Ext.data.Store', { pageSize: this.PageSize, fields: [ { name: 'MBLNO', type: 'string' }, { name: 'CUSTNAME', type: 'string' }, { name: 'FEENAME', type: 'string' }, { name: 'MAXAMOUNT', type: 'number' }, { name: 'INPUTMODE', type: 'string' }, { name: 'CURRENCY', type: 'string' }, { name: 'FEECOUNT', type: 'number' } ], remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsRptNoTotal/FeeCDListData', reader: { id: '', root: 'data', totalProperty: 'totalCount' } } }); //定义Grid this.Pagenum = Ext.create('Ext.form.field.Number', { name: 'bottles', fieldLabel: '每页记录数', labelAlign: 'right', value: this.PageSize, maxValue: 100000, width: 170, minValue: 0 }) this.initgirdcolumsfeedr = [ { sortable: true, dataIndex: 'CUSTNAME', header: '结算客户', width: 120 }, { sortable: true, dataIndex: 'MBLNO', header: '主提单号', width: 160 }, { sortable: true, dataIndex: 'FEENAME', header: '费用名称', width: 100 }, { sortable: true, dataIndex: 'CURRENCY', header: '币别', width: 60 }, { sortable: true, dataIndex: 'MAXAMOUNT', header: '金额', width: 100 }, { sortable: true, dataIndex: 'INPUTMODE', header: '录入方式', width: 80 }, { sortable: true, dataIndex: 'FEECOUNT', header: '费用条数', align: 'right', width: 80 }, { xtype: 'actioncolumn', width: 80, text: '查看费用明细', //操作 items: [{ icon: '/images/icons/L5.gif', // Use a URL in the icon config tooltip: '查看费用明细', getClass: function (v, meta, rec) { return 'button_view'; }, handler: function (grid, rowIndex, colIndex) { if (_thiscd.panelFee.isHidden() == true) { _thiscd.panelFee.setVisible(true); _thiscd.storeDrChFee.load(); } else _thiscd.panelFee.setVisible(false); //DsOpenEditWin(filePath, "", "650", "1250"); } }] } ]; this.girdcolumsfeedr = DsTruck.GetGridPanel(USERID, this.formname + 'feedr', this.initgirdcolumsfeedr, 1); this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); this.gridFeeListDr = new Ext.grid.GridPanel({ store: this.storeFeeListDr, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, selModel: this.GridCheckBoxModel, columns: this.girdcolumsfeedr, // paging bar on the bottom bbar: [Ext.create('Ext.PagingToolbar', { store: this.storeFeeListDr, displayInfo: true, displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: "没有数据" }), this.Pagenum] }); this.gridFeeListDr.addListener('itemdblclick', function (dataview, record, item, index, e, b) { //this.SelectedRecord = record; //var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2 //var openType = "_blank"; //var openUrl = ""; //openUrl = "../../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.PARENTID; //window.open(openUrl, openType, openSet); }, this); this.gridFeeListDr.addListener('sortchange', function (ct, column, direction, eOpts) { this.feelistdrsortfield = column.dataIndex; this.feelistdrsortdire = direction; }, this); this.gridFeeListDr.getSelectionModel().on('select', function (model, record, index) { this.selectbsno = record.data.MBLNO; this.selectcust = record.data.CUSTNAME; this.selectcurr = record.data.CURRENCY; this.selectfeename = record.data.FEENAME; this.selectinputmode = record.data.INPUTMODE; if (!this.panelFee.isHidden()) { this.storeDrChFee.load(); } }, this); //#region formSearch //#region formSearch枚举参照相关 _this = this; this.storeCust = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeCust.load({ params: { condition: ""} }); this.comboxCust = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '结算客户', store: this.storeCust, // forceSelection: true, name: 'CUSTNAME', valueField: 'CustName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.storeFeeNameRef = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.FeeTypeRefModel', proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefListNew' } }); this.storeFeeNameRef.load(); this.comboxFeeNameRef = Ext.create('DsExt.ux.DCombox', { store: this.storeFeeNameRef, minChars: 1, fieldLabel: '费用名称', matchFieldWidth: false, //queryParam: 'Name', lazyRender: false, name: 'FEENAME', valueField: 'Name', displayField: 'CodeAndName' }); this.storeINPUTMODE = Ext.create('Ext.data.Store', { fields: ['FSTATUS', 'NAME'] }); this.storeINPUTMODE.add({ "FSTATUS": "", "NAME": "否" }); this.storeINPUTMODE.add({ "FSTATUS": "0", "NAME": "否" }); this.storeINPUTMODE.add({ "FSTATUS": "1", "NAME": "是" }); this.comboxINPUTMODE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '是否匹配录入方式', labelWidth: 120, store: this.storeINPUTMODE, valueField: 'FSTATUS', displayField: 'NAME', forceSelection: true, name: 'ISINPUTMODE', value: '', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); //是否生成凭证 //#endregion this.formSearch = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 70, msgTarget: 'qtip' }, items: [ {//fieldset 1 xtype: 'container', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '主提单号', name: 'PS_MBLNO', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, this.comboxCust, this.comboxFeeNameRef, this.comboxINPUTMODE ] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); //#endregion formSearch //查询工具条 this.CheckSaveQuery = new Ext.form.Checkbox({ fieldLabel: '记忆查询条件', checked: true, width: 120 }); _this = this; this.SearchBtn = new Ext.Button({ text: '隐藏查询', handler: function () { if (_this.SearchBtn.text == '隐藏查询') { _this.panelSearch.hide(); _this.SearchBtn.setText("显示查询"); } else { _this.panelSearch.show(); _this.SearchBtn.setText("隐藏查询"); } } }); this.panelBtn = new Ext.Panel({ region: "north", tbar: [ { text: "执行查询", iconCls: "btnrefresh", id: "btnrefresh", handler: function (button, event) { this.onRefreshClick(button, event); var isvisible = true; var issavevalue = false; if (_this.SearchBtn.text == '隐藏查询') isvisible = true else isvisible = false; if (this.CheckSaveQuery.checked) issavevalue = true saveQuerySetting(this.formname, this.formSearch, isvisible, issavevalue); }, scope: this }, { text: "导出Excel", id: "btnExportExcel", iconCls: 'btnexportexcel', handler: function (button, event) { _this.onExportClick(button, event); }, scope: this }, '-', { text: "生成核销", handler: function (button, event) { this.onCreateHexiao(); }, scope: this }, '-', { text: "显示费用明细", iconCls: "btnrefresh", handler: function (button, event) { if (this.panelFee.isHidden() == true) { this.panelFee.setVisible(true); this.storeDrChFee.load(); } else this.panelFee.setVisible(false); }, scope: this }, '-', { text: "打印", iconCls: 'btnprint', handler: function (button, event) { this.Print(); }, scope: this }, '-', this.SearchBtn, { xtype: 'button', width: 90, text: "清空条件", iconCls: "btnreset", handler: function (button, event) { this.onClearSql(button, event); }, scope: this }, this.CheckSaveQuery, '-', { text: "保存列表样式", id: "btntest", menu: [ { text: "保存列表", handler: function (button, event) { _this.onSaveGridClick(button, event); } }, { text: "刷新列表", handler: function (button, event) { _this.oninitGridClick(button, event); } }], scope: this } ] }); this.panelTop = new Ext.Panel({ layout: "border", region: "north", height: 29, items: [this.panelBtn] }); this.panelSearch = new Ext.Panel({ layout: "border", region: "north", height: 45, items: [this.formSearch] }); this.storeDrChFee = Ext.create('Ext.data.Store', { model: 'MsChFee', remoteSort: false, proxy: { type: 'ajax', url: '/MvcShipping/MsChFee/GetDataList', reader: { id: 'GId', root: 'data', totalProperty: 'totalCount' } } }); this.initgirdDrcolums = [{ sortable: true, dataIndex: 'GId', header: '惟一编号', hidden: true, width: 160 }, { sortable: true, dataIndex: 'BsNo', header: '业务编号', hidden: true, width: 200 }, { sortable: true, dataIndex: 'FeeStatus', header: '费用状态', renderer: function (value, p, record) { return record.data.FeeStatus_Ref; }, width: 66 }, { sortable: true, dataIndex: 'FeeName', header: '应收费用名称', width: 100 }, { sortable: true, dataIndex: 'CustomerType', header: '客户类别', width: 80 }, { sortable: true, dataIndex: 'CustomerName', header: '结算对象', width: 110 }, { sortable: true, dataIndex: 'Unit', header: '单位标准', width: 60 }, { sortable: true, dataIndex: 'UnitPrice', header: '单价', align: 'right', width: 70, renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; } }, { sortable: true, dataIndex: 'Quantity', header: '数量', width: 50 }, { sortable: true, dataIndex: 'TaxRate', header: '税率', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 60 }, { sortable: true, dataIndex: 'NoTaxAmount', header: '不含税金额', align: 'right', width: 80, renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; } }, { sortable: true, dataIndex: 'Amount', header: '金额', align: 'right', width: 80, renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; } }, { sortable: true, dataIndex: 'Currency', header: '币别', width: 40 }, { sortable: true, dataIndex: 'ExChangerate', header: '汇率', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 6, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 60 }, { sortable: true, dataIndex: 'IsAdvancedpay', header: '是否垫付', width: 60 }, { sortable: true, dataIndex: 'IsInvoice', header: '禁开发票', width: 60, renderer: function (value, meta, record) { if (value == '1') return '是'; else return value; } }, { sortable: true, dataIndex: 'AccTaxRate', header: '销项税率', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'Remark', header: '备注', width: 150 }, { sortable: true, dataIndex: 'FeeFrt', header: 'FRT', width: 40 }, { sortable: true, dataIndex: 'Commissionrate', header: '佣金比率', width: 60 }, { sortable: true, dataIndex: 'OpName', header: '录入人', width: 60 }, { sortable: true, dataIndex: 'EnterDate', header: '录入日期', renderer: Ext.util.Format.dateRenderer('Y-m-d'), width: 80 }, { sortable: true, dataIndex: 'Auditoperator', header: '审核人', width: 60 }, { sortable: true, dataIndex: 'AuditDate', header: '审核日期', renderer: Ext.util.Format.dateRenderer('Y-m-d'), width: 80 }, { sortable: true, dataIndex: 'MODIFIEDUSER', header: '修改人', width: 60 }, { sortable: true, dataIndex: 'MODIFIEDTIME', header: '修改日期', renderer: Ext.util.Format.dateRenderer('Y-m-d H:i:s'), width: 130 }, { sortable: true, dataIndex: 'Settlement', header: '结算金额', align: 'right', width: 80, renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; } }, { sortable: true, dataIndex: 'Invoice', header: '已开票金额', align: 'right', width: 80, renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; } }, // { // sortable: true, // dataIndex: 'InvoiceNum', // header: '发票号码', // width: 80 // }, { sortable: true, dataIndex: 'INPUTMODE', header: '录入方式', //'录入方式', width: 80 }, { sortable: true, dataIndex: 'MANAGER', header: '责任人', //'MANAGER', renderer: function (value, p, record) { return record.data.MANAGERREF; }, width: 100 } ]; this.girdDrcolums = this.initgirdDrcolums; this.feeDrGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); _thisfeeview = this; this.gridDrChFee = new Ext.grid.GridPanel({ store: this.storeDrChFee, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, selModel: this.feeDrGridCheckBoxModel, selType: 'cellmodel', viewConfig: { autoFill: true, enableTextSelection: true, getRowClass: function (record, rowIndex, rowParams, store) { var feeStatus = record.get('FeeStatus'); var BsNo = record.get('BsNo'); var ISSEL = record.get('ISSEL'); if (ISSEL == '1') { return Shipping.FeeGetRowClassFont(feeStatus); } else { if (BsNo == _thisfeeview.strBSNO) return Shipping.FeeGetRowClass(feeStatus); else return Shipping.FeeGetRowClassFont(feeStatus); } } }, columns: this.girdDrcolums }); this.girdDrcolums = DsTruck.GetGridPanel(USERID, 'FEEDRGRIDVIEW', this.girdDrcolums, 0); //使用者id,表名,中间column数组,跳过一开始的几列 this.panelFee = new Ext.Panel({ id: "panelFee", layout: "border", region: "east", width: 650, hidden: true, title: '费用明细', //autoScroll: true, frame: false, split: true, items: [this.gridDrChFee] }); this.storeDrChFee.on('beforeload', function (store) { var xcondition = " ch_fee.BSNO IN (SELECT BSNO FROM V_OP_BILL WHERE MBLNO='" + this.selectbsno + "') and ch_fee.FEESTATUS=0 and ch_fee.SETTLEMENT=0 and ch_fee.ORDERAMOUNT=0 and ch_fee.ORDERINVOICE=0 AND ISNULL(ch_fee.INVOICE,0)=0 AND ch_fee.AMOUNT<>0 "; xcondition = xcondition + " AND ch_fee.CUSTOMERNAME='" + this.selectcust + "' AND ch_fee.CURRENCY='" + this.selectcurr + "' and ch_fee.FEENAME='" + this.selectfeename + "' "; if (this.isinputmode == '1') xcondition = xcondition + " and ch_fee.INPUTMODE='" + this.selectinputmode + "'"; Ext.apply(store.proxy.extraParams, { condition: xcondition, billno: '1', type: 1, optype:'op_seae' }); }, this); this.panelFeeListDr = new Ext.Panel({ title: '冲抵明细', layout: "border", region: 'center', margin: '0 0', frame: true, items: [this.gridFeeListDr, this.panelFee] }); this.tabpanel = new Ext.TabPanel ({ activeTab: 0, autoWidth: true, border: false, frame: false, region: 'center', id: "TabPanelID", enableTabScroll: true, items: [ this.panelFeeListDr ] }); Ext.apply(this, { items: [this.panelTop, this.panelSearch, this.tabpanel] }); this.storeFeeListDr.on('beforeload', function (store) { var sql = this.sqlcontext; Ext.apply(store.proxy.extraParams, { condition: sql, isinputmode: this.isinputmode }); }, this); // this.onRefreshClick(); }, //end initUIComponents onRefreshClick: function (button, event) { var sql = this.getCondition(); this.PageSize = this.Pagenum.getValue(); this.sqlcontext = sql; var Drsql = sql; var Crsql = sql; this.storeFeeListDr.load({ params: { start: 0, limit: this.PageSize, condition: Drsql, isinputmode:this.isinputmode }, waitMsg: "正在查询数据...", scope: this }); }, onDsQuery: function (button, event) { this.PageSize = this.Pagenum.getValue(); var sql = this.sqlcontext; this.storeFeeListDr.load({ params: { start: 0, limit: this.PageSize, condition: sql, isinputmode: this.isinputmode }, waitMsg: "正在查询数据...", scope: this }); }, onCreateHexiao: function () { var records = _this.GridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要生成核销的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { var rec = records[i]; bodyAddDatas.push(rec); } //_this = this; if (bodyAddDatas.length == 0) { Ext.Msg.show({ title: '提示', msg: '没有要生成核销的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); Ext.Msg.wait('正在生成核销...'); Ext.Ajax.request({ waitMsg: '正在核销...', url: '/Account/Chfee_hexiao/AutoHeXiaoCD', params: { data: jsonbodyAddDatas, isinputmode: this.isinputmode }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.hide(); _this.onDsQuery(); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, onClearSql: function () { var form = this.formSearch.getForm(); form.reset(); }, getCondition: function () { var form = this.formSearch.getForm(); var sql = ''; var mblNo = form.findField('PS_MBLNO').getValue(); sql = sql + getAndConSql(sql, mblNo, " (MBLNO like '%" + mblNo + "%') "); var FEENAME = form.findField('FEENAME').getValue(); sql = sql + getAndConSql(sql, FEENAME, "FEENAME='" + FEENAME + "'"); var CUSTNAME = form.findField('CUSTNAME').getValue(); sql = sql + getAndConSql(sql, CUSTNAME, "CUSTNAME='" + CUSTNAME + "'"); this.isinputmode = form.findField('ISINPUTMODE').getValue(); return sql; }, checkSearchCondition: function () { var form = this.formSearch.getForm(); if (!form.isValid()) { Ext.Msg.alert('提示', '查询条件赋值错误,请检查。'); return false; } return true; }, OprationSwap: function () { var ret = new Array(); ret[0] = this.OprationStatus; ret[1] = this.storeList; ret[2] = this.SelectedRecord; ret[3] = this.SelectedRecord.data.BSNO; ret[4] = "MsRptNoTotalIndex"; return ret; }, onSaveGridClick: function (button, event) { this.girdcolumsfeedr = DsTruck.SaveGridPanel(USERID, this.formname + 'feedr', this.gridList.columns, this.girdcolumsfeedr, 1, true); }, oninitGridClick: function (button, event) { this.gridList.reconfigure(this.storeFeeListDr, this.initgirdcolumsfeedr); this.girdcolumsfeedr = DsTruck.SaveGridPanel(USERID, this.formname + 'feedr', this.gridList.columns, this.initgirdcolumsfeedr, 1, true); }, onExportClick: function (button, event) { _this = this; GridExportExcelPage(this.gridFeeListDr); // _this = this; // Ext.Msg.wait('正在组织数据, 请稍侯..'); // Ext.Ajax.request({ // waitMsg: '正在组织数据...', // url: '/MvcShipping/MsRptNoTotal/GetSqlStr', // scope: this, // params: { // condition: _this.sqlcontext // }, // callback: function (options, success, response) { // if (success) { // Ext.MessageBox.hide(); // var jsonresult = Ext.JSON.decode(response.responseText); // if (jsonresult.Success) { // var sql = jsonresult.Data; // if (sql != "") { // var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2; // var openType = "_blank"; // var openUrl = "../../Reports/RptExport.aspx?handle=MsRptNoTotalIndex&formname=" + this.formname + "&condition1=" + sql; // window.open(openUrl, openType, openSet); // } // } else { // Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); // } // } else { // Ext.Msg.show({ title: '请重试', // msg: '服务器响应出错', // icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK // }); // } // } // }); }, Print: function () { var sql = this.sqlcontext; var Crsql = sql; var Drsql = sql; _this = this; if (this.storeFeeListDr.getCount() == 0) { return; } var sortstr = ''; if (this.feelistdrsortfield != '' && this.feelistdrsortdire != '') { sortstr = this.feelistdrsortfield + ' ' + this.feelistdrsortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptNoTotal/FeeCDListData', scope: this, params: { start: 0, limit: this.PageSize, condition: Drsql, printstr: 'true', sortstr: sortstr }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var returnstr = jsonresult.Data; var printType = 'MSRPTNOTOTALCDFEELISTDR'; var sql1 = returnstr; var sql2 = ""; var sql3 = ""; var sql4 = ""; var sql5 = ""; var sql6 = ""; PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6); } else { Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } else { Ext.Msg.show({ title: '请重试', msg: '服务器响应出错', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } }); } });