|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.SeaiAmendFeeEdit = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.SeaiAmendFeeEdit.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.SeaiAmendFeeEdit, Ext.Panel, {
|
|
|
ParentWin: null,
|
|
|
OpStatus: 'add',
|
|
|
StoreList: null,
|
|
|
EditRecord: null,
|
|
|
region: 'north',
|
|
|
BsNo: '',
|
|
|
feeType: null,
|
|
|
StoreFee: null,
|
|
|
StoreFeeUnit: null,
|
|
|
StoreFeeCust: null,
|
|
|
sqlcontext: '',
|
|
|
PageSize: 50,
|
|
|
MsPeriod: null,
|
|
|
initUIComponents: function () {
|
|
|
|
|
|
this.formname = "MsSeaiAmendFeeEdit"; //页面名称
|
|
|
this.MsPeriod = null;
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
this.AmendBsno = getUrlParam('AmendBsno');
|
|
|
this.TastNo = getUrlParam('TastNo');
|
|
|
this.AmendNo = getUrlParam('AmendNo');
|
|
|
|
|
|
//#region 编辑formHead 基本信息
|
|
|
this.formHead = Ext.widget('form', {
|
|
|
region: 'north',
|
|
|
frame: true,
|
|
|
bodyPadding: 5,
|
|
|
trackResetOnLoad: true,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 70,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.BSNO2, //'业务编号',
|
|
|
name: 'BSNO', hidden: true
|
|
|
}, {
|
|
|
fieldLabel: 'GID', //'业务编号',
|
|
|
name: 'GID', hidden: true
|
|
|
}, {
|
|
|
fieldLabel: 'PARENTID', //'业务编号',
|
|
|
name: 'PARENTID', hidden: true
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.AMENDNO, //'订舱编号',
|
|
|
readOnly: true,
|
|
|
name: 'AMENDNO'
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.ACCDATE, //'会计期间',
|
|
|
xtype: 'monthfield',
|
|
|
allowBlank: true,
|
|
|
name: 'ACCDATE'
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.FEESTATUSREF, //'费用锁定',
|
|
|
readOnly: true,
|
|
|
disabled: true,
|
|
|
name: 'FEESTATUSREF'
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.AMENDCREATEUSER, //'CREATETIME',
|
|
|
readOnly: true,
|
|
|
name: 'CREATEUSER'
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.AMENDCREATETIME, //'CREATETIME',
|
|
|
readOnly: true,
|
|
|
name: 'CREATETIME'
|
|
|
}, {
|
|
|
fieldLabel: '更改次数', //'CREATETIME',
|
|
|
readOnly: true,
|
|
|
name: 'SLNO'
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.AMENDREASON, //'订舱编号',
|
|
|
flex: 3, name: 'REASON'
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.REMARK, //'主提单号',
|
|
|
flex: 2,
|
|
|
name: 'REMARKS'
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
|
|
|
|
|
|
}); //end this.formEdit
|
|
|
//#endregion
|
|
|
|
|
|
this.formEdit = Ext.widget('form', {
|
|
|
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
|
|
|
|
|
|
//#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
|
|
|
}, '-', {
|
|
|
id: 'btnESave',
|
|
|
text: Zi.LAN.SaveGridPanel, //"保存",
|
|
|
iconCls: "btnsave",
|
|
|
handler: function (button, event) {
|
|
|
this.Save('0');
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
{
|
|
|
id: 'btnESaveAndClose',
|
|
|
text: Zi.LAN.btnESaveAndClose, //"保存并关闭",
|
|
|
handler: function (button, event) {
|
|
|
this.Save('1');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: Zi.LAN.btnadd, //"新建",
|
|
|
handler: function (button, event) {
|
|
|
this.formEdit.getForm().reset();
|
|
|
this.formEdit.getForm().setValues('');
|
|
|
this.formHead.getForm().reset();
|
|
|
this.formHead.getForm().setValues('');
|
|
|
this.formHead.getForm().findField('BSNO').setValue('');
|
|
|
this.formHead.getForm().findField('GID').setValue('');
|
|
|
this.formHead.getForm().findField('PARENTID').setValue('');
|
|
|
this.formHead.getForm().findField('AMENDNO').setValue('');
|
|
|
this.formHead.getForm().findField('FEESTATUSREF').setValue('未锁定');
|
|
|
this.formHead.getForm().findField('REASON').setValue('');
|
|
|
this.formHead.getForm().findField('REMARKS').setValue('');
|
|
|
this.formHead.getForm().findField('CREATEUSER').setValue('');
|
|
|
this.formHead.getForm().findField('CREATETIME').setValue('');
|
|
|
var myDate = new Date();
|
|
|
var mydatestr = Ext.util.Format.date(myDate, 'Y-m');
|
|
|
field = this.formHead.getForm().findField('ACCDATE');
|
|
|
field.setValue(mydatestr);
|
|
|
this.panelList.setVisible(true);
|
|
|
this.tabSeaepanel.removeAll();
|
|
|
this.tabSeaepanel.add(this.panelList);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
this.opStatus = 'add';
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}); //end 按钮Toolbar
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 180,
|
|
|
id: "BillHeadSeae",
|
|
|
items: [this.panelBtn, this.formHead, this.formEdit]
|
|
|
});
|
|
|
|
|
|
this.panelFee = new Shipping.FeeEditGrid({
|
|
|
region: 'center',
|
|
|
title: '费用信息',
|
|
|
layout: 'border'
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.panelFee.stroplb = 'op_Seai';
|
|
|
|
|
|
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: "ISSEA='1' "} });
|
|
|
//#regin 业务列表
|
|
|
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsOpSeaiModel',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsOpSeai/GetDataList',
|
|
|
reader: {
|
|
|
id: 'BSNO',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
name: 'bottles',
|
|
|
fieldLabel: Zi.LAN.bottles, //'每页记录数',
|
|
|
labelAlign: 'right',
|
|
|
value: this.PageSize,
|
|
|
maxValue: 100000,
|
|
|
width: 180,
|
|
|
minValue: 0,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 40
|
|
|
});
|
|
|
|
|
|
this.initgirdcolums = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: Zi.LAN.BSNO2, //'业务编号',
|
|
|
width: 0
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSSTATUSREF',
|
|
|
align: 'center',
|
|
|
header: Zi.LAN.BSSTATUSREF, //'业务锁定',
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEESTATUSREF',
|
|
|
align: 'center',
|
|
|
header: Zi.LAN.FEESTATUSREF, //'费用锁定',
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRFEESTATUS',
|
|
|
header: Zi.LAN.DRFEESTATUS, //'应收费用',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '审核通过') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '录入状态') {
|
|
|
|
|
|
} else if (value == '提交审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '结算完毕') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '未录入') {
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '部分审核') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分提交') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CRFEESTATUS',
|
|
|
header: Zi.LAN.CRFEESTATUS, //'应付费用',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '审核通过') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '录入状态') {
|
|
|
|
|
|
} else if (value == '提交审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '结算完毕') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '未录入') {
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '部分审核') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分提交') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRINVSTATUS',
|
|
|
header: Zi.LAN.DRINVSTATUS, //'应收开票',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '已开票') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分开票') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'WMSTYPE',
|
|
|
header: Zi.LAN.WMSTYPE, //'仓储类型',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'OPSTATUS',
|
|
|
header: Zi.LAN.OPSTATUS2, //'状态管理',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETD',
|
|
|
header: Zi.LAN.ETD, //'到港日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETA',
|
|
|
header: Zi.LAN.ETA, //'开船日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'MBLNO',
|
|
|
header: Zi.LAN.MBLNO, //'主提单号',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
header: Zi.LAN.CUSTOMERNAME, //'委托单位',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRADETYPE',
|
|
|
header: Zi.LAN.TRADETYPE, //'贸易方式',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSDATE',
|
|
|
header: Zi.LAN.BSDATE, //'接单日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONTRACTNO',
|
|
|
header: Zi.LAN.CONTRACTNO, //'合同号',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
header: Zi.LAN.GOODSNAME, //'品名',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'NUMBERPLATE',
|
|
|
header: Zi.LAN.NUMBERPLATE, //'牌号',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'PKGS',
|
|
|
header: Zi.LAN.PKGS, //'件数',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'KGS',
|
|
|
header: Zi.LAN.KGS2, //'毛重',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'NETWEIGHT',
|
|
|
header: Zi.LAN.NETWEIGHT, //'净重',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CNTRTOTAL',
|
|
|
header: Zi.LAN.CNTRTOTAL2, //'集装箱',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'ORDERTYPE',
|
|
|
header: Zi.LAN.ORDERTYPE2, //'委托方式',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: Zi.LAN.CUSTNO, //'委托编号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'ORDERNO',
|
|
|
header: Zi.LAN.ORDERNO, //'业务编号',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'HBLNO',
|
|
|
header: Zi.LAN.HBLNO, //'分提单号',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'ACCDATE',
|
|
|
header: Zi.LAN.ACCDATE, //'会计期间',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSSOURCE',
|
|
|
header: Zi.LAN.BSSOURCE, //'业务来源',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSSOURCEDETAIL',
|
|
|
header: Zi.LAN.BSSOURCEDETAIL, //'来源明细',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTBY',
|
|
|
header: Zi.LAN.INPUTBY, //'录入人',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CREATETIME',
|
|
|
header: Zi.LAN.CREATETIME, //'创建时间',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'OP',
|
|
|
header: Zi.LAN.OP, //'操作员',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'SALE',
|
|
|
header: Zi.LAN.SALE, //'揽货人',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'VESSEL',
|
|
|
header: Zi.LAN.VESSEL, //'船名',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOYNO',
|
|
|
header: Zi.LAN.VOYNO, //'航次',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
header: Zi.LAN.PORTLOAD, //'装货港',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTDISCHARGE',
|
|
|
header: Zi.LAN.PORTDISCHARGE, //'卸货港',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'OTCNTR',
|
|
|
header: Zi.LAN.OTCNTR, //'其他箱型',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'TEU',
|
|
|
header: Zi.LAN.TEU, //'箱TEU',
|
|
|
width: 40
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'COUNTRYOFORIGIN',
|
|
|
header: Zi.LAN.COUNTRYOFORIGIN, //'原产地',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'UNITS',
|
|
|
header: Zi.LAN.UNITS, //'单位',
|
|
|
width: 40
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BALES',
|
|
|
header: Zi.LAN.BALES2, //'包装(散货/托盘)数',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMSER',
|
|
|
header: Zi.LAN.CUSTOMSER, //'报关行',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMNO',
|
|
|
header: Zi.LAN.CUSTOMNO, //'报关单号',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMDATE',
|
|
|
header: Zi.LAN.CUSTOMDATE, //'通关日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'INSPECTION',
|
|
|
header: Zi.LAN.INSPECTION, //'报检',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'INSPECTIONNO',
|
|
|
header: Zi.LAN.INSPECTIONNO, //'报检单号',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'INSPECTIONDATE',
|
|
|
header: Zi.LAN.INSPECTIONDATE, //'报检日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'KINDPKGS',
|
|
|
header: Zi.LAN.KINDPKGS, //'件数包装',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CBM',
|
|
|
header: Zi.LAN.CBM2, //'立方/尺码',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CARRIER',
|
|
|
header: Zi.LAN.CARRIER, //'船公司',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'ENTERP',
|
|
|
header: Zi.LAN.ENTERP, //'经营单位',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRUCKER',
|
|
|
header: Zi.LAN.TRUCKER, //'承运车队',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOUNO',
|
|
|
header: Zi.LAN.VOUNO, //'凭证号',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'FBP',
|
|
|
header: Zi.LAN.FBP, //'免箱期',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BMDDATE',
|
|
|
header: Zi.LAN.BMDDATE, //'箱使到期日',
|
|
|
width: 70
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'MDTDATE',
|
|
|
header: Zi.LAN.MDTDATE, //'搬倒日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRADINGAGENCY',
|
|
|
header: Zi.LAN.TRADINGAGENCY, //'贸易代理',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSTYPENAME',
|
|
|
header: Zi.LAN.GOODSTYPENAME, //'品名类型',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'SHOWNAME',
|
|
|
header: Zi.LAN.SHOWNAME_Client, //'委托单位联系人',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'EMAIL',
|
|
|
header: Zi.LAN.EMAIL, //'委托单位EMAIL',
|
|
|
width: 90
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'TEL',
|
|
|
header: Zi.LAN.TEL, //'委托单位TEL',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'FAX',
|
|
|
header: Zi.LAN.FAX, //'委托单位FAX',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'TARRIFSPAIEDTIEM',
|
|
|
header: Zi.LAN.TARRIFSPAIEDTIEM, //'交关税时间',
|
|
|
width: 70
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'APPROVENO',
|
|
|
header: Zi.LAN.APPROVENO, //'审批单号',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'UPDATETIME',
|
|
|
header: Zi.LAN.UPDATETIME, //'申报日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'IMPORTVALUE',
|
|
|
header: Zi.LAN.IMPORTVALUE, //'货值',
|
|
|
width: 50,
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
try {
|
|
|
var lsValue = usMoney(value, 2, '', false);
|
|
|
if (lsValue != "NaN") {
|
|
|
value = lsValue; if (parseFloat(lsValue) < 0) {
|
|
|
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
return value;
|
|
|
}
|
|
|
}
|
|
|
catch (e) {
|
|
|
return value;
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'UNITPRICE',
|
|
|
header: Zi.LAN.UNITPRICE, //'单价',
|
|
|
width: 50,
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
try {
|
|
|
var lsValue = usMoney(value, 2, '', false);
|
|
|
if (lsValue != "NaN") {
|
|
|
value = lsValue; if (parseFloat(lsValue) < 0) {
|
|
|
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
return value;
|
|
|
}
|
|
|
}
|
|
|
catch (e) {
|
|
|
return value;
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BLTYPE',
|
|
|
header: Zi.LAN.BLTYPE, //'装运方式',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR1',
|
|
|
header: Zi.LAN.CNTR1, //'箱型1',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR2',
|
|
|
header: Zi.LAN.CNTR2, //'箱型2',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR3',
|
|
|
header: Zi.LAN.CNTR3, //'箱型3',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR4',
|
|
|
header: Zi.LAN.CNTR4, //'箱型4',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR5',
|
|
|
header: Zi.LAN.CNTR5, //'箱型5',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR6',
|
|
|
header: Zi.LAN.CNTR6, //'箱型6',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR7',
|
|
|
header: Zi.LAN.CNTR7, //'箱型7',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR8',
|
|
|
header: Zi.LAN.CNTR8, //'箱型8',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR9',
|
|
|
header: Zi.LAN.CNTR9, //'箱型9',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR10',
|
|
|
header: Zi.LAN.CNTR10, //'箱型10',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'OTCNTR',
|
|
|
header: Zi.LAN.OTCNTR, //'其他箱型',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISPRINTPR',
|
|
|
header: Zi.LAN.ISPRINTPR, //'打印核算单',
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISFUMIGATION',
|
|
|
header: Zi.LAN.ISFUMIGATION, //'服务项目1',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISSTORAGE',
|
|
|
header: Zi.LAN.ISSTORAGE, //'服务项目2',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISLAND',
|
|
|
header: Zi.LAN.ISLAND, //'服务项目3',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISCUSTOMS',
|
|
|
header: Zi.LAN.ISCUSTOMS, //'服务项目4',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISINSPECTION',
|
|
|
header: Zi.LAN.ISINSPECTION, //'服务项目5',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISBOOKING',
|
|
|
header: Zi.LAN.ISBOOKING, //'服务项目6',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISAGENT',
|
|
|
header: Zi.LAN.ISAGENT, //'服务项目7',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISHBLNO',
|
|
|
header: Zi.LAN.ISHBLNO, //'服务项目8',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SERVICE9',
|
|
|
header: Zi.LAN.SERVICE9, //'服务项目9',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SERVICE10',
|
|
|
header: Zi.LAN.SERVICE10, //'服务项目10',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISAPPLY',
|
|
|
header: Zi.LAN.ISAPPLY, //'是否生成报关',
|
|
|
width: 80,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value != '0')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'APPLYNO',
|
|
|
header: Zi.LAN.APPLYNO, //'申请放箱号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AMEND',
|
|
|
header: Zi.LAN.AMEND, //'更改单',
|
|
|
width: 80,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value != '0')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}];
|
|
|
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
|
// configure whether filter query is encoded or not (initially)
|
|
|
var encode = false;
|
|
|
|
|
|
// configure whether filtering is performed locally or remotely (initially)
|
|
|
var local = true;
|
|
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
store: this.storeList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
id: 'gridlist',
|
|
|
loadMask: {
|
|
|
msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng //"数据加载中,请稍等..."
|
|
|
},
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true, //允许复制数据
|
|
|
autoFill: true,
|
|
|
getRowClass: function (record, rowIndex, rowParams, store) {
|
|
|
var ISCANCEL = record.get('ISCANCEL');
|
|
|
if (ISCANCEL == '1')
|
|
|
return 'feestatus_Del';
|
|
|
}
|
|
|
},
|
|
|
tbar: [{
|
|
|
text: '生成更改单',
|
|
|
tooltip: '生成更改单',
|
|
|
id: 'btnaddbill',
|
|
|
iconCls: "btnadddetail",
|
|
|
handler: function (button, event) {
|
|
|
this.onAddClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存列表样式",
|
|
|
id: "btntestbody",
|
|
|
menu: [
|
|
|
{ text: Zi.LAN.SaveGridPanel, //"保存",
|
|
|
handler: function (button, event) {
|
|
|
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 2, true);
|
|
|
}
|
|
|
}, { text: Zi.LAN.SaveGridPanel2, //"初始化",
|
|
|
handler: function (menu, event) {
|
|
|
// _this.InitGrid(_this.initgirdcolums);
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 2, true);
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
scope: this
|
|
|
}],
|
|
|
columns: this.girdcolums,
|
|
|
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: Zi.LAN.displayMsg, //'当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: Zi.LAN.emptyMsg//'没有数据'
|
|
|
}), this.Pagenum]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/////////////以下部分为获取存储的gridpanel显示样式
|
|
|
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
this.gridList.columns[1] = new Ext.grid.RowNumberer();
|
|
|
|
|
|
//客户加载_委托单位
|
|
|
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' }
|
|
|
});
|
|
|
// this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
|
|
|
//委托单位
|
|
|
_this = this;
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.CUSTOMERNAME, //'委托单位',
|
|
|
store: this.storeCustCode,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
});
|
|
|
|
|
|
this.storeSaleCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
});
|
|
|
|
|
|
this.storeOpCode.load({
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
_this.storeSaleCode.add(r);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
//客服
|
|
|
this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.CUSTSERVICE, //'客服',
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'CUSTSERVICE',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
//揽货人
|
|
|
this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.SALE, //'揽货人',
|
|
|
store: this.storeSaleCode,
|
|
|
forceSelection: true,
|
|
|
name: 'SALE',
|
|
|
flex: 0.8,
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
//操 作
|
|
|
this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.OP, //'操 作',
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'OP',
|
|
|
flex: 0.8, valueField: 'UserName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
_this = this;
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'north',
|
|
|
height: 45,
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 60,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
|
|
|
items: [{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.MblNo2, //'编号',
|
|
|
name: 'MblNo',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxCustCode, {
|
|
|
fieldLabel: Zi.LAN.ETD2, //'开船日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDbgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.ETDend, //'到',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDend',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxOP, this.comboxSALE, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: Zi.LAN.btnrefresh, //"执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: Zi.LAN.btnmore, //"高级查询",
|
|
|
iconCls: "btnmore",
|
|
|
handler: function (button, event) {
|
|
|
var sql = this.getCondition();
|
|
|
var winAccess = new Shipping.DsQuery({
|
|
|
|
|
|
});
|
|
|
winAccess.StoreList = this.storeList;
|
|
|
winAccess.formname = this.formname;
|
|
|
winAccess.condition = sql;
|
|
|
winAccess.show();
|
|
|
return;
|
|
|
|
|
|
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
}]//end root items
|
|
|
});
|
|
|
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
// var sql = this.getCondition();
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
|
|
|
}, this);
|
|
|
|
|
|
this.panelList = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "center",
|
|
|
title: '业务列表',
|
|
|
// hidden: true,
|
|
|
items: [this.formSearch, this.gridList]
|
|
|
});
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
this.tabSeaepanel = new Ext.TabPanel({
|
|
|
activeTab: 0,
|
|
|
autoWidth: true,
|
|
|
border: true,
|
|
|
frame: false,
|
|
|
region: 'center',
|
|
|
enableTabScroll: true,
|
|
|
items:
|
|
|
[
|
|
|
// this.panelFee, this.panelList
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelTop, this.tabSeaepanel]
|
|
|
});
|
|
|
|
|
|
parentWin = window.parent.opener;
|
|
|
|
|
|
if (this.AmendBsno == undefined) {
|
|
|
this.InitData();
|
|
|
} else {
|
|
|
this.StoreList = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpSeaiModel'
|
|
|
});
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...', //'正在查询主表数据...',
|
|
|
url: '/MvcShipping/MsOpSeai/GetData',
|
|
|
params: {
|
|
|
handle: 'edit',
|
|
|
condition: "BSNO='" + this.AmendBsno + "'"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
data = result.data;
|
|
|
this.formEdit.getForm().reset();
|
|
|
this.formEdit.getForm().setValues(data);
|
|
|
var myDate = new Date();
|
|
|
var mydatestr = Ext.util.Format.date(myDate, 'Y-m');
|
|
|
field = this.formHead.getForm().findField('ACCDATE');
|
|
|
field.setValue(mydatestr);
|
|
|
field = this.formHead.getForm().findField('SLNO');
|
|
|
field.setValue(0);
|
|
|
var BSNO = NewGuid();
|
|
|
this.formHead.getForm().findField('BSNO').setDisabled(false);
|
|
|
field = this.formHead.getForm().findField('BSNO');
|
|
|
field.setValue(BSNO);
|
|
|
this.formHead.getForm().findField('BSNO').setDisabled(true);
|
|
|
this.opStatus = 'add';
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
},
|
|
|
|
|
|
|
|
|
//#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];
|
|
|
}
|
|
|
|
|
|
|
|
|
if (this.opStatus == 'edit') {
|
|
|
this.BsNo = this.EditRecord.get('BSNO');
|
|
|
this.LoadData();
|
|
|
|
|
|
this.tabSeaepanel.removeAll();
|
|
|
this.tabSeaepanel.add(this.panelFee);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
|
|
|
var condition = " BSNO='" + this.BsNo + "'";
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu, //'正在查询主表数据...',
|
|
|
url: '/MvcShipping/MsChFee/GetAmendData',
|
|
|
params: {
|
|
|
handle: this.opStatus,
|
|
|
condition: condition
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var data = result.data;
|
|
|
this.formHead.getForm().reset();
|
|
|
this.formHead.getForm().setValues(data);
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
} else {
|
|
|
this.panelList.setVisible(true);
|
|
|
this.tabSeaepanel.removeAll();
|
|
|
this.tabSeaepanel.add(this.panelList);
|
|
|
// this.tabSeaepanel.setActiveTab(this.panelList);
|
|
|
// this.panelFee.setVisible(false);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
}
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu, //'正在查询主表数据...',
|
|
|
url: '/Account/ChMonthClose/GetNowPeriod',
|
|
|
params: {
|
|
|
condition: ''
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
return;
|
|
|
}
|
|
|
data = result.data;
|
|
|
this.MsPeriod = data;
|
|
|
var ACCDATE = this.formHead.getForm().findField('ACCDATE').getValue();
|
|
|
var oDate1 = new Date(ACCDATE + '-01');
|
|
|
var oDate2 = new Date(data.PERIOD + '-01');
|
|
|
if (oDate1.getTime() >= oDate2.getTime()) {
|
|
|
this.formHead.getForm().findField('ACCDATE').setMinValue(data.PERIOD);
|
|
|
this.formHead.getForm().findField('ACCDATE').setReadOnly(false);
|
|
|
} else {
|
|
|
if (this.opStatus == 'add') {
|
|
|
this.formHead.getForm().findField('ACCDATE').setMinValue(data.PERIOD);
|
|
|
this.formHead.getForm().findField('ACCDATE').setReadOnly(false);
|
|
|
}
|
|
|
else {
|
|
|
this.formHead.getForm().findField('ACCDATE').setMinValue('');
|
|
|
this.formHead.getForm().findField('ACCDATE').setReadOnly(true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}, //end InitData
|
|
|
|
|
|
LoadData: function () {
|
|
|
this.formEdit.getForm().loadRecord(this.EditRecord);
|
|
|
this.panelFee.EditRecord = this.EditRecord;
|
|
|
this.panelFee.strBSNO = this.BsNo;
|
|
|
this.panelFee.strPBSNO = this.EditRecord.data.MASTERNO;
|
|
|
this.panelFee.amendfee = '1';
|
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "op_Seai", bsno: this.BsNo} });
|
|
|
this.panelFee.StoreUnit.load({ params: { bsno: this.BsNo, bstype: "op_Seai"} });
|
|
|
|
|
|
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.storeChFeeGain.load({ params: { bsno: this.BsNo, optype: "op_Seai"} });
|
|
|
|
|
|
|
|
|
|
|
|
}, // end LoadDate
|
|
|
|
|
|
Save: function (type) {
|
|
|
var basicForm = this.formHead.getForm();
|
|
|
|
|
|
if (!basicForm.isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
var billNo = this.formEdit.getForm().findField('BSNO').getValue();
|
|
|
if (billNo == '*' || billNo == '') {
|
|
|
Ext.Msg.show({ title: '错误', msg: '请先查找要生成更改单的业务,并生成更改单!', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
basicForm.findField('GID').setDisabled(false);
|
|
|
var data = basicForm.getValues();
|
|
|
basicForm.findField('GID').setDisabled(true);
|
|
|
if (this.opStatus == 'add') {
|
|
|
data.GID = NewGuid();
|
|
|
}
|
|
|
var amendnostr = '';
|
|
|
if (this.AmendNo != undefined) {
|
|
|
amendnostr = this.AmendNo;
|
|
|
}
|
|
|
|
|
|
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); //'正在保存数据, 请稍侯..'
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, //'正在保存数据...',
|
|
|
url: '/MvcShipping/MsChFee/SaveAmendData',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
opstatus: this.opStatus,
|
|
|
data: Ext.JSON.encode(data),
|
|
|
bsno: billNo,
|
|
|
amendno: amendnostr
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var returnData = jsonresult.Data;
|
|
|
this.formHead.getForm().setValues(returnData);
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu, //'正在查询主表数据...',
|
|
|
url: '/MvcShipping/MsOpSeai/GetAmendData',
|
|
|
params: {
|
|
|
handle: this.opStatus,
|
|
|
condition: " BSNO='" + returnData.BSNO + "'"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var data = result.data;
|
|
|
this.formEdit.getForm().reset();
|
|
|
this.formEdit.getForm().setValues(data);
|
|
|
if (_this.opStatus == 'add') {
|
|
|
var arrNewRecords = this.StoreList.insert(0, data);
|
|
|
this.EditRecord = this.StoreList.getAt(0);
|
|
|
} else {
|
|
|
var editp = Ext.create('MsOpSeaiModel', data);
|
|
|
this.EditRecord.fields.each(function (field) {
|
|
|
if (field.persist) {
|
|
|
name = field.name;
|
|
|
if (name != 'id')
|
|
|
this.EditRecord.set(name, editp.get(name));
|
|
|
}
|
|
|
}, this);
|
|
|
this.EditRecord.commit();
|
|
|
|
|
|
}
|
|
|
|
|
|
this.BsNo = data.BSNO;
|
|
|
|
|
|
if (type == '0') {
|
|
|
this.opStatus = 'edit';
|
|
|
|
|
|
basicForm.findField('GID').setDisabled(true);
|
|
|
|
|
|
this.LoadData();
|
|
|
|
|
|
this.tabSeaepanel.removeAll();
|
|
|
this.tabSeaepanel.add(this.panelFee);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
|
|
|
} else if (type == '1') {
|
|
|
window.close();
|
|
|
} else {
|
|
|
this.LoadData();
|
|
|
basicForm.findField('GID').setDisabled(false);
|
|
|
this.tabSeaepanel.removeAll();
|
|
|
this.tabSeaepanel.add(this.panelFee);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.CuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.CuoWu,
|
|
|
msg: Zi.LAN.FuWuQiXiangYingChuCuo,
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onAddClick: function (button, event) {
|
|
|
var basicForm = this.formEdit.getForm();
|
|
|
var billNo = basicForm.findField('BSNO').getValue();
|
|
|
if (billNo != '*' && billNo != '') {
|
|
|
Ext.Msg.show({ title: '错误', msg: '已生成,不能重复生成!', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
var record = selections[0];
|
|
|
this.formEdit.getForm().loadRecord(record);
|
|
|
|
|
|
var myDate = new Date();
|
|
|
var mydatestr = Ext.util.Format.date(myDate, 'Y-m');
|
|
|
field = this.formHead.getForm().findField('ACCDATE');
|
|
|
field.setValue(mydatestr);
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
//var girdcolums = this.gridList.getColumnMode();
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
this.sqlcontext = sql;
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu, //"正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
onClearSql: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
form.reset();
|
|
|
},
|
|
|
|
|
|
getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
// var form2 = this.formSearch2.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
//隐藏查询面板
|
|
|
// this.panelSearch.hide();
|
|
|
this.isShowAdvancedQuery = 0;
|
|
|
//
|
|
|
var sql = '1=1';
|
|
|
|
|
|
//#region formSearch 查询面板
|
|
|
//编号包括(主提单号)
|
|
|
var MblNo = form.findField('MblNo').getValue();
|
|
|
sql = sql + getAndConSql(sql, MblNo, "(B.MblNo like '%" + MblNo + "%' or B.CONTRACTNO like '%" + MblNo + "%' or B.CUSTNO like '%" + MblNo + "%' or B.HBLNO like '%" + MblNo + "%' or B.ORDERNO like '%" + MblNo + "%' or B.APPLYNO like '%" + MblNo + "%')");
|
|
|
|
|
|
//客户名称
|
|
|
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "B.CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
|
|
|
//到港日期
|
|
|
var ETDbgn = form.findField('ETDbgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDbgn, "B.ETD >='" + ETDbgn + "'");
|
|
|
var ETDend = form.findField('ETDend').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDend, "B.ETD <='" + ETDend + "'");
|
|
|
|
|
|
|
|
|
//操作人
|
|
|
var OP = form.findField('OP').getValue();
|
|
|
sql = sql + getAndConSql(sql, OP, "B.OP='" + OP + "'");
|
|
|
|
|
|
//揽货人
|
|
|
var SALE = form.findField('SALE').getValue();
|
|
|
sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'");
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
|
|
|
|
|
|
//#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 = 'MSOPSEAI';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM op_seai 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.data.length - 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;
|
|
|
}
|
|
|
|
|
|
|
|
|
});
|
|
|
|