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/MvcShipping/Viewsjs/MsOpSeai/SeaiFeeView.js

180 lines
5.9 KiB
JavaScript

2 years ago
Ext.namespace('Shipping');
Shipping.SeaiFeeView = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.SeaiFeeView.superclass.constructor.call(this);
};
Ext.extend(Shipping.SeaiFeeView, 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: 'MBLNO'
}, {
fieldLabel: '委托编号',
readOnly: true,
name: 'CUSTNO'
}, {
fieldLabel: '委托单位',
readOnly: true,
name: 'CUSTOMERNAME'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '会计期间',
readOnly: true,
name: 'ACCDATE'
}, {
fieldLabel: '业务来源',
readOnly: true,
name: 'BSSOURCE'
}, {
fieldLabel: '揽货人',
readOnly: true,
name: 'SALE'
}, {
fieldLabel: '操 作',
readOnly: true,
name: 'OP'
}, {
fieldLabel: '贸易方式',
readOnly: true,
name: 'TRADETYPE'
}, {
fieldLabel: '费用锁定',
readOnly: true,
name: 'FEESTATUSREF'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '卸货港',
readOnly: true,
name: 'PORTDISCHARGE'
}, {
fieldLabel: '品名',
readOnly: true,
name: 'GOODSNAME'
}, {
fieldLabel: '净重',
readOnly: true,
name: 'NETWEIGHT'
}, {
fieldLabel: '箱型箱量',
readOnly: true,
name: 'CNTRTOTAL'
}]
}]//end items(fieldset 1)
}); //end this.formEdit
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_Seai';
this.panelFee.strBSNO = this.BSNO;
this.panelFee.StoreDrOpRange.load({ params: { optype: "modSeaiRecvFeeManagement"} });
this.panelFee.StoreCrOpRange.load({ params: { optype: "modSeaiPayFeeManagement"} });
this.panelFee.storeDrChFee.load({ params: { billno: this.BSNO, type: 1, optype: "op_Seai"} });
this.panelFee.storeCrChFee.load({ params: { billno: this.BSNO, type: 2, optype: "op_Seai"} });
this.panelFee.storeBodySum.load({ params: { bsno: this.BSNO, optype: "op_Seai" },
callback: function (r, options, success) {
if (success) {
_thisfee.setTotalHead();
}
}
});
this.panelFee.storeChFeeGain.load({ params: { bsno: this.BSNO, optype: "op_Seai"} });
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/MsOpSeai/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
});
}
});