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/MsOp_InternalTrade/Fee.js

267 lines
11 KiB
JavaScript

Ext.namespace('Shipping');
Shipping.Fee = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.Fee.superclass.constructor.call(this);
};
Ext.extend(Shipping.Fee, Ext.Panel, {
ParentWin: null,
OpStatus: 'add',
StoreList: null,
EditRecord: null,
region: 'north',
salefee: '',
initUIComponents: function () {
//按钮Toolbar
// var mainform = Ext.getCmp('OpSeaeEdit');
// var mainform = window.window._this;
this.stroplb = 'Op_InternalTrade';
var mainform = window.parent.panelEdit;
EditRecord = mainform.editRecord;
this.salefee = '';
_thisSeaeFee = this;
this.storecodeservice = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsCodeOpService',
proxy: { url: '/MvcShipping/MsCodeOpService/GetDataList' }
});
this.bsno = EditRecord.get('BSNO');
this.formHead = Ext.widget('form', {
frame: true, //内贸海运 不使用formhead
region: "center", bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 60,
msgTarget: 'qtip'
},
items: [
{
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [
{ xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.PKGS, //'件数',
name: 'PKGS', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: Zi.LAN.CBM2, //'尺码',
name: 'CBM', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel:'OP', //'尺码',
name: 'OP', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: Zi.LAN.CUSTNO, //'委托编号',
readOnly: true,
name: 'CUSTNO'
}, {
fieldLabel: Zi.LAN.MBLNO, //'主提单号',
readOnly: true,
name: 'MBLNO'
},
{
fieldLabel: Zi.LAN.CARRIER, //'箱型箱量',
readOnly: true,
name: 'CARRIER'
},
{
fieldLabel: '发货编号',
//flex: 0.5,
//labelWidth: 40,
readOnly: true,
name: 'TRANSNO'
}, {
fieldLabel: '操作',
readOnly: true,
name: 'OPERATOR'
}
]
},
{ xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.CUSTOMERNAME, //'委托单位',
readOnly: true,
name: 'CUSTOMERNAME'
},
{
fieldLabel: Zi.LAN.PORTDISCHARGE, //'卸货港',
readOnly: true,
name: 'PORTDISCHARGE'
},
{
fieldLabel: Zi.LAN.VESSEL, //'船名',
readOnly: true,
name: 'VESSEL'
}, {
fieldLabel: Zi.LAN.VOYNO, //'航次',
readOnly: true,
//labelWidth: 40,
flex: 0.5,
name: 'VOYNO'
}, {
fieldLabel: Zi.LAN.SALE, //'揽货人',
readOnly: true,
labelWidth: 43,
flex: 0.5,
name: 'SALE'
},
{
fieldLabel: Zi.LAN.ETD, //'船名',
readOnly: true,
name: 'ETD'
}
]
},
{ xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.HBLNO, //'分提单号',
readOnly: true,
name: 'HBLNO'
}, {
fieldLabel: Zi.LAN.DESTINATION, //'目的地',
readOnly: true,
name: 'DESTINATION'
}, {
fieldLabel: "起运港", //'目的地',
readOnly: true,
name: 'PORTLOAD'
}, {
fieldLabel: Zi.LAN.REMARK, //'备注',
readOnly: true,
flex: 2.02, name: 'REMARK'
}
]
}
]
}]
}); //end this.formEdit
var myGroup = Ext.getCmp('myGroup');
if (myGroup != NaN && myGroup != null) {
var children = myGroup.items;
var checkboxitems = "";
checkboxitems = "[";
for (var i = 0, len = children.length; i < len; i++) {
if (i == 0) {
var checkboxSingleItem = "{boxLabel:'" + children.items[i].boxLabel + "',inputValue:'1',name:'" + children.items[i].name + "'";
checkboxSingleItem += "}";
} else {
var checkboxSingleItem = ",{boxLabel:'" + children.items[i].boxLabel + "',inputValue:'1',name:'" + children.items[i].name + "'";
checkboxSingleItem += "}";
}
checkboxitems += checkboxSingleItem;
};
checkboxitems += "]";
this.myCheckboxGroup = new Ext.form.CheckboxGroup({
id: 'myFeeGroup',
xtype: 'checkboxgroup',
fieldLabel: Zi.LAN.myService, //'服务项目',
readOnly: true,
columns: 8,
items: eval(checkboxitems)
});
this.formHead.add(this.myCheckboxGroup);
this.formHead.doLayout();
}
this.formHead.getForm().loadRecord(EditRecord);
this.panelTop = new Ext.Panel({
layout: "border",//hidden:true,
region: "north",
// collapsed: false,
// collapsible: true,
height: 145,
id: "BillHeadSeae",
items: [this.formHead]
});
this.panelFee = new Shipping.FeeEditGrid({
region: 'center',
layout: 'border'
});
this.panelFee.EditRecord = EditRecord;
this.panelFee.stroplb = this.stroplb;
this.panelFee.strBSNO = EditRecord.get('BSNO');
this.panelFee.strMBLNO = EditRecord.get('MBLNO');
this.panelFee.salefee = this.salefee;
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CGS-船公司", "CUSTTYPE": "船公司", "CUSTNAME": "CARRIER" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DCDL-订舱代理", "CUSTTYPE": "订舱代理", "CUSTNAME": "FORWARDER" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "BGH-报关行", "CUSTTYPE": "报关行", "CUSTNAME": "CUSTOMSER" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKER" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "FHR-发货人", "CUSTTYPE": "发货人", "CUSTNAME": "SHIPPERID" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "SHR-收货人", "CUSTTYPE": "收货人", "CUSTNAME": "CONSIGNEEID" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "TZR-通知人", "CUSTTYPE": "通知人", "CUSTNAME": "NOTIFYPARTYID" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DL-代理", "CUSTTYPE": "代理", "CUSTNAME": "AGENTID" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CZ-场站", "CUSTTYPE": "场站", "CUSTNAME": "YARD" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CDD-船代", "CUSTTYPE": "船代", "CUSTNAME": "SHIPAGENCY" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "BXGS-保险公司", "CUSTTYPE": "保险公司", "CUSTNAME": "" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "QT-其他", "CUSTTYPE": "其他", "CUSTNAME": "" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "", "CUSTTYPE": "", "CUSTNAME": "" });
this.panelFee.StoreDrOpRange.load({ params: { optype: "modOp_InternalTradeRecvFeeManagement"} });
this.panelFee.StoreCrOpRange.load({ params: { optype: "modOp_InternalTradePayFeeManagement"} });
this.panelFee.storeFeeNameRef.load({ params: { condition: " ISSEA='1' "} });
this.panelFee.StoreDateCurr.load({ params: { optype: "Op_InternalTrade", bsno: this.bsno} });
this.panelFee.StoreUnit.load({ params: { bsno: this.bsno, bstype: "Op_InternalTrade"} });
this.panelFee.storeDrChFee.load({ params: { billno: this.bsno, type: 1, optype: "Op_InternalTrade", SaleFee: this.salefee} });
this.panelFee.storeCrChFee.load({ params: { billno: this.bsno, type: 2, optype: "Op_InternalTrade", SaleFee: this.salefee } });
this.panelFee.storeBodyList_GuDingFeeWeiHu.load({ params: { condition: "CUSTOMERNAME='" + EditRecord.get('CUSTOMERNAME') + "'" } });
this.panelFee.storeBodySum.load({
params: { bsno: this.bsno, optype: "Op_InternalTrade" },
callback: function (r, options, success) {
if (success) {
_thisSeaeFee.panelFee.setTotalHead();
}
}
});
this.panelFee.storeChFeeGain.load({ params: { bsno: this.bsno, optype: "Op_InternalTrade" } });
function getModifyStatus() {
return this.panelFee.getModifyStatus();
}
function loadUnit() {
return this.panelFee.loadUnit();
}
Ext.apply(this, {
items: [this.panelTop, this.panelFee]
});
}
});