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.
241 lines
8.5 KiB
JavaScript
241 lines
8.5 KiB
JavaScript
Ext.namespace('Shipping');
|
|
|
|
Shipping.ApplyFee = function (config) {
|
|
Ext.applyIf(this, config);
|
|
this.initUIComponents();
|
|
window.Shipping.ApplyFee.superclass.constructor.call(this);
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.ApplyFee, Ext.Panel, {
|
|
ParentWin: null,
|
|
OpStatus: 'add',
|
|
StoreList: null,
|
|
EditRecord: null,
|
|
region: 'north',
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
//枚举参照相关
|
|
//编辑form
|
|
// var condition = " BsNo='" + getUrlParam('id') + "'";
|
|
|
|
// this.bsno = getUrlParam('id');
|
|
|
|
//按钮Toolbar
|
|
// var mainform = Ext.getCmp('OpApplyEdit');
|
|
var mainform = window.panelEdit;
|
|
|
|
EditRecord = mainform.editRecord;
|
|
this.bsno = EditRecord.get('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: 90,
|
|
msgTarget: 'qtip'
|
|
},
|
|
|
|
items: [
|
|
{//fieldset 1
|
|
xtype: 'fieldset',
|
|
defaultType: 'textfield',
|
|
layout: 'anchor',
|
|
defaults: {
|
|
anchor: '100%'
|
|
},
|
|
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,
|
|
xtype: 'monthfield',
|
|
name: 'ACCDATE'
|
|
}, {
|
|
fieldLabel: '委托单位',
|
|
readOnly: true,
|
|
name: 'CUSTOMERNAME'
|
|
}
|
|
]
|
|
}, {
|
|
xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [ {
|
|
fieldLabel: '业务来源',
|
|
readOnly: true,
|
|
name: 'BSSOURCE'
|
|
}, {
|
|
fieldLabel: '来源明细',
|
|
readOnly: true,
|
|
name: 'BSSOURCEDETAIL'
|
|
}, {
|
|
fieldLabel: '揽货人',
|
|
readOnly: true,
|
|
name: 'SALE'
|
|
}, {
|
|
fieldLabel: '件数',
|
|
readOnly: true,
|
|
name: 'PKGS'
|
|
}, {
|
|
fieldLabel: '毛重',
|
|
readOnly: true,
|
|
name: 'KGS'
|
|
}
|
|
]
|
|
}, {
|
|
xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [{
|
|
fieldLabel: '操 作',
|
|
readOnly: true,
|
|
name: 'OP'
|
|
}, {
|
|
fieldLabel: '报关项数',
|
|
readOnly: true,
|
|
name: 'CUSTOMSNUM'
|
|
}, {
|
|
fieldLabel: '运输类型',
|
|
readOnly: true,
|
|
name: 'BSTYPEREF'
|
|
}, {
|
|
fieldLabel: '主提单号',
|
|
readOnly: true,
|
|
name: 'MBLNO'
|
|
}, {
|
|
fieldLabel: '报关单号',
|
|
readOnly: true,
|
|
name: 'CUSTOMNO'
|
|
}
|
|
]
|
|
}
|
|
]//end items(fieldset 1)
|
|
}//end fieldset 1
|
|
]//end root items
|
|
}); //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: '服务项目',
|
|
readOnly: true,
|
|
columns: 6,
|
|
items: eval(checkboxitems)
|
|
});
|
|
this.formHead.add(this.myCheckboxGroup);
|
|
this.formHead.doLayout();
|
|
}
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
layout: "border",
|
|
region: "north",
|
|
height: 140,
|
|
id: "BillHeadApply",
|
|
items: [this.formHead]
|
|
});
|
|
this.formHead.getForm().loadRecord(EditRecord);
|
|
|
|
|
|
this.panelFee = new Shipping.FeeEditGrid({
|
|
region: 'center',
|
|
layout: 'border'
|
|
});
|
|
|
|
this.panelFee.EditRecord = EditRecord;
|
|
this.panelFee.stroplb = 'op_Apply';
|
|
this.panelFee.strBSNO = EditRecord.get('BSNO');
|
|
this.panelFee.strMBLNO = EditRecord.get('CUSTOMNO');
|
|
|
|
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": "BYCUSTOM" });
|
|
|
|
|
|
this.panelFee.StoreDrOpRange.load({ params: { optype: "modApplyRecvFeeManagement"} });
|
|
this.panelFee.StoreCrOpRange.load({ params: { optype: "modApplyPayFeeManagement"} });
|
|
this.panelFee.StoreUnit.load({ params: { bsno: this.bsno, bstype: "apply"} });
|
|
|
|
this.panelFee.storeFeeNameRef.load({ params: { condition: ""} });
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "op_Apply", bsno: this.bsno} });
|
|
|
|
this.panelFee.storeDrChFee.load({ params: { billno: this.bsno, type: 1, optype: "op_Apply"} });
|
|
this.panelFee.storeCrChFee.load({ params: { billno: this.bsno, type: 2, optype: "op_Apply"} });
|
|
|
|
this.panelFee.storeBodySum.load({ params: { bsno: this.bsno, optype: "op_Apply" },
|
|
callback: function (r, options, success) {
|
|
if (success) {
|
|
_thisfee.setTotalHead();
|
|
}
|
|
}
|
|
});
|
|
this.panelFee.storeChFeeGain.load({ params: { bsno: this.bsno, optype: "op_Apply"} });
|
|
this.panelFee.storeBodyList_GuDingFeeWeiHu.load();
|
|
// this.panelFee.storeChFeeGain.load({ params: { bsno: this.bsno },
|
|
// 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]
|
|
});
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|