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.
193 lines
6.8 KiB
JavaScript
193 lines
6.8 KiB
JavaScript
Ext.namespace('Shipping');
|
|
|
|
Shipping.RailwayAmendFee = function (config) {
|
|
Ext.applyIf(this, config);
|
|
this.initUIComponents();
|
|
window.Shipping.RailwayAmendFee.superclass.constructor.call(this);
|
|
};
|
|
|
|
Ext.extend(Shipping.RailwayAmendFee, Ext.Panel, {
|
|
ParentWin: null,
|
|
OpStatus: 'add',
|
|
StoreList: null,
|
|
EditRecord: null,
|
|
region: 'north',
|
|
|
|
initUIComponents: function () {
|
|
//编辑form
|
|
|
|
// var mainform = window.parent._this;
|
|
var mainform = window.parent._this;
|
|
// 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: '件数',
|
|
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: '委托编号',
|
|
readOnly: true,
|
|
name: 'CUSTNO'
|
|
}, {
|
|
fieldLabel: '运输单号',
|
|
readOnly: true,
|
|
name: 'TRANSNO'
|
|
},
|
|
{
|
|
fieldLabel: '箱号',
|
|
readOnly: true,
|
|
name: 'CNTRNO'
|
|
}, {
|
|
fieldLabel: '箱型',
|
|
readOnly: true,
|
|
name: 'CTNALL'
|
|
}, {
|
|
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: 'PLACELOAD'
|
|
},
|
|
{
|
|
fieldLabel: '到达站',
|
|
readOnly: true,
|
|
name: 'DESTINATION'
|
|
}, {
|
|
fieldLabel: '山口站',
|
|
readOnly: true,
|
|
name: 'PLACETRANSIT'
|
|
}
|
|
]
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
|
|
}); //end this.formEdit
|
|
this.formHead.getForm().loadRecord(EditRecord);
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
layout: "border",
|
|
region: "north",
|
|
height: 100,
|
|
id: "BillHeadRailwayA",
|
|
items: [this.formHead]
|
|
});
|
|
|
|
this.panelFee = new Shipping.FeeAmendEditGrid({
|
|
region: 'center',
|
|
layout: 'border'
|
|
});
|
|
this.panelFee.EditRecord = EditRecord;
|
|
this.panelFee.stroplb = 'op_railway';
|
|
this.bsno = EditRecord.get('BSNO');
|
|
|
|
this.panelFee.strBSNO = this.bsno;
|
|
this.panelFee.stroplb = 'op_railway';
|
|
|
|
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} });
|
|
|
|
this.panelFee.storeAmendBill.load({ params: { billno: this.bsno },
|
|
callback: function (r, options, success) {
|
|
if (success) {
|
|
if (r.length > 0) {
|
|
this.panelFee.gridAmendList.getSelectionModel().select(0);
|
|
}
|
|
|
|
}
|
|
},
|
|
scope: this
|
|
});
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在查询主表数据...',
|
|
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.panelFee.ACCDATEEDIT.setMinValue(data.PERIOD);
|
|
|
|
|
|
} else {
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
}
|
|
},
|
|
scope: this
|
|
});
|
|
|
|
function getModifyStatus() {
|
|
return this.panelFee.getModifyStatus();
|
|
}
|
|
|
|
Ext.apply(this, {
|
|
items: [this.panelTop, this.panelFee]
|
|
});
|
|
}
|
|
});
|
|
|