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.
364 lines
15 KiB
JavaScript
364 lines
15 KiB
JavaScript
Ext.namespace('Shipping');
|
|
|
|
Shipping.SeaeFee = function (config) {
|
|
Ext.applyIf(this, config);
|
|
this.initUIComponents();
|
|
window.Shipping.SeaeFee.superclass.constructor.call(this);
|
|
};
|
|
|
|
Ext.extend(Shipping.SeaeFee, 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_Seae';
|
|
|
|
var mainform = window.panelEdit;
|
|
// if (mainform == null || mainform == NaN) {
|
|
// var mainform = Ext.getCmp('OpSeaeFenEdit');
|
|
// }
|
|
if (mainform == undefined)
|
|
{
|
|
mainform = window.parent.panelEdit;
|
|
this.stroplb = 'op_SeaeOrder';
|
|
}
|
|
|
|
_thisSeaeFee = this;
|
|
if (mainform.salefee != undefined && mainform.salefee != NaN && mainform.salefee != null)
|
|
this.salefee = mainform.salefee;
|
|
|
|
|
|
this.storecodeservice = Ext.create('DsExt.ux.RefTableStore', {
|
|
model: 'MsCodeOpService',
|
|
proxy: { url: '/MvcShipping/MsCodeOpService/GetDataList' }
|
|
});
|
|
|
|
EditRecord = mainform.editRecord;
|
|
this.bsno = EditRecord.get('BSNO');
|
|
this.formHead = Ext.widget('form', {
|
|
frame: true,
|
|
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:'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.CNTRTOTAL3, //'箱型箱量',
|
|
readOnly: true,
|
|
name: 'CNTRTOTAL'
|
|
},
|
|
{
|
|
fieldLabel: Zi.LAN.PKGS, //'毛重',
|
|
flex: 0.5,
|
|
labelWidth: 40,
|
|
readOnly: true,
|
|
name: 'PKGS'
|
|
},
|
|
{
|
|
fieldLabel: Zi.LAN.KGS2, //'毛重',
|
|
flex: 0.5,
|
|
labelWidth: 40,
|
|
readOnly: true,
|
|
name: 'KGS'
|
|
},
|
|
{
|
|
fieldLabel: Zi.LAN.CBM2, //'毛重',
|
|
flex: 0.5,
|
|
labelWidth: 40,
|
|
readOnly: true,
|
|
name: 'CBM'
|
|
},
|
|
{
|
|
fieldLabel: Zi.LAN.INVNO, //'毛重',
|
|
flex: 0.5,
|
|
labelWidth: 45,
|
|
readOnly: true,
|
|
name: 'INVNO'
|
|
}
|
|
]
|
|
},
|
|
{ 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: 45,
|
|
flex: 0.5,
|
|
name: 'SALE'
|
|
},
|
|
{
|
|
fieldLabel: Zi.LAN.ETD, //'船名',
|
|
flex: 0.5,
|
|
readOnly: true,
|
|
name: 'ETD'
|
|
}, {
|
|
fieldLabel: Zi.LAN.BLFRT, //'付费方式',
|
|
readOnly: true,
|
|
flex: 0.5,
|
|
name: 'BLFRT'
|
|
}
|
|
]
|
|
},
|
|
{ xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [{
|
|
fieldLabel: Zi.LAN.HBLNO, //'分提单号',
|
|
flex: 0.8,
|
|
readOnly: true,
|
|
name: 'HBLNO'
|
|
}, {
|
|
fieldLabel: Zi.LAN.DESTINATION, //'目的地',
|
|
flex: 0.8,
|
|
readOnly: true,
|
|
name: 'DESTINATION'
|
|
}, {
|
|
fieldLabel: Zi.LAN.PORTLOAD, //'目的地',
|
|
flex: 0.8,
|
|
readOnly: true,
|
|
name: 'PORTLOAD'
|
|
}, {
|
|
fieldLabel: Zi.LAN.OPERATOR, //'目的地',
|
|
readOnly: true,
|
|
flex: 0.6,
|
|
name: 'OPERATOR'
|
|
}, {
|
|
fieldLabel: Zi.LAN.REMARK, //'备注',
|
|
readOnly: true,
|
|
flex: 1, 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",
|
|
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.strbltype = EditRecord.get('BLTYPE');
|
|
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": "CK-仓库", "CUSTTYPE": "仓库", "CUSTNAME": "WAREHOUSE" });
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "", "CUSTTYPE": "", "CUSTNAME": "" });
|
|
|
|
this.panelFee.StoreDrOpRange.load({ params: { optype: "modRecvFeeManagement"} });
|
|
this.panelFee.StoreCrOpRange.load({ params: { optype: "modPayFeeManagement"} });
|
|
this.panelFee.storeFeeNameRef.load({ params: { condition: "ISSEA='1' "} });
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "op_Seae", bsno: this.bsno} });
|
|
this.panelFee.StoreUnit.load({ params: { bsno: this.bsno, bstype: "op_Seae"} });
|
|
|
|
this.panelFee.storeDrChFee.load({
|
|
params: { billno: this.bsno, type: 1, optype: "op_Seae", SaleFee: this.salefee }
|
|
, callback: function (options, success, response) {
|
|
if (success) {
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
if (jsonresult.Success) {
|
|
} else {
|
|
Ext.Msg.show({ title: Zi.LAN.FEE.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
}
|
|
}
|
|
} });
|
|
this.panelFee.storeCrChFee.load({ params: { billno: this.bsno, type: 2, optype: "op_Seae", SaleFee: this.salefee } });
|
|
|
|
// this.panelFee.storeBodyList_GuDingFeeWeiHu.load({ params: { condition: "CUSTOMERNAME='" + EditRecord.get('CUSTOMERNAME') + "'" } });
|
|
this.panelFee.storeBodyList_GuDingFeeWeiHu.load();
|
|
|
|
|
|
this.panelFee.storeBodySum.load({ params: { bsno: this.bsno, optype: "op_Seae" },
|
|
callback: function (r, options, success) {
|
|
if (success) {
|
|
_thisSeaeFee.panelFee.setTotalHead();
|
|
}
|
|
}
|
|
});
|
|
this.panelFee.storeChFeeGain.load({ params: { bsno: this.bsno, optype: "op_Seae" } });
|
|
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} });
|
|
}
|
|
|
|
|
|
if (_thisSeaeFee.stroplb == 'op_SeaeOrder') {
|
|
Ext.Ajax.request({
|
|
waitMsg: '',
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
params: {
|
|
modulename: "modSaleOrderNoSubmitOpFEE"
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
if (result.Success == true) {
|
|
Ext.getCmp('btnFeeAuditDr').hide();
|
|
Ext.getCmp('btnFeeAuditCr').hide();
|
|
} else {
|
|
}
|
|
} else {
|
|
|
|
}
|
|
},
|
|
scope: this
|
|
});
|
|
|
|
var OP = this.formHead.getForm().findField('OP').getValue();
|
|
Ext.Ajax.request({
|
|
waitMsg: '',
|
|
url: '/MvcShipping/MsSeaeOrder/GetDeptName',
|
|
params: {
|
|
op: OP
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
if (result.Success == true) {
|
|
this.panelFee.DEFORDERCUST = result.Data;
|
|
} else {
|
|
}
|
|
} else {
|
|
|
|
}
|
|
},
|
|
scope: this
|
|
});
|
|
|
|
}
|
|
|
|
|
|
function getModifyStatus() {
|
|
return this.panelFee.getModifyStatus();
|
|
}
|
|
function loadUnit() {
|
|
return this.panelFee.loadUnit();
|
|
}
|
|
Ext.apply(this, {
|
|
items: [this.panelTop, this.panelFee]
|
|
});
|
|
}
|
|
});
|
|
|