Ext.namespace('Shipping'); Shipping.SeaeFee = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.SeaeFee.superclass.constructor.call(this); }; Ext.extend(Shipping.SeaeFee, Ext.Panel, { ParentWin: null, OpStatus: 'add', StoreList: null, EditRecord: null, region: 'north', initUIComponents: function () { //按钮Toolbar // var mainform = Ext.getCmp('OpSeaeEdit'); // var mainform = window.window._this; var mainform = window.panelEdit; // if (mainform == null || mainform == NaN) { // var mainform = Ext.getCmp('OpSeaeFenEdit'); // } EditRecord = mainform.editRecord; this.bsno = EditRecord.get('ContractNo'); this.formHead = Ext.widget('form', { frame: true, //hidden:true, bodyPadding: 5, layout: 'fit', region: 'center', //bodyStyle: 'background:#FFF', fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 90, msgTarget: 'qtip' }, items: [ { xtype: 'fieldset', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [ { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '件数', name: 'PKGS', flex: 0, hidden: true, margins: '0' }, { fieldLabel: '重量', name: 'KGS', flex: 0, hidden: true, margins: '0' }, { fieldLabel: '尺码', name: 'CBM', flex: 0, hidden: true, margins: '0' }, /*HTH: "DHM-814711" BillNo: "HJSCRTM517470700" ContainerNo: "CGMU5026398" portRef: "天津" Country_Ref: "新西兰" */ { fieldLabel: '合同号', readOnly: true, name: 'HTH' }, { fieldLabel: '箱号', readOnly: true, name: 'ContainerNo' }, { fieldLabel: '进口国', readOnly: true, name: 'Country_Ref' }, { fieldLabel: '目的港', readOnly: true, name: 'portRef' }, { fieldLabel: '购货方', readOnly: true, name: 'buyer' }, { fieldLabel: '代理公司', readOnly: true, name: 'Agent' }] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [ { fieldLabel: '厂号', readOnly: true, name: 'factoryno' }, { fieldLabel: '品名', readOnly: true, name: 'CargoName' }, { fieldLabel: '仓库', id: "STORAGENAME", readOnly: true, name: 'STORAGENAME' }, { fieldLabel: '入库日期', id: "WMSDATE", readOnly: true, name: 'WMSDATE', format: 'Y-m-d' }, { fieldLabel: '库龄天数', readOnly: true, name: 'StoreDays' }, { fieldLabel: '业务状态', readOnly: true, name: 'MainstateRef' } ] }, { xtype: 'container', hidden: true, layout: 'hbox', defaultType: 'textfield', items: [{ xtype: 'label', text: '服务项目' }, { xtype: 'checkboxfield', fieldLabel: '熏蒸', flex: 1, labelAlign: 'right', readOnly: true, frame: true, name: 'ISFUMIGATION' }, { xtype: 'checkboxfield', fieldLabel: '仓储', flex: 1, labelAlign: 'right', readOnly: true, name: 'ISSTORAGE' }, { xtype: 'checkboxfield', fieldLabel: '陆运', flex: 1, labelAlign: 'right', readOnly: true, name: 'ISLAND' }, { xtype: 'checkboxfield', fieldLabel: '报关', flex: 1, labelAlign: 'right', readOnly: true, name: 'ISCUSTOMES' }, { xtype: 'checkboxfield', fieldLabel: '报检', flex: 1, labelAlign: 'right', readOnly: true, name: 'ISINSPECTION' }, { xtype: 'checkboxfield', fieldLabel: '订舱', flex: 1, labelAlign: 'right', readOnly: true, name: 'ISBOOKING' }, { xtype: 'checkboxfield', fieldLabel: '使用代理', flex: 1, labelAlign: 'right', readOnly: true, name: 'ISAGENT' }, { xtype: 'checkboxfield', fieldLabel: '分单签单', flex: 1, labelAlign: 'right', readOnly: true, name: 'ISHBLNO' } ] } ] }] }); //end this.formEdit this.formHead.getForm().loadRecord(EditRecord); var WMSDATE = ""; var STORAGENAME = ""; Ext.Ajax.request({ waitMsg: '正在查询数据...', url: '/CommMng/BasicDataRef/GetField', scope: this, async: false, params: { tablename: "WMS", condition: " cargo_gid in(select gid from import_cargo where contractno='" + EditRecord.get('ContractNo') + "')" }, waitMsg: "正在查询数据...", callback: function (options, success, response) { if (success) { var jsonresult = Ext.JSON.decode(response.responseText); var returnData = jsonresult.data[0]; if (typeof (returnData) != "undefined") { WMSDATE = returnData.WMSDATE.substring(0, 10); STORAGENAME = returnData.STORAGENAME; } } else { Ext.Msg.show({ title: '请重试', msg: '服务器响应出错', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); return; } } }); Ext.getCmp("WMSDATE").setValue(WMSDATE); Ext.getCmp("STORAGENAME").setValue(STORAGENAME); this.panelTop = new Ext.Panel({ layout: "border", //hidden:true, region: "north", height: 100, id: "BillHeadSeae", items: [this.formHead] }); this.panelFee = new Shipping.FeeEditGrid({ region: 'center', layout: 'border' }); this.panelFee.EditRecord = EditRecord; this.panelFee.stroplb = 'op_Seae'; this.panelFee.strBSNO = EditRecord.get('ContractNo'); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CGS-船公司", "CUSTTYPE": "船公司", "CUSTNAME": "CARRIER" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DCDL-订舱代理", "CUSTTYPE": "订舱代理", "CUSTNAME": "FORWARDER" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "BGH-报关行", "CUSTTYPE": "报关行", "CUSTNAME": "CUSTOMSER" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKER" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "FHR-发货人", "CUSTTYPE": "发货人", "CUSTNAME": "SHIPPERID" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "SHR-收货人", "CUSTTYPE": "收货人", "CUSTNAME": "CONSIGNEEID" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "TZR-通知人", "CUSTTYPE": "通知人", "CUSTNAME": "NOTIFYPARTYID" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DL-代理", "CUSTTYPE": "代理", "CUSTNAME": "AGENTID" }); this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CZ-场站", "CUSTTYPE": "场站", "CUSTNAME": "YARD" }); this.panelFee.StoreDrOpRange.load({ params: { optype: "modRecvFeeManagement"} }); this.panelFee.StoreCrOpRange.load({ params: { optype: "modPayFeeManagement"} }); this.panelFee.storeFeeNameRef.load({ params: { condition: "ISSEA='1' "} }); this.panelFee.StoreDateCurr.load({ params: { optype: "op_Seae", bsno: this.bsno} }); this.panelFee.StoreUnit.load({ params: { bsno: this.bsno, bstype: "op_Seae"} }); this.panelFee.storeDrChFee.load({ params: { billno: this.bsno, type: 1, optype: "op_Seae"} }); this.panelFee.storeCrChFee.load({ params: { billno: this.bsno, type: 2, optype: "op_Seae"} }); this.panelFee.storeBodySum.load({ params: { bsno: this.bsno, optype: "op_Seae"} }); this.panelFee.storeChFeeGain.load({ params: { bsno: this.bsno, optype: "op_Seae"} }); function getModifyStatus() { return this.panelFee.getModifyStatus(); } Ext.apply(this, { items: [this.panelTop, this.panelFee] }); } });