Ext.namespace('Shipping'); Shipping.MsSeaeModifyAudit = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.MsSeaeModifyAudit.superclass.constructor.call(this); }; Ext.extend(Shipping.MsSeaeModifyAudit, Ext.Panel, { PageSize: 15, OprationStatus: null, //仅当弹出界面时使用 SelectedRecord: null, isAudit: '', initUIComponents: function () { this.formname = "MsSeaeModifyAudit" //定义数据集 this.worksql = getUrlParam('worksql'); this.BillSql = ''; this.billno = '11'; this.Parentsql = '1=2'; this.isuseexrate = 0; this.YJFEENAME = ''; this.YJFEENAMEUSD = ''; _thismodifyaudit = this; Ext.define('MsOpSeaeDetail', { extend: 'Ext.data.Model', fields: [ { name: 'GID', type: 'string' }, { name: 'CTN_ID', type: 'string' }, { name: 'MASTERNO', type: 'string' }, { name: 'BSNO', type: 'string' }, { name: 'CTNCODE', type: 'string' }, { name: 'SIZE', type: 'string' }, { name: 'CTN', type: 'string' }, { name: 'CTNNUM', type: 'int' }, { name: 'TEU', type: 'int' }, { name: 'CTNALL', type: 'string' }, { name: 'CNTRNO', type: 'string' }, { name: 'SEALNO', type: 'string' }, { name: 'PKGS', type: 'int' }, { name: 'KGS', type: 'decimal' }, { name: 'CBM', type: 'decimal' }, { name: 'FENPKGS', type: 'int' }, { name: 'FENKGS', type: 'decimal' }, { name: 'FENCBM', type: 'decimal' }, { name: 'REMARK', type: 'string' }, { name: 'KINDPKGS', type: 'string' }, { name: 'TAREWEIGHT', type: 'decimal' }, //箱皮重 { name: 'TTLWEIGHT', type: 'decimal' }, //箱皮重 { name: 'GOODSNAME', type: 'string' }, //箱皮重 { name: 'EXITDOOR', type: 'string' }, //箱皮重 { name: 'ENTERDOOR', type: 'string' }, //箱皮重 { name: 'CTNSTATUS', type: 'string' }, //箱皮重 { name: 'MASTERNO', type: 'string' }, { name: 'VESSEL', type: 'string' }, //箱皮重 { name: 'VOYNO', type: 'string' }, //箱皮重 { name: 'MBLNO', type: 'string' }, //箱皮重 { name: 'TRUCKNO', type: 'string' }, //箱皮重 { name: 'TRUCKTYPE', type: 'string' }, //箱皮重 { name: 'ONBORD', type: 'string' }, //箱皮重 { name: 'ETD', type: 'string' }, { name: 'WEIGHTYPE', type: 'string' }, //称重方式 { name: 'WEIGHKGS', type: 'decimal' }, //称重重量 { name: 'WEIGHATTN', type: 'string' }, //Shipper VGM 联系人 { name: 'WEIGHTEL', type: 'string' }, //VGM联系人的联系方式 { name: 'WEIGHSIGN', type: 'string' }, ////VGM负责人签名 { name: 'WEIGHDATE', type: 'string' }, //VGM称重日期 { name: 'VGMADDR', type: 'string' }, ////VGM负责人签名 { name: 'VGMEMAIL', type: 'string' }, //VGM称重日期 { name: 'TRUCKER', type: 'string' }, { name: 'TRUCKFEE', type: 'decimal' }, { name: 'FREESTORAGEDAY', type: 'int' }, { name: 'STORAGEDAY', type: 'int' }, { name: 'STORAGEPRICE', type: 'decimal' }, { name: 'STORAGEFEE', type: 'decimal' }, { name: 'FREECTNDAY', type: 'int' }, { name: 'CTNDAY', type: 'int' }, { name: 'CTNPRICE', type: 'decimal' }, { name: 'CTNFEE', type: 'decimal' }, { name: 'VGMCONNCOM', type: 'string' } //VGM联系公司 ] }); this.storeList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, fields: [ { name: 'GID', type: 'string' }, { name: 'BSTYPE', type: 'string' }, { name: 'REASON', type: 'string' }, { name: 'BSNO', type: 'string' }, { name: 'CUSTNO', type: 'string' }, { name: 'MBLNO', type: 'string' }, { name: 'CUSTOMERNAME', type: 'string' }, { name: 'OP', type: 'string' }, { name: 'CUSTSERVICE', type: 'string' }, { name: 'SALE', type: 'string' }, { name: 'CARRIER', type: 'string' }, { name: 'FORWARDER', type: 'string' }, { name: 'TRUCKER', type: 'string' }, { name: 'DOC', type: 'string' }, { name: 'FRCUSTSERVICE', type: 'string' }, { name: 'VESSEL', type: 'string' }, { name: 'VOYNO', type: 'string' }, { name: 'YARD', type: 'string' }, { name: 'ETD', type: 'string'}, { name: 'LANE', type: 'string' }, { name: 'ISSUETYPE', type: 'string' }, { name: 'PORTDISCHARGE', type: 'string' }, { name: 'DESTINATION', type: 'string' }, { name: 'PLACEDELIVERY', type: 'string' }, { name: 'APPLYID', type: 'string' }, { name: 'APPLYUSER', type: 'string' }, { name: 'APPLYTIME', type: 'string' }, { name: 'AUDITUSER', type: 'string' }, { name: 'AUDITTIME', type: 'string' }, { name: 'APPLYSTATUS', type: 'string' }, { name: 'AUDITREMARK', type: 'string' }, { name: 'APPLYSTATUSREF', type: 'string' }, { name: 'APPLYUSERREF', type: 'string' }, { name: 'AUDITUSERREF', type: 'string' } ], remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsSeaeOrder/GetModifyList', reader: { id: 'GID', root: 'data', totalProperty: 'totalCount' } } }); this.initgirdcolums = [{ sortable: true, dataIndex: 'BSTYPE', header:'业务模块', //申请单号 width: 120 }, { sortable: true, dataIndex: 'APPLYSTATUSREF', header: '审核状态', //状态 width: 120 }, { sortable: true, dataIndex: 'REASON', header:'修改原因', //状态 width: 120 }, { sortable: true, dataIndex: 'MBLNO', header:'主提单号', //结算单位 width: 120 }, { sortable: true, dataIndex: 'CUSTOMERNAME', header:'委托单位', //币别 width: 50 }, { sortable: true, dataIndex: 'APPLYTIME', header:'申请日期', //申请日期 width: 100 }, { sortable: true, dataIndex: 'APPLYUSERREF', header: '申请人', //申请人 width: 100 }, { sortable: true, dataIndex: 'AUDITTIME', header:'最后审核日期', //最后审核日期 width: 100 }, { sortable: true, dataIndex: 'AUDITUSERREF', header:'最后审核人', //最后审核人 width: 100 }, { sortable: true, dataIndex: 'AUDITREMARK', header: '审核意见', //最后审核人 width: 100 }, { sortable: true, dataIndex: 'SALE', header: '揽货人', //申请支付日期 width: 100 }, { sortable: true, dataIndex: 'OP', header:'操作', //已开发票 width: 160 }, { sortable: true, dataIndex: 'CUSTSERVICE', header: '客服员', //发票号 width: 160 }, { sortable: true, dataIndex: 'VESSEL', header: '船名', //委托单位 width: 160 }, { sortable: true, dataIndex: 'VOYNO', header: '航次', //委托单位 width: 160 }, { sortable: true, dataIndex: 'ETD', header: '开船日期', //备注 width: 160 }, { sortable: true, dataIndex: 'YARD', header:'场站', //备注 width: 160 } ]; this.girdcolums = this.initgirdcolums; this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); //定义Grid this.gridList = new Ext.grid.GridPanel({ store: this.storeList, enableHdMenu: false, height: 180, region: 'north', split: true, loadMask: { msg: Zi.LAN.LoadData }, trackMouseOver: true, disableSelection: false, viewConfig: { enableTextSelection: true }, selModel: this.GridCheckBoxModel, columns: this.girdcolums, // paging bar on the bottom bbar: Ext.create('Ext.PagingToolbar', { store: this.storeList, displayInfo: true, displayMsg: Zi.LAN.FenYe, emptyMsg: Zi.LAN.Nodata }) }); this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列 this.girdcolums.unshift(new Ext.grid.RowNumberer()); this.gridList.reconfigure(this.storeList, this.girdcolums); //#region formSearch //#region formSearch枚举参照相关 //#endregion this.storeAddDCType = Ext.create('Ext.data.Store', { fields: ['DC', 'NAME'] }); this.storeAddDCType.add({ "DC": "", "NAME": "全部" }); this.storeAddDCType.add({ "DC": "1", "NAME": "未审核" }); this.storeAddDCType.add({ "DC": "0", "NAME": "已审核" }); this.comboxaddDCType = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.ApprovalStatus, labelWidth: 60, store: this.storeAddDCType, valueField: 'DC', displayField: 'NAME', forceSelection: true, name: 'DC', value: '1', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeCustCode.load({ params: { condition: ""} }); this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.SettlementUnit, //结算单位 labelWidth: 60, store: this.storeCustCode, forceSelection: true, name: 'CustName', valueField: 'CustName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); //人员信息加载 this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' } }); this.storeOpCode.load(); // this.comboxAPPLICANT = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.Applicant, store: this.storeOpCode, forceSelection: true, name: 'APPLICANT', labelWidth: 50, flex: 0.5, valueField: 'GID', 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: Zi.LAN.RelatedBusinessNumber, //相关业务号 name: 'sBsNo', labelWidth: 70, enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, this.comboxCustCode, { fieldLabel:'从申请日期', //从付费申请日期 format: 'Y-m-d', xtype: 'datefield', name: 'ExpDateBgn', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel:'到申请日期', format: 'Y-m-d', xtype: 'datefield', name: 'ExpDateEnd', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, this.comboxAPPLICANT, this.comboxaddDCType ] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); //#endregion //#region 明细 //#endregion formSearch //查询工具条 _this = this; this.panelBtn = new Ext.Panel({ region: "north", tbar: [ { text: Zi.LAN.ExecuteQuery, //执行查询 iconCls: "btnrefresh", handler: function (button, event) { this.onRefreshClick(button, event); }, scope: this }, { text: Zi.LAN.ResetCondition, //重置 iconCls: "btnreset", handler: function (button, event) { this.onClearSql(button, event); }, scope: this }, '-', { text: Zi.LAN.ExaminationPassed, //审核通过 iconCls: "btnadd", handler: function (button, event) { this.onAuditPassClick(); }, scope: this }, '-', { text: Zi.LAN.DismissedSubmission, //驳回提交 iconCls: "btndelete", handler: function (button, event) { this.onAuditBackClick(); }, scope: this }, { xtype: 'button', width: 90, text: Zi.LAN.AdvancedSearch, 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; } }, { text: Zi.LAN.Saveliststyle, id: "btntest", menu: [ { text: Zi.LAN.Save, handler: function (button, event) { _this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true); } }, { text: Zi.LAN.Initialization, handler: function (menu, event) { _this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true); } }], scope: this } ] }); this.panelTop = new Ext.Panel({ layout: "border", region: "north", height: 75, items: [this.formSearch, this.panelBtn] }); //#region 集装箱-数据集 this.storeBodyList1 = Ext.create('Ext.data.Store', { model: 'MsOpSeaeDetail', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsOpSeae/GetBodyList', reader: { id: 'BSNO,CTNCODE,CTN_ID', root: 'data', totalProperty: 'totalCount' } } }); //明细表表格 this.gridListCellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }); this.initctncolumns1 = [{ sortable: true, dataIndex: 'CTN_ID', header: Zi.LAN.CTN_ID, //'编号', hidden: true, width: 0 }, { sortable: true, dataIndex: 'BSNO', header: Zi.LAN.BSNO2, //'业务编号', hidden: true, width: 0 }, { sortable: true, dataIndex: 'CTNCODE', header: Zi.LAN.CTNCODE, //'序号', width: 30 }, { dataIndex: 'CTNALL', header: Zi.LAN.CTNALL, //'箱型', width: 65, editor: this.comboxCTNALL }, { dataIndex: 'CTNNUM', header: Zi.LAN.CTNNUM, //'箱量', width: 60 }, { dataIndex: 'CNTRNO', header: Zi.LAN.CNTRNO, //'箱号', width: 100 }, { dataIndex: 'SEALNO', header: Zi.LAN.SEALNO, //'封号', width: 80 }, { sortable: true, dataIndex: 'PKGS', header: Zi.LAN.PKGS, //'件数', width: 60 }, { dataIndex: 'KINDPKGS', header: Zi.LAN.KINDPKGS, //'包装', width: 70 }, { dataIndex: 'KGS', header: Zi.LAN.KGS3, //'重量', width: 60 }, { dataIndex: 'CBM', header: Zi.LAN.CBM2, //'尺码', width: 60 }, { dataIndex: 'TAREWEIGHT', header: Zi.LAN.TAREWEIGHT, //'箱皮重', width: 60 }, { dataIndex: 'TTLWEIGHT', header: Zi.LAN.TTLWEIGHT, //'参考重量', width: 60 }, { dataIndex: 'WEIGHTYPE', header: Zi.LAN.WEIGHTYPE, //'称重方式', width: 60 }, { dataIndex: 'WEIGHKGS', header: Zi.LAN.WEIGHKGS, //'称重重量', width: 60 }, { dataIndex: 'WEIGHATTN', header: Zi.LAN.WEIGHATTN, //'VGM联系人', width: 80 }, { dataIndex: 'VGMCONNCOM', header: 'VGM联系公司', //'VGM联系人', width: 80 }, { dataIndex: 'WEIGHTEL', header: Zi.LAN.WEIGHTEL, //'VGM联系电话', width: 80 }, { dataIndex: 'WEIGHSIGN', header: Zi.LAN.WEIGHSIGN, //'VGM联系人签名', width: 100 }, { sortable: true, dataIndex: 'WEIGHDATE', header: Zi.LAN.WEIGHDATE, //'VGM称重日期', renderer: Ext.util.Format.dateRenderer('Y-m-d'), width: 100 }, { dataIndex: 'VGMADDR', header: Zi.LAN.VGMADDR, //'VGM联系人签名', width: 100 }, { dataIndex: 'VGMEMAIL', header: Zi.LAN.VGMEMAIL, //'VGM联系人签名', width: 100 }, { dataIndex: 'REMARK', header: Zi.LAN.REMARK, //'备注', width: 150 }, { dataIndex: 'CTNSTATUS', header: Zi.LAN.CTNSTATUS, //'箱状态', width: 70, renderer: function (value, p, record) { if (value == 'E') return '空箱'; else if (value == 'L') return '拼箱'; else return '整箱'; } }, { dataIndex: 'MASTERNO', header: Zi.LAN.MASTERNO2, //'主拼号', width: 100 }, { dataIndex: 'TRUCKER', header: Zi.LAN.TRUCKER, width: 65, }, { dataIndex: 'TRUCKNO', header: Zi.LAN.TRUCKNO, //'车号', width: 100 }, { sortable: true, dataIndex: 'TRUCKFEE', header: Zi.LAN.TRUCKFEE, //'运费', align: 'right', width: 80 }, { dataIndex: 'FREESTORAGEDAY', header: Zi.LAN.FREESTORAGEDAY, width: 60 }, { dataIndex: 'STORAGEDAY', header: Zi.LAN.STORAGEDAY, width: 60 }, { sortable: true, dataIndex: 'STORAGEPRICE', header: Zi.LAN.STORAGEPRICE, //'运费', align: 'right', width: 80 }, { sortable: true, dataIndex: 'STORAGEFEE', header: Zi.LAN.STORAGEFEE, //'运费', align: 'right', width: 80 }, { dataIndex: 'FREECTNDAY', header: Zi.LAN.FREECTNDAY, width: 60 }, { dataIndex: 'CTNDAY', header: Zi.LAN.CTNDAY, width: 60 }, { sortable: true, dataIndex: 'CTNPRICE', header: Zi.LAN.CTNPRICE, //'运费', align: 'right', width: 80 }, { sortable: true, dataIndex: 'CTNFEE', header: Zi.LAN.CTNFEE, //'运费', align: 'right', width: 80 }]; this.ctncolumns1 = this.initctncolumns1; this.gridList1 = new Ext.grid.GridPanel({ store: this.storeBodyList1, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, // plugins: [this.gridListCellEditing], selType: 'cellmodel', columns: this.ctncolumns1 }); // this.ctncolumns = DsTruck.GetGridPanel(USERID, 'SEAECTNCOLUMN', this.ctncolumns, 1); //使用者id,表名,中间column数组,跳过一开始的几列 //#endregion this.panelBodyCtn1 = new Ext.Panel({ // title: Zi.LAN.panelBodyCtn, //'集装箱信息', layout: "border", height: 140, //margin: '5 10', frame: true, items: [this.gridList1] }); this.formHead = Ext.widget('form', { frame: true, title: '修改旧值', region: "north", height:220, bodyPadding: 2, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 70, msgTarget: 'qtip' }, items: [ { xtype: 'fieldset', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [ { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: Zi.LAN.PKGS, //'件数', name: 'PKGS', flex: 0, hidden: true, margins: '0' }, { fieldLabel: Zi.LAN.CBM2, //'尺码', name: 'CBM', flex: 0, hidden: true, margins: '0' }, { fieldLabel: Zi.LAN.CUSTNO, //'委托编号', readOnly: true, name: 'CUSTNO' }, { fieldLabel: Zi.LAN.MBLNO, //'主提单号', readOnly: true, name: 'MBLNO' }, { fieldLabel: Zi.LAN.CUSTSERVICE, //'箱型箱量', readOnly: true, name: 'CUSTSERVICE' }, { fieldLabel: Zi.LAN.SALE, //'毛重', readOnly: true, name: 'SALE' }, { fieldLabel: Zi.LAN.OP, //'付费方式', readOnly: true, name: 'OP' }, { fieldLabel: Zi.LAN.DOC, //'付费方式', readOnly: true, name: 'DOC' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [ { fieldLabel: Zi.LAN.CUSTOMERNAME, //'委托单位', readOnly: true, name: 'CUSTOMERNAME' }, { fieldLabel: Zi.LAN.CARRIER, //'卸货港', readOnly: true, name: 'CARRIER' }, { fieldLabel: Zi.LAN.LANE, //'揽货人', readOnly: true, name: 'LANE' }, { fieldLabel: Zi.LAN.FORWARDER, //'船名', readOnly: true, name: 'FORWARDER' }, { fieldLabel: Zi.LAN.YARD, //'航次', readOnly: true, name: 'YARD' }, { fieldLabel: Zi.LAN.ISSUETYPE, //'目的地', readOnly: true, name: 'ISSUETYPE' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [ { fieldLabel: Zi.LAN.VESSEL, //'船名', readOnly: true, name: 'VESSEL' }, { fieldLabel: Zi.LAN.VOYNO, //'船名', readOnly: true, name: 'VOYNO' }, { fieldLabel: Zi.LAN.ETD, //'船名', readOnly: true, name: 'ETD' }, { fieldLabel: Zi.LAN.PORTDISCHARGE, //'卸货港', readOnly: true, name: 'PORTDISCHARGE' }, { fieldLabel: Zi.LAN.DESTINATION, //'目的地', readOnly: true, name: 'DESTINATION' }, { fieldLabel: Zi.LAN.PLACEDELIVERY, //'目的地', readOnly: true, name: 'PLACEDELIVERY' } ] }, this.panelBodyCtn1 ] }] }); //end this.formEdit //#region 集装箱-数据集 this.storeBodyList2 = Ext.create('Ext.data.Store', { model: 'MsOpSeaeDetail', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsSeaeOrder/GetModifyCtnList', reader: { id: 'BSNO,CTNCODE,CTN_ID', root: 'data', totalProperty: 'totalCount' } } }); this.initctncolumns2 = [{ sortable: true, dataIndex: 'CTN_ID', header: Zi.LAN.CTN_ID, //'编号', hidden: true, width: 0 }, { sortable: true, dataIndex: 'BSNO', header: Zi.LAN.BSNO2, //'业务编号', hidden: true, width: 0 }, { sortable: true, dataIndex: 'CTNCODE', header: Zi.LAN.CTNCODE, //'序号', width: 30 }, { dataIndex: 'CTNALL', header: Zi.LAN.CTNALL, //'箱型', width: 65, editor: this.comboxCTNALL }, { dataIndex: 'CTNNUM', header: Zi.LAN.CTNNUM, //'箱量', width: 60 }, { dataIndex: 'CNTRNO', header: Zi.LAN.CNTRNO, //'箱号', width: 100 }, { dataIndex: 'SEALNO', header: Zi.LAN.SEALNO, //'封号', width: 80 }, { sortable: true, dataIndex: 'PKGS', header: Zi.LAN.PKGS, //'件数', width: 60 }, { dataIndex: 'KINDPKGS', header: Zi.LAN.KINDPKGS, //'包装', width: 70 }, { dataIndex: 'KGS', header: Zi.LAN.KGS3, //'重量', width: 60 }, { dataIndex: 'CBM', header: Zi.LAN.CBM2, //'尺码', width: 60 }, { dataIndex: 'TAREWEIGHT', header: Zi.LAN.TAREWEIGHT, //'箱皮重', width: 60 }, { dataIndex: 'TTLWEIGHT', header: Zi.LAN.TTLWEIGHT, //'参考重量', width: 60 }, { dataIndex: 'WEIGHTYPE', header: Zi.LAN.WEIGHTYPE, //'称重方式', width: 60 }, { dataIndex: 'WEIGHKGS', header: Zi.LAN.WEIGHKGS, //'称重重量', width: 60 }, { dataIndex: 'WEIGHATTN', header: Zi.LAN.WEIGHATTN, //'VGM联系人', width: 80 }, { dataIndex: 'VGMCONNCOM', header: 'VGM联系公司', //'VGM联系人', width: 80 }, { dataIndex: 'WEIGHTEL', header: Zi.LAN.WEIGHTEL, //'VGM联系电话', width: 80 }, { dataIndex: 'WEIGHSIGN', header: Zi.LAN.WEIGHSIGN, //'VGM联系人签名', width: 100 }, { sortable: true, dataIndex: 'WEIGHDATE', header: Zi.LAN.WEIGHDATE, //'VGM称重日期', renderer: Ext.util.Format.dateRenderer('Y-m-d'), width: 100 }, { dataIndex: 'VGMADDR', header: Zi.LAN.VGMADDR, //'VGM联系人签名', width: 100 }, { dataIndex: 'VGMEMAIL', header: Zi.LAN.VGMEMAIL, //'VGM联系人签名', width: 100 }, { dataIndex: 'REMARK', header: Zi.LAN.REMARK, //'备注', width: 150 }, { dataIndex: 'CTNSTATUS', header: Zi.LAN.CTNSTATUS, //'箱状态', width: 70, renderer: function (value, p, record) { if (value == 'E') return '空箱'; else if (value == 'L') return '拼箱'; else return '整箱'; } }, { dataIndex: 'MASTERNO', header: Zi.LAN.MASTERNO2, //'主拼号', width: 100 }, { dataIndex: 'TRUCKER', header: Zi.LAN.TRUCKER, width: 65, }, { dataIndex: 'TRUCKNO', header: Zi.LAN.TRUCKNO, //'车号', width: 100 }, { sortable: true, dataIndex: 'TRUCKFEE', header: Zi.LAN.TRUCKFEE, //'运费', align: 'right', width: 80 }, { dataIndex: 'FREESTORAGEDAY', header: Zi.LAN.FREESTORAGEDAY, width: 60 }, { dataIndex: 'STORAGEDAY', header: Zi.LAN.STORAGEDAY, width: 60 }, { sortable: true, dataIndex: 'STORAGEPRICE', header: Zi.LAN.STORAGEPRICE, //'运费', align: 'right', width: 80 }, { sortable: true, dataIndex: 'STORAGEFEE', header: Zi.LAN.STORAGEFEE, //'运费', align: 'right', width: 80 }, { dataIndex: 'FREECTNDAY', header: Zi.LAN.FREECTNDAY, width: 60 }, { dataIndex: 'CTNDAY', header: Zi.LAN.CTNDAY, width: 60 }, { sortable: true, dataIndex: 'CTNPRICE', header: Zi.LAN.CTNPRICE, //'运费', align: 'right', width: 80 }, { sortable: true, dataIndex: 'CTNFEE', header: Zi.LAN.CTNFEE, //'运费', align: 'right', width: 80 }]; this.ctncolumns2 = this.initctncolumns2; this.gridList2 = new Ext.grid.GridPanel({ store: this.storeBodyList2, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, // plugins: [this.gridListCellEditing], selType: 'cellmodel', columns: this.ctncolumns2 }); // this.ctncolumns = DsTruck.GetGridPanel(USERID, 'SEAECTNCOLUMN', this.ctncolumns, 1); //使用者id,表名,中间column数组,跳过一开始的几列 //#endregion this.panelBodyCtn = new Ext.Panel({ // title: Zi.LAN.panelBodyCtn, //'集装箱信息', layout: "border", height: 140, //margin: '5 10', frame: true, items: [this.gridList2] }); this.formEdit = Ext.widget('form', { frame: true, title: '修改新值', region: "center", // height: 200, bodyPadding: 2, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 70, msgTarget: 'qtip' }, items: [ { xtype: 'fieldset', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [ { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: Zi.LAN.PKGS, //'件数', name: 'PKGS', flex: 0, hidden: true, margins: '0' }, { fieldLabel: Zi.LAN.CBM2, //'尺码', name: 'CBM', flex: 0, hidden: true, margins: '0' }, { fieldLabel: Zi.LAN.CUSTNO, //'委托编号', readOnly: true, name: 'CUSTNO' }, { fieldLabel: Zi.LAN.MBLNO, //'主提单号', readOnly: true, name: 'MBLNO' }, { fieldLabel: Zi.LAN.CUSTSERVICE, //'箱型箱量', readOnly: true, name: 'CUSTSERVICE' }, { fieldLabel: Zi.LAN.SALE, //'毛重', readOnly: true, name: 'SALE' }, { fieldLabel: Zi.LAN.OP, //'付费方式', readOnly: true, name: 'OP' }, { fieldLabel: Zi.LAN.DOC, //'付费方式', readOnly: true, name: 'DOC' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: Zi.LAN.CUSTOMERNAME, //'委托单位', readOnly: true, name: 'CUSTOMERNAME' }, { fieldLabel: Zi.LAN.CARRIER, //'卸货港', readOnly: true, name: 'CARRIER' }, { fieldLabel: Zi.LAN.LANE, //'揽货人', readOnly: true, name: 'LANE' }, { fieldLabel: Zi.LAN.FORWARDER, //'船名', readOnly: true, name: 'FORWARDER' }, { fieldLabel: Zi.LAN.YARD, //'航次', readOnly: true, name: 'YARD' }, { fieldLabel: Zi.LAN.ISSUETYPE, //'目的地', readOnly: true, name: 'ISSUETYPE' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [ { fieldLabel: Zi.LAN.VESSEL, //'船名', readOnly: true, name: 'VESSEL' }, { fieldLabel: Zi.LAN.VOYNO, //'船名', readOnly: true, name: 'VOYNO' }, { fieldLabel: Zi.LAN.ETD, //'船名', readOnly: true, name: 'ETD' }, { fieldLabel: Zi.LAN.PORTDISCHARGE, //'卸货港', readOnly: true, name: 'PORTDISCHARGE' }, { fieldLabel: Zi.LAN.DESTINATION, //'目的地', readOnly: true, name: 'DESTINATION' }, { fieldLabel: Zi.LAN.PLACEDELIVERY, //'目的地', readOnly: true, name: 'PLACEDELIVERY' } ] }, this.panelBodyCtn ] }] }); //end this.formEdit this.paneldetail = new Ext.Panel({ layout: "border", region: 'center', items: [ this.formHead, this.formEdit ] }); Ext.apply(this, { items: [this.panelTop, this.gridList, this.paneldetail] }); _this = this; this.storeList.on('beforeload', function (store) { var sql = this.getCondition(); Ext.apply(store.proxy.extraParams, { condition: sql, isaudit: this.isAudit }); }, this); if (this.worksql != undefined && this.worksql != '') { this.worksql = this.worksql.replace(/@@/g, '=') this.sqlcontext = this.worksql; this.onDsQuery(); } else { this.onRefreshClick(); } this.storeList.on('load', function (store, records) { //if (store.getCount() > 0) { // this.gridList.getSelectionModel().select(0); //} }, this); this.gridList.getSelectionModel().on('select', function (model, record, index) { this.formEdit.getForm().loadRecord(record); var bsno = record.data.BSNO; var applygid = record.data.GID; Ext.Ajax.request({ waitMsg: '正在查询主表数据...', url: '/MvcShipping/MsSeaeOrder/GetData', params: { handle: 'edit', condition: "BSNO='" + bsno+ "'" }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } data = result.data; this.formHead.getForm().reset(); this.formHead.getForm().setValues(data); _thismodifyaudit.getFormChange(); } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); this.storeBodyList1.load({ params: { condition: "BSNO='" + bsno + "'" } }); this.storeBodyList2.load({ params: { condition: "MODIFYID='" + applygid + "'" } }); }, this); //#region 结算汇率和金额 // #endregion }, //end initUIComponents onAuditPassClick: function () { var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.SelectDanJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var bodyAddDatas = []; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; var APPLYSTATUS = rec.data.APPLYSTATUS; if (APPLYSTATUS == '1') { bodyAddDatas.push(rec); } else { Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.NoShenHe, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; }; } var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); _this = this; Ext.MessageBox.confirm(Zi.LAN.Prompt, Zi.LAN.SureShenHe, function (btn) { if (btn == 'yes') { Ext.Msg.wait(Zi.LAN.NowShenHe); Ext.Ajax.request({ waitMsg: Zi.LAN.NowShenHe, url: '/MvcShipping/MsSeaeOrder/AuditModifyList', params: { data: jsonbodyAddDatas }, callback: function (options, success, response) { if (success) { var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { _this.storeList.reload(); Ext.Msg.show({ title: Zi.LAN.Prompt, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } else { Ext.Msg.show({ title: Zi.LAN.Error, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } }, failure: function (response, options) { Ext.Msg.show({ title: Zi.LAN.Caveat, msg: Zi.LAN.FuWuQiError, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } }, this); }, onAuditBackClick: function () { var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.DismissDocuments, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var bodyAddDatas = []; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; var APPLYSTATUS = rec.data.APPLYSTATUS; if (APPLYSTATUS == '1') { bodyAddDatas.push(rec); } else { Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.DismissDocumentsNo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; }; } var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); _this = this; Ext.MessageBox.show({ title: Zi.LAN.Tishi7, msg: Zi.LAN.Tishi8, width: 300, buttons: Ext.MessageBox.OKCANCEL, multiline: true, fn: function (btn, text) { if (btn == "ok") { Ext.Ajax.request({ waitMsg: Zi.LAN.DismissDocumentsNow, url: '/MvcShipping/MsSeaeOrder/AuditBackModifyList', params: { data: jsonbodyAddDatas, reason: text }, callback: function (options, success, response) { if (success) { var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { _this.storeList.reload(); Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.DismissSuccess, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } else { Ext.Msg.show({ title: Zi.LAN.Error, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } }, failure: function (response, options) { Ext.Msg.show({ title: Zi.LAN.Caveat, msg: Zi.LAN.FuWuQiError, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } } }); }, getFormChange() { if (this.formEdit.getForm().findField('MBLNO').getValue() != this.formHead.getForm().findField('MBLNO').getValue()) this.formEdit.getForm().findField('MBLNO').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('MBLNO').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('OP').getValue() != this.formHead.getForm().findField('OP').getValue()) this.formEdit.getForm().findField('OP').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('OP').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('CUSTSERVICE').getValue() != this.formHead.getForm().findField('CUSTSERVICE').getValue()) this.formEdit.getForm().findField('CUSTSERVICE').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('CUSTSERVICE').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('SALE').getValue() != this.formHead.getForm().findField('SALE').getValue()) this.formEdit.getForm().findField('SALE').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('SALE').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('CARRIER').getValue() != this.formHead.getForm().findField('CARRIER').getValue()) this.formEdit.getForm().findField('CARRIER').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('CARRIER').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('FORWARDER').getValue() != this.formHead.getForm().findField('FORWARDER').getValue()) this.formEdit.getForm().findField('FORWARDER').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('FORWARDER').setFieldStyle({ color: '#000000' }); //if (this.formHead.getForm().findField('TRUCKER').getValue() != this.formHead.getForm().findField('TRUCKER').getValue()) // this.formHead.getForm().findField('TRUCKER').setFieldStyle({ color: '#FF4500' }); //else // this.formHead.getForm().findField('TRUCKER').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('DOC').getValue() != this.formHead.getForm().findField('DOC').getValue()) this.formEdit.getForm().findField('DOC').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('DOC').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('VESSEL').getValue() != this.formHead.getForm().findField('VESSEL').getValue()) this.formEdit.getForm().findField('VESSEL').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('VESSEL').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('VOYNO').getValue() != this.formHead.getForm().findField('VOYNO').getValue()) this.formEdit.getForm().findField('VOYNO').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('VOYNO').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('YARD').getValue() != this.formHead.getForm().findField('YARD').getValue()) this.formEdit.getForm().findField('YARD').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('YARD').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('ETD').getRawValue() != this.formHead.getForm().findField('ETD').getValue()) this.formEdit.getForm().findField('ETD').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('ETD').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('PORTDISCHARGE').getValue() != this.formHead.getForm().findField('PORTDISCHARGE').getValue()) this.formEdit.getForm().findField('PORTDISCHARGE').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('PORTDISCHARGE').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('DESTINATION').getValue() != this.formHead.getForm().findField('DESTINATION').getValue()) this.formEdit.getForm().findField('DESTINATION').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('DESTINATION').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('PLACEDELIVERY').getValue() != this.formHead.getForm().findField('PLACEDELIVERY').getValue()) this.formEdit.getForm().findField('PLACEDELIVERY').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('PLACEDELIVERY').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('LANE').getValue() != this.formHead.getForm().findField('LANE').getValue()) this.formEdit.getForm().findField('LANE').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('LANE').setFieldStyle({ color: '#000000' }); if (this.formEdit.getForm().findField('ISSUETYPE').getValue() != this.formHead.getForm().findField('ISSUETYPE').getValue()) this.formEdit.getForm().findField('ISSUETYPE').setFieldStyle({ color: '#FF4500' }); else this.formEdit.getForm().findField('ISSUETYPE').setFieldStyle({ color: '#000000' }); }, onClearSql: function () { var form = this.formSearch.getForm(); form.reset(); }, //onDeleteClick onRefreshClick: function (button, event) { var sql = this.getCondition(); this.BillSql = sql; this.storeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql, isaudit: this.isAudit }, waitMsg: Zi.LAN.NowSelect, callback: function (r, options, success) { if (success) { if (r.length == 0) { //var sql = " BILLNO='11111111' "; //this.storeBodyListdetail.load({ params: { condition: sql} }); //this.storeBodySum.load({ params: { condition: sql} }); } } }, scope: this }); }, onDsQuery: function () { //var girdcolums = this.gridList.getColumnMode(); var sql = this.sqlcontext; this.PageSize = 15; this.storeList.pageSize = this.PageSize; this.storeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql }, waitMsg: Zi.LAN.NowSelect, scope: this }); }, getCondition: function () { var form = this.formSearch.getForm(); if (!form.isValid()) { Ext.Msg.alert(Zi.LAN.Prompt, Zi.LAN.SelectError); return ''; } var sql = ''; var sBsNo = form.findField('sBsNo').getValue(); sql = sql + getAndConSql(sql, sBsNo, " EXISTS (select 1 from OP_SEAE d where d.BSNO=op_seae_modify.BSNO AND d.CUSTNO like '%" + sBsNo + "%' or d.MBLNO like '%" + sBsNo + "%' or d.HBLNO like '%" + sBsNo + "%' or d.CUSTOMNO like '%" + sBsNo + "%' or d.ORDERNO like '%" + sBsNo + "%')"); var custName = form.findField('CustName').getValue(); sql = sql + getAndConSql(sql, custName, "CUSTOMERNAME like '%" + custName + "%'"); var expDateBgn = form.findField('ExpDateBgn').getRawValue(); sql = sql + getAndConSql(sql, expDateBgn, "APPLYTIME >='" + expDateBgn + "'"); var expDateEnd = form.findField('ExpDateEnd').getRawValue(); sql = sql + getAndConSql(sql, expDateEnd, "APPLYTIME <='" + expDateEnd + "'"); var APPLICANT = form.findField('APPLICANT').getValue(); sql = sql + getAndConSql(sql, APPLICANT, "APPLYUSER='" + APPLICANT + "'"); var APPLYSTATUS = form.findField('DC').getValue(); sql = sql + getAndConSql(sql, APPLYSTATUS, "APPLYSTATUS='" + APPLYSTATUS + "'"); return sql; } });