//集运管理-路单查询 Ext.namespace('Shipping'); Shipping.MsOp_BLISSUEIndex = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.MsOp_BLISSUEIndex.superclass.constructor.call(this); }; Date.prototype.format = function (format) { var o = { "M+": this.getMonth() + 1, //month "d+": this.getDate(), //day "h+": this.getHours(), //hour "m+": this.getMinutes(), //minute "s+": this.getSeconds(), //second "q+": Math.floor((this.getMonth() + 3) / 3), //quarter "S": this.getMilliseconds() //millisecond } if (/(y+)/.test(format)) format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); for (var k in o) if (new RegExp("(" + k + ")").test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)); return format; } var xhr = new XMLHttpRequest(); var currdate = new Date(); if (!xhr) { //...其他生成xmlhttprequest方法 } xhr.open("HEAD", location.href, true); xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 200) { var datestr = xhr.getResponseHeader("Date"); currdate = new Date(datestr); // alert(currdate.format('yyyy-MM-dd')); } } xhr.send(null); var _CUSTOMERNAME = ''; var _SALE = ''; Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { PageSize: 50, OprationStatus: null, //仅当弹出界面时使用 SelectedRecord: null, QCLIST: [], sqlcontext: '1=2', initUIComponents: function () { this.formname = "MsOp_BLISSUEIndex"; this.BSNO = '1=2'; this.sqlcontext = '1=2'; this.logsql = '1=2'; this.QCMUSTQR = 0; this.QCMUSTFDTZ = 0; Ext.define('Tradermb', { extend: 'Ext.data.Model', idProperty: 'gid', fields: [ { name: 'gid', type: 'string' }, { name: 'name', type: 'string' }, { name: 'codename', type: 'string' } ] }); _this = this; Ext.Ajax.timeout = 120000; //#region 定义数据集 //客户加载_委托单位 this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' } }); // this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} }); //委托单位 this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '委托单位', store: this.storeCustCode, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', name: 'CUSTOMERNAME', valueField: 'CustName', displayField: 'CodeAndName' //,allowBlank: false }); //#endregion ///////////////////////////////////////// //#region 主列表 this.storeList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, model: 'MsOp_BLISSUEmb', remoteSort: true, //groupField: 'GroupDate', proxy: { type: 'ajax', timeout: 120000, //url: '/TruckMng/MsRptPcHeadOperate/QryData_ADL', url: '/MvcShipping/MsOp_BLISSUE/GetDataList', //this.storeList.proxy.url = '/TruckMng/MsRptPcHeadOperate/QryData_ADL'; reader: { id: '', root: 'data', totalProperty: 'totalCount' } } }); this.column = [ { sortable: true, hidden: true, dataIndex: 'GID', style: 'text-align:center;', align: 'left', header: 'GID', width: 80 }, { sortable: true, hidden: true, dataIndex: 'BSNO', style: 'text-align:center;', align: 'left', header: 'BSNO', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'OPLBNAME', header: '业务类型', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'BLNO', header: '主提单号', width: 130 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'HBLNO', header: '分提单号', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'BLTYPE', header: '装运方式', width: 80 }, { sortable: true, dataIndex: 'ZDFD', style: 'text-align:center;', align: 'left', header: '主/分单', width: 80 }, { sortable: true, hidden: true, dataIndex: 'BLNAME', style: 'text-align:center;', align: 'left', header: 'BLNAME', width: 80 }, { sortable: true, //hidden: true, dataIndex: 'BLSTATUS', style: 'text-align:center;', align: 'left', header: '提单签发状态', width: 80, renderer: function (value, meta) { if (value == '提单签出') { meta.tdCls = 'feestatus_pass'; } else if (value == '录入状态') { } else if (value == '提单签入') { meta.tdCls = 'feestatus_refer'; } else if (value == '扣单') { meta.tdCls = 'feestatus_nopass'; } else if (value == '放单通知') { meta.tdCls = 'feestatus_refer'; } return value; } }, { sortable: true, hidden: true, dataIndex: 'BLORDERNO', style: 'text-align:center;', align: 'left', header: 'BLORDERNO', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'ISSUETYPE', header: '签单方式', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'OPNAME', header: '最近操作人', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'OPTIME', header: '操作时间', width: 140 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'BSINKNO', header: 'BSINKNO', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'REMARK', header: '备注', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'DELFLAG', header: 'DELFLAG', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'EXPRESSCORP', header: 'EXPRESSCORP', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'EXPRESSNO', header: 'EXPRESSNO', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'ISADD', header: 'ISADD', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'PUTSINGLETIME', header: 'PUTSINGLETIME', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'PUTSINGLE', header: 'PUTSINGLE', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'PAYTIME', header: 'PAYTIME', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'PAYRMB', header: 'PAYRMB', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'PAYUSD', header: 'PAYUSD', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'CUSTNO', header: '委托编号', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'CUSTOMERNAME', header: '委托单位', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'SALE', header: '销售', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'ACCTYPE', header: '结算方式', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'ETD', header: '开船日期', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'STLDATE', header: '结算日期', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'CARRIER', header: '船公司', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'VESSEL', header: '船名', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'VOYNO', header: '航次', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'PORTLOAD', header: '起运港', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'PORTDISCHARGE', header: '卸货港', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'OP', header: '操作', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'CUSTSERVICE', header: '客服', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'DOC', header: '单证', width: 80 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'BLISSUESTATUS', header: '提单签发状态', width: 80 }, { dataIndex: 'ISSUEPLACE', header:'签单地点', //'货物标识', width: 70 }, { dataIndex: 'ISVESSELPROVE', header: '船证', //'推航次', width: 70, renderer: function (value, meta, record) { if (value == '1') return '签入'; else if (value == '2') return '签出'; } }, { dataIndex: 'ISGAIQIAN', header: '是否改签', //'推航次', width: 70, renderer: function (value, meta, record) { if (value == '1') return '√'; } }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'TSFD', header: '特殊放单', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'SPREMARK', header: '特殊放单审批意见', width: 120 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'MNGBLSTATUS', header: '经理复核', width: 120 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'CUSTCARGOAFTER', header: '后边是否有货', width: 120 }, { sortable: true, style: 'text-align:center;', align: 'left', dataIndex: 'ISCHAOQI', header: '是否超期欠费', width: 120 }, { dataIndex: 'VESSELPROVEREMARK', header: '船证备注', //'推航次', width: 70 }, { dataIndex: 'QRDATE', header: '签入日期', //'推航次', width: 70 }, { dataIndex: 'QCDATE', header: '签出日期', //'推航次', width: 70 }, { sortable: true, style: 'text-align:center;', align: 'right', dataIndex: 'XYTS', header: '协议天数', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'right', dataIndex: 'CQTS', header: '超期天数', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'right', dataIndex: 'SJTS', header: '实际天数', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'right', dataIndex: 'TTLDR', header: '总应收', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'right', dataIndex: 'USDNODR', header: 'USD未收', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'right', dataIndex: 'RMBNODR', header: 'RMB未收', width: 80 }, { sortable: true, style: 'text-align:center;', align: 'right', dataIndex: 'TTLNODR', header: '未收合计', width: 80 } ]; /* this.cellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 });*/ this.MainCB = Ext.create('Ext.selection.CheckboxModel' , { checkOnly: false , singleSelect: true , listeners: { click: { element: 'el', //bind to the underlying el property on the panel fn: function () { gridList.getSelectionModel().clearSelections(); } } } }); Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, { width: 40 }); this.gridList = new Ext.grid.GridPanel({ store: this.storeList, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, selModel: this.MainCB, columns: this.column, plugins: [ //this.cellEditing ], /*features: [{ id: 'group', ftype: 'grouping', groupHeaderTpl: '{name}', hideGroupedHeader: true, enableGroupingMenu: true }],*/ viewConfig: { enableTextSelection: true, //允许复制数据 autoFill: true, getRowClass: function (record, rowIndex, rowParams, store) { var TTLNODR = record.get('TTLNODR'); var TTLDR = record.get('TTLDR'); if (TTLNODR == '0.00' && TTLDR!='0.00') return 'feestatus_pass'; } }, bbar: Ext.create('Ext.PagingToolbar', { store: this.storeList, displayInfo: true, displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: "没有数据" }) }); /////////////以下部分为获取存储的gridpanel显示样式 this.column = DsTruck.GetGridPanel(USERID, this.formname, this.column); //使用者id,表名 ,中间column数组 this.column.unshift(new Ext.grid.RowNumberer()); this.gridList.reconfigure(this.storeList, this.column); //////////////////////////// //#endregion //#region 日志表 this.storeLog = Ext.create('Ext.data.Store', { pageSize: this.PageSize, model: 'DsShipping.ux.WorkLogmb', remoteSort: true, //groupField: 'GroupDate', proxy: { type: 'ajax', //url: '/TruckMng/MsRptPcHeadOperate/QryData_ADL', url: '/OA/WorkFlow/GetWorkLog', //this.storeList.proxy.url = '/TruckMng/MsRptPcHeadOperate/QryData_ADL'; reader: { id: '', root: 'data', totalProperty: 'totalCount' } } }); this.Logcolumn = [ { sortable: true, hidden: true, dataIndex: 'GID', header: 'GID', width: 130 }, { sortable: true, hidden: true, dataIndex: 'BSNO', header: 'BSNO', width: 70, align: 'center' }, { sortable: true, dataIndex: 'OP', header: '操作人', width: 80 }, { sortable: true, dataIndex: 'OPDATE', header: '操作时间', //renderer: 'Y-m-d H:i:s', width: 90 }, { sortable: true, dataIndex: 'ACTNAME', header: '动作', width: 120 }, { sortable: true, dataIndex: 'ACTRESULT', header: '结果', width: 80 }, { sortable: true, dataIndex: 'REMARK', header: '备注', width: 200 } ]; Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, { width: 40 }); this.gridList_Log = new Ext.grid.GridPanel({ store: this.storeLog, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, //selModel: this.MainCB, columns: this.Logcolumn, //plugins: [this.cellEditing], viewConfig: { enableTextSelection: true, //允许复制数据 autoFill: true }, bbar: Ext.create('Ext.PagingToolbar', { store: this.storeLog, displayInfo: true, displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: "没有数据" }) }); this.storeLog.on('beforeload', function (store) { var sql = this.logsql; Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); //#endregion ////////////////////////////////////////////////////////////// //#region formSearch //#region formSearch枚举参照相关 //this.storeBLSTATUS = Ext.create('DsExt.ux.RefTableStore', { // model: 'DsExtEnumModel', // proxy: { url: '/CommMng/PubSys/GetEnumValueList' } //}); //this.storeBLSTATUS.load({ params: { enumTypeId: 43} }); //this.comboxBLSTATUS = Ext.create('DsExt.ux.RefTableCombox', { // fieldLabel: '提单签发状态', // store: this.storeBLSTATUS, // forceSelection: true, // name: 'BLSTATUS', // valueField: 'EnumValueName', // displayField: 'EnumValueName', // enableKeyEvents: true, // listeners: { // keyup: function (field, e) { // if (e.getKey() == e.ENTER) { // _this.onRefreshClick(); // } // } // } //}); ////客户加载_委托单位 //this.storeCustCode2 = Ext.create('DsExt.ux.RefTableStore', { // model: 'DsShipping.ux.CustomRefModel', // proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } //}); //this.storeCustCode2.load({ params: { condition: "ISCONTROLLER='1'"} }); ////委托单位 //this.comboxCustCode2 = Ext.create('DsExt.ux.RefTableCombox', { // //fieldLabel: '委托单位', // store: this.storeCustCode2, // forceSelection: true, // name: 'CUSTOMERNAME', // valueField: 'CustName', // displayField: 'CodeAndName' // //,allowBlank: false //}); this.storeF_CustCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsTruckMng.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeF_CustCode.load({ params: { condition: "ISCONTROLLER='1'"} }); this.comboxF_CustCode = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '最终客户', typeAhead: true, store: this.storeF_CustCode, name: 'F_CustName', valueField: 'CustName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.StoreOpLb = Ext.create('Ext.data.Store', { fields: ['OPLBNAME'] }); this.StoreOpLb.add({ "OPLBNAME": "海运出口" }); this.StoreOpLb.add({ "OPLBNAME": "海运进口" }); this.StoreOpLb.add({ "OPLBNAME": "综合业务" }); this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '业务类别', store: this.StoreOpLb, valueField: 'OPLBNAME', displayField: 'OPLBNAME', forceSelection: true, name: 'OPLBNAME', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.StoreOpType = Ext.create('Ext.data.Store', { fields: ['OPLBNAME'] }); this.StoreOpType.add({ "OPLBNAME": "主票" }); this.StoreOpType.add({ "OPLBNAME": "分票" }); this.StoreOpType.add({ "OPLBNAME": "" }); this.comboxOpType = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '主/分单', store: this.StoreOpType, valueField: 'OPLBNAME', displayField: 'OPLBNAME', forceSelection: true, labelWidth: 60, // flex: 0.5, name: 'OPTYPE', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.storeFSTATUS = Ext.create('Ext.data.Store', { fields: ['FSTATUS', 'NAME'] }); this.storeFSTATUS.add({ "FSTATUS": "0", "NAME": "全部" }); this.storeFSTATUS.add({ "FSTATUS": "1", "NAME": "仅未收" }); this.storeFSTATUS.add({ "FSTATUS": "2", "NAME": "仅已收" }); this.comboxFSTATUS = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '收费状态', store: this.storeFSTATUS, valueField: 'FSTATUS', displayField: 'NAME', // flex: 0.5, forceSelection: true, name: 'FSTATUS', value: '', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.storeDocCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); //操 作 this.comboxDOC = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel:'单证', //'操 作', store: this.storeDocCode, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', labelWidth: 30, //flex: 0.6, forceSelection: true, name: 'DOC', valueField: 'UserName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.storeBLSTATUS = Ext.create('Ext.data.Store', { fields: ['FSTATUS', 'NAME'] }); this.storeBLSTATUS.add({ "FSTATUS": "", "NAME": "" }); this.storeBLSTATUS.add({ "FSTATUS": "1", "NAME": "未签入" }); this.storeBLSTATUS.add({ "FSTATUS": "2", "NAME": "签入未签出" }); this.storeBLSTATUS.add({ "FSTATUS": "状态更改", "NAME": "状态更改" }); this.storeBLSTATUS.add({ "FSTATUS": "放单通知", "NAME": "放单通知" }); this.storeBLSTATUS.add({ "FSTATUS": "更改提单", "NAME": "更改提单" }); this.storeBLSTATUS.add({ "FSTATUS": "提单签出", "NAME": "提单签出" }); this.storeBLSTATUS.add({ "FSTATUS": "提单签入", "NAME": "提单签入" }); this.storeBLSTATUS.add({ "FSTATUS": "扣单", "NAME": "扣单" }); this.storeBLSTATUS.add({ "FSTATUS": "未签出", "NAME": "未签出" }); this.comboxBLSTATUS = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '提单状态', store: this.storeBLSTATUS, valueField: 'FSTATUS', displayField: 'NAME', forceSelection: true, name: 'BLSTATUS', value: '', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); Ext.define('CODE_BLTYPE', { extend: 'Ext.data.Model', idProperty: 'BLTYPE', fields: [ { name: 'BLTYPE', type: 'string' } ] }); //签单方式 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: '签单方式', //'签单方式', store: this.storeISSUETYPE, // flex: 0.5, forceSelection: true, name: 'ISSUETYPE', valueField: 'BLTYPE', displayField: 'BLTYPE' }); //#endregion this.formSearch = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 70, msgTarget: 'qtip' }, items: [ {//fieldset 1 xtype: 'container', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '编号', name: 'MBLNO', labelWidth: 40, enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '从开船日期', format: 'Y-m-d', xtype: 'datefield', name: 'ETD_BGN', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '到开船日期', format: 'Y-m-d', xtype: 'datefield', name: 'ETD_END', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, this.comboxOpType, this.comboxDOC, this.comboxISSUETYPE, this.comboxFSTATUS, this.comboxBLSTATUS,{ text: "查询", width: 60, xtype: 'button', iconCls: "btnrefresh", handler: function (button, event) { this.onRefreshClick(button, event); }, scope: this }] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [ this.comboxOpLb, this.comboxCustCode //, this.comboxF_CustCode //, this.comboxBLSTATUS , { fieldLabel: '船名', name: 'VESSEL', labelWidth: 40, flex: 1.4, enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '航次', name: 'VOYNO', labelWidth: 40, flex: 0.6, enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '从签入日期', format: 'Y-m-d', xtype: 'datetimefield', name: 'QR_BGN', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '到签入日期', format: 'Y-m-d', xtype: 'datetimefield', name: 'QR_END', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '从签出日期', format: 'Y-m-d', xtype: 'datefield', name: 'QC_BGN', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '到签出日期', format: 'Y-m-d', xtype: 'datefield', name: 'QC_END', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { text: "高级", width: 60, xtype: 'button', iconCls: "btnmore", handler: function (button, event) { var sql = this.getCondition(); var winAccess = new Shipping.DsQuery({ }); winAccess.StoreList = this.storeList; winAccess.formname = this.formname; winAccess.condition = sql; winAccess.show(); return; }, scope: this }//, { xtype: 'hiddenfield', flex: 1 } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [ //, this.comboxFeeNameRef //, { xtype: 'hiddenfield', flex: 2 } ] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); //#endregion formSearch var menu1 = new Ext.menu.Menu({ id: 'basicMenu', items: [{ text: '批量设为完成', handler: clickEnd }, { text: '批量设为未完成', handler: clickNotEnd }] }); function clickEnd() { panelTest.SetEnd("1"); }; function clickNotEnd() { panelTest.SetEnd("0"); }; _this = this; this.panelBtn = new Ext.Panel({ region: "north", tbar: [ { xtype: 'radiogroup', id: "workinfo", //name: 'workinfo', vertical: true, //fieldLabel: '要进行的工作', labelWidth: 80, items: [ { boxLabel: '提单查询', id: "CX", name: 'wi', inputValue: '0', width: 70, checked: true }, { boxLabel: '可签入', id: "QR", name: 'wi', inputValue: '4', width: 70 }, { boxLabel: '可签出', id: "QC", name: 'wi', inputValue: '1', width: 70 }, { boxLabel: '已签出', id: "UnKD", name: 'wi', inputValue: '3', width: 70 }, { boxLabel: '改签', id: "GQ", name: 'wi', inputValue: '5', width: 70 }, // { boxLabel: '已通知放单', id: "TZFD", name: 'wi', inputValue: '4', width: 85 }, {boxLabel: '已扣单', id: "KD", name: 'wi', inputValue: '2', width: 70 } ], listeners: { change: function (rd, newValue, oldValue, eOpts) { _this.storeLog.removeAll(); Ext.getCmp("BLINFO").update(""); if (newValue.wi.toString() != "0") _this.onRefreshClick(); //RB1.getValue().wi.toString(); if (newValue.wi.toString() == "0") { _this.storeList.removeAll(); Ext.getCmp("TDQR").show(); Ext.getCmp("TDQC").show(); Ext.getCmp("LOCKBL").show(); Ext.getCmp("UNLOCKBL").hide(); Ext.getCmp("QXQR").show(); Ext.getCmp("QXQC").hide(); Ext.getCmp("REQR").hide(); } if (newValue.wi.toString() == "5") { Ext.getCmp("TDQR").show(); Ext.getCmp("TDQC").show(); Ext.getCmp("LOCKBL").hide(); Ext.getCmp("UNLOCKBL").hide(); Ext.getCmp("QXQR").show(); Ext.getCmp("QXQC").hide(); Ext.getCmp("REQR").hide(); } if (newValue.wi.toString() == "1") { Ext.getCmp("TDQR").hide(); Ext.getCmp("TDQC").show(); Ext.getCmp("LOCKBL").show(); Ext.getCmp("UNLOCKBL").hide(); Ext.getCmp("QXQR").show(); Ext.getCmp("QXQC").hide(); Ext.getCmp("REQR").hide(); } if (newValue.wi.toString() == "4") { Ext.getCmp("TDQR").show(); Ext.getCmp("TDQC").hide(); Ext.getCmp("LOCKBL").show(); Ext.getCmp("UNLOCKBL").hide(); Ext.getCmp("QXQR").show(); Ext.getCmp("QXQC").hide(); Ext.getCmp("REQR").hide(); } if (newValue.wi.toString() == "2") { Ext.getCmp("TDQR").hide(); Ext.getCmp("TDQC").hide(); Ext.getCmp("LOCKBL").show(); Ext.getCmp("UNLOCKBL").show(); Ext.getCmp("QXQR").hide(); Ext.getCmp("QXQC").hide(); Ext.getCmp("REQR").hide(); } if (newValue.wi.toString() == "3") { Ext.getCmp("TDQR").hide(); Ext.getCmp("TDQC").hide(); Ext.getCmp("LOCKBL").hide(); Ext.getCmp("UNLOCKBL").hide(); Ext.getCmp("QXQR").hide(); Ext.getCmp("QXQC").show(); Ext.getCmp("REQR").show(); } } } }, '-', { text: "提单签入", id: "TDQR", iconCls: 'edit_down', handler: function (button, event) { this.onQRClick(); }, scope: this }, { text: "取消签入", id: "QXQR", tooltip: '取消错误的签入操作', handler: function (button, event) { this.onUnQRClick(button, event); }, scope: this }, { text: "船证", id: "CZQR", iconCls: 'edit_down', menu: [ { text: '船证签入', //"保存", handler: function (button, event) { _this.onCZQRClick(); } }, { text: '取消签入', //"初始化", handler: function (menu, event) { _this.onUnCZQRClick(); } }, { text: '船证签出', //"保存", handler: function (button, event) { _this.onCZQCClick(); } }, { text: '取消签出', //"初始化", handler: function (menu, event) { _this.onUnCZQCClick(); } }], scope: this }, { text: "提单签出", id: "TDQC", //hidden: true, iconCls: 'edit_up', //iconCls: "btnrefresh", handler: function (button, event) { this.onQCClick_1(); }, scope: this }, { text: "换签(背书)", id: "HQBS", iconCls: 'edit_down', menu: [ { text: '换签(背书)', //"保存", handler: function (button, event) { _this.onHQBSClick(); } }, { text: '取消换签(背书)', //"初始化", handler: function (menu, event) { _this.onUnHQBSClick(); } }], scope: this }, { text: "驳回放单通知", id: "FDTZBK", iconCls: 'edit_up', //iconCls: "btnrefresh", handler: function (button, event) { this.onFDTZBACKClick(); }, scope: this }, { text: "扣单", id: "LOCKBL", hidden: true, iconCls: 'btislock', handler: function (button, event) { this.onKDClick(); }, scope: this }, { text: "解除扣单", id: "UNLOCKBL", hidden: true, iconCls: 'btislock', handler: function (button, event) { this.onKDClick(); }, scope: this }, { text: "取消签出", id: "QXQC", tooltip: '取消错误的签出操作', handler: function (button, event) { this.onQXQCClick(button, event); }, scope: this }, { text: "重新签入", id: "REQR", hidden: true, tooltip: '取消错误的签入操作', handler: function (button, event) { this.onREQRClick(button, event); }, scope: this }, { text: '其他', //"退舱", id: "btnqt", menu: [ { text:"更改提单", //"确认退舱", handler: function (menu, event) { _this.onGGTDClick('更改提单'); } }, { text: "状态更改", //"确认退舱", handler: function (menu, event) { _this.onGGTDClick('状态更改'); } }] }, '-', { text: "导出Excel", id: "btnExportExcel", iconCls: 'btnexportexcel', handler: function (button, event) { this.onExportClick(button, event); }, scope: this }, '-', { text: "打印", //"打印", iconCls: "btnprint", handler: function (button, event) { this.Print(); }, scope: this }, /*{ id: "btnFeeAuditReject", text: '驳回提交费用业务', tooltip: '驳回提交费用业务', iconCls: "btnrefuse", handler: function (button, event) { this.onAuditRefuseClick(button, event); }, scope: this },*/ { text: "保存列表样式", id: "btntest", handler: function (button, event) { var formname = this.formname; var tempcolumns = this.gridList.columns; DsTruck.SaveGridPanel(USERID, formname, tempcolumns, this.column, 0, false); }, scope: this } //,this.CB_EditMode ] }); //选择load // var isloadfee = true; this.gridList.getSelectionModel().on('select', function (model, record, index) { // if (!isloadfee) return; var BLINFO = Ext.getCmp("BLINFO"); BLINFO.update("正在载入信息"); var LINKGID = record.data.GID; var BSNO = record.data.BSNO; this.BSNO = BSNO; var SALE = record.data.SALE; var CUSTOMERNAME = record.data.CUSTOMERNAME; _SALE = SALE; _CUSTOMERNAME = CUSTOMERNAME; // isloadfee = false; if (record.data.BLNO != "" && BSNO != "") { if (LINKGID != "") { this.logsql = " (BSNO='" + LINKGID + "' or BSNO in(select linkgid from op_blissuelist_detail where BSNO='" + BSNO + "')) "; this.storeLog.load({ params: { condition: " (BSNO='" + LINKGID + "' or BSNO in(select linkgid from op_blissuelist_detail where BSNO='" + BSNO + "')) " } }); } else { this.logsql = " BSNO in(select linkgid from op_blissuelist_detail where BSNO='" + BSNO + "') "; this.storeLog.load({ params: { condition: " BSNO in(select linkgid from op_blissuelist_detail where BSNO='" + BSNO + "') " } }); } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO2', async: false, params: { BSNO: "'" + BSNO + "'" }, callback: function (options, success, response) { if (success) { isloadfee = true; var result = Ext.JSON.decode(response.responseText); if (result.Success) { var _html = this.getFDINFO(result); BLINFO.update(_html); //alert(Ext.getCmp("FDINFO").html); } else { //return; } } else { return; } }, scope: this }); this.storeDocList.load({ params: { condition: "BSNO='" + BSNO +"' AND RECEIPTTYPE='提单'" }, waitMsg: "正在查询数据...", scope: this, callback: function () { } }); this.storeBlInfoList.removeAll(); //this.storeBlInfoList.load({ params: { SALE: SALE, CUSTNAME: CUSTOMERNAME} }); // this.storeBlInfoList.load({ params: { SALE: _SALE, CUSTNAME: _CUSTOMERNAME } }); } else { this.storeLog.removeAll(); this.storeBlInfoList.removeAll(); this.storeDocList.removeAll(); // this.storeBlInfoList.removeAll(); } // }, this); this.storeBlInfoList = Ext.create('Ext.data.Store', { model: 'BLINFOLIST', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsOp_BLISSUE/GetBLINFOLIST', reader: { root: 'data', totalProperty: 'totalCount' } } }); this.panelShowBtn = new Ext.Panel({ region: "center", tbar: [{ text: '显示欠费信息', iconCls: "btnadd", handler: function (button, event) { if (_SALE == '' || _CUSTOMERNAME == '') { return; } this.storeBlInfoList.load({ params: { SALE: _SALE, CUSTNAME: _CUSTOMERNAME} }); }, scope: this }] }); //布局 this.panelShowBtnTop = new Ext.Panel({ layout: "border", region: "north", height: 30, items: [this.panelShowBtn] }); this.gridBlInfoList = new Ext.grid.GridPanel({ store: this.storeBlInfoList, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, columns: [{ sortable: true, dataIndex: 'INFOTEXT', header: '描述', width: 160 }, { sortable: true, dataIndex: 'RMBNODR', header: 'RMB应收欠费(超期)', width: 160 }, { sortable: true, dataIndex: 'USDNODR', header: 'USD应收欠费(超期)', width: 160 }, { sortable: true, dataIndex: 'TTLNODR', header: '合计应收欠费(超期)', width: 160 } ] }); this.panelBlInfoList = new Ext.Panel({ title: '欠费信息', // layout: "border", region: 'center', //width: 600, height: 180, split: true, //margin: '5 10', frame: true, items: [this.panelShowBtnTop,this.gridBlInfoList] }); this.formInfo = Ext.widget('form', { region: 'north', height:120, frame: true, split: true, bodyPadding: 2, bodyStyle: "padding:0 0 0 0;background:#FFF;", fieldDefaults: { margins: '0 0 0 0', labelAlign: 'right', flex: 5, //labelWidth: 90,//label标签宽度 msgTarget: 'qtip', sourcelabelWidth: '100' //,split:true }, items: [{ //fieldset 1 xtype: 'fieldset', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [ { //container_1 xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ xtype: 'label', name: 'BLINFO', id: "BLINFO", padding: '0 0 0 0', html: "", bodyStyle: "padding:0 0 0 0;background:#FFF;", height: 160, width: 450 }] }] }] }); //#region 明细表-单据图片档案管理 _this = this; this.storeDocList = Ext.create('Ext.data.Store', { model: 'ReceiptDocmb', remoteSort: true, proxy: { type: 'ajax', url: '/Import/ReceiptDoc/GetDocList', reader: { id: 'GID', root: 'data', totalProperty: 'totalCount' } } }); //明细表表格 this.DocListCellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }); this.DocCM = Ext.create('Ext.selection.CheckboxModel'); this.gridDocList = new Ext.grid.GridPanel({ store: this.storeDocList, enableHdMenu: false, region: 'center', // width: 350, loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, plugins: [this.DocListCellEditing], selModel: this.DocCM, selType: 'cellmodel', tbar: [{ text: '删除', tooltip: '删除', iconCls: "btndeletedetail", id: 'btnEDelDoc', handler: function (button, event) { this.onDelFileClick(button, event); }, scope: this }, '-', { text: '上传附件', tooltip: '上传附件', iconCls: "btnadddetail", id: 'btnEAddDoc', handler: function (button, event) { this.onUpLoadFileClick(button, event); }, scope: this }], columns: [{ sortable: true, hidden: true, dataIndex: 'GID', header: 'GID', width: 80 }, { sortable: true, hidden: true, dataIndex: 'R_GID', header: 'R_GID', width: 80 }, { sortable: true, hidden: true, dataIndex: 'BSNO', header: 'BSNO', width: 80 }, { sortable: true, dataIndex: 'URL', header: '文件名', width: 140, renderer: function (value, p, record) { return '' + value + ''; } }, { sortable: true, hidden: true, dataIndex: 'Driect_URL', header: 'Driect_URL', width: 80 }, { xtype: 'actioncolumn', width: 50, text: '图片预览', //操作 items: [{ icon: '/images/icons/btnSearch.gif', // Use a URL in the icon config tooltip: '预览', handler: function (grid, rowIndex, colIndex) { var rec = grid.getStore().getAt(rowIndex); var filePath = rec.get('Driect_URL') + '?a=' + Math.random(); var imgView = new Shipping.FileView({ filePath: filePath, height: 600, width: 800 }); imgView.show(); } }] }, { sortable: true, hidden: true, dataIndex: 'MODIFIEDUSER', header: 'MODIFIEDUSER', width: 80 }, { sortable: true, dataIndex: 'MODIFIEDUSERRef', header: '上传人', width: 80 }, { sortable: true, dataIndex: 'MODIFIEDTIME', header: '上传时间', width: 135 } ] }); this.panelDoc = new Ext.Panel({ id: "panelDoc", layout: "border", region: "east", width: 250, title: '提单附件', //autoScroll: true, frame: false, split: true, items: [this.gridDocList] }); //#endregion //布局 this.panelTop = new Ext.Panel({ layout: "border", region: "north", height: 100, items: [this.formSearch, this.panelBtn] }); this.panelContract = new Ext.Panel({ //title: '', layout: "border", region: 'center', height: 800, margin: '1 2', split: true, items: [this.gridList, this.panelDoc] }); this.panelSalesList = new Ext.Panel({ title: '日志', layout: "border", region: 'center', //height: 300, margin: '1 1', split: true, items: [this.gridList_Log] }); this.panelSalesAddList = new Ext.Panel({ title: '相关信息', layout: "border", region: 'east', width: 600, minHeight: 180, margin: '1 1', split: true, items: [this.formInfo, this.panelBlInfoList] }); this.panelSalesBody = new Ext.Panel({ //title: '销售单关联明细', layout: "border", region: 'south', height: 360, margin: '1 1', split: true, items: [this.panelSalesList, this.panelSalesAddList ] }); Ext.apply(this, { items: [this.panelTop, this.panelContract, this.panelSalesBody] }); ///以下集中绑定事件 this.storeList.on('beforeload', function (store) { if (!this.checkSearchCondition()) return; var sql = this.getCondition(); Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); this.gridList.on('edit', function (editor, e, eOpts) { this.PCAfterEdit(editor, e, eOpts); }, this); this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) { this.SelectedRecord = record; var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2 var openType = "_blank"; var openUrl = ""; if (record.data.OPLBNAME == "报关业务") { openUrl = "../../MvcShipping/MsOpApply/ApplyFeeView?handle=check&bsno=" + record.data.BSNO; } else { openUrl = "../../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO; } window.open(openUrl, openType, openSet); }, this); this.LoadInitData(); var myDate = new Date(); var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d'); this.formReason = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, bodyStyle: "padding:0 0 0 0;background:#FFF;", fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 45, msgTarget: 'qtip' }, items: [ { xtype: 'label', name: 'FDINFO', id: "FDINFO", padding: '0 0 0 0', html: "", height: 130, width: 450 }, {//fieldset 1 xtype: 'container', height: 20, defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [ { text: '需关注事项:', id: "关注事项", hidden: true, style: 'margin:100px 20px 20px 20px;', xtype: 'label', flex: 1 }, { text: '', id: "IS欠费超期", style: 'margin:80px 5px 15px 20px;color: #900000', xtype: 'label', flex: 1 }, { text: '', id: "IS累计欠费", style: 'margin:80px 5px 15px 20px;color: #900000', xtype: 'label', flex: 1 }, { text: '', id: "IS循环业务", style: 'margin:80px 5px 15px 20px;color: #900000', xtype: 'label', flex: 1 }] }, { fieldLabel: '签出日期', //'ETD', format: 'Y-m-d', labelWidth: 60, flex: 1, id: 'QCDATE', value: mydatestr, xtype: 'datefield', name: 'QCDATE' }, { fieldLabel: '备注', id: "REASON", xtype: 'textareafield', width: 450, labelwidth: 45, flex: 2, height: 50, name: 'REASON', listeners: { change: function (field, eOpts) { if (field.lastValue != "") { //this.formHead.getForm().findField('STOCKDATE_1').setValue(field.rawValue); } }, scope: this } }] }); me = this; this.winQCShow = Ext.create('Ext.window.Window', { title: "签出", width: 490, //height : 120, //plain : true, iconCls: "addicon", resizable: false, // 是否可以拖动 // draggable:false, collapsible: true, // 允许缩放条 closeAction: 'close', closable: true, modal: 'true', buttonstyle: 'text-align:center;', align: 'left', bodyStyle: "padding:0 0 0 0;background:#FFF;", items: [this.formReason], buttons: [ { text: "确定", minWidth: 70, handler: function () { var QCDATE = Ext.getCmp("QCDATE").getRawValue(); if (QCDATE == '') { Ext.Msg.show({ title: '提示', msg: '签出日期不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } me.onQCClick(Ext.getCmp("REASON").getRawValue(), QCDATE); me.winQCShow.close(); me.onRefreshClick(); } }, { text: "取消", minWidth: 70, handler: function () { Ext.getCmp("FDINFO").update(""); me.winQCShow.close(); } }] }); this.formQR = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 90, msgTarget: 'qtip' }, items: [{ fieldLabel: '签入日期', //'ETD', format: 'Y-m-d', flex: 1, id: 'QRDATE', xtype: 'datefield', name: 'QRDATE' }, { fieldLabel: '备注', id: "QRREASON", xtype: 'textareafield', width: 450, labelwidth: 45, flex: 2, height: 50, name: 'REASON', listeners: { change: function (field, eOpts) { if (field.lastValue != "") { //this.formHead.getForm().findField('STOCKDATE_1').setValue(field.rawValue); } }, scope: this } } ]//end root items }); Ext.Ajax.request({ waitMsg: '', url: '/MvcShipping/MsSysParamSet/GetData', params: { condition: "PARAMNAME='QCMUSTQR'" }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (result.Success != true) { } else { var data = result.data; if (data.PARAMVALUE == '1') { this.QCMUSTQR = 1; } else { } } } else { } }, scope: this }); Ext.Ajax.request({ waitMsg: '', url: '/MvcShipping/MsSysParamSet/GetData', params: { condition: "PARAMNAME='QCMUSTFDTZ'" }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (result.Success != true) { } else { var data = result.data; if (data.PARAMVALUE == '1') { this.QCMUSTFDTZ = 1; } else { } } } else { } }, scope: this }); }, //end initUIComponents LoadInitData: function () { //this.storeTruckNo.load({ params: { condition: " A.truckno not in (select DISTINCT truckno from tMsWlPcHead where isnull(isend,0)=0 ) "} }); }, onAuditRefuseClick: function (button, event) { var sql = " A.GID in (select bsno from ch_fee where FEESTATUS=6)"; this.storeList.load({ params: { start: 0, limit: this.PageSize, condition: sql }, waitMsg: "正在查询数据...", callback: function (r, options, success) { if (success) { if (r.length > 0) { // this.gridList.getSelectionModel().select(0); } else { this.storeLog.removeAll(); this.storeBlInfoList.removeAll(); this.storeDocList.removeAll(); this.storeBlInfoList.removeAll(); Ext.getCmp("BLINFO").update(""); } } }, scope: this }); }, onRefreshClick: function (button, event) { if (!this.checkSearchCondition()) return; var sql = this.getCondition(); this.sqlcontext = sql; this.storeList.load({ params: { start: 0, limit: this.PageSize, condition: sql }, waitMsg: "正在查询数据...", callback: function (r, options, success) { if (success) { if (r.length > 0) { // this.gridList.getSelectionModel().select(0); } else { this.storeLog.removeAll(); this.storeBlInfoList.removeAll(); this.storeDocList.removeAll(); this.storeBlInfoList.removeAll(); Ext.getCmp("BLINFO").update(""); } } }, scope: this }); //} }, onDsQuery: function (button, event) { var sql = this.sqlcontext; this.storeList.load({ params: { start: 0, limit: this.PageSize, condition: sql }, waitMsg: "正在查询数据...", callback: function (r, options, success) { if (success) { if (r.length > 0) { // this.gridList.getSelectionModel().select(0); } else { this.storeLog.removeAll(); this.storeBlInfoList.removeAll(); this.storeDocList.removeAll(); this.storeBlInfoList.removeAll(); Ext.getCmp("BLINFO").update(""); } } }, scope: this }); }, getCondition: function () { var form = this.formSearch.getForm(); var sql = ''; //var sqldata = form.getValues(); //sql = Ext.JSON.encode(sqldata); var RB1 = Ext.getCmp("workinfo"); var RB = RB1.getValue().wi.toString(); if (RB == '0') {//未签入 // sql = sql + getAndConSql(sql, RB, " ((B.ISSUETYPE='正本' or B.ISSUETYPE='SEAWAY' or B.ISSUETYPE='海运单') and (isnull(ob.BLSTATUS,'')='' or ob.BLSTATUS='换签(背书)' or (select COUNT(*) from worklog where bsno=ob.GID and ACTNAME='提单签入')<=0) ) "); } else if (RB == '1') {//可签出 sql = sql + getAndConSql(sql, RB, " ( ( isnull(ob.BLSTATUS,'')='放单通知' or (isnull(ob.BLSTATUS,'')='提单签入' and (select COUNT(*) from worklog where bsno=ob.GID and ACTNAME='放单通知')>0 ) ) or (sp.BLSTATUS='审核通过' and isnull(ob.BLSTATUS,'')<>'提单签出') ) "); } else if (RB == '2') {//已扣单 sql = sql + getAndConSql(sql, RB, " isnull(ob.BLSTATUS,'')='扣单' "); } else if (RB == '3') {//已签出 sql = sql + getAndConSql(sql, RB, " isnull(ob.BLSTATUS,'')='提单签出' "); } else if (RB == '4') {//已通知放单 sql = sql + getAndConSql(sql, RB, " isnull(ob.BLSTATUS,'')<>'提单签出' AND isnull(ob.BLSTATUS,'')<>'扣单' AND isnull(ob.BLSTATUS,'')<>'提单签入' "); } else if (RB == '5') {//已通知放单 sql = sql + getAndConSql(sql, RB, " isnull(B.ISGAIQIAN,0)=1 "); } var MBLNO = form.findField('MBLNO').getValue(); sql = sql + getAndConSql(sql, MBLNO, " (ISNULL(B.CUSTNO,'')+' '+ISNULL(B.MBLNO,'')+' '+ISNULL(B.HBLNO,'') like '%" + MBLNO + "%') "); //var CUSTNO = form.findField('CUSTNO').getValue(); //sql = sql + getAndConSql(sql, CUSTNO, " B.BSNO in (select BSNO from v_op_blissue_bill where CUSTNO like '%" + CUSTNO + "%' ) "); var ETD_BGN = form.findField('ETD_BGN').getRawValue(); sql = sql + getAndConSql(sql, ETD_BGN, " B.ETD>='" + ETD_BGN + "'"); var ETD_END = form.findField('ETD_END').getRawValue(); sql = sql + getAndConSql(sql, ETD_END, " B.ETD<='" + ETD_END + " 23:59:59'"); var QR_BGN = form.findField('QR_BGN').getRawValue(); sql = sql + getAndConSql(sql, QR_BGN, " ob.QRDATE>='" + QR_BGN + "'"); var QR_END = form.findField('QR_END').getRawValue(); sql = sql + getAndConSql(sql, QR_END, " ob.QRDATE<='" + QR_END + " 23:59:59'"); var QC_BGN = form.findField('QC_BGN').getRawValue(); sql = sql + getAndConSql(sql, QC_BGN, " ob.QCDATE>='" + QC_BGN + "'"); var QC_END = form.findField('QC_END').getRawValue(); sql = sql + getAndConSql(sql, QC_END, " ob.QCDATE<='" + QC_END + " 23:59:59'"); var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue(); sql = sql + getAndConSql(sql, CUSTOMERNAME, " B.CUSTOMERNAME='" + CUSTOMERNAME + "' "); var ISSUETYPE = form.findField('ISSUETYPE').getValue(); sql = sql + getAndConSql(sql, ISSUETYPE, " B.ISSUETYPE='" + ISSUETYPE + "' "); /* var BLSTATUS = this.comboxBLSTATUS.getValue(); if (BLSTATUS != "") { sql = sql + getAndConSql(sql, BLSTATUS, "BLSTATUS='" + BLSTATUS + "'"); }*/ var BLSTATUS = form.findField('BLSTATUS').getValue(); if (BLSTATUS == '1') { sql = sql + getAndConSql(sql, BLSTATUS, " NOT EXISTS (SELECT 1 FROM worklog where bsno=ob.GID and ACTNAME='提单签入') "); } else if (BLSTATUS == '未签出') { sql = sql + getAndConSql(sql, BLSTATUS, " NOT EXISTS (SELECT 1 FROM worklog where bsno=ob.GID and ACTNAME='提单签出') "); } else if (BLSTATUS == '2') { sql = sql + getAndConSql(sql, BLSTATUS, " EXISTS (SELECT 1 FROM worklog where bsno=ob.GID and ACTNAME='提单签入') AND NOT EXISTS (SELECT 1 FROM worklog where bsno=ob.GID and ACTNAME='提单签出') "); } else if (BLSTATUS == '解除扣单') { sql = sql + getAndConSql(sql, BLSTATUS, " EXISTS (SELECT 1 FROM worklog where bsno=ob.GID and ACTNAME='取消扣单') "); }else if (BLSTATUS != '') { sql = sql + getAndConSql(sql, BLSTATUS, " isnull(ob.BLSTATUS, '') = '" + BLSTATUS+"' "); } var VESSEL = form.findField('VESSEL').getValue(); sql = sql + getAndConSql(sql, VESSEL, " B.VESSEL like '%" + VESSEL + "%' "); var DOC = form.findField('DOC').getValue(); sql = sql + getAndConSql(sql, DOC, " B.DOC like '%" + DOC + "%' "); var VOYNO = form.findField('VOYNO').getValue(); sql = sql + getAndConSql(sql, VOYNO, " B.VOYNO like '%" + VOYNO + "%' "); var OPLBNAME = form.findField('OPLBNAME').getValue(); sql = sql + getAndConSql(sql, OPLBNAME, " B.OPLBNAME = '" + OPLBNAME + "' "); var OPTYPE = form.findField('OPTYPE').getValue(); sql = sql + getAndConSql(sql, OPTYPE, " B.OPTYPE = '" + OPTYPE + "' "); var FSTATUS = form.findField('FSTATUS').getValue(); if (FSTATUS == '1') sql = sql + getAndConSql(sql, FSTATUS, " (g.TTLDR-g.STLTTLDR)<>0 "); else if (FSTATUS == '2') sql = sql + getAndConSql(sql, FSTATUS, " (g.TTLDR-g.STLTTLDR)=0 "); return sql; }, checkSearchCondition: function () { var form = this.formSearch.getForm(); if (!form.isValid()) { Ext.Msg.alert('提示', '查询条件赋值错误,请检查。'); return false; } return true; }, OprationSwap: function () { var ret = new Array(); ret[0] = this.OprationStatus; ret[1] = this.storeList; ret[2] = this.SelectedRecord; if (this.OprationStatus == "add") { ret[3] = ""; } else { ret[3] = this.SelectedRecord.data.REFBILLNO; } ret[4] = "MsRptPcHeadQryIndex"; ret[5] = formtype; return ret; }, SetEnd: function (isEnd) { selectedRecords = this.gridList.selModel.getSelection(); var GIDList = ""; var needalert = false; for (var i = 0; i < selectedRecords.length; i++) { var rec = selectedRecords[i]; if (rec.get('TruckNo') != "") { if (GIDList == "") { GIDList = "'" + rec.get('GId') + "'"; } else { GIDList = GIDList + ",'" + rec.get('GId') + "'"; } } else { needalert = true; } } if (needalert == true) { alert("不能将接单状态的业务设置为完成"); } if (GIDList == "") { return; } Ext.Ajax.request({ waitMsg: '正在查询毛利数据...', url: '/TruckMng/MsWlPc/SetEnd', async: false, params: { GIDList: GIDList, isEnd: isEnd }, 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; } var _count = result.data; this.onRefreshClick(); if (needalert == true) { alert("注意,未派车(未选择车号)的业务不能设置为完成。"); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); //request over } , onQRClick: function () { //this.onSaveClick(); var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.BLSTATUS == "" || member.data.BLSTATUS == "放单通知"|| member.data.BLSTATUS == "换签(背书)" || member.data.BLSTATUS == "更改提单" || member.data.BLSTATUS == "状态更改"|| member.data.ISQR == "0" || member.data.ISGAIQIAN == "1" || member.data.BLSTATUS == "提单签出") { if (member.data.BLSTATUS == "提单签出" && member.data.ISQR == "0") { alert('不签入直接签出不能做二次签入!'); } else bodyList.push(member); } else if (member.data.BLSTATUS == "提单签入") { alert("不能重复签入。"); //bodyList.push(member); } else if (member.data.BLSTATUS == "提单签出") { alert("注意已经签出。"); //bodyList.push(member); } else if (member.data.BLSTATUS == "扣单") { //alert("注意已经扣单,不能签出。"); //bodyList.push(member); } }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: '没有要签入的提单!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } this.onQrShow(jsonBody); } , onQrShow: function (jsonBody) { var myDate = new Date(); var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d'); Ext.getCmp('QRDATE').setValue(mydatestr); Ext.getCmp('QRREASON').setValue(''); var winQRShow = Ext.create('Ext.window.Window', { title: "签入", //"生成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: [this.formQR], buttons: [{ text: "确定签入", //"上传EDI", minWidth: 70, handler: function () { var rmQRDATE = Ext.getCmp('QRDATE'); var QRDATE = rmQRDATE.getRawValue(); if (QRDATE == '') { Ext.Msg.show({ title: '提示', msg: '签入日期不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var QRREASON = Ext.getCmp("QRREASON").getRawValue(); Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/QR', params: { USERID: USERID, data: jsonBody, qrdate: QRDATE, reason: QRREASON }, callback: function (options, success, response) { if (success) { winQRShow.close(); me.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } }, { text: "关闭", //"关闭", minWidth: 70, handler: function () { winQRShow.close(); } }] }); winQRShow.show(); } , onCZQRClick: function () { //this.onSaveClick(); var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '警告', msg: '没有要船证签入的业务', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } this.formCZQR = 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: '签入日期', format: 'Y-m-d', xtype: 'datefield', name: 'CZQRDATE' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ xtype: 'textareafield', grow: true, fieldLabel: '备注', labelSeparator: '', height: 100, name: 'CZQRREMARK', anchor: '100%' } ] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); me = this; this.winCZQRShow = Ext.create('Ext.window.Window', { title: "船证签入", 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.formCZQR], buttons: [{ text: "确认签入", minWidth: 70, handler: function () { var form = me.formCZQR.getForm(); var CZQRDATE = form.findField('CZQRDATE').getRawValue(); if (CZQRDATE == '' || CZQRDATE == null || CZQRDATE == undefined) { Ext.Msg.show({ title: '提示', msg: '签入日期不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; }; var CZQRREMARK = form.findField('CZQRREMARK').getValue(); Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/CZQR', params: { CZQRDATE: CZQRDATE, CZQRREMARK: CZQRREMARK, data: jsonBody }, callback: function (options, success, response) { if (success) { me.winCZQRShow.close(); me.storeList.reload(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } }, { text: "关闭", minWidth: 70, handler: function () { me.winCZQRShow.close(); } }] }); this.winCZQRShow.show(); } , onCZQCClick: function () { //this.onSaveClick(); var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '警告', msg: '没有要船证签出的业务', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } this.formCZQC = 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: '签出日期', format: 'Y-m-d', xtype: 'datefield', name: 'CZQCDATE' } ] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ xtype: 'textareafield', grow: true, fieldLabel: '备注', labelSeparator: '', height: 100, name: 'CZQCREMARK', anchor: '100%' } ] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); me = this; this.winCZQCShow = Ext.create('Ext.window.Window', { title: "船证签出", 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.formCZQC], buttons: [{ text: "确认签出", minWidth: 70, handler: function () { var form = me.formCZQC.getForm(); var CZQRDATE = form.findField('CZQCDATE').getRawValue(); if (CZQRDATE == '' || CZQRDATE == null || CZQRDATE == undefined) { Ext.Msg.show({ title: '提示', msg: '签出日期不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; }; var CZQRREMARK = form.findField('CZQCREMARK').getValue(); Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/CZQC', params: { CZQRDATE: CZQRDATE, CZQRREMARK: CZQRREMARK, data: jsonBody }, callback: function (options, success, response) { if (success) { me.winCZQCShow.close(); me.storeList.reload(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } }, { text: "关闭", minWidth: 70, handler: function () { me.winCZQCShow.close(); } }] }); this.winCZQCShow.show(); } , onUnQRClick: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.BLSTATUS == "") { //bodyList.push(member); } else if (member.data.BLSTATUS == "提单签入" || member.data.BLSTATUS == "放单通知") { //alert("不能重复签入。"); bodyList.push(member); } else if (member.data.BLSTATUS == "提单签出") { //alert("注意已经签出。"); //bodyList.push(member); } else if (member.data.BLSTATUS == "扣单") { //alert("注意已经扣单,不能签出。"); //bodyList.push(member); } }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: '没有要取消签入的提单!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } me = this; Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/UnQR', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.winQCShow.close(); Ext.getCmp("REASON").setValue(""); me.storeList.reload(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onUnCZQRClick: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.ISVESSELPROVE == "1") bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: '没有要取消船证签入的提单!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } me = this; Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/UnCZQR', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.winQCShow.close(); Ext.getCmp("REASON").setValue(""); me.storeList.reload(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onUnCZQCClick: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.ISVESSELPROVE == "2") bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: '没有要取消船证签出的提单!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } me = this; Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/UnCZQC', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { me.storeList.reload(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onQXQCClick: function () { //取消签出 var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.BLSTATUS == "" || member.data.BLSTATUS == "放单通知") { //bodyList.push(member); } else if (member.data.BLSTATUS == "提单签入") { //alert("不能重复签入。"); //bodyList.push(member); } else if (member.data.BLSTATUS == "提单签出") { //alert("注意已经签出。"); bodyList.push(member); } else if (member.data.BLSTATUS == "扣单") { //alert("注意已经扣单,不能签出。"); //bodyList.push(member); } }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: '没有要取消签出的提单!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/QXQC', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.winQCShow.close(); Ext.getCmp("REASON").setValue(""); this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onREQRClick: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.BLSTATUS == "" || member.data.BLSTATUS == "放单通知") { //bodyList.push(member); } else if (member.data.BLSTATUS == "提单签入") { //alert("不能重复签入。"); //bodyList.push(member); } else if (member.data.BLSTATUS == "提单签出") { //alert("注意已经签出。"); bodyList.push(member); } else if (member.data.BLSTATUS == "扣单") { //alert("注意已经扣单,不能签出。"); //bodyList.push(member); } }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: '没有要重复签入的提单!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/REQR', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.winQCShow.close(); Ext.getCmp("REASON").setValue(""); this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } //#region 换签背书 , onHQBSClick: function () { //取消签出 var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.BLSTATUS == "提单签入" || member.data.BLSTATUS == "放单通知") { bodyList.push(member); }; } me = this; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: '只有提单签入的才能做换签(背书)!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/HQBS', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { me.storeList.reload(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onUnHQBSClick: function () { //取消签出 var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.BLSTATUS == "换签(背书)") { bodyList.push(member); }; } me = this; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: '只有换签(背书)的才能做取消换签(背书)!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/UnHQBS', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { me.storeList.reload(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onFDTZBACKClick: function () { //取消签出 var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.BLSTATUS == "放单通知") { bodyList.push(member); }; } me = this; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: '只有放单通知的提单才能做驳回放单通知!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/FDTZBACK', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { me.storeList.reload(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } //#endregion , onQCClick_1: function (REASON) { this.QCLIST = []; var selections = this.gridList.getSelectionModel().getSelection(); //var bodyList = []; var CUSTOMERNAME = ""; var ETD = ""; var VESSEL = ""; var VOYNO = ""; var ACCTYPE = ""; var TTLNODR = 0; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; ACCTYPE = member.data.ACCTYPE; if (ACCTYPE == '现结买单' || ACCTYPE == '') { TTLNODR = Add(TTLNODR, member.data.TTLNODR); } if ((member.data.ISSUETYPE == "正本") || member.data.ISSUETYPE != "正本") { if (member.data.TSFD != "" && member.data.TSFD != "审核通过") { // alert("提单号" + member.data.BLNO + " 已做特殊放单申请,还未审批通过,不能直接进行提单签出。"); Ext.Msg.show({ title: '提示', msg: "提单号" + member.data.BLNO + " 已做特殊放单申请,还未审批通过,不能直接进行提单签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } // else if (member.data.TSFD != "" && member.data.TSFD == "审核通过" && member.data.ISCHAOQI == "是" && member.data.MNGBLSTATUS != "审核通过" && member.data.CUSTCARGOAFTER!="有") { // Ext.Msg.show({ title: '提示', msg: "提单号" + member.data.BLNO + " 已做特殊放单申请,存在超期欠费,必须经理复核通过才能提单签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; // } else { if ((member.data.BLSTATUS == "" && (member.data.ISSUETYPE == "正本" || (member.data.ISSUETYPE != "正本" && member.data.ISSUETYPE != ""))) || member.data.BLSTATUS == "放单通知" || member.data.BLSTATUS == "提单签入" || member.data.ISGAIQIAN == "1") { if (this.QCMUSTQR == 1 && member.data.QRDATE == '') { Ext.Msg.show({ title: '提示', msg: "必须先签入才能签出!", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } else { this.QCLIST.push(member); } } else if (member.data.BLSTATUS == "提单签出") { Ext.Msg.show({ title: '提示', msg: "注意不可重复签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //bodyList.push(member); } else if (member.data.BLSTATUS == "扣单") { Ext.Msg.show({ title: '提示', msg: "注意已经扣单,不能签出。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //bodyList.push(member); } else if (member.data.BLSTATUS == "驳回放单通知") { Ext.Msg.show({ title: '提示', msg: "注意已经驳回放单通知,不能签出,请申请特放。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //bodyList.push(member); } } } else { // Ext.MessageBox.alert("提示", "此票未做签入,请先做签入才能签出"); } }; //var jsonBody = ConvertRecordsToJsonAll(bodyList); if (this.QCLIST.length == 0) { return; } else { var BSNO = ""; var FDFINFO = Ext.getCmp("FDINFO"); FDFINFO.update("正在载入信息"); //Ext.getCmp("IS欠费超期").setText(""); //Ext.getCmp("IS累计欠费").setText(""); for (i = 0; i < this.QCLIST.length; i += 1) { if (BSNO == "") { BSNO = "'" + this.QCLIST[i].data.BSNO + "'" } else { BSNO = BSNO + ",'" + this.QCLIST[i].data.BSNO + "'"; } } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO2', async: false, params: { BSNO: BSNO }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (result.Success) { var _html = this.getFDINFO(result); FDFINFO.update(_html); //alert(Ext.getCmp("FDINFO").html); } else { //return; } } else { return; } }, scope: this }); var jsonBody = ConvertRecordsToJsonAll(this.QCLIST); Ext.Ajax.request({ waitMsg: '正在锁定...', url: '/MvcShipping/MsOp_BLISSUE/ISFDTZ', params: { data: jsonBody }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { if (_this.QCMUSTFDTZ == 1) { if (TTLNODR != 0) { Ext.Msg.show({ title: '提示', msg: "有超期欠费必须要通知放单后,才能签出的提单!", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { Ext.Ajax.request({ waitMsg: '正在锁定...', url: '/MvcShipping/MsOp_BLISSUE/ISCHAOQI', params: { data: jsonBody }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.Msg.show({ title: '提示', msg: "有超期欠费必须要通知放单后,才能签出的提单!", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } else { Ext.MessageBox.confirm('提示', '操作没有通知放单,是否继续?', function (btn) { if (btn == 'yes') { Ext.getCmp('REASON').setValue(''); _this.winQCShow.show(); } }, this); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } } else { Ext.MessageBox.confirm('提示', '操作没有通知放单,是否继续?', function (btn) { if (btn == 'yes') { Ext.getCmp('REASON').setValue(''); _this.winQCShow.show(); } }, this); } } else { Ext.getCmp('REASON').setValue(''); _this.winQCShow.show(); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); } } , onQCClick: function (REASON, QCDATE) { //提单签出动作 var jsonBody = ConvertRecordsToJsonAll(this.QCLIST); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: "没有要签出的提单。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/QC', params: { USERID: USERID, data: jsonBody, REASON: REASON, qcdate: QCDATE }, callback: function (options, success, response) { if (success) { this.winQCShow.close(); Ext.getCmp("FDINFO").html = ""; this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request }, onGGTDClick: function (statusstr) { var GGLIST = []; var selections = this.gridList.getSelectionModel().getSelection(); for (i = 0; i < selections.length; i += 1) { var member = selections[i]; GGLIST.push(member); } var jsonBody = ConvertRecordsToJsonAll(GGLIST); if (jsonBody == '') { Ext.Msg.show({ title: '提示', msg: "没有要更改提单的提单。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/GGTD', params: { data: jsonBody, status:statusstr }, callback: function (options, success, response) { if (success) { this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request }, onExportClick: function (button, event) { _this = this; if (this.storeList.getCount() == 0) { return; } var bsno = '11111'; var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length != 0) { var record = selections[0]; bsno = record.data.BSNO; } var sortstr = ''; Ext.Msg.wait('正在操作数据'); Ext.Ajax.request({ waitMsg: '正在操作数据', url: '/MvcShipping/MsOp_BLISSUE/GetDataListStr', scope: this, params: { condition: _this.sqlcontext, 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 sql1 = returnstr; sql1 = sql1.replace(/\+/g, "@@@") if (sql1 != '') { GridExportBySql(sql1, this.formname, '提单管理列表.xls'); //var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2; //var openType = "_blank"; // var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'dr'+ "&condition1=" + sql1; //window.open(openUrl, openType, openSet); } } else { Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } else { Ext.Msg.show({ title: '警告', msg: '服务器响应出错!', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } }); }, Print: function () { _this = this; if (this.storeList.getCount() == 0) { return; } var bsno = '11111'; var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length != 0) { var record = selections[0]; bsno = record.data.BSNO; } var sortstr = ''; Ext.Msg.wait('正在操作数据'); Ext.Ajax.request({ waitMsg: '正在操作数据', url: '/MvcShipping/MsOp_BLISSUE/GetDataListStr', scope: this, params: { condition: _this.sqlcontext, 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 = jsonresult.Message; var printType = 'MSOPBLISSUELIST'; var sql1 = returnstr; var sql2 = ""; var sql3 = ""; var sql4 = ""; var sql5 = ""; var sql6 = ""; PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6); } else { Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } else { Ext.Msg.show({ title: '警告', msg: '服务器响应出错!', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } }); }, getFDINFO: function (result) { var _html = ""; _html = _html + "

    " + result.data[0].结费类型 + "

