|
|
|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
|
|
|
|
Shipping.PiliangOtherFee = function (config) {
|
|
|
|
|
Ext.applyIf(this, config);
|
|
|
|
|
this.initUIComponents();
|
|
|
|
|
window.Shipping.PiliangOtherFee.superclass.constructor.call(this);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ext.extend(Shipping.PiliangOtherFee, Ext.Panel, {
|
|
|
|
|
ParentWin: null,
|
|
|
|
|
OpStatus: 'add',
|
|
|
|
|
StoreList: null,
|
|
|
|
|
EditRecord: null,
|
|
|
|
|
region: 'north',
|
|
|
|
|
BsNo: '',
|
|
|
|
|
feeType:null,
|
|
|
|
|
StoreFee: null,
|
|
|
|
|
StoreFeeUnit: null,
|
|
|
|
|
StoreFeeCust:null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formHead = Ext.widget('form', {
|
|
|
|
|
id: 'FeeHeadOther',
|
|
|
|
|
region: 'center',
|
|
|
|
|
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: 'CUSTNO'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '业务锁定',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'BSSTATUSREF'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '费用锁定',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'FEESTATUSREF'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '会计期间',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'ACCDATE'
|
|
|
|
|
//xtype: 'monthfield',
|
|
|
|
|
//value: Ext.util.Format.date(Ext.Date.add(new Date(), Ext.Date.MONTH - 1, 1), "Y-m"),
|
|
|
|
|
}, {
|
|
|
|
|
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: 'OP'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '运输类型',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'TRANSTYPE'
|
|
|
|
|
}]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [ {
|
|
|
|
|
fieldLabel: '主提单号',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'MBLNO'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '合同号',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'CONTRACTNO'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '件数',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'PKGS'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '毛量',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'KGS'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '尺码',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
name: 'CBM'
|
|
|
|
|
}]
|
|
|
|
|
}]//end items(fieldset 1)
|
|
|
|
|
}); //end this.formEdit
|
|
|
|
|
|
|
|
|
|
//#region 按钮Toolbar
|
|
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
|
|
region: "north",
|
|
|
|
|
tbar: [{
|
|
|
|
|
id: 'btnEPrev',
|
|
|
|
|
text: "上一票",
|
|
|
|
|
// iconCls: "btnsave",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.PrevRecord();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, {
|
|
|
|
|
id: 'btnENext',
|
|
|
|
|
text: "下一票",
|
|
|
|
|
// iconCls: "btnsave",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.NextRecord();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}]
|
|
|
|
|
}); //end 按钮Toolbar
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: "north",
|
|
|
|
|
height: 130,
|
|
|
|
|
id: "BillHeadOther",
|
|
|
|
|
items: [this.panelBtn, this.formHead]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelFee = new Shipping.FeeEditGrid({
|
|
|
|
|
region: 'center',
|
|
|
|
|
layout: 'border'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.panelFee.stroplb = 'op_other';
|
|
|
|
|
|
|
|
|
|
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: "modOtherRecvFeeManagement"} });
|
|
|
|
|
this.panelFee.StoreCrOpRange.load({ params: { optype: "modOtherPayFeeManagement"} });
|
|
|
|
|
|
|
|
|
|
this.panelFee.storeFeeNameRef.load({ params: { condition: ""} });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
|
|
items: [this.panelTop, this.panelFee]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
parentWin = window.parent.opener;
|
|
|
|
|
this.InitData();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region 加载事件
|
|
|
|
|
InitData: function () {
|
|
|
|
|
this.opStatus = 'add';
|
|
|
|
|
var condition = '';
|
|
|
|
|
_this = this;
|
|
|
|
|
if (parentWin) {
|
|
|
|
|
var ret = parentWin.OprationSwap();
|
|
|
|
|
this.opStatus = ret[0];
|
|
|
|
|
this.StoreList = ret[1];
|
|
|
|
|
this.EditRecord = ret[2];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.BsNo = this.EditRecord.get('BSNO');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.LoadData();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, //end InitData
|
|
|
|
|
|
|
|
|
|
LoadData: function () {
|
|
|
|
|
this.formHead.getForm().loadRecord(this.EditRecord);
|
|
|
|
|
this.panelFee.EditRecord = this.EditRecord;
|
|
|
|
|
this.panelFee.strBSNO = this.BsNo;
|
|
|
|
|
this.panelFee.strPBSNO = this.BsNo;
|
|
|
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "op_other", bsno: this.BsNo} });
|
|
|
|
|
this.panelFee.StoreUnit.load({ params: { bsno: this.BsNo, bstype: "op_other"} });
|
|
|
|
|
|
|
|
|
|
this.panelFee.storeDrChFee.load({ params: { billno: this.BsNo, type: 1, optype: "op_other"} });
|
|
|
|
|
this.panelFee.storeCrChFee.load({ params: { billno: this.BsNo, type: 2, optype: "op_other"} });
|
|
|
|
|
|
|
|
|
|
this.panelFee.storeBodySum.load({ params: { bsno: this.BsNo} });
|
|
|
|
|
this.panelFee.storeChFeeGain.load({ params: { bsno: this.BsNo} });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, // end LoadDate
|
|
|
|
|
//#region 打印
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
|
|
|
|
var basicForm = this.formHead.getForm();
|
|
|
|
|
var billNo = basicForm.findField('BSNO').value;
|
|
|
|
|
if (billNo == '*' || billNo == '') {
|
|
|
|
|
Ext.Msg.show({ title: '错误', msg: '单据还没有保存,请保存后再打印', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var printType = 'MSOPSEAE';
|
|
|
|
|
var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM op_seae WHERE BSNO = '" + billNo + "'";
|
|
|
|
|
var sql2 = "";
|
|
|
|
|
var sql3 = "";
|
|
|
|
|
var sql4 = "";
|
|
|
|
|
var sql5 = "";
|
|
|
|
|
var sql6 = "";
|
|
|
|
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
PrevRecord: function () {
|
|
|
|
|
var j = this.StoreList.indexOf(this.EditRecord);
|
|
|
|
|
if (j == 0) {
|
|
|
|
|
Ext.Msg.show({ title: '警告', msg: '已是最前一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (j == this.StoreList.count) {
|
|
|
|
|
Ext.Msg.show({ title: '警告', msg: '已是最后一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
j = j - 1;
|
|
|
|
|
this.EditRecord = this.StoreList.getAt(j);
|
|
|
|
|
this.BsNo = this.EditRecord.get('BSNO');
|
|
|
|
|
this.LoadData();
|
|
|
|
|
},
|
|
|
|
|
NextRecord: function () {
|
|
|
|
|
var j = this.StoreList.indexOf(this.EditRecord);
|
|
|
|
|
|
|
|
|
|
if (j == (this.StoreList.count - 1)) {
|
|
|
|
|
Ext.Msg.show({ title: '警告', msg: '已是最后一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
j = j + 1;
|
|
|
|
|
this.EditRecord = this.StoreList.getAt(j);
|
|
|
|
|
this.BsNo = this.EditRecord.get('BSNO');
|
|
|
|
|
this.LoadData();
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getModifyStatus: function () {
|
|
|
|
|
return this.panelFee.getModifyStatus();
|
|
|
|
|
},
|
|
|
|
|
feeType: function () {
|
|
|
|
|
return this.panelFee.feeType;
|
|
|
|
|
},
|
|
|
|
|
StoreFee: function () {
|
|
|
|
|
return this.panelFee.StoreFee;
|
|
|
|
|
},
|
|
|
|
|
StoreFeeUnit: function () {
|
|
|
|
|
return this.panelFee.StoreFeeUnit;
|
|
|
|
|
},
|
|
|
|
|
StoreFeeCust: function () {
|
|
|
|
|
return this.panelFee.StoreFeeCust;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|