Ext.namespace('Shipping'); Shipping.MsOpSeaeFenIndex = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.MsOpSeaeFenIndex.superclass.constructor.call(this); }; Ext.extend(Shipping.MsOpSeaeFenIndex, Ext.Panel, { PageSize: 20, OprationStatus: null, //仅当弹出界面时使用 SelectedRecord: null, EditRecord: null, BsNo: '', sortfield: '', sortdire: '', mainWin:'', initUIComponents: function () { var mainform = window.panelEdit; this.EditRecord = mainform.editRecord; this.BsNo = this.EditRecord.get('BSNO'); this.mainWin = getMainForm(window.parent.opener); this.formname = "formMsOpSeaeFenIndex"; //页面名称 //定义数据集 this.storectndisp = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CtnDispModel', proxy: { url: '/CommMng/BasicDataRef/GetCtnDisp' } }); this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', { model: 'MsOP', proxy: { url: '/MvcShipping/MsBaseInfo/GetOpRang' } }); this.StoreOpRange.load({ params: { optype: "modOrderManagement"} }); this.storeList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, model: 'MsOpSeaeModel', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsOpSeae/GetFenList', reader: { id: 'BSNO', root: 'data', totalProperty: 'totalCount' } } }); //#region List列表显示信息 Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, { width: 30 }); this.initgirdcolums = [{ sortable: true, id: '', dataIndex: '', header: '', width: 0 }, { sortable: true, id: '', dataIndex: 'BillFeeStatus', header: Zi.LAN.BillFeeStatus, //'整票状态', width: 60, renderer: function (value, meta) { if (value == '0') { return Zi.LAN.WEITIJIAO; } else if (value == '1') { meta.tdCls = 'feestatus_refer'; return Zi.LAN.ZHENGPIAOTIJIAO; } else if (value == '2') { meta.tdCls = 'feestatus_pass'; return Zi.LAN.SHENHETONGGUO; } else if (value == '4') { meta.tdCls = 'feestatus_nopass'; return Zi.LAN.ZHENGPIAOBOHUI; } else { return ""; } } }, { sortable: true, id: '', dataIndex: 'BSNO', header: Zi.LAN.BSNO2, //'业务编号', width: 0 }, { sortable: true, id: '', dataIndex: 'CUSTNO', header: Zi.LAN.CUSTNO, //'委托编号', width: 120, filter: true, renderer: function (value, meta) { meta.tdCls = 'mblno'; btnurl = getGridCopyButton(value); return btnurl + value; } }, { sortable: true, id: '', dataIndex: 'ORDERNO', header: Zi.LAN.ORDERNO, //'订舱编号', width: 120, filter: true }, { sortable: true, id: '', dataIndex: 'ORDERTYPE', header: Zi.LAN.ORDERTYPE, //'订舱方式', width: 120, renderer: function (value, cellmeta) { if (value == '操作录入') { return Zi.LAN.CAOZUOLUR; } else if (value == '销售订舱') { return Zi.LAN.XIAOSHOUDINGCANG; } else if (value == '集团订舱') { return Zi.LAN.JITUANDINGCANG; } } }, { sortable: true, id: '', dataIndex: 'BSSTATUSREF', header: Zi.LAN.BSSTATUSREF, //'业务锁定', align: 'center', width: 60, renderer: function (value, cellmeta) { if (value == '锁定') { return ""; } } }, { sortable: true, id: '', dataIndex: 'FEESTATUSREF', header: Zi.LAN.FEESTATUSREF, //'费用锁定', align: 'center', width: 60, renderer: function (value, cellmeta) { if (value == '锁定') { return ""; } }, filter: { type: 'list', options: ['锁定', '未锁定'] } }, { sortable: true, id: '', dataIndex: 'DRFEESTATUS', header: Zi.LAN.DRFEESTATUS, //'应收费用', align: 'center', width: 60, renderer: function (value, meta) { if (value == '审核通过') { meta.tdCls = 'feestatus_pass'; value = Zi.LAN.SHENHETONGGUO; } else if (value == '录入状态') { value = Zi.LAN.LURUZHUAGNTAI; } else if (value == '提交审核') { meta.tdCls = 'feestatus_refer'; value = Zi.LAN.TIJIAOSHENHE; } else if (value == '部分结算') { meta.tdCls = 'feestatus_settlepart'; value = Zi.LAN.BUFENJIESUAN; } else if (value == '结算完毕') { meta.tdCls = 'feestatus_settle'; value = Zi.LAN.JIESUANWANBI; } else if (value == '未录入') { value = Zi.LAN.WEILURU; } else if (value == '部分审核') { meta.tdCls = 'feestatus_refer'; value = Zi.LAN.BUFENSHENHE; } else if (value == '部分提交') { meta.tdCls = 'feestatus_refer'; value = Zi.LAN.BUFENTIJIAO; } else if (value == '驳回提交') { meta.tdCls = 'feestatus_nopass'; value = Zi.LAN.BOHUITIJIAO; } return value; } }, { sortable: true, id: '', dataIndex: 'CRFEESTATUS', header: Zi.LAN.CRFEESTATUS, //'应付费用', align: 'center', width: 60, renderer: function (value, meta) { if (value == '审核通过') { meta.tdCls = 'feestatus_pass'; value = Zi.LAN.SHENHETONGGUO; } else if (value == '录入状态') { value = Zi.LAN.LURUZHUAGNTAI; } else if (value == '提交审核') { meta.tdCls = 'feestatus_refer'; value = Zi.LAN.TIJIAOSHENHE; } else if (value == '部分结算') { meta.tdCls = 'feestatus_settlepart'; value = Zi.LAN.BUFENJIESUAN; } else if (value == '结算完毕') { meta.tdCls = 'feestatus_settle'; value = Zi.LAN.JIESUANWANBI; } else if (value == '未录入') { value = Zi.LAN.WEILURU; } else if (value == '部分审核') { meta.tdCls = 'feestatus_refer'; value = Zi.LAN.BUFENSHENHE; } else if (value == '部分提交') { meta.tdCls = 'feestatus_refer'; value = Zi.LAN.BUFENTIJIAO; } else if (value == '驳回提交') { meta.tdCls = 'feestatus_nopass'; value = Zi.LAN.BOHUITIJIAO; } return value; } }, { sortable: true, id: '', dataIndex: 'DRINVSTATUS', header: Zi.LAN.DRINVSTATUS, //'应收开票', align: 'center', // xtype: 'actioncolumn', width: 60, renderer: function (value, meta, record) { var openSet = "height=200, width=650, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 600) / 2 var openType = "_blank"; var openUrl = ""; openUrl = "../../MvcShipping/MsRptChInvTotal/BsView?handle=check&bsno=" + record.data.BSNO; var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')"; if (value == '已开票') { value = '' + Zi.LAN.YIKAIPIAO + '' meta.tdCls = 'feestatus_pass'; } else if (value == '部分开票') { meta.tdCls = 'feestatus_refer'; value = '' + Zi.LAN.BOFENKAIPIAO + '' } return value; } }, { sortable: true, id: '', dataIndex: 'CRINVSTATUS', header: Zi.LAN.CRINVSTATUS, //'应收开票', align: 'center', // xtype: 'actioncolumn', width: 60, renderer: function (value, meta, record) { var openSet = "height=200, width=650, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 600) / 2 var openType = "_blank"; var openUrl = ""; openUrl = "../../MvcShipping/MsRptChInvTotal/BsCrView?handle=check&bsno=" + record.data.BSNO; var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')"; if (value == '已开票') { value = '' + Zi.LAN.YIKAIPIAO + '' meta.tdCls = 'feestatus_pass'; } else if (value == '部分开票') { meta.tdCls = 'feestatus_refer'; value = '' + Zi.LAN.BOFENKAIPIAO + '' } return value; } }, { sortable: true, id: '', dataIndex: 'DRDUISTATUS', header: Zi.LAN.DRDUISTATUS, //'应收对账', align: 'center', width: 60, renderer: function (value, meta, record) { if (value == '已对账') { // value = '已开票' meta.tdCls = 'feestatus_pass'; value = Zi.LAN.YIDUIZHANG; } else if (value == '部分对账') { meta.tdCls = 'feestatus_refer'; // value = '部分开票' value = Zi.LAN.BUFENDUIZHANG; } return value; } } , { sortable: true, id: '', dataIndex: 'OPSTATUS', header: Zi.LAN.OPSTATUS, //'业务状态', width: 60, renderer: function (value, metadata, record, rowIndex) { metadata.style = "background-color:" + record.data.COLOR; return value; }, filter: true } , { sortable: true, id: '', dataIndex: 'BLTYPE', header: Zi.LAN.BLTYPE, //'装运方式', width: 60, renderer: function (value, cellmeta) { if (value == '整箱') { return Zi.LAN.ZHENGXIANG; } else if (value == '拼箱单票') { return Zi.LAN.PINXIANGDANPIAO; } else if (value == '拼箱分票') { return Zi.LAN.PINXIANGFENPIAO; } else if (value == '拼箱主票') { return Zi.LAN.PINXIANGZHUPIAO; } else if (value == '合票主票') { return Zi.LAN.HEPIAOZHUPIAO; } else if (value == '合票分票') { return Zi.LAN.HEPIAOFENPIAO; } } }, { sortable: true, id: '', dataIndex: 'ETD',//'ETD' header: Zi.LAN.ETD, //'开船日期', width: 80, filter: { type: 'date', dataIndex: 'ETD' } }, { sortable: true, id: '', dataIndex: 'MBLNO', header: Zi.LAN.MBLNO, //'主提单号', width: 120, filter: { type: 'string', dataIndex: 'MBLNO' }, renderer: function (value, meta) { meta.tdCls = 'mblno'; btnurl = getGridCopyButton(value); return btnurl + value; } }, { sortable: true, id: '', dataIndex: 'CUSTOMERNAME', header: Zi.LAN.CUSTOMERNAME, //'委托单位', width: 120, filter: { type: 'string', dataIndex: 'CUSTOMERNAME' } }, { sortable: true, id: '', dataIndex: 'ETA', header: Zi.LAN.ETA, //'预抵日期', width: 80, filter: { type: 'date', dataIndex: 'ETA' } }, { sortable: true, id: '', dataIndex: 'BSDATE', header: Zi.LAN.BSDATE, //'修改日期', width: 80 }, { sortable: true, id: '', dataIndex: 'GOODSNAME', header: Zi.LAN.GOODSNAME, //'品名', width: 120 }, { sortable: true, id: '', dataIndex: 'PKGS', header: Zi.LAN.PKGS, //'件数', width: 80 }, { sortable: true, id: '', dataIndex: 'KGS', header: Zi.LAN.KGS2, //'毛重', width: 80 }, { sortable: true, id: '', dataIndex: 'CBM', header: Zi.LAN.CBM2, //'尺码', width: 80 }, { sortable: true, id: '', dataIndex: 'CNTRTOTAL', header: Zi.LAN.CNTRTOTAL2, //'集装箱', width: 80 }, { sortable: true, id: '', dataIndex: 'HBLNO', header: Zi.LAN.HBLNO, //'分提单号', width: 120, filter: { type: 'string', dataIndex: 'HBLNO' }, renderer: function (value, meta) { meta.tdCls = 'mblno'; btnurl = getGridCopyButton(value); return btnurl + value; } }, { sortable: true, id: '', dataIndex: 'ACCDATE', header: Zi.LAN.ACCDATE, //'会计期间', width: 60 }, { sortable: true, id: '', dataIndex: 'BSSOURCE', header: Zi.LAN.BSSOURCE, //'业务来源', width: 80, filter: true }, { sortable: true, id: '', dataIndex: 'BSSOURCEDETAIL', header: Zi.LAN.BSSOURCEDETAIL, //'来源明细', width: 80, filter: true }, { sortable: true, id: '', dataIndex: 'INPUTBY', header: Zi.LAN.INPUTBY2, //'录入人', width: 80 }, { sortable: true, id: '', dataIndex: 'CREATETIME', header: Zi.LAN.CREATETIME2, //'创建时间', width: 120 }, { sortable: true, id: '', dataIndex: 'OP', header: Zi.LAN.OP, //'操作员', width: 80, filter: true }, { sortable: true, id: '', dataIndex: 'SALE', header: Zi.LAN.SALE, //'揽货人', width: 80, filter: true }, { sortable: true, id: '', dataIndex: 'VESSEL', header: Zi.LAN.VESSEL, //'船名', width: 100, filter: true }, { sortable: true, id: '', dataIndex: 'VOYNO', header: Zi.LAN.VOYNO, //'航次', width: 60, filter: true }, { sortable: true, id: '', dataIndex: 'PORTLOAD', header: Zi.LAN.PORTLOAD, //'装货港', width: 100, filter: true }, { sortable: true, id: '', dataIndex: 'PORTDISCHARGE', header: Zi.LAN.PORTDISCHARGE, //'卸货港', width: 100, filter: true }, { sortable: true, id: '', dataIndex: 'DESTINATION', header: Zi.LAN.DESTINATION, //'目的地', width: 100, filter: true }, { sortable: true, id: '', dataIndex: 'CNTR1', hidden: true, header: Zi.LAN.CNTR1, //'箱型1', width: 60 }, { sortable: true, id: '', dataIndex: 'CNTR2', hidden: true, header: Zi.LAN.CNTR2, //'箱型2', width: 60 }, { sortable: true, id: '', dataIndex: 'CNTR3', hidden: true, header: Zi.LAN.CNTR3, //'箱型3', width: 60 }, { sortable: true, id: '', dataIndex: 'CNTR4', hidden: true, header: Zi.LAN.CNTR4, //'箱型4', width: 60 }, { sortable: true, id: '', dataIndex: 'CNTR5', hidden: true, header: Zi.LAN.CNTR5, //'箱型5', width: 60 }, { sortable: true, id: '', dataIndex: 'CNTR6', hidden: true, header: Zi.LAN.CNTR6, //'箱型6', width: 60 }, { sortable: true, id: '', dataIndex: 'CNTR7', hidden: true, header: Zi.LAN.CNTR7, //'箱型7', width: 60 }, { sortable: true, id: '', dataIndex: 'CNTR8', hidden: true, header: Zi.LAN.CNTR8, //'箱型8', width: 60 }, { sortable: true, id: '', dataIndex: 'CNTR9', hidden: true, header: Zi.LAN.CNTR9, //'箱型9', width: 60 }, { sortable: true, id: '', dataIndex: 'CNTR10', hidden: true, header: Zi.LAN.CNTR10, //'箱型10', width: 60 }, { sortable: true, id: '', dataIndex: 'OTCNTR', header: Zi.LAN.OTCNTR, //'其他箱型', width: 60 }, { sortable: true, id: '', dataIndex: 'TEU', header: Zi.LAN.TEU, //'箱TEU', width: 40 }, { sortable: true, id: '', dataIndex: 'CUSTOMSER', header: Zi.LAN.CUSTOMSER, //'报关行', width: 80 }, { sortable: true, id: '', dataIndex: 'KINDPKGS', header: Zi.LAN.KINDPKGS, //'件数包装', width: 60 }, { sortable: true, id: '', dataIndex: 'CARRIER', header: Zi.LAN.CARRIER, //'船公司', width: 100 }, { sortable: true, id: '', dataIndex: 'TRUCKER', header: Zi.LAN.TRUCKER, //'承运车队', width: 100 }, { sortable: true, id: '', dataIndex: 'TRUCKSTATUS', header: Zi.LAN.TRUCKSTATUS, //'承运车队', width: 100 }, { sortable: true, id: '', dataIndex: 'LANE', header: Zi.LAN.LANE, //'航线', width: 100 }, { sortable: true, id: '', dataIndex: 'SERVICE', header: Zi.LAN.SERVICE, //'航线', width: 100 }, { sortable: true, id: '', dataIndex: 'AGENTID', header: Zi.LAN.AGENTID, //'代理', width: 100 }, { sortable: true, id: '', dataIndex: 'FORWARDER', header: Zi.LAN.FORWARDER, //'订舱代理', width: 100 }, { sortable: true, id: '', dataIndex: 'PORTDISCHARGEID', header: Zi.LAN.PORTDISCHARGEID, //'卸港代码', width: 100 }, { sortable: true, id: '', dataIndex: 'YARD', header: Zi.LAN.YARD, //'场站', width: 100 }, { sortable: true, id: '', dataIndex: 'SERVICECONTRACTNO', header: Zi.LAN.SERVICECONTRACTNO, //'服务合同号', width: 100 }, { sortable: true, id: '', dataIndex: 'CUSTSERVICE', header: Zi.LAN.CUSTSERVICE, //'客服', width: 100 }, { sortable: true, id: '', dataIndex: 'FRCUSTSERVICE', header: Zi.LAN.FRCUSTSERVICE, //'客服', width: 100 }, { sortable: true, id: '', dataIndex: 'DOC', header: Zi.LAN.DOC, //'单证', width: 100 }, { sortable: true, id: '', dataIndex: 'VOUNO', header: Zi.LAN.VOUNO, //'凭证号', width: 60 }, { sortable: true, id: '', dataIndex: 'IRCODE', header: Zi.LAN.IRCODE, //'凭证号', width: 60 }, { sortable: true, dataIndex: 'ISPRINTPR', header: Zi.LAN.ISPRINTPR, //'打印核算单', width: 80, renderer: function (value, meta, record) { if (value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISFUMIGATION', header: Zi.LAN.ISFUMIGATION, //'服务项目1', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISSTORAGE', header: Zi.LAN.ISSTORAGE, //'服务项目2', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISLAND', header: Zi.LAN.ISLAND, //'服务项目3', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISCUSTOMS', header: Zi.LAN.ISCUSTOMS, //'服务项目4', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISINSPECTION', header: Zi.LAN.ISINSPECTION, //'服务项目5', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISBOOKING', header: Zi.LAN.ISBOOKING, //'服务项目6', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISAGENT', header: Zi.LAN.ISAGENT, //'服务项目7', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISHBLNO', header: Zi.LAN.ISHBLNO, //'服务项目8', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'SERVICE9', header: Zi.LAN.SERVICE9, //'服务项目9', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'SERVICE10', header: Zi.LAN.SERVICE10, //'服务项目10', hidden: true, width: 100, renderer: function (value, meta, record) { if (value == true || value == '1') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISCONTAINERSOC', header: Zi.LAN.ISCONTAINERSOC, //'服务项目10', width: 100, renderer: function (value, meta, record) { if (value == true || value == 'true' || value == '1') return '√'; else return ''; } }, { sortable: true, id: '', dataIndex: 'SHIPAGENCY', header: Zi.LAN.SHIPAGENCY, //'船代', width: 100 }, { sortable: true, id: '', dataIndex: 'SHIPPER', header: Zi.LAN.SHIPPER, //'SHIPPER', width: 100 }, { sortable: true, id: '', dataIndex: 'CONSIGNEE', header: Zi.LAN.CONSIGNEE, //'CONSIGNEE', width: 100, filter: { type: 'string', dataIndex: 'CONSIGNEE' } }, { sortable: true, id: '', dataIndex: 'NOTIFYPARTY', header: Zi.LAN.NOTIFYPARTY, //'NOTIFYPARTY', width: 100 }, { sortable: true, id: '', dataIndex: 'SHIPPERID', header: Zi.LAN.SHIPPERNAME, //'SHIPPER', width: 100 }, { sortable: true, id: '', dataIndex: 'DESCRIPTION', header: Zi.LAN.DESCRIPTION, //'SHIPPER', width: 100 }, { sortable: true, id: '', dataIndex: 'CONTRACTNO', header: Zi.LAN.CONTRACTNO, //'运费协议号', width: 100, filter: { type: 'string', dataIndex: 'CONTRACTNO' } }, { sortable: true, id: '', dataIndex: 'ISSUETYPE', header: Zi.LAN.ISSUETYPE, //'签单方式', width: 100 }, { sortable: true, id: '', dataIndex: 'OPERATOR', header: Zi.LAN.OPERATOR2, //'委托单位联系人', width: 100 }, { sortable: true, id: '', dataIndex: 'CLOSINGDATE', header: Zi.LAN.CLOSINGDATE, //'截港日期', width: 100 }, { sortable: true, id: '', dataIndex: 'CLOSEDOCDATE', header: Zi.LAN.CLOSEDOCDATE, //'截单日期', width: 100 }, { sortable: true, dataIndex: 'AMEND', header: Zi.LAN.AMEND, //'更改单', width: 80, renderer: function (value, meta, record) { if (value != '0') return '√'; else return ''; } }, { sortable: true, dataIndex: 'ISAPPLY', header: Zi.LAN.ISAPPLY, //'是否生成报关', width: 80, renderer: function (value, meta, record) { if (value != '0') return '√'; else return ''; } }, { sortable: true, dataIndex: 'STLNAME', header: Zi.LAN.STLNAME, //'结算方式', width: 80 }, { sortable: true, dataIndex: 'STLDATE', header: Zi.LAN.STLDATE, //'结算日期', width: 80 }, { dataIndex: 'BLFRT', header: Zi.LAN.BLFRT, //'付费方式', width: 120 }, { dataIndex: 'APPLYNO', header: Zi.LAN.APPLYNO, //'申请放箱号', width: 120 }, { dataIndex: 'CARGOID', header: Zi.LAN.CARGOID, //'货物标识', width: 120 }, { dataIndex: 'BLISSUESTATUS', header: Zi.LAN.BLISSUESTATUS, //'货物标识', width: 120, renderer: function (value, meta) { if (value == '提单签出') { meta.tdCls = 'feestatus_pass'; } else if (value == '提单签入') { meta.tdCls = 'feestatus_refer'; } return value; } }, { dataIndex: 'INVNO', header: Zi.LAN.INVNO, //'货物标识', width: 120 }, { dataIndex: 'REMARK', header: Zi.LAN.REMARK, //'货物标识', width: 120 }, { dataIndex: 'OPERATORFAX', header: Zi.LAN.OTREMARK, //'其他备注', width: 120 }, { dataIndex: 'PLACERECEIPT', header: Zi.LAN.PLACERECEIPTID, //'货物标识', width: 120 }, { dataIndex: 'SALECORP', header: Zi.LAN.SALECOMPANY, //'货物标识', width: 120 }, { dataIndex: 'DCLASS', header: Zi.LAN.DCLASS, //'货物标识', width: 70 }, { dataIndex: 'DUNNO', header: Zi.LAN.DUNNO, //'货物标识', width: 70 }, { dataIndex: 'TEMPSET', header: Zi.LAN.TEMPSET, //'货物标识', width: 70 }, { dataIndex: 'ATD', header: Zi.LAN.ATD, //'货物标识', width: 70 }, { dataIndex: 'SALEDEPT', header: Zi.LAN.SALEDEPT2, //'货物标识', width: 70 }, { dataIndex: 'CUSTOMNO', header: Zi.LAN.CUSTOMNO, //'货物标识', width: 70 }, { dataIndex: 'TRANSREMARK', header: Zi.LAN.TRANSREMARK, //'货物标识', width: 70 }, { dataIndex: 'TRANSPORT', header: Zi.LAN.TRANSPORT, //'货物标识', width: 70 }, { dataIndex: 'ENTERP', header: Zi.LAN.ENTERP, //'货物标识', width: 70 }, { dataIndex: 'DELIVERYDATE', header: Zi.LAN.DELIVERYDATE, //'货物标识', width: 70 }, { dataIndex: 'PLACEDELIVERY', header: Zi.LAN.PLACEDELIVERY, //'货物标识', width: 70 }, { dataIndex: 'ISSUEPLACE', header: Zi.LAN.ISSUEPLACEID, //'货物标识', width: 70 }, { dataIndex: 'FINANCIALSTAFF', header: Zi.LAN.FINANCIALSTAFF, //'货物标识', width: 70 }, { dataIndex: 'FINANCIALSTAFFFAX', header: Zi.LAN.INSURANCEOP, //'货物标识', width: 70 }, { dataIndex: 'ISSUEDATE', header: Zi.LAN.ISSUEDATE, //'货物标识', width: 70 }, { dataIndex: 'ISCANCEL', header: '退舱', //'退舱', width: 60, renderer: function (value, meta, record) { if (value == '1') return '√'; else if (value == '2') return '申请退舱'; else if (value == '4') return '驳回申请'; else return ''; } }, { dataIndex: 'ISTUI', header: '推航次', //'推航次', width: 70, renderer: function (value, meta, record) { if (value == '1') return '√'; else if (value == '2') return Zi.LAN.SHENQINGTUIHANGCI; else if (value == '4') return Zi.LAN.BOHUISHENQING; else return ''; } }]; this.Pagenum = Ext.create('Ext.form.field.Number', { name: 'bottles', fieldLabel: '每页记录数', //'每页记录数', labelAlign: 'right', value: this.PageSize, maxValue: 100000, width: 180, minValue: 0, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _thisfenlist.onRefreshClick(); } } } }); this.girdcolums=this.initgirdcolums; this.GridCheckBoxFenModel = Ext.create('Ext.selection.CheckboxModel'); //定义Grid this.gridList = new Ext.grid.GridPanel({ store: this.storeList, enableHdMenu: false, region: 'center', loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng}, trackMouseOver: true, selModel: this.GridCheckBoxFenModel, disableSelection: false, columns: this.girdcolums, bbar: [Ext.create('Ext.PagingToolbar', { store: this.storeList, displayInfo: true, displayMsg: Zi.LAN.displayMsg, //'当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: Zi.LAN.emptyMsg/'没有数据' }), this.Pagenum] }); /////////////以下部分为获取存储的gridpanel显示样式 // this.column = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列 this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列 this.gridList.reconfigure(this.storeList, this.girdcolums); this.gridList.columns[0] = new Ext.grid.RowNumberer(); //////////////////////////////////////////////// this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) { this.SelectedRecord = record; this.OprationStatus = 'edit'; DsOpenEditWin('/MvcShipping/MsOpSeae/Edit', "分票信息"); }, this); this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) { this.sortfield = column.dataIndex; this.sortdire = direction; }, this); _thisfenlist = this; //按钮工具条 this.panelBtn = new Ext.Panel({ region: "north", tbar: [{ text: Zi.LAN.btnadd, iconCls: "btnadd", handler: function (button, event) { if (this.EditRecord.get('BSSTATUSREF') == '锁定') { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.ZuPiaoYeWuYiSuoDing, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } this.OprationStatus = 'add'; DsOpenEditWin('/MvcShipping/MsOpSeae/Edit', "分票信息"); }, scope: this }, '-', { text: Zi.LAN.copyadd, //"国外舱单", iconCls: "btnadd", handler: function (button, event) { var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var record = selections[0]; this.SelectedRecord = record; this.OprationStatus = 'copyadd'; DsOpenEditWin('/MvcShipping/MsOpSeae/Edit', "分票信息"); }, scope: this }, { text: Zi.LAN.btndelete, iconCls: "btndelete", handler: function (button, event) { this.onDeleteClick(button, event); }, scope: this }, '-', { text: Zi.LAN.btnrefresh, iconCls: "btnrefresh", handler: function (button, event) { this.onRefreshClick(button, event); }, scope: this }, { text: Zi.LAN.btnreset, iconCls: "btnreset", handler: function (button, event) { this.onClearSql(button, event); }, scope: this }, '-', { text: Zi.LAN.btntest, //"保存列表样式", id: "btntest", menu: [ { text: Zi.LAN.SaveGridPanel, //"保存", handler: function (button, event) { _thisfenlist.girdcolums = DsTruck.SaveGridPanel(USERID, _thisfenlist.formname, _thisfenlist.gridList.columns, _thisfenlist.girdcolums, 1, true); } }, { text: Zi.LAN.SaveGridPanel2, //"初始化", handler: function (menu, event) { _thisfenlist.gridList.reconfigure(_thisfenlist.storeList, _thisfenlist.initgirdcolums); _thisfenlist.girdcolums = DsTruck.SaveGridPanel(USERID, _thisfenlist.formname, _thisfenlist.gridList.columns, _thisfenlist.initgirdcolums, 1, true); } }], scope: this }, '-', { text: Zi.LAN.EdiExport, //"EDI报文导出", menu: [{ text: Zi.LAN.CargoSmartEDI, //"Cargo Smart", handler: function (menu, event) { _thisfenlist.onCreateCargoSmartEDIClick(menu, event); } } ], scope: this }, '-', { text: Zi.LAN.GuoWaiCangDan, //"国外舱单", menu: [ { text: Zi.LAN.JapanAFR, //"日本AFR", handler: function (menu, event) { _thisfenlist.onCreateAfrClick(menu, event, 1); } }, { text: Zi.LAN.JapanAMR, //"日本AMR", handler: function (menu, event) { _thisfenlist.onCreateAfrClick(menu, event, 2); } }, { text: Zi.LAN.AMS, //"AMS", handler: function (menu, event) { _thisfenlist.onCreateAfrClick(menu, event, 3); } }, { text: Zi.LAN.JapanAFRZF, //"直发日本AFR", handler: function (menu, event) { _thisfenlist.onCreateAfrZFClick(menu, event, 1); } }, { text: Zi.LAN.JapanAMRZF, //"直发日本AMR", handler: function (menu, event) { _thisfenlist.onCreateAfrZFClick(menu, event, 2); } }, { text: Zi.LAN.AMSZF, //"直发AMS", handler: function (menu, event) { _thisfenlist.onCreateAfrZFClick(menu, event, 3); } }, { text: Zi.LAN.JapanAFRZF + "(CargoSmart)", //"直发日本AFR", handler: function (menu, event) { _this.onCreateAfrCSZFClick(menu, event, 'CGAFR'); } }], scope: this }, '-', { text: Zi.LAN.btnprint, //"打印", iconCls: 'btnprint', menu: [ { text: Zi.LAN.Print, //"全部", handler: function (menu, event) { _thisfenlist.Print(); } }, { text: Zi.LAN.PrintSelect, //"选择打印", handler: function (menu, event) { _thisfenlist.PrintSelect(); } }], scope: this }, '-', { text: Zi.LAN.OtherCaoZuo, //"其他操作", menu: [{ text: Zi.LAN.winModifyShow, //"业务批量修改", handler: function (menu, event) { _thisfenlist.winModifyShow.show(); } }] }] }); this.panelTop = new Ext.Panel({ layout: "border", region: "north", height: 30, items: [this.panelBtn] }); Ext.apply(this, { items: [this.panelTop, this.gridList] }); this.onRefreshClick(); this.storeList.on('beforeload', function (store) { var sql = "BSNO<>'" + this.BsNo + "' and MASTERNO='" + this.BsNo + "'"; Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); //#region 批量修改窗体 //客户加载_场站 this.storeYARD = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListYARD' } }); // this.storeYARD.load({ params: { condition: "ISYARD='1'"} }); //船公司 this.comboxYARD2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.YARD, //'场站', store: this.storeYARD, queryMode: 'remote', minChars: 1, queryParam: 'CODENAME', name: 'YARD', valueField: 'CustName', displayField: 'CodeAndName' }); //客户加载_船公司 //船公司 this.storeCARRIER = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListCARRIER' } }); // this.storeCARRIER.load({ params: { condition: "ISCARRIER='1'"} }); this.comboxCARRIER2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.CARRIER, //'船公司', store: this.storeCARRIER, queryMode: 'remote', minChars: 1, queryParam: 'CODENAME', name: 'CARRIER', valueField: 'CustName', displayField: 'CodeAndName' }); //客户加载_订舱代理 this.storeFORWARDER = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListFORWARDER' } }); // this.storeFORWARDER.load({ params: { condition: "ISBOOKING='1'"} }); //船公司 this.comboxFORWARDER2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.FORWARDER, //'订舱代理', store: this.storeFORWARDER, queryMode: 'remote', minChars: 1, queryParam: 'CODENAME', name: 'FORWARDER', valueField: 'CustName', displayField: 'CodeAndName' }); //客户加载_车队 this.storeTRUCKER = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListTRUCK' } }); // this.storeTRUCKER.load({ params: { condition: "ISTRUCK='1'"} }); //车队 this.comboxTRUCKER2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.TRUCKER, //'车队', store: this.storeTRUCKER, queryMode: 'remote', minChars: 1, queryParam: 'CODENAME', name: 'TRUCKER', valueField: 'CustName', displayField: 'CodeAndName' }); //客户加载_报关报检 //报关行 this.storeCUSTOMSER = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListCUSTOM' } }); // this.storeCUSTOMSER.load({ params: { condition: "ISCUSTOM='1'"} }); this.comboxCUSTOMSER2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.CUSTOMSER, //'报关行', store: this.storeCUSTOMSER, queryMode: 'remote', minChars: 1, queryParam: 'CODENAME', name: 'CUSTOMSER', valueField: 'CustName', displayField: 'CodeAndName' }); this.storeLANE = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.Lane', proxy: { url: '/CommMng/BasicDataRef/GetCodeLaneList' } }); this.storeLANE.load(); this.comboxLANE2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.LANE, //'航线', store: this.storeLANE, // forceSelection: true, name: 'LANE', valueField: 'LANE', displayField: 'LANE' }); //客户加载_代理 // this.storeShipper.load({ params: { condition: "ISCONTROLLER='1'"} }); //收货人 this.storeagent = Ext.create('DsExt.ux.RefTableStore', { model: 'OpSeaeShipper', proxy: { url: '/MvcShipping/MsOpSeae/GetShipperList' } }); this.storeagent.load({ params: { condition: "shippertype=4" }, callback: function (r, options, success) { if (success) { } }, scope: this }); this.comboxAgent2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.AGENTID, //'代 理', store: this.storeagent, // forceSelection: true, name: 'AGENTID', valueField: 'SHORTNAME', displayField: 'CodeAndName', listeners: { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { var selectrecords = DsStoreQueryBy(this.storeagent, 'SHORTNAME', combo.value); if (selectrecords.getCount() > 0) { var selectdata = selectrecords.getAt(0).data; this.formModify.getForm().findField('AGENT').setValue(selectdata.SHIPPERDETAIL); } else { this.formModify.getForm().findField('AGENT').setValue(''); } } } } }); this.storeCodeLoadport = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CodeLoadportModel', proxy: { url: '/CommMng/BasicDataRef/GetCodeLoadportList' } }); this.storeCodeLoadport.load(); this.comboxPORTLOAD2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.PORTLOAD, //'装货港', store: this.storeCodeLoadport, name: 'PORTLOAD', valueField: 'PORT', displayField: 'CodeAndName', listeners: { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { var selectrecords = DsStoreQueryBy(this.storeCodeLoadport, 'PORT', combo.value); if (selectrecords.getCount() > 0) { var selectdata = selectrecords.getAt(0).data; this.formModify.getForm().findField('PORTLOADID').setValue(selectdata.EDICODE); } else { this.formModify.getForm().findField('PORTLOADID').setValue(''); } } } } }); this.comboxPORTDISCHARGE2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.PORTDISCHARGE, //'卸货港', store: this.storeCodeDisport, name: 'PORTDISCHARGE', valueField: 'PORT', queryMode: 'remote', minChars: 1, queryParam: 'PORT', displayField: 'PORT', listeners: { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { var selectrecords = DsStoreQueryBy(this.storeCodeDisport, 'PORT', combo.value); if (selectrecords.getCount() > 0) { var selectdata = selectrecords.getAt(0).data; this.formModify.getForm().findField('PORTDISCHARGEID').setValue(selectdata.EDICODE); } else { this.formModify.getForm().findField('PORTDISCHARGEID').setValue(''); } } } } }); this.storeVoyVeg = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.VesselModel', proxy: { url: '/CommMng/BasicDataRef/GetVesselList' } }); this.storeVoyVeg.load(); this.comboxVoyVeg2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.VESSEL, //'船 名', store: this.storeVoyVeg, name: 'VESSEL', valueField: 'VESSEL', flex: 1.5, displayField: 'VESSEL' }); this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefList' } }); this.storeOpCode.load(); this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.SALE, //'揽货人', store: this.storeOpCode, name: 'SALE', valueField: 'UserName', displayField: 'CodeAndName' }); //业务来源 this.storeSource = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.SourceModel', proxy: { url: '/CommMng/BasicDataRef/GetSource' } }); this.storeSource.load(); this.comboxBSSOURCE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.BSSOURCE, //'业务来源', store: this.storeSource, // forceSelection: true, name: 'BSSOURCE', valueField: 'SourceName', displayField: 'SourceName' }); this.StoreBLTYPE = Ext.create('DsExt.ux.RefTableStore', { model: 'DsExtEnumModel', proxy: { url: '/CommMng/PubSys/GetEnumValueList' } }); this.StoreBLTYPE.load({ params: { enumTypeId: 97042 } }); this.comboxBLTYPE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.BLTYPE, //'装运方式', store: this.StoreBLTYPE, name: 'BLTYPE', valueField: 'EnumValueName', displayField: 'EnumValueName' }); this.comboxCUSTSERVICE2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.CUSTSERVICE, //'客服', store: this.storeOpCode, forceSelection: true, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', name: 'CUSTSERVICE', //labelWidth: 45, //flex: 0.6, valueField: 'UserName', displayField: 'CodeAndName' }); this.comboxDOC2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.DOC, //'客服', store: this.storeSaleCode, forceSelection: true, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', name: 'DOC', //labelWidth: 45, //flex: 0.6, valueField: 'UserName', displayField: 'CodeAndName' }); this.comboxFRCUSTSERVICE2 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.FRCUSTSERVICE, //'客服', store: this.storeOpCode, forceSelection: true, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', name: 'FRCUSTSERVICE', //labelWidth: 45, //flex: 0.6, valueField: 'UserName', displayField: 'CodeAndName' }); this.storeOpCode3 = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); //操 作 this.comboxOP3 = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.OP, //'操 作', store: this.storeOpCode3, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', // labelWidth: 30, forceSelection: true, name: 'OP', valueField: 'UserName', displayField: 'CodeAndName', enableKeyEvents: true }); //客户加载_船代 this.storeSHIPAGENCY = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListSHIPAGENCY' } }); //船代 this.comboxSHIPAGENCY = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.SHIPAGENCY, //'船代', store: this.storeSHIPAGENCY, forceSelection: true, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', name: 'SHIPAGENCY', valueField: 'CustName', displayField: 'CodeAndName' }); //客户加载_委托单位 this.storeCustCodeM = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' } }); // this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} }); // this.storeCustCode.loadData(mainWin.GetPubStore("OPSEAE_CUST_ISCONTROLLER").data.items); //委托单位 this.comboxCustCodeM = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.CUSTOMERNAME, //'委托单位', store: this.storeCustCodeM, queryMode: 'remote', matchFieldWidth: false, minChars: 1, queryParam: 'CODENAME', name: 'CUSTOMERNAME', valueField: 'CustName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _thisfenlist.onRefreshClick(); } } //, //'beforequery': function (e) { // return FilterCombox(e,2);//在beforequery使用此方法 //} , specialkey: function (field, e) { //if (e.getKey() == e.ENTER) { // e.keyCode = 9; //} if (e.keyCode == 9) { if (field.value == null) { _rec = _thisfenlist.storeCustCode.getAt(0); _thisfenlist.formModify.getForm().findField('CUSTOMERNAME').setValue(_rec.data.CustName); } } } } }); //所属部门 this.storeDept = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.DeptModel', proxy: { url: '/CommMng/BasicDataRef/GetDeptList' } }); this.storeDept.load(); this.comboxDept = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.SALEDEPT2, //'所属部门', store: this.storeDept, //flex: 0.5, //labelWidth: 55, forceSelection: true, name: 'SALEDEPT', valueField: 'DeptName', displayField: 'DeptName' //,hidden: true }); this.storeCodeDisportM = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CodeDisportModel', proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' } }); this.comboxDESTINATIONm = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.DESTINATION, //'卸货港', store: this.storeCodeDisportM, name: 'DESTINATION', valueField: 'PORT', queryMode: 'remote', minChars: 1, queryParam: 'PORT', displayField: 'PORT', listeners: { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { var selectrecords = DsStoreQueryBy(this.storeCodeDisportM, 'PORT', combo.value); if (selectrecords.getCount() > 0) { var selectdata = selectrecords.getAt(0).data; this.formModify.getForm().findField('DESTINATIONID').setValue(selectdata.EDICODE); } else { this.formModify.getForm().findField('DESTINATIONID').setValue(''); } } } } }); this.storeCodeDisport3 = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CodeDisportModel', proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' } }); this.comboxPLACEDELIVERY = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.PLACEDELIVERY, //'卸货港', store: this.storeCodeDisport3, name: 'PLACEDELIVERY', valueField: 'PORT', queryMode: 'remote', minChars: 1, queryParam: 'PORT', displayField: 'PORT', listeners: { scope: this, 'select': function (combo, records, eOpts) { if (records.length > 0) { var selectrecords = DsStoreQueryBy(this.storeCodeDisport3, 'PORT', combo.value); if (selectrecords.getCount() > 0) { var selectdata = selectrecords.getAt(0).data; this.formModify.getForm().findField('PLACEDELIVERYID').setValue(selectdata.EDICODE); } else { this.formModify.getForm().findField('PLACEDELIVERYID').setValue(''); } } } } }); this.storeSourceDetail = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.SourceDetailModel', proxy: { url: '/CommMng/BasicDataRef/GetSourceDetail2' } }); this.storeSourceDetail.load(); this.comboxBSSOURCEDETAIL = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.BSSOURCEDETAIL, //'来源明细', store: this.storeSourceDetail, // forceSelection: true, name: 'BSSOURCEDETAIL', valueField: 'SourceDetail', displayField: 'SourceDetail' }); this.formModify = Ext.widget('form', { region: 'north', frame: true, bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 60, msgTarget: 'qtip' }, items: [ {//fieldset 1 xtype: 'fieldset', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxYARD2, this.comboxCARRIER2, this.comboxFORWARDER2, this.comboxLANE2 ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: Zi.LAN.HBLNO, //'航次', flex: 1, name: 'HBLNO' }, this.comboxSALE, this.comboxCUSTOMSER2, this.comboxTRUCKER2 ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxPORTLOAD2, { fieldLabel: Zi.LAN.PORTLOADID, //'装港代码', name: 'PORTLOADID' }, this.comboxPORTDISCHARGE2, { fieldLabel: Zi.LAN.PORTDISCHARGEID, //'卸港代码', name: 'PORTDISCHARGEID' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxVoyVeg2, { fieldLabel: Zi.LAN.VOYNO, //'航次', flex: 1, name: 'VOYNO' }, { fieldLabel: Zi.LAN.VESSELID, //'船舶呼号', flex: 0.5, name: 'VESSELID' }, { fieldLabel: Zi.LAN.ETD2, //'开船日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'ETD' }] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxAgent2, this.comboxBLTYPE, this.comboxDOC2, { fieldLabel: Zi.LAN.CLOSINGDATE, //'截港日期', format: 'Y-m-d', flex: 1, xtype: 'datetimefield', name: 'CLOSINGDATE', listeners: { scope: this, 'select': function (combo, mdate) { var mydate = new Date(mdate); var mydatestr = Ext.util.Format.date(mydate, 'Y-m-d 12:00:00'); combo.setValue(mydatestr); } } } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: Zi.LAN.CONTRACTNO, //'航次', flex: 1, labelWidth: 70, name: 'CONTRACTNO' }, { fieldLabel: Zi.LAN.SERVICECONTRACTNO, //'航次', flex: 1, labelWidth: 70, name: 'SERVICECONTRACTNO' }, this.comboxCUSTSERVICE2, { fieldLabel: Zi.LAN.CLOSEDOCDATE, //'截港日期', format: 'Y-m-d', flex: 1, xtype: 'datetimefield', name: 'CLOSEDOCDATE', listeners: { scope: this, 'select': function (combo, mdate) { var mydate = new Date(mdate); var mydatestr = Ext.util.Format.date(mydate, 'Y-m-d 12:00:00'); combo.setValue(mydatestr); } } } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxBSSOURCE, this.comboxSHIPAGENCY, this.comboxFRCUSTSERVICE2, this.comboxOP3 ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxDESTINATIONm, { fieldLabel: Zi.LAN.DESTINATIONID, //'卸港代码', name: 'DESTINATIONID' }, { fieldLabel: Zi.LAN.ATD, //'开船日期', format: 'Y-m-d', flex: 1, xtype: 'datefield', name: 'ATD' }, { fieldLabel: Zi.LAN.HSCODE, //'船舶呼号', name: 'HSCODE' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxPLACEDELIVERY, { fieldLabel: Zi.LAN.PLACEDELIVERYID, //'卸港代码', labelWidth: 80, name: 'PLACEDELIVERYID' }, this.comboxBSSOURCEDETAIL, { xtype: 'hiddenfield' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ xtype: 'textareafield', grow: true, flex: 1, fieldLabel: Zi.LAN.AGENT, //'AGENT', height: 60, name: 'AGENT', anchor: '100%' }, {//fieldset 1 xtype: 'fieldset', defaultType: 'textfield', flex: 1.5, layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxCustCodeM, { fieldLabel: Zi.LAN.ORDERNO, //'订舱编号', name: 'ORDERNO' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: Zi.LAN.ACCDATE, //'会计期间', xtype: 'monthfield', name: 'ACCDATE' }, this.comboxDept ] }] } ] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); //end this.formEdit me = this; this.winModifyShow = Ext.create('Ext.window.Window', { title: Zi.LAN.PiLianXiuGai, //"批量修改", width: 820, //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: Zi.LAN.QueRenXiuGai, //"确认修改", minWidth: 70, handler: function () { me.onModifyClick() } }, { text: Zi.LAN.btnreset, //"确认修改", minWidth: 70, iconCls: "btnreset", handler: function () { var form = me.formModify.getForm(); form.reset(); } }, { text: Zi.LAN.GuanBi, //"关闭", minWidth: 70, handler: function () { me.winModifyShow.close(); } }] }); //签单方式 this.storeISSUETYPE = Ext.create('DsExt.ux.RefTableStore', { model: 'CODE_BLTYPE', proxy: { url: '/CommMng/BasicDataRef/GetCodeBLTYPEList' } }); this.storeISSUETYPE.load({ params: { condition: "" } }); this.comboxISSUETYPE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: Zi.LAN.ISSUETYPE, //'签单方式', store: this.storeISSUETYPE, forceSelection: true, name: 'ISSUETYPE', valueField: 'BLTYPE', displayField: 'BLTYPE' }); this.formModifyIssue = Ext.widget('form', { region: 'north', frame: true, bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 60, msgTarget: 'qtip' }, items: [ {//fieldset 1 xtype: 'fieldset', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxISSUETYPE ] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); //end this.formEdit me = this; this.winModifyIssueShow = Ext.create('Ext.window.Window', { title: Zi.LAN.winModifyIssueShow, //"批量修改", width: 220, //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.formModifyIssue], buttons: [{ text: Zi.LAN.QueRenXiuGai, //"确认修改", minWidth: 70, handler: function () { me.onModifyIssueClick() } }, { text: Zi.LAN.GuanBi, //"关闭", minWidth: 70, handler: function () { me.winModifyIssueShow.close(); } }] }); //#endregion //#region Cargo Smart 中远(客户乾景) this.CheckBillCargoSmartEDI = new Ext.form.Checkbox({ fieldLabel: Zi.LAN.isHuoDaiTiDan, //'货代提单', checked: false }); this.formCargoSmartEDIShow = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 90, msgTarget: 'qtip' }, items: [{ xtype: 'container', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ xtype: 'radiogroup', fieldLabel: Zi.LAN.rFILETYPE, //'报文类型', id: 'CargoSmartFILETYPE', defaults: { flex: 1 }, layout: 'hbox', items: [{ boxLabel: Zi.LAN.FILETYPE_B, //'订舱', name: 'FILETYPE', checked: true, inputValue: 'B' } , { boxLabel: Zi.LAN.FILETYPE_E, //'确认', name: 'FILETYPE', inputValue: 'E' } ] }] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.CheckBillCargoSmartEDI, { fieldLabel: '销售代码', //'发票号', id: 'CargoSmartSALEID', name: 'SALEID' }] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ xtype: 'radiogroup', fieldLabel: Zi.LAN.rFILEROLE, //'文件功能', id: 'CargoSmartFILEROLE', defaults: { flex: 1 }, layout: 'hbox', items: [{ boxLabel: Zi.LAN.FILEROLE_YS, //'原始', name: 'FILEROLE', inputValue: 'NEW', checked: true }, { boxLabel: Zi.LAN.FILEROLE_GX, //'更新', name: 'FILEROLE', inputValue: 'UPD' }, { boxLabel: Zi.LAN.FILEROLE_SC, //'删除', name: 'FILEROLE', inputValue: 'CAN' }] }] } , { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ xtype: 'radiogroup', fieldLabel: Zi.LAN.CARRIER, //'船公司', columns: 2, vertical: true, id: 'CargoSmartCARRIER', items: [{ boxLabel: Zi.LAN.CARRIER_COSU, //'中远COSCO', name: 'CARRIER', inputValue: 'COSU', checked: true }] }] } ]//end items(fieldset 1) }]//end root items }); mefen = this; this.winCargoSmartEDIShow = Ext.create('Ext.window.Window', { title: Zi.LAN.winCargoSmartEDIShow, //"生成Cargo Smart报文", width: 450, //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.formCargoSmartEDIShow], buttons: [{ text: Zi.LAN.ShangChuanEdi, //"上传EDI", minWidth: 70, handler: function () { var cgFILETYPE = Ext.getCmp('CargoSmartFILETYPE'); var FILETYPE = cgFILETYPE.getValue(); var cgFILEROLE = Ext.getCmp('CargoSmartFILEROLE'); var FILEROLE = cgFILEROLE.getValue(); var CARRIER = Ext.getCmp('CargoSmartCARRIER').getValue(); var SALEID = Ext.getCmp('CargoSmartSALEID').getValue(); var IsBill = 0; if (mefen.CheckBillCargoSmartEDI.checked) IsBill = 1; mefen.onSendCargoSmartEDI(FILETYPE.FILETYPE, FILEROLE.FILEROLE, IsBill, CARRIER.CARRIER, SALEID); saveQuerySetting(mefen.formname + 'CargoSmartEDI', mefen.formCargoSmartEDIShow, false, true); } }, { text: Zi.LAN.BaoCunEdiWenJian, //"保存EDI文件", minWidth: 70, handler: function () { var cgFILETYPE = Ext.getCmp('CargoSmartFILETYPE'); var FILETYPE = cgFILETYPE.getValue(); var cgFILEROLE = Ext.getCmp('CargoSmartFILEROLE'); var FILEROLE = cgFILEROLE.getValue(); var CARRIER = Ext.getCmp('CargoSmartCARRIER').getValue(); var SALEID = Ext.getCmp('CargoSmartSALEID').getValue(); var IsBill = 0; if (mefen.CheckBillCargoSmartEDI.checked) IsBill = 1; mefen.onSaveCargoSmartEDI(FILETYPE.FILETYPE, FILEROLE.FILEROLE, IsBill, CARRIER.CARRIER, SALEID); saveQuerySetting(mefen.formname + 'CargoSmartEDI', mefen.formCargoSmartEDIShow, false, true); } }, { text: Zi.LAN.GuanBi, //"关闭", minWidth: 70, handler: function () { mefen.winCargoSmartEDIShow.close(); } }] }); //#endregion }, //end initUIComponents onRefreshClick: function (button, event) { //var girdcolums = this.gridList.getColumnMode(); var sql = "BSNO<>'" + this.BsNo + "' and MASTERNO='" + this.BsNo + "'"; this.PageSize = this.Pagenum.getValue(); this.storeList.pageSize = this.PageSize; this.storeList.currentPage = 1; this.storeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql }, waitMsg: "正在查询数据...", scope: this }); }, onDeleteClick: function (button, event) { var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var record = selections[0]; if (record.data.BSSTATUS == 'true') { Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.YeWuYiSuoDingBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); return; } if (record.data.FEESTATUS == 'true') { Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FeiYongYiSuoDingBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); return; } if (this.StoreOpRange.getCount() == 0) { Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.QuanXianBuZuBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); return; } else { var op = record.data.OP; var inputby = record.data.INPUTBY; var records = DsStoreQueryBy(this.StoreOpRange, 'OPID', op); if (records.getCount() > 0) { } else { var recordins = DsStoreQueryBy(this.StoreOpRange, 'OPID', inputby); if (recordins.getCount() > 0) { } else { canedit = false; Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.QuanXianBuZuBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); return; } } } Ext.MessageBox.confirm(Zi.LAN.TiShi, Zi.LAN.QueDingShanChuGaiJiLuMa, function (btn) {//'确定删除该记录吗?' if (btn == 'yes') { Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, url: '/MvcShipping/MsOpSeae/Delete', params: { data: Ext.JSON.encode(record.data) }, callback: function (options, success, response) { if (success) { var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { this.storeList.remove(record); Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } else { Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } }, failure: function (response, options) { Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } }, this); }, OprationSwap: function () { var ret = new Array(); ret[0] = this.OprationStatus; ret[1] = this.storeList; ret[2] = this.SelectedRecord; ret[3] = this.EditRecord; ret[4] = this.mainWin; return ret; }, //#region 批量修改窗体 onModifyClick: function (menu, event) { var GidStr = ''; var records = this.GridCheckBoxFenModel.selected.items; if (records.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要修改的业务! return; } var bodyAddDatas = []; for (var i = 0; i < records.length; i++) { var rec = records[i]; if (rec.data.BSSTATUS == 'true') { Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.YeWuYiSuoDingBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); } else { var op = rec.data.OP; var inputby = rec.data.INPUTBY; //var rangeUser = [op, inputby, doc, orderop, custservice] //canedit = DsStoreExistsList(_this.StoreOpRange, 'OPID', rangeUser) var mrecords = DsStoreQueryBy(this.StoreOpRange, 'OPID', op); if (mrecords.getCount() > 0) { rec.data.SHIPPER = ''; rec.data.CONSIGNEE = ''; rec.data.NOTIFYPARTY = ''; rec.data.MARKS = ''; rec.data.DESCRIPTION = ''; bodyAddDatas.push(rec); } else { var recordins = DsStoreQueryBy(this.StoreOpRange, 'OPID', inputby); if (recordins.getCount() > 0) { rec.data.SHIPPER = ''; rec.data.CONSIGNEE = ''; rec.data.NOTIFYPARTY = ''; rec.data.MARKS = ''; rec.data.DESCRIPTION = ''; bodyAddDatas.push(rec); } else { canedit = false; Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.QuanXianBuZuBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); } } } } var data = this.formModify.getForm().getValues(); _thisfenlist = this; if (bodyAddDatas.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouYaoXiuGaiDeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, url: '/MvcShipping/MsOpSeae/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: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); _thisfenlist.storeList.reload(); _thisfenlist.winModifyShow.close(); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, //#endregion //#region 舱单 AFR onCreateAfrClick: function (menu, event, type) { var GidStr = ''; var selections = this.GridCheckBoxFenModel.selected.items; if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务! return; } var BSNOStr = ''; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; var BSNO = rec.data.BSNO; if (BSNOStr == '') BSNOStr = BSNO; else { BSNOStr = BSNOStr + ',' + BSNO; } } if (BSNOStr == '') { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouYaoCaoZuoDeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, url: '/MvcShipping/MsOpSeae/CreateAfrList', params: { BSNOS: BSNOStr, type: type }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, onCreateAfrZFClick: function (menu, event, type) { var GidStr = ''; var selections = this.GridCheckBoxFenModel.selected.items; if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务! return; } var BSNOStr = ''; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; var BSNO = rec.data.BSNO; if (BSNOStr == '') BSNOStr = BSNO; else { BSNOStr = BSNOStr + ',' + BSNO; } } if (BSNOStr == '') { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouYaoCaoZuoDeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, url: '/MvcShipping/MsOpSeaeEdi/AFREditSend', params: { BSNOS: BSNOStr, type: type }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, onCreateAfrCSZFClick: function (menu, event, type) { var GidStr = ''; var selections = this.GridCheckBoxFenModel.selected.items; if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务! return; } var BSNOStr = ''; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; var BSNO = rec.data.BSNO; if (BSNOStr == '') BSNOStr = BSNO; else { BSNOStr = BSNOStr + ',' + BSNO; } } if (BSNOStr == '') { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouYaoCaoZuoDeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { var formCargosmartAFRShow = 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: [{ xtype: 'radiogroup', fieldLabel: Zi.LAN.rFILEROLE, //'文件功能', id: 'cmAFRFILEROLE', defaults: { flex: 1 }, layout: 'hbox', items: [ { boxLabel: Zi.LAN.FILEROLE_YS, //'原始', name: 'FILEROLE', inputValue: '9', checked: true //,id: 'radio3' }, { boxLabel: Zi.LAN.FILEROLE_GX, //'更新', name: 'FILEROLE', inputValue: '4' //,id: 'radio6' } ] } ] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); var winCargosmartAFREDIShow = Ext.create('Ext.window.Window', { title: Zi.LAN.winEDIShow, //"生成EDI", width: 450, //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: [formCargosmartAFRShow], buttons: [{ text: Zi.LAN.ShangChuanEdi, //"上传EDI", minWidth: 70, handler: function () { var cmAFRFILEROLE = Ext.getCmp('cmAFRFILEROLE'); var FILEROLE = cmAFRFILEROLE.getValue(); Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, url: '/MvcShipping/MsOpSeaeEdi/AFREditSend', params: { BSNOS: BSNOStr, type: type, filerole: FILEROLE }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, { text: Zi.LAN.BaoCunEdiWenJian, //"保存EDI文件", minWidth: 70, handler: function () { var cmAFRFILEROLE = Ext.getCmp('cmAFRFILEROLE'); var FILEROLE = cmAFRFILEROLE.getValue(); Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, url: '/MvcShipping/MsOpSeaeEdi/AFREditSaveFile', params: { BSNOS: BSNOStr, type: type, filerole: FILEROLE }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } else { var downloadfile = Ext.getCmp('downloadfile'); var children = downloadfile.items; if (children) { for (var i = 0, len = children.length; i < len; i++) { downloadfile.remove(children.items[i], true); } } // downloadfile.doLayout(); // // var downloadfile = Ext.getCmp('downloadfile'); // var filehtml = '' + result.Message + '' // downloadfile.html = filehtml; var downloadfiles = '' + result.Message + ''; var htmla = Ext.widget('label', { html: downloadfiles, width: 120, text: '' }); downloadfile.items.add(htmla); _this.winDownloadShow.show(); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, { text: Zi.LAN.GuanBi, //"关闭", minWidth: 70, handler: function () { winCargosmartAFREDIShow.close(); } }] }); winCargosmartAFREDIShow.show(); } }, onCreateCustomClick: function (menu, event, type) { var GidStr = ''; var selections = this.GridCheckBoxFenModel.selected.items; if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务! return; } var BSNOStr = ''; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; var BSNO = rec.data.BSNO; if (BSNOStr == '') BSNOStr = BSNO; else { BSNOStr = BSNOStr + ',' + BSNO; } } if (BSNOStr == '') { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouYaoCaoZuoDeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, url: '/MvcShipping/MsOpSeae/CreateCustomList', params: { BSNOS: BSNOStr, type: type }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, //#endregion //#region Cargo Smart 中远(客户乾景) onCreateCargoSmartEDIClick: function (menu, event) { this.winCargoSmartEDIShow.show(); }, onSendCargoSmartEDI: function (filetype, filerole, isbill, carrier, saleid) { var GidStr = ''; var selections = this.GridCheckBoxFenModel.selected.items; if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var BSNOStr = ''; var j = 0; var Mblno = ''; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; Mblno = rec.data.MBLNO; var BSNO = rec.data.BSNO; if (BSNOStr == '') BSNOStr = BSNO; else { BSNOStr = BSNOStr + ',' + BSNO; } } if (BSNOStr == '') { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouYaoCaoZuoDeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, url: '/MvcShipping/MsOpSeae/CreateCargoSmartEDIList', params: { bsnos: BSNOStr, mblno: Mblno, filetype: filetype, filerole: filerole, isbill: isbill, carrier: carrier, saleid: saleid }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } else { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } }, onSaveCargoSmartEDI: function (filetype, filerole, isbill, carrier, saleid) { var GidStr = ''; var selections = this.GridCheckBoxFenModel.selected.items; if (selections.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var BSNOStr = ''; var j = 0; var Mblno = ''; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; Mblno = rec.data.MBLNO; var BSNO = rec.data.BSNO; if (BSNOStr == '') BSNOStr = BSNO; else { BSNOStr = BSNOStr + ',' + BSNO; } } if (BSNOStr == '') { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouYaoCaoZuoDeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { Ext.Ajax.request({ waitMsg: Zi.LAN.Changing, url: '/MvcShipping/MsOpSeae/SaveCargoSmartEDIList', params: { bsnos: BSNOStr, mblno: Mblno, filetype: filetype, filerole: filerole, isbill: isbill, carrier: carrier, saleid: saleid }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); return; } else { var downloadfile = Ext.getCmp('downloadfile'); var children = downloadfile.items; if (children) { for (var i = 0, len = children.length; i < len; i++) { downloadfile.remove(children.items[i], true); } } var downloadfiles = '' + result.Message + ''; var htmla = Ext.widget('label', { html: downloadfiles, width: 120, text: '' }); downloadfile.items.add(htmla); this.winDownloadShow.show(); } } else { Ext.MessageBox.alert('The Server Response Error, Please Try Again', response.responseText); } }, scope: this }); } }, //#endregion //#region 打印 Print: function () { _thisfenlist = this; if (this.storeList.getCount() == 0) { return; } var sql = "BSNO<>'" + this.BsNo + "' and MASTERNO='" + this.BsNo + "'"; var bsno = '11111'; var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length != 0) { var record = selections[0]; bsno = record.data.BSNO; } var sortstr = 'ETD,MBLNO '; if (this.sortfield != '' && this.sortdire != '') { sortstr = this.sortfield + ' ' + this.sortdire; } Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); Ext.Ajax.request({ waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, url: '/MvcShipping/MsOpSeae/GetFenListStr', scope: this, params: { condition: sql, printstr: 'true', sort: sortstr }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var returnstr = jsonresult.data; var condition = sql; if (condition != '') condition = ' where ' + condition; var printType = 'MSOPSEAELIST'; var sql1 = returnstr; var sql2 = "select * from op_seae where BSNO='" + bsno + "'"; var sql3 = "select CUSTOMERNAME,COUNT(BSNO) BLCOUNT,SUM(TEU) TEU from op_seae B " + condition + " group by CUSTOMERNAME"; var sql4 = "select CARRIER,COUNT(BSNO) BLCOUNT,SUM(TEU) TEU from op_seae B " + condition + " group by CARRIER"; var sql5 = "select OP,COUNT(BSNO) BLCOUNT,SUM(TEU) TEU from op_seae B " + condition + " group by OP"; var sql6 = "select COUNT(BSNO) BLCOUNT,SUM(TEU) TEU from op_seae B " + condition; PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6); } else { Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } else { Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } }); }, PrintSelect: function () { _thisfenlist = this; if (this.storeList.getCount() == 0) { return; } var selectedRecords = []; var storeadd = null; selectedRecords = this.GridCheckBoxFenModel.selected.items; if (selectedRecords.length == 0) { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var sortstr = 'MBLNO desc'; if (this.sortfield != '' && this.sortdire != '') { sortstr = this.sortfield + ' ' + this.sortdire; } var feeGidSql = ''; for (var i = 0; i < selectedRecords.length; i++) { var record = selectedRecords[i]; var feeGId = "'" + record.get('BSNO') + "'"; if (feeGidSql == '') { feeGidSql = feeGId; } else { feeGidSql = feeGidSql + "," + feeGId; } }; var bsno = '11111'; var mblno = ''; var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length != 0) { var record = selections[0]; bsno = record.data.BSNO; mblno = record.data.MBLNO; } var printType = 'MSOPSEAELISTSELECT'; var sql1 = "select *,(SELECT TOP 1 STATUS FROM OP_STATUS WHERE BSNO=op_seae.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS from op_seae WHERE BSNO IN (" + feeGidSql + ") order by " + sortstr; var sql2 = "select *,(SELECT TOP 1 STATUS FROM OP_STATUS WHERE BSNO=op_seae.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS from op_seae where BSNO='" + bsno + "'"; var sql3 = ""; var sql4 = ""; var sql5 = ""; var sql6 = ""; PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6, mblno); } //#endregion });