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.

197 lines
7.5 KiB
JavaScript

Ext.namespace('Shipping');
Shipping.RailwayFee = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.RailwayFee.superclass.constructor.call(this);
};
Ext.extend(Shipping.RailwayFee, Ext.Panel, {
ParentWin: null,
OpStatus: 'add',
StoreList: null,
EditRecord: null,
region: 'north',
initUIComponents: function () {
//按钮Toolbar
// var mainform = Ext.getCmp('OpSeaeEdit');
// var mainform = window.window._this;
var mainform = window.panelEdit;
// if (mainform == null || mainform == NaN) {
// var mainform = Ext.getCmp('OpSeaeFenEdit');
// }
this.StorePLACETRANSIT = Ext.create('Ext.data.Store', {
fields: ['PORT', 'PORTID']
});
this.StorePLACETRANSIT.add({ "PORT": "Dostyk-eks", "PORTID": "ALASHANKOU" });
this.StorePLACETRANSIT.add({ "PORT": "Grodekovo", "PORTID": "SUIFENHE" });
this.StorePLACETRANSIT.add({ "PORT": "Dzamiin-Üüd", "PORTID": "ERLIAN" });
this.StorePLACETRANSIT.add({ "PORT": "Zabaykal'sk", "PORTID": "MANZHOULI" });
this.StorePLACETRANSIT.add({ "PORT": "Xinuiju", "PORTID": "DANDONG" });
this.StorePLACETRANSIT.add({ "PORT": "Brest-Tsentral'nny(V PNR)", "PORTID": "PINGXIANG" });
this.StorePLACETRANSIT.add({ "PORT": "Altynko-eks", "PORTID": "HORGOS" });
this.comboxPLACETRANSIT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '边境口岸',
store: this.StorePLACETRANSIT,
readOnly: true,
name: 'PLACETRANSIT',
valueField: 'PORTID',
displayField: 'PORT'
});
EditRecord = mainform.editRecord;
this.bsno = EditRecord.get('BSNO');
this.formHead = Ext.widget('form', {
region: 'center',
frame: true,
bodyPadding: 2,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [
{ xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '件数',
name: 'PKGS', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: '重量',
name: 'KGS', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: '尺码',
name: 'CBM', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'JOB NO.',
readOnly: true,
name: 'CUSTNO'
}, {
fieldLabel: '客户参考信息',
readOnly: true,
name: 'ORDERNO'
},
{
fieldLabel: '箱型',
readOnly: true,
name: 'CTNALL'
},
{
fieldLabel: '箱量',
readOnly: true,
name: 'CTNNUM,'
}, {
fieldLabel: '箱源',
readOnly: true,
name: 'CTNSOURCE'
}
]
},
{ xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '揽货人',
readOnly: true,
name: 'SALE'
}, {
fieldLabel: '委托单位',
readOnly: true,
name: 'CUSTOMERNAME'
},
{
fieldLabel: '收货地',
readOnly: true,
name: 'PlACERECEIPT'
},
{
fieldLabel: '发站',
readOnly: true,
name: 'PLACELOAD'
}, this.comboxPLACETRANSIT
]
},
{ xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [ {
fieldLabel: '中转地',
flex: 1,
readOnly: true,
name: 'FRPLACETRANSIT'
},{
fieldLabel: '到达站',
flex: 1,
readOnly: true,
name: 'DESTINATION'
}, {
xtype: 'textareafield',
grow: true,
flex: 3,
fieldLabel: '备注',
name: 'REMARK',
anchor: '100%'
}
]
}]
}); //end this.formEdit
this.formHead.getForm().loadRecord(EditRecord);
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 100,
items: [this.formHead]
});
this.panelFee = new Shipping.FeeEditGrid({
region: 'center',
layout: 'border'
});
this.panelFee.EditRecord = EditRecord;
this.panelFee.stroplb = 'op_railway';
this.panelFee.strBSNO = EditRecord.get('BSNO');
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CYR-承运人", "CUSTTYPE": "承运人", "CUSTNAME": "CARRIER" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "ZGH-转关行", "CUSTTYPE": "订舱代理", "CUSTNAME": "CUSTOMTRANSITCORP" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "FXGS-返箱公司", "CUSTTYPE": "订舱代理", "CUSTNAME": "RETURNCTNCORP" });
this.panelFee.StoreDrOpRange.load({ params: { optype: "modRailwayRecvFeeManagement"} });
this.panelFee.StoreCrOpRange.load({ params: { optype: "modRailwayPayFeeManagement"} });
this.panelFee.storeFeeNameRef.load({ params: { condition: ""} });
this.panelFee.StoreDateCurr.load({ params: { optype: "op_railway", bsno: this.bsno} });
this.panelFee.StoreUnit.load({ params: { bsno: this.bsno,bstype:"op_railway"} });
this.panelFee.storeDrChFee.load({ params: { billno: this.bsno, type: 1, optype: "op_railway"} });
this.panelFee.storeCrChFee.load({ params: { billno: this.bsno, type: 2, optype: "op_railway"} });
this.panelFee.storeBodySum.load({ params: { bsno: this.bsno, optype: "op_railway"} });
this.panelFee.storeChFeeGain.load({ params: { bsno: this.bsno, optype: "op_railway"} });
function getModifyStatus() {
return this.panelFee.getModifyStatus();
}
Ext.apply(this, {
items: [this.panelTop, this.panelFee]
});
}
});