//集运管理-路单查询 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); Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { PageSize: 50, OprationStatus: null, //仅当弹出界面时使用 SelectedRecord: null, QCLIST: [], sqlcontext: '1=2', initUIComponents: function () { this.formname = "MsOp_BLISSUEIndex"; this.logsql = '1=2'; this.sqlcontext = '1=2'; 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.storeYardCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsTruckMng.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeYardCode.load({ params: { condition: "ISYARD='1'"} }); this.comboxYardCode = Ext.create('DsExt.ux.RefTableCombox', { //fieldLabel: '拖箱场站', store: this.storeYardCode, name: 'YardCode', valueField: 'CustCode', displayField: 'CodeAndName' //afteredit 设置CustName }); this.storeRtnYardCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsTruckMng.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' } }); this.storeRtnYardCode.load({ params: { condition: "ISYARD='1'"} }); this.comboxRtnYardCode = Ext.create('DsExt.ux.RefTableCombox', { //fieldLabel: '返箱场站', store: this.storeRtnYardCode, name: 'RtnYardCode', valueField: 'CustCode', displayField: 'CodeAndName' }); this.storeContainerType = Ext.create('DsExt.ux.RefTableStore', { model: 'DsTruckMng.ux.CtnRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCtnRefList' } }); this.storeContainerType.load({ params: { condition: ""} }); this.comboxContainerType = Ext.create('DsExt.ux.RefTableCombox', { //fieldLabel: '箱型', store: this.storeContainerType, name: 'ContainerType', valueField: 'CtnCode', displayField: 'CtnName', flex: 1//CtnName , labelWidth: 30 }); //客户加载_委托单位 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 }); this.storeTruckNo = Ext.create('DsExt.ux.RefTableStore', { model: 'MsWlBsHeadRefMsWlTruck', proxy: { url: '/TruckMng/MsWlPc/GetTruckNoCanUse' }, //params: { condition: " A.truckno not in (select DISTINCT truckno from tMsWlPcHead where isnull(isend,0)=0 )"}, autoLoad: false }); this.storeTruckNoShow = Ext.create('DsExt.ux.RefTableStore', { model: 'MsWlBsHeadRefMsWlTruck', proxy: { url: '/TruckMng/MsWlPc/GetTruckNoCanUse' }, //params: { condition: " A.truckno not in (select DISTINCT truckno from tMsWlPcHead where isnull(isend,0)=0 )"}, autoLoad: false }); this.storeTruckNo.load({ params: { condition: "" }, callback: function (r, options, success) { if (success) { this.storeTruckNoShow.add(r); } }, scope: this }); var _this = this; this.comboxTruckNo = Ext.create('DsExt.ux.RefTableCombox', { //fieldLabel: '车牌号', //multiSelect:true, store: this.storeTruckNoShow, //readOnly:true, queryMode: 'remote', name: 'TruckNo', id: "TruckNo", valueField: 'TruckNo', displayField: 'TruckNo', //matchFieldWidth: false, //submitValue: false, validateOnChange: false, listeners: { 'change': function (field, e) { //alert(field.lastValue); _this.SetTruckNo(field.lastValue); } } }); this.storeDrvName = Ext.create('DsExt.ux.RefTableStore', { model: 'MsWlBsHeadRefMsWlDriver', proxy: { url: '/TruckMng/MsWlPc/GetDrvNameList' } }); this.storeDrvName.load({ params: { condition: ""} }); this.comboxDrvName = Ext.create('DsExt.ux.RefTableCombox', { //fieldLabel: '司机', store: this.storeDrvName, name: 'DrvCode', valueField: 'DrvCode', displayField: 'CodeAndName' }); //#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, hidden: 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 }, { 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 }, { dataIndex: 'ISSUEPLACE', header: '签单地点', //'货物标识', width: 70 }, { sortable: true, hidden: true, style: 'text-align:center;', align: 'left', dataIndex: 'BLISSUESTATUS', header: '提单签发状态', width: 80 }, { dataIndex: 'ISVESSELPROVE', 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'); if (TTLNODR =0) 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.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.comboxOpType = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '主/分单', store: this.StoreOpType, valueField: 'OPLBNAME', displayField: 'OPLBNAME', forceSelection: true, 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', forceSelection: true, name: 'FSTATUS', value: '', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); //#endregion this.formSearch = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 85, msgTarget: 'qtip' }, items: [ {//fieldset 1 xtype: 'container', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '提单号', name: 'MBLNO', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '委托编号', name: 'CUSTNO', 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] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [ this.comboxOpLb, this.comboxCustCode //, this.comboxF_CustCode //, this.comboxBLSTATUS , { fieldLabel: '船名', name: 'VESSEL', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '航次', name: 'VOYNO', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, this.comboxFSTATUS//, { 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: [ { text: "新建", id: "btnadd", hidden: true, iconCls: "btnadd", handler: function (button, event) { //this.OprationStatus = 'add'; //DsOpenEditWin("/TruckMng/MsWlPc/Edit_ADL", "", "700", "1000"); this.onAddPCClick(); }, scope: this }, { text: "删除", id: "btndelete", hidden: true, iconCls: "btndelete", handler: function (button, event) { this.onDeleteClick(button, event); }, scope: this }, { text: "保存修改", id: "SaveBtn", hidden: true, iconCls: "btnsave", handler: function (button, event) { this.onSaveClick(button, event); }, scope: this }, { text: "执行查询", iconCls: "btnrefresh", handler: function (button, event) { this.onRefreshClick(button, event); }, scope: this }, '-', { xtype: 'radiogroup', id: "workinfo", //name: 'workinfo', vertical: true, //fieldLabel: '要进行的工作', labelWidth: 80, items: [ { boxLabel: '未签入', id: "QR", name: 'wi', inputValue: '0', width: 70, checked: true }, { boxLabel: '可签出', id: "QC", name: 'wi', inputValue: '1', width: 70 }, { boxLabel: '已签出', id: "UnKD", name: 'wi', inputValue: '3', 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") { Ext.getCmp("TDQR").show(); Ext.getCmp("TDQC").hide(); Ext.getCmp("LOCKBL").hide(); Ext.getCmp("UNLOCKBL").hide(); Ext.getCmp("QXQR").hide(); 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").hide(); Ext.getCmp("TDQC").show(); Ext.getCmp("LOCKBL").show(); Ext.getCmp("UNLOCKBL").hide(); Ext.getCmp("QXQR").hide(); Ext.getCmp("QXQC").hide(); Ext.getCmp("REQR").hide(); } if (newValue.wi.toString() == "2") { Ext.getCmp("TDQR").hide(); Ext.getCmp("TDQC").hide(); Ext.getCmp("LOCKBL").hide(); 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(); } }], 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(button, event); }, scope: this }, { text: "解除扣单", id: "UNLOCKBL", hidden: true, iconCls: 'btislock', handler: function (button, event) { this.onKDClick(button, event); }, 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: "高级查询", 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 }, '-', { 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; var SALE = record.data.SALE; var CUSTOMERNAME = record.data.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.storeLog.removeAll(); 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.storeBlInfoList.load({ params: { SALE: SALE, CUSTNAME: CUSTOMERNAME} }); } else { this.storeLog.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.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", height: 180, region: 'center', split: true, frame: true, items: [this.gridBlInfoList] }); this.formInfo = Ext.widget('form', { region: 'north', height: 120, frame: true, // height: 160, 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 }] }] }] }); //布局 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.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: 320, 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(); } }] }); }, //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: "正在查询数据...", 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: "正在查询数据...", scope: this }); //} }, onDsQuery: function (button, event) { var sql = this.sqlcontext; this.storeList.load({ params: { start: 0, limit: this.PageSize, condition: sql }, waitMsg: "正在查询数据...", scope: this }); }, onDeleteClick: function (button, event) { var selections = this.gridList.getSelectionModel().getSelection(); if (selections.length == 0) { Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } var record = selections[0]; Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) { if (btn == 'yes') { Ext.Msg.wait('正在删除数据...'); Ext.Ajax.request({ waitMsg: '正在删除数据...', url: '/MvcShipping/MsOp_BLISSUE/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: '提示', 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 } }, this); }, //onDeleteClick 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, " ( (B.ISSUETYPE='正本' and isnull(ob.BLSTATUS,'') in ('提单签入','放单通知','驳回放单通知')) or (B.ISSUETYPE in('电放','seawaybill','SEAWAY','海运单') and isnull(ob.BLSTATUS,'') in ('','提单签入','放单通知') )) "); } 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,'')='放单通知' "); } var MBLNO = form.findField('MBLNO').getValue(); sql = sql + getAndConSql(sql, MBLNO, " (B.MBLNO like '%" + MBLNO + "%' or 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 CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue(); sql = sql + getAndConSql(sql, CUSTOMERNAME, " B.CUSTOMERNAME like '%" + CUSTOMERNAME + "%' "); /* var BLSTATUS = this.comboxBLSTATUS.getValue(); if (BLSTATUS != "") { sql = sql + getAndConSql(sql, BLSTATUS, "BLSTATUS='" + BLSTATUS + "'"); }*/ var VESSEL = form.findField('VESSEL').getValue(); sql = sql + getAndConSql(sql, VESSEL, " B.VESSEL like '%" + VESSEL + "%' "); 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; }, onExportClick: function (button, event) { GridExportExcelPage(this.gridList); }, 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 } , onSaveClick: function () { var bodyList = []; for (i = 0; i < this.storeList.getCount(); i += 1) { var member = this.storeList.getAt(i); bodyList.push(member); }; var jsonBody = ConvertRecordsToJson(bodyList); if (jsonBody == '') { return; } Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', url: '/MvcShipping/MsOp_BLISSUE/SaveList', scope: this, params: { data: jsonBody }, callback: function (options, success, response) { if (success) { Ext.MessageBox.hide(); var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { //this.storeList.commitChanges(); //this.onRefreshClick(); } 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 }); } //alert('03'); } }); } , onAddPCClick: function (button, event) { var record = Ext.create('MsOp_BLISSUEmb', { 'GID': '', 'id': '', 'BSNO': '', 'BLNO': '', 'BLNAME': '提单', 'BLSTATUS': '', 'BLORDERNO': '', 'ISSUETYPE': '', 'OPNAME': SHOWNAME, 'OPTIME': currdate.format('yyyy-MM-dd hh:mm:ss'), 'BSINKNO': '', 'REMARK': '', 'DELFLAG': '0', 'EXPRESSCORP': '', 'EXPRESSNO': '', 'ISADD': '0', 'PUTSINGLETIME': '', 'PUTSINGLE': '', 'PAYTIME': '', 'PAYRMB': '0', 'PAYUSD': '0' }); this.storeList.add(record); var n = this.storeList.getCount(); this.cellEditing.startEditByPosition({ row: n - 1, column: 6 }); //this.storeTruckNo.load({ params: { condition: " A.truckno not in (select DISTINCT truckno from tMsWlPcHead where isnull(isend,0)=0 ) "} }); } , PCAfterEdit: function (editor, e, eOpts) { //if (e.value == e.originalValue) { return; } if (e.field == 'ContainerType') {//箱号 var CTNrecords = DsStoreQueryBy(this.storeContainerType, 'CtnCode', e.value); if (CTNrecords.getCount() > 0) { var CTNdata = CTNrecords.getAt(0).data; e.record.set('ContainerType_Ref', CTNdata.CtnName); } else { e.record.set('ContainerType_Ref', ''); } } if (e.field == 'YardCode') { var Yardrecords = DsStoreQueryBy(this.storeYardCode, 'CustCode', e.value); if (Yardrecords.getCount() > 0) { var Yarddata = Yardrecords.getAt(0).data; e.record.set('YardCode_Ref', Yarddata.CodeAndName); } else { e.record.set('YardCode_Ref', ''); } } if (e.field == 'RtnYardCode') { var Yardrecords = DsStoreQueryBy(this.storeRtnYardCode, 'CustCode', e.value); if (Yardrecords.getCount() > 0) { var Yarddata = Yardrecords.getAt(0).data; e.record.set('RtnYardCode_Ref', Yarddata.CodeAndName); } else { e.record.set('RtnYardCode_Ref', ''); } } if (e.field == 'DrvCode') { var Yardrecords = DsStoreQueryBy(this.storeDrvName, 'DrvCode', e.value); if (Yardrecords.getCount() > 0) { var Yarddata = Yardrecords.getAt(0).data; e.record.set('DrvName', Yarddata.DrvName); } else { e.record.set('DrvName', ''); } } if (e.field == 'TruckNo') { var _datas = DsStoreQueryBy(this.storeTruckNo, 'TruckNo', e.value); if (_datas.getCount() > 0) { var _t = _datas.getAt(0).data; e.record.set('DrvCode', _t.DrvCode); e.record.set('DrvName', _t.DrvName); e.record.set('Mobile', _t.Mobile); } else { e.record.set('DrvCode', ""); e.record.set('DrvName', ""); e.record.set('Mobile', ""); } } if (e.field == 'F_CustomerName') { var _datas = DsStoreQueryBy(this.storeF_CustomerName, 'name', e.value); if (_datas.getCount() > 0) { var _t = _datas.getAt(0).data; e.record.set('DetiNation', _t.ADDR); } else { e.record.set('DrvName', ""); } } } , PCBeforeEdit: function (editor, e, eOpts) { /* if (e.field == 'TruckNo') {//箱号 if (e.value != "") { this.SearchTruckNo(e.value); } else */ this.SetTruckNo(); /* } */ } , SetTruckNo: function (_TRUCKNO) { var TruckNoList = []; for (i = 0; i < this.storeList.getCount(); i += 1) { var member = this.storeList.getAt(i); if (member.data.PCSTATUSREF != "完成" && member.data.TruckNo != "") { TruckNoList.push(member.data.TruckNo); } }; var records = []; this.storeTruckNo.each(function (r) { if (typeof (_TRUCKNO) != "undefined" && _TRUCKNO != null && _TRUCKNO.length != 0 && _TRUCKNO.length < 7 ) { if (r.data.TruckNo.indexOf(_TRUCKNO) != -1) { records.push(r.copy()); } } else records.push(r.copy()); }); this.storeTruckNoShow.removeAll(); //store2.add(records); if (TruckNoList.length > 0) { for (var j = 0; j < TruckNoList.length; j++) { //alert(TruckNoList[j]); for (var i = 0; i < records.length; i++) { var _R = records[i].data; if (TruckNoList[j] == _R.TruckNo) { records.splice(i, 1); } } } this.storeTruckNoShow.add(records); } else { this.storeTruckNoShow.add(records); } } , 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.ISQR == "0") { 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; } var myDate = new Date(); var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d'); var 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', value: mydatestr, 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 }); 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: [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(); } , 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 } , 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 == "提单签入") { 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 = ""; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if ((member.data.ISSUETYPE == "正本" && member.data.ISQR == "1") || 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 == "提单签入") { if (CUSTOMERNAME == "") { CUSTOMERNAME = member.data.CUSTOMERNAME; ETD = member.data.ETD; VESSEL = member.data.VESSEL; VOYNO = member.data.VOYNO; this.QCLIST.push(member); } else if (CUSTOMERNAME == member.data.CUSTOMERNAME && VESSEL == member.data.VESSEL && VOYNO == member.data.VOYNO) { this.QCLIST.push(member); } else { Ext.Msg.show({ title: '提示', msg: "只能同时签出相同委托单位、相同船名航次的提单。", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } } 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 }); this.winQCShow.show(); } } , onQCClick: function (REASON, QCDATE) { //提单签出动作 var jsonBody = ConvertRecordsToJsonAll(this.QCLIST); if (jsonBody == '') { 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 }, 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 });