You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/MvcShipping/Viewsjs/MsRptFeeStatus/MsRptFeeStatusIndex.js

1007 lines
39 KiB
JavaScript

2 years ago
//集运管理-路单查询
Ext.namespace('Shipping');
Shipping.MsRptFeeStatusIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsRptFeeStatusIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsRptFeeStatusIndex, Ext.Panel, {
PageSize: 30,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
sqlcontext: '1=2',
initUIComponents: function () {
//定义数据集
this.formname = 'MsRptFeeStatusIndex';
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'BSNO', type: 'string' },
{ name: 'OPLB', type: 'string' },
{ name: 'OPLBNAME', type: 'string' },
{ name: 'BSTYPE', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'MBLNO', type: 'string' },
{ name: 'HBLNO', type: 'string' },
{ name: 'ETD', 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: 'OP', type: 'string' },
{ name: 'DOC', 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: 'CNTRTOTAL', type: 'string' },
{ name: 'TRADETYPE', type: 'string' },
{ name: 'GOODSNAME', type: 'string' },
{ name: 'OPDATE', type: 'string' },
{ name: 'CUSTOMDATE', type: 'string' },
{ name: 'ENTERP', type: 'string' },
10 months ago
{ name: 'SALECORP', type: 'string' },
2 years ago
{ 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: 'RMBDR', type: 'number' },
{ name: 'RMBCR', type: 'number' },
{ name: 'USDDR', type: 'number' },
{ name: 'USDCR', type: 'number' },
{ name: 'OTDR', type: 'number' },
{ name: 'OTCR', type: 'number' },
{ name: 'TTLDR', type: 'number' },
{ name: 'TTLCR', type: 'number' },
{ name: 'RMBPROFIT', type: 'number' },
{ name: 'USDPROFIT', type: 'number' },
{ name: 'OTPROFIT', type: 'number' },
{ name: 'TTLPROFIT', type: 'number' },
{ name: 'PROFITRATE', type: 'string' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptFeeStatus/BsListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.initgirdcolumsfeedr= [{
sortable: true,
dataIndex: 'BSNO',
header:Zi.LAN.BSNO,
//header: '编号',
2 years ago
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'OPLBNAME',
header:Zi.LAN.OPLBNAME,
//header: '业务类型',
2 years ago
width: 70
}, {
sortable: true,
dataIndex: 'BSTYPE',
header:Zi.LAN.BSTYPE,
//header: '运输类型',
width: 70,
renderer:function(value,cellmeta){
switch (value){
case "仓储业务":
return Zi.LAN.仓储业务 ;
case "海运出口":
return Zi.LAN.海运出口 ;
case "海运进口":
return Zi.LAN.海运进口 ;
case "空运出口":
return Zi.LAN.空运出口 ;
case "空运进口":
return Zi.LAN.空运进口 ;
case "陆运派车单":
return Zi.LAN.陆运派车单 ;
default :
"" // 如果没有与表达式相同的值,则执行该代码
}
}
}, {
2 years ago
}, {
sortable: true,
dataIndex: 'OPDATE',
header:Zi.LAN.OPDATE,
//header: '业务日期',
2 years ago
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMDATE',
header:Zi.LAN.CUSTOMDATE,
//header: '报关日期',
2 years ago
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
header:Zi.LAN.CUSTOMERNAME,
//header: '委托单位',
2 years ago
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNO',
header:Zi.LAN.CUSTNO,
//header: '委托编号',
2 years ago
width: 136
}, {
sortable: true,
dataIndex: 'CUSTOMNO',
header:Zi.LAN.CUSTOMNO,
//header: '报关单号',
2 years ago
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
header:Zi.LAN.ENTERP,
//header: '经营单位',
2 years ago
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
header:Zi.LAN.MBLNO,
//header: '主提单号',
2 years ago
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
header:Zi.LAN.HBLNO,
//header: '分提单号',
2 years ago
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
header:Zi.LAN.ETD,
//header: '开船日期',
2 years ago
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
header:Zi.LAN.VESSEL,
//header: '船名',
2 years ago
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
header:Zi.LAN.VOYNO,
//header: '航次',
2 years ago
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
header:Zi.LAN.SALE,
//header: '业务员',
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'OP',
header:Zi.LAN.OP,
//header: '操作',
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
header:Zi.LAN.PORTLOAD,
//header: '起运港',
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
header:Zi.LAN.PORTDISCHARGE,
//header: '目的港',
2 years ago
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
header:Zi.LAN.ACCDATE,
//header: '会计期间',
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
header:Zi.LAN.CARRIER,
//header: '船公司',
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
header:Zi.LAN.BSSOURCE,
//header: '业务来源',
2 years ago
width: 120
}, {
sortable: true,
dataIndex: 'TEU',
header:Zi.LAN.TEU,
//header: 'TEU',
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
header:Zi.LAN.KGS,
//header: 'KGS',
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'GOODSNAME',
header:Zi.LAN.GOODSNAME,
//header: '品名',
2 years ago
width: 80
10 months ago
}, {
sortable: true,
dataIndex: 'SALECORP',
10 months ago
header: Zi.LAN.SALECORP,
10 months ago
width: 80
}, {
2 years ago
sortable: true,
dataIndex: 'RMBDR',
header:Zi.LAN.RMBDR,
//header: 'RMB应收',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBCR',
header:Zi.LAN.RMBCR,
//header: 'RMB应付',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBPROFIT',
header:Zi.LAN.RMBPROFIT,
//header: 'RMB利润',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDDR',
header:Zi.LAN.USDDR,
//header: 'USD应收',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDCR',
header:Zi.LAN.USDCR,
//header: 'USD应付',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDPROFIT',
header:Zi.LAN.USDPROFIT,
//header: 'USD利润',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTDR',
header:Zi.LAN.OTDR,
//header: '其他币别应收',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTCR',
header:Zi.LAN.OTCR,
//header: '其他币别应付',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTPROFIT',
header:Zi.LAN.OTPROFIT,
//header: '其他币别利润',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLDR',
header:Zi.LAN.TTLDR,
//header: '合计应收',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLCR',
header:Zi.LAN.TTLCR,
//header: '合计应付',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLPROFIT',
header:Zi.LAN.TTLPROFIT,
//header: '合计利润',
2 years ago
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'PROFITRATE',
header:Zi.LAN.PROFITRATE,
//header: '利润率',
2 years ago
width: 80
}
];
this.girdcolumsfeedr = DsTruck.GetGridPanel(USERID, this.formname, this.initgirdcolumsfeedr, 1);
//定义Grid
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },//msg: Zi.LAN.LOADING 数据加载中,请稍等...
2 years ago
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsfeedr ,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,//'当前显示 {0} - {1}条记录 /共 {2}条记录'
emptyMsg: Zi.LAN.emptyMsg//"没有数据"
2 years ago
})
});
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 = "";
openUrl = "../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO;
window.open(openUrl, openType, openSet);
}, this);
//#region formSearch
//#region formSearch枚举参照相关
10 months ago
this.StoreOpLb = Ext.create('DsExt.ux.RefEnumStore', {});
this.StoreOpLb.load({ params: { enumTypeId: 96005 } });
2 years ago
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:Zi.LAN.PS_OPLB,
//fieldLabel: '业务类型',
2 years ago
store: this.StoreOpLb,
forceSelection: true,
name: 'PS_OPLB',
10 months ago
valueField: 'EnumValueName',
displayField: Zi.LAN.displayField//'EnumValueName'
2 years ago
});
this.storeBsType = Ext.create('DsExt.ux.RefEnumStore', {});
this.storeBsType.load({ params: { enumTypeId: 96004} });
this.comboxBsType = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:Zi.LAN.PS_BSTYPE,
//fieldLabel: '运输类型',
2 years ago
store: this.storeBsType,
name: 'PS_BSTYPE',
valueField: 'EnumValueName',
displayField: Zi.LAN.displayField//'EnumValueName'
2 years ago
});
this.storeSalesCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
});
this.storeSalesCode.load();
this.comboxSalesCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:Zi.LAN.PS_SALE,
//fieldLabel: '揽货人',
2 years ago
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_SALE',
valueField: 'UserName',
displayField: 'CodeAndName'
});
this.comboxOp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:Zi.LAN.PS_OP,
//fieldLabel: '操 作',
2 years ago
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_OP',
valueField: 'UserName',
displayField: 'CodeAndName'
});
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:Zi.LAN.PS_CUSTOMERNAME,
//fieldLabel: '委托单位',
2 years ago
store: this.storeCustCode,
forceSelection: true,
name: 'PS_CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeEnterpCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomerRefModel',
proxy: { url: '/MvcShipping/MsBaseInfo/GetCustomerRefList' }
});
this.storeEnterpCode.load({ params: { condition: "ISENTERP='1'"} });
this.comboxEnterp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:Zi.LAN.ENTERP,
//fieldLabel: '经营单位',
2 years ago
store: this.storeEnterpCode,
forceSelection: true,
name: 'PS_ENTERP',
valueField: 'DESCRIPTION',
displayField: 'CodeAndName'
});
this.StoreFeeStatus = Ext.create('Ext.data.Store', {
fields: ['FeeStatus', 'Id']
});
this.StoreFeeStatus.add({ "FeeStatus": Zi.LAN.没录入收费业务, "Id": "1" });//"没录入收费业务"
this.StoreFeeStatus.add({ "FeeStatus": Zi.LAN.没录入付费业务, "Id": "2" });//"没录入付费业务"
this.StoreFeeStatus.add({ "FeeStatus": Zi.LAN.没录入费用业务, "Id": "3" });//"没录入费用业务"
this.StoreFeeStatus.add({ "FeeStatus": Zi.LAN.没提交费用业务, "Id": "4" });//"没提交费用业务"
this.StoreFeeStatus.add({ "FeeStatus": Zi.LAN.被驳回费用业务, "Id": "5" });//"被驳回费用业务"
this.StoreFeeStatus.add({ "FeeStatus": Zi.LAN.未审核费用业务, "Id": "6" });//"未审核费用业务"
this.StoreFeeStatus.add({ "FeeStatus": Zi.LAN.未结算费用业务, "Id": "7" });//"未结算费用业务"
2 years ago
this.comboxFeeStatus = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:Zi.LAN.fystate,
//fieldLabel: '费用状态',
2 years ago
store: this.StoreFeeStatus,
forceSelection: true,
name: 'PS_FEESTATUS',
valueField: 'Id',
displayField: 'FeeStatus'
});
//#endregion
this.formSearch = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxOpLb, {
fieldLabel:Zi.LAN.PS_MBLNO,
//fieldLabel: '编号',
2 years ago
name: 'PS_MBLNO'
}, {
fieldLabel:Zi.LAN.VESSEL,
//fieldLabel: '船名',
2 years ago
name: 'PS_VESSEL'
}, {
fieldLabel:Zi.LAN.VOYNO,
//fieldLabel: '航次',
2 years ago
name: 'PS_VOYNO'
}, {
fieldLabel:Zi.LAN.GOODSNAME,
//fieldLabel: '品名',
2 years ago
name: 'PS_GOODSNAME'
}, this.comboxOp
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxBsType, this.comboxSalesCode, this.comboxCustCode, {
fieldLabel:Zi.LAN.PS_EXPDATEBGN,
//fieldLabel: '从业务日期',
2 years ago
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEBGN'
}, {
fieldLabel:Zi.LAN.PS_EXPDATEEND,
//fieldLabel: '到业务日期',
2 years ago
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEEND'
}, this.comboxFeeStatus
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxEnterp, {
fieldLabel:Zi.LAN.PS_ETDDATEBGN,
//fieldLabel: '从ETD',
2 years ago
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_ETDDATEBGN'
}, {
fieldLabel:Zi.LAN.PS_ETDDATEEND,
//fieldLabel: '到ETD',
2 years ago
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_ETDDATEEND'
}, {
fieldLabel:Zi.LAN.PS_ACCDATEBGN,
//fieldLabel: '从会计期间',
2 years ago
xtype: 'monthfield',
name: 'PS_ACCDATEBGN'
}, {
fieldLabel:Zi.LAN.PS_ACCDATEEND,
//fieldLabel: '从会计期间',
2 years ago
xtype: 'monthfield',
name: 'PS_ACCDATEEND'
}, { xtype: 'hiddenfield' }
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
//#endregion formSearch
//查询工具条
_this = this;
this.SearchBtn = new Ext.Button({
text: Zi.LAN.HideQuery,
//text:'隐藏查询',
2 years ago
handler: function () {
if (_this.SearchBtn.text == Zi.LAN.HideQuery) {//'隐藏查询'
2 years ago
_this.panelSearch.hide();
_this.SearchBtn.setText(Zi.LAN.SearchBtn2);//"显示查询"
2 years ago
} else {
_this.panelSearch.show();
_this.SearchBtn.setText(Zi.LAN.HideQuery);//"隐藏查询"
2 years ago
}
}
});
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
{
text: Zi.LAN.Refresh,
//text:"执行查询",
2 years ago
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
},
scope: this
}, {
text: Zi.LAN.btnExportExcel,
//text:"导出Excel",
2 years ago
id: "btnExportExcel",
iconCls: 'btnexportexcel',
handler: function (button, event) {
this.onExportClick2(button, event);
},
scope: this
}, '-',
{
text: Zi.LAN.btnprint,
//text:"打印",
2 years ago
iconCls: 'btnprint',
handler: function (button, event) {
this.Print();
},
scope: this
}, '-', this.SearchBtn, {
xtype: 'button',
width: 90,
text: Zi.LAN.ClearSql,
//text:"清空条件",
2 years ago
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
10 months ago
}, '-', {
xtype: 'button',
10 months ago
text: Zi.LAN.DsQuery,
10 months ago
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
2 years ago
}, '-', {
text: Zi.LAN.SaveGrid,
//text:"保存列表样式",
2 years ago
id: "btntest",
menu: [
{
10 months ago
text: Zi.LAN.SaveGrid2,
//text:"保存列表",
2 years ago
handler: function (button, event) {
_this.onSaveGridClick(button, event);
}
}, {
10 months ago
text: Zi.LAN.InitGrid,
//text:"列表初始化",
2 years ago
handler: function (button, event) {
_this.oninitGridClick(button, event);
}
}],
scope: this
}
]
});
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 29,
items: [this.panelBtn]
});
this.panelSearch = new Ext.Panel({
layout: "border",
region: "north",
height: 96,
items: [this.formSearch]
});
this.panelBodyChFee = new Ext.Panel({
title: Zi.LAN.BodyChFee, //'业务明细'
2 years ago
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridList]
});
this.tabpanel = new Ext.TabPanel
({
activeTab: 0,
autoWidth: true,
border: false,
frame: false,
region: 'center',
id: "TabPanelID",
enableTabScroll: true,
items:
[
this.panelBodyChFee
]
});
Ext.apply(this, {
items: [this.panelTop, this.panelSearch, this.tabpanel]
});
this.storeList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
}, //end initUIComponents
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: Zi.LAN.NowSelect,//"正在查询数据...",
2 years ago
scope: this
});
},
getCondition: function () {
var form = this.formSearch.getForm();
var sql = '';
/*
var sqldata = form.getValues();
sql = Ext.JSON.encode(sqldata);
*/
var mblNo = form.findField('PS_MBLNO').getValue();
sql = sql + getAndConSql(sql, mblNo, " (B.CUSTNO like '%" + mblNo + "%' or B.MBLNO like '%" + mblNo + "%' or B.HBLNO like '%" + mblNo + "%' or B.CUSTOMNO like '%" + mblNo + "%' or B.ORDERNO like '%" + mblNo + "%') ");
var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, expDate_Min, " B.OPDATE>='" + expDate_Min + "'");
var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue();
sql = sql + getAndConSql(sql, expDate_Max, " B.OPDATE<='" + expDate_Max + " 23:59:59'");
var etdDate_Min = form.findField('PS_ETDDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, etdDate_Min, " B.ETD>='" + etdDate_Min + "'");
var etdDate_Max = form.findField('PS_ETDDATEEND').getRawValue();
sql = sql + getAndConSql(sql, etdDate_Max, " B.ETD<='" + etdDate_Max + " 23:59:59'");
var accDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, accDate_Min, " B.ACCDATE>='" + accDate_Min + "'");
var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
sql = sql + getAndConSql(sql, accDate_Max, " B.ACCDATE<='" + accDate_Max + "'");
var ENTERP = form.findField('PS_ENTERP').getValue();
sql = sql + getAndConSql(sql, ENTERP, "B.ENTERP='" + ENTERP + "'");
var FEESTATUS = form.findField('PS_FEESTATUS').getValue();
if (FEESTATUS == 1) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO NOT IN (Select distinct BSNO from ch_fee where feetype=1) ");
} if (FEESTATUS == 2) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO NOT IN (Select distinct BSNO from ch_fee where feetype=2) ");
} if (FEESTATUS == 3) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO NOT IN (Select distinct BSNO from ch_fee ) ");
} if (FEESTATUS == 4) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO IN (Select distinct BSNO from ch_fee where feestatus=1) ");
} if (FEESTATUS == 5) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO IN (Select distinct BSNO from ch_fee where feestatus=6) ");
} if (FEESTATUS == 6) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO IN (Select distinct BSNO from ch_fee where feestatus in (1,2,6)) ");
} if (FEESTATUS == 7) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO IN (Select distinct BSNO from ch_fee where feestatus<>9) ");
}
var CUSTOMERNAME = form.findField('PS_CUSTOMERNAME').getValue();
sql = sql + getAndConSql(sql, CUSTOMERNAME, "B.CUSTOMERNAME='" + CUSTOMERNAME + "'");
var SALE = form.findField('PS_SALE').getValue();
sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'");
var OP = form.findField('PS_OP').getValue();
sql = sql + getAndConSql(sql, OP, "B.OP='" + OP + "'");
var BSTYPE = form.findField('PS_BSTYPE').getValue();
sql = sql + getAndConSql(sql, BSTYPE, "B.BSTYPE='" + BSTYPE + "'");
var OPLB = form.findField('PS_OPLB').getValue();
sql = sql + getAndConSql(sql, OPLB, "B.OPLBNAME='" + OPLB + "'");
var VESSEL = form.findField('PS_VESSEL').getValue();
sql = sql + getAndConSql(sql, VESSEL, "B.VESSEL like '%" + VESSEL + "%'");
var VOYNO = form.findField('PS_VOYNO').getValue();
sql = sql + getAndConSql(sql, VOYNO, "B.VOYNO like '%" + VOYNO + "%'");
var GOODSNAME = form.findField('PS_GOODSNAME').getValue();
sql = sql + getAndConSql(sql, GOODSNAME, "B.GOODSNAME like '%" + GOODSNAME + "%'");
return sql;
},
checkSearchCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.SelectConditionValError);//'查询条件赋值错误,请检查。');
2 years ago
return false;
}
return true;
},
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
},
OprationSwap: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.SelectedRecord;
ret[3] = this.SelectedRecord.data.BSNO;
ret[4] = "MsRptFeeStatusIndex";
return ret;
}
,
onExportClick: function (button, event) {
GridExportExcelPage(this.gridList);
},
onExportClick2: function () {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
2 years ago
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
2 years ago
url: '/MvcShipping/MsRptFeeStatus/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true'
},
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 printType = 'MSRPTFEESTATUS';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname, Zi.LAN.fystate+'.xls');
2 years ago
}
} else {
Ext.Msg.show({ title: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
2 years ago
}
} else {
Ext.Msg.show({
title: Zi.LAN.Retry ,
msg: Zi.LAN.ServerResponseError,
2 years ago
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
}
,
onSaveGridClick: function (button, event) {
this.girdcolumsfeedr = DsTruck.SaveGridPanel(USERID, this.formname, this.gridList.columns, this.girdcolumsfeedr, 1, true);
},
oninitGridClick: function (button, event) {
this.gridList.reconfigure(this.storeList, this.initgirdcolumsfeedr);
this.girdcolumsfeedr = DsTruck.SaveGridPanel(USERID, this.formname, this.gridList.columns, this.initgirdcolumsfeedr, 1, true);
},
Print: function () {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
2 years ago
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
2 years ago
url: '/MvcShipping/MsRptOpProfit/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true'
},
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 printType = 'MSRPTPROFITLIST';
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: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
2 years ago
}
} else {
Ext.Msg.show({ title: Zi.LAN.Retry ,
msg: Zi.LAN.ServerResponseError,
2 years ago
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
}
});