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

5935 lines
227 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

Ext.namespace('Shipping');
Shipping.MsChfeeAudit = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsChfeeAudit.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
ParentWin: null, //弹出式
ParentPanel: null, //Tab页编辑模式
OpStatus: 'add',
EditRecord: null,
RefBillNo: '*',
DataLoading: true,
stroplb: '',
strOPTYPE: '普通货',
strBSNO: '',
strMBSNO: '',
FeeStatus: '',
feeType: 0,
PageSize: 50,
sqlcontext: '',
sortfield: '',
sortdire: '',
isAmend: '0',
initUIComponents: function () {
Ext.Ajax.timeout = 120000;
this.formname = 'FormMsChfeeAudit';
this.strMBSNO = '';
this.isAmend = '0';
this.AMENDSELFWORKFLOW = 0;
this.AUDITNOBACK = 0;
this.strOPTYPE = '普通货';
this.worktype = '';
//明细表-数据集
this.storeDrChFee = Ext.create('Ext.data.Store', {
model: 'MsChFee',
remoteSort: false,
proxy: {
type: 'ajax',
timeout: 120000,
url: '/Account/Chfee_Audit/GetDataList',
reader: {
id: 'GId',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeCrChFee = Ext.create('Ext.data.Store', {
model: 'MsChFee',
remoteSort: false,
proxy: {
type: 'ajax',
timeout: 120000,
url: '/Account/Chfee_Audit/GetDataList',
reader: {
id: 'GId',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeChFeeGain = Ext.create('Ext.data.Store', {
model: 'MsChFeeGain',
remoteSort: false,
proxy: {
type: 'ajax',
timeout: 120000,
url: '/MvcShipping/MsChFee/GetOPGainList',
reader: {
id: 'GId',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeDrChFee.on('beforeload', function (store) {
store.removeAll();
}, this);
this.storeCrChFee.on('beforeload', function (store) {
store.removeAll();
}, this);
this.storeChFeeModify = Ext.create('Ext.data.Store', {
model: 'MsChFee',
remoteSort: false,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsChFee/GetModifyData',
reader: {
id: 'GId',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.CheckAll = new Ext.form.Checkbox({
fieldLabel: Zi.LAN.OnlyAuditBusiness, //仅需审核业务
checked: true,
name: 'IsOnlyAuditBL',
width: 120
});
this.CheckFeeAll = new Ext.form.Checkbox({
fieldLabel: Zi.LAN.ChargeDetailsAuditBusiness, //费用明细待审核
labelWidth: 130,
name: 'IsOnlyAuditFee',
checked: false,
width: 150
});
this.initgirdDrcolums = [{
sortable: true,
dataIndex: 'GId',
header: '惟一编号',
hidden: true,
width: 160
}, {
sortable: true,
dataIndex: 'BsNo',
header: '业务编号',
hidden: true,
width: 200
}, {
sortable: true,
dataIndex: 'FeeStatus',
header: Zi.LAN.CostStatus,//费用状态
renderer: function (value, p, record) {
return record.data.FeeStatus_Ref;
},
width: 66
}, {
sortable: true,
dataIndex: 'FeeName',
header: Zi.LAN.NameFeePayable,//应收费用名称
width: 100
}, {
sortable: true,
dataIndex: 'FeeDescription',
header: Zi.LAN.CostEnglishName,//费用英文名称
width: 120
}, {
sortable: true,
dataIndex: 'CustomerType',
header: Zi.LAN.CustomerCategory,//客户类别
width: 80
}, {
sortable: true,
dataIndex: 'CustomerName',
header: Zi.LAN.SettlementObject,//结算对象
width: 120
}, {
sortable: true,
dataIndex: 'Unit',
header: Zi.LAN.UnitStandard,//单位标准
width: 60
}, {
sortable: true,
dataIndex: 'UnitPrice',
header: Zi.LAN.price,//单价
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: 'TaxUnitPrice',
header: Zi.LAN.TaxPrice,//含税单价
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: 'Quantity',
header: Zi.LAN.Num,//数量
width: 60
}, {
sortable: true,
dataIndex: 'TaxRate',
header: Zi.LAN.taxRate,//税率
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: 60
}, {
sortable: true,
dataIndex: 'NoTaxAmount',
header: Zi.LAN.NotaxRate,//不含税金额
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: 'Amount',
header: Zi.LAN.Money,//金额
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: 'Currency',
header: Zi.LAN.Currency,//币别
width: 40
}, {
sortable: true,
dataIndex: 'ExChangerate',
header: Zi.LAN.exchangeRate,//汇率
align: 'right',
width: 60
}, {
sortable: true,
dataIndex: 'AccTaxRate',
header: Zi.LAN.OutTaxRate,//进项税率
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: 'Remark',
header: Zi.LAN.Remarks,//备注
width: 150
}, {
sortable: true,
dataIndex: 'IsAdvancedpay',
header: Zi.LAN.WhetherToAdvance,//是否垫付
width: 60
}, {
sortable: true,
dataIndex: 'IsInvoice',
header: Zi.LAN.Nnvoice,//不开发票
width: 60
}, {
sortable: true,
dataIndex: 'FeeFrt',
header: 'FRT',
width: 40
}, {
sortable: true,
dataIndex: 'Commissionrate',
header: Zi.LAN.CommissionRate,//佣金比率
width: 60
}, {
sortable: true,
dataIndex: 'OpName',
header: Zi.LAN.notIncludederson,//录入人
width: 60
}, {
sortable: true,
dataIndex: 'EnterDate',
header: Zi.LAN.EnterDate,//录入日期
//renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 80
}, {
sortable: true,
dataIndex: 'Auditoperator',
header: Zi.LAN.Auditor,//审核人
width: 60
}, {
sortable: true,
dataIndex: 'AuditDate',
header: Zi.LAN.ReviewDate,//审核日期
//renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 80
}, {
sortable: true,
dataIndex: 'Settlement',
header: Zi.LAN.SettlementAmount,//结算金额
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: 'Invoice',
header: Zi.LAN.BillingAmount,//已开票金额
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: 'InvoiceNum',
header: Zi.LAN.InvoiceNumber,//发票号码
width: 80
}, {
sortable: true,
dataIndex: 'IsOpen',
header: Zi.LAN.IsOpen, //'是否机密',
renderer: function (value, cellmeta) {
if (value == 'True' ||value == 'true' || value == '1') {
return "√";
} else return "";
},
width: 60
}, {
sortable: true,
dataIndex: 'Reason',
header: Zi.LAN.Reason, //原因
width: 80
}
];
this.girdDrcolums = this.initgirdDrcolums;
this.feeDrGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
_this = this;
this.gridDrChFee = new Ext.grid.GridPanel({
store: this.storeDrChFee,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LoadData },//数据加载中
trackMouseOver: true,
disableSelection: false,
selModel: this.feeDrGridCheckBoxModel,
selType: 'cellmodel',
viewConfig: {
autoFill: true,
getRowClass: function (record, rowIndex, rowParams, store) {
var feeStatus = record.get('FeeStatus');
var ISSEL = record.get('ISSEL');
if (ISSEL == '1')
return Shipping.FeeGetRowClassFont(feeStatus);
else
return Shipping.FeeGetRowClass(feeStatus);
}
},
tbar: [{
xtype: 'label',
labelAlign: 'right',
width: 60,
html: "<a><font color='#6B8E23'><B>" + Zi.LAN.ChargesPayable + "</B></font></a>"
}, {
text: Zi.LAN.ExaminationPassed,//审核通过
tooltip: '审核通过',
iconCls: "btnsubmit",
handler: function (button, event) {
this.onAuditNewClick(button, event, 1);
},
scope: this
}, {
text: Zi.LAN.AuditCopy,
tooltip: '配对审核,同时审核标红的应付或应收',
handler: function (button, event) {
_this.onCopyAuditClick('1');
},
scope: this
}, {
text: Zi.LAN.DismissedSubmission,//驳回提交
tooltip: '驳回提交',
iconCls: "btncancel",
handler: function (button, event) {
this.onAuditBackNewClick(button, event, 1);
},
scope: this
}, '-', {
text: Zi.LAN.ApproveApplication,//批准申请
menu: [
{ text: Zi.LAN.ApproveApplication, //批准申请
iconCls: "btnsubmit",
handler: function (button, event) {
_this.onAuditShenClick(button, event, 1);
}
}, { text: Zi.LAN.DismissApplication,//驳回申请
iconCls: "btncancel",
handler: function (menu, event) {
_this.onAuditBackShenClick(menu, event, 1);
}
}, { text: Zi.LAN.HistoricalApplication,//历史申请
handler: function (menu, event) {
_this.onHistryShenClick(menu, event, 1);
}
}],
scope: this
}, '-', {
text: Zi.LAN.DismissedSubmission2,//禁开发票
menu: [
{ text: Zi.LAN.DismissedSubmission2, //禁开发票
tooltip: '禁开发票',
handler: function (button, event) {
_this.onNoIvoiceClick(button, event, 1);
}
}, { text: Zi.LAN.UnlockInvoice,//解禁发票
tooltip: '解禁发票',
handler: function (button, event) {
_this.onCancelNoInvoiceClick(button, event, 1);
}
}],
scope: this
}, '-', {
text: Zi.LAN.ViewInformation,//查看信息
tooltip: '查看信息',
handler: function (button, event) {
_this.onViewDetailClick(button, event, 1);
},
scope: this
}, '-', {
text: Zi.LAN.SavelistStyle,//保存列表样式
menu: [
{ text: Zi.LAN.Save, //保存
handler: function (button, event) {
_this.girdDrcolums = DsTruck.SaveGridPanel(userid, 'FEEDRGRIDAD', _this.gridDrChFee.columns, _this.girdDrcolums, 0, true);
}
}, { text: Zi.LAN.Initialization, //初始化
handler: function (menu, event) {
_this.gridDrChFee.reconfigure(this.storeDrChFee, _this.initgirdDrcolums);
_this.girdDrcolums = DsTruck.SaveGridPanel(userid, 'FEEDRGRIDAD', _this.gridDrChFee.columns, _this.initgirdDrcolums, 0, true);
}
}],
scope: this
}, '-', {
text: Zi.LAN.ShowWorkflow,//显示工作流
tooltip: '显示工作流',
handler: function (button, event) {
this.onViewWorkFlowDetailClick(button, event, 1);
},
scope: this
}],
columns: this.girdDrcolums
});
this.girdDrcolums = DsTruck.GetGridPanel(userid, 'FEEDRGRIDAD', this.girdDrcolums, 0); //使用者id表名中间column数组跳过一开始的几列
this.initgirdCrcolums = [{
sortable: true,
dataIndex: 'GId',
header: '惟一编号',
hidden: true,
width: 160
}, {
sortable: true,
dataIndex: 'BsNo',
header: '业务编号',
hidden: true,
width: 200
}, {
sortable: true,
dataIndex: 'FeeStatus',
header: Zi.LAN.CostStatus,//费用状态
renderer: function (value, p, record) {
return record.data.FeeStatus_Ref;
},
width: 66
}, {
sortable: true,
dataIndex: 'FeeName',
header: Zi.LAN.NamePayable,//应付费用名称
width: 100
}, {
sortable: true,
dataIndex: 'FeeDescription',
header: Zi.LAN.CostEnglishName,//费用英文名称
width: 120
}, {
sortable: true,
dataIndex: 'CustomerType',
header: Zi.LAN.CustomerCategory,//客户类别
width: 80
}, {
sortable: true,
dataIndex: 'CustomerName',//结算对象
header: Zi.LAN.SettlementObject,
width: 120
}, {
sortable: true,
dataIndex: 'Unit',
header: Zi.LAN.UnitStandard,//单位标准
width: 60
}, {
sortable: true,
dataIndex: 'UnitPrice',
header: Zi.LAN.price,//单价
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 3, '', 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: 'TaxUnitPrice',
header: Zi.LAN.TaxPrice,//含税单价
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: 'Quantity',
header: Zi.LAN.Num,//数量
width: 60
}, {
sortable: true,
dataIndex: 'TaxRate',
header: Zi.LAN.taxRate,//税率
align: 'right',
width: 60
}, {
sortable: true,
dataIndex: 'NoTaxAmount',
header: Zi.LAN.NotaxRate,//不含税金额
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: 'Amount',
header: Zi.LAN.Money,//金额
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: 'Currency',
header: Zi.LAN.Currency,//币别
width: 40
}, {
sortable: true,
dataIndex: 'ExChangerate',
header: Zi.LAN.exchangeRate,//汇率
align: 'right',
width: 60
}, {
sortable: true,
dataIndex: 'AccTaxRate',
header: Zi.LAN.InputTaxRate,//销项税率
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: 'Remark',
header: Zi.LAN.Remarks,//备注
width: 150
}, {
sortable: true,
dataIndex: 'IsAdvancedpay',
header: Zi.LAN.WhetherToAdvance,//是否垫付
width: 60
}, {
sortable: true,
dataIndex: 'IsInvoice',
header: Zi.LAN.Nnvoice,//不开发票
width: 60
}, {
sortable: true,
dataIndex: 'FeeFrt',
header: 'FRT',
width: 40
}, {
sortable: true,
dataIndex: 'Commissionrate',
header: Zi.LAN.CommissionRate,//佣金比率
width: 60
}, {
sortable: true,
dataIndex: 'OpName',
header: Zi.LAN.notIncludederson,//录入人
width: 60
}, {
sortable: true,
dataIndex: 'EnterDate',
header: Zi.LAN.EnterDate,//录入日期
//renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 80
}, {
sortable: true,
dataIndex: 'Auditoperator',
header: Zi.LAN.Auditor,//审核人
width: 60
}, {
sortable: true,
dataIndex: 'AuditDate',
header: Zi.LAN.ReviewDate,//审核日期
// renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 80
}, {
sortable: true,
dataIndex: 'Settlement',
header: Zi.LAN.SettlementAmount,//结算金额
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: 'OrderAmount',
header: Zi.LAN.ShenQingJinE,//申请金额
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: 'IsOpen',
header: Zi.LAN.IsOpen, //'是否机密',
renderer: function (value, cellmeta) {
if (value == 'True' || value == 'true' || value == '1') {
return "√";
} else return "";
},
width: 60
}, {
sortable: true,
dataIndex: 'Reason',
header: Zi.LAN.Reason, //原因
width: 80
}
];
this.girdCrcolums = this.initgirdCrcolums;
this.feeCrGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
_this = this;
this.gridCrChFee = new Ext.grid.GridPanel({
store: this.storeCrChFee,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LoadData },
trackMouseOver: true,
disableSelection: false,
selModel: this.feeCrGridCheckBoxModel,
selType: 'cellmodel',
viewConfig: {
autoFill: true,
getRowClass: function (record, rowIndex, rowParams, store) {
var feeStatus = record.get('FeeStatus');
var ISSEL = record.get('ISSEL');
if (ISSEL == '1')
return Shipping.FeeGetRowClassFont(feeStatus);
else
return Shipping.FeeGetRowClass(feeStatus);
}
},
tbar: [{
xtype: 'label',
labelAlign: 'right',
width: 60,
html: "<a><font color='#6B8E23'><B>" + Zi.LAN.Payable + "</B></font></a>"
}, {
text: Zi.LAN.ExaminationPassed,//审核通过
tooltip: '审核通过',
iconCls: "btnsubmit",
handler: function (button, event) {
this.onAuditNewClick(button, event, 2);
},
scope: this
}, {
text: Zi.LAN.AuditCopy,
tooltip: '配对审核,同时审核标红的应付或应收',
handler: function (button, event) {
_this.onCopyAuditClick('2');
},
scope: this
}, {
text: Zi.LAN.DismissedSubmission,//驳回提交
tooltip: '驳回提交',
iconCls: "btncancel",
handler: function (button, event) {
this.onAuditBackNewClick(button, event, 2);
},
scope: this
}, '-', {
text: Zi.LAN.ApproveApplication,//批准申请
menu: [
{ text: Zi.LAN.ApproveApplication,//批准申请
iconCls: "btnsubmit",
handler: function (button, event) {
_this.onAuditShenClick(button, event, 2);
}
}, { text: Zi.LAN.DismissApplication,//驳回申请
iconCls: "btncancel",
handler: function (menu, event) {
_this.onAuditBackShenClick(menu, event, 2);
}
}, { text: Zi.LAN.HistoricalApplication,//历史申请
handler: function (menu, event) {
_this.onHistryShenClick(menu, event, 2);
}
}],
scope: this
}, '-', {
text: Zi.LAN.DismissedSubmission2,
menu: [//禁开发票
{ text: Zi.LAN.DismissedSubmission2,
tooltip: '禁开发票',
handler: function (button, event) {
_this.onNoIvoiceClick(button, event, 2);
}
}, { text: '解禁发票',
tooltip: '解禁发票',
handler: function (button, event) {
_this.onCancelNoInvoiceClick(button, event, 2);
}
}],
scope: this
}, '-', {
text: Zi.LAN.ViewInformation,//查看信息
tooltip: '查看信息',
handler: function (button, event) {
_this.onViewDetailClick(button, event, 2);
},
scope: this
}, '-', {
text: Zi.LAN.ShowWorkflow,//显示工作流
tooltip: '显示工作流',
handler: function (button, event) {
this.onViewWorkFlowDetailClick(button, event, 2);
},
scope: this
}, '-', {
text: Zi.LAN.SavelistStyle,//保存列表样式
menu: [
{ text: Zi.LAN.Save, //保存
handler: function (button, event) {
_this.girdCrcolums = DsTruck.SaveGridPanel(userid, 'FEECRGRIDAD', _this.gridCrChFee.columns, _this.girdCrcolums, 0, true);
}
}, { text: Zi.LAN.Initialization, //初始化
handler: function (menu, event) {
_this.gridCrChFee.reconfigure(this.storeCrChFee, _this.initgirdCrcolums);
_this.girdCrcolums = DsTruck.SaveGridPanel(userid, 'FEECRGRIDAD', _this.gridCrChFee.columns, _this.initgirdCrcolums, 0, true);
}
}],
scope: this
}],
columns: this.girdCrcolums
});
this.girdCrcolums = DsTruck.GetGridPanel(userid, 'FEECRGRIDAD', this.girdCrcolums, 0); //使用者id表名中间column数组跳过一开始的几列
this.storeBodySum = Ext.create('Ext.data.Store', {
model: 'MsOPGain',
remoteSort: false,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsChFee/GetOPGainList',
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,
columns: [{
header: "<a href='#'><font color='#FF0000'>" + Zi.LAN.Sum + "</font></a>",//总计
sortable: false,
align: 'center',
dataIndex: 'CURR',
width: 160
}, {
header: Zi.LAN.TaxesNotIncluded,//应收不含税
dataIndex: 'NORATEDR',
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: 160
}, {
header: Zi.LAN.TaxIncluded,//应收含税
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: 160
}, {
header: Zi.LAN.PayableTax,//应付不含税
dataIndex: 'NORATECR',
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: 160
}, {
header: Zi.LAN.YingFuHanShui,//应付含税
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: 160
}, {
header: Zi.LAN.notIncluded,//利润不含税
dataIndex: 'NORATEPR',
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: 160
}, {
header: Zi.LAN.notIncludedID,//利润含税
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: 160
}
]
});
this.storeChFeeGain = Ext.create('Ext.data.Store', {
model: 'MsChFeeGain',
remoteSort: false,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsChFee/GetGainData',
reader: {
id: 'GId',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.gridListCust = new Ext.grid.GridPanel({
store: this.storeChFeeGain,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LoadData },//数据加载
trackMouseOver: true,
disableSelection: false,
columns: [{
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: Zi.LAN.SettlementObject,//结算对象
width: 110
}, {
sortable: true,
dataIndex: 'RMBDR',
header: LOCALCURR + Zi.LAN.Receivable,//应收
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBCR',
header: LOCALCURR + Zi.LAN.Handle,//应付
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBPROFIT',
header: LOCALCURR + Zi.LAN.profit,//利润
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDDR',
header: 'USD' + Zi.LAN.Receivable,//应收
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDCR',
header: '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: 'USDPROFIT',
header: 'USD' + Zi.LAN.profit,//利润
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTDR',
header: Zi.LAN.ReceivableOther,//其他币别应收
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTCR',
header: Zi.LAN.HandleOther,//其他币别应付
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTPROFIT',
header: Zi.LAN.Otherprofit,//其他币别利润
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLDR',
header: Zi.LAN.ReceivableSum,//合计应收
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLCR',
header: Zi.LAN.profitSum,//合计应付
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLPROFIT',
header: Zi.LAN.Hejiprofit,//合计利润
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.panelCustSum = new Ext.Panel({
title: Zi.LAN.TotalProfitSTR,//客户合计
layout: "border",
region: 'center',
animate: true,
autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.gridListCust]
});
this.panelCurrSum = new Ext.Panel({
title: Zi.LAN.BiBieSum,//币别合计
layout: "border",
region: 'center',
animate: true,
autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.gridSum]
});
this.storeChFeeAmendGain = Ext.create('Ext.data.Store', {
model: 'MsChFeeGain',
remoteSort: false,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsChFee/GetAmendGainData',
reader: {
id: 'GId',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.gridListAmendttl = new Ext.grid.GridPanel({
store: this.storeChFeeAmendGain,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LoadData },
trackMouseOver: true,
disableSelection: false,
columns: [{
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: Zi.LAN.AmendttlObject, //结算对象
width: 160
}, {
sortable: true,
dataIndex: 'RMBDR',
header: LOCALCURR + Zi.LAN.Receivable,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBCR',
header: LOCALCURR + Zi.LAN.Handle,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBPROFIT',
header: LOCALCURR + Zi.LAN.profit,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDDR',
header: 'USD' + Zi.LAN.Receivable,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDCR',
header: Zi.LAN.profitUSD,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDPROFIT',
header: Zi.LAN.USDprofit, //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: 'OTDR',
header: Zi.LAN.ReceivableOther,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTCR',
header: Zi.LAN.ReceivableOther,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTPROFIT',
header: Zi.LAN.Otherprofit,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLDR',
header: Zi.LAN.ReceivableSum,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLCR',
header: Zi.LAN.profitSum,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLPROFIT',
header: Zi.LAN.Hejiprofit,
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.panelAmendttlSum = new Ext.Panel({
title: Zi.LAN.TotalProfitAmendSTR, //客户合计
layout: "border",
region: 'center',
animate: true,
autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.gridListAmendttl]
});
this.tabTotal = new Ext.TabPanel({
activeTab: 0,
autoWidth: true,
border: true,
height: 180,
frame: false,
region: 'south',
enableHdMenu: false,
// region: 'center',
title: Zi.LAN.ChangeProfitBefore,//利润统计
collapsed: true,
collapsible: true,
split: true,
enableTabScroll: true,
items:
[
this.panelCustSum,
this.panelCurrSum,
this.panelAmendttlSum
]
});
this.storeBillList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'MsChFeedoBill',
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 120000,
url: '/Account/Chfee_Audit/GetBLListData',
reader: {
id: 'BSNO',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//明细表表格
this.InitDrGrid(this.girdDrcolums);
this.InitCrGrid(this.girdCrcolums);
this.Pagenum = Ext.create('Ext.form.field.Number', {
name: 'bottles',
fieldLabel: Zi.LAN.PageNum,//每页记录数
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.AddGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
this.initgirdcolums = [{
sortable: true,
dataIndex: 'BSNO',
header: 'BSNO',
hidden: true,
width: 100
}, {
sortable: true,
dataIndex: 'OPLBNAME',
header: Zi.LAN.ServiceCategory,//业务类别
width: 80
}, {
sortable: true,
dataIndex: 'OPTYPE',
header: Zi.LAN.ChangeSingle,//更改单
width: 80
}, {
sortable: true,
dataIndex: 'CUSTNO',
header: Zi.LAN.DelegateNumber,//委托编号
width: 120
}, {
sortable: true,
dataIndex: 'MBLNO',
header: Zi.LAN.ladingNumber,//主提单号
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
header: Zi.LAN.FenladingNumber, //分提单号
width: 120
}, {
sortable: true,
dataIndex: 'CUSTOMNO',
header: Zi.LAN.DeclarationNumber, //报关单号
width: 120
}, {
sortable: true,
id: '',
align: 'center',
dataIndex: 'BSSTATUSREF',
header: Zi.LAN.BusinessLock,//业务锁定
width: 60,
renderer: function (value, cellmeta) {
if (value == '锁定') {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
}
}
},
{
sortable: true,
id: '',
align: 'center',
dataIndex: 'FEESTATUSREF',
header: Zi.LAN.Costlock,//费用锁定
width: 60,
renderer: function (value, cellmeta) {
if (value == '锁定') {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
}
}
},
{
sortable: true,
id: '',
dataIndex: 'DRFEESTATUS',
header: Zi.LAN.ChargesPayable,//应收费用
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '审核通过') {
meta.tdCls = 'feestatus_pass';
} else if (value == '录入状态') {
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_refer';
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
} else if (value == '未录入') {
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settle';
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_pass';
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'CRFEESTATUS',
header: Zi.LAN.Payable,//应付费用
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '审核通过') {
meta.tdCls = 'feestatus_pass';
} else if (value == '录入状态') {
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_refer';
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
} else if (value == '未录入') {
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settle';
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_pass';
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
}
return value;
}
}, {
sortable: true,
dataIndex: 'OPSTATUS',
header: Zi.LAN.OPSTATUS,//费用状态
width: 180
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: Zi.LAN.Requester,//委托单位
width: 100
}, {
sortable: true,
dataIndex: 'ETD',
header: Zi.LAN.SailingDate,//开船日期
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 100
}, {
sortable: true,
dataIndex: 'SALE',
header: Zi.LAN.LanhuoPeople,//揽货人
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
header: Zi.LAN.CARRIER,//揽货人
width: 80
}, {
sortable: true,
dataIndex: 'CNTRTOTAL',
header: Zi.LAN.Changing,//集装箱
width: 120
}, {
sortable: true,
dataIndex: 'ACCDATE',
header: Zi.LAN.kuaiJiQJ, //会计期间
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
header: Zi.LAN.BusinessSource, //业务来源
width: 80
}, {
sortable: true,
dataIndex: 'ENTERP',
header: Zi.LAN.BusinessUnit, //经营单位
width: 80
}, {
sortable: true,
dataIndex: 'OP',
header: Zi.LAN.Operating, //操作
width: 80
}, {
sortable: true,
dataIndex: 'INPUTBY',
header: Zi.LAN.notIncludederson, //录入人
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
header: Zi.LAN.loadingDock, //起运港
width: 120
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
header: Zi.LAN.PORTDISCHARGE, //目的港
width: 120
}, {
sortable: true,
dataIndex: 'PLACERECEIPT',
header: Zi.LAN.PLACERECEIPT, //收货地
width: 120
}, {
sortable: true,
dataIndex: 'DESTINATION',
header: Zi.LAN.DESTINATION, //目的地
width: 120
}, {
sortable: true,
dataIndex: 'VESSEL',
header: Zi.LAN.ShipName, //船名
width: 150
}, {
sortable: true,
dataIndex: 'VOYNO',
header: Zi.LAN.Voyage, //航次
width: 60
}, {
sortable: true,
dataIndex: 'CUSTOMSNUM',
header: Zi.LAN.NumberDeclarations, //报关项数
width: 60
}, {
sortable: true,
dataIndex: 'PKGS',
header: Zi.LAN.NumberOfpieces, //件数
width: 60
}, {
sortable: true,
dataIndex: 'KGS',
header: Zi.LAN.Weight, //重量
width: 60
}, {
sortable: true,
dataIndex: 'CBM',
header: Zi.LAN.Size, //尺码
width: 60
}, {
sortable: true,
dataIndex: 'REMARK',
header: Zi.LAN.Remarks, //备注
width: 80
}, {
sortable: true,
dataIndex: 'INVNO',
header: Zi.LAN.INVNO, //报关单号
width: 120
}, {
sortable: true,
id: '',
dataIndex: 'BillFeeStatus',
header: Zi.LAN.BillFeeStatus, //'整票状态',
width: 60,
renderer: function (value, meta) {
if (value == '0') {
return "未提交";
} else if (value == '1') {
meta.tdCls = 'feestatus_refer';
return "整票提交";
} else if (value == '2') {
meta.tdCls = 'feestatus_pass';
return "审核通过";
} else {
return "";
}
}
}, {
sortable: true,
dataIndex: 'BLFRT',
header: Zi.LAN.BLFRT, //报关单号
width: 120
}, {
sortable: true,
dataIndex: 'COMMISSIONRATE',
header: Zi.LAN.COMMISSIONRATE, //报关单号
width: 120
}, {
sortable: true,
dataIndex: 'CARGOID',
header: Zi.LAN.CARGOID, //报关单号
width: 120
}
];
this.girdcolums = this.initgirdcolums;
this.gridBillList = new Ext.grid.GridPanel({
store: this.storeBillList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LoadData },
trackMouseOver: true,
viewConfig: {
enableTextSelection: true
},
disableSelection: false,
selModel: this.AddGridCheckBoxModel,
columns: this.girdcolums,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeBillList,
displayInfo: true,
displayMsg: Zi.LAN.FenYe,//数据加载
emptyMsg: Zi.LAN.NoAudtid //没有要审核的数据
}), this.Pagenum]
});
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id表名中间column数组跳过一开始的几列
this.gridBillList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
this.SelectedRecord = record;
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
var openType = "_blank";
var openUrl = "";
if (record.data.OPLBNAME == "海运出口") {
openUrl = "../../MvcShipping/MsOpSeae/EditView?handle=check&bsno=" + record.data.PARENTID;
}
else if (record.data.OPLBNAME == "海运进口") {
openUrl = "../../MvcShipping/MsOpSeai/EditView?handle=check&bsno=" + record.data.PARENTID;
} else if (record.data.OPLBNAME == "空运出口") {
openUrl = "../../MvcShipping/MsOpAire/EditView?handle=check&bsno=" + record.data.PARENTID;
} else if (record.data.OPLBNAME == "空运进口") {
openUrl = "../../MvcShipping/MsOpAiri/EditView?handle=check&bsno=" + record.data.PARENTID;
} else if (record.data.OPLBNAME == "报关业务") {
openUrl = "../../MvcShipping/MsOpApply/EditView?handle=check&bsno=" + record.data.PARENTID;
} else if (record.data.OPLBNAME == "综合业务") {
openUrl = "../../MvcShipping/MsOpOther/EditView?handle=check&bsno=" + record.data.PARENTID;
} else {
openUrl = "../../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO;
}
window.open(openUrl, openType, openSet);
// DsOpenEditWin("/TruckMng/MsWlPc/Edit");
}, this);
this.gridBillList.addListener('sortchange', function (ct, column, direction, eOpts) {
this.sortfield = column.dataIndex;
this.sortdire = direction;
}, this);
//#region formSearch
//#region formSearch枚举参照相关
this.StoreOpLb = Ext.create('DsExt.ux.RefEnumStore', {});
this.StoreOpLb.load({ params: { enumTypeId: 96005} });
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BusinessType,//业务类型
store: this.StoreOpLb,
name: 'PS_OPLB',
valueField: 'EnumValueName',
displayField: 'EnumValueName',
enableKeyEvents: true,
listeners: {
keyup: 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: Zi.LAN.TypeTransport,//运输类型
store: this.storeBsType,
name: 'PS_BSTYPE',
valueField: 'EnumValueName',
displayField: 'EnumValueName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeSalesCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
});
this.storeSalesCode.load();
this.comboxSalesCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.LanhuoPeople,//揽货人
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_SALE',
valueField: 'UserName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.comboxOp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.Operating,//操作
width: 90,
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_OP',
valueField: 'UserName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListRm' }
});
//this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.Requester, //委托单位
store: this.storeCustCode,
// forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'CODENAME',
name: 'PS_CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: 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: Zi.LAN.Currency,//币别
store: this.StoreCurr,
forceSelection: true,
name: 'Currency',
valueField: 'CURR',
displayField: 'CURR',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeFeeNameRef = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.FeeTypeRefModel',
proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefList' }
});
this.comboxFeeNameRef = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CostName,//费用名称
store: this.storeFeeNameRef,
forceSelection: true,
name: 'FeeName',
valueField: 'Name',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: 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/GetCustomRefListRm' }
});
// this.storeCust.load({ params: { condition: ""} });
this.comboxCust = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SettlementCustomers, //结算客户
store: this.storeCust,
// 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.storeFeeNameRef.load({ params: { condition: "" } });
this.storeVoyVeg = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.VesselModel',
proxy: { url: '/CommMng/BasicDataRef/GetVesselList' }
});
this.storeVoyVeg.load({ params: { condition: ""} });
this.comboxVoyVeg = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.ShipName,//船名
store: this.storeVoyVeg,
valueField: 'VESSEL',
name: 'PS_VESSEL',
displayField: 'VESSEL',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
Ext.define('OpSeaeShipper', {
extend: 'Ext.data.Model',
idProperty: 'SHIPPERID',
fields: [
{ name: 'SHIPPERID', type: 'string' },
{ name: 'CODENAME', type: 'string' },
{ name: 'SHORTNAME', type: 'string' },
{ name: 'CodeAndName', type: 'string' },
{ name: 'SHIPPERDETAIL', type: 'string' },
{ name: 'SHIPPERTYPE', type: 'int' },
{ name: 'LOADADDRESS', type: 'string' },
{ name: 'DELIVERADDRESS', type: 'string' },
{ name: 'ISPUBLIC', type: 'bool' }
]
});
this.storeagent = Ext.create('DsExt.ux.RefTableStore', {
model: 'OpSeaeShipper',
proxy: { url: '/MvcShipping/MsOpSeae/GetShipperList' }
});
this.storeagent.load({ params: { condition: "shippertype=4 "} });
this.comboxAgent = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.ForeignAgent,//国外代理
store: this.storeagent,
forceSelection: true,
name: 'PS_AGENT',
valueField: 'SHORTNAME',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
//业务来源
this.storeSource = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.SourceModel',
proxy: { url: '/CommMng/BasicDataRef/GetSource' }
});
this.storeSource.load();
this.storeSourceDetail = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.SourceDetailModel',
proxy: { url: '/CommMng/BasicDataRef/GetSourceDetail2' }
});
this.comboxBSSOURCE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BusinessSource,//业务来源
store: this.storeSource,
forceSelection: true,
name: 'BSSOURCE',
valueField: 'SourceName',
displayField: 'SourceName'
});
this.storeFEEUP = Ext.create('Ext.data.Store', {
fields: ['FSTATUS', 'NAME']
});
this.storeFEEUP.add({ "FSTATUS": "", "NAME": "" });
this.storeFEEUP.add({ "FSTATUS": "0", "NAME": "否" });
this.storeFEEUP.add({ "FSTATUS": "1", "NAME": "是" });
this.comboxFEEUP = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.WhetherCostIsSubmitted,//是否费用提交
store: this.storeFEEUP,
valueField: 'FSTATUS',
displayField: 'NAME',
// flex: 0.7,
labelWidth: 90,
forceSelection: true,
name: 'ISFEEUP',
value: '',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
//#endregion
this.CheckSaveQuery = new Ext.form.Checkbox({
fieldLabel: Zi.LAN.RememberQuery,//记忆查询条件
checked: true,
width: 120
});
this.formSearch = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 0,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 70,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: 'IsOnlyAuditBL', //'MSHIPPERID',
name: 'IsOnlyAuditBL', hidden: true
}, {
fieldLabel:'IsOnlyAuditFee', //'MSHIPPERID',
name: 'IsOnlyAuditFee', hidden: true
},this.comboxOpLb, {
fieldLabel: Zi.LAN.SingleNumber,//单号
name: 'PS_MBLNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxVoyVeg, {
fieldLabel: Zi.LAN.Voyage,//航次
name: 'PS_VOYNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxAgent, this.comboxCust, {
xtype: 'button',
width: 90,//执行查询
text: Zi.LAN.Executequery,
iconCls: "btnrefresh",
handler: function (button, event) {
// _this.LoadData(this.opStatus, "", this.RefBillNo);
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
//var IsOnlyAuditBL = false;
//var IsOnlyAuditFee = false;
//if (this.CheckAll.checked) IsOnlyAuditBL = true;
//if (this.CheckFeeAll.checked) IsOnlyAuditFee = true;
//this.formSearch.getForm().findField('IsOnlyAuditBL').setValue(IsOnlyAuditBL);
//this.formSearch.getForm().findField('IsOnlyAuditFee').setValue(IsOnlyAuditFee);
//saveQuerySetting(this.formname, this.formSearch, isvisible, issavevalue);
},
scope: this
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxBsType, this.comboxSalesCode, this.comboxCustCode, {
fieldLabel: Zi.LAN.FromBusinessDate,//从业务日期
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.ToBusinessDate,//至业务日期
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxFeeNameRef, {
xtype: 'button',
width: 90,
text: Zi.LAN.ResetCondition,//重置
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxBSSOURCE, {
fieldLabel: Zi.LAN.FromAccountingPeriod,//从会计期间
xtype: 'monthfield',
name: 'PS_ACCDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.ToAccountingPeriod,//至会计期间
xtype: 'monthfield',
name: 'PS_ACCDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxOp, this.comboxFEEUP, { xtype: 'hiddenfield' }, {
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;
},
scope: this
}
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
//查询工具条
_this = this;
this.SearchBtn = new Ext.Button({
text: Zi.LAN.ShowQuery,
handler: function () {
if (_this.SearchBtn.text == Zi.LAN.AGENTID) {
_this.panelSearch.hide();
_this.SearchBtn.setText(Zi.LAN.ShowQuery);
} else {
_this.panelSearch.show();
_this.SearchBtn.setText(Zi.LAN.AGENTID);
}
}
});
this.storeAddDCType = Ext.create('Ext.data.Store', {
fields: ['DC', 'NAME']
});
this.storeAddDCType.add({ "DC": "0", "NAME": "全部" });
this.storeAddDCType.add({ "DC": "1", "NAME": "待审核" });
this.storeAddDCType.add({ "DC": "2", "NAME": "已审核" });
this.comboxaddDCType = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FYchakan,//费用查看范围
store: this.storeAddDCType,
valueField: 'DC',
displayField: 'NAME',
forceSelection: true,
name: 'DC',
value: '0'
});
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
this.SearchBtn, '-', {
xtype: 'button',
text: Zi.LAN.ReLoad,//刷新
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: Zi.LAN.BatchReview, //批量审核
id: "btnBsLock",
menu: [
{ text: Zi.LAN.SelectedBusinessReview, //所选业务审核
handler: function (menu, event) {
_this.onSelAuditClick(menu, event);
}
}, { text: Zi.LAN.AllBusinessReview, //全部业务审核
handler: function (menu, event) {
_this.onAllAuditClick(menu, event);
}
}],
scope: this
}, '-', {
text: Zi.LAN.Costlock, //费用锁定
tooltip: '费用锁定',
menu:
[
{ text: Zi.LAN.SelectedBusinesslock, //所选业务锁定
handler: function (menu, event) {
_this.winFeeCloseShow.show();
}
}, { text: Zi.LAN.SelectedBusinessUnlock, //所选业务解锁
handler: function (menu, event) {
_this.onSelUnLockClick(menu, event, 1);
}
}
],
/*
handler: function (button, event) {
this.onCopyAddClick(button, event, 1);
},
*/
scope: this
}
, '-', this.CheckAll, '-', this.CheckFeeAll, '-', this.CheckSaveQuery, '-', {
text: Zi.LAN.SavelistStyle, //保存列表样式
id: "btntest",
menu: [
{ text: Zi.LAN.Save, //保存
handler: function (button, event) {
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridBillList.columns, _this.girdcolums, 1, true);
}
}, { text: Zi.LAN.Initialization, //初始化
handler: function (menu, event) {
_this.gridBillList.reconfigure(this.storeBillList, _this.initgirdcolums);
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridBillList.columns, _this.initgirdcolums, 1, true);
}
}],
scope: this
}, {
text: Zi.LAN.LooKYUanPiao, //查看原票费用
id: 'ViewFee',
handler: function (button, event) {
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=" + this.strMBSNO;
window.open(openUrl, openType, openSet);
},
scope: this
}, '-',
{
text: Zi.LAN.btnprintview, //"打印",
iconCls: 'btnprint',
handler: function (button, event) {
_this.PrintView(1);
},
scope: this
}, '-',
{
text: Zi.LAN.btnprint, //"打印",
iconCls: 'btnprint',
menu: [
{
text: "全部",
handler: function (menu, event) {
_this.Print();
}
}, {
text: "选择打印",
handler: function (menu, event) {
_this.PrintSelect();
}
}],
scope: this
}
]
});
//#region 申请修改
this.NewFeeShowDr = Ext.widget('form', {
frame: true,
region: 'east',
split: true,
hidden: true,
title: Zi.LAN.FYUpdate,//费用修改新值
width: 350,
trackResetOnLoad: true,
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 55,
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.MASTERNO, //业务编号
name: 'BsNo', hidden: true
}, {
fieldLabel: 'GId',
name: 'GId', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: Zi.LAN.CostName, //费用名称
readOnly: true,
name: 'FeeName'
}, {
fieldLabel: Zi.LAN.Fyduixiang, //费用对象
readOnly: true,
name: 'CustomerName'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.danweibiaozhun, //单位标准
readOnly: true,
name: 'Unit'
}, {
fieldLabel: Zi.LAN.NotShuijia,//不含税价
readOnly: true,
name: 'UnitPrice',
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;
}
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.taxRate,//税率
readOnly: true,
name: 'TaxRate'
}, {
fieldLabel: Zi.LAN.TaxPrice,//含税单价
readOnly: true,
name: 'TaxUnitPrice',
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;
}
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.jiFeishuliang,//计费数量
readOnly: true,
name: 'Quantity'
}, {
fieldLabel: Zi.LAN.buhanshuie,//不含税额
readOnly: true,
name: 'NoTaxAmount',
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;
}
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.hsjine,//含税金额
readOnly: true,
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;
},
name: 'Amount'
}, {
fieldLabel: Zi.LAN.Currency, //币别
labelWidth: 40,
readOnly: true,
name: 'Currency'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.exchangeRate, //汇率
labelWidth: 40,
readOnly: true,
name: 'ExChangerate'
}, {
fieldLabel: Zi.LAN.caiwushui, //财务税率
labelWidth: 60,
readOnly: true,
name: 'AccTaxRate'
}, {
fieldLabel: Zi.LAN.WhetherToAdvance, //是否垫付
labelWidth: 60,
readOnly: true,
name: 'IsAdvancedpay'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.Updateyuanyin, //修改原因
flex: 2,
readOnly: true,
name: 'Reason'
}, {
fieldLabel: Zi.LAN.zeperson, //'责任人',
flex: 1,
readOnly: true,
name: 'MANAGERREF'
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.Remarks, //备注
flex: 1,
labelWidth: 40,
readOnly: true,
name: 'Remark'
}, {
fieldLabel: Zi.LAN.sqperson, //申请人
readOnly: true,
labelWidth: 60,
name: 'MODIFIEDUSER'
}, {
fieldLabel: Zi.LAN.sqtime, //申请时间
readOnly: true,
name: 'MODIFIEDTIME'
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ChangeProBefore, //更改前利润
labelWidth: 70,
readOnly: true,
name: 'BPROFIT',
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;
}
}, {
fieldLabel: Zi.LAN.ChangeProfit,//更改后利润
labelWidth: 70,
readOnly: true,
name: 'APROFIT',
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;
}
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ProfitMargin,//利润差额
labelWidth: 70,
readOnly: true,
name: 'DIFPROFIT',
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;
}
}
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
this.NewFeeShowCr = Ext.widget('form', {
frame: true,
region: 'east',
hidden: true,
title: Zi.LAN.FYUpdate,//费用修改新值
width: 350,
split: true,
trackResetOnLoad: true,
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 55,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '业务编号',
name: 'BsNo', hidden: true
}, {
fieldLabel: 'GId',
name: 'GId', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: Zi.LAN.CostName,//费用名称
readOnly: true,
name: 'FeeName'
}, {
fieldLabel: Zi.LAN.Fyduixiang,//费用对象
readOnly: true,
name: 'CustomerName'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.danweibiaozhun, //单位标准
readOnly: true,
name: 'Unit'
}, {
fieldLabel: Zi.LAN.NotShuijia, //不含税价
readOnly: true,
name: 'UnitPrice',
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;
}
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.taxRate, //税率
readOnly: true,
name: 'TaxRate'
}, {
fieldLabel: Zi.LAN.TaxPrice, //含税单价
readOnly: true,
name: 'TaxUnitPrice',
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;
}
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.jiFeishuliang, //计费数量
readOnly: true,
name: 'Quantity'
}, {
fieldLabel: Zi.LAN.buhanshuie, //不含税额
readOnly: true,
name: 'NoTaxAmount',
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;
}
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.hsjine, //含税金额
readOnly: true,
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;
},
name: 'Amount'
}, {
fieldLabel: Zi.LAN.Currency, //币别
labelWidth: 40,
readOnly: true,
name: 'Currency'
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.exchangeRate, //汇率
labelWidth: 40,
readOnly: true,
name: 'ExChangerate'
}, {
fieldLabel: Zi.LAN.caiwushui, //财务税率
labelWidth: 60,
readOnly: true,
name: 'AccTaxRate'
}, {
fieldLabel: Zi.LAN.WhetherToAdvance, //是否垫付
labelWidth: 60,
readOnly: true,
name: 'IsAdvancedpay'
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.Updateyuanyin, //修改应用
flex: 1,
readOnly: true,
name: 'Reason'
}, {
fieldLabel: Zi.LAN.zeperson, //'费用对象',
flex: 1,
readOnly: true,
name: 'MANAGERREF'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.Remarks, //备注
flex: 1,
labelWidth: 40,
readOnly: true,
name: 'Remark'
}, {
fieldLabel: Zi.LAN.sqperson, //申请人
readOnly: true,
labelWidth: 60,
name: 'MODIFIEDUSER'
}, {
fieldLabel: Zi.LAN.sqtime, //申请时间
readOnly: true,
name: 'MODIFIEDTIME'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ChangeProBefore, //更改前利润
labelWidth: 70,
readOnly: true,
name: 'BPROFIT',
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;
}
}, {
fieldLabel: Zi.LAN.ChangeProfit, //更改后利润
labelWidth: 70,
readOnly: true,
name: 'APROFIT',
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;
}
}
]
}, , {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ProfitMargin, //利润差额
labelWidth: 70,
readOnly: true,
name: 'DIFPROFIT',
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;
}
}
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
this.AuditBackReasonDr = Ext.widget('form', {
frame: true,
region: 'east',
split: true,
trackResetOnLoad: true,
hidden: true,
width: 300,
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: [{
xtype: 'textareafield',
grow: true,
fieldLabel: '驳回原因', //'驳回原因',
height: 70,
name: 'Reason',
anchor: '100%'
}
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
this.AuditBackReasonCr = Ext.widget('form', {
frame: true,
region: 'east',
split: true,
trackResetOnLoad: true,
hidden: true,
width: 300,
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: [{
xtype: 'textareafield',
grow: true,
fieldLabel: '驳回原因', //'驳回原因',
height: 70,
name: 'Reason',
anchor: '100%'
}
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
//#endregion
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 29,
items: [this.panelBtn]
});
this.panelSearch = new Ext.Panel({
layout: "border",
region: "north",
height: 90,
items: [this.formSearch]
});
this.panelBill = new Ext.Panel({
// title: '业务信息',
layout: "border",
region: 'north',
height: 200,
frame: true,
split: true,
items: [this.gridBillList]
});
this.panelDrChFee = new Ext.Panel({
// title: '应收费用',
layout: "border",
// anchor: '100% 50%',
frame: true,
region: 'west',
width: 620,
split: true,
items: [this.gridDrChFee, this.NewFeeShowDr, this.AuditBackReasonDr]
});
this.panelCrChFee = new Ext.Panel({
// title: '应付费用',
layout: "border",
// anchor: '100% 50%',
region: 'center',
// region: 'center',
frame: true,
items: [this.gridCrChFee, this.NewFeeShowCr, this.AuditBackReasonCr]
});
this.panelFee = new Ext.Panel({
// title: '费用信息',
// layout: "border",
layout: "border",
// region: 'north',
// height: 560,
region: 'center',
items: [
this.panelDrChFee, this.panelCrChFee
]
});
//#region 布局
Ext.apply(this, {
items: [this.panelTop, this.panelSearch, this.panelBill, this.panelFee, this.tabTotal]
});
//#endregion
// this.opStatus = 'add';
_this = this;
this.storeBillList.on('beforeload', function (store) {
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
}, this);
this.CheckAll.addListener('change', function (field, newValue, oldValue, eOpts) {
this.CheckChange(field, newValue, oldValue, eOpts);
}, this);
this.CheckFeeAll.addListener('change', function (field, newValue, oldValue, eOpts) {
this.CheckChange(field, newValue, oldValue, eOpts);
}, this);
_this = this;
this.gridDrChFee.getSelectionModel().on('select', function (model, record, index) {
var FeeStatus = record.data.FeeStatus;
var GId = record.data.GId;
var oldAmount = record.data.Amount;
var oldExChangerate = record.data.ExChangerate;
if (FeeStatus == 3) {
this.NewFeeShowDr.setVisible(true);
this.storeChFeeModify.load({ params: { FeeID: GId, ApplyType: 2 },
callback: function (r, options, success) {
if (success) {
_this.NewFeeShowDr.getForm().loadRecord(_this.storeChFeeModify.getAt(0));
for (i = 0; i < _this.storeBodySum.getCount(); i += 1) {
var memberyf = _this.storeBodySum.getAt(i);
if (memberyf.data.CURR == '合计') {
var ttlprofit = memberyf.data.PR;
ttlprofit = parseFloat(ttlprofit).toFixed(2);
_this.NewFeeShowDr.getForm().findField('BPROFIT').setValue(ttlprofit);
var Amount = _this.NewFeeShowDr.getForm().findField('Amount').getValue();
var ExChangerate = _this.NewFeeShowDr.getForm().findField('ExChangerate').getValue();
var aprofit = ttlprofit - Mul(oldAmount, oldExChangerate) + Mul(Amount, ExChangerate);
_this.NewFeeShowDr.getForm().findField('APROFIT').setValue(aprofit);
var difprofit = Add(aprofit, -ttlprofit);
_this.NewFeeShowDr.getForm().findField('DIFPROFIT').setValue(difprofit);
if (difprofit < 0) _this.NewFeeShowDr.getForm().findField('DIFPROFIT').setFieldStyle({ background: '#FF0000' });
}
}
var modifydata = _this.storeChFeeModify.getAt(0).data;
if (record.data.FeeName != modifydata.FeeName)
_this.NewFeeShowDr.getForm().findField('FeeName').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('FeeName').setFieldStyle({ color: '#000000' });
if (record.data.CustomerName != modifydata.CustomerName)
_this.NewFeeShowDr.getForm().findField('CustomerName').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('CustomerName').setFieldStyle({ color: '#000000' });
if (record.data.Unit != modifydata.Unit)
_this.NewFeeShowDr.getForm().findField('Unit').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('Unit').setFieldStyle({ color: '#000000' });
if (record.data.UnitPrice != modifydata.UnitPrice)
_this.NewFeeShowDr.getForm().findField('UnitPrice').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('UnitPrice').setFieldStyle({ color: '#000000' });
if (record.data.TaxRate != modifydata.TaxRate)
_this.NewFeeShowDr.getForm().findField('TaxRate').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('TaxRate').setFieldStyle({ color: '#000000' });
if (record.data.TaxUnitPrice != modifydata.TaxUnitPrice)
_this.NewFeeShowDr.getForm().findField('TaxUnitPrice').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('TaxUnitPrice').setFieldStyle({ color: '#000000' });
if (record.data.Quantity != modifydata.Quantity)
_this.NewFeeShowDr.getForm().findField('Quantity').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('Quantity').setFieldStyle({ color: '#000000' });
if (record.data.NoTaxAmount != modifydata.NoTaxAmount)
_this.NewFeeShowDr.getForm().findField('NoTaxAmount').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('NoTaxAmount').setFieldStyle({ color: '#000000' });
if (record.data.Amount != modifydata.Amount)
_this.NewFeeShowDr.getForm().findField('Amount').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('Amount').setFieldStyle({ color: '#000000' });
if (record.data.Currency != modifydata.Currency)
_this.NewFeeShowDr.getForm().findField('Currency').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('Currency').setFieldStyle({ color: '#000000' });
if (record.data.ExChangerate != modifydata.ExChangerate)
_this.NewFeeShowDr.getForm().findField('ExChangerate').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('ExChangerate').setFieldStyle({ color: '#000000' });
if (record.data.AccTaxRate != modifydata.AccTaxRate)
_this.NewFeeShowDr.getForm().findField('AccTaxRate').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowDr.getForm().findField('AccTaxRate').setFieldStyle({ color: '#000000' });
}
},
scope: this
});
} else {
this.NewFeeShowDr.setVisible(false);
}
if (FeeStatus == 6) {
var reason = this.AuditBackReasonDr.getForm().findField('Reason').setValue(record.data.Reason);
this.AuditBackReasonDr.setVisible(true);
} else {
this.AuditBackReasonDr.setVisible(false);
}
var FeeName = record.data.FeeName;
for (i = 0; i < this.storeCrChFee.getCount(); i += 1) {
var memberyf = this.storeCrChFee.getAt(i);
if (memberyf.data.FeeName == FeeName) {
memberyf.set("ISSEL", '1');
} else {
memberyf.set("ISSEL", '0');
}
};
}, this);
this.gridCrChFee.getSelectionModel().on('select', function (model, record, index) {
var FeeStatus = record.data.FeeStatus;
var GId = record.data.GId;
var oldAmount = record.data.Amount;
var oldExChangerate = record.data.ExChangerate;
if (FeeStatus == 3) {
this.NewFeeShowCr.setVisible(true);
this.storeChFeeModify.load({ params: { FeeID: GId, ApplyType: 2 },
callback: function (r, options, success) {
if (success) {
_this.NewFeeShowCr.getForm().loadRecord(_this.storeChFeeModify.getAt(0));
for (i = 0; i < _this.storeBodySum.getCount(); i += 1) {
var memberyf = _this.storeBodySum.getAt(i);
if (memberyf.data.CURR == '合计') {
var ttlprofit = memberyf.data.PR;
ttlprofit = parseFloat(ttlprofit).toFixed(2);
_this.NewFeeShowCr.getForm().findField('BPROFIT').setValue(ttlprofit);
var Amount = _this.NewFeeShowCr.getForm().findField('Amount').getValue();
var ExChangerate = _this.NewFeeShowCr.getForm().findField('ExChangerate').getValue();
var aprofit = Add(ttlprofit, Mul(oldAmount, oldExChangerate, 2), 2)
aprofit = Add(aprofit,-Mul(Amount, ExChangerate,2));
_this.NewFeeShowCr.getForm().findField('APROFIT').setValue(aprofit);
var difprofit = Add(aprofit, -ttlprofit,2);
_this.NewFeeShowCr.getForm().findField('DIFPROFIT').setValue(difprofit);
if (difprofit < 0) _this.NewFeeShowCr.getForm().findField('DIFPROFIT').setFieldStyle({ background: '#FF0000' });
}
}
var modifydata = _this.storeChFeeModify.getAt(0).data;
if (record.data.FeeName != modifydata.FeeName)
_this.NewFeeShowCr.getForm().findField('FeeName').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('FeeName').setFieldStyle({ color: '#000000' });
if (record.data.CustomerName != modifydata.CustomerName)
_this.NewFeeShowCr.getForm().findField('CustomerName').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('CustomerName').setFieldStyle({ color: '#000000' });
if (record.data.Unit != modifydata.Unit)
_this.NewFeeShowCr.getForm().findField('Unit').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('Unit').setFieldStyle({ color: '#000000' });
if (record.data.UnitPrice != modifydata.UnitPrice)
_this.NewFeeShowCr.getForm().findField('UnitPrice').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('UnitPrice').setFieldStyle({ color: '#000000' });
if (record.data.TaxRate != modifydata.TaxRate)
_this.NewFeeShowCr.getForm().findField('TaxRate').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('TaxRate').setFieldStyle({ color: '#000000' });
if (record.data.TaxUnitPrice != modifydata.TaxUnitPrice)
_this.NewFeeShowCr.getForm().findField('TaxUnitPrice').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('TaxUnitPrice').setFieldStyle({ color: '#000000' });
if (record.data.Quantity != modifydata.Quantity)
_this.NewFeeShowCr.getForm().findField('Quantity').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('Quantity').setFieldStyle({ color: '#000000' });
if (record.data.NoTaxAmount != modifydata.NoTaxAmount)
_this.NewFeeShowCr.getForm().findField('NoTaxAmount').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('NoTaxAmount').setFieldStyle({ color: '#000000' });
if (record.data.Amount != modifydata.Amount)
_this.NewFeeShowCr.getForm().findField('Amount').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('Amount').setFieldStyle({ color: '#000000' });
if (record.data.Currency != modifydata.Currency)
_this.NewFeeShowCr.getForm().findField('Currency').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('Currency').setFieldStyle({ color: '#000000' });
if (record.data.ExChangerate != modifydata.ExChangerate)
_this.NewFeeShowCr.getForm().findField('ExChangerate').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('ExChangerate').setFieldStyle({ color: '#000000' });
if (record.data.AccTaxRate != modifydata.AccTaxRate)
_this.NewFeeShowCr.getForm().findField('AccTaxRate').setFieldStyle({ color: '#FF4500' });
else
_this.NewFeeShowCr.getForm().findField('AccTaxRate').setFieldStyle({ color: '#000000' });
}
},
scope: this
});
} else {
this.NewFeeShowCr.setVisible(false);
}
if (FeeStatus == 6) {
var reason = this.AuditBackReasonCr.getForm().findField('Reason').setValue(record.data.Reason);
this.AuditBackReasonCr.setVisible(true);
} else {
this.AuditBackReasonCr.setVisible(false);
}
var FeeName = record.data.FeeName;
for (i = 0; i < this.storeDrChFee.getCount(); i += 1) {
var memberyf = this.storeDrChFee.getAt(i);
if (memberyf.data.FeeName == FeeName) {
memberyf.set("ISSEL", '1');
} else {
memberyf.set("ISSEL", '0');
}
};
}, this);
this.gridDrChFee.on({
selectionchange: function (sm, selections) {
if (selections.length == 0) {
for (i = 0; i < _this.storeCrChFee.getCount(); i += 1) {
var memberyf = _this.storeCrChFee.getAt(i);
memberyf.set("ISSEL", '0');
};
}
}
});
this.gridCrChFee.on({
selectionchange: function (sm, selections) {
if (selections.length == 0) {
for (i = 0; i < _this.storeDrChFee.getCount(); i += 1) {
var memberyf = _this.storeDrChFee.getAt(i);
memberyf.set("ISSEL", '0');
};
}
}
});
_this = this;
this.gridBillList.getSelectionModel().on('select', function (model, record, index) {
var bsno = record.data.BSNO;
var optype = record.data.OPLBNAME;
var OPTYPE = record.data.OPTYPE;
if (OPTYPE == '更改单') {
var ViewFee = Ext.getCmp('ViewFee');
ViewFee.enable();
this.isAmend = '1';
} else {
var ViewFee = Ext.getCmp('ViewFee');
ViewFee.disable();
this.isAmend = '0';
}
this.feeDrGridCheckBoxModel.deselectAll();
this.feeCrGridCheckBoxModel.deselectAll();
this.strOPTYPE = OPTYPE;
this.stroplb = record.data.OPLB;
this.strBSNO = record.data.BSNO;
this.strMBSNO = record.data.PARENTID;
this.FeeStatus = record.data.FEESTATUS;
var isAll = '0';
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
this.NewFeeShowCr.setVisible(false);
this.NewFeeShowDr.setVisible(false);
var condition = this.getFeeCondition();
// isAll = this.comboxaddDCType.getValue();
this.storeDrChFee.load({ params: { bsno: bsno, type: 1, optype: this.stroplb, isAll: isAll, condition: condition} });
this.storeCrChFee.load({ params: { bsno: bsno, type: 2, optype: this.stroplb, isAll: isAll, condition: condition} });
// this.storeChFeeGain.load({ params: { bsno: bsno },
// callback: function (r, options, success) {
// if (success) {
// _this.formtotal.getForm().loadRecord(_this.storeChFeeGain.getAt(0));
// }
// },
// scope: this
// });
this.storeBodySum.load({ params: { bsno: bsno },
callback: function (r, options, success) {
if (success) {
_this.setTotalHead();
}
}
});
this.storeChFeeGain.load({ params: { bsno: bsno} });
this.storeChFeeAmendGain.load({ params: { bsno: this.strMBSNO} });
}, this);
this.InitData();
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery, this.panelBtn);
this.gridBillList.reconfigure(this.storeBillList, this.girdcolums);
//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) {
// }
// data = result.data;
// if (data.FIELDVALUES !== "") {
// var bsdata = Ext.JSON.decode(data.FIELDVALUES);
// if (bsdata.IsOnlyAuditBL == true)
// this.CheckAll.setValue(true);
// else this.CheckAll.setValue(false);
// if (bsdata.IsOnlyAuditFee == true)
// this.CheckFeeAll.setValue(true);
// else this.CheckFeeAll.setValue(false);
// }
// return true;
// } else {
// Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
// return false;
// }
// },
// scope: this
//});
//#region 费用锁定
this.CheckAccMonth = new Ext.form.Checkbox({
fieldLabel: Zi.LAN.XiuGaiKuaiji, //修改会计期间
checked: false,
width: 120
});
this.formAccMonthShow = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 85,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.CheckAccMonth, {
fieldLabel: Zi.LAN.kuaiJiQJ, //会计期间
xtype: 'monthfield',
name: 'AccDate'
}
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
me = this;
this.winFeeCloseShow = Ext.create('Ext.window.Window', {
title: Zi.LAN.FYfengzhang, //费用封账
width: 420,
//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.formAccMonthShow],
buttons: [{
text: Zi.LAN.SureFengZhang, //确认封账
minWidth: 70,
handler: function () {
var form = me.formAccMonthShow.getForm();
if (me.CheckAccMonth.checked) {
me.AccDate = form.findField('AccDate').getRawValue();
if (me.AccDate == '' || me.AccDate == null || me.AccDate == undefined) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.Bixukuaiji, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
};
me.IsAccDate = '1';
} else me.IsAccDate = '0';
_this.onSelFeeLockClick()
}
}, {
text: Zi.LAN.close,
minWidth: 70,
handler: function () {
me.winFeeCloseShow.close();
}
}]
});
//#endregion
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='AMENDSELFWORKFLOW'"
},
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.AMENDSELFWORKFLOW = 1;
} else {
}
}
} else {
}
},
scope: this
});
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='AUDITNOBACK'"
},
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.AUDITNOBACK = 1;
} else {
}
}
} else {
}
},
scope: this
});
}, //end initUIComponents
//#region 加载数据
InitData: function () {
var condition = '';
/*
if (this.ParentPanel) {
var ret = this.ParentPanel.OprationSwap();
this.opStatus = ret[0];
this.StoreList = ret[1];
this.editRecord = ret[2];
this.RefBillNo = ret[3];
}
*/
this.panelSearch.hide();
this.LoadData(this.opStatus, condition, this.RefBillNo);
}, //end InitData
LoadData: function (opstatus, condition, refbillno) {
this.feeCrSerialNo = 0;
this.feeCrBodyDel = [];
this.feeCrSerialNo = 0;
this.feeCrBodyDel = [];
this.opStatus = opstatus;
this.PageSize = this.Pagenum.getValue();
this.storeBillList.pageSize = this.PageSize;
// this.BillSql = " EXISTS (select 1 from ch_fee left join workflow_using wu on wu.bsno=ch_fee.GID where v_op_bill.BSNO=ch_fee.BSNO and dbo.[GetUsingStep](wu.WORKFLOWID,wu.currentid,'" + userid + "',wu.stepno)>0) ";
this.BillSql = " EXISTS (select 1 from ch_fee left join workflow_using wu on wu.bsno=ch_fee.GID left join workflow_step st "
+ " on (st.WORKFLOWID=wu.WORKFLOWID and st.GROUPID=WU.CurrentID) where v_op_bill.BSNO=ch_fee.BSNO "
+ " and isnull((power(2,(ST.STEPNO)) & wu.stepno),0)>0 and st.AUDITOR='" + userid + "' and (ch_fee.FEESTATUS=2 or ch_fee.FEESTATUS=3 or ch_fee.FEESTATUS=4)) ";
_this = this;
this.sqlcontext = this.BillSql;
this.storeBillList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: _this.BillSql },
waitMsg: Zi.LAN.NowSelect,//正在查询
callback: function (r, options, success) {
if (success) {
this.DataLoading = false;
if (r.length > 0) {
this.gridBillList.getSelectionModel().select(0);
} else {
var bsno = '1';
var optype = '1';
var isAll = '0';
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue();
_this.storeDrChFee.load({ params: { bsno: bsno, type: 1, optype: optype, isAll: isAll} });
_this.storeCrChFee.load({ params: { bsno: bsno, type: 2, optype: optype, isAll: isAll} });
_this.storeBodySum.load({ params: { bsno: bsno },
callback: function (r, options, success) {
if (success) {
_this.setTotalHead();
}
}
});
_this.storeChFeeGain.load({ params: { bsno: bsno} });
_this.storeChFeeAmendGain.load({ params: { bsno: bsno} });
// _this.storeChFeeGain.load({ params: { bsno: bsno },
// callback: function (r, options, success) {
// if (success) {
// _this.formtotal.getForm().loadRecord(_this.storeChFeeGain.getAt(0));
// }
// },
// scope: this
// });
}
}
},
scope: this
});
// var el = Ext.get("gridDrChFee");
/*
this.storeDrChFee.load({ params: { billno: this.gid, type: 1} });
this.storeCrChFee.load({ params: { billno: this.gid, type: 2} });
this.storeChFeeGain.load({ params: { bsno: this.gid },
callback: function (r, options, success) {
if (success) {
this.formtotal.getForm().loadRecord(this.storeChFeeGain.getAt(0));
}
},
scope: this
});
*/
}, // end LoadDate
InitDrGrid: function (grid) {
var agirdcolums = grid;
this.gridDrChFee.reconfigure(this.storeDrChFee, agirdcolums);
},
InitCrGrid: function (grid) {
var agirdcolums = grid;
this.gridCrChFee.reconfigure(this.storeCrChFee, agirdcolums);
},
setTotalHead: function () {
var rmbdr = 0;
var rmbcr = 0;
var usddr = 0;
var usdcr = 0;
var otdr = 0;
var otcr = 0;
var ttldr = 0;
var ttlcr = 0;
var rmbprofit = 0;
var usdprofit = 0;
var otprofit = 0;
var ttlprofit = 0;
var profitrate = 0;
for (i = 0; i < this.storeBodySum.getCount(); i += 1) {
var memberyf = this.storeBodySum.getAt(i);
if (memberyf.data.CURR == LOCALCURR) {
rmbdr = memberyf.data.DR;
rmbcr = memberyf.data.CR;
rmbprofit = memberyf.data.PR;
} else if (memberyf.data.CURR == 'USD') {
usddr = memberyf.data.DR;
usdcr = memberyf.data.CR;
usdprofit = memberyf.data.PR;
} if (memberyf.data.CURR == '其他币别') {
otdr = memberyf.data.DR;
otcr = memberyf.data.CR;
otprofit = memberyf.data.PR;
} if (memberyf.data.CURR == '合计') {
ttldr = memberyf.data.DR;
ttlcr = memberyf.data.CR;
ttlprofit = memberyf.data.PR;
profitrate = memberyf.data.PROFITRATE;
}
}
var rmblb = "";
var usdlb = "";
var otlb = "";
var ttllb = "";
if (rmbdr != 0 || rmbcr != 0 || rmbprofit != 0) {
var feecolor = 'green';
if (rmbprofit < 0) feecolor = 'red';
rmblb = "&nbsp&nbsp&nbsp" + LOCALCURR + "" + Zi.LAN.Receivable + ":<font color='" + feecolor + "'>" + returnfloat(rmbdr) + "</font> &nbsp&nbsp " + LOCALCURR + "" + Zi.LAN.Handle + ": <font color='" + feecolor + "'>" + returnfloat(rmbcr) + "</font> &nbsp&nbsp" + LOCALCURR + "" + Zi.LAN.profit + ":<font color='" + feecolor + "'>" + returnfloat(rmbprofit) + "</font>&nbsp&nbsp&nbsp|";
}
if (usddr != 0 || usdcr != 0 || usdprofit != 0) {
var feecolor = 'green';
if (usdprofit < 0) feecolor = 'red';
usdlb = "&nbsp&nbsp&nbspUSD" + Zi.LAN.Receivable + ": <font color='" + feecolor + "'>" + returnfloat(usddr) + "</font> &nbsp&nbsp" + Zi.LAN.profitUSD + ":<font color='" + feecolor + "'>" + returnfloat(usdcr) + "</font> &nbsp&nbsp" + Zi.LAN.USDprofit + "<font color='" + feecolor + "'>" + returnfloat(usdprofit) + "</font>&nbsp&nbsp&nbsp|";
}
if (otdr != 0 || otcr != 0 || otprofit != 0) {
otlb = "&nbsp&nbsp&nbsp" + Zi.LAN.ReceivableOther + ": <font color='green'>" + returnfloat(otdr) + "</font> &nbsp&nbsp " + Zi.LAN.HandleOther + ":<font color='green'>" + returnfloat(otcr) + "</font> &nbsp&nbsp" + Zi.LAN.Otherprofit + "<font color='green'>" + returnfloat(otprofit) + "</font>&nbsp&nbsp&nbsp|";
}
//if (ttldr != 0 || ttlcr != 0 || ttlprofit != 0) {
var feecolor = 'green';
if (ttlprofit < 0) feecolor = 'red';
ttllb = "&nbsp&nbsp&nbsp" + Zi.LAN.ReceivableSum + ": <font color='" + feecolor + "'>" + returnfloat(ttldr) + "</font> &nbsp&nbsp" + Zi.LAN.profitSum + ":<font color='" + feecolor + "'>" + returnfloat(ttlcr) + "</font> &nbsp&nbsp" + Zi.LAN.Hejiprofit + "<font color='" + feecolor + "'>" + returnfloat(ttlprofit) + "</font>&nbsp&nbsp" + Zi.LAN.ProfitMargins + "<font color='" + feecolor + "'>" + returnfloat(profitrate) + "</font>";
//}
this.tabTotal.setTitle(Zi.LAN.TotalProfit + rmblb + usdlb + otlb + ttllb);
},
getProfitNum: function () {
var rmbdr = 0;
var rmbcr = 0;
var usddr = 0;
var usdcr = 0;
var otdr = 0;
var otcr = 0;
var ttldr = 0;
var ttlcr = 0;
var rmbprofit = 0;
var usdprofit = 0;
var otprofit = 0;
var ttlprofit = 0;
var profitrate = 0;
var noacctaxttldr = 0;
var noacctaxttlcr = 0;
var acctaxttldr = 0;
var acctaxttlcr = 0;
for (i = 0; i < this.storeBodySum.getCount(); i += 1) {
var memberyf = this.storeBodySum.getAt(i);
if (memberyf.data.CURR == LOCALCURR) {
rmbdr = memberyf.data.DR;
rmbcr = memberyf.data.CR;
rmbprofit = memberyf.data.PR;
} else if (memberyf.data.CURR == 'USD') {
usddr = memberyf.data.DR;
usdcr = memberyf.data.CR;
usdprofit = memberyf.data.PR;
} if (memberyf.data.CURR == '其他币别') {
otdr = memberyf.data.DR;
otcr = memberyf.data.CR;
otprofit = memberyf.data.PR;
} if (memberyf.data.CURR == '合计') {
ttldr = memberyf.data.DR;
ttlcr = memberyf.data.CR;
ttlprofit = memberyf.data.PR;
profitrate = memberyf.data.PROFITRATE;
noacctaxttldr = memberyf.data.NOACCTAXRATEDR;
noacctaxttlcr = memberyf.data.NOACCTAXRATECR;
acctaxttldr = memberyf.data.ACCTAXDR;
acctaxttlcr = memberyf.data.ACCTAXCR;
}
}
return { rmbdr: rmbdr, rmbcr: rmbcr, rmbprofit: rmbprofit, usddr: usddr, usdcr: usdcr, usdprofit: usdprofit, otdr: otdr, otcr: otcr, otprofit: otprofit, ttldr: ttldr, ttlcr: ttlcr, ttlprofit: ttlprofit, profitrate: profitrate, noacctaxttldr: noacctaxttldr, noacctaxttlcr: noacctaxttlcr, acctaxttldr: acctaxttldr, acctaxttlcr: acctaxttlcr };
},
//#endregion
//#region 明细操作
onRefreshClick: function (button, event) {
// var girdcolums = this.gridList.getColumnMode();
this.BillSql = this.getCondition();
_this = this;
this.PageSize = this.Pagenum.getValue();
this.storeBillList.pageSize = this.PageSize;
this.sqlcontext = this.BillSql;
this.storeBillList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: _this.BillSql },
waitMsg: Zi.LAN.NowSelect,//正在查询数据
callback: function (r, options, success) {
if (success) {
if (r.length > 0) {
this.gridBillList.getSelectionModel().select(0);
} else {
var bsno = '1';
var optype = '1';
var isAll = '0';
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue();
_this.storeDrChFee.load({ params: { bsno: bsno, type: 1, optype: optype, isAll: isAll} });
_this.storeCrChFee.load({ params: { bsno: bsno, type: 2, optype: optype, isAll: isAll} });
_this.storeBodySum.load({ params: { bsno: bsno },
callback: function (r, options, success) {
if (success) {
_this.setTotalHead();
}
}
});
_this.storeChFeeGain.load({ params: { bsno: bsno} });
_this.storeChFeeAmendGain.load({ params: { bsno: bsno} });
}
}
},
scope: this
});
},
onDsQuery: function () {
//var girdcolums = this.gridList.getColumnMode();
this.PageSize = this.Pagenum.getValue();
this.storeBillList.pageSize = this.PageSize;
this.BillSql = this.sqlcontext;
this.storeBillList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: _this.BillSql },
waitMsg: Zi.LAN.NowSelect,//正在查询数据
callback: function (r, options, success) {
if (success) {
if (r.length > 0) {
this.gridBillList.getSelectionModel().select(0);
} else {
var bsno = '1';
var optype = '1';
var isAll = '0';
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue();
_this.storeDrChFee.load({ params: { bsno: bsno, type: 1, optype: optype, isAll: isAll} });
_this.storeCrChFee.load({ params: { bsno: bsno, type: 2, optype: optype, isAll: isAll} });
_this.storeBodySum.load({ params: { bsno: bsno },
callback: function (r, options, success) {
if (success) {
_this.setTotalHead();
}
}
});
_this.storeChFeeGain.load({ params: { bsno: bsno} });
_this.storeChFeeAmendGain.load({ params: { bsno: bsno} });
}
}
},
scope: this
});
},
CheckChange: function (field, newValue, oldValue, eOpts) {
this.onRefreshClick();
var isvisible = true;
var issavevalue = false;
if (_this.SearchBtn.text == '隐藏查询')
isvisible = true
else
isvisible = false;
if (this.CheckSaveQuery.checked)
issavevalue = true
//var IsOnlyAuditBL = false;
//var IsOnlyAuditFee = false;
//if (this.CheckAll.checked) IsOnlyAuditBL = true;
//if (this.CheckFeeAll.checked) IsOnlyAuditFee = true;
//this.formSearch.getForm().findField('IsOnlyAuditBL').setValue(IsOnlyAuditBL);
//this.formSearch.getForm().findField('IsOnlyAuditFee').setValue(IsOnlyAuditFee);
//saveQuerySetting(this.formname, this.formSearch, isvisible, issavevalue);
},
CheckLiRun: function () {
//看利润是否为负值 如否(为正值)返回true
var ref = this.getProfitNum();
//rmbdr = ref.rmbdr;
//rmbcr = ref.rmbcr;
//rmbprofit = ref.rmbprofit;
//usddr = ref.usddr;
//usdcr = ref.usdcr;
//rmbdr = ref.rmbdr;
//usdprofit = ref.usdprofit;
//otdr = ref.otdr;
//otcr = ref.otcr;
//otprofit = ref.otprofit;
//ttldr = ref.ttldr;
//ttlcr = ref.ttlcr;
//ttlprofit = ref.ttlprofit;
profitrate = ref.profitrate;
if (profitrate >= 0) { return true; } else return false;
},
onAuditNewClick: function (button, event, type) {
var GidStr = '';
if (type == '1') {
var records = this.feeDrGridCheckBoxModel.selected.items;
} else if (type == '2') {
var records = this.feeCrGridCheckBoxModel.selected.items;
};
if (records.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.FirstShenH, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue();
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var feeStatus = rec.data.FeeStatus;
var Gid = rec.data.GId;
var IsAudit = rec.data.IsAudit;
var canAudit = feeStatus == 2;
if (canAudit == false) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.OnlyShenHe, //只能费用状态为[提交审核]的费用才能审核通过
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (IsAudit == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.RoleShenHe,//没有审核权限
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (GidStr == '')
GidStr = Gid;
else {
GidStr = GidStr + ',' + Gid;
}
bodyAddDatas.push(rec);
}
}
}
_this = this;
if (GidStr == '') {
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZZShenHe,//正在审核
url: '/Account/Chfee_Audit/AuditList',
params: {
optype: _this.stroplb,
bill: jsonbodyAddDatas,
bsno: this.strBSNO,
mblno: this.strMBSNO,
isamend: _this.isAmend
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
if (type == 1) {
_this.storeDrChFee.load({ params: { bsno: _this.strBSNO, type: 1, optype: _this.stroplb, isAll: isAll} });
} else {
_this.storeCrChFee.load({ params: { bsno: _this.strBSNO, type: 2, optype: _this.stroplb, isAll: isAll} });
}
Ext.Ajax.request({
waitMsg: Zi.LAN.ZZTiJiao,//正在提交数据
url: '/Account/Chfee_Audit/UpLock',
params: {
bsno: _this.strBSNO,
optype: _this.stroplb
},
callback: function (options, success, response) {
if (success) {
_this.UpListStatus(_this.strBSNO);
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
return;
} else {
return;
}
} else {
return;
}
},
scope: this
});
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);//请求错误
}
},
scope: this
});
}
},
onAuditBackNewClick: function (button, event, type) {
if (this.FeeStatus == true) {//不允许驳回
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.LocalBoHui, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var GidStr = '';
if (type == '1') {
var records = this.feeDrGridCheckBoxModel.selected.items;
} else if (type == '2') {
var records = this.feeCrGridCheckBoxModel.selected.items;
};
if (records.length == 0) {//选择要驳回的费用
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.SelectFeiYong, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue();
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var feeStatus = rec.data.FeeStatus;
var Gid = rec.data.GId;
var IsAudit = rec.data.IsAudit;
var canAudit = feeStatus == 2 || feeStatus == 0;
if (canAudit == false) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.Tishi1, //'只能费用状态为[提交审核]或[审核通过]的费用才能驳回提交'
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
if (rec.data.Settlement != 0) {
canAudit = false; //'当前费用已结算无法驳回!'
Ext.Msg.show({ title: Zi.LAN.TiShi, msg:Zi.LAN.Tishi2 , icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
if (rec.data.Invoice != 0) {
canAudit = false;
//'当前费用已开出发票无法驳回!'
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.Tishi3, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
if (rec.data.OrderAmount != 0) {
canAudit = false;
//'当前费用已申请费用无法驳回!'
Ext.Msg.show({ title: Zi.LAN.TiShi, msg:Zi.LAN.Tishi4 , icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
if (rec.data.OrderInvoice != 0) {
canAudit = false;
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.Tishi5, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //'当前费用已申请开票无法驳回!'
}
if (this.AUDITNOBACK == 1) {
if (feeStatus == 0) {
canAudit = false;
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: '费用已审核通过,不允许驳回!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
}
if (canAudit == false) {
} else {
if (IsAudit == -1) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.Tishi6,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (GidStr == '')
GidStr = Gid;
else {
GidStr = GidStr + ',' + Gid;
}
bodyAddDatas.push(rec);
}
}
}
_this = this;
if (GidStr == '') {
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
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.ZhengZaiBh, //'正在驳回提交...
url: '/Account/Chfee_Audit/AuditBack',
params: {
optype: _this.stroplb,
bill: jsonbodyAddDatas,
reasean: text,
isamend: _this.isAmend
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
if (type == 1) {
_this.storeDrChFee.load({ params: { bsno: _this.strBSNO, type: 1, optype: _this.stroplb, isAll: isAll} });
} else {
_this.storeCrChFee.load({ params: { bsno: _this.strBSNO, type: 2, optype: _this.stroplb, isAll: isAll} });
}
_this.UpListStatus(_this.strBSNO);
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
}
});
}
},
onNoIvoiceClick: function (button, event, type) {
var GidStr = '';
if (type == '1') {
var records = this.feeDrGridCheckBoxModel.selected.items;
} else if (type == '2') {
var records = this.feeCrGridCheckBoxModel.selected.items;
};
if (records.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.StopFaPiao, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue();
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var feeStatus = rec.data.FeeStatus;
var Gid = rec.data.GId;
var Settlement = rec.data.Settlement;
var Invoice = rec.data.Invoice;
var OrderInvoice = rec.data.OrderInvoice;
if (Settlement != 0 || Invoice != 0 || Invoice != 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.NOtUpdate, //'已结算或开出发票及申请开票后,不允许修改是否开票状态!'
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (GidStr == '')
GidStr = Gid;
else {
GidStr = GidStr + ',' + Gid;
}
}
}
_this = this;
if (GidStr == '') {
} else {
Ext.Ajax.request({
waitMsg: Zi.LAN.ZZTiJiao, //'正在提交数据...'
url: '/Account/Chfee_Audit/NoIvoice',
params: {
bill: GidStr
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
if (type == 1) {
_this.storeDrChFee.load({ params: { bsno: _this.strBSNO, type: 1, optype: _this.stroplb, isAll: isAll} });
} else {
_this.storeCrChFee.load({ params: { bsno: _this.strBSNO, type: 2, optype: _this.stroplb, isAll: isAll} });
}
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
},
onCancelNoInvoiceClick: function (button, event, type) {
var GidStr = '';
if (type == '1') {
var records = this.feeDrGridCheckBoxModel.selected.items;
} else if (type == '2') {
var records = this.feeCrGridCheckBoxModel.selected.items;
};
if (records.length == 0) {//'请先选择要解禁开发票的费用!'
Ext.Msg.show({ title: Zi.LAN.TiShi, msg:Zi.LAN.JinJinFP , icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue();
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var feeStatus = rec.data.FeeStatus;
var Gid = rec.data.GId;
var Settlement = rec.data.Settlement;
var Invoice = rec.data.Invoice;
var OrderInvoice = rec.data.OrderInvoice;
if (Settlement != 0 || Invoice != 0 || Invoice != 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.NOtUpdate, //'已结算或开出发票及申请开票后,不允许修改是否开票状态!'
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (GidStr == '')
GidStr = Gid;
else {
GidStr = GidStr + ',' + Gid;
}
}
}
_this = this;
if (GidStr == '') {
} else {
Ext.Ajax.request({
waitMsg: Zi.LAN.ZZTiJiao,//正在提交
url: '/Account/Chfee_Audit/CancelNoIvoice',
params: {
bill: GidStr
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
if (type == 1) {
_this.storeDrChFee.load({ params: { bsno: _this.strBSNO, type: 1, optype: _this.stroplb, isAll: isAll} });
} else {
_this.storeCrChFee.load({ params: { bsno: _this.strBSNO, type: 2, optype: _this.stroplb, isAll: isAll} });
}
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
},
onAuditShenClick: function (button, event, type) {
if (this.FeeStatus == true) {//'此票业务已锁定,不允许批准申请!'
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.cpyelocal, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var GidStr = '';
if (type == '1') {
var records = this.feeDrGridCheckBoxModel.selected.items;
} else if (type == '2') {
var records = this.feeCrGridCheckBoxModel.selected.items;
};
if (records.length == 0) {//'请先选择要批准申请的费用!'
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.SelectPiZhun, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var feeStatus = rec.data.FeeStatus;
var Gid = rec.data.GId;
var IsAudit = rec.data.IsAudit;
var canAudit = feeStatus == 3 || feeStatus == 4;
if (canAudit == false) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.SelectFYZT, //'只能费用状态为[申请修改]或[申请删除]的费用才能审核通过'
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (IsAudit == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.NoRole, //'你没有批准此费用的权限!'
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (GidStr == '')
GidStr = Gid;
else {
GidStr = GidStr + ',' + Gid;
}
bodyAddDatas.push(rec);
}
}
}
_this = this;
if (GidStr == '') {
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZZShenHe, //'正在审核...'
url: '/Account/Chfee_Audit/AuditShenNew',
params: {
optype: _this.stroplb,
bill: jsonbodyAddDatas,
isamend: _this.isAmend
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.FYPizhun, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
if (type == 1) {
_this.storeDrChFee.load({ params: { bsno: _this.strBSNO, type: 1, optype: _this.stroplb, isAll: isAll} });
this.NewFeeShowDr.setVisible(false);
} else {
_this.storeCrChFee.load({ params: { bsno: _this.strBSNO, type: 2, optype: _this.stroplb, isAll: isAll} });
this.NewFeeShowCr.setVisible(false);
}
this.UpListStatus(_this.strBSNO);
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
},
onAuditBackShenClick: function (button, event, type) {
if (this.FeeStatus == true) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.LocalBoHui, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var GidStr = '';
if (type == '1') {
var records = this.feeDrGridCheckBoxModel.selected.items;
} else if (type == '2') {
var records = this.feeCrGridCheckBoxModel.selected.items;
};
if (records.length == 0) {//'请先选择要驳回申请的费用!'
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.SelectFeiYong, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue();
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var feeStatus = rec.data.FeeStatus;
var Gid = rec.data.GId;
var IsAudit = rec.data.IsAudit;
var canAudit = feeStatus == 3 || feeStatus == 4;
if (canAudit == false) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.SelectFYZT, //'只能费用状态为[申请修改]或[申请删除]的费用才能驳回提交'
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
if (canAudit == false) {
} else {
if (IsAudit == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi,
msg: Zi.LAN.BHRole, // '你没有批驳回此费用的权限!'
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (GidStr == '')
GidStr = Gid;
else {
GidStr = GidStr + ',' + Gid;
}
bodyAddDatas.push(rec);
}
}
}
_this = this;
if (GidStr == '') {
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
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.ZhengZaiBh, //'正在驳回提交...'
url: '/Account/Chfee_Audit/AuditBackShen',
params: {
optype: _this.stroplb,
bill: jsonbodyAddDatas,
reasean: text,
isamend: _this.isAmend,
worktype:'FEEAUDIT'
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.BHSuccess, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
if (type == 1) {
_this.storeDrChFee.load({ params: { bsno: _this.strBSNO, type: 1, optype: _this.stroplb, isAll: isAll} });
this.NewFeeShowDr.setVisible(false);
} else {
_this.storeCrChFee.load({ params: { bsno: _this.strBSNO, type: 2, optype: _this.stroplb, isAll: isAll} });
this.NewFeeShowCr.setVisible(false);
}
this.UpListStatus(_this.strBSNO);
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
}
});
}
},
UpListStatus: function (bsno) {
Ext.Ajax.request({
waitMsg: Zi.LAN.OnSelect,
url: '/Account/Chfee_Audit/GetBLData',
params: {
handle: 'edit',
condition: " BSNO='" + bsno + "'",
isapp: false
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
}
var data = result.data;
for (i = 0; i < this.storeBillList.getCount(); i += 1) {
var memberyf = this.storeBillList.getAt(i);
if (memberyf.data.BSNO == bsno) {
memberyf.data.DRFEESTATUS = data.DRFEESTATUS;
memberyf.data.CRFEESTATUS = data.CRFEESTATUS;
memberyf.data.FEESTATUS = data.FEESTATUS;
memberyf.data.FEESTATUSREF = data.FEESTATUSREF;
memberyf.commit();
}
};
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
},
onViewWorkFlowDetailClick: function (button, event, type) {
if (type == '1') {
var records = this.feeDrGridCheckBoxModel.selected.items;
} else if (type == '2') {
var records = this.feeCrGridCheckBoxModel.selected.items;
};
if (records.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.SelectFY, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = records[0];
var feeStatus = record.data.FeeStatus;
var Gid = record.data.GId;
var WorkFlowName = "FeeOpOpOtherRecvPayAudit";
if ((this.strOPTYPE == '更改单') && (this.AMENDSELFWORKFLOW == 1)) {
WorkFlowName = "AmendFeefyAudit";
} else {
if (feeStatus == 3 || feeStatus == 4) {
WorkFlowName = "FeeOpOtherModifyAudit";
if (this.stroplb == "op_seae") {
WorkFlowName = "FeeModifyAudit";
} if (this.stroplb == "op_seai") {
WorkFlowName = "FeeSeaiModifyAudit";
} if (this.stroplb == "op_aire") {
WorkFlowName = "AireFeeModify";
} if (this.stroplb == "op_airi") {
WorkFlowName = "AiriFeeModify";
} if (this.stroplb == "op_apply") {
WorkFlowName = "ApplyFeeModify";
} if (this.stroplb == "op_bulk") {
WorkFlowName = "BulkFeeModify";
} if (this.stroplb == "op_other" || this.stroplb == "tMsWlPcHead" || this.stroplb == "OpCtnBsCard") {
WorkFlowName = "FeeOpOtherModifyAudit";
} if (this.stroplb == "op_railway") {
WorkFlowName = "RailwayFeeModify";
}
} else {
if (this.stroplb == "op_seae") {
WorkFlowName = "FeeRecvPayAudit";
} if (this.stroplb == "op_seai") {
WorkFlowName = "FeeSeaiRecvPayAudit";
} if (this.stroplb == "op_aire") {
WorkFlowName = "AireFeeAudit";
} if (this.stroplb == "op_airi") {
WorkFlowName = "AiriFeeAudit";
} if (this.stroplb == "op_apply") {
WorkFlowName = "ApplyFeeAudit";
} if (this.stroplb == "op_bulk") {
WorkFlowName = "BulkFeeAudit";
} if (this.stroplb == "op_other" || this.stroplb == "tMsWlPcHead" || this.stroplb == "OpCtnBsCard") {
WorkFlowName = "FeeOpOpOtherRecvPayAudit";
} if (this.stroplb == "op_railway") {
WorkFlowName = "RailwayFeeAudit";
}
}
}
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 = "";
var openUrl = "../../Account/Chfee_payapplication/Map?bsno=" + Gid + "&name=" + WorkFlowName;
window.open(openUrl, openType, openSet);
},
onViewDetailClick: function (button, event, type) {
var openSet = "height=540, width=890, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top= " + (screen.height - 540) / 2 + ",Left= " + (screen.width - 890) / 2
var openType = "_blank";
//打开费用“历史信息查询”页面
// var openUrl = "../../Shipping/FeeHistory.aspx?bsno=" + this.strBSNO + "&oplb=" + this.stroplb + "&type=" + type;
var openUrl = "../../MvcShipping/MsOpBill/MsFeeHistoryView?bsno=" + this.strBSNO + "&oplb=" + this.stroplb + "&type=" + type;
window.open(openUrl, openType, openSet);
},
getAllowOperationDetail: function () {
var feeStatus = 0;
if (feeStatus == '0' || feeStatus == false || feeStatus == 'false')
return true;
else {//"此票委托已费用已锁定,不允许操作费用!"
Ext.Msg.show({ title: Zi.LAN.E, msg: Zi.LAN.FeiYongYisD, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
return false;
}
},
//#endregion
onSelAuditClick: function (menu, event) {
var GidStr = '';
var records = this.AddGridCheckBoxModel.selected.items;
if (records.length == 0) {//'请先选择要审核的业务!'
Ext.Msg.show({ title: Zi.LAN.TiShi, msg:Zi.LAN.JapanAMR , icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
bodyAddDatas.push(rec);
}
if (bodyAddDatas.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.LoaclYeWuNo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait(Zi.LAN.ZZShenHe);
Ext.Ajax.request({
waitMsg: Zi.LAN.zzaiLoacal, //'正在锁定...'
url: '/Account/Chfee_Audit/SelAudit',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.onRefreshClick();
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
},
onCopyAuditClick: function (type) {
fulirun = this.CheckLiRun();
_this = this;
if (!fulirun) {
Ext.MessageBox.confirm(Zi.LAN.Prompt, Zi.LAN.SureAudit_Profit, function (btn) {
if (btn == 'yes') {
_this.DoCopyAuditClick(type);
} else {
return
}
});
} else {
_this.DoCopyAuditClick(type);
}
},
DoCopyAuditClick: function (type) {
_this = this;
var GidStr = '';
if (type == '1') {
var records = this.feeDrGridCheckBoxModel.selected.items;
this.storeCrChFee.each(function (record) {
if (record.data.ISSEL == '1')
records.push(record);
});
;
} else if (type == '2') {
var records = this.feeCrGridCheckBoxModel.selected.items;
this.storeDrChFee.each(function (record) {
if (record.data.ISSEL == '1')
records.push(record);
});
};
if (records.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.FirstShenH, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
if (this.CheckFeeAll.checked)
isAll = '1'
else
isAll = '0'
// isAll = this.comboxaddDCType.getValue();
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var feeStatus = rec.data.FeeStatus;
var Gid = rec.data.GId;
var IsAudit = rec.data.IsAudit;
var canAudit = feeStatus == 2;
if (canAudit == false) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: Zi.LAN.OnlyShenHe,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (IsAudit == 0) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: Zi.LAN.RoleShenHe,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
} else {
if (GidStr == '')
GidStr = Gid;
else {
GidStr = GidStr + ',' + Gid;
}
bodyAddDatas.push(rec);
}
}
}
_this = this;
if (GidStr == '') {
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZZShenHe,
url: '/Account/Chfee_Audit/AuditList',
params: {
optype: _this.stroplb,
bill: jsonbodyAddDatas,
bsno: this.strBSNO,
mblno: this.strMBSNO,
isamend: _this.isAmend,
worktype: _this.worktype
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.ZZShenHe,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
_this.storeDrChFee.reload();
_this.storeCrChFee.reload();
Ext.Ajax.request({
waitMsg: Zi.LAN.ZZTiJiao,
url: '/Account/Chfee_Audit/UpLock',
params: {
bsno: _this.strBSNO,
optype: _this.stroplb
},
callback: function (options, success, response) {
if (success) {
_this.UpListStatus(_this.strBSNO);
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
return;
} else {
return;
}
} else {
return;
}
},
scope: this
});
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
},
onAllAuditClick: function (menu, event) {
if (this.storeBillList.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.NoYwu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
_this = this;
Ext.MessageBox.confirm(Zi.LAN.TiShi, Zi.LAN.sureAllAudit, function (btn) {
if (btn == 'yes') {//正在删除数据...
Ext.Msg.wait(Zi.LAN.ZZShenHe);
Ext.Ajax.request({
waitMsg: Zi.LAN.zzaiLoacal,
url: '/Account/Chfee_Audit/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.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.onRefreshClick();
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
}, this);
},
//#region 费用锁定
onSelFeeLockClick: function (menu, event, type) {
var GidStr = '';
var records = this.AddGridCheckBoxModel.selected.items;
if (records.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.selectLocalYW, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
if (this.CheckAccMonth.checked) {
this.IsAccDate = '1'
} else this.IsAccDate = '0'
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var Gid = rec.data.BSNO;
var status = rec.data.FEESTATUS
if (status != true) {
bodyAddDatas.push(rec);
}
}
_this = this;
if (bodyAddDatas.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.LoaclYeWuNo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Ajax.request({
waitMsg: Zi.LAN.zzaiLoacal,
url: '/Account/Chfee_lock/SelFeeLock',
params: {
data: jsonbodyAddDatas,
isAccDate: _this.IsAccDate,
AccDate: _this.AccDate
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.onRefreshClick();
_this.winFeeCloseShow.close();
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
},
onSelUnLockClick: function (menu, event, type) {
var records = this.AddGridCheckBoxModel.selected.items;
if (records.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.HUMIDITY, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
//
var strGids = "";
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var Gid = rec.data.BSNO;
var status = rec.data.FEESTATUS
if (status = true) {
bodyAddDatas.push(rec);
strGids += "," + Gid;
}
}
//
if (bodyAddDatas.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYuou, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
if (strGids != "") {
strGids = strGids.toString().substr(1);
}
Ext.Ajax.request({
waitMsg: Zi.LAN.NowPanduansuoding,
url: '/Account/Chfee_lock/isSelUnLock',
params: {
strGids: strGids
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success) {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Ajax.request({
waitMsg: Zi.LAN.JieChuSuoDingNow,
url: '/Account/Chfee_lock/SelUnLock',
params: {
data: jsonbodyAddDatas,
type: type
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK });
return;
} else {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.JiechuSuodingSuccess, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.onRefreshClick();
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
} else {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
} else {
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
}
},
scope: this
});
}
},
//#endregion
getFeeStatus: function () {
var feeStatus = this.EditRecord.get('FEESTATUS');
return feeStatus;
},
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
}, //onClearClick
getCondition: function () {
var form = this.formSearch.getForm();
var sql = '';
var feestr = this.getFeeCondition();
if (feestr != '') feestr = " and " + feestr;
/*
var sqldata = form.getValues();
sql = Ext.JSON.encode(sqldata);
*/
// var StrAudit = " EXISTS (select 1 from ch_fee left join workflow_using wu on wu.bsno=ch_fee.GID where v_op_bill.BSNO=ch_fee.BSNO and dbo.[GetUsingStep](wu.WORKFLOWID,wu.currentid,'" + userid + "',wu.stepno)>0) ";
var StrAudit = " EXISTS (select 1 from ch_fee left join workflow_using wu on wu.bsno=ch_fee.GID left join workflow_step st "
+ " on (st.WORKFLOWID=wu.WORKFLOWID and st.GROUPID=WU.CurrentID) where v_op_bill.BSNO=ch_fee.BSNO "
+ " and isnull((power(2,(ST.STEPNO)) & wu.stepno),0)>0 and st.AUDITOR='" + userid + "' and (ch_fee.FEESTATUS=2 or ch_fee.FEESTATUS=3 or ch_fee.FEESTATUS=4) "
+feestr + " ) ";
if (this.DataLoading) {
return StrAudit
}
var mblNo = form.findField('PS_MBLNO').getValue();
// sql = sql + getAndConSql(sql, mblNo, "(MblNo like '%" + mblNo + "%' or hblNo like '%" + mblNo + "%' OR CUSTNO like '%" + mblNo + "%' OR CUSTOMNO like '%" + mblNo + "%' OR ORDERNO like '%" + mblNo + "%')");
sql = sql + getAndConSql(sql, mblNo, " (CUSTNO+' '+MBLNO+' '+HBLNO+' '+ORDERNO like '%" + mblNo + "%')");
var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, expDate_Min, " OPDATE>='" + expDate_Min + "'");
var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue();
sql = sql + getAndConSql(sql, expDate_Max, " OPDATE<='" + expDate_Max + " 23:59:59'");
var accDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, accDate_Min, " ACCDATE>='" + accDate_Min + "'");
var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
sql = sql + getAndConSql(sql, accDate_Max, " ACCDATE<='" + accDate_Max + "'");
var CUSTOMERNAME = form.findField('PS_CUSTOMERNAME').getValue();
sql = sql + getAndConSql(sql, CUSTOMERNAME, "CUSTOMERNAME='" + CUSTOMERNAME + "'");
var AGENT = form.findField('PS_AGENT').getValue();
sql = sql + getAndConSql(sql, AGENT, "AGENTID='" + AGENT + "'");
var SALE = form.findField('PS_SALE').getValue();
sql = sql + getAndConSql(sql, SALE, "SALE='" + SALE + "'");
var OP = form.findField('PS_OP').getValue();
sql = sql + getAndConSql(sql, OP, "OP='" + OP + "'");
var BSTYPE = form.findField('PS_BSTYPE').getValue();
sql = sql + getAndConSql(sql, BSTYPE, "BSTYPE='" + BSTYPE + "'");
var OPLB = form.findField('PS_OPLB').getValue();
sql = sql + getAndConSql(sql, OPLB, "OPLBNAME='" + OPLB + "'");
var VESSEL = form.findField('PS_VESSEL').getValue();
sql = sql + getAndConSql(sql, VESSEL, "VESSEL like '%" + VESSEL + "%'");
var VOYNO = form.findField('PS_VOYNO').getValue();
sql = sql + getAndConSql(sql, VOYNO, "VOYNO like '%" + VOYNO + "%'");
var BSSOURCE = form.findField('BSSOURCE').getValue();
sql = sql + getAndConSql(sql, BSSOURCE, "BSSOURCE='" + BSSOURCE + "'");
var ISFEEUP = form.findField('ISFEEUP').getValue();
if (ISFEEUP == '0') {
sql = sql + getAndConSql(sql, ISFEEUP, " NOT EXISTS (select 1 from OP_STATUS WHERE v_op_bill.BSNO=OP_STATUS.BSNO AND OP_STATUS.STTYPE='2') ");
} else if (ISFEEUP == '1') {
sql = sql + getAndConSql(sql, ISFEEUP, " EXISTS (select 1 from OP_STATUS WHERE v_op_bill.BSNO=OP_STATUS.BSNO AND OP_STATUS.STTYPE='2') ");
}
if (this.CheckAll.checked) {
sql = sql + getAndConSql(sql, StrAudit, StrAudit);
} else {
var feestr = this.getFeeCondition();
if (feestr != '') sql = sql + getAndConSql(sql, feestr, " EXISTS (select 1 from ch_fee WHERE v_op_bill.BSNO=ch_fee.BSNO AND " + feestr + ") ");
};
return sql;
},
getFeeCondition: function () {
var form = this.formSearch.getForm();
var feesql = '';
var CUSTNAME = form.findField('CUSTNAME').getValue();
feesql = feesql + getAndConSql(feesql, CUSTNAME, "ch_fee.CUSTOMERNAME='" + CUSTNAME + "'");
var FeeName = form.findField('FeeName').getValue();
feesql = feesql + getAndConSql(feesql, FeeName, "ch_fee.FEENAME='" + FeeName + "'");
return feesql;
},
setSaveBtnStatus: function (enable) {
var bsbtnSave = Ext.getCmp('pcbtnSave');
var bsbtnSaveAndClose = Ext.getCmp('pcbtnSaveAndClose');
var bsbtnSaveAndNew = Ext.getCmp('pcbtnSaveAndNew');
var pcbtnNew = Ext.getCmp('pcbtnNew');
if (enable) {
bsbtnSave.enable();
bsbtnSaveAndClose.enable();
bsbtnSaveAndNew.enable();
pcbtnNew.enable();
} else {
//bsbtnSave.disable();
//bsbtnSaveAndClose.disable();
bsbtnSaveAndNew.disable();
pcbtnNew.disable();
}
},
Print: function () {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
var sortstr = '';
if (this.sortfield != '' && this.sortdire != '') {
sortstr = this.sortfield + ' ' + this.sortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/Account/Chfee_Audit/GetBLListDataStr',
scope: this,
params: {
condition: _this.sqlcontext,
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 = 'MSCHFEAUDIT';
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
});
}
}
});
},
PrintSelect: function (rptmode) {
var selections = this.gridBillList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', 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('BSNO') + "'";
if (feeGidSql == '') {
feeGidSql = feeGId;
} else {
feeGidSql = feeGidSql + "," + feeGId;
}
};
var sortstr = 'BSNO';
if (this.sortfield != '' && this.sortdire != '') {
sortstr = this.sortfield + ' ' + this.sortdire;
}
var printType = 'MSCHFEAUDITSEL';
var sql1 = "SELECT * FROM V_OP_BILL WHERE BSNO IN (" + feeGidSql + ") order by " + sortstr;
var sql2 ="";
var sql3 ="";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
},
PrintView: function (rptmode) {
var selections = this.gridBillList.getSelectionModel().getSelection();
if (selections.length == 0) {
//Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var BSNO = record.data.BSNO;
var printType = 'MSCHFEAUDITSEL';
var sql1 = "SELECT * FROM V_OP_BILL WHERE BSNO='" + BSNO + "'";
var sql2 = "SELECT F.*,dbo.[GetUsingStep](wu.WORKFLOWID,wu.currentid,'" + userid + "',wu.stepno) as IsAudit FROM CH_FEE F left join workflow_using wu on wu.bsno=F.GID ";
sql2 = sql2 + " where F.bsno='" + BSNO + "' and F.FeeType=1 and dbo.[GetUsingStep](wu.WORKFLOWID,wu.currentid,'" + userid + "',wu.stepno)>0 ";
var sql3 = "SELECT F.*,dbo.[GetUsingStep](wu.WORKFLOWID,wu.currentid,'" + userid + "',wu.stepno) as IsAudit FROM CH_FEE F left join workflow_using wu on wu.bsno=F.GID ";
sql3 = sql3 + " where F.bsno='" + BSNO + "' and F.FeeType=2 and dbo.[GetUsingStep](wu.WORKFLOWID,wu.currentid,'" + userid + "',wu.stepno)>0 ";
var sql4 = "";
var sql5 = "";
var sql6 = "";
if (rptmode == 1) {
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6, '', 'MSCHFEAUDITSEL', 1);
} else PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
}
});