"; _html = _html + "

    " + result.data[0].欠费超期 + "

"; if (result.data[0].超期欠费 != '') _html = _html + "

    " + result.data[0].超期欠费 + "

"; _html = _html + "

    " + result.data[0].累计欠费 + "

"; _html = _html + "

    " + result.data[0].信用额度 + "

"; _html = _html + "

"; if (result.data[0].IS欠费超期 == "yes") { _html = _html + "    欠费超期"; } if (result.data[0].IS累计欠费 == "yes") { _html = _html + "    总欠费超额度"; } _html = _html + "

"; return _html; } , onKDClick: function () { //this.onSaveClick(); var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/KD', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { //this.winQCShow.close(); //Ext.getCmp("REASON").setValue(""); this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } //#region 废弃的旧流程 , onSQQRClick: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/SQQR', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onSQQR_backClick: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/SQQR_back', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onSQQR_Auditback: function (REASON) { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/SQQR_Auditback', params: { USERID: USERID, data: jsonBody, REASON: REASON }, callback: function (options, success, response) { if (success) { //Ext.MessageBox.hide(); this.winSTORAGEShow.close(); Ext.getCmp("REASON").setValue(""); this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onSQQR_Audit: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/SQQR_Audit', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onSQFD: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/SQFD', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onSQFD_back: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/SQFD_back', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onSQFD_Auditback: function (REASON) { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/SQFD_Auditback', params: { USERID: USERID, data: jsonBody, REASON: REASON }, callback: function (options, success, response) { if (success) { this.winSTORAGEShow.close(); Ext.getCmp("REASON").setValue(""); this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } , onSQFD_Audit: function () { var selections = this.gridList.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/SQFD_Audit', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.onRefreshClick(); } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } //#endregion //#region 上传图片 , onDelFileClick: function (button, event) { var feeGidSql = ''; var selectedRecords = []; selectedRecords = this.DocCM.selected.items; if (selectedRecords.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择要删除的附件!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } Ext.MessageBox.confirm('提示', '确定要删除选中的附件吗?', function (btn) { if (btn == 'yes') { if (selectedRecords.length > 0) { for (var i = 0; i < selectedRecords.length; i++) { var rec = selectedRecords[i]; if (rec.data.GID == "*") //如果是新增但没有保存的数据,没有必要提交到后台 { this.storeDocList.remove(selectedRecords[i]); } else { var feeGId = "'" + rec.data.GID + "'"; if (feeGidSql == '') { feeGidSql = feeGId; } else { feeGidSql = feeGidSql + "," + feeGId; } } } } _this = this; Ext.Msg.wait('正在删除数据...'); if (feeGidSql != '') { Ext.Ajax.request({ waitMsg: '正在删除数据...', url: '/MvcShipping/MsOpReceipt/DeleteUploadFile', params: { data: feeGidSql }, callback: function (options, success, response) { if (success) { var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { for (var i = 0; i < selectedRecords.length; i++) { this.storeDocList.remove(selectedRecords[i]); } Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } else { Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } }, failure: function (response, options) { Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } else { Ext.Msg.show({ title: '提示', msg: "删除成功!", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } } }, this); } , onUpLoadFileClick: function (button, event) { var billno = this.BSNO; me = this; var imgform = new Ext.FormPanel({ region: 'center', labelWidth: 40, frame: true, bodyStyle: 'padding:5px 5px 0', autoScroll: true, border: false, fileUpload: true, items: [{ xtype: 'fileuploadfield', id: 'LoadFile', name: 'LoadFile', emptyText: '请选择文件', fieldLabel: '文件', buttonText: '选择文件', allowBlank: false, buttonCfg: { iconCls: 'uploaddialog' }, anchor: '98%' }], buttons: [{ text: '上传', type: 'submit', handler: function () { var UserFilePath = Ext.getCmp('LoadFile').getValue(); // if (!CheckFileExt(UserFilePath, /.jpg|.gif|.png|.bmp|.pdf/i)) { // Ext.Msg.show({ title: '错误', msg: '请确认你上传的文件为图片文件!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); // return; // } if (!imgform.form.isValid()) { return; } imgform.form.submit({ url: '/MvcShipping/MsOpReceipt/UploadFile', waitMsg: '正在上传', method: 'POST', submitEmptyText: false, async: false, params: { CUSTNO: billno, BSNO: billno, TYPE:'提单' }, success: function (form, action) { win.close(this); Ext.Msg.show({ title: '提示', msg: '上传成功!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); me.storeDocList.reload(); }, failure: function (form, action) { form.reset(); if (action.failureType == Ext.form.Action.SERVER_INVALID) Ext.MessageBox.alert('警告', action.result.errors.msg); } }); } }, { text: '关闭', type: 'submit', handler: function () { win.close(this); } }] }); var win = new Ext.Window({ title: "上传文件", width: 360, height: 120, modal: true, resizable: false, border: false, items: imgform }); win.show(); } //#endregion });