|
|
|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
|
|
|
|
Shipping.ChPayapplicationAudit = function (config) {
|
|
|
|
|
Ext.applyIf(this, config);
|
|
|
|
|
this.initUIComponents();
|
|
|
|
|
window.Shipping.ChPayapplicationAudit.superclass.constructor.call(this);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ext.extend(Shipping.ChPayapplicationAudit, Ext.Panel, {
|
|
|
|
|
PageSize: 15,
|
|
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
|
|
SelectedRecord: null,
|
|
|
|
|
isAudit: '',
|
|
|
|
|
BodyPageSize: 50,
|
|
|
|
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
|
this.formname = "formChPayapplicationAudit"
|
|
|
|
|
//定义数据集
|
|
|
|
|
this.worksql = getUrlParam('worksql');
|
|
|
|
|
this.BillSql = '';
|
|
|
|
|
this.billno = '11';
|
|
|
|
|
this.Parentsql = '1=2';
|
|
|
|
|
this.isuseexrate = 0;
|
|
|
|
|
this.YJFEENAME = '';
|
|
|
|
|
this.YJFEENAMEUSD = '';
|
|
|
|
|
Ext.define('MsOPGain', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
idProperty: 'GId',
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'CURR', type: 'string' },
|
|
|
|
|
{ name: 'NORATEDR', type: 'number' },
|
|
|
|
|
{ name: 'DR', type: 'number' },
|
|
|
|
|
{ name: 'BALDR', type: 'number' },
|
|
|
|
|
{ name: 'NORATECR', type: 'number' },
|
|
|
|
|
{ name: 'CR', type: 'number' },
|
|
|
|
|
{ name: 'NORATEPR', type: 'number' },
|
|
|
|
|
{ name: 'PR', type: 'number' },
|
|
|
|
|
{ name: 'PROFITRATE', type: 'number' }
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
model: 'MsChPayapplication',
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/Account/Chfee_payapplication/GetAuditDataList',
|
|
|
|
|
reader: {
|
|
|
|
|
id: 'BILLNO',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.initgirdcolums = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BILLNO',
|
|
|
|
|
header: Zi.LAN.RequisitionNumber, //申请单号
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BILLSTATUSREF',
|
|
|
|
|
header: Zi.LAN.status, //状态
|
|
|
|
|
width: 80,
|
|
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
value = record.data.BILLSTATUSREF;
|
|
|
|
|
if (value == '审核通过') {
|
|
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
|
|
} else if (value == '录入状态') {
|
|
|
|
|
} else if (value == '已提交') {
|
|
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
|
|
} else if (value == '部分结算') {
|
|
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
|
|
} else if (value == '已结算') {
|
|
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
|
|
}
|
|
|
|
|
return record.data.BILLSTATUSREF;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
|
|
header: Zi.LAN.SettlementUnit, //结算单位
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CURR',
|
|
|
|
|
header: Zi.LAN.Currency, //币别
|
|
|
|
|
width: 50
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'AMOUNTRMB',
|
|
|
|
|
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: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'AMOUNTUSD',
|
|
|
|
|
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: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'AMOUNTOT',
|
|
|
|
|
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: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'STLAMOUNT',
|
|
|
|
|
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: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'APPLYTIME',
|
|
|
|
|
header: Zi.LAN.DateApplication, //申请日期
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'APPLICANTNAME',
|
|
|
|
|
header: Zi.LAN.Applicant, //申请人
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'AUDITTIME',
|
|
|
|
|
header: Zi.LAN.FinalReviewDate, //最后审核日期
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'AUDITUSER',
|
|
|
|
|
header: Zi.LAN.lastReviewer, //最后审核人
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'PAYABLETIME',
|
|
|
|
|
header: Zi.LAN.ApplyPaymentDate, //申请支付日期
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ISINVOICE',
|
|
|
|
|
header: Zi.LAN.Invoiced, //已开发票
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVNO',
|
|
|
|
|
header: Zi.LAN.InvoiceNumber, //发票号
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SETTLETYPEREF',
|
|
|
|
|
header: Zi.LAN.jstype, //委托单位
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BS_CUSTOMERNAME',
|
|
|
|
|
header: Zi.LAN.Requester, //委托单位
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'REMARK',
|
|
|
|
|
header: Zi.LAN.Remarks, //备注
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'REASON',
|
|
|
|
|
header: Zi.LAN.REASON, //备注
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALECORP',
|
|
|
|
|
header: Zi.LAN.DepartmentName, //备注
|
|
|
|
|
width: 160
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sortable: true,
|
|
|
|
|
id: '',
|
|
|
|
|
dataIndex: 'ISPRINT',
|
|
|
|
|
header: Zi.LAN.printy, //'应收费用',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 60,
|
|
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
|
|
|
|
if (value == '1')
|
|
|
|
|
return '是'; //是
|
|
|
|
|
else
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'APPLICANTDEPT',
|
|
|
|
|
header: Zi.LAN.APPLICANTDEPT, //驳回原因
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'PRINTCOUNT',
|
|
|
|
|
header: Zi.LAN.PRINTCOUNT, //驳回原因
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTBANKNAME',
|
|
|
|
|
header: Zi.LAN.jsuanBank, //驳回原因
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTACCOUNT',
|
|
|
|
|
header: Zi.LAN.jsuanzh, //驳回原因
|
|
|
|
|
width: 80
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
|
|
name: 'bottles',
|
|
|
|
|
fieldLabel: Zi.LAN.NumberOfpage,//每页记录数
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
value: this.PageSize,
|
|
|
|
|
maxValue: 100000,
|
|
|
|
|
width: 180,
|
|
|
|
|
minValue: 0,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
|
|
|
|
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
height: 180,
|
|
|
|
|
region: 'north',
|
|
|
|
|
split: true,
|
|
|
|
|
loadMask: { msg: Zi.LAN.LoadData },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
viewConfig: {
|
|
|
|
|
enableTextSelection: true
|
|
|
|
|
},
|
|
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
|
|
tbar: [{
|
|
|
|
|
text: Zi.LAN.Saveliststyle,
|
|
|
|
|
id: "btntest",
|
|
|
|
|
menu: [
|
|
|
|
|
{ text: Zi.LAN.Save,
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true);
|
|
|
|
|
}
|
|
|
|
|
}, { text: Zi.LAN.Initialization,
|
|
|
|
|
handler: function (menu, event) {
|
|
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
|
|
|
|
|
}
|
|
|
|
|
}],
|
|
|
|
|
scope: this
|
|
|
|
|
}],
|
|
|
|
|
columns: this.girdcolums,
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeList,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: Zi.LAN.FenYe, //当前显示条数据
|
|
|
|
|
emptyMsg: Zi.LAN.Nodata//没有数据
|
|
|
|
|
}), this.Pagenum]
|
|
|
|
|
});
|
|
|
|
|
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
|
|
this.girdcolums.unshift(new Ext.grid.RowNumberer());
|
|
|
|
|
this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
|
|
|
|
|
|
|
//#region formSearch
|
|
|
|
|
|
|
|
|
|
//#region formSearch枚举参照相关
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeAddDCType = Ext.create('Ext.data.Store', {
|
|
|
|
|
fields: ['DC', 'NAME']
|
|
|
|
|
});
|
|
|
|
|
this.storeAddDCType.add({ "DC": "", "NAME": "全部" });
|
|
|
|
|
this.storeAddDCType.add({ "DC": "1", "NAME": "未审核" });
|
|
|
|
|
this.storeAddDCType.add({ "DC": "2", "NAME": "已审核" });
|
|
|
|
|
this.storeAddDCType.add({ "DC": "3", "NAME": "仅需自己审核" });
|
|
|
|
|
|
|
|
|
|
this.comboxaddDCType = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: Zi.LAN.ApprovalStatus,
|
|
|
|
|
labelWidth: 60,
|
|
|
|
|
store: this.storeAddDCType,
|
|
|
|
|
valueField: 'DC',
|
|
|
|
|
displayField: 'NAME',
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'DC',
|
|
|
|
|
value: '3',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
keyup: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListRm' }
|
|
|
|
|
});
|
|
|
|
|
this.storeCustCode.load({ params: { condition: ""} });
|
|
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: Zi.LAN.SettlementUnit, //结算单位
|
|
|
|
|
labelWidth: 60,
|
|
|
|
|
store: this.storeCustCode,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
queryMode: 'remote',
|
|
|
|
|
minChars: 1,
|
|
|
|
|
queryParam: 'CODENAME',
|
|
|
|
|
name: 'CustName',
|
|
|
|
|
valueField: 'CustName',
|
|
|
|
|
displayField: 'CodeAndName',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
keyup: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//人员信息加载
|
|
|
|
|
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
|
|
});
|
|
|
|
|
this.storeOpCode.load();
|
|
|
|
|
//
|
|
|
|
|
this.comboxAPPLICANT = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: Zi.LAN.Applicant,
|
|
|
|
|
store: this.storeOpCode,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'APPLICANT',
|
|
|
|
|
labelWidth: 50,
|
|
|
|
|
flex: 0.5,
|
|
|
|
|
valueField: 'GID',
|
|
|
|
|
displayField: 'CodeAndName',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
keyup: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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: [{
|
|
|
|
|
fieldLabel: Zi.LAN.RequisitionNumber, //申请单号
|
|
|
|
|
name: 'BsNo',
|
|
|
|
|
labelWidth: 60,
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: Zi.LAN.RelatedBusinessNumber, //相关业务号
|
|
|
|
|
name: 'sBsNo',
|
|
|
|
|
labelWidth: 70,
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, this.comboxCustCode, {
|
|
|
|
|
fieldLabel: Zi.LAN.FromDateApplication, //从付费申请日期
|
|
|
|
|
format: 'Y-m-d',
|
|
|
|
|
xtype: 'datefield',
|
|
|
|
|
name: 'ExpDateBgn',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: Zi.LAN.ToDateApplication,
|
|
|
|
|
format: 'Y-m-d',
|
|
|
|
|
xtype: 'datefield',
|
|
|
|
|
name: 'ExpDateEnd',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, this.comboxAPPLICANT, this.comboxaddDCType
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
|
|
}//end fieldset 1
|
|
|
|
|
]//end root items
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region 明细
|
|
|
|
|
|
|
|
|
|
this.storeBodyListdetail = Ext.create('Ext.data.Store', {
|
|
|
|
|
model: 'Chfee_do_detail',
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
pageSize: this.BodyPageSize,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/Account/Chfee_payapplication/GetBillAuditList',
|
|
|
|
|
reader: {
|
|
|
|
|
id: 'BSNO,FEEDOID',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.initgirdbillcolums = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BILLNO',
|
|
|
|
|
header: 'BILL',
|
|
|
|
|
hidden: true,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BSNO',
|
|
|
|
|
header: 'BSNO',
|
|
|
|
|
hidden: true,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'FEEDOID',
|
|
|
|
|
header: 'FEEDOID',
|
|
|
|
|
hidden: true,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTNO',
|
|
|
|
|
header: Zi.LAN.DelegateNumber, //委托编号
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MBLNO',
|
|
|
|
|
header: Zi.LAN.ZhuTDH,
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'HBLNO',
|
|
|
|
|
header: Zi.LAN.HBLNO,
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
|
|
header: Zi.LAN.Requester,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'FEEOBJNAME',
|
|
|
|
|
header: Zi.LAN.SettlementUnit,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ETD',
|
|
|
|
|
header: Zi.LAN.SailingDate,
|
|
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BSSOURCE',
|
|
|
|
|
header: Zi.LAN.BusinessSource, //业务来源
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'FEENAME',
|
|
|
|
|
header: Zi.LAN.CostName, //费用名称
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'FEETYPEREF',
|
|
|
|
|
header: Zi.LAN.PayReceive, //收付
|
|
|
|
|
width: 40
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'AMOUNT',
|
|
|
|
|
header: Zi.LAN.WriteOffAmount, //核销金额
|
|
|
|
|
width: 80,
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ORIGCURRENCY',
|
|
|
|
|
header: Zi.LAN.OriginalCurrency, //原始币别
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ORIGEXCHANGERATE',
|
|
|
|
|
header: Zi.LAN.OriginalExchangeRate, //原始汇率
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'EXCHANGERATE',
|
|
|
|
|
header: Zi.LAN.ExchangeRate,
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ORIGAMOUNT',
|
|
|
|
|
header: Zi.LAN.OriginalAmount,
|
|
|
|
|
width: 80,
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLNODR',
|
|
|
|
|
header: Zi.LAN.TTLNODR,
|
|
|
|
|
width: 80,
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INVOICENO',
|
|
|
|
|
header: Zi.LAN.InvoiceNumber, //发票号
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OPTYPE',
|
|
|
|
|
header: Zi.LAN.ChangeSingle, //更改单
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'ACCDATE',
|
|
|
|
|
header: Zi.LAN.AccountingPeriod,
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BLISSUESTATUS',
|
|
|
|
|
header: Zi.LAN.SignatureStatus, //签单状态
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALE',
|
|
|
|
|
header: Zi.LAN.LanhuoPeople, //揽货人
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'Remark',
|
|
|
|
|
header: Zi.LAN.Remarks, //备注
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'INPUTMODE',
|
|
|
|
|
header: Zi.LAN.EntryMethod,
|
|
|
|
|
width: 160
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'BSSTATUSREF',
|
|
|
|
|
header: Zi.LAN.BSSTATUSREF, //揽货人
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'FEESTATUSREF',
|
|
|
|
|
header: Zi.LAN.FEESTATUSREF, //揽货人
|
|
|
|
|
width: 80
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
this.girdbillcolums = this.initgirdbillcolums;
|
|
|
|
|
|
|
|
|
|
this.BodyPagenum = Ext.create('Ext.form.field.Number', {
|
|
|
|
|
name: 'bottles',
|
|
|
|
|
fieldLabel: Zi.LAN.NumberOfpage, //每页记录数
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
value: this.BodyPageSize,
|
|
|
|
|
maxValue: 100000,
|
|
|
|
|
width: 180,
|
|
|
|
|
minValue: 0,
|
|
|
|
|
listeners: {
|
|
|
|
|
specialkey: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.storeBodyListdetail.reload();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.gridListdetail = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeBodyListdetail,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: Zi.LAN.LoadData },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
viewConfig: {
|
|
|
|
|
enableTextSelection: true
|
|
|
|
|
},
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
tbar: [{
|
|
|
|
|
text: Zi.LAN.Saveliststyle,
|
|
|
|
|
id: "btntestbody",
|
|
|
|
|
menu: [
|
|
|
|
|
{ text: Zi.LAN.Save,
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
_this.girdbillcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'bill', _this.gridListdetail.columns, _this.girdbillcolums, 1, true);
|
|
|
|
|
}
|
|
|
|
|
}, { text: Zi.LAN.Initialization,
|
|
|
|
|
handler: function (menu, event) {
|
|
|
|
|
_this.girdbillcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'bill', _this.gridListdetail.columns, _this.initgirdbillcolums, 1, true);
|
|
|
|
|
}
|
|
|
|
|
}],
|
|
|
|
|
scope: this
|
|
|
|
|
}],
|
|
|
|
|
columns: this.girdbillcolums,
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeBodyListdetail,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: Zi.LAN.FenYe, //当前显示条数据
|
|
|
|
|
emptyMsg: Zi.LAN.Nodata//没有数据
|
|
|
|
|
}), this.BodyPagenum]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.girdbillcolums = DsTruck.GetGridPanel(USERID, this.formname + 'bill', this.girdbillcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
|
|
this.girdbillcolums.unshift(new Ext.grid.RowNumberer());
|
|
|
|
|
this.gridListdetail.reconfigure(this.storeBodyListdetail, this.girdbillcolums);
|
|
|
|
|
|
|
|
|
|
this.storeBodySum = Ext.create('Ext.data.Store', {
|
|
|
|
|
model: 'Chfee_do_sum',
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/Account/Chfee_payapplication/GetBillSum',
|
|
|
|
|
reader: {
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridSum = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeBodySum,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: Zi.LAN.LoadData },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
tbar: [{
|
|
|
|
|
xtype: 'label',
|
|
|
|
|
width: 120,
|
|
|
|
|
height: 22,
|
|
|
|
|
text: Zi.LAN.TotalAmount// '申请金额合计'
|
|
|
|
|
}],
|
|
|
|
|
columns: [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'FEETYPEREF',
|
|
|
|
|
header: Zi.LAN.PayReceive, //收付
|
|
|
|
|
width: 40
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CURRENCY',
|
|
|
|
|
header: Zi.LAN.Currency,
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'AMOUNT',
|
|
|
|
|
header: Zi.LAN.AmountOfMoney, //金额
|
|
|
|
|
width: 80,
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.gridListdetail.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.gridListdetail.getSelectionModel().on('select', function (model, record, index) {
|
|
|
|
|
|
|
|
|
|
var pbsno = record.data.PARENTID;
|
|
|
|
|
var sql = "";
|
|
|
|
|
sql = " BSNO IN (select BSNO FROM V_OP_BILL WHERE PARENTID='" + pbsno + "')";
|
|
|
|
|
this.Parentsql = sql;
|
|
|
|
|
_this.storeBodyBillSum.load({ params: { condition: sql} });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
this.storeBodyBillSum = Ext.create('Ext.data.Store', {
|
|
|
|
|
model: 'MsOPGain',
|
|
|
|
|
remoteSort: false,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsChFee/GetMBLGainList',
|
|
|
|
|
reader: {
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridBillSum = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeBodyBillSum,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
// height: 150,
|
|
|
|
|
loadMask: { msg: Zi.LAN.LoadData },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
// tbar: [{
|
|
|
|
|
// xtype: 'label',
|
|
|
|
|
// id:'lblbillsum',
|
|
|
|
|
// width: 120,
|
|
|
|
|
// height: 22,
|
|
|
|
|
// text: Zi.LAN.SumMoney// '当前此票费用合计'
|
|
|
|
|
// }, {
|
|
|
|
|
// xtype: 'label',
|
|
|
|
|
// id: 'lblbillsum2',
|
|
|
|
|
// width: 320,
|
|
|
|
|
// height: 22,
|
|
|
|
|
// html: "<font color='red'></font>"// '当前此票费用合计'
|
|
|
|
|
// }],
|
|
|
|
|
columns: [{
|
|
|
|
|
header: Zi.LAN.Currency, //"<a href='#'><font color='#FF0000'>总 计</font></a>",
|
|
|
|
|
sortable: false,
|
|
|
|
|
align: 'center',
|
|
|
|
|
dataIndex: 'CURR',
|
|
|
|
|
width: 40
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
|
|
header: Zi.LAN.YingShou, //'含税',
|
|
|
|
|
dataIndex: 'DR',
|
|
|
|
|
align: 'right',
|
|
|
|
|
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; },
|
|
|
|
|
width: 75
|
|
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
header: Zi.LAN.YingFu, //'含税',
|
|
|
|
|
dataIndex: 'CR',
|
|
|
|
|
align: 'right',
|
|
|
|
|
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; },
|
|
|
|
|
width: 75
|
|
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
header: Zi.LAN.Profit, //'含税',
|
|
|
|
|
dataIndex: 'PR',
|
|
|
|
|
align: 'right',
|
|
|
|
|
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; },
|
|
|
|
|
width: 70
|
|
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
header: Zi.LAN.BalDr, //'含税',
|
|
|
|
|
dataIndex: 'BALDR',
|
|
|
|
|
align: 'right',
|
|
|
|
|
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; },
|
|
|
|
|
width: 70
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelBillSum = new Ext.Panel({
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'south',
|
|
|
|
|
height: 150,
|
|
|
|
|
title: Zi.LAN.SumMoney,
|
|
|
|
|
items: [this.gridBillSum]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//#endregion formSearch
|
|
|
|
|
|
|
|
|
|
//查询工具条
|
|
|
|
|
_this = this;
|
|
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
|
|
region: "north",
|
|
|
|
|
tbar: [
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
text: Zi.LAN.ExecuteQuery, //执行查询
|
|
|
|
|
iconCls: "btnrefresh",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onRefreshClick(button, event);
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: Zi.LAN.ResetCondition, //重置
|
|
|
|
|
iconCls: "btnreset",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onClearSql(button, event);
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, '-', {
|
|
|
|
|
text: Zi.LAN.ExaminationPassed, //审核通过
|
|
|
|
|
iconCls: "btnadd",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onAuditPassClick();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
, '-', {
|
|
|
|
|
text: Zi.LAN.ExaminationPassedAll, //全部审核通过
|
|
|
|
|
iconCls: "btnadd",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onAllAuditClick();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
'-',
|
|
|
|
|
{
|
|
|
|
|
text: Zi.LAN.DismissedSubmission, //驳回提交
|
|
|
|
|
iconCls: "btndelete",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onAuditBackClick();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'button',
|
|
|
|
|
width: 90,
|
|
|
|
|
text: Zi.LAN.AdvancedSearch,
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}, '-', {
|
|
|
|
|
text: Zi.LAN.print, //打印
|
|
|
|
|
tooltip: Zi.LAN.printbb, //打印报表
|
|
|
|
|
menu:
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
text: Zi.LAN.printlb, //打印列表
|
|
|
|
|
handler: function (menu, event) {
|
|
|
|
|
_this.Print();
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
text: Zi.LAN.printxz, //打印选中
|
|
|
|
|
handler: function (menu, event) {
|
|
|
|
|
_this.PrintSelect(menu, event, 1);
|
|
|
|
|
}
|
|
|
|
|
}],
|
|
|
|
|
scope: this
|
|
|
|
|
}, '-',
|
|
|
|
|
{
|
|
|
|
|
text: Zi.LAN.SetNoprint, //打印
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.SetNoPrint();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, '-', {
|
|
|
|
|
text: Zi.LAN.ExportExcel, //导出EXcel
|
|
|
|
|
id: "btnExportExcel",
|
|
|
|
|
iconCls: 'btnexportexcel',
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.onExportClick(button, event);
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//#region 附件信息
|
|
|
|
|
this.storeChfeeFile = Ext.create('Ext.data.Store', {
|
|
|
|
|
model: 'FeeFileModel',
|
|
|
|
|
remoteSort: false,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/Account/Chfee_payapplication/GetFileList',
|
|
|
|
|
reader: {
|
|
|
|
|
id: 'GID',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//表格
|
|
|
|
|
this.FeeFileColumns = [
|
|
|
|
|
{
|
|
|
|
|
sortable: true, hidden: true,
|
|
|
|
|
dataIndex: 'GID', readOnly: true,
|
|
|
|
|
header: 'GID',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true, hidden: false,
|
|
|
|
|
dataIndex: 'File_OriginalName', readOnly: true,
|
|
|
|
|
header: Zi.LAN.FileName,
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true, hidden: false,
|
|
|
|
|
dataIndex: 'UpdateTime', readOnly: true,
|
|
|
|
|
header: Zi.LAN.FileDate,
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true, hidden: false,
|
|
|
|
|
dataIndex: 'Operator', readOnly: true,
|
|
|
|
|
header: Zi.LAN.FilePerson,
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true, hidden: true,
|
|
|
|
|
dataIndex: 'File_Name', readOnly: true,
|
|
|
|
|
header: Zi.LAN.FileWName,
|
|
|
|
|
width: 80
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
sortable: true, hidden: true,
|
|
|
|
|
dataIndex: 'File_Path',
|
|
|
|
|
header: 'File_Path',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'actioncolumn',
|
|
|
|
|
width: 50,
|
|
|
|
|
text: Zi.LAN.Operating,
|
|
|
|
|
items: [{
|
|
|
|
|
icon: '/images/icons/btnSearch.gif', // Use a URL in the icon config
|
|
|
|
|
tooltip: '预览',
|
|
|
|
|
handler: function (grid, rowIndex, colIndex) {
|
|
|
|
|
var rec = grid.getStore().getAt(rowIndex);
|
|
|
|
|
var filePath = "/Areas/Account/Files/" + rec.get('BillNo') + '/' + rec.get('File_Name');
|
|
|
|
|
//var imgView = new Shipping.FileView({ filePath: filePath });
|
|
|
|
|
//imgView.show();
|
|
|
|
|
DsOpenEditWin(filePath, "", "650", "1250");
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
var selCertModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
this.fileGrid = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeChfeeFile,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
layout: 'border',
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: Zi.LAN.LoadData },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
selModel: selCertModel,
|
|
|
|
|
singleSelect: true,
|
|
|
|
|
selType: 'rowmodel',
|
|
|
|
|
columns: this.FeeFileColumns
|
|
|
|
|
});
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: "north",
|
|
|
|
|
height: 80,
|
|
|
|
|
items: [this.formSearch, this.panelBtn]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelSum = new Ext.Panel({
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'east',
|
|
|
|
|
width: 330,
|
|
|
|
|
split: true,
|
|
|
|
|
margin: '2 2',
|
|
|
|
|
items: [this.gridSum, this.panelBillSum]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.paneldetail = new Ext.Panel({
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
|
|
|
|
|
items: [
|
|
|
|
|
this.gridListdetail, this.panelSum
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//#region 增加附件tab
|
|
|
|
|
this.page_1 = new Ext.Panel({
|
|
|
|
|
id: "page_1",
|
|
|
|
|
title: Zi.LAN.PaymentApplicationDetails, //付费申请明细
|
|
|
|
|
// autoScroll: true,
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
//closable:true,
|
|
|
|
|
items: [this.paneldetail]
|
|
|
|
|
});
|
|
|
|
|
this.page_2 = new Ext.Panel({
|
|
|
|
|
id: "page_2",
|
|
|
|
|
title: Zi.LAN.AttachmentInformation,
|
|
|
|
|
// autoScroll: true,
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
//closable:true,
|
|
|
|
|
items: [this.fileGrid]
|
|
|
|
|
});
|
|
|
|
|
this.MainTab = new Ext.tab.Panel({
|
|
|
|
|
layout: "border",
|
|
|
|
|
// height: 250,
|
|
|
|
|
region: "center", split: true,
|
|
|
|
|
items: [
|
|
|
|
|
this.page_1
|
|
|
|
|
, this.page_2
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
|
|
items: [this.panelTop, this.gridList, this.MainTab]
|
|
|
|
|
});
|
|
|
|
|
_this = this;
|
|
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, isaudit: this.isAudit });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
this.storeBodyListdetail.on('beforeload', function (store) {
|
|
|
|
|
var sql = " BILLNO='" + _this.billno + "'";
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
this.storeBodyBillSum.on('beforeload', function (store) {
|
|
|
|
|
var sql = this.Parentsql;
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
if (this.worksql != undefined && this.worksql != '') {
|
|
|
|
|
this.worksql = this.worksql.replace(/@@/g, '=')
|
|
|
|
|
this.sqlcontext = this.worksql;
|
|
|
|
|
this.onDsQuery();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeList.on('load', function (store, records) {
|
|
|
|
|
//if (store.getCount() > 0) {
|
|
|
|
|
// this.gridList.getSelectionModel().select(0);
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridList.getSelectionModel().on('select', function (model, record, index) {
|
|
|
|
|
|
|
|
|
|
_this.billno = record.data.BILLNO;
|
|
|
|
|
var sql = "";
|
|
|
|
|
sql = " BILLNO='" + _this.billno + "'";
|
|
|
|
|
_this.storeBodyListdetail.load({ params: { start: 0, limit: _this.BodyPageSize, condition: sql} });
|
|
|
|
|
_this.storeBodySum.load({ params: { condition: sql} });
|
|
|
|
|
_this.storeChfeeFile.load({ params: { start: 0, limit: 9999, BillNo: _this.billno} });
|
|
|
|
|
_this.storeBodyBillSum.removeAll();
|
|
|
|
|
var CUSTOMERNAME = record.data.CUSTOMERNAME;
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '',
|
|
|
|
|
url: '/MvcShipping/MsChFee/GetFeeBalAmount',
|
|
|
|
|
params: {
|
|
|
|
|
condition: " FEETYPE=1 AND CUSTOMERNAME='" + CUSTOMERNAME + "'"
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (result.Data == 0) {
|
|
|
|
|
_this.panelBillSum.setTitle(Zi.LAN.SumMoney, false);
|
|
|
|
|
} else {
|
|
|
|
|
_this.panelBillSum.setTitle(Zi.LAN.SumMoney + "<font color='red'>(此付费客户存在应收费用" + result.Data + ")</font>", false);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
_this.panelBillSum.setTitle(Zi.LAN.SumMoney, false);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '',
|
|
|
|
|
url: '/MvcShipping/MsSysParamSet/GetData',
|
|
|
|
|
params: {
|
|
|
|
|
condition: "PARAMNAME='PAYAUDITEXRATE'"
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (result.Success != true) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
var data = result.data;
|
|
|
|
|
if (data.PARAMVALUE == '1') {
|
|
|
|
|
this.isuseexrate = 1;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '',
|
|
|
|
|
url: '/MvcShipping/MsSysParamSet/GetData',
|
|
|
|
|
params: {
|
|
|
|
|
condition: "PARAMNAME='YJFEENAME'"
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (result.Success != true) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
var data = result.data;
|
|
|
|
|
this.YJFEENAME = data.PARAMVALUE;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '',
|
|
|
|
|
url: '/MvcShipping/MsSysParamSet/GetData',
|
|
|
|
|
params: {
|
|
|
|
|
condition: "PARAMNAME='YJFEENAME(USD)'"
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (result.Success != true) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
var data = result.data;
|
|
|
|
|
this.YJFEENAMEUSD = data.PARAMVALUE;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region 结算汇率和金额
|
|
|
|
|
|
|
|
|
|
Ext.define('MsFeeCurr', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
idProperty: 'CURR',
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'CURR', type: 'string' },
|
|
|
|
|
{ name: 'DEFRATE', type: 'number' },
|
|
|
|
|
{ name: 'CRDEFRATE', type: 'number' }
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.StoreCurr = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'MsFeeCurr',
|
|
|
|
|
proxy: { url: '/MvcShipping/MsChFee/GetFeeCurrList' }
|
|
|
|
|
});
|
|
|
|
|
this.StoreCurr.load({ params: { condition: ""} });
|
|
|
|
|
|
|
|
|
|
this.comboxStlCurr = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '结算币别',
|
|
|
|
|
store: this.StoreCurr,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'STLCURR',
|
|
|
|
|
value: 'RMB',
|
|
|
|
|
valueField: 'CURR',
|
|
|
|
|
displayField: 'CURR'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formAuditStlShow = Ext.widget('form', {
|
|
|
|
|
frame: true,
|
|
|
|
|
region: 'center',
|
|
|
|
|
bodyPadding: 5,
|
|
|
|
|
fieldDefaults: {
|
|
|
|
|
margins: '2 2 2 2',
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
flex: 1,
|
|
|
|
|
labelWidth: 80,
|
|
|
|
|
msgTarget: 'qtip'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
items: [
|
|
|
|
|
{//fieldset 1
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
layout: 'anchor',
|
|
|
|
|
defaults: {
|
|
|
|
|
anchor: '100%'
|
|
|
|
|
},
|
|
|
|
|
items: [{
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxStlCurr, {
|
|
|
|
|
fieldLabel: '汇率',
|
|
|
|
|
name: 'STLRATE'
|
|
|
|
|
}
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [{
|
|
|
|
|
fieldLabel: '实付金额',
|
|
|
|
|
name: 'STLAMOUNT'
|
|
|
|
|
}
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
|
|
}
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
|
|
}//end fieldset 1
|
|
|
|
|
]//end root items
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.winAuditStlShow = Ext.create('Ext.window.Window', {
|
|
|
|
|
title: "付费审核", //"发送预配舱单",
|
|
|
|
|
width: 450,
|
|
|
|
|
//height : 120,
|
|
|
|
|
//plain : true,
|
|
|
|
|
iconCls: "addicon",
|
|
|
|
|
resizable: false,
|
|
|
|
|
// 是否可以拖动
|
|
|
|
|
// draggable:false,
|
|
|
|
|
collapsible: true, // 允许缩放条
|
|
|
|
|
closeAction: 'close',
|
|
|
|
|
closable: true,
|
|
|
|
|
modal: 'true',
|
|
|
|
|
buttonAlign: "center",
|
|
|
|
|
bodyStyle: "padding:0 0 0 0",
|
|
|
|
|
items: [this.formAuditStlShow],
|
|
|
|
|
buttons: [{
|
|
|
|
|
text: "审核通过", //"确定发送",
|
|
|
|
|
minWidth: 70,
|
|
|
|
|
handler: function () {
|
|
|
|
|
var stlcurr = _this.formAuditStlShow.getForm().findField('STLCURR').getValue();
|
|
|
|
|
var stlrate = _this.formAuditStlShow.getForm().findField('STLRATE').getValue();
|
|
|
|
|
var stlamount = _this.formAuditStlShow.getForm().findField('STLAMOUNT').getValue();
|
|
|
|
|
_this.onAuditExratePassClick(stlcurr, stlrate, stlamount);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
text: "关闭", //"关闭",
|
|
|
|
|
minWidth: 70,
|
|
|
|
|
handler: function () {
|
|
|
|
|
_this.winAuditStlShow.close();
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
});
|
|
|
|
|
// #endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onAuditPassClick: function () {
|
|
|
|
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
|
|
if (selections.length == 0) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.SelectDanJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var isAuditExrate = false;
|
|
|
|
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
|
|
var rec = selections[i];
|
|
|
|
|
var BILLSTATUS = rec.data.BILLSTATUS;
|
|
|
|
|
var IsAudit = rec.data.IsAudit;
|
|
|
|
|
if ((BILLSTATUS == '6' || BILLSTATUS == '2') && (IsAudit != 0)) {
|
|
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.NoShenHe, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
if (this.isuseexrate == 1) {
|
|
|
|
|
for (var i = 0; i < this.storeBodyListdetail.getCount(); i += 1) {
|
|
|
|
|
var member = this.storeBodyListdetail.getAt(i);
|
|
|
|
|
if ((member.data.FEENAME == this.YJFEENAME) || (member.data.FEENAME == this.YJFEENAMEUSD))
|
|
|
|
|
isAuditExrate = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isAuditExrate && selections.length == 1) {
|
|
|
|
|
_this.formAuditStlShow.getForm().findField('STLAMOUNT').setValue(0)
|
|
|
|
|
_this.winAuditStlShow.show();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
|
|
|
|
Ext.MessageBox.confirm(Zi.LAN.Prompt, Zi.LAN.SureShenHe, function (btn) {
|
|
|
|
|
if (btn == 'yes') {
|
|
|
|
|
Ext.Msg.wait(Zi.LAN.NowShenHe);
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: Zi.LAN.NowShenHe,
|
|
|
|
|
url: '/Account/Chfee_payapplication/AuditList',
|
|
|
|
|
params: {
|
|
|
|
|
data: jsonbodyAddDatas
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
|
|
|
|
|
_this.storeList.reload();
|
|
|
|
|
if (jsonresult.Message != '审核通过') {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
} else Ext.Msg.hide();
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Error, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function (response, options) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Caveat, msg: Zi.LAN.FuWuQiError, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
},
|
|
|
|
|
success: function (response, options) {
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}); //end Ext.Ajax.request
|
|
|
|
|
}
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onAuditExratePassClick: function (stlcurr, stlrate, stlamount) {
|
|
|
|
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
|
|
if (selections.length == 0) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.SelectDanJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var isAuditExrate = false;
|
|
|
|
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
|
|
var rec = selections[i];
|
|
|
|
|
var BILLSTATUS = rec.data.BILLSTATUS;
|
|
|
|
|
var IsAudit = rec.data.IsAudit;
|
|
|
|
|
if ((BILLSTATUS == '6' || BILLSTATUS == '2') && (IsAudit != 0)) {
|
|
|
|
|
rec.data.STLCURR = stlcurr;
|
|
|
|
|
rec.data.STLRATE = stlrate;
|
|
|
|
|
rec.data.STLAMOUNT = stlamount;
|
|
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.NoShenHe, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
|
|
|
|
Ext.MessageBox.confirm(Zi.LAN.Prompt, Zi.LAN.SureShenHe, function (btn) {
|
|
|
|
|
if (btn == 'yes') {
|
|
|
|
|
Ext.Msg.wait(Zi.LAN.NowShenHe);
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: Zi.LAN.NowShenHe,
|
|
|
|
|
url: '/Account/Chfee_payapplication/AuditList',
|
|
|
|
|
params: {
|
|
|
|
|
data: jsonbodyAddDatas
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
_this.storeList.reload();
|
|
|
|
|
_this.winAuditStlShow.close();
|
|
|
|
|
if (jsonresult.Message != '审核通过') {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
} else
|
|
|
|
|
Ext.Msg.hide();
|
|
|
|
|
// Ext.Msg.show({ title: Zi.LAN.Prompt, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Error, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function (response, options) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Caveat, msg: Zi.LAN.FuWuQiError, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
},
|
|
|
|
|
success: function (response, options) {
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}); //end Ext.Ajax.request
|
|
|
|
|
}
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onAuditBackClick: function () {
|
|
|
|
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
|
|
if (selections.length == 0) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.DismissDocuments, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
|
|
var rec = selections[i];
|
|
|
|
|
var BILLSTATUS = rec.data.BILLSTATUS;
|
|
|
|
|
var IsAudit = rec.data.IsAudit;
|
|
|
|
|
if ((BILLSTATUS == '0' || BILLSTATUS == '2') && (IsAudit != -1)) {
|
|
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.DismissDocumentsNo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
|
|
|
|
Ext.MessageBox.show({
|
|
|
|
|
title: Zi.LAN.Tishi7,
|
|
|
|
|
msg: Zi.LAN.Tishi8,
|
|
|
|
|
width: 300,
|
|
|
|
|
buttons: Ext.MessageBox.OKCANCEL,
|
|
|
|
|
multiline: true,
|
|
|
|
|
fn: function (btn, text) {
|
|
|
|
|
if (btn == "ok") {
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: Zi.LAN.DismissDocumentsNow,
|
|
|
|
|
url: '/Account/Chfee_payapplication/AuditBackList',
|
|
|
|
|
params: {
|
|
|
|
|
data: jsonbodyAddDatas,
|
|
|
|
|
reason: text
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
_this.storeList.reload();
|
|
|
|
|
Ext.Msg.hide();
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Error, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function (response, options) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Caveat, msg: Zi.LAN.FuWuQiError, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
},
|
|
|
|
|
success: function (response, options) {
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}); //end Ext.Ajax.request
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Ext.MessageBox.confirm(Zi.LAN.Prompt, Zi.LAN.DismissDocumentsSure, function (btn) {
|
|
|
|
|
// if (btn == 'yes') {
|
|
|
|
|
// Ext.Msg.wait(Zi.LAN.DismissDocumentsNow);
|
|
|
|
|
// Ext.Ajax.request({
|
|
|
|
|
// waitMsg: Zi.LAN.DismissDocumentsNow,
|
|
|
|
|
// url: '/Account/Chfee_payapplication/AuditBackList',
|
|
|
|
|
// params: {
|
|
|
|
|
// data: jsonbodyAddDatas
|
|
|
|
|
// },
|
|
|
|
|
// callback: function (options, success, response) {
|
|
|
|
|
// if (success) {
|
|
|
|
|
// var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
// if (jsonresult.Success) {
|
|
|
|
|
// _this.storeList.reload();
|
|
|
|
|
// Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.DismissSuccess, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
// }
|
|
|
|
|
// else {
|
|
|
|
|
// Ext.Msg.show({ title: Zi.LAN.Error, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// failure: function (response, options) {
|
|
|
|
|
// Ext.Msg.show({ title: Zi.LAN.Caveat, msg: Zi.LAN.FuWuQiError, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
// },
|
|
|
|
|
// success: function (response, options) {
|
|
|
|
|
// },
|
|
|
|
|
// scope: this
|
|
|
|
|
// }); //end Ext.Ajax.request
|
|
|
|
|
// }
|
|
|
|
|
// }, this);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onAllAuditClick: function (menu, event) {
|
|
|
|
|
|
|
|
|
|
if (this.storeList.length == 0) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.NoAudit, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
Ext.MessageBox.confirm(Zi.LAN.Prompt, Zi.LAN.SureShenHeAll, function (btn) {
|
|
|
|
|
if (btn == 'yes') {
|
|
|
|
|
Ext.Msg.wait(Zi.LAN.NowAudit);
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: Zi.LAN.Zhengzaisuoding,
|
|
|
|
|
url: '/Account/Chfee_payapplication/AllAudit',
|
|
|
|
|
params: {
|
|
|
|
|
condition: _this.BillSql
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (!result.Success) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: Zi.LAN.Prompt,
|
|
|
|
|
msg: result.Message,
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
Ext.Msg.hide();
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiError, response.responseText);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onClearSql: function () {
|
|
|
|
|
var form = this.formSearch.getForm();
|
|
|
|
|
form.reset();
|
|
|
|
|
}, //onDeleteClick
|
|
|
|
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
this.BillSql = sql;
|
|
|
|
|
_this.panelBillSum.setTitle(Zi.LAN.SumMoney, false);
|
|
|
|
|
|
|
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
|
|
this.storeList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql, isaudit: this.isAudit },
|
|
|
|
|
waitMsg: Zi.LAN.NowSelect,
|
|
|
|
|
callback: function (r, options, success) {
|
|
|
|
|
if (success) {
|
|
|
|
|
if (r.length == 0) {
|
|
|
|
|
|
|
|
|
|
var sql = " BILLNO='11111111' ";
|
|
|
|
|
this.storeBodyListdetail.load({ params: { start: 0, limit: _this.BodyPageSize,condition: sql} });
|
|
|
|
|
this.storeBodySum.load({ params: { condition: sql} });
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onDsQuery: function () {
|
|
|
|
|
//var girdcolums = this.gridList.getColumnMode();
|
|
|
|
|
var sql = this.sqlcontext;
|
|
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
|
|
this.storeList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
|
|
waitMsg: Zi.LAN.NowSelect,
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onExportClick: function (button, event) {
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
GridExportExcelPage(this.gridList);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
|
|
if (selections.length == 0) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.SelectDanju, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var record = selections[0];
|
|
|
|
|
var billNo = record.data.BILLNO;
|
|
|
|
|
|
|
|
|
|
var sortstr = ' b.VESSEL,b.VOYNO,b.MBLNO ';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var printType = 'MSCHFEEPAYAPPLICATION';
|
|
|
|
|
var sql1 = "SELECT p.*,(select ShowName from [user] where GID=p.APPLICANT) as APPLICANTNAME,(select bankname from info_client_bank where gid=p.CUSTACCOUNTGID) CUSTBANKNAME,";
|
|
|
|
|
sql1 = sql1 + "(select ACCOUNT from info_client_bank where gid=p.CUSTACCOUNTGID) CUSTACCOUNT,(select DESCRIPTION from info_client where SHORTNAME=p.CUSTOMERNAME) CUSTFULLNAME FROM ch_fee_payapplication p WHERE BILLNO='" + billNo + "'";
|
|
|
|
|
var sql2 = "SELECT c.GID,c.BSNO,c.FEEID,c.FEENAME,c.CURRENCY,c.AMOUNT,c.DOAMOUNT,c.ORIGCURRENCY,c.ORIGAMOUNT,c.EXCHANGERATE,FEETYPE ";
|
|
|
|
|
sql2 = sql2 + ",b.CUSTOMERNAME,b.VESSEL,b.VOYNO,b.ETD,b.PORTLOAD";
|
|
|
|
|
sql2 = sql2 + " ,b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.DOC,b.SALE,b.MBLNO,b.CUSTNO"
|
|
|
|
|
sql2 = sql2 + " FROM ch_fee_do c left join v_op_bill b on (b.bsno=c.bsno)";
|
|
|
|
|
sql2 = sql2 + " WHERE C.BILLNO='" + billNo + "' ORDER BY " + sortstr;
|
|
|
|
|
|
|
|
|
|
var sql3 = "";
|
|
|
|
|
var sql4 = "";
|
|
|
|
|
var sql5 = "";
|
|
|
|
|
var sql6 = "";
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
},
|
|
|
|
|
SetNoPrint: function () {
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
|
|
if (selections.length == 0) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.SelectDanju, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var feeGidSql = '';
|
|
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
|
|
var record = selections[i];
|
|
|
|
|
var feeGId = "'" + record.get('BILLNO') + "'";
|
|
|
|
|
if (feeGidSql == '') {
|
|
|
|
|
feeGidSql = feeGId;
|
|
|
|
|
} else {
|
|
|
|
|
feeGidSql = feeGidSql + "," + feeGId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '',
|
|
|
|
|
url: '/Account/Chfee_payapplication/UpdateNoPrint',
|
|
|
|
|
params: {
|
|
|
|
|
billnos: feeGidSql
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (!result.Success) {
|
|
|
|
|
Ext.Msg.show({//提示
|
|
|
|
|
title: Zi.LAN.Prompt,
|
|
|
|
|
msg: result.Message,
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
_this.storeList.reload();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {//请求出现错误,请重试
|
|
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiError, response.responseText);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
PrintSelect: function () {
|
|
|
|
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
|
|
if (selections.length == 0) {
|
|
|
|
|
//Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.SelectDanju, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var isaudit = 1;
|
|
|
|
|
var isprint = 0;
|
|
|
|
|
var feeGidSql = '';
|
|
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
|
|
var record = selections[i];
|
|
|
|
|
var feeGId = "'" + record.get('BILLNO') + "'";
|
|
|
|
|
if (feeGidSql == '') {
|
|
|
|
|
feeGidSql = feeGId;
|
|
|
|
|
} else {
|
|
|
|
|
feeGidSql = feeGidSql + "," + feeGId;
|
|
|
|
|
}
|
|
|
|
|
if (record.data.BILLSTATUSREF != '审核通过' && record.data.BILLSTATUSREF != '已结算' && record.data.BILLSTATUSREF != '部分结算') {
|
|
|
|
|
isaudit = 0;
|
|
|
|
|
}
|
|
|
|
|
if (record.data.ISPRINT == '1') {
|
|
|
|
|
isprint = 1;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var record = selections[0];
|
|
|
|
|
var billNo = record.data.BILLNO;
|
|
|
|
|
|
|
|
|
|
var printType = 'MSCHFEEPAYAPPLICATIONSEL';
|
|
|
|
|
var sql1 = "SELECT p.*,(select ShowName from [user] where GID=p.APPLICANT) as APPLICANTNAME,(select bankname from info_client_bank where gid=p.CUSTACCOUNTGID) CUSTBANKNAME,";
|
|
|
|
|
sql1 = sql1 + "(select ACCOUNT from info_client_bank where gid=p.CUSTACCOUNTGID) CUSTACCOUNT,dbo.GetStlByPayNo(p.BILLNO) as BALBILLNO FROM ch_fee_payapplication p WHERE BILLNO IN (" + feeGidSql + ") ";
|
|
|
|
|
var sql2 = "";
|
|
|
|
|
|
|
|
|
|
var sql3 = "";
|
|
|
|
|
var sql4 = "";
|
|
|
|
|
var sql5 = "";
|
|
|
|
|
var sql6 = "";
|
|
|
|
|
|
|
|
|
|
if (isaudit == 1 && isprint == 0) {
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '',
|
|
|
|
|
url: '/Account/Chfee_payapplication/UpdatePrint',
|
|
|
|
|
params: {
|
|
|
|
|
billnos: feeGidSql
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
_this.storeList.reload();
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '',
|
|
|
|
|
url: '/MvcShipping/MsSysParamSet/GetData',
|
|
|
|
|
params: {
|
|
|
|
|
condition: "PARAMNAME='PAYAPPPRINTAFTERAUDIT'"
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (result.Success != true) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
var data = result.data;
|
|
|
|
|
if (data.PARAMVALUE == '1' && isaudit == 0) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Error, msg: Zi.LAN.shtgprint, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '',
|
|
|
|
|
url: '/MvcShipping/MsSysParamSet/GetData',
|
|
|
|
|
params: {
|
|
|
|
|
condition: "PARAMNAME='PAYAPPONLYPRINTONE'"
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (result.Success != true) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
var data = result.data;
|
|
|
|
|
if (data.PARAMVALUE == '1' && isprint == 1) {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.Error, msg: Zi.LAN.notcfprint, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '',
|
|
|
|
|
url: '/Account/Chfee_payapplication/UpdatePrint',
|
|
|
|
|
params: {
|
|
|
|
|
billnos: feeGidSql
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
_this.storeList.reload();
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getCondition: function () {
|
|
|
|
|
var form = this.formSearch.getForm();
|
|
|
|
|
if (!form.isValid()) {
|
|
|
|
|
Ext.Msg.alert(Zi.LAN.Prompt, Zi.LAN.SelectError);
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var sql = '';
|
|
|
|
|
|
|
|
|
|
var customNo = form.findField('BsNo').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, customNo, "BILLNO like '%" + customNo + "%'");
|
|
|
|
|
|
|
|
|
|
var sBsNo = form.findField('sBsNo').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, sBsNo, " EXISTS (select 1 from ch_fee_do d where d.BILLNO=i.BILLNO AND d.BSNO IN (SELECT BSNO FROM V_OP_BILL WHERE CUSTNO like '%" + sBsNo + "%' or MBLNO like '%" + sBsNo + "%' or HBLNO like '%" + sBsNo + "%' or CUSTOMNO like '%" + sBsNo + "%' or ORDERNO like '%" + sBsNo + "%'))");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var custName = form.findField('CustName').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, custName, "CUSTOMERNAME like '%" + custName + "%'");
|
|
|
|
|
|
|
|
|
|
var expDateBgn = form.findField('ExpDateBgn').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, expDateBgn, "APPLYTIME >='" + expDateBgn + "'");
|
|
|
|
|
|
|
|
|
|
var expDateEnd = form.findField('ExpDateEnd').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, expDateEnd, "APPLYTIME <='" + expDateEnd + "'");
|
|
|
|
|
|
|
|
|
|
var APPLICANT = form.findField('APPLICANT').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, APPLICANT, "APPLICANT like '%" + APPLICANT + "%'");
|
|
|
|
|
|
|
|
|
|
this.isAudit = form.findField('DC').getValue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|