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/SeaiFee.js

206 lines
8.7 KiB
JavaScript

3 years ago
Ext.namespace('Shipping');
Shipping.SeaiFee = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.SeaiFee.superclass.constructor.call(this);
};
Ext.extend(Shipping.SeaiFee, Ext.Panel, {
ParentWin: null,
OpStatus: 'add',
StoreList: null,
EditRecord: null,
region: 'north',
initUIComponents: function () {
//按钮Toolbar
//var mainform = Ext.getCmp('MsOpSeaiEdit');
var mainform = window.parent._this; // Ext.getCmp('OpOtherEdit');
EditRecord = mainform.editRecord;
this.BSNO = EditRecord.get('BSNO');
this.formHead = Ext.widget('form', {
id: 'FeeHead',
region: 'center',
frame: true,
//bodyPadding: 5,
trackResetOnLoad: true,
fieldDefaults: {
margins: '1 1 1 1',
labelAlign: 'right',
flex: 1,
labelWidth: 60,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.BSNO2, //'业务编号',
name: 'BSNO', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: Zi.LAN.MBLNO, //'主提单号',
readOnly: true,
name: 'MBLNO'
}, {
fieldLabel: Zi.LAN.CUSTNO, //'委托编号',
readOnly: true,
name: 'CUSTNO'
}, {
fieldLabel: Zi.LAN.CUSTOMERNAME, //'委托单位',
readOnly: true,
name: 'CUSTOMERNAME'
}, {
fieldLabel: Zi.LAN.ACCDATE, //'会计期间',
readOnly: true,
name: 'ACCDATE'
}, {
fieldLabel: Zi.LAN.SALE, //'揽货人',
readOnly: true,
flex: 0.5,
name: 'SALE'
}, {
fieldLabel: Zi.LAN.OP, //'操 作',
readOnly: true,
flex: 0.5,
name: 'OP'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [ {
fieldLabel: Zi.LAN.HBLNO, //'分提单号',
readOnly: true,
name: 'HBLNO'
}, {
fieldLabel: Zi.LAN.BSSOURCE, //'业务来源',
readOnly: true,
name: 'BSSOURCE'
}, {
fieldLabel: Zi.LAN.PORTDISCHARGE, //'卸货港',
readOnly: true,
name: 'PORTDISCHARGE'
}, {
fieldLabel: Zi.LAN.GOODSNAME, //'品名',
readOnly: true,
name: 'GOODSNAME'
}, {
fieldLabel: Zi.LAN.TRADETYPE, //'贸易方式',
readOnly: true,
flex: 0.5,
name: 'TRADETYPE'
}, {
fieldLabel: Zi.LAN.FEESTATUSREF, //'费用锁定',
readOnly: true,
flex: 0.5,
name: 'FEESTATUSREF'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.CNTRTOTAL3, //'箱型箱量',
readOnly: true,
name: 'CNTRTOTAL'
}, {
fieldLabel: Zi.LAN.PKGS, //'件数',
labelWidth: 40, readOnly: true,
flex: 0.5, name: 'PKGS'
}, {
fieldLabel: Zi.LAN.KGS2, //'毛重',
readOnly: true,
labelWidth: 40, flex: 0.5, name: 'KGS'
}, {
fieldLabel: Zi.LAN.NETWEIGHT, //'净重',
labelWidth: 40, readOnly: true,
flex: 0.5, name: 'NETWEIGHT'
}, {
fieldLabel: Zi.LAN.CBM2, //'尺码',
labelWidth: 40, readOnly: true,
flex: 0.5, name: 'CBM'
}, {
fieldLabel: Zi.LAN.REMARK, //'备注',
readOnly: true,
flex: 2, name: 'REMARK'
}]
}]//end items(fieldset 1)
}); //end this.formEdit
this.formHead.getForm().loadRecord(EditRecord);
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 110,
id: "BillHeadSeai",
items: [this.formHead]
});
this.panelFee = new Shipping.FeeEditGrid({
region: 'center',
layout: 'border'
});
this.panelFee.EditRecord = EditRecord;
this.panelFee.stroplb = 'op_Seai';
this.panelFee.strBSNO = EditRecord.get('BSNO');
this.panelFee.strMBLNO = EditRecord.get('MBLNO');
this.panelFee.strbltype = EditRecord.get('BLTYPE');
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "BGH-报关行", "CUSTTYPE": "报关行", "CUSTNAME": "CUSTOMSER" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "HG-海关", "CUSTTYPE": "海关", "CUSTNAME": "BYCUSTOM" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DCDL-订舱代理", "CUSTTYPE": "订舱代理", "CUSTNAME": "FORWARDER" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DL-代理", "CUSTTYPE": "代理", "CUSTNAME": "AGENTID" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CZ-场站", "CUSTTYPE": "场站", "CUSTNAME": "YARD" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CGS-船公司", "CUSTTYPE": "船公司", "CUSTNAME": "CARRIER" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKER" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CDD-船代", "CUSTTYPE": "船代", "CUSTNAME": "SHIPAGENCY" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "BXGS-保险公司", "CUSTTYPE": "保险公司", "CUSTNAME": "" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "BJGS-报检公司", "CUSTTYPE": "报检公司", "CUSTNAME": "INSPECTION" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "QT-其他", "CUSTTYPE": "其他", "CUSTNAME": "" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "", "CUSTTYPE": "", "CUSTNAME": "" });
this.panelFee.StoreDrOpRange.load({ params: { optype: "modSeaiRecvFeeManagement"} });
this.panelFee.StoreCrOpRange.load({ params: { optype: "modSeaiPayFeeManagement"} });
this.panelFee.StoreUnit.load({ params: { bsno: this.BSNO, bstype: "op_Seai"} });
this.panelFee.storeFeeNameRef.load({ params: { condition: ""} });
this.panelFee.StoreDateCurr.load({ params: { optype: "op_Seai", bsno: this.BSNO} });
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.storeBodyList_GuDingFeeWeiHu.load({ params: { condition: "CUSTOMERNAME='" + EditRecord.get('CUSTOMERNAME') + "'" } });
this.panelFee.storeBodyList_GuDingFeeWeiHu.load();
this.panelFee.storeChFeeGain.load({ params: { bsno: this.BSNO, optype: "op_Seai" } });
if (this.panelFee.strbltype == '拼箱主票' || this.panelFee.strbltype == '合票主票' || this.panelFee.strbltype == '主票') {
this.panelFee.tabTotal.add(this.panelFee.panelCustMaster);
this.panelFee.storeChFeeMasterGain.load({ params: { bsno: this.BSNO } });
}
function getModifyStatus() {
return this.panelFee.getModifyStatus();
}
function loadUnit() {
return this.panelFee.loadUnit();
}
Ext.apply(this, {
items: [this.panelTop, this.panelFee]
});
}
});