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.
208 lines
8.2 KiB
JavaScript
208 lines
8.2 KiB
JavaScript
Ext.namespace('Shipping');
|
|
|
|
Shipping.SeaiAmendFee = function (config) {
|
|
Ext.applyIf(this, config);
|
|
this.initUIComponents();
|
|
window.Shipping.SeaiAmendFee.superclass.constructor.call(this);
|
|
};
|
|
|
|
Ext.extend(Shipping.SeaiAmendFee, Ext.Panel, {
|
|
ParentWin: null,
|
|
OpStatus: 'add',
|
|
StoreList: null,
|
|
EditRecord: null,
|
|
region: 'north',
|
|
|
|
initUIComponents: function () {
|
|
//编辑form
|
|
this.storebill = Ext.create('Ext.data.Store', {
|
|
model: 'MsOpSeai',
|
|
remoteSort: false,
|
|
proxy: {
|
|
type: 'ajax',
|
|
url: '/MvcShipping/MsSeaiFee/GetBLData',
|
|
reader: {
|
|
id: 'GId',
|
|
root: 'data',
|
|
totalProperty: 'totalCount'
|
|
}
|
|
}
|
|
});
|
|
|
|
//按钮Toolbar
|
|
//var mainform = Ext.getCmp('MsOpSeaiEdit');
|
|
var mainform = window.parent._this;
|
|
EditRecord = mainform.editRecord;
|
|
this.BSNO = EditRecord.get('BSNO');
|
|
this.formHead = Ext.widget('form', {
|
|
id: 'FeeHeada',
|
|
region: 'north',
|
|
frame: true,
|
|
//bodyPadding: 5,
|
|
trackResetOnLoad: true,
|
|
fieldDefaults: {
|
|
margins: '1 1 1 1',
|
|
labelAlign: 'right',
|
|
flex: 1,
|
|
labelWidth: 60,
|
|
msgTarget: 'qtip'
|
|
},
|
|
items: [{
|
|
xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [{
|
|
fieldLabel: Zi.LAN.BSNO2, //'业务编号',
|
|
name: 'BSNO', flex: 0, hidden: true, margins: '0'
|
|
}, {
|
|
fieldLabel: Zi.LAN.MBLNO, //'主提单号',
|
|
readOnly: true,
|
|
name: 'MBLNO'
|
|
}, {
|
|
fieldLabel: Zi.LAN.CUSTNO, //'委托编号',
|
|
readOnly: true,
|
|
name: 'CUSTNO'
|
|
}, {
|
|
fieldLabel: Zi.LAN.CUSTOMERNAME, //'委托单位',
|
|
readOnly: true,
|
|
name: 'CUSTOMERNAME'
|
|
}]
|
|
}, {
|
|
xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [{
|
|
fieldLabel: Zi.LAN.ACCDATE, //'会计期间',
|
|
readOnly: true,
|
|
name: 'ACCDATE'
|
|
}, {
|
|
fieldLabel: Zi.LAN.BSSOURCE, //'业务来源',
|
|
readOnly: true,
|
|
name: 'BSSOURCE'
|
|
}, {
|
|
fieldLabel: Zi.LAN.SALE, //'揽货人',
|
|
readOnly: true,
|
|
name: 'SALE'
|
|
}, {
|
|
fieldLabel: Zi.LAN.OP, //'操 作',
|
|
readOnly: true,
|
|
name: 'OP'
|
|
}, {
|
|
fieldLabel: Zi.LAN.TRADETYPE, //'贸易方式',
|
|
readOnly: true,
|
|
name: 'TRADETYPE'
|
|
}, {
|
|
fieldLabel: Zi.LAN.FEESTATUSREF, //'费用锁定',
|
|
readOnly: true,
|
|
name: 'FEESTATUSREF'
|
|
}]
|
|
}, {
|
|
xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [{
|
|
fieldLabel: Zi.LAN.PORTDISCHARGE, //'卸货港',
|
|
readOnly: true,
|
|
name: 'PORTDISCHARGE'
|
|
}, {
|
|
fieldLabel: Zi.LAN.GOODSNAME, //'品名',
|
|
readOnly: true,
|
|
name: 'GOODSNAME'
|
|
}, {
|
|
fieldLabel: Zi.LAN.NETWEIGHT, //'净重',
|
|
readOnly: true,
|
|
name: 'NETWEIGHT'
|
|
}, {
|
|
fieldLabel: Zi.LAN.CNTRTOTAL3, //'箱型箱量',
|
|
readOnly: true,
|
|
name: 'CNTRTOTAL'
|
|
}]
|
|
}]//end items(fieldset 1)
|
|
}); //end this.formEdit
|
|
this.formHead.getForm().loadRecord(EditRecord);
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
layout: "border",
|
|
region: "north",
|
|
height: 85,
|
|
id: "BillHeadSeaiA",
|
|
items: [this.formHead]
|
|
});
|
|
|
|
this.panelAmendFee = new Shipping.FeeAmendEditGrid({
|
|
region: 'center',
|
|
layout: 'border'
|
|
});
|
|
this.panelAmendFee.EditRecord = EditRecord;
|
|
this.panelAmendFee.stroplb = 'op_Seai';
|
|
this.panelAmendFee.strBSNO = EditRecord.get('BSNO');
|
|
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "BGH-报关行", "CUSTTYPE": "报关行", "CUSTNAME": "CUSTOMSER" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "HG-海关", "CUSTTYPE": "海关", "CUSTNAME": "BYCUSTOM" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "DCDL-订舱代理", "CUSTTYPE": "订舱代理", "CUSTNAME": "FORWARDER" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "DL-代理", "CUSTTYPE": "代理", "CUSTNAME": "AGENTID" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "CZ-场站", "CUSTTYPE": "场站", "CUSTNAME": "YARD" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "CGS-船公司", "CUSTTYPE": "船公司", "CUSTNAME": "CARRIER" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKER" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "CDD-船代", "CUSTTYPE": "船代", "CUSTNAME": "SHIPAGENCY" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "BXGS-保险公司", "CUSTTYPE": "保险公司", "CUSTNAME": "" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "BJGS-报检公司", "CUSTTYPE": "报检公司", "CUSTNAME": "INSPECTION" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "QT-其他", "CUSTTYPE": "其他", "CUSTNAME": "" });
|
|
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "", "CUSTTYPE": "", "CUSTNAME": "" });
|
|
|
|
this.panelAmendFee.StoreDrOpRange.load({ params: { optype: "modSeaiRecvFeeManagement"} });
|
|
this.panelAmendFee.StoreCrOpRange.load({ params: { optype: "modSeaiPayFeeManagement"} });
|
|
this.panelAmendFee.StoreUnit.load({ params: { optype: "op_Seae",bsno: this.BSNO} });
|
|
|
|
this.panelAmendFee.storeFeeNameRef.load({ params: { condition: ""} });
|
|
this.panelAmendFee.StoreDateCurr.load({ params: { optype: "op_Seai", bsno: this.BSNO} });
|
|
|
|
this.panelAmendFee.storeAmendBill.load({
|
|
params: { billno: this.BSNO, optype: "op_Seai" },
|
|
callback: function (r, options, success) {
|
|
if (success) {
|
|
if (r.length > 0) {
|
|
this.panelAmendFee.gridAmendList.getSelectionModel().select(0);
|
|
}
|
|
}
|
|
},
|
|
scope: this
|
|
});
|
|
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('请求出现错误,请重试', response.responseText);
|
|
}
|
|
},
|
|
scope: this
|
|
});
|
|
|
|
function getModifyStatus() {
|
|
return this.panelAmendFee.getModifyStatus();
|
|
}
|
|
function loadUnit() {
|
|
return this.panelAmendFee.loadUnit();
|
|
}
|
|
|
|
Ext.apply(this, {
|
|
items: [this.panelTop, this.panelAmendFee]
|
|
});
|
|
}
|
|
});
|
|
|