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.
207 lines
6.0 KiB
JavaScript
207 lines
6.0 KiB
JavaScript
Ext.namespace('Shipping');
|
|
|
|
Shipping.PiliangCtnFee = function (config) {
|
|
Ext.applyIf(this, config);
|
|
this.initUIComponents();
|
|
window.Shipping.PiliangCtnFee.superclass.constructor.call(this);
|
|
};
|
|
|
|
Ext.extend(Shipping.PiliangCtnFee, Ext.Panel, {
|
|
ParentWin: null,
|
|
OpStatus: 'add',
|
|
StoreList: null,
|
|
EditRecord: null,
|
|
region: 'north',
|
|
BsNo: '',
|
|
feeType:null,
|
|
StoreFee: null,
|
|
StoreFeeUnit: null,
|
|
StoreFeeCust:null,
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
this.CheckAll = new Ext.form.Checkbox({
|
|
fieldLabel:'仅未引入费用', //仅需审核业务
|
|
checked: true,
|
|
width: 120
|
|
});
|
|
|
|
this.panelBtn = new Ext.Panel({
|
|
region: "north",
|
|
tbar: [{
|
|
text: "关闭",
|
|
// iconCls: "btnsave",
|
|
handler: function (button, event) {
|
|
window.close();
|
|
},
|
|
scope: this
|
|
}, this.CheckAll]
|
|
}); //end 按钮Toolbar
|
|
|
|
|
|
this.panelFee = new Shipping.FeeEditGrid({
|
|
region: 'center',
|
|
layout: 'border'
|
|
});
|
|
|
|
|
|
this.panelFee.stroplb = 'OpCtnBsCard';
|
|
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" });
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKNAME" });
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "MDGDL-目的港代理", "CUSTTYPE": "目的港代理", "CUSTNAME": "AGENTNAME" });
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DCGS-订舱公司", "CUSTTYPE": "订舱公司", "CUSTNAME": "AGENTNAME" });
|
|
|
|
this.panelFee.StoreDrOpRange.load({ params: { optype: "modOtherRecvFeeManagement" } });
|
|
this.panelFee.StoreCrOpRange.load({ params: { optype: "modOtherPayFeeManagement" } });
|
|
this.panelFee.storeFeeNameRef.load({ params: { condition: "" } });
|
|
this.CheckAll.addListener('change', function (field, newValue, oldValue, eOpts) {
|
|
this.LoadData();
|
|
|
|
}, this);
|
|
|
|
Ext.apply(this, {
|
|
items: [this.panelBtn,this.panelFee]
|
|
});
|
|
|
|
parentWin = window.parent.opener;
|
|
this.InitData();
|
|
},
|
|
|
|
|
|
//#region 加载事件
|
|
InitData: function () {
|
|
this.opStatus = 'add';
|
|
var condition = '';
|
|
_thisCtnPLFee = this;
|
|
if (parentWin) {
|
|
var ret = parentWin.OprationSwap();
|
|
this.opStatus = ret[0];
|
|
this.StoreList = ret[3];
|
|
this.EditRecord = ret[2];
|
|
}
|
|
|
|
this.BsNo ='1111';
|
|
this.LoadData();
|
|
|
|
|
|
|
|
}, //end InitData
|
|
|
|
LoadData: function () {
|
|
|
|
var BSNOStr = '';
|
|
for (i = 0; i < this.StoreList.getCount(); i += 1) {
|
|
var memberyf = this.StoreList.getAt(i);
|
|
this.BsNo = memberyf.data.GID;
|
|
var BSNO = "'" + memberyf.data.GID + "'";
|
|
if (BSNOStr == '')
|
|
BSNOStr = BSNO;
|
|
else {
|
|
|
|
BSNOStr = BSNOStr + ',' + BSNO;
|
|
}
|
|
}
|
|
|
|
var feesql = '';
|
|
if (this.CheckAll.checked) {
|
|
feesql = " and isnull(ch_fee.WMSOUTBSNO,'')='' ";
|
|
|
|
} else {
|
|
|
|
};
|
|
|
|
|
|
this.panelFee.DR_condition = " ch_fee.Feetype=1 and ch_fee.BSNO IN (" + BSNOStr + ") " + feesql;
|
|
this.panelFee.CR_condition = " ch_fee.Feetype=2 and ch_fee.BSNO IN (" + BSNOStr + ") " + feesql;
|
|
this.panelFee.EditRecord = this.EditRecord;
|
|
this.panelFee.strBSNO = this.BsNo;
|
|
this.panelFee.strPBSNO = this.BsNo;
|
|
this.panelFee.strMBLNO = this.BsNo;
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "OpCtnBsCard", bsno: this.BsNo } });
|
|
this.panelFee.StoreUnit.load({ params: { bsno: this.BsNo, bstype: "OpCtnBsCard" } });
|
|
|
|
this.panelFee.LoadDrChFee();
|
|
this.panelFee.LoadCrChFee();
|
|
|
|
|
|
}, // end LoadDate
|
|
//#region 打印
|
|
Print: function () {
|
|
|
|
var basicForm = this.formHead.getForm();
|
|
var billNo = basicForm.findField('BSNO').value;
|
|
if (billNo == '*' || billNo == '') {
|
|
Ext.Msg.show({ title: '错误', msg: '单据还没有保存,请保存后再打印', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
return;
|
|
}
|
|
|
|
var printType = 'MSOPSEAE';
|
|
var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM op_seae WHERE BSNO = '" + billNo + "'";
|
|
var sql2 = "";
|
|
var sql3 = "";
|
|
var sql4 = "";
|
|
var sql5 = "";
|
|
var sql6 = "";
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
},
|
|
//#endregion
|
|
|
|
PrevRecord: function () {
|
|
var j = this.StoreList.indexOf(this.EditRecord);
|
|
if (j == 0) {
|
|
Ext.Msg.show({ title: '警告', msg: '已是最前一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
return;
|
|
}
|
|
if (j == this.StoreList.count) {
|
|
Ext.Msg.show({ title: '警告', msg: '已是最后一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
j = j - 1;
|
|
this.EditRecord = this.StoreList.getAt(j);
|
|
this.BsNo = this.EditRecord.get('BSNO');
|
|
this.LoadData();
|
|
},
|
|
NextRecord: function () {
|
|
var j = this.StoreList.indexOf(this.EditRecord);
|
|
|
|
if (j == (this.StoreList.data.length - 1)) {
|
|
Ext.Msg.show({ title: '警告', msg: '已是最后一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
return;
|
|
|
|
}
|
|
j = j + 1;
|
|
this.EditRecord = this.StoreList.getAt(j);
|
|
this.BsNo = this.EditRecord.get('BSNO');
|
|
this.LoadData();
|
|
|
|
},
|
|
getModifyStatus: function () {
|
|
return this.panelFee.getModifyStatus();
|
|
},
|
|
feeType: function () {
|
|
return this.panelFee.feeType;
|
|
},
|
|
StoreFee: function () {
|
|
return this.panelFee.StoreFee;
|
|
},
|
|
StoreFeeUnit: function () {
|
|
return this.panelFee.StoreFeeUnit;
|
|
},
|
|
StoreFeeCust: function () {
|
|
return this.panelFee.StoreFeeCust;
|
|
}
|
|
|
|
|
|
});
|
|
|