//集运管理-路单查询 Ext.namespace('Shipping'); Shipping.MsOp_BLISSUESPIndex = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.MsOp_BLISSUESPIndex.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_BLISSUESPIndex, Ext.Panel, { PageSize: 50, stlPageSize:20, PageSizeDr: 20, OprationStatus: null, //仅当弹出界面时使用 SelectedRecord: null, sqlcontext: '1=2', initUIComponents: function () { this.formname = "MsOp_BLISSUESPIndex"; this.sqlcontext = '1=2'; this.stldrsql = ' 1=2 '; this.drsql = ' 1=2 '; this.bssql = ' 1=2 '; this.customername = '111'; this.selectsale = ''; this.dktype = '6'; this.selectbsno = ''; Ext.define('Tradermb', { extend: 'Ext.data.Model', idProperty: 'gid', fields: [ { name: 'gid', type: 'string' }, { name: 'name', type: 'string' }, { name: 'codename', type: 'string' } ] }); //#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: 1, queryParam: 'CODENAME', name: 'CUSTOMERNAME', valueField: 'CustName', displayField: 'CodeAndName' //,allowBlank: false }); //#endregion ///////////////////////////////////////// //#region 主列表 this.storeList_SP = Ext.create('Ext.data.Store', { pageSize: this.PageSize, model: 'MsOp_BLISSUEListmb', remoteSort: true, //groupField: 'GroupDate', proxy: { type: 'ajax', //url: '/TruckMng/MsRptPcHeadOperate/QryData_ADL', url: '/MvcShipping/MsOp_BLISSUE/GetSPList', //this.storeList.proxy.url = '/TruckMng/MsRptPcHeadOperate/QryData_ADL'; reader: { id: '', root: 'data', totalProperty: 'totalCount' } } }); this.column_SP = [ { sortable: true, //hidden:true, dataIndex: 'GID', header: '特殊放单申请编号', width: 130 }, { sortable: true, hidden: true, dataIndex: 'BSNO', header: 'BSNO', width: 80 }, { sortable: true, dataIndex: 'CUSTOMERNAME', header: '委托单位', width: 110 }, { sortable: true, //hidden: true, dataIndex: 'BLSTATUS', header: '特殊放单审核状态', width: 110 }, { sortable: true, //hidden: true, dataIndex: 'SPREMARK', header: '审核意见', width: 110 }, { sortable: true, //hidden: true, dataIndex: 'MBLSTATUS', 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: 'HBLSTATUS', 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: 'MNGBLSTATUS', header: '总经理复核状态', width: 110 }, { sortable: true, dataIndex: 'OPNAME', header: '最近操作人', width: 80 }, { sortable: true, dataIndex: 'OPTIME', header: '最近操作时间', width: 80 }, { sortable: true, dataIndex: 'REMARK', header: '申请说明', width: 200 }, { sortable: true, dataIndex: 'STLNAME', header: '客户结算方式', width: 100 }, { sortable: true, dataIndex: 'COMMITREMARK', header: '客户承诺付款日期', width: 100 }, { sortable: true, dataIndex: 'SALE', header: '揽货人', width: 80 }, { sortable: true, dataIndex: 'SALEDEPT', header: '销售部门', width: 80 }, { sortable: true, dataIndex: 'ISCHAOQI', header: '是否超期欠费', width: 100 }, { sortable: true, dataIndex: 'RMBNODR', header: 'RMB未收', width: 80 }, { sortable: true, dataIndex: 'USDNODR', header: 'USD未收', width: 80 }, { sortable: true, dataIndex: 'TTLNODR', header: '合计未收', width: 80 }, { sortable: true, dataIndex: 'MBLNO', header: '主提单号', width: 80 }, { sortable: true, dataIndex: 'CUSTNO', header: '委托编号', width: 80 }, { sortable: true, dataIndex: 'HBLNO', header: '分提单号', width: 80 }, { sortable: true, dataIndex: 'ETD', header: '开船日期', width: 80 }, { sortable: true, dataIndex: 'VESSEL', header: '船名', width: 80 }, { sortable: true, dataIndex: 'VOYNO', header: '航次', width: 80 }, { sortable: true, dataIndex: 'ETA', header: '到港日期', width: 80 }, { sortable: true, dataIndex: 'PORTLOAD', header: '起运港', width: 80 }, { sortable: true, dataIndex: 'PORTDISCHARGE', header: '卸货港', width: 80 }, { sortable: true, dataIndex: 'DESTINATION', header: '目的港', width: 80 }, { sortable: true, dataIndex: 'OP', header: '操作员', width: 80 }, { sortable: true, dataIndex: 'CNTRTOTAL', header: '集装箱', width: 80 } ]; this.cellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }); Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, { width: 40 }); this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); this.gridList_SP = new Ext.grid.GridPanel({ store: this.storeList_SP, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, selModel: this.GridCheckBoxModel, //selModel: this.MainCB, columns: this.column_SP, plugins: [ //this.cellEditing ], /*features: [{ id: 'group', ftype: 'grouping', groupHeaderTpl: '{name}', hideGroupedHeader: true, enableGroupingMenu: true }],*/ viewConfig: { enableTextSelection: true, //允许复制数据 autoFill: true }, bbar: Ext.create('Ext.PagingToolbar', { store: this.storeList_SP, displayInfo: true, displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: "没有数据" }) }); /////////////以下部分为获取存储的gridpanel显示样式 this.column_SP = DsTruck.GetGridPanel(USERID, this.formname, this.column_SP); //使用者id,表名 ,中间column数组 this.column_SP.unshift(new Ext.grid.RowNumberer()); this.gridList_SP.reconfigure(this.storeList_SP, this.column_SP); this.storeList_SP.on('beforeload', function (store) { var sql = this.sqlcontext; Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); //////////////////////////// //#endregion //#region 日志表 this.storeLog = Ext.create('Ext.data.Store', { pageSize: this.PageSize, model: 'DsShipping.ux.WorkLogmb', remoteSort: false, //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: 110 }, { sortable: true, dataIndex: 'ACTNAME', header: '动作', width: 110 }, { sortable: true, dataIndex: 'ACTRESULT', header: '结果', width: 80 }, { sortable: true, dataIndex: 'REMARK', header: '备注', width: 450 } ]; 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: "没有数据" }) }); //#endregion ////////////////////////////////////////////////////////////// //#region formSearch //#region formSearch枚举参照相关 //客户加载_委托单位 this.storeCustCode2 = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' } }); // this.storeCustCode2.load({ params: { condition: "ISCONTROLLER='1'"} }); //委托单位 this.comboxCustCode2 = Ext.create('DsExt.ux.RefTableCombox', { //fieldLabel: '委托单位', store: this.storeCustCode2, queryMode: 'remote', minChars: 1, queryParam: 'CODENAME', name: 'CUSTOMERNAME', valueField: 'CustName', displayField: 'CodeAndName' //,allowBlank: false }); this.storeBLSTATUS = Ext.create('Ext.data.Store', { fields: ['BLSTATUS'] }); this.storeBLSTATUS.add({ "BLSTATUS": "录入状态" }); this.storeBLSTATUS.add({ "BLSTATUS": "提交审核" }); this.storeBLSTATUS.add({ "BLSTATUS": "审核通过" }); this.storeBLSTATUS.add({ "BLSTATUS": "驳回提交" }); this.storeBLSTATUS.add({ "BLSTATUS": "仅需自己审核" }); this.storeBLSTATUS.add({ "BLSTATUS": "仅自己提交" }); this.storeBLSTATUS.add({ "BLSTATUS": "需复核业务" }); this.storeBLSTATUS.add({ "BLSTATUS": "已复核通过" }); this.storeBLSTATUS.add({ "BLSTATUS": "全部" }); this.comboxBLSTATUS = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '审核状态', store: this.storeBLSTATUS, flex: 1, forceSelection: true, name: 'BLSTATUS', valueField: 'BLSTATUS', displayField: 'BLSTATUS', value: '仅需自己审核', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.storeISBLSTATUS = Ext.create('Ext.data.Store', { fields: ['FSTATUS', 'NAME'] }); this.storeISBLSTATUS.add({ "FSTATUS": "", "NAME": "" }); this.storeISBLSTATUS.add({ "FSTATUS": "1", "NAME": "未签入" }); this.storeISBLSTATUS.add({ "FSTATUS": "2", "NAME": "签入未签出" }); this.storeISBLSTATUS.add({ "FSTATUS": "状态更改", "NAME": "状态更改" }); this.storeISBLSTATUS.add({ "FSTATUS": "放单通知", "NAME": "放单通知" }); this.storeISBLSTATUS.add({ "FSTATUS": "更改提单", "NAME": "更改提单" }); this.storeISBLSTATUS.add({ "FSTATUS": "提单签出", "NAME": "提单签出" }); this.storeISBLSTATUS.add({ "FSTATUS": "提单签入", "NAME": "提单签入" }); this.storeISBLSTATUS.add({ "FSTATUS": "扣单", "NAME": "扣单" }); this.storeISBLSTATUS.add({ "FSTATUS": "未签出", "NAME": "未签出" }); this.comboxISBLSTATUS = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '提单状态', store: this.storeISBLSTATUS, valueField: 'FSTATUS', displayField: 'NAME', forceSelection: true, name: 'ISBLSTATUS', value: '', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.CheckAll = new Ext.form.Checkbox({ fieldLabel: '显示欠费和结算', //仅需审核业务 labelWidth: 105, checked: false, width: 120 }); this.CheckAll.addListener('change', function (field, newValue, oldValue, eOpts) { this.CheckChange(field, newValue, oldValue, eOpts); }, this); //人员信息加载 this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); this.storeSaleCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.UserRefModel', proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' } }); this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '揽货人', //'揽货人', store: this.storeSaleCode, forceSelection: true, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', name: 'SALE', valueField: 'UserName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); //操 作 this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '操作', //'操 作', store: this.storeOpCode, queryMode: 'remote', minChars: 0, queryParam: 'CODENAME', forceSelection: true, name: 'OP', valueField: 'UserName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { keyup: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', { model: 'DsShipping.ux.CustomRefModel', proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' } }); // this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} }); this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: '委托单位', store: this.storeCustCode, forceSelection: true, queryMode: 'remote', minChars: 1, queryParam: 'CODENAME', name: 'CUSTOMERNAME', valueField: 'CustName', displayField: 'CodeAndName', enableKeyEvents: true, listeners: { specialkey: 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(); } } } }); //#endregion this.formSearch_SP = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 60, msgTarget: 'qtip' }, items: [ {//fieldset 1 xtype: 'container', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, items: [{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [{ fieldLabel: '申请单号', name: 'BSNO', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } },{ fieldLabel: '编号', name: 'MBLNO', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, this.comboxBLSTATUS , { fieldLabel: '从开船日期', format: 'Y-m-d', labelWidth: 75, xtype: 'datefield', name: 'ETD_BGN', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, { fieldLabel: '到开船日期', format: 'Y-m-d', labelWidth: 75, xtype: 'datefield', name: 'ETD_END', enableKeyEvents: true, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }, this.comboxISBLSTATUS, this.CheckAll] }, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxCustCode, this.comboxSALE, this.comboxOP, this.comboxOpType,{ xtype: 'hiddenfield' }, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' }] } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items }); //#endregion formSearch this.CheckSaveQuery = new Ext.form.Checkbox({ fieldLabel: '记忆查询', labelWidth: 60, flex: 0.4, checked: true }); this.panelBtn = new Ext.Panel({ region: "north", tbar: [ { text: "新建", id: "btnadd", iconCls: "btnadd", handler: function (button, event) { this.OprationStatus = 'add'; DsOpenEditWin('/MvcShipping/MsOp_BLISSUE/Edit_SP', "编辑特殊放单申请"); }, scope: this }, { text: "删除", id: "btndelete", 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); saveQuerySetting(this.formname, this.formSearch_SP, true, true); }, scope: this }, '-', { text: "提交审核", id: "SP_Start", handler: function (button, event) { this.onSP_StartClick(); }, scope: this }, { text: "撤回提交", id: "SP_Back", tooltip: '取消特殊放单审请', handler: function (button, event) { this.onSP_BackClick(button, event); }, scope: this }, '-', { text: "审核通过", id: "SP_Audit", //iconCls: "btnrefresh", handler: function (button, event) { this.winAuditShow.show(); }, scope: this }, { text: "审核驳回", id: "SP_AuditBack", handler: function (button, event) { this.winAuditBackShow.show(); }, scope: this }, '-', { text: "复核通过", id: "MNGSP_Audit", //iconCls: "btnrefresh", handler: function (button, event) { this.onMNGSP_AuditClick(); }, scope: this }, { text: "复核驳回", id: "MNGSP_AuditBack", handler: function (button, event) { this.onMNGSP_AuditBackClick(); }, scope: this }, { text: "扣单", id: "LOCKBL", iconCls: 'edit_down', menu: [ { text: '扣单(主单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onKDClick('1'); } }, { text: '扣单(分单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onKDClick('2'); } }, { text: '解除扣单(主单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onKDClick('3'); } }, { text: '解除扣单(分单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onKDClick('4'); } }], scope: this }, { text: "提单签人(出)", id: "TDQR", iconCls: 'edit_down', menu: [ { text: '提单签入(主单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onQRClick('1'); } }, { text: '提单签入(分单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onQRClick('2'); } }, { text: '取消签入(主单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onUnQRClick('3'); } }, { text: '取消签入(分单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onUnQRClick('4'); } }, { text: '提单签出(主单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onQCClick_1('1'); } }, { text: '提单签出(分单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onQCClick_1('2'); } }, { text: '取消签出(主单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onQXQCClick('3'); } }, { text: '取消签出(分单)', //"保存", iconCls: 'btislock', handler: function (button, event) { _this.onQXQCClick('4'); } }], 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 }, /*{ 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_SP.columns; DsTruck.SaveGridPanel(USERID, formname, tempcolumns, this.column_SP, 0, false); }, scope: this } //,this.CB_EditMode ] }); //选择load var isloadfee = true; this.gridList_SP.getSelectionModel().on('select', function (model, record, index) { if (!isloadfee) return; var BSNO = record.data.GID; if (this.selectbsno == BSNO) return; this.selectbsno = BSNO; Ext.getCmp("BLINFO").setValue(""); var SALE = record.data.SALE; this.customername = record.data.CUSTOMERNAME; this.selectsale = SALE; isloadfee = false; if (BSNO != "") { this.storeLog.load({ params: { condition: " (BSNO='" + BSNO + "' or PBSNO IN (select BSNO from op_blissuelist_detail where linkgid='" + BSNO + "')) "} }); //载入相关信息 写入右下格子 Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO', params: { BSNO: BSNO, CUSTOMERNAME: this.customername }, callback: function (options, success, response) { if (success) { isloadfee = true; var result = Ext.JSON.decode(response.responseText); if (result.Success) { // Ext.getCmp("BLINFO").setValue(result.data[0].InfoText); Ext.getCmp("BLINFO").update(result.data[0].InfoText); } else { //return; } } else { return; } }, scope: this }); this.storeBlInfoList.load({ params: { SALE: this.selectsale, CUSTNAME: this.customername } }); if (this.CheckAll.checked) { this.onReStlDr(); this.onReDr(); this.onReBs(); } else { this.storeListstlDr.removeAll(); this.storeListDr.removeAll(); this.storeBillList.removeAll(); // this.storeBlInfoList.removeAll(); } } else { this.storeLog.removeAll(); this.storeBlInfoList.removAll(); } // }, 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: 120 }, { sortable: true, dataIndex: 'USDNODR', header: 'USD应收欠费(超期)', width: 120 }, { sortable: true, dataIndex: 'OTNODR', header: '其他应收欠费(超期)', width: 120 }, { sortable: true, dataIndex: 'TTLNODR', header: '合计应收欠费(超期)', width: 120 } ] }); this.panelBlInfoList = new Ext.Panel({ title: '欠费信息', // layout: "border", region: 'south', height: 170, //margin: '5 10', // frame: true, items: [this.gridBlInfoList] }); this.formInfo = Ext.widget('form', { region: 'east', width: 700, frame: true, bodyPadding: 2, 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: 'textareafield', height: 60, id: "BLINFO", anchor: '100%' }] }, this.panelBlInfoList] }] }); //#region this.storeListstlDr = Ext.create('Ext.data.Store', { pageSize: this.stlPageSize, fields: [ { name: 'BSNO', type: 'string' }, { name: 'OPTYPE', type: 'string' }, { name: 'OPLBNAME', type: 'string' }, { name: 'BSTYPE', type: 'string' }, { name: 'CUSTOMERNAME', type: 'string' }, { name: 'CUSTNAME', type: 'string' }, { name: 'CUSTNO', type: 'string' }, { name: 'MBLNO', type: 'string' }, { name: 'HBLNO', type: 'string' }, { name: 'VESSEL', type: 'string' }, { name: 'VOYNO', type: 'string' }, { name: 'INPUTBY', type: 'string' }, { name: 'CREATETIME', type: 'string' }, { name: 'BSSTATUS', type: 'string' }, { name: 'SALE', type: 'string' }, { name: 'STLDATE', type: 'string' }, { name: 'NODAY', type: 'string' }, { name: 'OP', type: 'string' }, { name: 'DOC', type: 'string' }, { name: 'ETD', type: 'string' }, { name: 'OPDATE', type: 'string' }, { name: 'ENTERP', type: 'string' }, { name: 'CUSTOMDATE', type: 'string' }, { name: 'CUSTSERVICE', type: 'string' }, { name: 'PORTLOAD', type: 'string' }, { name: 'PORTDISCHARGE', type: 'string' }, { name: 'CUSTOMNO', type: 'string' }, { name: 'ACCDATE', type: 'string' }, { name: 'CARRIER', type: 'string' }, { name: 'BSSOURCE', type: 'string' }, { name: 'LANE', type: 'string' }, { name: 'FORWARDER', type: 'string' }, { name: 'NETWEIGHT', type: 'string' }, { name: 'KGS', type: 'string' }, { name: 'TEU', type: 'string' }, { name: 'CNTRTOTAL', type: 'string' }, { name: 'CORPID', type: 'string' }, { name: 'TRADETYPE', type: 'string' }, { name: 'GOODSNAME', type: 'string' }, { name: 'FEESTATUS', type: 'string' }, { name: 'FEESTATUSREF', type: 'string' }, { name: 'BILLNO', type: 'string' }, { name: 'SETTLETIME', type: 'string' }, { name: 'SETTLENO', type: 'string' }, { name: 'SETTLEUSERREF', type: 'string' }, { name: 'SETTLETYPEREF', type: 'string' }, { name: 'ACCOUNTRMBREF', type: 'string' }, { name: 'ACCOUNTUSDREF', type: 'string' }, { name: 'RMBDR', type: 'number' }, { name: 'RMBCR', type: 'number' }, { name: 'USDDR', type: 'number' }, { name: 'USDCR', type: 'number' }, { name: 'OTDR', type: 'number' }, { name: 'OTCR', type: 'number' } ], remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsRptFeeSettleStatus/BsListData', reader: { id: '', root: 'data', totalProperty: 'totalCount' } } }); this.stlPagenum = Ext.create('Ext.form.field.Number', { name: 'bottles', fieldLabel: '每页记录数', labelAlign: 'right', value: this.PageSize, maxValue: 100000, width: 170, minValue: 0, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { // _this.onRefreshClick(); } } } }) //#region 单票业务统计 this.initgirdcolumsstldr = [{ sortable: true, hidden: true, dataIndex: 'BSNO', header: '业务编号', width: 80 }, { sortable: true, dataIndex: 'OPTYPE', header: '更改单', width: 80 }, { sortable: true, dataIndex: 'OPLBNAME', header: '业务类型', width: 80 }, { sortable: true, dataIndex: 'CUSTOMERNAME', header: '委托单位', width: 80 }, { sortable: true, dataIndex: 'CUSTNAME', header: '结算单位', width: 80 }, { sortable: true, dataIndex: 'CUSTNO', header: '委托编号', width: 80 }, { sortable: true, dataIndex: 'MBLNO', header: '主提单号', width: 80 }, { sortable: true, dataIndex: 'HBLNO', header: '分提单号', width: 80 }, { sortable: true, dataIndex: 'VESSEL', header: '船名', width: 80 }, { sortable: true, dataIndex: 'VOYNO', header: '航次', width: 80 }, { sortable: true, dataIndex: 'BILLNO', header: '结算单号', width: 80 }, { sortable: true, dataIndex: 'STLDATE', header: '应结日期', width: 80 }, { sortable: true, dataIndex: 'SETTLETIME', header: '结算日期', width: 80 }, { sortable: true, dataIndex: 'NODAY', header: '超期天数', width: 80 }, { sortable: true, dataIndex: 'SETTLENO', header: '相关号码', width: 80 }, { sortable: true, dataIndex: 'SETTLEUSERREF', header: '结算人', width: 80 }, { sortable: true, dataIndex: 'SETTLETYPEREF', header: '结算方式', width: 80 }, { sortable: true, dataIndex: 'ACCOUNTRMBREF', header: 'RMB银行', width: 100 }, { sortable: true, dataIndex: 'ACCOUNTUSDREF', header: 'USD银行', width: 100 }, { sortable: true, dataIndex: 'INPUTBY', header: '录入人', width: 80 }, { sortable: true, dataIndex: 'CREATETIME', header: '录入时间', width: 80 }, { sortable: true, hidden: true, dataIndex: 'BSSTATUS', header: 'BSSTATUS', width: 80 }, { sortable: true, dataIndex: 'SALE', header: '业务员', width: 80 }, { sortable: true, dataIndex: 'OP', header: '操作', width: 80 }, { sortable: true, hidden: true, dataIndex: 'DOC', header: 'DOC', width: 80 }, { sortable: true, dataIndex: 'ETD', header: '开船日期', width: 80 }, { sortable: true, dataIndex: 'OPDATE', header: '业务日期', width: 80 }, { sortable: true, dataIndex: 'ENTERP', header: '经营单位', width: 80 }, { sortable: true, dataIndex: 'CUSTOMDATE', header: '报关日期', width: 80 }, { sortable: true, hidden: true, dataIndex: 'CUSTSERVICE', header: 'CUSTSERVICE', width: 80 }, { sortable: true, dataIndex: 'PORTLOAD', header: '起运港', width: 80 }, { sortable: true, dataIndex: 'PORTDISCHARGE', header: '目的港', width: 80 }, { sortable: true, hidden: true, dataIndex: 'CUSTOMNO', header: 'CUSTOMNO', width: 80 }, { sortable: true, dataIndex: 'ACCDATE', header: '会计期间', width: 80 }, { sortable: true, dataIndex: 'CARRIER', header: '船公司', width: 80 }, { sortable: true, dataIndex: 'BSSOURCE', header: '业务来源', width: 80 }, { sortable: true, hidden: true, dataIndex: 'LANE', header: 'LANE', width: 80 }, { sortable: true, hidden: true, dataIndex: 'FORWARDER', header: 'FORWARDER', width: 80 }, { sortable: true, hidden: true, dataIndex: 'NETWEIGHT', header: 'NETWEIGHT', width: 80 }, { sortable: true, dataIndex: 'KGS', header: 'KGS', width: 80 }, { sortable: true, dataIndex: 'TEU', header: 'TEU', width: 80 }, { sortable: true, hidden: true, dataIndex: 'CNTRTOTAL', header: 'CNTRTOTAL', width: 80 }, { sortable: true, hidden: true, dataIndex: 'CORPID', header: 'CORPID', width: 80 }, { sortable: true, hidden: true, dataIndex: 'TRADETYPE', header: 'TRADETYPE', width: 80 }, { sortable: true, dataIndex: 'GOODSNAME', header: '品名', width: 80 }, { sortable: true, hidden: true, dataIndex: 'FEESTATUS', header: 'FEESTATUS', width: 80 }, { sortable: true, dataIndex: 'FEESTATUSREF', header: '费用锁定', width: 80 }, { sortable: true, dataIndex: 'RMBDR', header: 'RMB实收', width: 80 }, { sortable: true, dataIndex: 'RMBCR', header: 'RMB实付', width: 80 }, { sortable: true, dataIndex: 'USDDR', header: 'USD实收', width: 80 }, { sortable: true, dataIndex: 'USDCR', header: 'USD实付', width: 80 }, { sortable: true, dataIndex: 'OTDR', header: '其他实收', width: 80 }, { sortable: true, dataIndex: 'OTCR', header: '其他实付', width: 80 } ]; this.girdcolumsstldr = DsTruck.GetGridPanel(USERID, this.formname + 'stldr', this.initgirdcolumsstldr, 1); this.gridListStlDr = new Ext.grid.GridPanel({ store: this.storeListstlDr, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, columns: this.girdcolumsstldr, // paging bar on the bottom bbar: [Ext.create('Ext.PagingToolbar', { store: this.storeListstlDr, displayInfo: true, displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: "没有数据" }), this.stlPagenum] }); this.gridListStlDr.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 = ""; openUrl = "../../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO; window.open(openUrl, openType, openSet); // DsOpenEditWin("/TruckMng/MsWlPc/Edit"); }, this); this.panelBodyStlDr = new Ext.Panel({ title: '结算统计', layout: "border", region: 'center', margin: '0 0', frame: true, items: [this.gridListStlDr] }); this.storeListstlDr.on('beforeload', function (store) { var sql = this.stldrsql; Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); //#endregion //#endregion //#region 欠费统计 this.storeListDr = Ext.create('Ext.data.Store', { pageSize: this.PageSize, fields: [ { name: 'BSNO', type: 'string' }, { name: 'OPLB', type: 'string' }, { name: 'OPLBNAME', type: 'string' }, { name: 'ORDERNO', type: 'string' }, { name: 'BSTYPE', type: 'string' }, { name: 'OPTYPE', type: 'string' }, { name: 'BLTYPE', type: 'string' }, { name: 'CUSTOMERNAME', type: 'string' }, { name: 'CUSTNO', type: 'string' }, { name: 'MBLNO', type: 'string' }, { name: 'HBLNO', type: 'string' }, { name: 'ETD', type: 'string' }, { name: 'ACTUALDAY', type: 'number' }, { name: 'NODAY', type: 'number' }, { name: 'CONTRACTDAY', type: 'string' }, { name: 'DELIVERYDATE', type: 'string' }, { name: 'STLNAME', type: 'string' }, { name: 'STLDATE', type: 'string' }, { name: 'VESSEL', type: 'string' }, { name: 'VOYNO', type: 'string' }, { name: 'YARD', type: 'string' }, { name: 'INPUTBY', type: 'string' }, { name: 'CREATETIME', type: 'string' }, { name: 'BSSTATUSREF', type: 'string' }, { name: 'FEESTATUSREF', type: 'string' }, { name: 'DRFEESTATUSREF', type: 'string' }, { name: 'CRFEESTATUSREF', type: 'string' }, { name: 'BLISSUESTATUS', type: 'string' }, { name: 'SALE', type: 'string' }, { name: 'OP', type: 'string' }, { name: 'DOC', type: 'string' }, { name: 'CUSTSERVICE', type: 'string' }, { name: 'PORTLOAD', type: 'string' }, { name: 'PORTDISCHARGE', type: 'string' }, { name: 'DESTINATION', type: 'string' }, { name: 'CUSTOMNO', type: 'string' }, { name: 'ACCDATE', type: 'string' }, { name: 'CARRIER', type: 'string' }, { name: 'BSSOURCE', type: 'string' }, { name: 'LANE', type: 'string' }, { name: 'FORWARDER', type: 'string' }, { name: 'CNTRTOTAL', type: 'string' }, { name: 'TRADETYPE', type: 'string' }, { name: 'GOODSNAME', type: 'string' }, { name: 'OPDATE', type: 'string' }, { name: 'CUSTOMDATE', type: 'string' }, { name: 'ENTERP', type: 'string' }, { name: 'NETWEIGHT', type: 'number' }, { name: 'KGS', type: 'number' }, { name: 'TEU', type: 'number' }, { name: 'CNTR1', type: 'number' }, { name: 'CNTR2', type: 'number' }, { name: 'CNTR3', type: 'number' }, { name: 'CNTR4', type: 'number' }, { name: 'CNTR5', type: 'number' }, { name: 'CNTR6', type: 'number' }, { name: 'CNTR7', type: 'number' }, { name: 'CNTR8', type: 'number' }, { name: 'CNTR9', type: 'number' }, { name: 'CNTR10', type: 'number' }, { name: 'OTCNTR', type: 'number' }, { name: 'PKGS', type: 'number' }, { name: 'CBM', type: 'number' }, { name: 'CUSTNAME', type: 'string' }, { name: 'CUSTFULLNAME', type: 'string' }, { name: 'INVOICENO', type: 'string' }, { name: 'SALECORP', type: 'string' }, { name: 'RMBDR', type: 'number' }, { name: 'RMBCR', type: 'number' }, { name: 'STLRMBDR', type: 'number' }, { name: 'STLRMBCR', type: 'number' }, { name: 'BALRMBDR', type: 'number' }, { name: 'BALRMBCR', type: 'number' }, { name: 'USDDR', type: 'number' }, { name: 'USDCR', type: 'number' }, { name: 'STLUSDDR', type: 'number' }, { name: 'STLUSDCR', type: 'number' }, { name: 'BALUSDDR', type: 'number' }, { name: 'BALUSDCR', type: 'number' }, { name: 'OTDR', type: 'number' }, { name: 'OTCR', type: 'number' }, { name: 'STLOTDR', type: 'number' }, { name: 'STLOTCR', type: 'number' }, { name: 'BALOTDR', type: 'number' }, { name: 'BALOTCR', type: 'number' }, { name: 'TTLDR', type: 'number' }, { name: 'TTLCR', type: 'number' }, { name: 'INVUSD', type: 'number' }, { name: 'INVRMB', type: 'number' }, { name: 'STLTTLDR', type: 'number' }, { name: 'STLTTLCR', type: 'number' }, { name: 'BALTTLDR', type: 'number' }, { name: 'BALTTLCR', type: 'number' }, { name: 'ORDERRMBDR', type: 'number' }, { name: 'ORDERRMBCR', type: 'number' }, { name: 'ORDERUSDDR', type: 'number' }, { name: 'ORDERUSDCR', type: 'number' }, { name: 'ORDEROTDR', type: 'number' }, { name: 'ORDEROTCR', type: 'number' }, { name: 'ORDERTTLDR', type: 'number' }, { name: 'ORDERTTLCR', type: 'number' }, { name: 'PROFITRATE', type: 'string' } ], remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsRptNoTotal/BsListData', timeout: 120000, reader: { id: '', root: 'data', totalProperty: 'totalCount' } } }); //定义Grid this.initgirdcolumsdr = [{ sortable: true, dataIndex: 'BSNO', header: '编号', hidden: true, width: 130 }, { sortable: true, dataIndex: 'ACCDATE', header: '会计期间', width: 80 }, { sortable: true, dataIndex: 'CUSTNAME', header: '结算客户', width: 80 }, { sortable: true, dataIndex: 'CUSTNO', header: '委托编号', width: 136 }, { sortable: true, dataIndex: 'ETD', header: '开船日期', width: 86 }, { sortable: true, dataIndex: 'STLDATE', header: '应结日期', width: 86 }, { sortable: true, dataIndex: 'NODAY', header: '超期天数', width: 86 }, { sortable: true, dataIndex: 'RMBDR', header: 'RMB应收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'STLRMBDR', header: 'RMB已收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'BALRMBDR', header: 'RMB未收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'ORDERRMBDR', header: 'RMB应收申请', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'USDDR', header: 'USD应收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'STLUSDDR', header: 'USD已收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'BALUSDDR', header: 'USD未收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'ORDERUSDDR', header: 'USD应收申请', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'OTDR', header: '其他币别应收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'STLOTDR', header: '其他币别已收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'BALOTDR', header: '其他币别未收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'ORDEROTDR', header: '其他币别应收申请', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'TTLDR', header: '合计应收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'STLTTLDR', header: '合计已收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'BALTTLDR', header: '合计未收', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'ORDERTTLDR', header: '合计应收申请', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'INVRMB', header: 'RMB开票金额', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'INVUSD', header: 'USD开票金额', renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, align: 'right', width: 80 }, { sortable: true, dataIndex: 'PROFITRATE', header: '利润率', width: 80, renderer: function (value, meta) { if (value != 0) value = value + '%'; return value; } } ]; this.girdcolumsdr = DsTruck.GetGridPanel(USERID, this.formname + 'dr', this.initgirdcolumsdr, 1); this.PagenumDr = Ext.create('Ext.form.field.Number', { name: 'bottles', fieldLabel: '每页记录数', labelAlign: 'right', value: this.PageSize, maxValue: 100000, width: 180, minValue: 0, listeners: { specialkey: function (field, e) { if (e.getKey() == e.ENTER) { _this.onRefreshClick(); } } } }); this.gridListDr = new Ext.grid.GridPanel({ store: this.storeListDr, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, viewConfig: { enableTextSelection: true, autoFill: true }, columns: this.girdcolumsdr, // paging bar on the bottom bbar: [Ext.create('Ext.PagingToolbar', { store: this.storeListDr, displayInfo: true, displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: "没有数据" }), this.PagenumDr] }); this.gridListDr.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 = ""; openUrl = "../../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO; window.open(openUrl, openType, openSet); // DsOpenEditWin("/TruckMng/MsWlPc/Edit"); }, this); this.panelBodyChFee = new Ext.Panel({ title: '欠费信息', layout: "border", region: 'center', margin: '0 0', frame: true, items: [this.gridListDr] }); this.storeListDr.on('beforeload', function (store) { var sql = this.drsql; Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); //#endregion //#region this.storeBillList = Ext.create('Ext.data.Store', { pageSize: this.PageSize, model: 'MsChFeedoBill', remoteSort: true, proxy: { type: 'ajax', timeout: 120000, url: '/MvcShipping/MsOp_BLISSUE/GetBLListData', reader: { id: 'BSNO', root: 'data', totalProperty: 'totalCount' } } }); this.initgirdcolumsbill = [{ sortable: true, dataIndex: 'BSNO', header: 'BSNO', hidden: true, width: 100 }, { sortable: true, dataIndex: 'CUSTNO', header: '委托编号', width: 120 }, { sortable: true, dataIndex: 'MBLNO', header: '主提单号', width: 120 }, { sortable: true, dataIndex: 'HBLNO', header: '分提单号', width: 120 }, { sortable: true, dataIndex: 'CUSTOMNO', header: '报关单号', width: 120 }, { sortable: true, id: '', align: 'center', dataIndex: 'BSSTATUSREF', header: '业务锁定', width: 60, renderer: function (value, cellmeta) { if (value == '锁定') { return ""; } } }, { sortable: true, id: '', align: 'center', dataIndex: 'FEESTATUSREF', header: '费用锁定', width: 60, renderer: function (value, cellmeta) { if (value == '锁定') { return ""; } } }, { sortable: true, id: '', dataIndex: 'DRFEESTATUS', header: '应收费用', align: 'center', width: 60, 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_refer'; } else if (value == '结算完毕') { meta.tdCls = 'feestatus_settle'; } else if (value == '未录入') { } else if (value == '部分结算') { meta.tdCls = 'feestatus_settle'; } else if (value == '部分审核') { meta.tdCls = 'feestatus_pass'; } else if (value == '部分提交') { meta.tdCls = 'feestatus_refer'; } return value; } }, { sortable: true, id: '', dataIndex: 'CRFEESTATUS', header: '应付费用', align: 'center', width: 60, 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_refer'; } else if (value == '结算完毕') { meta.tdCls = 'feestatus_settle'; } else if (value == '未录入') { } else if (value == '部分结算') { meta.tdCls = 'feestatus_settle'; } else if (value == '部分审核') { meta.tdCls = 'feestatus_pass'; } else if (value == '部分提交') { meta.tdCls = 'feestatus_refer'; } return value; } }, { sortable: true, dataIndex: 'OPSTATUS', header: '费用状态', width: 180 }, { sortable: true, dataIndex: 'CUSTOMERNAME', header: '委托单位', width: 100 }, { sortable: true, dataIndex: 'ETD', header: '开船日期', renderer: Ext.util.Format.dateRenderer('Y-m-d'), width: 100 }, { sortable: true, dataIndex: 'SALE', header: '揽货人', width: 80 }, { sortable: true, dataIndex: 'CNTRTOTAL', header: '集装箱', width: 120 }, { sortable: true, dataIndex: 'ACCDATE', header: '会计期间', width: 80 }, { sortable: true, dataIndex: 'BSSOURCE', header: '业务来源', width: 80 }, { sortable: true, dataIndex: 'ENTERP', header: '经营单位', width: 80 }, { sortable: true, dataIndex: 'REMARK', header: '备注', width: 80 }, { sortable: true, dataIndex: 'OP', header: '操作', width: 80 }, { sortable: true, dataIndex: 'INPUTBY', header: '录入人', width: 80 }, { sortable: true, dataIndex: 'PORTLOAD', header: '起运港', width: 120 }, { sortable: true, dataIndex: 'PORTDISCHARGE', header: '目的港', width: 120 }, { sortable: true, dataIndex: 'VESSEL', header: '船名', width: 150 }, { sortable: true, dataIndex: 'VOYNO', header: '航次', width: 60 }, { sortable: true, dataIndex: 'CUSTOMSNUM', header: '报关项数', width: 60 }, { sortable: true, dataIndex: 'PKGS', header: '件数', width: 60 }, { sortable: true, dataIndex: 'KGS', header: '重量', width: 60 }, { sortable: true, dataIndex: 'CBM', header: '尺码', width: 60 } ]; this.girdcolumsbill = this.initgirdcolumsbill; _this = this; this.gridBillList = new Ext.grid.GridPanel({ store: this.storeBillList, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, viewConfig: { enableTextSelection: true }, disableSelection: false, tbar: [{ text: "保存列表样式", id: "btntestbody", menu: [ { text: "保存", handler: function (button, event) { _this.girdcolumsbill = DsTruck.SaveGridPanel(USERID, _this.formname + 'bill', _this.gridBillList.columns, _this.girdcolumsbill, 1, true); } }, { text: "初始化", handler: function (menu, event) { _this.girdcolumsbill = DsTruck.SaveGridPanel(USERID, _this.formname + 'bill', _this.gridBillList.columns, _this.initgirdcolumsbill, 1, true); } }], scope: this }], columns: this.girdcolumsbill, // paging bar on the bottom bbar: [Ext.create('Ext.PagingToolbar', { store: this.storeBillList, displayInfo: true, displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', emptyMsg: "没有要审核的数据" })] }); this.girdcolumsbill = DsTruck.GetGridPanel(USERID, this.formname + 'bill', this.girdcolumsbill, 1); //使用者id,表名,中间column数组,跳过一开始的几列 this.gridBillList.reconfigure(this.storeBillList, this.girdcolumsbill); this.gridBillList.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 = ""; openUrl = "../../MvcShipping/MsOpSeae/EditView?handle=check&bsno=" + record.data.BSNO; window.open(openUrl, openType, openSet); // DsOpenEditWin("/TruckMng/MsWlPc/Edit"); }, this); this.storeBillList.on('beforeload', function (store) { var sql = this.bssql; Ext.apply(store.proxy.extraParams, { condition: sql }); }, this); this.panelBillList = new Ext.Panel({ layout: "border", region: 'center', title: '此客户未签单业务', split: true, margin: '2 2', items: [this.gridBillList] }); //#endregion //#region 布局 this.panelTop = new Ext.Panel({ layout: "border", region: "north", height: 105, items: [this.formSearch_SP, this.panelBtn] }); this.panelContract = new Ext.Panel({ //title: '', layout: "border", region: 'center', height: 600, margin: '1 2', split: true, items: [this.gridList_SP] }); this.panelLogList = new Ext.Panel({ title: '日志', layout: "border", region: 'center', //height: 300, margin: '1 1', split: true, items: [this.gridList_Log, this.formInfo] }); this.MainTab = new Ext.tab.Panel({ layout: "border", region: 'south', height: 300, margin: '1 1', split: true, items: [this.panelLogList, this.panelBodyStlDr, this.panelBodyChFee, this.panelBillList ] }); Ext.apply(this, { items: [this.panelTop, this.panelContract, this.MainTab] }); //#endregion //#region 以下集中绑定事件 /* this.cellEditing.on('beforeedit', function (editor, e) { //alert("beforeedit"); return this.PCBeforeEdit(editor, e); }, this); */ //#endregion this.LoadInitData(); this.formReason = 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: '备注', id: "REASON", xtype: 'textfield', name: 'REASON', width: 400, listeners: { change: function (field, eOpts) { if (field.lastValue != "") { //this.formHead.getForm().findField('STOCKDATE_1').setValue(field.rawValue); } }, scope: this } }] }); this.formReason2 = 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: '备注', id: "REASON2", xtype: 'textfield', name: 'REASON', width: 400, listeners: { change: function (field, eOpts) { if (field.lastValue != "") { //this.formHead.getForm().findField('STOCKDATE_1').setValue(field.rawValue); } }, scope: this } }] }); var _this2 = this; this.winAuditShow = Ext.create('Ext.window.Window', { id: "winAuditShow", 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.formReason], buttons: [ { text: "确定", minWidth: 70, handler: function () { _this2.onSP_AuditClick(Ext.getCmp("REASON").getRawValue()); } }, { text: "取消", minWidth: 70, handler: function () { _this2.winAuditShow.Close(); } }] }); this.winAuditBackShow = Ext.create('Ext.window.Window', { id: "winAuditBackShow", 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.formReason2], buttons: [ { text: "确定", minWidth: 70, handler: function () { _this2.onSP_AuditBackClick(Ext.getCmp("REASON2").getRawValue()); } }, { text: "取消", minWidth: 70, handler: function () { _this2.winAuditShow.Close(); } }] }); var btnAudit = Ext.getCmp('SP_Audit'); var btnAuditBack = Ext.getCmp('SP_AuditBack'); var LOCKBL = Ext.getCmp('LOCKBL'); var TDQR = Ext.getCmp('TDQR'); Ext.Ajax.request({ waitMsg: '正在添加数据...', url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable', params: { modulename: 'MsOp_BLISSUE_SP' }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (result.Success) { btnAudit.setVisible(true); btnAuditBack.setVisible(true); LOCKBL.setVisible(true); TDQR.setVisible(true); } else { btnAudit.setVisible(false); btnAuditBack.setVisible(false); LOCKBL.setVisible(false); TDQR.setVisible(false); } } }, scope: this }); this.gridList_SP.addListener('itemdblclick', function (dataview, record, item, index, e, b) { //var selections = this.gridList_SP.getSelectionModel().getSelection(); //var _record = selections[0]; //this.SelectedRecord = _record; //this.OprationStatus = 'edit'; //DsOpenEditWin('/MvcShipping/MsOp_BLISSUE/Edit_SP', "编辑特殊放单申请"); this.SelectedRecord = record; this.OprationStatus = 'edit'; DsOpenEditWin('/MvcShipping/MsOp_BLISSUE/Edit_SP', record.data.GID); }, this); var btnMNGAuditPass = Ext.getCmp('MNGSP_Audit'); var btnMNGAuditBack = Ext.getCmp('MNGSP_AuditBack'); Ext.Ajax.request({ waitMsg: '', url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable', params: { modulename: "MNGSP_AUDIT" }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (result.Success != true) { btnMNGAuditPass.setVisible(false); btnMNGAuditBack.setVisible(false); LOCKBL.setVisible(false); TDQR.setVisible(false); } else { btnMNGAuditPass.setVisible(true); btnMNGAuditBack.setVisible(true); LOCKBL.setVisible(true); TDQR.setVisible(true); } } else { } }, scope: this }); LoadQueryData(this.formname, this.formSearch_SP, this.CheckSaveQuery); var myDate = new Date(); var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d'); this.formReasonQC = 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: "REASONQC", 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.formReasonQC], 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(); } }, { 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 }); }, //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_SP.load({ params: { start: 0, limit: this.PageSize, condition: sql }, waitMsg: "正在查询数据...", scope: this }); //} }, CheckChange: function (field, newValue, oldValue, eOpts) { if (this.CheckAll.checked) { this.onReStlDr(); this.onReDr(); this.onReBs(); this.storeBlInfoList.load({ params: { SALE: this.selectsale, CUSTNAME: this.customername } }); } else { this.storeListstlDr.removeAll(); this.storeListDr.removeAll(); this.storeBillList.removeAll(); this.storeBlInfoList.removeAll(); } }, onDsQuery: function (button, event) { var sql = this.sqlcontext; this.storeList_SP.load({ params: { start: 0, limit: this.PageSize, condition: sql }, waitMsg: "正在查询数据...", scope: this }); //} }, onDeleteClick: function (button, event) { var selections = this.gridList_SP.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_SP.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_SP.getForm(); var sql = ''; //20170309 增加逻辑 // //只能看到“” var BSNO = form.findField('BSNO').getValue(); sql = sql + getAndConSql(sql, BSNO, " GID like '%" + BSNO + "%' "); // var MBLNO = form.findField('MBLNO').getValue(); // sql = sql + getAndConSql(sql, MBLNO, " EXISTS (SELECT 1 FROM g.MBLNO+g.HBLNO+g.CUSTNO like '%" + MBLNO + "%' "); var MBLNO = form.findField('MBLNO').getValue(); sql = sql + getAndConSql(sql, MBLNO, " ob.GID in(select LINKGID from op_blissuelist_Detail where BSNO in(select BSNO from v_op_blissue_bill where MBLNO+HBLNO+CUSTNO like '%" + MBLNO + "%')) "); var BLSTATUS = form.findField('BLSTATUS').getValue(); if (BLSTATUS == "仅需自己审核") { sql = sql + getAndConSql(sql, BLSTATUS, " dbo.[GetUsingStep](wu.WORKFLOWID,wu.currentid,'" + USERID + "',wu.stepno)>0 "); } else if (BLSTATUS == "仅自己提交") { sql = sql + getAndConSql(sql, BLSTATUS, " wu.OP = '" + USERID + "' "); } else if (BLSTATUS == "需复核业务") { sql = sql + getAndConSql(sql, BLSTATUS, " ob.BLSTATUS = '审核通过' and ob.MNGBLSTATUS='录入状态' "); } else if (BLSTATUS == "已复核通过") { sql = sql + getAndConSql(sql, BLSTATUS, " ob.MNGBLSTATUS='审核通过' "); } else if (BLSTATUS == "全部") { } else { sql = sql + getAndConSql(sql, BLSTATUS, " ob.BLSTATUS = '" + BLSTATUS + "' "); } var ETD_BGN = form.findField('ETD_BGN').getRawValue(); sql = sql + getAndConSql(sql, ETD_BGN, " g.ETD>='" + ETD_BGN + "'"); var ETD_END = form.findField('ETD_END').getRawValue(); sql = sql + getAndConSql(sql, ETD_END, " g.ETD<='" + ETD_END + " 23:59:59'"); var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue(); sql = sql + getAndConSql(sql, CUSTOMERNAME, " g.CUSTOMERNAME='" + CUSTOMERNAME + "'"); var SALE = form.findField('SALE').getValue(); sql = sql + getAndConSql(sql, SALE, " g.SALE='" + SALE + "'"); var OP = form.findField('OP').getValue(); sql = sql + getAndConSql(sql, OP, " g.OP='" + OP + "'"); var OPTYPE = form.findField('OPTYPE').getValue(); sql = sql + getAndConSql(sql, OPTYPE, " g.OPTYPE='" + OPTYPE + "'"); var BLSTATUS = form.findField('ISBLSTATUS').getValue(); if (BLSTATUS == '1') { sql = sql + getAndConSql(sql, BLSTATUS, " NOT EXISTS (SELECT 1 FROM worklog l left join op_blissuelist_Detail d on (d.BSNO=l.PBSNO) where d.LINKGID=ob.GID and L.ACTNAME='提单签入') "); } else if (BLSTATUS == '未签出') { sql = sql + getAndConSql(sql, BLSTATUS, " NOT EXISTS (SELECT 1 FROM worklog l left join op_blissuelist_Detail d on (d.BSNO=l.PBSNO) where d.LINKGID=ob.GID and L.ACTNAME='提单签出') "); } else if (BLSTATUS == '2') { sql = sql + getAndConSql(sql, BLSTATUS, " EXISTS (SELECT 1 FROM worklog l left join op_blissuelist_Detail d on (d.BSNO=l.PBSNO) where d.LINKGID=ob.GID and L.ACTNAME='提单签入') AND NOT EXISTS (SELECT 1 FROM worklog l left join op_blissuelist_Detail d on (d.BSNO=l.PBSNO) where d.LINKGID=ob.GID and L.ACTNAME='提单签出') "); } else if (BLSTATUS == '解除扣单') { sql = sql + getAndConSql(sql, BLSTATUS, " EXISTS (SELECT 1 FROM worklog l left join op_blissuelist_Detail d on (d.BSNO=l.PBSNO) where d.LINKGID=ob.GID and L.ACTNAME='取消扣单') "); } else if (BLSTATUS != '') { sql = sql + getAndConSql(sql, BLSTATUS, " EXISTS (SELECT 1 FROM op_blissue B left join op_blissuelist_Detail d on (d.BSNO=B.BSNO) where d.LINKGID=ob.GID and isnull(B.BLSTATUS, '') = '" + BLSTATUS + "') "); } return sql; }, checkSearchCondition: function () { var form = this.formSearch_SP.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_SP; ret[2] = this.SelectedRecord; if (this.OprationStatus == "add") { ret[3] = ""; } else { ret[3] = this.SelectedRecord.data.BSNO; } return ret; }, onReStlDr: function () { var myDate = new Date(); var enddatestr = myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" + myDate.getDate(); myDate.setTime(myDate.getTime() - 24 * 60 * 60 * 1000*180); var begindatestr = myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" + myDate.getDate(); var sql = "B.CUSTOMERNAME='" + this.customername + "' AND F.FEETYPE=1 "; sql = sql + getAndConSql(sql, begindatestr, " s.SETTLETIME>='" + begindatestr + "'"); sql = sql + getAndConSql(sql, enddatestr, " s.SETTLETIME<='" + enddatestr + " 23:59:59'"); this.stldrsql = sql; this.stlPageSize = this.stlPagenum.getValue(); this.storeListstlDr.currentPage = 1; this.storeListstlDr.pageSize = this.stlPageSize; this.storeListstlDr.load({ params: { start: 0, limit: this.stlPageSize, condition: sql, sortstr:" S.SETTLETIME DESC " }, waitMsg: "正在查询数据...", scope: this }); }, onReDr: function () { this.drsql = " B.CUSTOMERNAME='" + this.customername + "' and F.AMOUNT<>F.SETTLEMENT and f.FEETYPE=1 "; this.PageSizeDr = this.PagenumDr.getValue(); this.storeListDr.currentPage = 1; this.storeListDr.pageSize = this.PageSizeDr; this.storeListDr.load({ params: { start: 0, limit: this.PageSizeDr, condition: this.drsql }, waitMsg: "正在查询数据...", scope: this }); }, onReBs: function () { this.bssql = "CUSTOMERNAME='" + this.customername + "' AND op_seae.ETD>='2021-01-01' and isnull(op_seae.ISCANCEL,0)<>1 AND NOT EXISTS (SELECT 1 FROM op_blissue WHERE op_seae.BSNO=op_blissue.BSNO and op_blissue.BLSTATUS='提单签出') " + " AND NOT EXISTS (SELECT 1 FROM v_op_blissuelist_Detail d WHERE op_seae.BSNO=d.BSNO and d.BLSTATUS='审核通过') "; this.storeBillList.load({ params: { start: 0, limit: 100, condition: this.bssql }, waitMsg: "正在查询数据...", scope: this }); }, onKDClick: function (kdtype) { //this.onSaveClick(); var selections = this.gridList_SP.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/KDSP', params: { data: jsonBody, kdtype: kdtype }, callback: function (options, success, response) { if (success) { this.storeList_SP.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 }, onQRClick: function (kdtype) { //this.onSaveClick(); var selections = this.gridList_SP.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; } 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/QRSP', params: { USERID: USERID, data: jsonBody, qrdate: QRDATE, reason: QRREASON, kdtype: kdtype }, callback: function (options, success, response) { if (success) { winQRShow.close(); _this.storeList_SP.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 () { winQRShow.close(); } }] }); winQRShow.show(); }, onUnQRClick: function (kdtype) { //this.onSaveClick(); var selections = this.gridList_SP.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/UnQRSP', params: { data: jsonBody, kdtype: kdtype }, callback: function (options, success, response) { if (success) { this.storeList_SP.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 }, onQCClick_1: function (kdtype) { this.QCLIST = []; var selections = this.gridList_SP.getSelectionModel().getSelection(); var bodyList = []; var BSNO = ""; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); if (BSNO == "") { BSNO = "'" + member.data.PBSNO + "'" } else { BSNO = BSNO + ",'" + member.data.PBSNO + "'"; } }; var jsonBody = ConvertRecordsToJsonAll(bodyList); if (jsonBody == '') { return; } Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO', 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); Ext.getCmp("FDINFO").update(_html); //alert(Ext.getCmp("FDINFO").html); } else { //return; } } else { return; } }, scope: this }); Ext.Ajax.request({ waitMsg: '正在锁定...', url: '/MvcShipping/MsOp_BLISSUE/ISFDTZSP', params: { data: jsonBody, kdtype: kdtype }, callback: function (options, success, response) { if (success) { var result = Ext.JSON.decode(response.responseText); if (!result.Success) { Ext.MessageBox.confirm('提示', '操作没有通知放单,是否继续?', function (btn) { if (btn == 'yes') { _this.dktype = kdtype; Ext.getCmp('REASON').setValue(''); _this.winQCShow.show(); } }, this); } else { this.dktype = kdtype; Ext.getCmp('REASON').setValue(''); _this.winQCShow.show(); } } else { Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); } }, scope: this }); }, onQCClick: function (REASON, QCDATE) { //提单签出动作 var selections = this.gridList_SP.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; bodyList.push(member); }; var jsonBody = ConvertRecordsToJsonAll(bodyList); Ext.Ajax.request({ waitMsg: '正在提交数据...', url: '/MvcShipping/MsOp_BLISSUE/QCSP', params: { USERID: USERID, data: jsonBody, REASON: REASON, qcdate: QCDATE, kdtype: this.dktype }, callback: function (options, success, response) { if (success) { this.winQCShow.close(); Ext.getCmp("FDINFO").html = ""; this.storeList_SP.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 }, 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; }, onSP_StartClick: function () { //this.onSaveClick(); var selections = this.gridList_SP.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/SP_Start', 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 } , onSP_BackClick: function () { var selections = this.gridList_SP.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/SP_Back', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { //this.winAuditShow.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 } , onSP_AuditClick: function (REASON) { //this.onSaveClick(); var selections = this.gridList_SP.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/SP_Audit', params: { USERID: USERID, data: jsonBody, REASON: REASON }, callback: function (options, success, response) { if (success) { this.winAuditShow.close(); Ext.getCmp("REASON").setValue(""); this.storeList_SP.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 }, onExportClick: function (button, event) { GridExportExcelPage(this.gridList_SP); }, onSP_AuditBackClick: function (REASON) { //this.onSaveClick(); var selections = this.gridList_SP.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/SP_AuditBack', params: { USERID: USERID, data: jsonBody, REASON: REASON }, callback: function (options, success, response) { if (success) { this.winAuditBackShow.close(); Ext.getCmp("REASON2").setValue(""); this.storeList_SP.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 } , onMNGSP_AuditClick: function () { //this.onSaveClick(); var selections = this.gridList_SP.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.BLSTATUS == '审核通过') 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/MNGSP_Audit', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.storeList_SP.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 } , onMNGSP_AuditBackClick: function () { //this.onSaveClick(); var selections = this.gridList_SP.getSelectionModel().getSelection(); var bodyList = []; for (i = 0; i < selections.length; i += 1) { var member = selections[i]; if (member.data.MNGBLSTATUS == '审核通过') 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/MNGSP_AuditBack', params: { USERID: USERID, data: jsonBody }, callback: function (options, success, response) { if (success) { this.storeList_SP.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 } });