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.
DS7/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/PcAmendFee.js

184 lines
6.7 KiB
JavaScript

Ext.namespace('Shipping');
Shipping.PcAmendFee = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.PcAmendFee.superclass.constructor.call(this);
};
Ext.extend(Shipping.PcAmendFee, Ext.Panel, {
ParentWin: null,
OpStatus: 'add',
StoreList: null,
EditRecord: null,
region: 'north',
initUIComponents: function () {
//编辑form
//按钮Toolbar
//var mainform = Ext.getCmp('MsOpSeaiEdit');
var mainform = window.parent._thisPc;
EditRecord = mainform.editRecord;
this.BSNO = EditRecord.get('gId');
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: '运单号',
readOnly: true,
name: 'BillNo'
}, {
fieldLabel: '主提单号',
readOnly: true,
name: 'MblNo'
}, {
fieldLabel: '车号',
readOnly: true,
name: 'TruckNo'
}, {
fieldLabel: '司机/车队',
readOnly: true,
name: 'DrvName'
},
{
fieldLabel: '装货地',
readOnly: true,
name: 'LoadPlace'
},
{
fieldLabel: '到达地',
readOnly: true,
name: 'DstArea'
}
]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '客户名称',
readOnly: true,
name: 'CustomerName'
}, {
fieldLabel: '客户联系人',
readOnly: true,
name: 'F_CustomerName'
}, {
fieldLabel: '件数',
name: 'ContainerQty'
}, {
fieldLabel: '重量',
name: 'Ton'
}, {
fieldLabel: '体积',
name: 'LoadCount'
}, {
xtype: 'hiddenfield'
}
]
}
]
}]
}); //end this.formEdit
this.formHead.getForm().loadRecord(EditRecord);
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 85,
id: "BillHeadPcA",
items: [this.formHead]
});
this.panelAmendFee = new Shipping.FeeAmendEditGrid({
region: 'center',
layout: 'border'
});
this.panelAmendFee.EditRecord = EditRecord;
this.panelAmendFee.stroplb = 'tMsWlPcHead';
this.panelAmendFee.strBSNO = EditRecord.get('gId');
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CustomerName" });
this.panelAmendFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "F_CustomerName" });
this.panelAmendFee.StoreDrOpRange.load({ params: { optype: "modOtherRecvFeeManagement" } });
this.panelAmendFee.StoreCrOpRange.load({ params: { optype: "modOtherRecvFeeManagement" } });
this.panelAmendFee.storeFeeNameRef.load({ params: { condition: "ISTRUCKING='1' " } });
this.panelAmendFee.StoreUnit.load({ params: { optype: "tMsWlPcHead",bsno: this.BSNO} });
this.panelAmendFee.StoreDateCurr.load({ params: { optype: "tMsWlPcHead", bsno: this.BSNO} });
this.panelAmendFee.storeAmendBill.load({
params: { billno: this.BSNO, optype: "tMsWlPcHead" },
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]
});
}
});