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/MsOpSeae/MsOpSeaeSaleIndex.js

3244 lines
122 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

Ext.namespace('Shipping');
Shipping.MsOpSeaeSaleIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsOpSeaeSaleIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsOpSeaeSaleIndex, Ext.Panel, {
PageSize: 100,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
isShowAdvancedQuery: 0, //是否显示高级查询面板
sqlcontext: '',
editype: '',
selectbsno: '',
sortfield: '',
sortdire: '',
id: "MainPanel",
initUIComponents: function () {
this.formname = "formMsOpSeaeSaleIndex"; //页面名称
//定义数据集
this.storectndisp = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CtnDispModel',
proxy: { url: '/CommMng/BasicDataRef/GetCtnDisp' }
});
this.storecodeservice = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsCodeOpService',
proxy: { url: '/MvcShipping/MsCodeOpService/GetDataCtnList' }
});
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'MsOpSeaeModel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetSaleDataList',
reader: {
id: 'BSNO',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//#region List列表显示信息
Ext.define('Ext.grid.column.Actiontextcolumn', {
extend: 'Ext.grid.column.Column',
alias: ['widget.actiontextcolumn'],
defaultRenderer: function (value) {
var me = this;
prefix = Ext.baseCSSPrefix;
scope = me.origScope || me;
// if (value == "") {
// }
// else
value = value + '<img role="button" src="' + (me.icon || Ext.BLANK_IMAGE_URL)
+ '" class="' + this.iconCls + ' x-action-col-icon"/>';
// value = '<label class="x-action-col-icon">' + value + '</label><img role="button" src="' + (me.icon || Ext.BLANK_IMAGE_URL)
// + '" class="' + this.iconCls + ' x-action-col-icon"/>';
return value;
},
processEvent: function (type, view, cell, recordIndex, cellIndex, e, record, row) {
var me = this;
if (type == 'click') {
me.handler.call(me.scope || me.origScope || me, view, recordIndex, cellIndex, e, record, row);
}
}
});
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
width: 30
});
_this = this;
this.initgirdcolums = [{
sortable: true,
id: '',
dataIndex: '',
header: '',
width: 0
}, {
sortable: true,
id: '',
dataIndex: 'BillFeeStatus',
header: '整票状态', //'整票状态',
width: 60,
renderer: function (value, meta) {
if (value == '0') {
return "未提交";
} else if (value == '1') {
meta.tdCls = 'feestatus_refer';
return "整票提交";
} else if (value == '2') {
meta.tdCls = 'feestatus_pass';
return "审核通过";
} else {
return "";
}
}
}, {
sortable: true,
id: '',
dataIndex: 'BSNO',
header: '业务编号',
width: 0
}, {
sortable: true,
id: '',
dataIndex: 'CUSTNO',
header: '委托编号',
width: 120
}, {
sortable: true,
id: '',
dataIndex: 'ORDERNO',
header: '订舱编号',
width: 120
}, {
sortable: true,
id: '',
dataIndex: 'ORDERTYPE',
header: '订舱方式',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'BSSTATUSREF',
header: '业务锁定',
align: 'center',
width: 60,
renderer: function (value, cellmeta) {
if (value == '锁定') {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
}
}
},
{
sortable: true,
id: '',
dataIndex: 'FEESTATUSREF',
header: '费用锁定',
align: 'center',
width: 60,
renderer: function (value, cellmeta) {
if (value == '锁定') {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
}
}
},
{
sortable: true,
id: '',
dataIndex: 'DRFEESTATUS',
header: '应收费用',
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';
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'CRFEESTATUS',
header: '应付费用',
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';
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'DRINVSTATUS',
header: '应收开票', //'应收开票',
align: 'center',
// xtype: 'actioncolumn',
width: 60,
renderer: function (value, meta, record) {
var openSet = "height=200, width=650, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 600) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsRptChInvTotal/BsView?handle=check&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (value == '已开票') {
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">已开票</a>'
meta.tdCls = 'feestatus_pass';
} else if (value == '部分开票') {
meta.tdCls = 'feestatus_refer';
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">部分开票</a>'
}
return value;
}
}
,
{
sortable: true,
id: '',
dataIndex: 'OPSTATUS',
header: '业务状态',
width: 60,
renderer: function (value, metadata, record, rowIndex) {
metadata.style = "background-color:" + record.data.COLOR;
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'BLTYPE',
header: '装运方式',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'ETD',
header: '开船日期',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'MBLNO',
header: '主提单号',
width: 120,
renderer: function (value, meta) {
meta.tdCls = 'mblno';
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'CUSTOMERNAME',
header: '委托单位',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'BSDATE',
header: '接单日期',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'GOODSNAME',
header: '品名',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'PKGS',
header: '件数',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'KGS',
header: '毛重',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CBM',
header: '尺码',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CNTRTOTAL',
header: '集装箱',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'HBLNO',
header: '分提单号',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'ACCDATE',
header: '会计期间',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'BSSOURCE',
header: '业务来源',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'BSSOURCEDETAIL',
header: '来源明细',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'INPUTBY',
header: '录入人',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CREATETIME',
header: '创建时间',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'OP',
header: '操作员',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'SALE',
header: '揽货人',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'ETA',
header: '预抵日期' , //'预抵日期',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CUSTSERVICE',
header: '客服员',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'FRCUSTSERVICE',
header: '海外客服',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'VESSEL',
header: '船名',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'VOYNO',
header: '航次',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'PORTLOAD',
header: '装货港',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'PORTDISCHARGE',
header: '卸货港',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'CNTR1',
hidden: true,
header: '箱型1',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR2',
hidden: true,
header: '箱型2',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR3',
hidden: true,
header: '箱型3',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR4',
hidden: true,
header: '箱型4',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR5',
hidden: true,
header: '箱型5',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR6',
hidden: true,
header: '箱型6',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR7',
hidden: true,
header: '箱型7',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR8',
hidden: true,
header: '箱型8',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR9',
hidden: true,
header: '箱型9',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR10',
hidden: true,
header: '箱型10',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'OTCNTR',
header: '其他箱型',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'TEU',
header: '箱TEU',
width: 40
},
{
sortable: true,
id: '',
dataIndex: 'CUSTOMSER',
header: '报关行',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'KINDPKGS',
header: '件数包装',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CARRIER',
header: '船公司',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'TRUCKER',
header: '承运车队',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'LANE',
header: '航线',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'AGENTID',
header: '代理',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'FORWARDER',
header: '订舱代理',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'PORTDISCHARGEID',
header: '卸港代码',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'YARD',
header: '场站',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'SHIPPER',
header: 'SHIPPER', //'SHIPPER',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'CONSIGNEE',
header: 'CONSIGNEE', //'CONSIGNEE',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'NOTIFYPARTY',
header: 'NOTIFYPARTY', //'NOTIFYPARTY',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'VOUNO',
header: '凭证号',
width: 60
}, {
dataIndex: 'BLFRT',
header: '付费方式',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'ISSUETYPE',
header: '签单方式',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'NOBILL',
header: '提单份数',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'DESTINATION',
header: '目的地',
width: 100
}, {
dataIndex: 'APPLYNO',
header: '申请放箱号', //'申请放箱号',
width: 120
}, {
dataIndex: 'SERVICECONTRACTNO',
header: '服务合同号',
width: 100
}, {
dataIndex: 'BLISSUESTATUS',
header: '提单签发状态', //'货物标识',
width: 120,
renderer: function (value, meta) {
if (value == '提单签出') {
meta.tdCls = 'feestatus_pass';
} else if (value == '提单签入') {
meta.tdCls = 'feestatus_refer';
}
return value;
}
}, {
dataIndex: 'SHIPPERID',
header: '发货人代码',
width: 100
}, {
dataIndex: 'CONSIGNEEID',
header: '收货人代码',
width: 100
}, {
dataIndex: 'NOTIFYPARTYID',
header: '通知人代码',
width: 100
}, {
dataIndex: 'DELIVERYDATE',
header: '交货日期',
width: 100
}, {
dataIndex: 'CONTRACTNO',
header: '运费协议号',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'SERVICECONTRACTNO',
header: Zi.LAN.SERVICECONTRACTNO, //'服务合同号',
width: 100
}, {
dataIndex: 'SALECORP',
header: '所属分部', //'货物标识',
width: 120
},
{
sortable: true,
dataIndex: 'DOC',
header: Zi.LAN.DOC, //'揽货人',
width: 80
}, {
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: false,
dataIndex: 'TRUCKCTNSTATUS',
text: Zi.LAN.TRUCKCTNSTATUS,
width: 56,
renderer: function (value, meta, record) {
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (record.data.TRUCKCTNSTATUS == 1) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.TRUCKCTNSTATUS == 2) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
sortable: false,
dataIndex: 'CTNRETURNSTATUS',
text: Zi.LAN.CTNRETURNSTATUS,
width: 56,
renderer: function (value, meta, record) {
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (record.data.CTNRETURNSTATUS == 1) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.CTNRETURNSTATUS == 2) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
sortable: false,
dataIndex: 'HGYDSTATUS',
text: Zi.LAN.HGYDSTATUS,
width: 56,
renderer: function (value, meta, record) {
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (record.data.HGYDSTATUS == 1) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.HGYDSTATUS == 2) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
sortable: false,
dataIndex: 'CUSTOMSSTATUS',
text: Zi.LAN.CUSTOMSSTATUS,
width: 56,
renderer: function (value, meta, record) {
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (record.data.CUSTOMSSTATUS == 1) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.CUSTOMSSTATUS == 2) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
sortable: false,
dataIndex: 'PORTSTATUS',
text: Zi.LAN.PORTSTATUS,
width: 56,
renderer: function (value, meta, record) {
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (record.data.PORTSTATUS == 1) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.PORTSTATUS == 2) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
sortable: false,
dataIndex: 'EXPSTATUS',
text: Zi.LAN.EXPSTATUS,
width: 56,
renderer: function (value, meta, record) {
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (record.data.EXPSTATUS == 1) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.EXPSTATUS == 2) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
sortable: false,
dataIndex: 'ATASTATUS',
text: Zi.LAN.ATASTATUS,
width: 56,
renderer: function (value, meta, record) {
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (record.data.ATASTATUS == 1) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.ATASTATUS == 2) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
sortable: false,
dataIndex: 'STCSSTATUS',
text: Zi.LAN.STCSSTATUS,
width: 56,
renderer: function (value, meta, record) {
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (record.data.STCSSTATUS == 1) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.STCSSTATUS == 2) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
sortable: false,
dataIndex: 'RCVESTATUS',
text: Zi.LAN.RCVESTATUS,
width: 56,
renderer: function (value, meta, record) {
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (record.data.RCVESTATUS == 1) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.RCVESTATUS == 2) {
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
dataIndex: 'FINANCIALSTAFF',
header: Zi.LAN.FINANCIALSTAFF, //'货物标识',
width: 70
}, {
dataIndex: 'INSURANCEOP',
header: Zi.LAN.INSURANCEOP, //'货物标识',
width: 70
}];
this.girdcolums = this.initgirdcolums;
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
//定义Grid
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
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';
}
},
listeners: {
cellclick: function (thisTab, record, item, index, e, eOpts) {
if (index == 10) {//设置按钮列
// alert('用户编号=' + this.getStore().getAt(rowIndex).data.usercode);
}
}
},
columns: this.girdcolums,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
/////////////以下部分为获取存储的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.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
this.SelectedRecord = record;
this.OprationStatus = 'edit';
// DsOpenEditWin('/MvcShipping/MsOpSeae/SaleEdit');
DsOpenEditWin('/MvcShipping/MsOpSeae/SaleEdit?BSNO=' + record.data.BSNO, record.data.BSNO);
}, this);
this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) {
this.sortfield = column.dataIndex;
this.sortdire = direction;
}, this);
//#region formSearch 下拉框信息加载
//权限范围
this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsOP',
proxy: { url: '/MvcShipping/MsBaseInfo/GetOpRang' }
});
this.StoreOpRange.load({ params: { optype: "modOrderManagement"} });
//人员信息加载
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
});
this.storeOpCode.load();
//客服
this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '客服',
store: this.storeOpCode,
forceSelection: true,
name: 'CUSTSERVICE',
valueField: 'UserName',
displayField: 'CodeAndName'
});
//揽货人
this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '揽货人',
store: this.storeOpCode,
forceSelection: true,
name: 'SALE',
valueField: 'UserName',
displayField: 'CodeAndName'
});
//操 作
this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '操 作',
store: this.storeOpCode,
forceSelection: true,
name: 'OP',
valueField: 'UserName',
displayField: 'CodeAndName'
});
//录入人
this.comboxINPUTBY = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '录入人',
store: this.storeOpCode,
forceSelection: true,
name: 'INPUTBY',
valueField: 'UserName',
displayField: 'CodeAndName'
});
//客户加载_委托单位
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: '委托单位',
store: this.storeCustCode,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
//客户加载_船公司
this.storeCARRIER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeCARRIER.load({ params: { condition: "ISCARRIER='1'"} });
//船公司
this.comboxCARRIER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '船公司',
store: this.storeCARRIER,
forceSelection: true,
name: 'CARRIER',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
////客户加载_车队
//this.storeTRUCKER = Ext.create('DsExt.ux.RefTableStore', {
// model: 'DsShipping.ux.CustomRefModel',
// proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
//});
//this.storeTRUCKER.load({ params: { condition: "ISTRUCK='1'"} });
////车队
//this.comboxTRUCKER = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '车队',
// store: this.storeTRUCKER,
// forceSelection: true,
// name: 'TRUCKER',
// valueField: 'CustName',
// displayField: 'CodeAndName',
// enableKeyEvents: true,
// listeners: {
// keyup: function (field, e) {
// if (e.getKey() == e.ENTER) {
// _this.onRefreshClick();
// }
// }
// }
//});
////客户加载_报关报检
//this.storeCUSTOMSER = Ext.create('DsExt.ux.RefTableStore', {
// model: 'DsShipping.ux.CustomRefModel',
// proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
//});
//this.storeCUSTOMSER.load({ params: { condition: "ISCUSTOM='1'"} });
////报关行
//this.comboxCUSTOMSER = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '报关行',
// store: this.storeCUSTOMSER,
// forceSelection: true,
// name: 'CUSTOMSER',
// valueField: 'CustName',
// displayField: 'CodeAndName',
// enableKeyEvents: true,
// listeners: {
// keyup: function (field, e) {
// if (e.getKey() == e.ENTER) {
// _this.onRefreshClick();
// }
// }
// }
//});
////报检
//this.comboxINSPECTION = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '报检',
// store: this.storeCUSTOMSER,
// forceSelection: true,
// name: 'INSPECTION',
// valueField: 'CustName',
// displayField: 'CodeAndName'
//});
////客户加载_代理
//this.storeagent = Ext.create('DsExt.ux.RefTableStore', {
// model: 'OpSeaeShipper',
// proxy: { url: '/MvcShipping/MsOpSeae/GetShipperList' }
//});
//this.storeagent.load({ params: { condition: "shippertype=4 AND ISPUBLIC=1 "} });
////收货人
//this.comboxAgent = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '代 理',
// store: this.storeagent,
// forceSelection: true,
// name: 'AGENTID',
// valueField: 'SHORTNAME',
// displayField: 'CodeAndName',
// enableKeyEvents: true,
// listeners: {
// keyup: function (field, e) {
// if (e.getKey() == e.ENTER) {
// _this.onRefreshClick();
// }
// }
// }
//});
//键值维护表_委托单类型
this.StoreBLTYPE = Ext.create('Ext.data.Store', {
fields: ['BLTYPE']
});
this.StoreBLTYPE.add({ "BLTYPE": "整箱" });
this.StoreBLTYPE.add({ "BLTYPE": "拼箱主票" });
this.StoreBLTYPE.add({ "BLTYPE": "拼箱分票" });
this.StoreBLTYPE.add({ "BLTYPE": "拼箱单票" });
this.comboxBLTYPE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '装运方式',
store: this.StoreBLTYPE,
forceSelection: true,
name: 'BLTYPE',
valueField: 'BLTYPE',
displayField: 'BLTYPE'
});
//品名
this.storeCodeGoodsList = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeGoodsModel',
proxy: { url: '/CommMng/BasicDataRef/GetCodeGoodsList' }
});
this.storeCodeGoodsList.load();
this.comboxGOODSNAME = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '品名',
store: this.storeCodeGoodsList,
forceSelection: true,
name: 'GOODSNAME',
valueField: 'GOODNAME',
displayField: 'CodeAndName'
});
//业务来源
this.storeSource = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.SourceModel',
proxy: { url: '/CommMng/BasicDataRef/GetSource' }
});
this.storeSource.load();
this.storeSourceDetail = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.SourceDetailModel',
proxy: { url: '/CommMng/BasicDataRef/GetSourceDetail2' }
});
this.comboxBSSOURCE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '业务来源',
store: this.storeSource,
forceSelection: true,
name: 'BSSOURCE',
valueField: 'SourceName',
displayField: 'SourceName',
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
var recs = DsStoreQueryBy(this.storeSource, 'SourceID', records[0].data.SourceID);
if (recs.getCount() > 0) {
var data = recs.getAt(0).data;
var s = "SOURCEID='" + data.SourceID + "'";
this.storeSourceDetail.load({ params: { condition: s} });
} else {
var BSSOURCEDETAIL = this.formHead.getForm().findField('BSSOURCEDETAIL');
BSSOURCEDETAIL.setValue('');
}
}
}
}
});
this.comboxBSSOURCEDETAIL = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '来源明细',
store: this.storeSourceDetail,
forceSelection: true,
name: 'BSSOURCEDETAIL',
valueField: 'SourceDetail',
displayField: 'SourceDetail'
});
//状态_业务状态
Ext.define('BSSTATUSModel', {
extend: 'Ext.data.Model',
fields: [
{ name: 'Name', type: 'string' }
]
});
var dataBSSTATUS = [{ "Name": "未锁定" }, { "Name": "锁定" }, { "Name": ""}];
var storeBSSTATUS = Ext.create('Ext.data.Store', {
model: 'BSSTATUSModel',
data: dataBSSTATUS
});
//业务状态
this.comboxBSSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '业务锁定',
forceSelection: true,
store: storeBSSTATUS,
name: 'BSSTATUS',
valueField: 'Name',
displayField: 'Name'
});
//费用状态
this.comboxFEESTATUS = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '费用锁定',
forceSelection: true,
store: storeBSSTATUS,
name: 'FEESTATUS',
valueField: 'Name',
displayField: 'Name'
});
////所属部门
//this.storeDept = Ext.create('DsExt.ux.RefTableStore', {
// model: 'DsShipping.ux.DeptModel',
// proxy: { url: '/CommMng/BasicDataRef/GetDeptList' }
//});
//this.storeDept.load();
//this.comboxDept = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '所属部门',
// store: this.storeDept,
// forceSelection: true,
// name: 'SALEDEPT',
// valueField: 'DeptName',
// displayField: 'DeptName'
// //,hidden: true
//});
////国际港口(进口装货港、出口卸货港)
//this.storeCodeDisport = Ext.create('DsExt.ux.RefTableStore', {
// model: 'DsShipping.ux.CodeDisportModel',
// proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportList' }
//});
//this.storeCodeDisport.load();
////国内港口(出口装货港、进口卸货港)
//this.storeCodeLoadport = Ext.create('DsExt.ux.RefTableStore', {
// model: 'DsShipping.ux.CodeLoadportModel',
// proxy: { url: '/CommMng/BasicDataRef/GetCodeLoadportList' }
//});
//this.storeCodeLoadport.load();
//this.comboxPORTLOAD = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '装货港',
// store: this.storeCodeLoadport,
// forceSelection: true,
// name: 'PORTLOAD',
// valueField: 'CNAME',
// displayField: 'CodeAndName',
// enableKeyEvents: true,
// listeners: {
// keyup: function (field, e) {
// if (e.getKey() == e.ENTER) {
// _this.onRefreshClick();
// }
// }
// }
//});
//this.comboxPORTDISCHARGE = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '卸货港',
// store: this.storeCodeDisport,
// forceSelection: true,
// name: 'PORTDISCHARGE',
// valueField: 'CNAME',
// displayField: 'CodeAndName',
// enableKeyEvents: true,
// listeners: {
// keyup: function (field, e) {
// if (e.getKey() == e.ENTER) {
// _this.onRefreshClick();
// }
// }
// }
//});
//this.storeVoyVeg = Ext.create('DsExt.ux.RefTableStore', {
// model: 'DsShipping.ux.VesselModel',
// proxy: { url: '/CommMng/BasicDataRef/GetVesselList' }
//});
//this.storeVoyVeg.load({ params: { condition: ""} });
//this.comboxVoyVeg = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '船 名',
// store: this.storeVoyVeg,
// name: 'VESSEL',
// valueField: 'VESSEL',
// flex: 1,
// displayField: 'VESSEL',
// enableKeyEvents: true,
// listeners: {
// keyup: function (field, e) {
// if (e.getKey() == e.ENTER) {
// _this.onRefreshClick();
// }
// }
// }
//});
//#endregion
//#region formSearch 查询面板
_this = this;
this.formSearch = Ext.widget('form', {
frame: true,
region: 'center',
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: '编号',
name: 'MblNo',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxCustCode, {
fieldLabel: '开船日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'ETDbgn',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '到',
format: 'Y-m-d',
xtype: 'datefield',
name: 'ETDend',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxCARRIER,{
xtype: 'button',
width: 90,
text: "执行查询",
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
},
scope: this
}, {
xtype: 'button',
width: 90,
text: "高级查询",
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
}]
}
//
// , {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxVoyVeg, {
// fieldLabel: '航次',
// name: 'VOYNO',
// enableKeyEvents: true,
// listeners: {
// specialkey: function (field, e) {
// if (e.getKey() == e.ENTER) {
// _this.onRefreshClick();
// }
// }
// }
// }, {
// fieldLabel: '会计期间',
// format: 'Y-m',
// xtype: 'datefield',
// name: 'ACCDATE',
// enableKeyEvents: true,
// listeners: {
// specialkey: function (field, e) {
// if (e.getKey() == e.ENTER) {
// _this.onRefreshClick();
// }
// }
// }
// }, this.comboxPORTLOAD]
// }, {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxCARRIER, this.comboxAgent, this.comboxPORTDISCHARGE, this.comboxFEESTATUS]
// }
]//end items(fieldset 1)
}]//end root items
});
//#endregion formSearch
_this = this;
//按钮工具条_
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [{
text: "重置条件",
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}, '-', {
text: "保存列表样式",
id: "btntest",
menu: [
{ text: "保存",
handler: function (button, event) {
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true);
}
}, { text: "初始化",
handler: function (menu, event) {
_this.InitGrid(_this.initgirdcolums);
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
}
}],
scope: this
}, '-',
{
text: "打印",
iconCls: 'btnprint',
menu: [
{ text: "全部",
handler: function (menu, event) {
_this.Print();
}
}, { text: "选择打印",
handler: function (menu, event) {
_this.PrintSelect();
}
}],
scope: this
}, '-', {
iconCls: "btnotherinf",
menu: [
{ text: "烟台码头状态",
handler: function (menu, event) {
_this.onYanTaiYardStatusClick(menu, event);
}
}, { text: "青岛场站数据",
handler: function (menu, event) {
_this.onGETYARDClick(menu, event);
}
},
//{
// text: "QQCT单票查询",
// handler: function (menu, event) {
// _this.onQQCTBILLClick(menu, event);
// }
//},
{
text: "青岛港单票查询",
handler: function (menu, event) {
_this.onQQCTUBILLClick(menu, event);
}
},
//{
// text: "QQCT、QQCTU海关放行查询",
// handler: function (menu, event) {
// _this.onQQCTQQCTUBILLClick(menu, event);
// }
//},
{
text: "单船查询",
handler: function (menu, event) {
_this.onGETQDVESSELClick(menu, event);
}
}, { text: "放单通知", //"放单通知",
handler: function (menu, event) {
_this.onFDTZClick(menu, event);
}
}],
scope: this
}]
});
//#region 合计列表
this.SumField = [
{ name: 'NOBILL', type: 'number' },
{ name: 'TEU', type: 'number' },
{ name: 'KGS', type: 'number' },
{ name: 'PKGS', type: 'number' },
{ name: 'CBM', type: 'number' }
];
this.storeSumList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: this.SumField,
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetSaleCtnSum',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.girdcolumsSum = [{
sortable: true,
dataIndex: 'NOBILL',
header: '票数',
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TEU',
header: 'TEU',
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'PKGS',
header: '件数',
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; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
header: '毛重',
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; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'CBM',
header: '尺码',
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; },
align: 'right',
width: 80
}
];
this.gridListSum = new Ext.grid.GridPanel({
store: this.storeSumList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsSum
});
this.panelSum = new Ext.Panel({
// title: '合 计',
layout: "border",
height: 70,
region: 'south',
margin: '0 0',
frame: true,
items: [this.gridListSum]
});
//#endregion
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 75,
items: [this.panelBtn, this.formSearch]
});
Ext.apply(this, {
items: [this.panelTop, this.gridList, this.panelSum]
});
this.storeCtnList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'CTNALL', type: 'string' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetCtnList',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.InitGrid(this.girdcolums);
// this.onRefreshClick();
var myDate = new Date();
var mydatestr = Ext.util.Format.date(myDate, 'Y-m');
this.sqlcontext = " B.ACCDATE='" + mydatestr + "'";
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: _this.sqlcontext },
waitMsg: "正在查询数据...",
scope: this
});
this.storeList.on('beforeload', function (store) {
// var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
}, this);
//#region 放单通知
//this.gridList.addListener('itemcontextmenu', this.itemcontextmenu);
this.formReason = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 5,
bodyStyle: "padding:0 0 0 0;background:#FFF;",
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 45,
msgTarget: 'qtip'
},
items: [
{
xtype: 'label',
name: 'FDINFO',
id: "FDINFO",
padding: '0 0 0 0',
html: "",
height: 130,
width: 400
}, {
fieldLabel: '备注', //'备注', id: "REASON",
xtype: 'textareafield',
id: 'REASON',
name: 'REASON', width: 450, height: 50,
listeners: {
change: function (field, eOpts) {
if (field.lastValue != "") {
//this.formHead.getForm().findField('STOCKDATE_1').setValue(field.rawValue);
}
},
scope: this
}
}]
});
var _this2 = this;
this.winFDTZShow = Ext.create('Ext.window.Window', {
id: "winFDTZShow",
title: "放单通知", //"放单通知",
width: 450,
height: 260,
//plain : true,
iconCls: "addicon",
resizable: false,
// 是否可以拖动
// draggable:false,
collapsible: true, // 允许缩放条
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0;background:#FFF;",
items: [this.formReason],
buttons: [
{
text: "确定", //"确定",
minWidth: 70,
handler: function () {
_this2.DoFDTZ(Ext.getCmp("REASON").getRawValue());
}
}, {
text: "取消", //"取消",
minWidth: 70,
handler: function () {
_this2.winFDTZShow.close();
}
}, {
text: "打印", //"打印",
minWidth: 70,
handler: function () {
_this2.Print_FDTZ();
}
}]
});
//#endregion
}, //end initUIComponents
InitGrid: function (grid) {
//var agirdcolums = Ext.clone(this.gridList.columns);
var agirdcolums = grid;
this.storecodeservice.load({
params: { condition: "OPTYPE='1'" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
for (i = 0; i < this.storecodeservice.getCount(); i += 1) {
var itemindex = i + 1;
var memberyf = this.storecodeservice.getAt(i);
for (var j = 0; j < agirdcolums.length; j++) {
if (agirdcolums[j].dataIndex == memberyf.data.OPField) {
agirdcolums[j].header = memberyf.data.SERVICENAME;
agirdcolums[j].hidden = false;
}
}
};
}
this.gridList.reconfigure(this.storeList, agirdcolums);
}
},
scope: this
});
},
onRefreshClick: function (button, event) {
//var girdcolums = this.gridList.getColumnMode();
var sql = this.getCondition();
this.sqlcontext = sql;
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
this.onRefreshSumClick(sql);
},
onDsQuery: function () {
//var girdcolums = this.gridList.getColumnMode();
var sql = this.sqlcontext;
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
this.onRefreshSumClick(sql);
},
onRefreshSumClick: function (sql) {
this.SumField = [
{ name: 'NOBILL', type: 'number' },
{ name: 'TEU', type: 'number' },
{ name: 'KGS', type: 'number' },
{ name: 'PKGS', type: 'number' },
{ name: 'CBM', type: 'number' }
];
this.girdcolumsSum = [{
sortable: true,
dataIndex: 'NOBILL',
header: '票数',
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TEU',
header: 'TEU',
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'PKGS',
header: '件数',
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; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
header: '毛重',
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; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'CBM',
header: '尺码',
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; },
align: 'right',
width: 80
}
];
_this = this;
this.storeCtnList.load({ params: { condition: sql },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
for (i = 0; i < _this.storeCtnList.getCount(); i += 1) {
var itemindex = i + 1;
var memberyf = _this.storeCtnList.getAt(i);
_this.SumField.push({ name: 'C' + memberyf.data.CTNALL, type: 'number' });
_this.girdcolumsSum.push({
sortable: true,
dataIndex: 'C' + memberyf.data.CTNALL,
header: memberyf.data.CTNALL,
width: 80
});
};
}
_this.storeSumList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: _this.SumField,
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetSaleCtnSum',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
_this.gridListSum.reconfigure(_this.storeSumList, _this.girdcolumsSum);
_this.storeSumList.load({
params: { condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
}
}
});
},
//end initUIComponents
//#region 舱单状态
onCustomRefreshStatusClick: function (button, event) {
var GidStr = '';
var records = this.GridCheckBoxModel.selected.items;
if (records.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要刷新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
if (rec.data.MANIFESTSTATUS != '装载放行') {
bodyAddDatas.push(rec);
}
}
_this = this;
if (bodyAddDatas.length == 0) {
Ext.Msg.show({ title: '提示', msg: '没有要刷新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
Ext.Msg.wait('正在提取数据...');
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Ajax.request({
waitMsg: '正在锁定...',
url: '/MvcShipping/MsOpSeae/Refresh56CDCSTATUSList',
params: {
data: jsonbodyAddDatas
},
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;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.onRefreshClick();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
},
onCustomStatusClick: function (rec) {
var bsno = rec.get('BSNO');
var mblno = rec.get('MBLNO')
if (mblno == "") {
return;
}
Ext.Msg.wait('正在提取数据...');
Ext.Ajax.request({
waitMsg: '正在提取数据...',
url: '/MvcShipping/MsOpSeae/Get56CDCSTATUSList',
params: {
mblno: mblno,
bsno: bsno
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var statusdata = jsonresult.data;
var boxitems = "";
formCustomDataShow = Ext.widget('form', {
region: 'center',
autoScroll: true, height: 460,
// border: false,
bodyPadding: 0,
html: jsonresult.data
});
me = this;
winCustomDataShow = Ext.create('Ext.window.Window', {
title: "",
// closeAction: 'hide',
width: 1000,
height: 480,
layout: 'fit',
resizable: true,
modal: true,
closeAction: 'close',
closable: true,
items: [formCustomDataShow],
buttons: [{
text: "关闭",
minWidth: 70,
handler: function () {
winCustomDataShow.close();
}
}]
});
winCustomDataShow.show();
rec.set('MANIFESTSTATUS', jsonresult.Message);
rec.commit();
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
},
//#endregion
//#region 场站查询
onGETYARDClick: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var BSNO = record.data.BSNO;
var MBLNO = record.data.MBLNO;
var YARD = record.data.YARD;
if (MBLNO == "" || YARD == "") {
Ext.Msg.show({ title: '提示', msg: '提单号和场站不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
Ext.Msg.wait('正在提取数据...');
Ext.Ajax.request({
waitMsg: '正在提取数据...',
url: '/MvcShipping/MsOpSeae/GetyardctnList',
params: {
bs: BSNO,
mblno: MBLNO,
yard: YARD,
isweb: true
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var statusdata = jsonresult.data;
var boxitems = "";
formCustomDataShow = Ext.widget('form', {
region: 'center',
autoScroll: true, height: 460,
// border: false,
bodyPadding: 0,
html: jsonresult.data
});
me = this;
winCustomDataShow = Ext.create('Ext.window.Window', {
title: "",
// closeAction: 'hide',
width: 1100,
height: 500,
layout: 'fit',
resizable: true,
modal: true,
closeAction: 'close',
closable: true,
items: [formCustomDataShow],
buttons: [{
text: "关闭",
minWidth: 70,
handler: function () {
winCustomDataShow.close();
}
}]
});
winCustomDataShow.show();
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
},
//#endregion
//#region QQCT单票查询
onQQCTBILLClick: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var mblno = record.data.MBLNO;
if (mblno == "") {
Ext.Msg.show({ title: '提示', msg: '提单号不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
Ext.Msg.wait('正在提取数据...');
Ext.Ajax.request({
waitMsg: '正在提取数据...',
url: '/MvcShipping/MsOpSeae/GetQQCTBILL',
params: {
mblno: mblno,
bsno: ''
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var statusdata = jsonresult.data;
var boxitems = "";
formCustomDataShow = Ext.widget('form', {
region: 'center',
autoScroll: true, height: 460,
// border: false,
bodyPadding: 0,
html: jsonresult.data
});
me = this;
winCustomDataShow = Ext.create('Ext.window.Window', {
title: "",
// closeAction: 'hide',
width: 1100,
height: 500,
layout: 'fit',
resizable: true,
modal: true,
closeAction: 'close',
closable: true,
items: [formCustomDataShow],
buttons: [{
text: "关闭",
minWidth: 70,
handler: function () {
winCustomDataShow.close();
}
}]
});
winCustomDataShow.show();
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
},
//#endregion
//#region QQCTU单票查询
onQQCTUBILLClick: function (button, event) {
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];
var mblno = record.data.MBLNO;
var bsno = record.data.BSNO;
if (mblno === "") {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.TiDanHaoBuNengWeiKong, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/MvcShipping/MsOpSeae/GetyardctnList',
params: {
bs: bsno,
mblno: mblno,
yard: 'YGT',
isweb: true
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var statusdata = jsonresult.data;
var boxitems = "";
formCustomDataShow = Ext.widget('form', {
region: 'center',
autoScroll: true, height: 460,
// border: false,
bodyPadding: 0,
html: jsonresult.data
});
me = this;
winCustomDataShow = Ext.create('Ext.window.Window', {
title: "",
// closeAction: 'hide',
width: 1100,
height: 500,
layout: 'fit',
resizable: true,
modal: true,
closeAction: 'close',
closable: true,
items: [formCustomDataShow],
buttons: [{
text: Zi.LAN.GuanBi, //"关闭",
minWidth: 70,
handler: function () {
winCustomDataShow.close();
}
}]
});
winCustomDataShow.show();
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
},
//#endregion
//#region QQCT、QQCTU海关放行查询
onQQCTQQCTUBILLClick: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var mblno = record.data.MBLNO;
if (mblno == "") {
Ext.Msg.show({ title: '提示', msg: '提单号不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
Ext.Msg.wait('正在提取数据...');
Ext.Ajax.request({
waitMsg: '正在提取数据...',
url: '/MvcShipping/MsOpSeae/GetQQCTQQCTUBILL',
params: {
mblno: mblno,
bsno: ''
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var statusdata = jsonresult.data;
var boxitems = "";
formCustomDataShow = Ext.widget('form', {
region: 'center',
autoScroll: true, height: 460,
bodyPadding: 0,
html: jsonresult.data
});
me = this;
winCustomDataShow = Ext.create('Ext.window.Window', {
title: "",
width: 1100,
height: 500,
layout: 'fit',
resizable: true,
modal: true,
closeAction: 'close',
closable: true,
items: [formCustomDataShow],
buttons: [{
text: "关闭",
minWidth: 70,
handler: function () {
winCustomDataShow.close();
}
}]
});
winCustomDataShow.show();
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
});
}
},
//#endregion
//#region 单船查询
onGETQDVESSELClick: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var vessel = record.data.VESSEL;
var voyno = record.data.VOYNO;
if (vessel == "") {
Ext.Msg.show({ title: '提示', msg: '船名不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
Ext.Msg.wait('正在提取数据...');
Ext.Ajax.request({
waitMsg: '正在提取数据...',
url: '/MvcShipping/MsOpSeae/GetQDVESSEL',
params: {
vessel: vessel,
voyno: voyno
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var statusdata = jsonresult.data;
var boxitems = "";
formCustomDataShow = Ext.widget('form', {
region: 'center',
autoScroll: true, height: 460,
// border: false,
bodyPadding: 0,
html: jsonresult.data
});
me = this;
winCustomDataShow = Ext.create('Ext.window.Window', {
title: "",
// closeAction: 'hide',
width: 1100,
height: 500,
layout: 'fit',
resizable: true,
modal: true,
closeAction: 'close',
closable: true,
items: [formCustomDataShow],
buttons: [{
text: "关闭",
minWidth: 70,
handler: function () {
winCustomDataShow.close();
}
}]
});
winCustomDataShow.show();
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
},
//#endregion
//#region 烟台港箱动态
onYanTaiYardStatusClick: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var mblno = record.data.MBLNO;
if (mblno == "") {
Ext.Msg.show({ title: '提示', msg: '没有要刷新查看的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
var yantaiyardview = new Shipping.YantaiYardView({
});
yantaiyardview.mblno = mblno;
yantaiyardview.show();
return;
}
},
//#endregion
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
}, //onDeleteClick
getCondition: function () {
var form = this.formSearch.getForm();
// var form2 = this.formSearch2.getForm();
if (!form.isValid()) {
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
return '';
}
//隐藏查询面板
// this.panelSearch.hide();
this.isShowAdvancedQuery = 0;
//
var sql = "";
//#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 + "%')");
//客户名称
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 ACCDATE = form.findField('ACCDATE').getRawValue();
// sql = sql + getAndConSql(sql, ACCDATE, "B.ACCDATE='" + ACCDATE + "'");
// //船名
// var VESSEL = form.findField('VESSEL').getValue();
// sql = sql + getAndConSql(sql, VESSEL, "B.VESSEL like '%" + VESSEL + "%'");
// //航次
// var VOYNO = form.findField('VOYNO').getValue();
// sql = sql + getAndConSql(sql, VOYNO, "B.VOYNO like '%" + VOYNO + "%'");
// //装货港
// var PORTLOAD = form.findField('PORTLOAD').getValue();
// sql = sql + getAndConSql(sql, PORTLOAD, "B.PORTLOAD like '%" + PORTLOAD + "%'");
// //卸货港
// var PORTDISCHARGE = form.findField('PORTDISCHARGE').getValue();
// sql = sql + getAndConSql(sql, PORTDISCHARGE, "B.PORTDISCHARGE like '%" + PORTDISCHARGE + "%'");
//船公司
var CARRIER = form.findField('CARRIER').getValue();
sql = sql + getAndConSql(sql, CARRIER, "B.CARRIER='" + CARRIER + "'");
// //代理
// var AGENTID = form.findField('AGENTID').getValue();
// sql = sql + getAndConSql(sql, AGENTID, "B.AGENTID='" + AGENTID + "'");
// //费用状态
// var FEESTATUS = form.findField('FEESTATUS').getValue();
// if (FEESTATUS != null) {
// if (FEESTATUS.toString().trim() == "锁定") {
// sql = sql + getAndConSql(sql, FEESTATUS, "B.FEESTATUS=1");
// }
// else if (FEESTATUS.toString().trim() == "未锁定") {
// sql = sql + getAndConSql(sql, FEESTATUS, "B.FEESTATUS=0");
// }
// }
//#endregion formSearch
//#region formSearch2 隐藏查询面板
// //建单日期
// var CREATETIMEbgn = form2.findField('CREATETIMEbgn').getRawValue();
// sql = sql + getAndConSql(sql, CREATETIMEbgn, "B.CREATETIME >='" + CREATETIMEbgn + "'");
// var CREATETIMEend = form2.findField('CREATETIMEend').getRawValue();
// sql = sql + getAndConSql(sql, CREATETIMEend, "B.CREATETIME <='" + CREATETIMEend + "'");
// //接单日期
// var BSDATEbgn = form2.findField('BSDATEbgn').getRawValue();
// sql = sql + getAndConSql(sql, BSDATEbgn, "B.BSDATE >='" + BSDATEbgn + "'");
// var BSDATEend = form2.findField('BSDATEend').getRawValue();
// sql = sql + getAndConSql(sql, BSDATEend, "B.BSDATE <='" + BSDATEend + "'");
// //操作人
// var OP = form2.findField('OP').getValue();
// sql = sql + getAndConSql(sql, OP, "B.OP='" + OP + "'");
// //揽货人
// var SALE = form2.findField('SALE').getValue();
// sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'");
// // //录入人
// // var INPUTBY = form2.findField('INPUTBY').getValue();
// // sql = sql + getAndConSql(sql, INPUTBY, "INPUTBY='" + INPUTBY + "'");
// // //
// // var BSTYPE = form2.findField('BSTYPE').getValue();
// // sql = sql + getAndConSql(sql, BSTYPE, "BSTYPE='" + BSTYPE + "'");
// //牌号
// var CNTRTOTAL = form2.findField('CNTRTOTAL').getValue();
// sql = sql + getAndConSql(sql, CNTRTOTAL, "B.CNTRTOTAL like '%" + CNTRTOTAL + "%'");
// //业务状态
// var BSSTATUS = form2.findField('BSSTATUS').getValue();
// if (BSSTATUS != null) {
// if (BSSTATUS.toString().trim() == "锁定") {
// sql = sql + getAndConSql(sql, BSSTATUS, "B.BSSTATUS=1");
// }
// else if (BSSTATUS.toString().trim() == "未锁定") {
// sql = sql + getAndConSql(sql, BSSTATUS, "B.BSSTATUS=0");
// }
// }
// // //车队
// // var TRUCKER = form2.findField('TRUCKER').getValue();
// // sql = sql + getAndConSql(sql, TRUCKER, "TRUCKER='" + TRUCKER + "'");
// // //报关行
// // var CUSTOMSER = form2.findField('CUSTOMSER').getValue();
// // sql = sql + getAndConSql(sql, CUSTOMSER, "CUSTOMSER='" + CUSTOMSER + "'");
// //业务来源
// var BSSOURCE = form2.findField('BSSOURCE').getValue();
// sql = sql + getAndConSql(sql, BSSOURCE, "B.BSSOURCE='" + BSSOURCE + "'");
// //来源明细
// var BSSOURCEDETAIL = form2.findField('BSSOURCEDETAIL').getValue();
// sql = sql + getAndConSql(sql, BSSOURCEDETAIL, "B.BSSOURCEDETAIL='" + BSSOURCEDETAIL + "'");
// //装运方式
// var BLTYPE = form2.findField('BLTYPE').getValue();
// sql = sql + getAndConSql(sql, BLTYPE, "B.BLTYPE='" + BLTYPE + "'");
// // //备注
// // var REMARK = form2.findField('REMARK').getValue();
// // sql = sql + getAndConSql(sql, REMARK, "B.REMARK like '%" + REMARK + "%'");
//#endregion formSearch2
return sql;
},
// setIsShowAdvancedQuery: function () {
// if (this.isShowAdvancedQuery == 0) {
// this.panelSearch.show();
// this.isShowAdvancedQuery = 1;
// } else {
// this.panelSearch.hide();
// this.isShowAdvancedQuery = 0;
// }
// },
OprationSwap: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.SelectedRecord;
ret[3] = this.selectbsno;
ret[4] = 'op_seae';
return ret;
},
//#region 放单通知 gridList_Edit的右键菜单
itemcontextmenu: function (his, record, item, index, e) {
// itemcontextmenu( Ext.view.View this, Ext.data.Model record,
// HTMLElement item, Number index, Ext.EventObject e, Object eOpts )
// 分类代码表的右键菜单
e.preventDefault();
e.stopEvent(); // 取消浏览器默认事件
//_this2 = this;
//var selections = this.gridList.getSelectionModel().getSelection();
//var record = selections[0];
Ext.getCmp("FDINFO").update("");
_this = this;
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO',
async: false,
params: {
BSNO: "'" + record.data.BSNO + "'"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success) {
var _html = "<span style=\"clear:both;\">";
_this.结费类型 = result.data[0].结费类型.replace("<span style=\"colorred\">", " ").replace("</span>", " ");
_this.欠费超期 = result.data[0].欠费超期;
_this.累计欠费 = result.data[0].累计欠费;
_this.信用额度 = result.data[0].信用额度;
_html = _html + "<span style=\"clear:both;color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].结费类型 + "</p></span>";
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].欠费超期 + "</p></span>";
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].累计欠费 + "</p></span>";
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].信用额度 + "</p></span>";
_html = _html + "<br></br>";
if (result.data[0].IS欠费超期 == "yes") {
_html = _html + "&nbsp;&nbsp;&nbsp;&nbsp<span style=\"color:#900000;text-decoration:none;\">欠费超期</span>";
}
if (result.data[0].IS累计欠费 == "yes") {
_html = _html + "&nbsp;&nbsp;&nbsp;&nbsp<span style=\"color:#900000;text-decoration:none;\">总欠费超额度</span>";
}
_html = _html + "</span><br></br>";
Ext.getCmp("FDINFO").update(_html);
} else {
//return;
}
} else {
return;
}
},
scope: this
});
var array = [
{
text: Zi.LAN.FDTZ, //'放单通知',
handler: function () {
Ext.getCmp("MainPanel").SelectedRecord = record;
Ext.getCmp("winFDTZShow").show();
}
}
];
var nodemenu = new Ext.menu.Menu({
items: array
});
nodemenu.showAt(e.getXY()); // 菜单打开的位置
},
onFDTZClick: function (his, record, item, index, e) {
Ext.getCmp("FDINFO").update("");
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title:'提示', msg:'请先选择业务', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var rec = selections[0];
var BSNO = rec.data.BSNO;
if (rec.data.ISSUETYPE == '正本' && (rec.data.BLISSUESTATUS != '提单签入' && rec.data.BLISSUESTATUS != '驳回提单签入')) {
Ext.Msg.show({ title: '提示', msg: '只有已提单签入的正本提单,才允许放单通知!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
_this = this;
Ext.Ajax.request({
waitMsg: '正在操作数据',
url: '/MvcShipping/MsOp_BLISSUE/GetBLINFO',
async: false,
params: {
BSNO: "'" + BSNO + "'"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success) {
var _html = "<span style=\"clear:both;\">";
_this.结费类型 = result.data[0].结费类型.replace("<span style=\"colorred\">", " ").replace("</span>", " ");
_this.欠费超期 = result.data[0].欠费超期;
_this.累计欠费 = result.data[0].累计欠费;
_this.信用额度 = result.data[0].信用额度;
_html = _html + "<span style=\"clear:both;color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].结费类型 + "</p></span>";
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].欠费超期 + "</p></span>";
if (result.data[0].超期欠费 != '')
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].超期欠费 + "</p></span>";
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].累计欠费 + "</p></span>";
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].信用额度 + "</p></span>";
_html = _html + "<br></br>";
if (result.data[0].IS欠费超期 == "yes") {
_html = _html + "&nbsp;&nbsp;&nbsp;&nbsp<span style=\"color:#900000;text-decoration:none;\">欠费超期</span>";
}
if (result.data[0].IS累计欠费 == "yes") {
_html = _html + "&nbsp;&nbsp;&nbsp;&nbsp<span style=\"color:#900000;text-decoration:none;\">总欠费超额度</span>";
}
_html = _html + "</span><br></br>";
Ext.getCmp("FDINFO").update(_html);
} else {
//return;
}
} else {
return;
}
},
scope: this
});
Ext.getCmp("MainPanel").SelectedRecord = rec;
Ext.getCmp("winFDTZShow").show();
},
DoFDTZ: function (REASON) {
Ext.define('MsOp_BLISSUEmb', {
extend: 'Ext.data.Model',
idProperty: 'GID',
fields: [
{ name: 'GID', type: 'string' },
{ name: 'BSNO', type: 'string' },
{ name: 'BLNO', type: 'string' },
{ name: 'HBLNO', type: 'string' },
{ name: 'ZDFD', type: 'string' },
{ name: 'BLNAME', type: 'string' },
{ name: 'BLSTATUS', type: 'string' },
{ name: 'BLORDERNO', type: 'string' },
{ name: 'ISSUETYPE', type: 'string' },
{ name: 'OPNAME', type: 'string' },
{ name: 'OPTIME', type: 'string' },
{ name: 'BSINKNO', type: 'string' },
{ name: 'REMARK', type: 'string' },
{ name: 'DELFLAG', type: 'string' },
{ name: 'EXPRESSCORP', type: 'string' },
{ name: 'EXPRESSNO', type: 'string' },
{ name: 'ISADD', type: 'string' },
{ name: 'PUTSINGLETIME', type: 'string' },
{ name: 'PUTSINGLE', type: 'string' },
{ name: 'PAYTIME', type: 'string' },
{ name: 'PAYRMB', type: 'string' },
{ name: 'PAYUSD', type: 'string' },
{ name: 'BLTYPE', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'SALE', type: 'string' },
{ name: 'ACCTYPE', type: 'string' },
{ name: 'ETD', type: 'string' },
{ name: 'STLDATE', type: 'string' },
{ name: 'CARRIER', type: 'string' },
{ name: 'VESSEL', type: 'string' },
{ name: 'VOYNO', type: 'string' },
{ name: 'OP', type: 'string' },
{ name: 'BLISSUESTATUS', type: 'string' },
{ name: 'TSFD', type: 'string' },
{ name: 'XYTS', type: 'string' },
{ name: 'CQTS', type: 'string' },
{ name: 'SJTS', type: 'string' },
{ name: 'RMBNODR', type: 'string' },
{ name: 'USDNODR', type: 'string' },
{ name: 'TTLNODR', type: 'string' },
{ name: 'TTLDR', type: 'string' },
{ name: 'OPLBNAME', type: 'string' },
{ name: 'SPREMARK', type: 'string' }
]
});
var _op_blissue = Ext.create('MsOp_BLISSUEmb', {
'GID': '',
'BSNO': this.SelectedRecord.data.BSNO,
'BLNO': this.SelectedRecord.data.MBLNO,
'BLNAME': '提单',
'BLSTATUS': '',
'BLORDERNO': '',
'ISSUETYPE': this.SelectedRecord.data.ISSUETYPE,
'OPNAME': '',
'OPTIME': '',
'BSINKNO': '',
'REMARK': '',
'DELFLAG': '0',
'EXPRESSCORP': '',
'EXPRESSNO': '',
'ISADD': '0',
'PUTSINGLETIME': '',
'PUTSINGLE': '',
'PAYTIME': '',
'PAYRMB': '0',
'PAYUSD': '0'
});
var bodyList = [];
bodyList.push(_op_blissue);
var jsonBody = ConvertRecordsToJsonAll(bodyList);
if (jsonBody == '') {
return;
}
Ext.Ajax.request({
waitMsg:'正在操作数据',
url: '/MvcShipping/MsOp_BLISSUE/FDTZ',
params: {
USERID: USERID,
data: jsonBody,
REASON: REASON
},
callback: function (options, success, response) {
if (success) {
this.winFDTZShow.close();
Ext.getCmp("REASON").setValue("");
this.storeList.reload();
//this.onRefreshClick();
}
},
failure: function (response, options) {
Ext.Msg.show({ title:'警告', msg:'服务器响应出错!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
},
getFDINFO: function (result) {
var _html = "<span style=\"clear:both;\">";
_this = this;
_this.结费类型 = result.data[0].result.data[0].结费类型.replace("<span style=\"colorred\">", " ").replace("</span>", " ");
_this.欠费超期 = result.data[0].欠费超期;
_this.累计欠费 = result.data[0].累计欠费;
_this.信用额度 = result.data[0].信用额度;
_html = _html + "<span style=\"clear:both;color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].结费类型 + "</p></span>";
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].欠费超期 + "</p></span>";
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].累计欠费 + "</p></span>";
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>&nbsp;&nbsp;&nbsp;&nbsp" + result.data[0].信用额度 + "</p></span>";
_html = _html + "<br></br>";
if (result.data[0].IS欠费超期 == "yes") {
_html = _html + "&nbsp;&nbsp;&nbsp;&nbsp<span style=\"color:#900000;text-decoration:none;\">欠费超期</span>";
}
if (result.data[0].IS累计欠费 == "yes") {
_html = _html + "&nbsp;&nbsp;&nbsp;&nbsp<span style=\"color:#900000;text-decoration:none;\">总欠费超额度</span>";
}
_html = _html + "</span><p></p>";
return _html;
},
//#endregion
Print: function () {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
var bsno = '11111';
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length != 0) {
var record = selections[0];
bsno = record.data.BSNO;
}
var sortstr = 'ETD,MBLNO ';
if (this.sortfield != '' && this.sortdire != '') {
sortstr = this.sortfield + ' ' + this.sortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsOpSeae/GetDataListStr',
scope: this,
params: {
condition: _this.sqlcontext,
printstr: 'true',
sort: sortstr
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnstr = jsonresult.data;
var printType = 'MSOPSEAELIST';
var sql1 = returnstr;
var sql2 = "select * from op_seae where BSNO='" + bsno + "'";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
} else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
},
PrintSelect: function () {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
var selectedRecords = [];
var storeadd = null;
selectedRecords = this.GridCheckBoxModel.selected.items;
if (selectedRecords.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要打印的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var sortstr = 'MBLNO desc';
if (this.sortfield != '' && this.sortdire != '') {
this.sortfield = this.sortfield.replace('OPSTATUS','(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC)')
this.sortfield = this.sortfield.replace('DRFEESTATUS', 'dbo.F_GetBillDrFeeStatus(B.BSNO)')
this.sortfield = this.sortfield.replace('CRFEESTATUS', 'dbo.F_GetBillCrFeeStatus(B.BSNO)')
this.sortfield = this.sortfield.replace('BSSTATUSREF', 'BSSTATUS')
this.sortfield = this.sortfield.replace('FEESTATUSREF', 'FEESTATUS')
sortstr = this.sortfield + ' ' + this.sortdire;
}
var feeGidSql = '';
for (var i = 0; i < selectedRecords.length; i++) {
var record = selectedRecords[i];
var feeGId = "'" + record.get('BSNO') + "'";
if (feeGidSql == '') {
feeGidSql = feeGId;
} else {
feeGidSql = feeGidSql + "," + feeGId;
}
};
var bsno = '11111';
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length != 0) {
var record = selections[0];
bsno = record.data.BSNO;
}
var printType = 'MSOPSEAELISTSELECT';
var sql1 = "select * from op_seae B WHERE BSNO IN (" + feeGidSql + ") order by " + sortstr;
var sql2 = "select * from op_seae where BSNO='" + bsno + "'";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
}
});