|
|
|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
|
|
|
|
Shipping.TruckBulkPcAmendFee = function (config) {
|
|
|
|
|
Ext.applyIf(this, config);
|
|
|
|
|
this.initUIComponents();
|
|
|
|
|
window.Shipping.TruckBulkPcAmendFee.superclass.constructor.call(this);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ext.extend(Shipping.TruckBulkPcAmendFee, Ext.Panel, {
|
|
|
|
|
ParentWin: null,
|
|
|
|
|
OpStatus: 'add',
|
|
|
|
|
StoreList: null,
|
|
|
|
|
EditRecord2: null,
|
|
|
|
|
region: 'north',
|
|
|
|
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
|
//枚举参照相关
|
|
|
|
|
//编辑form
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//按钮Toolbar
|
|
|
|
|
var mainform = Ext.getCmp('OpTruckBulkPcEdit');
|
|
|
|
|
if (mainform == NaN || mainform == null) mainform = Ext.getCmp('OpTruckBulkCtnPcEdit');
|
|
|
|
|
EditRecord2 = mainform.editRecord;
|
|
|
|
|
this.BSNO = EditRecord2.get('BSNO');
|
|
|
|
|
this.formHead = Ext.widget('form', {
|
|
|
|
|
id: 'FeeHeadTruckBulkPcA',
|
|
|
|
|
region: 'north',
|
|
|
|
|
frame: true,
|
|
|
|
|
bodyPadding: 5,
|
|
|
|
|
trackResetOnLoad: true,
|
|
|
|
|
fieldDefaults: {
|
|
|
|
|
margins: '2 2 2 2',
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
flex: 1,
|
|
|
|
|
labelWidth: 60,
|
|
|
|
|
msgTarget: 'qtip'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
items: [{
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [{
|
|
|
|
|
fieldLabel: '业务编号',
|
|
|
|
|
name: 'BSNO', flex: 0, hidden: true, margins: '0'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '委托编号',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'CUSTNO'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '业务锁定',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'BSSTATUSREF'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '费用锁定',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'FEESTATUSREF'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '会计期间',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'ACCDATE'
|
|
|
|
|
//xtype: 'monthfield',
|
|
|
|
|
//value: Ext.util.Format.date(Ext.Date.add(new Date(), Ext.Date.MONTH - 1, 1), "Y-m"),
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '委托单位',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'CUSTOMERNAME'
|
|
|
|
|
}]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [{
|
|
|
|
|
fieldLabel: '启运地',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'PORTLOAD'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '目的地',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'PORTDISCHARGE'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '件数',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'PKGS'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '毛量',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'KGS'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '尺码',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'CBM'
|
|
|
|
|
}]
|
|
|
|
|
}]//end items(fieldset 1)
|
|
|
|
|
}); //end this.formEdit
|
|
|
|
|
this.formHead.getForm().loadRecord(EditRecord2);
|
|
|
|
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: "north",
|
|
|
|
|
height: 80,
|
|
|
|
|
id: "BillHeadTruckBulkPcA",
|
|
|
|
|
items: [this.formHead]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelFee = new Shipping.FeeAmendEditGrid({
|
|
|
|
|
region: 'center',
|
|
|
|
|
layout: 'border'
|
|
|
|
|
});
|
|
|
|
|
this.panelFee.EditRecord = EditRecord2;
|
|
|
|
|
this.panelFee.stroplb = 'op_other';
|
|
|
|
|
this.panelFee.strBSNO = EditRecord2.get('BSNO');
|
|
|
|
|
|
|
|
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" });
|
|
|
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CH-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKER" });
|
|
|
|
|
|
|
|
|
|
this.panelFee.StoreDrOpRange.load({ params: { optype: "modTruckRecvFeeManagement" } });
|
|
|
|
|
this.panelFee.StoreCrOpRange.load({ params: { optype: "modTruckPayFeeManagement" } });
|
|
|
|
|
this.panelFee.StoreUnit.load({ params: { BSNO: this.BSNO} });
|
|
|
|
|
|
|
|
|
|
this.panelFee.storeFeeNameRef.load({ params: { condition: ""} });
|
|
|
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "op_truckbulk", 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]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|