Ext.namespace('Shipping'); Shipping.MsInfoClientOpIndex = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.MsInfoClientOpIndex.superclass.constructor.call(this); }; Ext.extend(Shipping.MsInfoClientOpIndex, Ext.Panel, { OprationStatus: null, //仅当弹出界面时使用 SelectedRecord: null, opid: '', AUTHORITYID:'', initUIComponents: function () { //定义数据集 this.formname = "MsInfoClientOpIndex"; //页面名称 this.storeList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, model: 'MsInfoClientModel', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsInfoClient/GetDataList', reader: { id: 'GID', root: 'data', totalProperty: 'totalCount' } } }); Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, { width: 30 }); _this = this; this.initgirdcolums = [{ sortable: true, id: '', dataIndex: '', header: '', width: 0 }, { sortable: true, id: '', dataIndex: 'GID', header: Zi.LAN.GID, //'编号', hidden: true, width: 0 }, { sortable: true, id: '', dataIndex: 'CODENAME', header: Zi.LAN.CODENAME, //'客户代码', width: 120 }, { sortable: true, id: '', dataIndex: 'SHORTNAME', header: Zi.LAN.SHORTNAME, //'客户简称', width: 120 }, { sortable: true, id: '', dataIndex: 'DESCRIPTION', header: Zi.LAN.DESCRIPTION, //'客户全称', width: 200 }, { sortable: true, id: '', dataIndex: 'ENFULLNAME', header: Zi.LAN.ENFULLNAME, //'英文全称', width: 200 }, { sortable: true, id: '', dataIndex: 'FARCODE', header: Zi.LAN.FARCODE, //'应收代码', width: 80 }, { sortable: true, id: '', dataIndex: 'FAPCODE', header: Zi.LAN.FAPCODE, //'应付代码', width: 80 }, { sortable: true, id: '', dataIndex: 'ORDERNO', header: Zi.LAN.ORDERNO, //'财务序号', width: 80 }, { sortable: true, id: '', dataIndex: 'TEL', header: Zi.LAN.TEL, //'电话', width: 120 }, { sortable: true, id: '', dataIndex: 'FAX', header: Zi.LAN.FAX, //'传真', width: 80 }, { sortable: true, id: '', dataIndex: 'SALE', header: Zi.LAN.SALE, //'揽货人', width: 120 }, { sortable: true, id: '', dataIndex: 'BSSOURCE', header: Zi.LAN.BSSOURCE, //'业务来源', width: 120 }, { sortable: true, id: '', dataIndex: 'OPNAME', header: Zi.LAN.OPNAME, //'录入人', width: 80 }, { sortable: true, id: '', dataIndex: 'OPTIME', header: Zi.LAN.OPTIME, //'录入日期', width: 80 }, { sortable: true, id: '', dataIndex: 'BLSTATUSREF', header: Zi.LAN.BLSTATUSREF, //'审核状态', width: 80 }, { sortable: true, id: '', dataIndex: 'ACCREMARK', header: Zi.LAN.ACCREMARK, //'审核状态', width: 80 }, { sortable: true, dataIndex: 'ACCTYPE', header: "可结算方式", width: 80 }, { sortable: true, dataIndex: 'ACCMONTH', header: "间隔月份", width: 80 }, { sortable: true, dataIndex: 'ACCDAYS', header: "结算时间", width: 80 }]; this.girdcolums = this.initgirdcolums; this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); //定义Grid this.gridList = new Ext.grid.GridPanel({ store: this.storeList, enableHdMenu: false, region: 'center', loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhong }, //"数据加载中,请稍等..." trackMouseOver: true, disableSelection: false, selModel: this.GridCheckBoxModel, viewConfig: { enableTextSelection: true, //允许复制数据 autoFill: true }, listeners: { cellclick: function (thisTab, record, item, index, e, eOpts) { if (index == 10) {//设置按钮列 // alert('用户编号=' + this.getStore().getAt(rowIndex).data.usercode); } } }, columns: this.girdcolums, // paging bar on the bottom bbar: Ext.create('Ext.PagingToolbar', { store: this.storeList, displayMsg: Zi.LAN.displayMsg, //'当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: Zi.LAN.emptyMsg, //"没有数据" displayInfo: true }) }); /////////////以下部分为获取存储的gridpanel显示样式 this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列 this.gridList.columns[0] = new Ext.grid.RowNumberer(); this.gridList.reconfigure(this.storeList, this.girdcolums); //////////////////////////////////////////////// this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) { this.SelectedRecord = record; this.OprationStatus = 'edit'; var openSet = "height=700, width=1200, 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 = "/MvcShipping/MsInfoClient/Edit"; window.open(openUrl, openType, openSet); }, this); Ext.define('ModuleModel', { extend: 'Ext.data.Model', fields: [ { name: 'id', type: 'string' }, { name: 'NAME', type: 'string' }, { name: 'DESCRIPTION', type: 'string' }, { name: 'MODULEURL', type: 'string' }, { name: 'SORT', type: 'number' }, { name: 'PARENTID', type: 'string' }, { name: 'PARENTNAME', type: 'string' }, { name: 'TYPE', type: 'string' }, { name: 'leaf', type: 'bool' }, { name: 'expanded', type: 'bool' } ] }); this.treestore = new Ext.data.TreeStore({ model: 'ModuleModel', nodeParam: 'PARENTID', proxy: { type: 'ajax', url: '/MvcShipping/MsUserAuthority/GetUserTreeRefList', reader: { id: 'GID', root: 'data', totalProperty: 'totalCount' } }, autoLoad: true, root: { name: '根节点', expanded: true, id: '0' } }); _thisAuthority = this; this.tabtree = new Ext.tree.Panel({ region: 'west', title: '人员信息', //'业务信息', split: true, width: 320, collapsible: true, margins: '0 0 0 0', store: this.treestore, useArrows: true, rootVisible: false, hideHeaders: true, animate: false, lines: false, columns: [{ xtype: 'treecolumn', text: '人员信息', //'模块名称', width: 318, dataIndex: 'DESCRIPTION' }], listeners: { scope: this, 'itemclick': function (_this, record, item, index, e, eOpts) { if (record.data.TYPE == '2') { var userid = record.data.id; this.panelcenter.setTitle(record.data.DESCRIPTION + '权限范围'); _thisAuthority.storeList.load({ params: { start: 0, limit: 500, sort: '', userid: userid }, waitMsg: "正在查询数据...", scope: this }); _thisAuthority.opid = userid; } } } }); //查询工具条 this.panelBtn = new Ext.Panel({ region: "north", tbar: [ { text: "保存", iconCls: "btnsave", handler: function (button, event) { this.onPostDetailClick(button, event); }, scope: this }, '-',{ text: '可视范围复制到全部', tooltip: '可视范围复制到全部', handler: function (button, event) { var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请选择要复制的权限范围!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var record = selections[0]; var VISIBLERANGE=record.data.VISIBLERANGE; var VISIBLERANGEREF=record.data.VISIBLERANGEREF; var i; for (i = 0; i < this.storeList.getCount(); i += 1) { var memberyf = this.storeList.getAt(i); memberyf.set("VISIBLERANGE", VISIBLERANGE); memberyf.set("VISIBLERANGEREF", VISIBLERANGEREF); // memberyf.commit(); }; }, scope: this }, '-',{ text: '操作范围复制到全部', tooltip: '操作范围复制到全部', handler: function (button, event) { var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请选择要复制的权限范围!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var record = selections[0]; var OPERATERANGE=record.data.OPERATERANGE; var OPERATERANGEREF=record.data.OPERATERANGEREF; var i; for (i = 0; i < this.storeList.getCount(); i += 1) { var memberyf = this.storeList.getAt(i); memberyf.set("OPERATERANGE", OPERATERANGE); memberyf.set("OPERATERANGEREF", OPERATERANGEREF); // memberyf.commit(); }; }, scope: this },'-', { text: "刷新", iconCls: "btnrefresh", handler: function (button, event) { var sql = ''; this.storeList.reload(); }, scope: this } ] }); //#region 公司可视 this.storeListCompanyVs = Ext.create('Ext.data.Store', { model: 'MsUserAuthorityCompany', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsUserAuthority/GetUserAuthorityCompanyList', reader: { id: 'GID', root: 'data', totalProperty: 'totalCount' } } }); this.gridListCompanyVsCellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }); this.gridListCompanyVs = new Ext.grid.GridPanel({ store: this.storeListCompanyVs, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, plugins: [this.gridListCompanyVsCellEditing], selType: 'cellmodel', tbar: [{ text: '全选', tooltip: '全选', handler: function (button, event) { var i; for (i = 0; i < this.storeListCompanyVs.getCount(); i += 1) { var memberyf = this.storeListCompanyVs.getAt(i); memberyf.set("VISIBLERANGE", true); memberyf.commit(); }; }, scope: this }, { text: '全清', tooltip: '全清', handler: function (button, event) { var i; for (i = 0; i < this.storeListCompanyVs.getCount(); i += 1) { var memberyf = this.storeListCompanyVs.getAt(i); memberyf.set("VISIBLERANGE",false); memberyf.commit(); }; }, scope: this }, { text: '保存', tooltip: '保存', iconCls: "btnsave", handler: function (button, event) { this.onPostCompanyVsDetailClick(button, event); }, scope: this }], columns: [{ sortable: true, dataIndex: 'GID', header: 'GID', hidden: true, width: 120 }, { sortable: true, dataIndex: 'COMPANY', header: '公司名称', width: 200 }, { sortable: true, xtype: 'checkcolumn', dataIndex: 'VISIBLERANGE', header: '可视', stopSelection: false, width: 60 } ] }); this.panelCompanyVsList = new Ext.Panel({ layout: "border", title: '选择公司可视范围', flex : 1, hidden:true, // region: "east", // width:300, items: [this.gridListCompanyVs] }); //#endregion //#region 公司可操作 this.storeListCompanyOp = Ext.create('Ext.data.Store', { model: 'MsUserAuthorityCompany', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsUserAuthority/GetUserAuthorityCompanyList', reader: { id: 'GID', root: 'data', totalProperty: 'totalCount' } } }); this.gridListCompanyOpCellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }); this.gridListCompanyOp = new Ext.grid.GridPanel({ store: this.storeListCompanyOp, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, plugins: [this.gridListCompanyOpCellEditing], selType: 'cellmodel', tbar: [{ text: '全选', tooltip: '全选', handler: function (button, event) { var i; for (i = 0; i < this.storeListCompanyOp.getCount(); i += 1) { var memberyf = this.storeListCompanyOp.getAt(i); memberyf.set("OPERATERANGE", true); memberyf.commit(); }; }, scope: this }, { text: '全清', tooltip: '全清', handler: function (button, event) { var i; for (i = 0; i < this.storeListCompanyOp.getCount(); i += 1) { var memberyf = this.storeListCompanyOp.getAt(i); memberyf.set("OPERATERANGE",false); memberyf.commit(); }; }, scope: this }, { text: '保存', tooltip: '保存', iconCls: "btnsave", handler: function (button, event) { this.onPostCompanyOpDetailClick(button, event); }, scope: this }], columns: [{ sortable: true, dataIndex: 'GID', header: 'GID', hidden: true, width: 120 }, { sortable: true, dataIndex: 'COMPANY', header: '公司名称', width: 200 }, { sortable: true, xtype: 'checkcolumn', dataIndex: 'OPERATERANGE', header: '可操作', stopSelection: false, width: 60 } ] }); this.panelCompanyOpList = new Ext.Panel({ layout: "border", title: '选择公司可操作范围', flex : 1, hidden:true, // region: "east", // width:300, items: [this.gridListCompanyOp] }); //#endregion //#region 人员可视 this.storeListOpVs = Ext.create('Ext.data.Store', { model: 'MsUserAuthorityOp', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsUserAuthority/GetUserAuthorityOpList', reader: { id: 'GID', root: 'data', totalProperty: 'totalCount' } } }); this.gridListOpVsCellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }); this.gridListOpVs = new Ext.grid.GridPanel({ store: this.storeListOpVs, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, plugins: [this.gridListOpVsCellEditing], selType: 'cellmodel', tbar: [{ text: '全选', tooltip: '全选', handler: function (button, event) { var i; for (i = 0; i < this.storeListOpVs.getCount(); i += 1) { var memberyf = this.storeListOpVs.getAt(i); memberyf.set("VISIBLERANGE", true); memberyf.commit(); }; }, scope: this }, { text: '全清', tooltip: '全清', handler: function (button, event) { var i; for (i = 0; i < this.storeListOpVs.getCount(); i += 1) { var memberyf = this.storeListOpVs.getAt(i); memberyf.set("VISIBLERANGE", false); memberyf.commit(); }; }, scope: this }, { text: '保存', tooltip: '保存', iconCls: "btnsave", handler: function (button, event) { this.onPostOpVsDetailClick(button, event); }, scope: this }, '-',{ text: '更新到此人所有[选择人员]', tooltip: '更新到此人所有[选择人员]', handler: function (button, event) { this.onPostOpVsAllClick(button, event); }, scope: this }], columns: [{ sortable: true, dataIndex: 'GID', header: 'GID', hidden: true, width: 120 }, { sortable: true, dataIndex: 'OPNAME', header: '人员', width: 200 }, { sortable: true, dataIndex: 'DEPTNAME', header: '部门', width: 120 }, { sortable: true, xtype: 'checkcolumn', dataIndex: 'VISIBLERANGE', header: '可视', stopSelection: false, width: 60 } ] }); this.panelOpVsList = new Ext.Panel({ layout: "border", title: '员工可视范围', flex : 1, hidden:true, // region: "east", // width: 300, items: [this.gridListOpVs] }); //#endregion //#region 人员可视 this.storeListOpOp = Ext.create('Ext.data.Store', { model: 'MsUserAuthorityOp', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsUserAuthority/GetUserAuthorityOpList', reader: { id: 'GID', root: 'data', totalProperty: 'totalCount' } } }); this.gridListOpOpCellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }); this.gridListOpOp = new Ext.grid.GridPanel({ store: this.storeListOpOp, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, plugins: [this.gridListOpOpCellEditing], selType: 'cellmodel', tbar: [{ text: '全选', tooltip: '全选', handler: function (button, event) { var i; for (i = 0; i < this.storeListOpOp.getCount(); i += 1) { var memberyf = this.storeListOpOp.getAt(i); memberyf.set("OPERATERANGE", true); memberyf.commit(); }; }, scope: this }, { text: '全清', tooltip: '全清', handler: function (button, event) { var i; for (i = 0; i < this.storeListOpOp.getCount(); i += 1) { var memberyf = this.storeListOpOp.getAt(i); memberyf.set("OPERATERANGE", false); memberyf.commit(); }; }, scope: this }, { text: '保存', tooltip: '保存', iconCls: "btnsave", handler: function (button, event) { this.onPostOpOpDetailClick(button, event); }, scope: this }, '-',{ text: '更新到此人所有[选择人员]', tooltip: '更新到此人所有[选择人员]', handler: function (button, event) { this.onPostOpOpAllClick(button, event); }, scope: this }], columns: [{ sortable: true, dataIndex: 'GID', header: 'GID', hidden: true, width: 120 }, { sortable: true, dataIndex: 'OPNAME', header: '人员', width: 200 }, { sortable: true, dataIndex: 'DEPTNAME', header: '部门', width: 120 }, { sortable: true, xtype: 'checkcolumn', dataIndex: 'OPERATERANGE', header: '可操作', stopSelection: false, width: 60 } ] }); this.panelOpOpList = new Ext.Panel({ layout: "border", title: '员工可操作范围', flex : 1, hidden:true, // region: "east", // width: 300, items: [this.gridListOpOp] }); //#endregion this.panelOpVs = new Ext.Panel({ layout: { type: 'vbox', align : 'stretch', pack : 'start', }, region: "east", width: 460, items: [this.panelCompanyVsList,this.panelCompanyOpList,this.panelOpVsList,this.panelOpOpList] }); this.panelTop = new Ext.Panel({ layout: "border", region: "north", height: 30, items: [this.panelBtn] }); this.panelList = new Ext.Panel({ layout: "border", title: '', region: "center", items: [this.gridList, this.panelOpVs] }); this.panelcenter = new Ext.Panel({ title: '权限范围设置', //'委托详细信息', layout: "border", region: 'center', animate: true, autoScroll: true, // containerScroll: true, frame: false, items: [this.panelTop, this.panelList] }); Ext.apply(this, { items: [this.tabtree, this.panelcenter] }); this.gridList.on('edit', function (editor, e, eOpts) { this.gridListAfterEdit(editor, e, eOpts); }, this); this.storeList.on('beforeload', function (store) { // var sql = this.getCondition(); Ext.apply(store.proxy.extraParams, { userid: _thisAuthority.opid }); }, this); this.storeListCompanyVs.on('beforeload', function (store) { Ext.apply(store.proxy.extraParams, { userid: _thisAuthority.opid,authorityid:_thisAuthority.AUTHORITYID }); }, this); this.storeListCompanyOp.on('beforeload', function (store) { Ext.apply(store.proxy.extraParams, { userid: _thisAuthority.opid,authorityid:_thisAuthority.AUTHORITYID }); }, this); this.storeListOpVs.on('beforeload', function (store) { Ext.apply(store.proxy.extraParams, { userid: _thisAuthority.opid,authorityid:_thisAuthority.AUTHORITYID }); }, this); this.storeListOpOp.on('beforeload', function (store) { Ext.apply(store.proxy.extraParams, { userid: _thisAuthority.opid,authorityid:_thisAuthority.AUTHORITYID }); }, this); }, //end initUIComponents gridListAfterEdit: function (editor, e, eOpts) { if (e.value == e.originalValue) return; if (e.field == 'VISIBLERANGE') { var selectrecords = DsStoreQueryBy(this.StoreRANGE, 'NUM', e.value); if (selectrecords.getCount() > 0) { var selectdata = selectrecords.getAt(0).data; e.record.set('VISIBLERANGEREF', selectdata.BL); } else { e.record.set('VISIBLERANGEREF', ''); } } else if (e.field == 'OPERATERANGE') { var selectrecords = DsStoreQueryBy(this.StoreRANGE, 'NUM', e.value); if (selectrecords.getCount() > 0) { var selectdata = selectrecords.getAt(0).data; e.record.set('OPERATERANGEREF', selectdata.BL); } else { e.record.set('OPERATERANGEREF', ''); } } }, onPostDetailClick: function (button, event) { // var selections = this.gridList.getSelectionModel().getSelection(); // if (selections.length == 0) { // Ext.Msg.show({ title: '提示', msg: '请先选择报表!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; // } var bodyDrChFeeDatas = []; var i; for (i = 0; i < this.storeList.getCount(); i += 1) { var memberyf = this.storeList.getAt(i); bodyDrChFeeDatas.push(memberyf); }; var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas); _thisfee = this; Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcShipping/MsUserAuthority/Save', scope: this, params: { body: jsonChFeeBody, userid: _thisAuthority.opid }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var sql = ''; this.storeList.reload(); } 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 }); } } }); }, //end save onPostCompanyVsDetailClick: function (button, event) { // var selections = this.gridList.getSelectionModel().getSelection(); // if (selections.length == 0) { // Ext.Msg.show({ title: '提示', msg: '请先选择报表!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; // } var bodyDrChFeeDatas = []; var i; for (i = 0; i < this.storeListCompanyVs.getCount(); i += 1) { var memberyf = this.storeListCompanyVs.getAt(i); bodyDrChFeeDatas.push(memberyf); }; var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas); _thisfee = this; Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcShipping/MsUserAuthority/SaveAuthorityCompany', scope: this, params: { body: jsonChFeeBody, rtype:'VS' }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var sql = ''; this.storeListCompanyVs.reload(); this.storeListCompanyOp.reload(); } 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 }); } } }); }, //end save onPostCompanyOpDetailClick: function (button, event) { // var selections = this.gridList.getSelectionModel().getSelection(); // if (selections.length == 0) { // Ext.Msg.show({ title: '提示', msg: '请先选择报表!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; // } var bodyDrChFeeDatas = []; var i; for (i = 0; i < this.storeListCompanyOp.getCount(); i += 1) { var memberyf = this.storeListCompanyOp.getAt(i); bodyDrChFeeDatas.push(memberyf); }; var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas); _thisfee = this; Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcShipping/MsUserAuthority/SaveAuthorityCompany', scope: this, params: { body: jsonChFeeBody, rtype:'OP' }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var sql = ''; this.storeListCompanyOp.reload(); this.storeListCompanyVs.reload(); } 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 }); } } }); }, //end save onPostOpVsDetailClick: function (button, event) { // var selections = this.gridList.getSelectionModel().getSelection(); // if (selections.length == 0) { // Ext.Msg.show({ title: '提示', msg: '请先选择报表!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; // } var bodyDrChFeeDatas = []; var i; for (i = 0; i < this.storeListOpVs.getCount(); i += 1) { var memberyf = this.storeListOpVs.getAt(i); bodyDrChFeeDatas.push(memberyf); }; var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas); _thisfee = this; Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcShipping/MsUserAuthority/SaveAuthorityOpDetail', scope: this, params: { body: jsonChFeeBody, rtype:'VS' }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var sql = ''; this.storeListOpVs.reload(); this.storeListOpOp.reload(); } 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 }); } } }); }, //end save onPostOpVsAllClick: function (button, event) { // var selections = this.gridList.getSelectionModel().getSelection(); // if (selections.length == 0) { // Ext.Msg.show({ title: '提示', msg: '请先选择报表!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; // } var bodyDrChFeeDatas = []; var i; for (i = 0; i < this.storeListOpVs.getCount(); i += 1) { var memberyf = this.storeListOpVs.getAt(i); bodyDrChFeeDatas.push(memberyf); }; var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas); _thisfee = this; Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcShipping/MsUserAuthority/SaveAuthorityOpAll', scope: this, params: { body: jsonChFeeBody, rtype:'VS' }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var sql = ''; this.storeListOpVs.reload(); this.storeListOpOp.reload(); } 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 }); } } }); }, //end save onPostOpOpDetailClick: function (button, event) { // var selections = this.gridList.getSelectionModel().getSelection(); // if (selections.length == 0) { // Ext.Msg.show({ title: '提示', msg: '请先选择报表!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; // } var bodyDrChFeeDatas = []; var i; for (i = 0; i < this.storeListOpOp.getCount(); i += 1) { var memberyf = this.storeListOpOp.getAt(i); bodyDrChFeeDatas.push(memberyf); }; var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas); _thisfee = this; Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcShipping/MsUserAuthority/SaveAuthorityOpDetail', scope: this, params: { body: jsonChFeeBody, rtype:'OP' }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var sql = ''; this.storeListOpOp.reload(); this.storeListOpVs.reload(); } 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 }); } } }); }, //end save onPostOpOpAllClick: function (button, event) { // var selections = this.gridList.getSelectionModel().getSelection(); // if (selections.length == 0) { // Ext.Msg.show({ title: '提示', msg: '请先选择报表!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; // } var bodyDrChFeeDatas = []; var i; for (i = 0; i < this.storeListOpOp.getCount(); i += 1) { var memberyf = this.storeListOpOp.getAt(i); bodyDrChFeeDatas.push(memberyf); }; var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas); _thisfee = this; Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcShipping/MsUserAuthority/SaveAuthorityOpAll', scope: this, params: { body: jsonChFeeBody, rtype:'OP' }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var sql = ''; this.storeListOpOp.reload(); this.storeListOpVs.reload(); } 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 }); } } }); }, //end save OprationSwap: function () { var ret = new Array(); ret[0] = this.OprationStatus; ret[1] = this.storeList; ret[2] = this.SelectedRecord; return ret; } });