|
|
|
|
//发票综合统计
|
|
|
|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
|
|
|
|
Shipping.MsRptChInvTotalIndex = function (config) {
|
|
|
|
|
Ext.applyIf(this, config);
|
|
|
|
|
this.initUIComponents();
|
|
|
|
|
window.Shipping.MsRptChInvTotalIndex.superclass.constructor.call(this);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ext.extend(Shipping.MsRptChInvTotalIndex, Ext.Panel, {
|
|
|
|
|
PageSize: 2000,
|
|
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
|
|
SelectedRecord: null,
|
|
|
|
|
sqlcontext: '1=2',
|
|
|
|
|
bslistdrsortfield: '',
|
|
|
|
|
bslistdrsortdire: '',
|
|
|
|
|
bslistcrsortfield: '',
|
|
|
|
|
bslistcrsortdire: '',
|
|
|
|
|
bslistinvsortfield: '',
|
|
|
|
|
bslistinvsortdire: '',
|
|
|
|
|
feelistcrsortfield: '',
|
|
|
|
|
feelistcrsortdire: '',
|
|
|
|
|
salesumsortfield: '',
|
|
|
|
|
salesumsortdire: '',
|
|
|
|
|
custsumsortfield: '',
|
|
|
|
|
custsumsortdire: '',
|
|
|
|
|
vesselsumsortfield: '',
|
|
|
|
|
vesselsumsortdire: '',
|
|
|
|
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
|
//定义数据集
|
|
|
|
|
|
|
|
|
|
this.formname = 'MsRptChInvTotalIndex';
|
|
|
|
|
this.storeListDr = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'BSNO', type: 'string' },
|
|
|
|
|
{ name: 'INVOICENO', type: 'string' },
|
|
|
|
|
{ name: 'INVOICEMAKETIME', type: 'string' },
|
|
|
|
|
{ name: 'INVOICECUSTNAME', 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: 'FEESTATUSREF', 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' },
|
|
|
|
|
{ name: 'NETWEIGHT', type: 'number' },
|
|
|
|
|
{ name: 'KGS', type: 'number' },
|
|
|
|
|
{ name: 'TEU', type: 'number' },
|
|
|
|
|
{ name: 'CUSTNAME', type: 'string' },
|
|
|
|
|
{ name: 'TTLRMB', type: 'number' },
|
|
|
|
|
{ name: 'INVRMB', type: 'number' },
|
|
|
|
|
{ name: 'TTLUSD', type: 'number' },
|
|
|
|
|
{ name: 'INVUSD', type: 'number' }
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptChInvTotal/BsListData',
|
|
|
|
|
reader: {
|
|
|
|
|
id: '',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
|
|
name: 'bottles',
|
|
|
|
|
fieldLabel: '每页记录数',
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
value: this.PageSize,
|
|
|
|
|
maxValue: 100000,
|
|
|
|
|
width: 170,
|
|
|
|
|
minValue: 0
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.initgirdcolumsdr = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BSNO',
|
|
|
|
|
header: '编号',
|
|
|
|
|
hidden: true,
|
|
|
|
|
width: 130
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVOICENO',
|
|
|
|
|
header: '发票号',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVOICEMAKETIME',
|
|
|
|
|
header: '开票日期',
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVOICECUSTNAME',
|
|
|
|
|
header: '发票抬头',
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTNAME',
|
|
|
|
|
header: '结算客户',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OPLBNAME',
|
|
|
|
|
header: '业务类型',
|
|
|
|
|
width: 70
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BSTYPE',
|
|
|
|
|
header: '运输类型',
|
|
|
|
|
width: 70
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OPDATE',
|
|
|
|
|
header: '业务日期',
|
|
|
|
|
width: 86
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTOMDATE',
|
|
|
|
|
header: '报关日期',
|
|
|
|
|
width: 86
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
|
|
header: '委托单位',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTNO',
|
|
|
|
|
header: '委托编号',
|
|
|
|
|
width: 136
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'FEESTATUSREF',
|
|
|
|
|
header: '费用锁定',
|
|
|
|
|
width: 68
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ENTERP',
|
|
|
|
|
header: '经营单位',
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MBLNO',
|
|
|
|
|
header: '主提单号',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'HBLNO',
|
|
|
|
|
header: '分提单号',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ETD',
|
|
|
|
|
header: '开船日期',
|
|
|
|
|
width: 86
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'VESSEL',
|
|
|
|
|
header: '船名',
|
|
|
|
|
width: 200
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'VOYNO',
|
|
|
|
|
header: '航次',
|
|
|
|
|
width: 50
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALE',
|
|
|
|
|
header: '业务员',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OP',
|
|
|
|
|
header: '操作',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTSERVICE',
|
|
|
|
|
header: '客服',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
|
|
header: '起运港',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'PORTDISCHARGE',
|
|
|
|
|
header: '目的港',
|
|
|
|
|
width: 150
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ACCDATE',
|
|
|
|
|
header: '会计期间',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CARRIER',
|
|
|
|
|
header: '船公司',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BSSOURCE',
|
|
|
|
|
header: '业务来源',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TEU',
|
|
|
|
|
header: 'TEU',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'KGS',
|
|
|
|
|
header: 'KGS',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
|
|
header: '品名',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
this.girdcolumsdr = DsTruck.GetGridPanel(USERID, this.formname + 'dr', this.initgirdcolumsdr, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridListDr = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeListDr,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: this.girdcolumsdr,
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeListCr,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
|
|
emptyMsg: "没有数据"
|
|
|
|
|
}), this.Pagenum]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.gridListDr.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
|
|
this.bslistdrsortfield = column.dataIndex;
|
|
|
|
|
this.bslistdrsortdire = direction;
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeListInv = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'GID', type: 'string' },
|
|
|
|
|
{ name: 'BILLNO', type: 'string' },
|
|
|
|
|
{ name: 'CUSTOMERNAME', type: 'string' },
|
|
|
|
|
{ name: 'ACTUALCUSTOMERNAME', type: 'string' },
|
|
|
|
|
{ name: 'CURRENCY', type: 'string' },
|
|
|
|
|
{ name: 'INVOICENO', type: 'string' },
|
|
|
|
|
{ name: 'INVOICECUSTNAME', type: 'string' },
|
|
|
|
|
{ name: 'INVOICETYPE', type: 'number' },
|
|
|
|
|
{ name: 'INVOICETYPEREF', type: 'string' },
|
|
|
|
|
{ name: 'BILLSTATUS', type: 'number' },
|
|
|
|
|
{ name: 'BILLSTATUSREF', type: 'string' },
|
|
|
|
|
{ name: 'INVOICECATEGORY', type: 'string' },
|
|
|
|
|
{ name: 'INVOICECATEGORYREF', type: 'string' },
|
|
|
|
|
{ name: 'AMOUNT', type: 'number' },
|
|
|
|
|
{ name: 'INVRMB', type: 'number' },
|
|
|
|
|
{ name: 'INVUSD', type: 'number' },
|
|
|
|
|
{ name: 'INVAMOUNT', type: 'number' },
|
|
|
|
|
{ name: 'OTCURRAMOUNT', type: 'number' },
|
|
|
|
|
{ name: 'EXCHANGERATE', type: 'number' },
|
|
|
|
|
{ name: 'AMOUNTCAPITAL', type: 'string' },
|
|
|
|
|
{ name: 'APPLICANT', type: 'string' },
|
|
|
|
|
{ name: 'APPLICANTNAME', type: 'string' },
|
|
|
|
|
{ name: 'APPLYTIME', type: 'string' },
|
|
|
|
|
{ name: 'OPERATOR', type: 'string' },
|
|
|
|
|
{ name: 'OPERATORNAME', type: 'string' },
|
|
|
|
|
{ name: 'OPERATETIME', type: 'string' },
|
|
|
|
|
{ name: 'INVOICEMAKETIME', type: 'string' },
|
|
|
|
|
{ name: 'COMPANYID', type: 'string' },
|
|
|
|
|
{ name: 'BSNO', type: 'string' },
|
|
|
|
|
{ name: 'MBLNO', type: 'string' },
|
|
|
|
|
{ name: 'VESSELVOYAGE', type: 'string' },
|
|
|
|
|
{ name: 'ETD', type: 'string' },
|
|
|
|
|
{ name: 'POL', type: 'string' },
|
|
|
|
|
{ name: 'POD', type: 'string' },
|
|
|
|
|
{ name: 'CUSTRATENO', type: 'string' },
|
|
|
|
|
{ name: 'CUSTADDRTEL', type: 'string' },
|
|
|
|
|
{ name: 'CUSTBANK', type: 'string' },
|
|
|
|
|
{ name: 'BANK', type: 'string' },
|
|
|
|
|
{ name: 'ACCOUNT', type: 'string' },
|
|
|
|
|
{ name: 'LICENSECODE', type: 'string' },
|
|
|
|
|
{ name: 'TAXCODE', type: 'string' },
|
|
|
|
|
{ name: 'VOUCHERNO', type: 'string' },
|
|
|
|
|
{ name: 'ISNEEDPRINT', type: 'string' },
|
|
|
|
|
{ name: 'ISNEEDFEE', type: 'string' },
|
|
|
|
|
{ name: 'ISDELETE', type: 'string' },
|
|
|
|
|
{ name: 'DELETEOPERATOR', type: 'string' },
|
|
|
|
|
{ name: 'DELOPERATORNAME', type: 'string' },
|
|
|
|
|
{ name: 'DELETETIME', type: 'string' },
|
|
|
|
|
{ name: 'REMARK', type: 'string' }
|
|
|
|
|
],
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptChInvTotal/InvListData',
|
|
|
|
|
reader: {
|
|
|
|
|
id: '',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
|
|
name: 'bottles',
|
|
|
|
|
fieldLabel: '每页记录数',
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
value: this.PageSize,
|
|
|
|
|
maxValue: 100000,
|
|
|
|
|
width: 170,
|
|
|
|
|
minValue: 0
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
|
|
|
|
|
this.initgirdcolumsinv = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVOICETYPEREF',
|
|
|
|
|
header: '发票类别',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BILLSTATUSREF',
|
|
|
|
|
header: '发票锁定',
|
|
|
|
|
width: 60
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BILLNO',
|
|
|
|
|
header: '发票业务编号',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVOICENO',
|
|
|
|
|
header: '发票号',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
|
|
header: '开票单位',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVOICECUSTNAME',
|
|
|
|
|
header: '发票抬头',
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CURRENCY',
|
|
|
|
|
header: '币别',
|
|
|
|
|
width: 60
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVAMOUNT',
|
|
|
|
|
header: '开票金额',
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 100,
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVRMB',
|
|
|
|
|
header: 'RMB实际金额',
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 100,
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVUSD',
|
|
|
|
|
header: 'USD实际金额',
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 100,
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ISNEEDPRINT',
|
|
|
|
|
header: '是否打印',
|
|
|
|
|
width: 60
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ISNEEDFEE',
|
|
|
|
|
header: '是否结算',
|
|
|
|
|
width: 60
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVOICEMAKETIME',
|
|
|
|
|
header: '开票日期',
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OPERATORNAME',
|
|
|
|
|
header: '开票人',
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'REMARK',
|
|
|
|
|
header: '备注',
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ISDELETE',
|
|
|
|
|
header: '是否作废',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'DELOPERATORNAME',
|
|
|
|
|
header: '作废人',
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'DELETETIME',
|
|
|
|
|
header: '作废时间',
|
|
|
|
|
width: 100
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
this.girdcolumsinv = DsTruck.GetGridPanel(USERID, this.formname + 'inv', this.initgirdcolumsinv, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridListInv = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeListInv,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: this.girdcolumsinv,
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeListInv,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
|
|
emptyMsg: "没有数据"
|
|
|
|
|
}), this.Pagenum]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.gridListCr.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.gridListInv.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
|
|
this.bslistinvsortfield = column.dataIndex;
|
|
|
|
|
this.bslistinvsortdire = direction;
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeSaleList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
fields: [
|
|
|
|
|
|
|
|
|
|
{ name: 'SALE', type: 'string' },
|
|
|
|
|
{ name: 'FEETYPEREF', type: 'string' },
|
|
|
|
|
{ name: 'TTLRMB', type: 'number' },
|
|
|
|
|
{ name: 'INVRMB', type: 'number' },
|
|
|
|
|
{ name: 'BALINVRMB', type: 'number' },
|
|
|
|
|
{ name: 'STLRMB', type: 'number' },
|
|
|
|
|
{ name: 'INVNOSTLRMB', type: 'number' },
|
|
|
|
|
{ name: 'STLNOINVRMB', type: 'number' },
|
|
|
|
|
{ name: 'TTLUSD', type: 'number' },
|
|
|
|
|
{ name: 'INVUSD', type: 'number' },
|
|
|
|
|
{ name: 'BALINVUSD', type: 'number' },
|
|
|
|
|
{ name: 'STLUSD', type: 'number' },
|
|
|
|
|
{ name: 'INVNOSTLUSD', type: 'number' },
|
|
|
|
|
{ name: 'STLNOINVUSD', type: 'number' },
|
|
|
|
|
{ name: 'TTL', type: 'number' },
|
|
|
|
|
{ name: 'TTLINV', type: 'number' },
|
|
|
|
|
{ name: 'BALINVTTL', type: 'number' },
|
|
|
|
|
{ name: 'STLTTL', type: 'number' },
|
|
|
|
|
{ name: 'INVNOSTL', type: 'number' },
|
|
|
|
|
{ name: 'STLNOINV', type: 'number' }
|
|
|
|
|
],
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptInvTotal/SaleListData',
|
|
|
|
|
reader: {
|
|
|
|
|
id: '',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.initgirdcolumssale = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALE',
|
|
|
|
|
header: '业务员',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'FEETYPEREF',
|
|
|
|
|
header: '收付类型',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BALINVRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVNOSTLRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLNOINVRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BALINVUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVNOSTLUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLNOINVUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTL',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLINV',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BALINVTTL',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLTTL',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVNOSTL',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLNOINV',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
this.girdcolumssale = DsTruck.GetGridPanel(USERID, this.formname + 'sale', this.initgirdcolumssale, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridListSale = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeSaleList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: this.girdcolumssale,
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeSaleList,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
|
|
emptyMsg: "没有数据"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.gridListSale.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
|
|
this.salesumsortfield = column.dataIndex;
|
|
|
|
|
this.salesumsortdire = direction;
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeCustList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'CUSTNAME', type: 'string' },
|
|
|
|
|
{ name: 'FEETYPEREF', type: 'string' },
|
|
|
|
|
{ name: 'TTLRMB', type: 'number' },
|
|
|
|
|
{ name: 'INVRMB', type: 'number' },
|
|
|
|
|
{ name: 'BALINVRMB', type: 'number' },
|
|
|
|
|
{ name: 'STLRMB', type: 'number' },
|
|
|
|
|
{ name: 'INVNOSTLRMB', type: 'number' },
|
|
|
|
|
{ name: 'STLNOINVRMB', type: 'number' },
|
|
|
|
|
{ name: 'TTLUSD', type: 'number' },
|
|
|
|
|
{ name: 'INVUSD', type: 'number' },
|
|
|
|
|
{ name: 'BALINVUSD', type: 'number' },
|
|
|
|
|
{ name: 'STLUSD', type: 'number' },
|
|
|
|
|
{ name: 'INVNOSTLUSD', type: 'number' },
|
|
|
|
|
{ name: 'STLNOINVUSD', type: 'number' },
|
|
|
|
|
{ name: 'TTL', type: 'number' },
|
|
|
|
|
{ name: 'TTLINV', type: 'number' },
|
|
|
|
|
{ name: 'BALINVTTL', type: 'number' },
|
|
|
|
|
{ name: 'STLTTL', type: 'number' },
|
|
|
|
|
{ name: 'INVNOSTL', type: 'number' },
|
|
|
|
|
{ name: 'STLNOINV', type: 'number' }
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptInvTotal/CustListData',
|
|
|
|
|
reader: {
|
|
|
|
|
id: '',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
|
|
|
|
|
this.initgirdcolumscust = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTNAME',
|
|
|
|
|
header: '结算客户',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'FEETYPEREF',
|
|
|
|
|
header: '收付类型',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BALINVRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVNOSTLRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLNOINVRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BALINVUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVNOSTLUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLNOINVUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTL',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLINV',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BALINVTTL',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLTTL',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVNOSTL',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLNOINV',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
this.girdcolumscust = DsTruck.GetGridPanel(USERID, this.formname + 'cust', this.initgirdcolumscust, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridListCust = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeCustList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: this.girdcolumscust,
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeCustList,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
|
|
emptyMsg: "没有数据"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.gridListCust.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
|
|
this.custsumsortfield = column.dataIndex;
|
|
|
|
|
this.custsumsortdire = direction;
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeSumList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'TTLRMB', type: 'number' },
|
|
|
|
|
{ name: 'INVRMB', type: 'number' },
|
|
|
|
|
{ name: 'TTLUSD', type: 'number' },
|
|
|
|
|
{ name: 'INVUSD', type: 'number' },
|
|
|
|
|
{ name: 'TTLINV', type: 'number' }
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptChInvTotal/SumListData',
|
|
|
|
|
reader: {
|
|
|
|
|
id: '',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.gridListSum = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeSumList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLRMB',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
return value;
|
|
|
|
|
},
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLUSD',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
return value;
|
|
|
|
|
},
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLINV',
|
|
|
|
|
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
return value;
|
|
|
|
|
},
|
|
|
|
|
align: 'right',
|
|
|
|
|
width: 100
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region formSearch
|
|
|
|
|
|
|
|
|
|
//#region formSearch枚举参照相关
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
this.StoreOpLb = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
|
|
this.StoreOpLb.load({ params: { enumTypeId: 96005} });
|
|
|
|
|
|
|
|
|
|
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '业务类型',
|
|
|
|
|
store: this.StoreOpLb,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'PS_OPLB',
|
|
|
|
|
valueField: 'EnumValueName',
|
|
|
|
|
displayField: 'EnumValueName',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeBsType = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
|
|
this.storeBsType.load({ params: { enumTypeId: 96004} });
|
|
|
|
|
|
|
|
|
|
this.comboxBsType = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '运输类型',
|
|
|
|
|
store: this.storeBsType,
|
|
|
|
|
name: 'PS_BSTYPE',
|
|
|
|
|
valueField: 'EnumValueName',
|
|
|
|
|
displayField: 'EnumValueName',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.storeOpCode2 = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' }
|
|
|
|
|
});
|
|
|
|
|
this.storeOpCode2.load();
|
|
|
|
|
this.comboxInvOp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '开票人',
|
|
|
|
|
store: this.storeOpCode2,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'PS_INVOP',
|
|
|
|
|
valueField: 'GID',
|
|
|
|
|
displayField: 'CodeAndName',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: 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/GetCustomRefList' }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
|
|
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '委托单位',
|
|
|
|
|
store: this.storeCustCode,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'PS_CUSTOMERNAME',
|
|
|
|
|
valueField: 'CustName',
|
|
|
|
|
displayField: 'CodeAndName',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeCust = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeCust.load({ params: { condition: ""} });
|
|
|
|
|
this.comboxCust = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '开票客户',
|
|
|
|
|
store: this.storeCust,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'CUSTNAME',
|
|
|
|
|
valueField: 'CustName',
|
|
|
|
|
displayField: 'CodeAndName',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.StoreCurr = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'MsFeeCurr',
|
|
|
|
|
proxy: { url: '/MvcShipping/MsChFee/GetFeeCurrList' }
|
|
|
|
|
});
|
|
|
|
|
this.StoreCurr.load({ params: { condition: "" } });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.comboxCurr = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '币别',
|
|
|
|
|
store: this.StoreCurr,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
//flex: 0.5,
|
|
|
|
|
labelWidth: 50,
|
|
|
|
|
name: 'Currency',
|
|
|
|
|
valueField: 'CURR',
|
|
|
|
|
displayField: 'CURR',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.define('SubComp', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'GID', type: 'string' },
|
|
|
|
|
{ name: 'NAME', type: 'string' },
|
|
|
|
|
{ name: 'ENNAME', type: 'string' }
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
this.StoreSubComp = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'SubComp',
|
|
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetCompanyEN' }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.StoreSubComp.load({ params: { condition: ""} });
|
|
|
|
|
|
|
|
|
|
this.comboxSubComp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '所属公司',
|
|
|
|
|
store: this.StoreSubComp,
|
|
|
|
|
name: 'SUBCOMP',
|
|
|
|
|
valueField: 'GID',
|
|
|
|
|
displayField: 'NAME',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
keyup: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeISDELETE = Ext.create('Ext.data.Store', {
|
|
|
|
|
fields: ['DC', 'NAME']
|
|
|
|
|
});
|
|
|
|
|
this.storeISDELETE.add({ "DC": "", "NAME": "全部" });
|
|
|
|
|
this.storeISDELETE.add({ "DC": "2", "NAME": "未作废" });
|
|
|
|
|
this.storeISDELETE.add({ "DC": "1", "NAME": "仅作废" });
|
|
|
|
|
|
|
|
|
|
this.comboxISDELETE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '是否作废',
|
|
|
|
|
store: this.storeISDELETE,
|
|
|
|
|
valueField: 'DC',
|
|
|
|
|
displayField: 'NAME',
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'ISDELETE',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
|
|
frame: true,
|
|
|
|
|
region: 'center',
|
|
|
|
|
bodyPadding: 5,
|
|
|
|
|
fieldDefaults: {
|
|
|
|
|
margins: '2 2 2 2',
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
flex: 1,
|
|
|
|
|
labelWidth: 75,
|
|
|
|
|
msgTarget: 'qtip'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
items: [
|
|
|
|
|
{//fieldset 1
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
layout: 'anchor',
|
|
|
|
|
defaults: {
|
|
|
|
|
anchor: '100%'
|
|
|
|
|
},
|
|
|
|
|
items: [{
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxCust, this.comboxCurr, {
|
|
|
|
|
fieldLabel: '从开票日期',
|
|
|
|
|
format: 'Y-m-d',
|
|
|
|
|
xtype: 'datefield',
|
|
|
|
|
name: 'PS_EXPDATEBGN',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '到开票日期',
|
|
|
|
|
format: 'Y-m-d',
|
|
|
|
|
xtype: 'datefield',
|
|
|
|
|
name: 'PS_EXPDATEEND',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '发票号',
|
|
|
|
|
name: 'InvNo',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '~发票号',
|
|
|
|
|
name: 'InvNoTo',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, this.comboxInvOp,this.comboxISDELETE
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
|
|
}//end fieldset 1
|
|
|
|
|
]//end root items
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//#endregion formSearch
|
|
|
|
|
|
|
|
|
|
//查询工具条
|
|
|
|
|
|
|
|
|
|
this.CheckSaveQuery = new Ext.form.Checkbox({
|
|
|
|
|
fieldLabel: '记忆查询条件',
|
|
|
|
|
checked: true,
|
|
|
|
|
width: 120
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
this.SearchBtn = new Ext.Button({
|
|
|
|
|
text: '隐藏查询',
|
|
|
|
|
handler: function () {
|
|
|
|
|
if (_this.SearchBtn.text == '隐藏查询') {
|
|
|
|
|
_this.panelSearch.hide();
|
|
|
|
|
_this.SearchBtn.setText("显示查询");
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
_this.panelSearch.show();
|
|
|
|
|
_this.SearchBtn.setText("隐藏查询");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
|
|
region: "north",
|
|
|
|
|
tbar: [
|
|
|
|
|
{
|
|
|
|
|
text: "执行查询",
|
|
|
|
|
iconCls: "btnrefresh",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onRefreshClick(button, event);
|
|
|
|
|
var isvisible = true;
|
|
|
|
|
var issavevalue = false;
|
|
|
|
|
|
|
|
|
|
if (_this.SearchBtn.text == '隐藏查询')
|
|
|
|
|
isvisible = true
|
|
|
|
|
else
|
|
|
|
|
isvisible = false;
|
|
|
|
|
if (this.CheckSaveQuery.checked)
|
|
|
|
|
issavevalue = true
|
|
|
|
|
|
|
|
|
|
saveQuerySetting(this.formname, this.formSearch, isvisible, issavevalue);
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, {
|
|
|
|
|
text: "导出Excel",
|
|
|
|
|
id: "btnExportExcel",
|
|
|
|
|
iconCls: 'btnexportexcel',
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onExportClick(button, event);
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, '-',
|
|
|
|
|
{
|
|
|
|
|
text: "打印",
|
|
|
|
|
iconCls: 'btnprint',
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.Print();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, '-', this.SearchBtn, {
|
|
|
|
|
xtype: 'button',
|
|
|
|
|
width: 90,
|
|
|
|
|
text: "清空条件",
|
|
|
|
|
iconCls: "btnreset",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onClearSql(button, event);
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, this.CheckSaveQuery, '-', {
|
|
|
|
|
text: "保存列表样式",
|
|
|
|
|
id: "btntest",
|
|
|
|
|
menu: [
|
|
|
|
|
{ text: "保存列表",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
_this.onSaveGridClick(button, event);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}, { text: "刷新列表",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
_this.oninitGridClick(button, event);
|
|
|
|
|
}
|
|
|
|
|
}],
|
|
|
|
|
scope: this
|
|
|
|
|
}, '-', {
|
|
|
|
|
xtype: 'button',
|
|
|
|
|
text:'高级查询',
|
|
|
|
|
iconCls: "btnmore",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
var winAccess = new Shipping.DsQuery({
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
winAccess.StoreList = this.storeListDr;
|
|
|
|
|
winAccess.formname = this.formname;
|
|
|
|
|
winAccess.condition = sql;
|
|
|
|
|
winAccess.show();
|
|
|
|
|
return;
|
|
|
|
|
},
|
|
|
|
|
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: 45,
|
|
|
|
|
items: [this.formSearch]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelBodyChFee = new Ext.Panel({
|
|
|
|
|
title: '应收单票',
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
margin: '0 0',
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [this.gridListDr]
|
|
|
|
|
});
|
|
|
|
|
this.panelBodyInv = new Ext.Panel({
|
|
|
|
|
title: '应收发票列表',
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
margin: '0 0',
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [this.gridListInv]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// this.panelSaleSum = new Ext.Panel({
|
|
|
|
|
// title: '揽货人',
|
|
|
|
|
// layout: "border",
|
|
|
|
|
// region: 'center',
|
|
|
|
|
// margin: '0 0',
|
|
|
|
|
// frame: true,
|
|
|
|
|
// items: [this.gridListSale]
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// this.panelCustSum = new Ext.Panel({
|
|
|
|
|
// title: '结算单位',
|
|
|
|
|
// layout: "border",
|
|
|
|
|
// region: 'center',
|
|
|
|
|
// margin: '0 0',
|
|
|
|
|
// frame: true,
|
|
|
|
|
// items: [this.gridListCust]
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
this.panelSum = new Ext.Panel({
|
|
|
|
|
title: '合 计',
|
|
|
|
|
layout: "border",
|
|
|
|
|
height: 126,
|
|
|
|
|
region: 'south',
|
|
|
|
|
margin: '0 0',
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [this.gridListSum]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.tabpanel = new Ext.TabPanel
|
|
|
|
|
({
|
|
|
|
|
activeTab: 0,
|
|
|
|
|
autoWidth: true,
|
|
|
|
|
border: false,
|
|
|
|
|
frame: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
id: "TabPanelID",
|
|
|
|
|
enableTabScroll: true,
|
|
|
|
|
items:
|
|
|
|
|
[
|
|
|
|
|
this.panelBodyInv,
|
|
|
|
|
this.panelBodyChFee
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
|
|
items: [this.panelTop, this.panelSearch, this.tabpanel, this.panelSum]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeListDr.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
}, this);
|
|
|
|
|
this.storeListInv.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
// this.storeSaleList.on('beforeload', function (store) {
|
|
|
|
|
// if (!this.checkSearchCondition())
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
|
|
// var sql = this.getCondition();
|
|
|
|
|
// Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
// }, this);
|
|
|
|
|
// this.storeCustList.on('beforeload', function (store) {
|
|
|
|
|
// if (!this.checkSearchCondition())
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
|
|
// var sql = this.getCondition();
|
|
|
|
|
// Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
// }, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeSumList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
|
|
|
|
this.sqlcontext = sql;
|
|
|
|
|
// var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
|
|
|
|
|
// var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
|
|
|
|
|
this.storeListDr.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeListInv.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// this.storeCustList.load({
|
|
|
|
|
// params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
// waitMsg: "正在查询数据...",
|
|
|
|
|
// scope: this
|
|
|
|
|
// });
|
|
|
|
|
// this.storeSaleList.load({
|
|
|
|
|
// params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
// waitMsg: "正在查询数据...",
|
|
|
|
|
// scope: this
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
this.storeSumList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onDsQuery: function (button, event) {
|
|
|
|
|
|
|
|
|
|
var sql = this.sqlcontext;
|
|
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
|
|
|
|
this.storeListDr.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeListInv.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeSumList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onClearSql: function () {
|
|
|
|
|
var form = this.formSearch.getForm();
|
|
|
|
|
form.reset();
|
|
|
|
|
},
|
|
|
|
|
getCondition: function () {
|
|
|
|
|
var form = this.formSearch.getForm();
|
|
|
|
|
var sql = '';
|
|
|
|
|
/*
|
|
|
|
|
var sqldata = form.getValues();
|
|
|
|
|
sql = Ext.JSON.encode(sqldata);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, expDate_Min, " i.INVOICEMAKETIME>='" + expDate_Min + "'");
|
|
|
|
|
|
|
|
|
|
var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, expDate_Max, " i.INVOICEMAKETIME<='" + expDate_Max + " 23:59:59'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CUSTNAME = form.findField('CUSTNAME').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, CUSTNAME, "i.CUSTOMERNAME='" + CUSTNAME + "'");
|
|
|
|
|
|
|
|
|
|
var PS_INVOP = form.findField('PS_INVOP').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, PS_INVOP, "i.OPERATOR='" + PS_INVOP + "'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Currency = form.findField('Currency').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, Currency, "i.CURRENCY='" + Currency + "'");
|
|
|
|
|
|
|
|
|
|
var InvNoTo = form.findField('InvNoTo').getValue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (InvNoTo == '' || InvNoTo == null || InvNoTo == NaN) {
|
|
|
|
|
var invoiceNo = form.findField('InvNo').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, invoiceNo, "i.INVOICENO like '%" + invoiceNo + "%'");
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
var invoiceNo = form.findField('InvNo').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, invoiceNo, " (i.INVOICENO>='" + invoiceNo + "' and i.INVOICENO<='" + InvNoTo + "' ) ");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ISDELETE = form.findField('ISDELETE').getValue();
|
|
|
|
|
if (ISDELETE == "1") {
|
|
|
|
|
sql = sql + getAndConSql(sql, ISDELETE, "i.ISDELETE=1");
|
|
|
|
|
|
|
|
|
|
} else if (ISDELETE == "2") {
|
|
|
|
|
sql = sql + getAndConSql(sql, ISDELETE, " (i.ISDELETE IS NULL or i.ISDELETE=0)");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// saveQuerySetting: function () {
|
|
|
|
|
// var form = this.formSearch.getForm();
|
|
|
|
|
// var fieldvalue = form.getValues();
|
|
|
|
|
// Ext.Ajax.request({
|
|
|
|
|
// waitMsg: '正在保存数据...',
|
|
|
|
|
// url: '/MvcShipping/MsBaseInfo/SaveUserQuerySetting',
|
|
|
|
|
// scope: this,
|
|
|
|
|
// params: {
|
|
|
|
|
// formname: this.formname,
|
|
|
|
|
// isvisible: true,
|
|
|
|
|
// issavevalue: true,
|
|
|
|
|
// querydetail: Ext.JSON.encode(fieldvalue)
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
// LoadQueryData: function () {
|
|
|
|
|
// Ext.Ajax.request({
|
|
|
|
|
// waitMsg: '正在查询主表数据...',
|
|
|
|
|
// url: '/MvcShipping/MsBaseInfo/GetUserQuerySetting',
|
|
|
|
|
// params: {
|
|
|
|
|
// formname: this.formname
|
|
|
|
|
// },
|
|
|
|
|
// callback: function (options, success, response) {
|
|
|
|
|
// if (success) {
|
|
|
|
|
// var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
// if (!result.success) {
|
|
|
|
|
// Ext.Msg.show({
|
|
|
|
|
// title: '提示',
|
|
|
|
|
// msg: result.Message,
|
|
|
|
|
// icon: Ext.MessageBox.ERROR,
|
|
|
|
|
// buttons: Ext.Msg.OK
|
|
|
|
|
// });
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// data = result.data;
|
|
|
|
|
// this.formSearch.getForm().reset();
|
|
|
|
|
// this.formSearch.getForm().setValues(Ext.JSON.decode(data.FIELDVALUES));
|
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
// Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// scope: this
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// }, // end LoadDate
|
|
|
|
|
|
|
|
|
|
checkSearchCondition: function () {
|
|
|
|
|
var form = this.formSearch.getForm();
|
|
|
|
|
if (!form.isValid()) {
|
|
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
OprationSwap: function () {
|
|
|
|
|
var ret = new Array();
|
|
|
|
|
ret[0] = this.OprationStatus;
|
|
|
|
|
ret[1] = this.storeList;
|
|
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
|
|
ret[3] = this.SelectedRecord.data.BSNO;
|
|
|
|
|
ret[4] = "MsRptOpProfitIndex";
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onSaveGridClick: function (button, event) {
|
|
|
|
|
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
|
|
|
|
|
this.girdcolumsdr = DsTruck.SaveGridPanel(USERID, this.formname + 'dr', this.gridListDr.columns, this.girdcolumsdr, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelBodyInv) {
|
|
|
|
|
this.girdcolumsinv = DsTruck.SaveGridPanel(USERID, this.formname + 'inv', this.gridListInv.columns, this.girdcolumsinv, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
|
|
|
|
|
this.girdcolumssale = DsTruck.SaveGridPanel(USERID, this.formname + 'sale', this.gridListSale.columns, this.girdcolumssale, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
|
|
|
|
|
this.girdcolumscust = DsTruck.SaveGridPanel(USERID, this.formname + 'cust', this.gridListCust.columns, this.girdcolumscust, 1, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
oninitGridClick: function (button, event) {
|
|
|
|
|
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
|
|
|
|
|
this.gridListDr.reconfigure(this.storeListDr, this.initgirdcolumsdr);
|
|
|
|
|
this.girdcolumsdr = DsTruck.SaveGridPanel(USERID, this.formname + 'dr', this.gridListDr.columns, this.initgirdcolumsdr, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelBodyInv) {
|
|
|
|
|
this.gridListInv.reconfigure(this.storeListInv, this.initgirdcolumsinv);
|
|
|
|
|
this.girdcolumsinv = DsTruck.SaveGridPanel(USERID, this.formname + 'inv', this.gridListInv.columns, this.initgirdcolumsinv, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
|
|
|
|
|
this.gridListSale.reconfigure(this.storeSaleList, this.initgirdcolumssale);
|
|
|
|
|
this.girdcolumssale = DsTruck.SaveGridPanel(USERID, this.formname + 'sale', this.gridListSale.columns, this.initgirdcolumssale, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
|
|
|
|
|
this.gridListCust.reconfigure(this.storeCustList, this.initgirdcolumscust);
|
|
|
|
|
this.girdcolumscust = DsTruck.SaveGridPanel(USERID, this.formname + 'cust', this.gridListCust.columns, this.initgirdcolumscust, 1, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
onExportClick: function (button, event) {
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
|
|
|
|
|
GridExportExcelPage(this.gridListDr);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelBodyInv) {
|
|
|
|
|
GridExportExcelPage(this.gridListInv);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
|
|
|
|
|
|
|
|
|
|
GridExportExcelPage(this.gridListSale);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
|
|
|
|
|
|
|
|
|
|
GridExportExcelPage(this.gridListCust);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// _this = this;
|
|
|
|
|
// Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
// Ext.Ajax.request({
|
|
|
|
|
// waitMsg: '正在组织数据...',
|
|
|
|
|
// url: '/MvcShipping/MsRptNoTotal/GetSqlStr',
|
|
|
|
|
// scope: this,
|
|
|
|
|
// params: {
|
|
|
|
|
// condition: _this.sqlcontext
|
|
|
|
|
// },
|
|
|
|
|
// callback: function (options, success, response) {
|
|
|
|
|
// if (success) {
|
|
|
|
|
// Ext.MessageBox.hide();
|
|
|
|
|
// var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
// if (jsonresult.Success) {
|
|
|
|
|
// var sql = jsonresult.Data;
|
|
|
|
|
|
|
|
|
|
// if (sql != "") {
|
|
|
|
|
// var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
|
|
|
|
|
// var openType = "_blank";
|
|
|
|
|
// var openUrl = "../../Reports/RptExport.aspx?handle=MsRptNoTotalIndex&formname=" + this.formname + "&condition1=" + sql;
|
|
|
|
|
// window.open(openUrl, openType, openSet);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
// Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// Ext.Msg.show({ title: '请重试',
|
|
|
|
|
// msg: '服务器响应出错',
|
|
|
|
|
// icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
|
|
|
|
var sql = this.sqlcontext;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
|
|
|
|
|
|
|
|
|
|
if (this.storeListDr.getCount() == 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var sortstr = ' F.CUSTOMERNAME,B.OPDATE';
|
|
|
|
|
|
|
|
|
|
if (this.bslistdrsortfield != '' && this.bslistdrsortdire != '') {
|
|
|
|
|
|
|
|
|
|
sortstr = this.bslistdrsortfield + ' ' + this.bslistdrsortdire;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在组织数据...',
|
|
|
|
|
url: '/MvcShipping/MsRptChInvTotal/BsListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: sql,
|
|
|
|
|
printstr: 'true',
|
|
|
|
|
sort: sortstr
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
Ext.MessageBox.hide();
|
|
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
var returnstr = jsonresult.Data;
|
|
|
|
|
var printType = 'MSRPTCHINVTOTALLISTDR';
|
|
|
|
|
var sql1 = returnstr;
|
|
|
|
|
var sql2 = "";
|
|
|
|
|
var sql3 = "";
|
|
|
|
|
var sql4 = "";
|
|
|
|
|
var sql5 = "";
|
|
|
|
|
var sql6 = "";
|
|
|
|
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
|
|
msg: '服务器响应出错',
|
|
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelBodyInv) {
|
|
|
|
|
|
|
|
|
|
if (this.storeListInv.getCount() == 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var sortstr = ' i.INVOICEMAKETIME DESC ';
|
|
|
|
|
|
|
|
|
|
if (this.bslistinvsortfield != '' && this.bslistinvsortdire != '') {
|
|
|
|
|
|
|
|
|
|
sortstr = this.bslistinvsortfield + ' ' + this.bslistinvsortdire;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在组织数据...',
|
|
|
|
|
url: '/MvcShipping/MsRptChInvTotal/InvListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: sql,
|
|
|
|
|
printstr: 'true',
|
|
|
|
|
sort: sortstr
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
Ext.MessageBox.hide();
|
|
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
var returnstr = jsonresult.Data;
|
|
|
|
|
var printType = 'MSRPTCHINVTOTALINVLIST';
|
|
|
|
|
var sql1 = returnstr;
|
|
|
|
|
var sql2 = "";
|
|
|
|
|
var sql3 = "";
|
|
|
|
|
var sql4 = "";
|
|
|
|
|
var sql5 = "";
|
|
|
|
|
var sql6 = "";
|
|
|
|
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
|
|
msg: '服务器响应出错',
|
|
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else if (this.tabpanel.activeTab == this.panelSaleSum) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.storeSaleList.getCount() == 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var sortstr = ' B.SALE';
|
|
|
|
|
|
|
|
|
|
if (this.salesumsortfield != '' && this.salesumsortdire != '') {
|
|
|
|
|
|
|
|
|
|
sortstr = this.salesumsortfield + ' ' + this.salesumsortdire;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在组织数据...',
|
|
|
|
|
url: '/MvcShipping/MsRptInvTotal/SaleListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: _this.sqlcontext,
|
|
|
|
|
printstr: 'true',
|
|
|
|
|
sortstr: sortstr
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
Ext.MessageBox.hide();
|
|
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
var returnstr = jsonresult.Data;
|
|
|
|
|
var printType = 'MSRPTINVTOTALSALE';
|
|
|
|
|
var sql1 = returnstr;
|
|
|
|
|
var sql2 = "";
|
|
|
|
|
var sql3 = "";
|
|
|
|
|
var sql4 = "";
|
|
|
|
|
var sql5 = "";
|
|
|
|
|
var sql6 = "";
|
|
|
|
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
|
|
msg: '服务器响应出错',
|
|
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (this.tabpanel.activeTab == this.panelCustSum) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.storeCustList.getCount() == 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var sortstr = ' F.CUSTOMERNAME';
|
|
|
|
|
|
|
|
|
|
if (this.custsumsortfield != '' && this.custsumsortdire != '') {
|
|
|
|
|
|
|
|
|
|
sortstr = this.custsumsortfield + ' ' + this.custsumsortdire;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在组织数据...',
|
|
|
|
|
url: '/MvcShipping/MsRptInvTotal/CustListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: _this.sqlcontext,
|
|
|
|
|
printstr: 'true',
|
|
|
|
|
sortstr: sortstr
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
Ext.MessageBox.hide();
|
|
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
var returnstr = jsonresult.Data;
|
|
|
|
|
var printType = 'MSRPTINVTOTALCUST';
|
|
|
|
|
var sql1 = returnstr;
|
|
|
|
|
var sql2 = "";
|
|
|
|
|
var sql3 = "";
|
|
|
|
|
var sql4 = "";
|
|
|
|
|
var sql5 = "";
|
|
|
|
|
var sql6 = "";
|
|
|
|
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
|
|
msg: '服务器响应出错',
|
|
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|