Ext.namespace('Shipping'); Shipping.MsOpCtnBsCtnChfeeEdit = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.MsOpCtnBsCtnChfeeEdit.superclass.constructor.call(this); }; Ext.extend(Shipping.MsOpCtnBsCtnChfeeEdit, Ext.Panel, { ParentWin: null, //弹出式 ParentPanel: null, //Tab页编辑模式 OpStatus: 'add', EditRecord: null, RefBillNo: '*', DataLoading: true, stroplb: '', strBSNO: '', FeeStatus: '', feeType: 0, PageSize: 30, sqlcontext: '', initUIComponents: function () { Ext.Ajax.timeout = 120000; this.formname = 'FormMsOpCtnBsCtnChfeeEdit'; this.openertype = getUrlParam("opener"); this.editGID = ""; this.bsno = "1"; this.MBSNO = ""; this.bodylist = null; var mainform = window.panelEdit; if (mainform == undefined) { mainform = window.parent.panelEdit; } if (mainform != null) { mainEditRecord = mainform.editRecord; this.applyno = mainEditRecord.get('APPLYNO'); this.MBSNO = mainEditRecord.get('BSNO'); this.bodylist = mainform.storeBodyList; } this.storePLList = Ext.create('Ext.data.Store', { model: 'MsOpCtnBsCard' }); this.storeBillList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, model: 'MsOpCtnBsCard', remoteSort: true, proxy: { type: 'ajax', timeout: 120000, url: '/MvcContainer/MsOpCtnBsCard/GetDataList', reader: { id: 'GID', root: 'data', totalProperty: 'totalCount' } } }); 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.AddGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); this.initgirdcolums = [{ sortable: true, dataIndex: 'GID', header: 'GID', hidden: true, width: 120 }, { sortable: true, id: '', dataIndex: '', header: '', width: 0 }, { sortable: true, dataIndex: 'COMPANYID', header: 'COMPANYID', hidden: true, width: 120 }, { sortable: true, dataIndex: 'CTNNO', header: '箱号', width: 200 }, { sortable: true, dataIndex: 'APPLYNO', header: '放箱申请编号', width: 120 }, { sortable: true, dataIndex: 'CTNPROP', header: '箱属', width: 200 }, { sortable: true, dataIndex: 'BSNO', header: '业务编号', width: 200 }, { sortable: true, dataIndex: 'MODIFYTIME', header: '更新时间', width: 200 }, { sortable: true, dataIndex: 'ISCLOSE', header: '锁定', width: 100, renderer: function (value, cellmeta) { if (value == 'true') { return ""; } } }, { sortable: true, dataIndex: 'IS_PUTCTN', header: '放箱通知发送', width: 100, renderer: function (value, cellmeta) { if (value == 'true') { return "是"; } } }, { sortable: true, dataIndex: 'PUTCTNDATE', header: '放箱通知发送时间', width: 100 }, { sortable: true, dataIndex: 'PUTCTNAUDITSTATUS', header: '放箱通知审核状态', width: 100 }, { sortable: true, dataIndex: 'PUTCTNAUDITBYREF', header: '放箱通知审核人', width: 100 }, { sortable: true, dataIndex: 'CUSTOMERNAME', header: '委托单位', width: 200 }, { sortable: true, dataIndex: 'GOODSNAME', header: '货物名称', width: 100 }, { sortable: true, dataIndex: 'GOODSNAMEREF', header: '货物名称(含英文简称)', width: 100 }, { sortable: true, dataIndex: 'PREGOODSNAME', header: '前装货品名', width: 100 }, { sortable: true, dataIndex: 'ETD', header: '开船日期', width: 100 }, { sortable: true, dataIndex: 'PREETA', header: '预抵日期', width: 100 }, { sortable: true, dataIndex: 'ETA', header: '到港日期', width: 100 }, { sortable: true, dataIndex: 'AGENTNAME', header: '目的港代理', width: 100 }, { sortable: true, dataIndex: 'CUR_PORT', header: '当前位置', width: 100 }, { sortable: true, dataIndex: 'CUR_DATE', header: '当前时间', width: 100 }, { sortable: true, dataIndex: 'CYCLE_DAY', header: '周期', width: 100 }, { sortable: true, dataIndex: 'CUSTNO', header: '委托编号', width: 200 }, { sortable: true, dataIndex: 'OP', header: '操作', width: 200 }, { sortable: true, dataIndex: 'MBLNO', header: '主提单号', width: 200 }, { sortable: true, dataIndex: 'CARRIER', header: '船公司', width: 200 }, { sortable: true, dataIndex: 'PORTLOAD_STATOIN', header: '起运港场站', width: 200 }, { sortable: true, dataIndex: 'PORTLOAD_CNT_TIME', header: '起运港提箱日期', width: 200 }, { sortable: true, dataIndex: 'LOADFACTORY', header: '装货工厂', width: 200 }, { sortable: true, dataIndex: 'PORTLOAD', header: '起运港', width: 200 }, { sortable: true, dataIndex: 'DESTPORT', header: '目的港', width: 100 }, { sortable: true, dataIndex: 'DEST_CNT_TIME', header: '目的港提箱日期', width: 200 }, { sortable: true, dataIndex: 'DEST_RTCNT_TIME', header: '目的港还箱日期', width: 200 }, { sortable: true, dataIndex: 'DESTPORT_STATOIN', header: '目的港场站', width: 200 }, { sortable: true, dataIndex: 'DETAIN_CTN_DAYS', header: '滞箱天数', width: 200 }, { sortable: true, dataIndex: 'PRE_CNT_TIME', header: '预计提箱日期', width: 200 }, { sortable: true, dataIndex: 'IS_RETURE_EMPTY', header: '是否返空', width: 100 }, { sortable: true, dataIndex: 'IS_POD_CLEAN', header: '否目的港清洗', width: 100 }, { sortable: true, dataIndex: 'IS_BOOKING', header: '是否订舱', width: 200 }, { sortable: true, dataIndex: 'I_CUSTNO', header: '空返委托编号', width: 100 }, { sortable: true, dataIndex: 'I_MBLNO', header: '空返提单号', width: 120 }, { sortable: true, dataIndex: 'I_CARRIER', header: '空返船公司', width: 100 }, { sortable: true, dataIndex: 'I_CONTRACT', header: '运费约价', width: 100 }, { sortable: true, dataIndex: 'I_PORTLOAD_CNT_TIME', header: '空返起运港提箱日期', width: 100 }, { sortable: true, dataIndex: 'I_PORTLOAD', header: '空返起运港', width: 100 }, { sortable: true, dataIndex: 'I_ETD', header: '空返开船日期', width: 100 }, { sortable: true, dataIndex: 'I_DESTPORT', header: '空返目的港', width: 100 }, { sortable: true, dataIndex: 'I_ETA', header: '空返到港日期', width: 100 }, { sortable: true, dataIndex: 'I_DESTPORT_STATOIN', header: '空返目的港场站', width: 100 }, { sortable: true, dataIndex: 'I_DEST_CNT_TIME', header: '空返目的港提箱日期', width: 100 }, { sortable: true, dataIndex: 'I_DEST_RTCNT_TIME', header: '空返目的港还箱日期', width: 100 }, { sortable: true, dataIndex: 'PORTLOAD_FREE_DAYS', header: '起运港免箱使天数', width: 100 }, { sortable: true, dataIndex: 'PORTLOAD_OVER_DAYS', header: '起运港超期天数', width: 100 }, { sortable: true, dataIndex: 'PORTLOAD_OVER_DAYS_FEE', header: '起运港箱使费/天', width: 100 }, { sortable: true, dataIndex: 'PORTLOAD_OVER_DAYS_AMT', header: '起运港箱使费', width: 100 }, { sortable: true, dataIndex: 'DESTPORT_FREE_DAYS', header: '目的港免箱使天数', width: 100 }, { sortable: true, dataIndex: 'DESTPORT_OVER_DAYS', header: '目的港超期天数', width: 100 }, { sortable: true, dataIndex: 'DESTPORT_OVER_DAYS_FEE', header: '目的港箱使费/天', width: 100 }, { sortable: true, dataIndex: 'DESTPORT_OVER_DAYS_AMT', header: '目的港箱使费', width: 100 }, { sortable: true, dataIndex: 'MDGXSFSTATUS', header: '目的港箱使费生成状态', width: 140, renderer: function (value, meta, record) { var acolor = '#000000'; if (record.data.MDGXSFSTATUS === '') { acolor = '#000000'; } else if (value === '已生成,已引入') { acolor = '#00bc12'; } else if (value === '已生成,未引入') { acolor = '#B87070'; } else if (value === '已还箱,未生成') { acolor = '#B87070'; } else if (value === '未还箱,未生成') { acolor = '#B87070'; } else { acolor = ' #000000'; } returnValue = '' + value + ''; return returnValue; } }, { sortable: true, dataIndex: 'BOOKGOODNAME', header: '订舱品名', width: 100 }, { sortable: true, dataIndex: 'CUSTOMGOODNAME', header: '报关品名', width: 100 }, { sortable: true, dataIndex: 'TRUCKNAME', header: '录车队', width: 100 }, { sortable: true, dataIndex: 'INPUTBYREF', header: '录入人', width: 100 }, { sortable: true, dataIndex: 'INPUTTIME', header: '录入时间', width: 100 }, { sortable: true, dataIndex: 'SERVICE', header: '运输条款', width: 100 }, { sortable: true, dataIndex: 'NEEDBEHEATED', header: '是否加热', width: 80, renderer: function (value, cellmeta) { if (value == 'true') { return "是"; } } }, { sortable: true, dataIndex: 'AGENTINPUTBY', header: '代理维护人', width: 100 }, { sortable: true, dataIndex: 'IS_DB', header: '是否调拨', width: 100 }, { sortable: true, dataIndex: 'D_CUSTNO', header: '调拨委托编号', width: 100 }, { sortable: true, dataIndex: 'D_MBLNO', header: '调拨提单号', width: 120 }, { sortable: true, dataIndex: 'D_CARRIER', header: '调拨船公司', width: 100 }, { sortable: true, dataIndex: 'D_PORTLOAD_CNT_TIME', header: '调拨起运港提箱日期', width: 100 }, { sortable: true, dataIndex: 'D_PORTLOAD', header: '调拨起运港', width: 100 }, { sortable: true, dataIndex: 'D_ETD', header: '调拨开船日期', width: 100 }, { sortable: true, dataIndex: 'D_DESTPORT', header: '调拨目的港', width: 100 }, { sortable: true, dataIndex: 'D_ETA', header: '调拨到港日期', width: 100 }, { sortable: true, dataIndex: 'D_DESTPORT_STATOIN', header: '调拨目的港场站', width: 100 }, { sortable: true, dataIndex: 'D_DEST_CNT_TIME', header: '调拨目的港提箱日期', width: 100 }, { sortable: true, dataIndex: 'D_DEST_RTCNT_TIME', header: '调拨目的港还箱日期', width: 100 }, { sortable: true, dataIndex: 'N_FACTRY', header: '送货工厂', width: 100 }, { sortable: true, dataIndex: 'N_FACTRYADDR', header: '送货地址', width: 100 }, { sortable: true, dataIndex: 'OILXS', header: '燃油系数', width: 100 }, { sortable: true, dataIndex: 'N_BKNO', header: '交货单号', width: 100 }, { sortable: true, dataIndex: 'N_CARRIER_TASKNO', header: '船运-运输任务单号', width: 100 }, { sortable: true, dataIndex: 'N_TRUCK_TASKNO', header: '汽运-运输任务单号', width: 100 }, { sortable: true, dataIndex: 'N_DELIVERYDATE', header: '送货时间', width: 100 } ]; this.girdcolums = this.initgirdcolums; this.gridBillList = new Ext.grid.GridPanel({ store: this.storeBillList, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, viewConfig: { enableTextSelection: true }, disableSelection: false, selModel: this.AddGridCheckBoxModel, columns: this.girdcolums, // paging bar on the bottom bbar: [Ext.create('Ext.PagingToolbar', { store: this.storeBillList, displayInfo: true, displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: "没有要审核的数据" }), this.Pagenum] }); this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列 this.gridBillList.addListener('itemdblclick', function (dataview, record, item, index, e, b) { this.OpenEditWin(record); // DsOpenEditWin("/TruckMng/MsWlPc/Edit"); }, this); //#region formSearch //#region formSearch 查询面板 _this = this; //客户加载_委托单位 this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} }); //委托单位 _this = this; this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '委托单位', store: this.storeCustCode, forceSelection: true, name: 'CUSTOMERNAME', valueField: 'CustName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.formSearch = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 90, msgTarget: 'qtip' }, items: [{//fieldset 1 xtype: 'container', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '箱号', name: 'CTNNO', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '编号', name: 'BSNO', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, this.comboxCustCode, { fieldLabel: '开船日期', format: 'Y-m-d', xtype: 'datefield', name: 'ETDbgn', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '到', format: 'Y-m-d', xtype: 'datefield', name: 'ETDend', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { xtype: 'button', width: 90, text: "执行查询", iconCls: "btnrefresh", handler: function (button, event) { this.onRefreshClick(button, event); }, scope: this }, { xtype: 'button', width: 90, 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 }] } ]//end items(fieldset 1) }]//end root items }); //#endregion formSearch //查询工具条 _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: [ this.SearchBtn, '-', { xtype: 'button', text: '刷新', iconCls: "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 }, //this.CheckSaveQuery, '-', { text: "导出Excel", id: "btnExportExcel", iconCls: 'btnexcel', handler: function (button, event) { this.onExportClick(button, event); }, scope: this }, { text: "打开", iconCls: "btnright", id: "OPEN", handler: function (button, event) { this.onOpenClick(button, event); }, scope: this }, { text: "查看罐箱历史循环", iconCls: "btnright", id: "OPEN", handler: function (button, event) { var selections = this.gridBillList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } record = selections[0]; var ctnno = record.data.CTNNO; DsOpenEditWin("/MvcContainer/MsOpCtnBsCard/CtnStatusIndex?worksql=CTNNO@@'" + ctnno+"'", record.data.GID); }, scope: this }, '-' , { text: "保存列表样式", id: "btntest", menu: [ { text: "保存", handler: function (button, event) { this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridBillList.columns, _this.girdcolums, 1, true); } }, { text: "初始化", handler: function (menu, event) { _this.gridBillList.reconfigure(this.storeBillList, _this.initgirdcolums); _this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridBillList.columns, _this.initgirdcolums, 1, true); } }], scope: this }, '-', { text: "其他操作", menu: [ { text: "费用编辑", handler: function (menu, event) { _this.onPiLiangFeeEditClick(); } }, { text: "批量费用添加", handler: function (menu, event) { _this.onPiLiangFeeAddClick(); } }, { text: "业务批量修改", //"业务批量修改", handler: function (menu, event) { _this.winModifyShow.show(); } }, { text: "引入业务信息", //"业务批量修改", handler: function (menu, event) { _this.ImportBs(); } }, { text: "业务批量维修清洗", //"业务批量修改", handler: function (menu, event) { _this.onPiLiangRepairClearingEditClick(); } }, { text: "场站EXCEL上传", //"业务批量修改", handler: function (menu, event) { _this.onImportYardData(); } } ], scope: this }, '-', { text: "生成箱使费", id: 'CreateOverFee', menu: [ { text: "起运港箱使费", handler: function (menu, event) { _this.CreateOverFee('1'); } }, { text: "起运港箱使代理费", handler: function (menu, event) { _this.CreateOverFee('11'); } }, { text: "目的港箱使费", handler: function (menu, event) { _this.CreateOverFee('2'); } }, { text: "箱使代理费", handler: function (menu, event) { _this.CreateOverFee('3'); } }], scope: this }, '-', { text: "生成堆存费", id: 'CreateDcFee', handler: function (button, event) { this.CreateDcFee(); }, scope: this }, '-', { text: "生成内贸陆运费", id: 'CreateNLYFee', handler: function (button, event) { this.CreateNLYFee(); }, scope: this }, '-', { text: "申请返空/调拨", id: 'ShenReturn', menu: [ { text: "申请返空", handler: function (menu, event) { _this.ShenReturn('1'); } }, { text: "撤销申请", handler: function (menu, event) { _this.ShenReturnBack('0'); } }, { text: "申请调拨", handler: function (menu, event) { _this.ShenReturn('3'); } }, { text: "撤销调拨申请", handler: function (menu, event) { _this.ShenReturnBack('2'); } }], scope: this }, '-', { text: "批量返空", handler: function (button, event) { _this.CreateReAudit(); }, 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.panelBill = new Ext.Panel({ // title: '业务信息', layout: "border", region: 'north', height: 200, frame: true, split: true, items: [this.gridBillList] }); //#region 费用信息 this.panelFee = new Shipping.FeeEditGrid({ region: 'center', layout: 'border' }); this.panelFee.panelDrChFee.anchor = '100% 40%'; this.panelFee.panelCrChFee.anchor = '100% 60%'; this.panelFee.stroplb = 'OpCtnBsCard'; this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKNAME" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "MDGDL-目的港代理", "CUSTTYPE": "目的港代理", "CUSTNAME": "AGENTNAME" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DCGS-订舱公司", "CUSTTYPE": "订舱公司", "CUSTNAME": "AGENTNAME" }); this.panelFee.StoreDrOpRange.load({ params: { optype: "modOtherRecvFeeManagement" } }); this.panelFee.StoreCrOpRange.load({ params: { optype: "modOtherPayFeeManagement" } }); this.panelFee.storeFeeNameRef.load({ params: { condition: "" } }); //#endregion //#region 布局 Ext.apply(this, { split: true, items: [this.panelTop, this.panelSearch, this.panelBill, this.panelFee] }); //#endregion // this.opStatus = 'add'; _this = this; this.storeBillList.on('beforeload', function (store) { var sql = this.getCondition(); Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext }); }, this); _this = this; _this = this; this.gridBillList.getSelectionModel().on('select', function (model, record, index) { this.bsno = record.data.GID; this.EditRecord = record; this.LoadFeeData(); }, this); this.InitData(); LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery); this.gridBillList.reconfigure(this.storeBillList, this.girdcolums); //客户加载_场站 this.store_PORTLOAD_STATOINm = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.store_PORTLOAD_STATOINm.load({ params: { condition: "ISYARD='1'" } }); //场站 this.comboxPORTLOAD_STATOINm = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '起运港场站', store: this.store_PORTLOAD_STATOINm, forceSelection: true, name: 'PORTLOAD_STATOIN', valueField: 'CustName', displayField: 'CodeAndName' }); this.storeAGENTm = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeAGENTm.load({ params: { condition: "ISAGENT='1'" } }); this.comboxAgentm = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '目的港代理', store: this.storeAGENTm, forceSelection: true, name: 'AGENTNAME', valueField: 'CustName', displayField: 'CodeAndName' }); this.storeDESTPORT_STATOINm = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeDESTPORT_STATOINm.load({ params: { condition: "ISYARD='1'" } }); //场站 this.comboxDESTPORT_STATOINm = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '目的港场站', store: this.storeDESTPORT_STATOINm, forceSelection: true, name: 'DESTPORT_STATOIN', valueField: 'CustName', displayField: 'CodeAndName' }); this.storeI_DESTPORT_STATOINm = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeI_DESTPORT_STATOINm.load({ params: { condition: "ISYARD='1'" } }); //场站 this.comboxI_DESTPORT_STATOINm = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '空返目的港场站', store: this.storeI_DESTPORT_STATOINm, forceSelection: true, name: 'I_DESTPORT_STATOIN', valueField: 'CustName', displayField: 'CodeAndName' }); this.storeD_DESTPORT_STATOINm = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeD_DESTPORT_STATOINm.load({ params: { condition: "ISYARD='1'" } }); //场站 this.comboxD_DESTPORT_STATOINm = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '调拨目的港场站', store: this.storeD_DESTPORT_STATOINm, forceSelection: true, name: 'D_DESTPORT_STATOIN', valueField: 'CustName', displayField: 'CodeAndName' }); this.storeICARRIER = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeICARRIER.load({ params: { condition: "ISCARRIER='1'" } }); //船公司 this.comboxICARRIER = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '空返船公司', store: this.storeICARRIER, forceSelection: true, name: 'I_CARRIER', valueField: 'CustName', displayField: 'CodeAndName' }); this.storeTOPVALVE = Ext.create('DsExt.ux.RefEnumStore', {}); this.storeTOPVALVE.load({ params: { enumTypeId: 97034 } }); this.comboxTOPVALVE = Ext.create('DsExt.ux.RefTableCombox', { store: this.storeTOPVALVE, fieldLabel: '顶阀', name: 'TOPVALVE', valueField: 'EnumValueName', displayField: 'EnumValueName' }); this.storeHANDRAIL = Ext.create('DsExt.ux.RefEnumStore', {}); this.storeHANDRAIL.load({ params: { enumTypeId: 97057 } }); this.comboxHANDRAIL = Ext.create('DsExt.ux.RefTableCombox', { store: this.storeHANDRAIL, fieldLabel: '扶手', name: 'HANDRAIL', valueField: 'EnumValueName', displayField: 'EnumValueName' }); this.storeSEXSITSIPHONPIPE = Ext.create('Ext.data.Store', { fields: ['FSTATUS', 'NAME'] }); this.storeSEXSITSIPHONPIPE.add({ "FSTATUS": "", "NAME": "未设置" }); this.storeSEXSITSIPHONPIPE.add({ "FSTATUS": "false", "NAME": "否" }); this.storeSEXSITSIPHONPIPE.add({ "FSTATUS": "true", "NAME": "是" }); this.comboxSEXSITSIPHONPIPE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '虹吸管', store: this.storeSEXSITSIPHONPIPE, valueField: 'FSTATUS', displayField: 'NAME', forceSelection: true, name: 'SEXSITSIPHONPIPE', value: '', enableKeyEvents: true }); this.storeSEXSITPRESSUREGAUGE = Ext.create('Ext.data.Store', { fields: ['FSTATUS', 'NAME'] }); this.storeSEXSITPRESSUREGAUGE.add({ "FSTATUS": "", "NAME": "未设置" }); this.storeSEXSITPRESSUREGAUGE.add({ "FSTATUS": "false", "NAME": "否" }); this.storeSEXSITPRESSUREGAUGE.add({ "FSTATUS": "true", "NAME": "是" }); this.comboxSEXSITPRESSUREGAUGE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '压力表', store: this.storeSEXSITPRESSUREGAUGE, valueField: 'FSTATUS', displayField: 'NAME', forceSelection: true, name: 'SEXSITPRESSUREGAUGE', value: '', enableKeyEvents: true }); this.storeSEXSITTOPOVERFLOWBOX = Ext.create('Ext.data.Store', { fields: ['FSTATUS', 'NAME'] }); this.storeSEXSITTOPOVERFLOWBOX.add({ "FSTATUS": "", "NAME": "未设置" }); this.storeSEXSITTOPOVERFLOWBOX.add({ "FSTATUS": "false", "NAME": "否" }); this.storeSEXSITTOPOVERFLOWBOX.add({ "FSTATUS": "true", "NAME": "是" }); this.comboxSEXSITTOPOVERFLOWBOX = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '顶部溢流盒盖', labelWidth: 80, store: this.storeSEXSITTOPOVERFLOWBOX, valueField: 'FSTATUS', displayField: 'NAME', forceSelection: true, name: 'SEXSITTOPOVERFLOWBOX', value: '', enableKeyEvents: true }); this.storeSIS3TO2VALVE = Ext.create('Ext.data.Store', { fields: ['FSTATUS', 'NAME'] }); this.storeSIS3TO2VALVE.add({ "FSTATUS": "", "NAME": "未设置" }); this.storeSIS3TO2VALVE.add({ "FSTATUS": "false", "NAME": "否" }); this.storeSIS3TO2VALVE.add({ "FSTATUS": "true", "NAME": "是" }); this.comboxSIS3TO2VALVE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '3转2球阀', labelWidth: 80, store: this.storeSIS3TO2VALVE, valueField: 'FSTATUS', displayField: 'NAME', forceSelection: true, name: 'SIS3TO2VALVE', value: '', enableKeyEvents: true }); this.storeCodeDisportMPORTLOAD = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CodeDisportModel', autoLoad: true, proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' } }); this.storeCodeDisportMDESTPORT = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CodeDisportModel', autoLoad: true, proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' } }); this.comboxMPORTLOAD = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '起运港', store: this.storeCodeDisportMPORTLOAD, queryMode: 'remote', minChars: 2, queryParam: 'PORT', name: 'PORTLOAD', valueField: 'PORT', displayField: 'PORT' }); this.comboxMDESTPORT = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '目的港', store: this.storeCodeDisportMDESTPORT, queryMode: 'remote', minChars: 2, queryParam: 'PORT', name: 'DESTPORT', valueField: 'PORT', displayField: 'PORT' }); this.comboxI_MPORTLOAD = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '空返起运港', store: this.storeCodeDisportMPORTLOAD, queryMode: 'remote', minChars: 2, queryParam: 'PORT', name: 'I_PORTLOAD', valueField: 'PORT', displayField: 'PORT' }); this.comboxI_MDESTPORT = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '空返目的港', store: this.storeCodeDisportMDESTPORT, queryMode: 'remote', minChars: 2, queryParam: 'PORT', name: 'I_DESTPORT', valueField: 'PORT', displayField: 'PORT' }); this.storeCodeDisportD_PORTLOAD = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CodeDisportModel', autoLoad: true, proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' } }); this.storeCodeDisportD_DESTPORT = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CodeDisportModel', autoLoad: true, proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' } }); this.comboxD_PORTLOAD = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '调拨起运港', store: this.storeCodeDisportD_PORTLOAD, queryMode: 'remote', minChars: 2, queryParam: 'PORT', name: 'D_PORTLOAD', valueField: 'PORT', displayField: 'PORT' }); this.comboxD_DESTPORT = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '调拨目的港', store: this.storeCodeDisportD_DESTPORT, queryMode: 'remote', minChars: 2, queryParam: 'PORT', name: 'D_DESTPORT', valueField: 'PORT', displayField: 'PORT' }); this.StoreTRANSTYPE = Ext.create('Ext.data.Store', { fields: ['OpLb'] }); this.StoreTRANSTYPE.add({ "OpLb": "配货" }); this.StoreTRANSTYPE.add({ "OpLb": "空返" }); this.comboxTRANSTYPE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '运输类型', store: this.StoreTRANSTYPE, //flex: 0.5, labelWidth: 60, forceSelection: true, name: 'TRANSTYPE', valueField: 'OpLb', displayField: 'OpLb' }); this.formModify = Ext.widget('form', { region: 'north', frame: true, bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 90, msgTarget: 'qtip' }, items: [ {//fieldset 1 xtype: 'fieldset', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '开船日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'ETD' }, { fieldLabel: '到港日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'ETA' }, this.comboxPORTLOAD_STATOINm, { fieldLabel: '起运港提箱日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'PORTLOAD_CNT_TIME' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '预计提箱日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'PRE_CNT_TIME' }, this.comboxAgentm, this.comboxDESTPORT_STATOINm, { fieldLabel: '目的港提箱日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'DEST_CNT_TIME' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '目的港还箱日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'DEST_RTCNT_TIME' }, { fieldLabel: '空返起运港提箱日期', format: 'Y-m-d', labelWidth: 115, flex: 1, xtype: 'datefield', name: 'I_PORTLOAD_CNT_TIME' }, { fieldLabel: '空返开船日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'I_ETD' }, { fieldLabel: '空返到港日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'I_ETA' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxI_DESTPORT_STATOINm, { fieldLabel: '空返目的港提箱日', labelWidth: 110, format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'I_DEST_CNT_TIME' }, { fieldLabel: '空返目的港还箱日', format: 'Y-m-d', labelWidth: 110, flex: 1, xtype: 'datefield', name: 'I_DEST_RTCNT_TIME' }, { fieldLabel: '调拨起运港提箱日', format: 'Y-m-d', labelWidth: 110, flex: 1, xtype: 'datefield', name: 'D_PORTLOAD_CNT_TIME' }] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '调拨开船日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'D_ETD' }, { fieldLabel: '调拨到港日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'D_ETA' }, this.comboxD_DESTPORT_STATOINm, { fieldLabel: '调拨目的港提箱日', labelWidth: 110, format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'D_DEST_CNT_TIME' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '调拨目的港还箱日', labelWidth: 110, format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'D_DEST_RTCNT_TIME' }, { fieldLabel: '预抵日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'PREETA' }, this.comboxICARRIER, this.comboxTOPVALVE ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxHANDRAIL, this.comboxSEXSITSIPHONPIPE, this.comboxSEXSITPRESSUREGAUGE, this.comboxSEXSITTOPOVERFLOWBOX ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxSIS3TO2VALVE, this.comboxMPORTLOAD, this.comboxMDESTPORT, this.comboxI_MPORTLOAD ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxI_MDESTPORT, this.comboxD_PORTLOAD, this.comboxD_DESTPORT, this.comboxTRANSTYPE ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '空返提单号', name: 'I_MBLNO' }, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' } ] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); //end this.formEdit me = this; this.winModifyShow = Ext.create('Ext.window.Window', { title: "业务批量修改", //"批量修改", width: 900, //height : 120, //plain : true, iconCls: "addicon", resizable: false, // 是否可以拖动 // draggable:false, collapsible: true, // 允许缩放条 closeAction: 'close', closable: true, modal: 'true', buttonAlign: "center", bodyStyle: "padding:0 0 0 0", items: [this.formModify], buttons: [{ text: "确认修改", //"确认修改", minWidth: 70, handler: function () { me.onModifyClick() } }, { text: "清空", //"确认修改", minWidth: 70, iconCls: "btnreset", handler: function () { var form = me.formModify.getForm(); form.reset(); } }, { text: "关闭", //"关闭", minWidth: 70, handler: function () { me.winModifyShow.close(); } }] }); this.storeYardDataList = Ext.create('Ext.data.Store', { model: 'MsYardData' }); //明细表表格 this.gridListInspectCellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }); this.GridCheckBoxYardModel = Ext.create('Ext.selection.CheckboxModel'); this.gridListYardDataList = new Ext.grid.GridPanel({ store: this.storeYardDataList, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, plugins: [this.gridListInspectCellEditing], selModel: this.GridCheckBoxYardModel, viewConfig: { enableTextSelection: true, autoFill: true }, columns: [{ sortable: true, dataIndex: 'GID', header: '编号', hidden: true, width: 0 }, { sortable: true, dataIndex: 'BSNO', header: '编号', width: 150 }, { sortable: true, dataIndex: 'CTNNO', header: '箱号', width: 100 }, { sortable: true, dataIndex: 'DATEINFIELDREF', header: '更新字段', width: 150 }, { sortable: true, dataIndex: 'DATEIN', header: '更新新值', width: 150 }, { sortable: true, dataIndex: 'DATEINVALUE', header: '更新旧值', width: 150 }] }); this.formYardDataShow = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 85, msgTarget: 'qtip' }, items: [ {//fieldset 1 xtype: 'container', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [this.gridListYardDataList ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); this.winYardDataShow = Ext.create('Ext.window.Window', { title: "导入数据更新", width: 720, //height : 120, //plain : true, iconCls: "addicon", resizable: false, // 是否可以拖动 // draggable:false, collapsible: true, // 允许缩放条 closeAction: 'close', closable: true, modal: 'true', buttonAlign: "center", bodyStyle: "padding:0 0 0 0", items: [this.formYardDataShow], buttons: [{ text: "确认更新", minWidth: 70, handler: function () { _this.onUpdateYardDataClick() } }, { text: "关闭", minWidth: 70, handler: function () { me.winYardDataShow.close(); } }] }); }, //end initUIComponents //#region 加载数据 InitData: function () { var condition = ''; /* if (this.ParentPanel) { var ret = this.ParentPanel.OprationSwap(); this.opStatus = ret[0]; this.StoreList = ret[1]; this.editRecord = ret[2]; this.RefBillNo = ret[3]; } */ this.panelSearch.hide(); this.LoadData(this.opStatus, condition, this.RefBillNo); }, //end InitData LoadData: function (opstatus, condition, refbillno) { this.feeCrSerialNo = 0; this.feeCrBodyDel = []; this.feeCrSerialNo = 0; this.feeCrBodyDel = []; this.opStatus = opstatus; this.PageSize = this.Pagenum.getValue(); this.storeBillList.pageSize = this.PageSize; this.BillSql = ""; if (this.applyno == undefined) { if (this.isotheropen()) { BSNO = getUrlParam("BSNO"); this.BillSql = " APPLYNO=(select APPLYNO from v_op_bs where BSNO='" + BSNO + "') "; this.setSaveBtnStatus(false); } } else { var sql = "APPLYNO='" + this.applyno + "'"; if (this.applyno == '') sql = " 1=1 "; var i = this.applyno.indexOf(","); if (i > 0) { var slist = this.applyno.split(","); var feeGidSql = ''; for (var i = 0; i < slist.length; i += 1) { var feeGId = "'" + slist[i] + "'"; if (feeGidSql == '') { feeGidSql = feeGId; } else { feeGidSql = feeGidSql + "," + feeGId; } } sql = "APPLYNO in (" + feeGidSql + ")"; } if (this.bodylist != null && this.bodylist.getCount() > 0) { var CtnnoSql = ''; var CtnBsNoSql = ''; for (var j = 0; j < this.bodylist.getCount(); j += 1) { var memberbody = _this.bodylist.getAt(j); if (memberbody.data.CNTRNO != "") { var CtnGId = "'" + memberbody.data.CNTRNO + "'"; if (CtnnoSql == '') { CtnnoSql = CtnGId; } else { CtnnoSql = CtnnoSql + "," + CtnGId; } } if (memberbody.data.CTNBSNO != undefined && memberbody.data.CTNBSNO != "") { var CtnGId = "'" + memberbody.data.CTNBSNO + "'"; if (CtnBsNoSql == '') { CtnBsNoSql = CtnGId; } else { CtnBsNoSql = CtnBsNoSql + "," + CtnGId; } } }; if (CtnnoSql != '') { sql = sql + " AND CTNNO in (" + CtnnoSql + ")"; } if (CtnBsNoSql != '') { sql = " BSNO in (" + CtnBsNoSql + ")"; } } this.BillSql = sql; } _this = this; this.sqlcontext = this.BillSql; this.storeBillList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: _this.BillSql }, waitMsg: "正在查询数据...", callback: function (r, options, success) { if (success) { this.DataLoading = false; if (r.length > 0) { this.gridBillList.getSelectionModel().select(0); } else { this.bsno = '1'; this.LoadFeeData(); } } }, scope: this }); }, // end LoadDate LoadFeeData: function () { this.panelFee.EditRecord = this.EditRecord; if (this.bsno == undefined) { var bsno = EditRecord.get('GID'); } else { var bsno = this.bsno; } this.panelFee.strBSNO = bsno; this.panelFee.StoreDateCurr.load({ params: { optype: "OpCtnBsCard", bsno: bsno } }); this.panelFee.StoreUnit.load({ params: { bsno: bsno, bstype: "OpCtnBsCard" } }); this.panelFee.storeDrChFee.load({ params: { billno: bsno, type: 1, optype: "OpCtnBsCard" } }); this.panelFee.storeCrChFee.load({ params: { billno: bsno, type: 2, optype: "OpCtnBsCard" } }); this.panelFee.storeBodySum.load({ params: { bsno: bsno }, callback: function (r, options, success) { if (success) { _this.panelFee.setTotalHead(); } } }); this.panelFee.storeChFeeGain.load({ params: { bsno: bsno } }); }, // end LoadDate setTotalHead: function () { var rmbdr = 0; var rmbcr = 0; var usddr = 0; var usdcr = 0; var otdr = 0; var otcr = 0; var ttldr = 0; var ttlcr = 0; var rmbprofit = 0; var usdprofit = 0; var otprofit = 0; var ttlprofit = 0; var profitrate = 0; for (i = 0; i < this.storeBodySum.getCount(); i += 1) { var memberyf = this.storeBodySum.getAt(i); if (memberyf.data.CURR == '人民币') { rmbdr = memberyf.data.DR; rmbcr = memberyf.data.CR; rmbprofit = memberyf.data.PR; } else if (memberyf.data.CURR == '美元') { usddr = memberyf.data.DR; usdcr = memberyf.data.CR; usdprofit = memberyf.data.PR; } if (memberyf.data.CURR == '其他币别') { otdr = memberyf.data.DR; otcr = memberyf.data.CR; otprofit = memberyf.data.PR; } if (memberyf.data.CURR == '合计') { ttldr = memberyf.data.DR; ttlcr = memberyf.data.CR; ttlprofit = memberyf.data.PR; profitrate = memberyf.data.PROFITRATE; } } var rmblb = ""; var usdlb = ""; var otlb = ""; var ttllb = ""; if (rmbdr != 0 || rmbcr != 0 || rmbprofit != 0) { rmblb = "   RMB应收:" + returnfloat(rmbdr) + "    RMB应付: " + returnfloat(rmbcr) + "   RMB利润:" + returnfloat(rmbprofit) + "   |"; } if (usddr != 0 || usdcr != 0 || usdprofit != 0) { usdlb = "   USD应收: " + returnfloat(usddr) + "   USD应付:" + returnfloat(usdcr) + "   USD利润" + returnfloat(usdprofit) + "   |"; } if (otdr != 0 || otcr != 0 || otprofit != 0) { otlb = "   其他币别应收: " + returnfloat(otdr) + "    其他币别应付:" + returnfloat(otcr) + "   其他币别利润" + returnfloat(otprofit) + "   |"; } if (ttldr != 0 || ttlcr != 0 || ttlprofit != 0) { ttllb = "   合计应收: " + returnfloat(ttldr) + "   合计应付:" + returnfloat(ttlcr) + "   合计利润" + returnfloat(ttlprofit) + "  利润率" + returnfloat(profitrate) + ""; } this.tabTotal.setTitle("利润合计:" + rmblb + usdlb + otlb + ttllb); }, //#endregion //#region 明细操作 onRefreshClick: function (button, event) { // var girdcolums = this.gridList.getColumnMode(); this.BillSql = this.getCondition(); _this = this; this.PageSize = this.Pagenum.getValue(); this.storeBillList.pageSize = this.PageSize; this.sqlcontext = this.BillSql; this.storeBillList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: _this.BillSql }, waitMsg: "正在查询数据...", callback: function (r, options, success) { if (success) { if (r.length > 0) { this.gridBillList.getSelectionModel().select(0); } else { this.bsno = '1'; this.LoadFeeData(); } } }, scope: this }); }, onDsQuery: function () { //var girdcolums = this.gridList.getColumnMode(); this.PageSize = this.Pagenum.getValue(); this.storeBillList.pageSize = this.PageSize; var sql = this.sqlcontext; this.storeBillList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql }, waitMsg: "正在查询数据...", callback: function (r, options, success) { if (success) { if (r.length > 0) { this.gridBillList.getSelectionModel().select(0); } else { this.bsno = '1'; this.LoadFeeData(); } } }, scope: this }); }, //#endregion ImportBs: function () { var GidStr = ''; var records = this.AddGridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要修改的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var BSNO = records[0].data.APPLYNO; this.storeBsList.load({ params: { bsno: BSNO } }); var panelBs = new Ext.Panel({ title: '业务明细', layout: "border", region: 'center', frame: true, split: true, collapsed: false, collapsible: true, trackResetOnLoad: true, items: [this.gridListBs] }); winCustomDataShow = Ext.create('Ext.window.Window', { title: "", // closeAction: 'hide', width: 1100, height: 500, layout: 'fit', resizable: true, modal: true, closeAction: 'close', closable: true, items: [panelBs], buttons: [{ text: "关闭", minWidth: 70, handler: function () { winCustomDataShow.close(); } }] }); winCustomDataShow.show(); }, addBsDetail: function (bstype) { var selections = this.gridListBs.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要提取的业务信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var data = selections[0].data; var GidStr = ''; var records = this.AddGridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } icount = 0; var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { var rec = records[i]; bodyAddDatas.push(rec); icount = icount + 1; } //var data = this.formModify.getForm().getValues(); _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.Ajax.request({ waitMsg: '正在操作数据...', url: '/MvcContainer/MsOpCtnBsCard/ImportBs', params: { data: jsonbodyAddDatas, modifydata: Ext.JSON.encode(data), bstype: bstype }, 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.Msg.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); _this.storeBillList.reload(); winCustomDataShow.close(); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, CreateOverFee: function (feetype) { var GidStr = ''; var records = this.AddGridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要生成的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } icount = 0; var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { var rec = records[i]; bodyAddDatas.push(rec); icount = icount + 1; } _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.Ajax.request({ waitMsg: '正在操作数据...', url: '/MvcContainer/MsOpCtnBsCard/SaveFeeDRPL', params: { data: jsonbodyAddDatas, feetype: feetype }, 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.Msg.ERROR, buttons: Ext.Msg.OK }); return; } else { this.panelFee.storeDrChFee.reload(); this.panelFee.storeCrChFee.reload(); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, CreateDcFee: function () { var GidStr = ''; var records = this.AddGridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要生成的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } icount = 0; var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { var rec = records[i]; bodyAddDatas.push(rec); icount = icount + 1; } _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.Ajax.request({ waitMsg: '正在操作数据...', url: '/MvcContainer/MsOpCtnBsCard/SaveDCFeeCRPL', params: { data: jsonbodyAddDatas, feetype: feetype }, 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.Msg.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, CreateNLYFee: function () { var GidStr = ''; var records = this.AddGridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要生成的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } icount = 0; var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { var rec = records[i]; bodyAddDatas.push(rec); icount = icount + 1; } _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.Ajax.request({ waitMsg: '正在操作数据...', url: '/MvcContainer/MsOpCtnBsCard/SaveNLYFeeDRPL', params: { data: jsonbodyAddDatas }, 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.Msg.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, //#region 批量申请返空调拨 ShenReturn: function (type) { var GidStr = ''; var records = this.AddGridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要申请的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var shentitle = '确认申请返空'; var shenmsg = '返空信息:'; if (type == '3') { shentitle = '确认申请调拨'; shenmsg = '调拨信息:'; } 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.MessageBox.show({ title: shentitle, msg: shenmsg, width: 300, buttons: Ext.MessageBox.OKCANCEL, multiline: true, fn: function (btn, text) { if (btn == "ok") { Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcContainer/MsOpCtnBsCard/ShenReturnPL', scope: this, params: { data: jsonbodyAddDatas, type: type, reason: text }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); _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 }); } } }); } } }); } }, ShenReturnBack: function (type) { var GidStr = ''; var records = this.AddGridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要撤销申请的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } icount = 0; var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { var rec = records[i]; bodyAddDatas.push(rec); icount = icount + 1; } var shentitle = '撤销申请返空'; var shenmsg = '返空信息:'; if (type == '2') { shentitle = '撤销申请调拨'; shenmsg = '调拨信息:'; } _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.MessageBox.confirm('提示', "确实要" + shentitle + "选中的【" + icount.toString() + "】票业务吗?", function (btn) { if (btn == 'yes') { Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcContainer/MsOpCtnBsCard/ShenReturnPL', scope: this, params: { data: jsonbodyAddDatas, type: type }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); _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 }); } } }); } }, this); } }, CreateReAudit: function () { var GidStr = ''; var records = this.AddGridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要生成的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } icount = 0; var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { var rec = records[i]; bodyAddDatas.push(rec); icount = icount + 1; } _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.Ajax.request({ waitMsg: '正在操作数据...', url: '/MvcContainer/MsOpCtnBsCardReAudit/CreateReAudit', params: { data: jsonbodyAddDatas, bsno: _this.MBSNO }, 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.Msg.ERROR, buttons: Ext.Msg.OK }); return; } else { DsOpenEditWin('/MvcContainer/MsOpCtnBsCardReAudit/Edit?bsno=' + _this.MBSNO); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, //#endregion OprationSwap: function () { var ret = new Array(); ret[0] = this.OprationStatus; ret[1] = this.storeBillList; ret[2] = this.SelectedRecord; ret[3] = this.storePLList; return ret; }, onClearSql: function () { var form = this.formSearch.getForm(); form.reset(); }, //onClearClick getCondition: function () { var form = this.formSearch.getForm(); var sql = ''; this.BillSql = ""; if (this.applyno == undefined) { if (this.isotheropen()) { BSNO = getUrlParam("BSNO"); this.BillSql = " APPLYNO=(select APPLYNO from v_op_bs where BSNO='" + BSNO + "') "; //this.panelBtn.hide(); this.setSaveBtnStatus(false); } } else { var sql = "APPLYNO='" + this.applyno + "'"; if (this.applyno == '') sql = " 1=1 "; var i = this.applyno.indexOf(","); if (i > 0) { var slist = this.applyno.split(","); var feeGidSql = ''; for (var i = 0; i < slist.length; i += 1) { var feeGId = "'" + slist[i] + "'"; if (feeGidSql == '') { feeGidSql = feeGId; } else { feeGidSql = feeGidSql + "," + feeGId; } } sql = "APPLYNO in (" + feeGidSql + ")"; } if (this.bodylist != null && this.bodylist.getCount() > 0) { var CtnnoSql = ''; var CtnBsNoSql = ''; for (var j = 0; j < this.bodylist.getCount(); j += 1) { var memberbody = _this.bodylist.getAt(j); if (memberbody.data.CNTRNO != "") { var CtnGId = "'" + memberbody.data.CNTRNO + "'"; if (CtnnoSql == '') { CtnnoSql = CtnGId; } else { CtnnoSql = CtnnoSql + "," + CtnGId; } } if (memberbody.data.CTNBSNO != undefined && memberbody.data.CTNBSNO != "") { var CtnGId = "'" + memberbody.data.CTNBSNO + "'"; if (CtnBsNoSql == '') { CtnBsNoSql = CtnGId; } else { CtnBsNoSql = CtnBsNoSql + "," + CtnGId; } } }; if (CtnnoSql != '') { sql = sql + " AND CTNNO in (" + CtnnoSql + ")"; } if (CtnBsNoSql != '') { sql = " BSNO in (" + CtnBsNoSql + ")"; } } this.BillSql = sql; } var BSNO = form.findField('BSNO').getValue(); // sql = sql + getAndConSql(sql, BSNO, " (BSNO like '%" + BSNO + "%' or CUSTNO like '%" + BSNO + "%' or I_CUSTNO like '%" + BSNO + "%' or MBLNO like '%" + BSNO + "%' ) "); sql = sql + getAndConSql(sql, BSNO, " (BSNO like '%" + BSNO + "%' ) "); var CTNNO = form.findField('CTNNO').getValue(); sql = sql + getAndConSql(sql, CTNNO, "CTNNO like '%" + CTNNO + "%'"); var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue(); sql = sql + getAndConSql(sql, CUSTOMERNAME, "CUSTOMERNAME='" + CUSTOMERNAME + "'"); var expDateBgn = form.findField('ETDbgn').getRawValue(); sql = sql + getAndConSql(sql, expDateBgn, "ETD>='" + expDateBgn + "'"); var expDateEnd = form.findField('ETDend').getRawValue(); sql = sql + getAndConSql(sql, expDateEnd, "ETD<='" + expDateEnd + " 23:59:59'"); return sql; }, getFeeCondition: function () { var form = this.formSearch.getForm(); var feesql = ' '; var CUSTNAME = form.findField('CUSTNAME').getValue(); feesql = feesql + getAndConSql(feesql, CUSTNAME, "f.CUSTOMERNAME='" + CUSTNAME + "'"); return feesql; }, setSaveBtnStatus: function (enable) { var drbtn1 = Ext.getCmp("drbtn1"); var drbtn2 = Ext.getCmp("drbtn2"); var drbtn3 = Ext.getCmp("drbtn3"); var drbtn4 = Ext.getCmp("drbtn4"); var drbtn5 = Ext.getCmp("drbtn5"); var drbtn6 = Ext.getCmp("drbtn6"); var drbtn7 = Ext.getCmp("drbtn7"); var drbtn8 = Ext.getCmp("drbtn8"); var crbtn1 = Ext.getCmp("crbtn1"); var crbtn2 = Ext.getCmp("crbtn2"); var crbtn3 = Ext.getCmp("crbtn3"); var crbtn4 = Ext.getCmp("crbtn4"); var crbtn5 = Ext.getCmp("crbtn5"); var crbtn6 = Ext.getCmp("crbtn6"); var crbtn7 = Ext.getCmp("crbtn7"); var crbtn8 = Ext.getCmp("crbtn8"); var btnBsLock = Ext.getCmp("btnBsLock"); if (enable) { //bsbtnSave.enable(); //bsbtnSaveAndClose.enable(); //bsbtnSaveAndNew.enable(); //drbtn1.enable(); } else { drbtn1.disable(); drbtn2.disable(); drbtn3.disable(); drbtn4.disable(); drbtn5.disable(); drbtn6.disable(); drbtn7.disable(); drbtn8.disable(); crbtn1.disable(); crbtn2.disable(); crbtn3.disable(); crbtn4.disable(); crbtn5.disable(); crbtn6.disable(); crbtn7.disable(); crbtn8.disable(); btnBsLock.disable(); } } , onPiLiangFeeEditClick: function (menu, event) { var selections = this.gridBillList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var thisbsno = ''; this.storePLList.removeAll(); for (var i = 0; i < selections.length; i++) { var rec = selections[i]; this.storePLList.add(rec.data); } if (this.storePLList.getCount() == 0) { Ext.Msg.show({ title: '提示', msg: '没有要添加费用的业务信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/PiLiangFeeEdit'); //var PiliangCtnFee = new Shipping.PiliangCtnFee({ //}); //PiliangCtnFee.StoreList = this.storePLList; //PiliangCtnFee.LoadData(); //PiliangCtnFee.show(); //return; }, onPiLiangFeeAddClick: function (menu, event) { var selections = this.gridBillList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var thisbsno = ''; this.storePLList.removeAll(); for (var i = 0; i < selections.length; i++) { var rec = selections[i]; this.storePLList.add(rec.data); } if (this.storePLList.getCount() == 0) { Ext.Msg.show({ title: '提示', msg: '没有要添加费用的业务信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var FeeAddEdit = new Shipping.FeeAddEdit({ }); FeeAddEdit.StoreList = this.storePLList; FeeAddEdit.StoreDateCurr.load({ params: { optype: "OpCtnBsCard", bsno: thisbsno } }); FeeAddEdit.stroplb = 'OpCtnBsCard'; // FeeAddEdit.StoreUnit.load({ params: { bsno: this.bsno, bstype: "op_railway" } }); FeeAddEdit.formname = this.formname; FeeAddEdit.show(); return; }, onModifyClick: function (menu, event) { var GidStr = ''; var records = this.AddGridCheckBoxModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要修改的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } icount = 0; var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { var rec = records[i]; bodyAddDatas.push(rec); icount = icount + 1; } var data = this.formModify.getForm().getValues(); _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.Ajax.request({ waitMsg: '正在操作数据...', url: '/MvcContainer/MsOpCtnBsCard/modify', params: { data: jsonbodyAddDatas, modifydata: Ext.JSON.encode(data) }, 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.Msg.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); _this.storeBillList.reload(); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, onPiLiangRepairClearingEditClick: function (menu, event) { var selections = this.gridBillList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var thisbsno = ''; this.storePLList.removeAll(); for (var i = 0; i < selections.length; i++) { var rec = selections[i]; this.storePLList.add(rec.data); } if (this.storePLList.getCount() == 0) { Ext.Msg.show({ title: '提示', msg: '没有要修改的业务信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/PiLiangRepairClearing'); }, onImportYardData: function (button, event) { var BSNO = ""; me = this; var imgform = new Ext.FormPanel({ region: 'center', labelWidth: 20, frame: true, autoScroll: false, border: false, fileUpload: true, items: [{ xtype: 'fileuploadfield', id: 'LoadExcel', name: 'LoadExcel', emptyText: '请选择EXCEL文件', //'请选择EXCEL文件', fieldLabel: 'EXCEL', //'EXCEL', buttonText: '选择文件', //'选择文件', allowBlank: false, width: 200, buttonCfg: { iconCls: 'uploaddialog' }, anchor: '98%' }], buttons: [{ text: '上传', //'上传', type: 'submit', handler: function () { var UserFilePath = Ext.getCmp('LoadExcel').getValue(); if (!CheckFileExt(UserFilePath, /.xls|.xlsx/i)) { Ext.Msg.show({ title: '错误', msg: '请确认你上传的文件为EXCEL文件!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; } if (!imgform.form.isValid()) { return; } imgform.form.submit({ url: '/MvcContainer/MsOpCtnBsCard/ImportYardData', waitMsg: '正在处理数据...', method: 'POST', params: { bsno: BSNO }, success: function (form, action) { win.close(this); var result = action.result; var record = result.data; _this.storeYardDataList.removeAll(); _this.storeYardDataList.loadData(record); if (_this.storeYardDataList.getCount() > 0) { _this.winYardDataShow.show(); } else { Ext.Msg.show({ title: '提示', msg: '没有要更新的数据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; } }, failure: function (form, action) { form.reset(); if (action.failureType == Ext.form.Action.SERVER_INVALID) Ext.MessageBox.alert(Zi.LAN.JingGao, action.result.errors.msg); } }); } }, { text: '关闭', //'关闭', type: 'submit', handler: function () { win.close(this); } }] }); var win = new Ext.Window({ title: Zi.LAN.ShangChuanEXCEL, //"上传EXCEL", width: 380, height: 120, modal: true, resizable: false, border: false, items: imgform }); win.show(); return; }, onUpdateYardDataClick: function () { var selections = this.gridListYardDataList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要更新的信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var bodyAddDatas = []; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; bodyAddDatas.push(rec); icount = icount + 1; } var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); Ext.Ajax.request({ waitMsg: '正在操作数据...', url: '/MvcContainer/MsOpCtnBsCard/UpdateYardData', params: { data: jsonbodyAddDatas }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); _this.storeList.reload(); winYardDataShow.close(); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); }, //#region 导出Excel onExportClick: function (button, event) { GridExportExcelPage(this.gridBillList, "业务卡费用审核"); }, //#endregion onOpenClick: function (button, event) { var selections = this.gridBillList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } record = selections[0]; this.OpenEditWin(record); } , OpenEditWin: function (record) { this.SelectedRecord = record; this.OprationStatus = 'edit'; DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/CtnStatusEdit', record.data.GID); } , isotheropen: function () { if (isNullorEmpty(this.opener())) return false; return true; } , opener: function () { return this.openertype; } });