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.
247 lines
10 KiB
JavaScript
247 lines
10 KiB
JavaScript
Ext.namespace('Shipping');
|
|
|
|
Shipping.SeaeAmendFee = function (config) {
|
|
Ext.applyIf(this, config);
|
|
this.initUIComponents();
|
|
window.Shipping.SeaeAmendFee.superclass.constructor.call(this);
|
|
};
|
|
|
|
Ext.extend(Shipping.SeaeAmendFee, Ext.Panel, {
|
|
ParentWin: null,
|
|
OpStatus: 'add',
|
|
StoreList: null,
|
|
EditRecord: null,
|
|
region: 'north',
|
|
|
|
initUIComponents: function () {
|
|
//编辑form
|
|
|
|
// var mainform = window.parent._this;
|
|
var mainform = window.panelEdit;
|
|
if (mainform==undefined){
|
|
mainform = window.parent.panelEdit;
|
|
}
|
|
// var mainform = Ext.getCmp('OpSeaeEdit');
|
|
// var mainform = window.parent._this; // Ext.getCmp('OpOtherEdit');
|
|
EditRecord = mainform.editRecord;
|
|
this.bsno = EditRecord.get('BSNO');
|
|
this.formHead = Ext.widget('form', {
|
|
frame: true,
|
|
bodyPadding: 5,
|
|
fieldDefaults: {
|
|
margins: '2 2 2 2',
|
|
labelAlign: 'right',
|
|
flex: 1,
|
|
labelWidth: 90,
|
|
msgTarget: 'qtip'
|
|
},
|
|
items: [
|
|
{
|
|
xtype: 'fieldset',
|
|
defaultType: 'textfield',
|
|
layout: 'anchor',
|
|
defaults: {
|
|
anchor: '100%'
|
|
},
|
|
items: [
|
|
{ xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [{
|
|
fieldLabel: Zi.LAN.PKGS, //'件数',
|
|
name: 'PKGS', flex: 0, hidden: true, margins: '0'
|
|
}, {
|
|
fieldLabel: Zi.LAN.KGS3, //'重量',
|
|
name: 'KGS', flex: 0, hidden: true, margins: '0'
|
|
}, {
|
|
fieldLabel: Zi.LAN.CBM2, //'尺码',
|
|
name: 'CBM', flex: 0, hidden: true, margins: '0'
|
|
}, {
|
|
fieldLabel: Zi.LAN.CUSTNO, //'委托编号',
|
|
readOnly: true,
|
|
name: 'CUSTNO'
|
|
}, {
|
|
fieldLabel: Zi.LAN.MBLNO, //'主提单号',
|
|
readOnly: true,
|
|
name: 'MBLNO'
|
|
},
|
|
{
|
|
fieldLabel: Zi.LAN.CNTRTOTAL3, //'箱型箱量',
|
|
readOnly: true,
|
|
name: 'CNTRTOTAL'
|
|
}, {
|
|
fieldLabel: Zi.LAN.BLFRT, //'付费方式',
|
|
readOnly: true,
|
|
name: 'BLFRT'
|
|
}, {
|
|
fieldLabel: Zi.LAN.MBLFRT2, //'MBL付费方式',
|
|
readOnly: true,
|
|
name: 'MBLFRT'
|
|
}
|
|
]
|
|
},
|
|
{ xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [{
|
|
fieldLabel: Zi.LAN.SALE, //'揽货人',
|
|
readOnly: true,
|
|
name: 'SALE'
|
|
}, {
|
|
fieldLabel: Zi.LAN.CUSTOMERNAME, //'委托单位',
|
|
readOnly: true,
|
|
name: 'CUSTOMERNAME'
|
|
},
|
|
{
|
|
fieldLabel: Zi.LAN.PORTDISCHARGE, //'卸货港',
|
|
readOnly: true,
|
|
name: 'PORTDISCHARGE'
|
|
},
|
|
{
|
|
fieldLabel: Zi.LAN.VESSEL, //'船名',
|
|
readOnly: true,
|
|
name: 'VESSEL'
|
|
}, {
|
|
fieldLabel: Zi.LAN.VOYNO, //'航次',
|
|
readOnly: true,
|
|
name: 'VOYNO'
|
|
}
|
|
]
|
|
}
|
|
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
|
|
}); //end this.formEdit
|
|
this.formHead.getForm().loadRecord(EditRecord);
|
|
_thisamendhead=this;
|
|
this.panelTop = new Ext.Panel({
|
|
layout: "border",
|
|
region: "north",
|
|
height: 100,
|
|
id: "BillHeadSeaeA",
|
|
items: [this.formHead]
|
|
});
|
|
|
|
this.panelAmendFee = new Shipping.FeeAmendEditGrid({
|
|
region: 'center',
|
|
layout: 'border'
|
|
});
|
|
this.panelAmendFee.EditRecord = EditRecord;
|
|
this.panelAmendFee.stroplb = 'op_Seae';
|
|
this.bsno = EditRecord.get('BSNO');
|
|
|
|
this.panelAmendFee.strBSNO = this.bsno;
|
|
this.panelAmendFee.stroplb = 'op_Seae';
|
|
this.panelAmendFee.isCancel=EditRecord.get('ISCANCEL');
|
|
|
|
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "CGS-船公司", "CUSTTYPE": "船公司", "CUSTNAME": "CARRIER" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "DCDL-订舱代理", "CUSTTYPE": "订舱代理", "CUSTNAME": "FORWARDER" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "BGH-报关行", "CUSTTYPE": "报关行", "CUSTNAME": "CUSTOMSER" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKER" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "FHR-发货人", "CUSTTYPE": "发货人", "CUSTNAME": "SHIPPERID" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "SHR-收货人", "CUSTTYPE": "收货人", "CUSTNAME": "CONSIGNEEID" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "TZR-通知人", "CUSTTYPE": "通知人", "CUSTNAME": "NOTIFYPARTYID" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "DL-代理", "CUSTTYPE": "代理", "CUSTNAME": "AGENTID" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "CZ-场站", "CUSTTYPE": "场站", "CUSTNAME": "YARD" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "CDD-船代", "CUSTTYPE": "船代", "CUSTNAME": "SHIPAGENCY" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "BXGS-保险公司", "CUSTTYPE": "保险公司", "CUSTNAME": "" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "QT-其他", "CUSTTYPE": "其他", "CUSTNAME": "" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "", "CUSTTYPE": "", "CUSTNAME": "" });
|
|
|
|
|
|
this.panelAmendFee.StoreDrOpRange.load({ params: { optype: "modRecvFeeManagement"} });
|
|
this.panelAmendFee.StoreCrOpRange.load({ params: { optype: "modPayFeeManagement" } });
|
|
this.panelAmendFee.DrFeeRangType = "modRecvFeeManagement";
|
|
this.panelAmendFee.CrFeeRangType = "modPayFeeManagement";
|
|
this.panelAmendFee.storeFeeNameRef.load({ params: { condition: "ISSEA='1' "} });
|
|
this.panelAmendFee.StoreDateCurr.load({ params: { optype: "op_Seae", bsno: this.bsno} });
|
|
this.panelAmendFee.StoreUnit.load({ params: { bsno: this.bsno, bstype: "op_Seae"} });
|
|
|
|
this.panelAmendFee.storeAmendBill.load({
|
|
params: { billno: this.bsno, bstype: "op_Seae" },
|
|
callback: function (r, options, success) {
|
|
if (success) {
|
|
if (r.length > 0) {
|
|
this.panelAmendFee.gridAmendList.getSelectionModel().select(0);
|
|
}
|
|
|
|
}
|
|
},
|
|
scope: this
|
|
});
|
|
this.panelAmendFee.storeBodyBLSum.load({ params: { bsno: this.bsno, optype: "op_Seae" },
|
|
callback: function (r, options, success) {
|
|
if (success) {
|
|
_thisamendhead.panelAmendFee.setBLTotalHead();
|
|
}
|
|
}
|
|
});
|
|
|
|
//this.panelAmendFee.panelViewFee.stroplb = 'op_Seae';
|
|
//this.panelAmendFee.panelViewFee.strBSNO = this.bsno;
|
|
|
|
//this.panelAmendFee.panelViewFee.StoreDrOpRange.load({ params: { optype: "modSeaeRecvFeeManagement" } });
|
|
//this.panelAmendFee.panelViewFee.StoreCrOpRange.load({ params: { optype: "modSeaePayFeeManagement" } });
|
|
|
|
//this.panelAmendFee.panelViewFee.storeDrChFee.load({ params: { billno: this.bsno, type: 1, optype: "op_Seae" } });
|
|
//this.panelAmendFee.panelViewFee.storeCrChFee.load({ params: { billno: this.bsno, type: 2, optype: "op_Seae" } });
|
|
//this.panelAmendFee.panelViewFee.storeBodySum.load({
|
|
// params: { bsno: this.bsno, optype: "op_Seae" },
|
|
// callback: function (r, options, success) {
|
|
// if (success) {
|
|
// _thisamendhead.panelAmendFee.panelViewFee.setTotalHead();
|
|
// }
|
|
// }
|
|
//});
|
|
//this.panelAmendFee.panelViewFee.storeChFeeGain.load({ params: { bsno: this.bsno, optype: "op_Seae" } });
|
|
|
|
|
|
Ext.Ajax.request({
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu, //'正在查询主表数据...',
|
|
url: '/Account/ChMonthClose/GetNowPeriod',
|
|
params: {
|
|
condition: ''
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
if (!result.Success) {
|
|
return;
|
|
}
|
|
data = result.data;
|
|
this.panelAmendFee.ACCDATEEDIT.setMinValue(data.PERIOD);
|
|
|
|
|
|
} else {
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);//'请求出现错误,请重试'
|
|
}
|
|
},
|
|
scope: this
|
|
});
|
|
|
|
function getModifyStatus() {
|
|
return this.panelAmendFee.getModifyStatus();
|
|
}
|
|
function loadUnit() {
|
|
var mainform = window.panelEdit;
|
|
EditRecord = mainform.editRecord;
|
|
_thisamendhead.formHead.getForm().loadRecord(EditRecord);
|
|
_thisamendhead.panelAmendFee.EditRecord = EditRecord;
|
|
_thisamendhead.panelAmendFee.StoreDateCurr.load({ params: { optype: "op_Seae", bsno: _thisSeaeFee.bsno } });
|
|
_thisamendhead.panelAmendFee.StoreUnit.load({ params: { bsno: _thisSeaeFee.bsno, bstype: "op_Seae" } });
|
|
return _thisamendhead.panelAmendFee.loadUnit();
|
|
|
|
}
|
|
Ext.apply(this, {
|
|
items: [this.panelTop, this.panelAmendFee]
|
|
});
|
|
}
|
|
});
|
|
|