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/MsOpTruckBulk/OtherFeeView.js

179 lines
5.9 KiB
JavaScript

3 years ago
Ext.namespace('Shipping');
Shipping.OtherFeeView = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.OtherFeeView.superclass.constructor.call(this);
};
Ext.extend(Shipping.OtherFeeView, Ext.Panel, {
ParentWin: null,
OpStatus: 'add',
StoreList: null,
EditRecord: null,
region: 'north',
initUIComponents: function () {
this.BSNO = getUrlParam('bsno');
this.formHead = Ext.widget('form', {
id: 'FeeHead',
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"),
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '委托单位',
readOnly: true,
name: 'CUSTOMERNAME'
}, {
fieldLabel: '业务来源',
readOnly: true,
name: 'BSSOURCE'
}, {
fieldLabel: '贸易条款',
3 years ago
readOnly: true,
name: 'BSSOURCEDETAIL'
}, {
fieldLabel: '揽货人',
readOnly: true,
name: 'SALE'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '操 作',
readOnly: true,
name: 'OP'
}, {
fieldLabel: '运输类型',
readOnly: true,
name: 'TRANSTYPE'
}, {
fieldLabel: '主提单号',
readOnly: true,
name: 'MBLNO'
}, {
fieldLabel: '合同号',
readOnly: true,
name: 'CONTRACTNO'
}]
}]//end items(fieldset 1)
}); //end this.formEdit
//按钮Toolbar
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 100,
id: "BillHead",
items: [this.formHead]
});
this.panelFee = new Shipping.FeeViewGrid({
region: 'center',
layout: 'border'
});
this.panelFee.stroplb = 'op_other';
this.panelFee.strBSNO = this.BSNO;
this.panelFee.StoreDrOpRange.load({ params: { optype: "modOtherRecvFeeManagement"} });
this.panelFee.StoreCrOpRange.load({ params: { optype: "modOtherPayFeeManagement"} });
this.panelFee.storeDrChFee.load({ params: { billno: this.BSNO, type: 1, optype: "op_other"} });
this.panelFee.storeCrChFee.load({ params: { billno: this.BSNO, type: 2, optype: "op_other"} });
this.panelFee.storeChFeeGain.load({ params: { BSNO: this.BSNO, optype: "op_other" },
callback: function (r, options, success) {
if (success) {
this.panelFee.formtotal.getForm().loadRecord(this.panelFee.storeChFeeGain.getAt(0));
}
},
scope: this
});
Ext.apply(this, {
items: [this.panelTop, this.panelFee]
});
this.InitData();
}, //end initUIComponents
//#region 加载数据
InitData: function () {
var condition = " BSNO='" + this.BSNO + "'";
this.LoadData(condition, this.BSNO);
}, //end InitData
LoadData: function (condition, refbillno) {
_this = this;
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
url: '/MvcShipping/MsOpOther/GetData',
params: {
handle: 'edit',
condition: condition
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
}
data = result.data;
this.formHead.getForm().reset();
this.formHead.getForm().setValues(data);
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
});