//集运管理-路单查询 Ext.namespace('Shipping'); Shipping.MsRptOpXsListIndex = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.MsRptOpXsListIndex.superclass.constructor.call(this); }; Ext.extend(Shipping.MsRptOpXsListIndex, Ext.Panel, { PageSize: 100, OprationStatus: null, //仅当弹出界面时使用 SelectedRecord: null, sqlcontext: '1=2', feesqlcontext:'', bslistsortfield: '', bslistsortdire: '', salelistsortfield: '', salelistsortdire: '', custlistsortfield: '', custlistsortdire: '', deptlistsortfield: '', deptlistsortdire: '', oplistsortfield: '', oplistsortdire: '', bssourcelistsortfield: '', bssourcelistsortdire: '', bssourcedetaillistsortfield: '', bssourcedetaillistsortdire: '', carrierlistsortfield: '', carrierlistsortdire: '', lanelistsortfield: '', lanelistsortdire: '', destinationlistsortfield: '', destinationlistsortdire: '', initUIComponents: function () { Ext.Ajax.timeout = 120000; this.formname = 'MsRptOpXsListIndex2'; this.sqlcontext = '1=2'; //定义数据集 this.storeList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, fields: [ { name: 'BSNO', type: 'string' }, { name: 'OP', type: 'string' }, { name: 'ETD', type: 'string' }, { name: 'MBLNO', type: 'string' }, { name: 'DEPTNAME', type: 'string' }, { name: 'TEU', type: 'number' }, { name: 'ISHYF', type: 'number' }, { name: 'ISTCF', type: 'number' }, { name: 'ISBGF', type: 'number' }, { name: 'ISZLF', type: 'number' }, { name: 'ISJHF', type: 'number' }, { name: 'ISCDF', type: 'number' }, { name: 'BILLCT', type: 'number' }, { name: 'OPXS', type: 'number' } ], remoteSort: true, proxy: { type: 'ajax', timeout: 120000, url: '/MvcShipping/MsRptOpBsList/OpXsListData2', reader: { id: '', root: 'data', totalProperty: 'totalCount' } } }); //定义Grid this.initgirdcolums = [{ sortable: true, dataIndex: 'BSNO', text: '编号', hidden: true, width: 130 }, { sortable: true, dataIndex: 'OP', text: '操作', width: 86 }, { sortable: true, dataIndex: 'DEPTNAME', text: '部门', width: 86 }, { sortable: true, dataIndex: 'MBLNO', text: '主提单号', width: 120 }, { sortable: true, dataIndex: 'ETD', text: '开船日期', width: 86 } , { sortable: true, id: '', dataIndex: 'TEU', text: 'TEU', width: 60 }, { sortable: true, id: '', dataIndex: 'OPXS', text: '操作票数', width: 60 }, { sortable: true, id: '', dataIndex: 'ISHYF', text: '海运费', width: 60, renderer: function (value, cellmeta) { if (value ==1) { return "是"; } } }, { sortable: true, id: '', dataIndex: 'ISTCF', text: '拖车费', width: 60, renderer: function (value, cellmeta) { if (value == 1) { return "是"; } } }, { sortable: true, id: '', dataIndex: 'ISBGF', text: '报关费', width: 60, renderer: function (value, cellmeta) { if (value == 1) { return "是"; } } }, { sortable: true, id: '', dataIndex: 'ISZLF', text: '制冷费', width: 60, renderer: function (value, cellmeta) { if (value == 1) { return "是"; } } }, { sortable: true, id: '', dataIndex: 'ISJHF', text: '监护费', width: 60, renderer: function (value, cellmeta) { if (value == 1) { return "是"; } } }, { sortable: true, id: '', dataIndex: 'ISCDF', text: '舱单费', width: 60, renderer: function (value, cellmeta) { if (value == 1) { return "是"; } } }, { sortable: true, id: '', dataIndex: 'BILLCT', text: '分单', width: 60, renderer: function (value, cellmeta) { if (value == 1) { return "是"; } } }]; this.Pagenum = Ext.create('Ext.form.field.Number', { name: 'bottles', fieldLabel: '每页记录数', labelAlign: 'right', value: this.PageSize, maxValue: 100000, width: 180, minValue: 0, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); // this.girdcolums = this.initgirdcolums; this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname + 'bs', this.initgirdcolums, 1); this.gridList = new Ext.grid.GridPanel({ store: this.storeList, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, viewConfig: { enableTextSelection: true, //允许复制数据 autoFill: true }, columns: this.girdcolums, // paging bar on the bottom bbar: [Ext.create('Ext.PagingToolbar', { store: this.storeList, displayInfo: true, displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: "没有数据" }), this.Pagenum] }); // this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname + 'bs', this.girdcolums, 1); // this.gridList.reconfigure(this.storeList, this.girdcolums); this.gridList.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.BSNO; window.open(openUrl, openType, openSet); }, this); this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) { this.bslistsortfield = column.dataIndex; this.bslistsortdire = direction; }, this); //#endregion this.storeSumList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, fields: [ { name: 'OP', type: 'string' }, { name: 'OPXS', type: 'number' } ], remoteSort: true, proxy: { type: 'ajax', timeout: 120000, url: '/MvcShipping/MsRptOpBsList/OpXsSumListData2', reader: { id: '', root: 'data', totalProperty: 'totalCount' } } }); this.initgridlistsumcolumn = [{ sortable: true, dataIndex: 'OP', text: '操作', width: 80 }, { sortable: true, id: '', dataIndex: 'OPXS', text: '操作票数', width: 60, summaryType: 'sum', align: 'right', summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { value = usMoney(value, 2, '', true); return value; }, }]; this.gridlistsumcolumn = DsTruck.GetGridPanel(USERID, this.formname + 'sum', this.initgridlistsumcolumn, 1); //定义Grid this.gridListSum = new Ext.grid.GridPanel({ store: this.storeSumList, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, features: [{ ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性 }], columns: this.gridlistsumcolumn }); //#region formSearch //#region formSearch枚举参照相关 _this = this; this.storeSalesCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' } }); this.storeSalesCode.load(); this.comboxOp = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '操 作', store: this.storeSalesCode, forceSelection: true, name: 'PS_OP', valueField: 'UserName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.storeDept = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.DeptModel', proxy: { url: '/CommMng/BasicDataRef/GetDeptList' } }); this.storeDept.load(); this.comboxDept = Ext.create('Ext.ux.form.field.BoxSelect', { fieldLabel: '部门', autosize: true, bodyPadding: 7, flex: 3, labelWidth: 100, store: this.storeDept, queryMode: 'local', triggerOnClick: false, valueField: 'DeptName', displayField: 'DeptName' }); //#endregion this.formSearch = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 80, msgTarget: 'qtip' }, items: [ {//fieldset 1 xtype: 'container', defaultType: 'textfield', layout: 'hbox', defaults: { anchor: '100%' }, items: [{ fieldLabel: '开船日期', format: 'Y-m-d', xtype: 'datefield', name: 'PS_EXPDATEBGN', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '到', format: 'Y-m-d', xtype: 'datefield', name: 'PS_EXPDATEEND', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, this.comboxOp,this.comboxDept ] } ]//end root items }); //#endregion formSearch //查询工具条 this.panelBtn = new Ext.Panel({ region: "north", tbar: [ { text: "执行查询", iconCls: "btnrefresh", handler: function (button, event) { this.onRefreshClick(button, event); }, scope: this }, { text: "导出Excel", id: "btnExportExcel", iconCls: 'btnexportexcel', handler: function (button, event) { this.onExportClick(button, event); }, scope: this }, '-', { text: "打印", iconCls: 'btnprint', handler: function (button, event) { this.Print(); }, scope: this }, '-', { xtype: 'button', width: 90, text: "清空条件", iconCls: "btnreset", handler: function (button, event) { this.onClearSql(button, event); }, scope: this }, '-', { xtype: 'button', text: "高级查询", iconCls: "btnmore", handler: function (button, event) { var sql = this.getCondition(); var winAccess = new Shipping.DsQuery({ }); winAccess.StoreList = this.storeList; winAccess.formname = this.formname; winAccess.condition = sql; winAccess.show(); return; }, 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.panelBodyChFee = new Ext.Panel({ title: '业务明细', layout: "border", region: 'center', margin: '0 0', frame: true, items: [this.gridList] }); this.panelSum = new Ext.Panel({ title: '合 计', layout: "border", region: 'center', margin: '0 0', frame: true, items: [this.gridListSum] }); this.tabpanel = new Ext.TabPanel ({ activeTab: 0, autoWidth: true, border: false, frame: false, region: 'center', id: "TabPanelID", enableTabScroll: true, items: [ this.panelBodyChFee, this.panelSum ] }); Ext.apply(this, { items: [this.panelTop, this.panelSearch, this.tabpanel] }); _this = this; _this = this; this.storeList.on('beforeload', function (store) { Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext }); }, this); this.storeSumList.on('beforeload', function (store) { // if (!this.checkSearchCondition()) // return; // var sql = this.getCondition(); Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext }); }, this); LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery); }, //end initUIComponents onRefreshClick: function (button, event) { if (!this.checkSearchCondition()) return; var sql = this.getCondition(); this.sqlcontext = sql; this.PageSize = this.Pagenum.getValue(); this.storeList.pageSize = this.PageSize; this.storeList.load({ params: { start: 0, limit: this.PageSize, condition: sql}, waitMsg: "正在查询数据...", scope: this }); this.storeSumList.load({ params: { start: 0, limit: this.PageSize, condition: sql}, waitMsg: "正在查询数据...", scope: this }); }, onDsQuery: function (button, event) { var sql = this.sqlcontext; this.storeList.load({ params: { start: 0, limit: this.PageSize, condition: sql }, waitMsg: "正在查询数据...", scope: this }); this.storeSumList.load({ params: { start: 0, limit: this.PageSize, condition: sql }, waitMsg: "正在查询数据...", scope: this }); }, getCondition: function () { var form = this.formSearch.getForm(); var sql = ''; /* var sqldata = form.getValues(); sql = Ext.JSON.encode(sqldata); */ var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue(); sql = sql + getAndConSql(sql, expDate_Min, " B.ETD>='" + expDate_Min + "'"); var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue(); sql = sql + getAndConSql(sql, expDate_Max, " B.ETD<='" + expDate_Max + " 23:59:59'"); var OP = form.findField('PS_OP').getValue(); sql = sql + getAndConSql(sql, OP, "B.OP='" + OP + "'"); var dept = this.getStrValue(this.comboxDept.getValue()); sql = sql + getAndConSql(sql, dept, "B.DEPTNAME in (" + dept + ")"); return sql; }, getStrValue: function (list) { var _list = []; for (var _i = 0; _i < list.length; _i++) { _list.push("'" + list[_i] + "'"); } return _list; }, checkSearchCondition: function () { var form = this.formSearch.getForm(); if (!form.isValid()) { Ext.Msg.alert('提示', '查询条件赋值错误,请检查。'); return false; } return true; }, onClearSql: function () { var form = this.formSearch.getForm(); form.reset(); }, 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] = "MsRptOpProfitIndex"; return ret; }, onSaveGridClick: function (button, event) { this.girdcolums = DsTruck.SaveGridPanel(USERID, this.formname + 'bs', this.gridList.columns, this.girdcolums, 1, true); this.gridlistsumcolumn = DsTruck.SaveGridPanel(USERID, this.formname + 'sum', this.gridListSum.columns, this.gridlistsumcolumn, 1, true); }, oninitGridClick: function (button, event) { var agirdcolums = this.initgirdcolums; this.gridList.reconfigure(this.storeList, agirdcolums); this.girdcolums = DsTruck.SaveGridPanel(USERID, this.formname + 'bs', this.gridList.columns, this.initgirdcolums, 1, true); this.gridListSum.reconfigure(this.storeSumList, this.initgridlistsumcolumn); this.gridlistsumcolumn = DsTruck.SaveGridPanel(USERID, this.formname + 'bssourcedetail', this.gridListSum.columns, this.initgridlistsumcolumn, 1, true); }, onExportClick: function (button, event) { if (this.tabpanel.getActiveTab() == this.panelBodyChFee) { grid2Excel(this.gridList, "业务列表"); } else if (this.tabpanel.getActiveTab() == this.panelSum) { grid2Excel(this.gridListSum, "操作员合计"); } // else if (this.tabpanel.getActiveTab() == this.panelDeptSum) { // grid2Excel(this.gridListDept, "部门列表"); //} else if (this.tabpanel.getActiveTab() == this.panelCustSum) { // grid2Excel(this.gridListCust, "客户列表"); //} else if (this.tabpanel.getActiveTab() == this.panelOpSum) { // grid2Excel(this.gridListOp, "操作列表"); //} else if (this.tabpanel.getActiveTab() == this.panelBsSourceSum) { // grid2Excel(this.gridListBsSource, "业务来源列表"); //} else if (this.tabpanel.getActiveTab() == this.panelBsSourceDetailSum) { // grid2Excel(this.gridListBsSourceDetail, "来源明细列表"); //} else if (this.tabpanel.getActiveTab() == this.panelLaneSum) { // grid2Excel(this.gridListLane, "航线列表"); //} else if (this.tabpanel.getActiveTab() == this.panelDestinationSum) { // grid2Excel(this.gridListDestination, "目的港列表"); //} else if (this.tabpanel.getActiveTab() == this.panelCarrierSum) { // grid2Excel(this.gridListCarrier, "船公司"); //} } , Print: function () { _this = this; if (this.tabpanel.getActiveTab() == this.panelBodyChFee) { if (this.storeList.getCount() == 0) { return; } var sortstr = ' B.ETD DESC'; if (this.bslistsortfield != '' && this.bslistsortdire != '') { sortstr = this.bslistsortfield + ' ' + this.bslistsortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/OpXsListData2', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 condition = jsonresult.Message; if (condition != '') condition = ' where ' + condition; var printType = 'MSRPTBSLIST'; 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 }); } } }); } else if (this.tabpanel.activeTab == this.panelSum) { if (this.storeSumList.getCount() == 0) { return; } var sortstr = ' OP '; Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/OpXsSumListData2', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 = 'MSRPTBSLISTSUM'; 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 }); } } }); } else if (this.tabpanel.activeTab == this.panelCustSum) { if (this.storeCustList.getCount() == 0) { return; } var sortstr = ' B.CUSTOMERNAME'; if (this.custlistsortfield != '' && this.custlistsortdire != '') { sortstr = this.custlistsortfield + ' ' + this.custlistsortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/CustListData', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 = 'MSRPTBSLISTCUST'; 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 }); } } }); } else if (this.tabpanel.activeTab == this.panelDeptSum) { if (this.storeDeptList.getCount() == 0) { return; } var sortstr = ' B.SALEDEPT'; if (this.deptlistsortfield != '' && this.deptlistsortdire != '') { sortstr = this.deptlistsortfield + ' ' + this.deptlistsortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/DeptListData', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 = 'MSRPTBSLISTDEPT'; 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 }); } } }); } else if (this.tabpanel.activeTab == this.panelOpSum) { if (this.storeOpList.getCount() == 0) { return; } var sortstr = ' B.OP, B.BSTYPE'; if (this.oplistsortfield != '' && this.oplistsortdire != '') { sortstr = this.oplistsortfield + ' ' + this.oplistsortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/OpListData', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 = 'MSRPTBSLISTOP'; 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 }); } } }); } else if (this.tabpanel.activeTab == this.panelBsSourceSum) { if (this.storeBsSourceList.getCount() == 0) { return; } var sortstr = ' B.BSSOURCE, B.BSTYPE'; if (this.bssourcelistsortfield != '' && this.bssourcelistsortdire != '') { sortstr = this.bssourcelistsortfield + ' ' + this.bssourcelistsortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/BsSourceListData', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 = 'MSRPTBSLISTBSOURCE'; 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 }); } } }); } else if (this.tabpanel.activeTab == this.panelBsSourceDetailSum) { if (this.storeBsSourceDetailList.getCount() == 0) { return; } var sortstr = ' B.BSSOURCE,B.BSSOURCEDETAIL, B.BSTYPE'; if (this.bssourcelistdetailsortfield != '' && this.bssourcelistdetailsortdire != '') { sortstr = this.bssourcelistdetailsortfield + ' ' + this.bssourcelistdetailsortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/BsSourceDetailListData', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 = 'MSRPTBSLISTBSSOURCEDETAIL'; 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 }); } } }); } else if (this.tabpanel.activeTab == this.panelLaneSum) { if (this.storeLaneList.getCount() == 0) { return; } var sortstr = ' B.LANE'; if (this.lanelistsortfield != '' && this.lanelistsortdire != '') { sortstr = this.lanesortfield + ' ' + this.lanesortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/LaneListData', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 = 'MSRPTBSLISTLANE'; 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 }); } } }); } else if (this.tabpanel.activeTab == this.panelDestinationSum) { if (this.storeDestinationList.getCount() == 0) { return; } var sortstr = ' B.DESTINATIONID'; if (this.destinationlistsortfield != '' && this.destinationlistsortdire != '') { sortstr = this.destinationsortfield + ' ' + this.destinationsortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/DestinationListData', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 = 'MSRPTBSLISTLANE'; 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 }); } } }); } else if (this.tabpanel.activeTab == this.panelCarrierSum) { if (this.storeCarrierList.getCount() == 0) { return; } var sortstr = ' B.CARRIER'; if (this.carrierlistsortfield != '' && this.carrierlistsortdire != '') { sortstr = this.carrierlistsortfield + ' ' + this.carrierlistsortdire; } Ext.Msg.wait('正在组织数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在组织数据...', url: '/MvcShipping/MsRptOpBsList/CarrierListData', scope: this, params: { start: 0, limit: this.PageSize, condition: _this.sqlcontext, 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 = 'MSRPTBSLISTCARRIER'; 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 }); } } }); } } });