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.

1341 lines
48 KiB
JavaScript

9 months ago
Ext.namespace('Shipping');
Shipping.MsOpSeaiFenIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsOpSeaiFenIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsOpSeaiFenIndex, Ext.Panel, {
PageSize: 20,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
EditRecord: null,
BsNo: '',
mainWin: null,
initUIComponents: function () {
var mainform = window.panelEdit;
this.EditRecord = mainform.editRecord;
this.BsNo = this.EditRecord.get('BSNO');
this.mainWin = getMainForm(window.parent.opener);
this.formname = "formMsOpSeaiFenIndex"; //页面名称
//定义数据集
this.storectndisp = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CtnDispModel',
proxy: { url: '/CommMng/BasicDataRef/GetCtnDisp' }
});
this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsOP',
proxy: { url: '/MvcShipping/MsBaseInfo/GetOpRang' }
});
this.StoreOpRange.load({ params: { optype: "modSeaImportList"} });
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'MsOpSeaiModel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeai/GetFenList',
reader: {
id: 'BSNO',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//#region List列表显示信息
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
width: 30
});
this.girdcolums = [{
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';
value = Zi.LAN.SHENHETONGGUO;
} else if (value == '录入状态') {
value = Zi.LAN.LURUZHUAGNTAI;
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.TIJIAOSHENHE;
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settlepart';
value = Zi.LAN.BUFENJIESUAN;
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
value = Zi.LAN.JIESUANWANBI;
} else if (value == '未录入') {
value = Zi.LAN.WEILURU;
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENSHENHE;
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENTIJIAO;
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
value = Zi.LAN.BOHUITIJIAO;
}
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';
value = Zi.LAN.SHENHETONGGUO;
} else if (value == '录入状态') {
value = Zi.LAN.LURUZHUAGNTAI;
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.TIJIAOSHENHE;
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settlepart';
value = Zi.LAN.BUFENJIESUAN;
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
value = Zi.LAN.JIESUANWANBI;
} else if (value == '未录入') {
value = Zi.LAN.WEILURU;
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENSHENHE;
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENTIJIAO;
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
value = Zi.LAN.BOHUITIJIAO;
}
return value;
}
}, {
sortable: true,
id: '',
dataIndex: 'BillFeeStatus',
header: '整票状态', //'整票状态',
width: 60,
renderer: function (value, meta) {
if (value == '0') {
return Zi.LAN.WEITIJIAO;
} else if (value == '1') {
meta.tdCls = 'feestatus_refer';
return Zi.LAN.ZHENGPIAOTIJIAO;
} else if (value == '2') {
meta.tdCls = 'feestatus_pass';
return Zi.LAN.SHENHETONGGUO;
} else if (value == '4') {
meta.tdCls = 'feestatus_nopass';
return Zi.LAN.ZHENGPIAOBOHUI;
} else {
return "";
}
}
},
{
sortable: true,
id: '',
dataIndex: 'DRINVSTATUS',
header: Zi.LAN.DRINVSTATUS, //'应收开票',
align: 'center',
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">' + Zi.LAN.YIKAIPIAO + '</a>'
meta.tdCls = 'feestatus_pass';
} else if (value == '部分开票') {
meta.tdCls = 'feestatus_refer';
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + Zi.LAN.BOFENKAIPIAO + '</a>'
} else if (value == '未开票') {
value = Zi.LAN.WEIKAIPIAO;
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'CRINVSTATUS',
header: Zi.LAN.CRINVSTATUS, //'应收开票',
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/BsCrView?handle=check&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (value == '已开票') {
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + Zi.LAN.YIKAIPIAO + '</a>'
meta.tdCls = 'feestatus_pass';
} else if (value == '部分开票') {
meta.tdCls = 'feestatus_refer';
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + Zi.LAN.BOFENKAIPIAO + '</a>'
} else if (value == '未开票') {
value = Zi.LAN.WEIKAIPIAO;
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'DRDUISTATUS',
header: Zi.LAN.DRDUISTATUS, //'应收开票',
align: 'center',
// xtype: 'actioncolumn',
width: 60,
renderer: function (value, meta, record) {
if (value == '已对账') {
// value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">已开票</a>'
meta.tdCls = 'feestatus_pass';
value = Zi.LAN.YIDUIZHANG;
} else if (value == '部分对账') {
meta.tdCls = 'feestatus_refer';
// value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">部分开票</a>'
value = Zi.LAN.BUFENDUIZHANG;
} else if (value == '未对账') {
value = Zi.LAN.WEIDUIZHANG;
}
return value;
}
},
{
sortable: true,
dataIndex: 'WMSTYPE',
header: Zi.LAN.WMSTYPE, //'仓储类型',
width: 60
},
{
sortable: true,
dataIndex: 'OPSTATUS',
header: Zi.LAN.OPSTATUS2, //'状态管理',
width: 80,
renderer: function (value, metadata, record, rowIndex) {
metadata.style = "background-color:" + record.data.OPSTATUSCOLOR;
return value;
}
},
{
sortable: true,
dataIndex: 'ETD',
header: Zi.LAN.ETD, //'到港日期',
width: 80
},
{
sortable: true,
dataIndex: 'ETA',
header: Zi.LAN.ETA, //'开船日期',
width: 80
},
{
sortable: true,
dataIndex: 'INVNO',
header: Zi.LAN.INVNO, //'开船日期',
width: 80
},
{
sortable: true,
dataIndex: 'MBLNO',
header: Zi.LAN.MBLNO, //'主提单号',
width: 120,
renderer: function (value, meta) {
meta.tdCls = 'mblno';
var btnurl = getGridCopyButton(value);
return btnurl + value;
}
},
{
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: 'FORWARDER',
header: Zi.LAN.FORWARDER, //'委托方式',
width: 80
},
{
sortable: true,
dataIndex: 'CUSTNO',
header: Zi.LAN.CUSTNO, //'委托编号',
width: 120,
renderer: function (value, meta) {
meta.tdCls = 'mblno';
btnurl = getGridCopyButton(value);
return btnurl + value;
}
}, {
sortable: true,
id: '',
dataIndex: 'ORDERNO',
header: Zi.LAN.ORDERNO, //'业务编号',
width: 120
},
{
sortable: true,
dataIndex: 'HBLNO',
header: Zi.LAN.HBLNO, //'分提单号',
width: 120,
renderer: function (value, meta) {
meta.tdCls = 'mblno';
btnurl = getGridCopyButton(value);
return btnurl + value;
}
},
{
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: 'DOC',
header: Zi.LAN.DOC, //'揽货人',
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: 'STORAGENAME',
header: Zi.LAN.STORAGENAME, //'仓库',
width: 100
},
{
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,
id: '',
dataIndex: 'SALECORP',
header: Zi.LAN.SALECOMPANY,
width: 60
},
{
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,
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: 'BLISSUESTATUS',
header: Zi.LAN.BLISSUESTATUS, //'货物标识',
width: 120,
renderer: function (value, meta) {
if (value == '提单签出') {
meta.tdCls = 'feestatus_pass';
value = Zi.LAN.TiDanQianChu;
} else if (value == '提单签入') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.TiDanQianRu;
}
return value;
}
}, {
dataIndex: 'APPLYNO',
header: Zi.LAN.APPLYNO, //'申请放箱号',
width: 120
}, {
dataIndex: 'DEST_RTCNT_TIME',
header: Zi.LAN.DEST_RTCNT_TIME,
width: 100
}, {
sortable: true,
dataIndex: 'AMEND',
header: Zi.LAN.AMEND, //'更改单',
width: 80,
renderer: function (value, meta, record) {
if (value != '0')
return '√';
else
return '';
}
}, {
dataIndex: 'CTNNUM',
header: Zi.LAN.CTNNUM, //'申请放箱号',
width: 120
}, {
dataIndex: 'WMSCTNNUM',
header: Zi.LAN.WMSCTNNUM, //'申请放箱号',
width: 120
}, {
dataIndex: 'REMARK',
header: Zi.LAN.REMARK, //'货物标识',
width: 120
}, {
dataIndex: 'REMARK2',
header: Zi.LAN.REMARK + '2', //'货物标识',
width: 120
}, {
dataIndex: 'DESCRIPTION',
header: Zi.LAN.DESCRIPTION, //'货物标识',
width: 120
}, {
dataIndex: 'MaTou',
header: Zi.LAN.MaTou, //'码头',
width: 120
}, {
dataIndex: 'SALEDEPT',
header: Zi.LAN.SALEDEPT2, //'码头',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'SERVICE',
header: Zi.LAN.SERVICE, //'航线',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'DESTINATION',
header: Zi.LAN.DESTINATION, //'航线',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'SHIPPER',
header: Zi.LAN.SHIPPERID, //'SHIPPER',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'CONSIGNEE',
header: Zi.LAN.CONSIGNEEID, //'CONSIGNEE',
width: 100,
filter: {
type: 'string',
dataIndex: 'CONSIGNEE'
}
},
{
sortable: true,
id: '',
dataIndex: 'NOTIFYPARTY',
header: Zi.LAN.NOTIFYPARTYID, //'NOTIFYPARTY',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'AGENTID',
header: Zi.LAN.AGENTID, //'NOTIFYPARTY',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'TIHUOTIME',
header: Zi.LAN.TIHUOTIME, //'NOTIFYPARTY',
width: 100
}, {
sortable: false,
dataIndex: 'CHANGEDOCSTATUS',
text: Zi.LAN.CHANGEDOCSTATUS,
width: 56,
renderer: function (value, meta, record) {
if (record.data.CHANGEDOCSTATUS == 1) {
return '<a style="text-decoration:none;"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.CHANGEDOCSTATUS == 2) {
return '<a style="text-decoration:none;"><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) {
if (record.data.CUSTOMSSTATUS == 1) {
return '<a style="text-decoration:none;"><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;"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}, {
sortable: false,
dataIndex: 'CANGDANSTATUS',
text: Zi.LAN.CANGDANSTATUS,
width: 56,
renderer: function (value, meta, record) {
if (record.data.CANGDANSTATUS == 1) {
return '<a style="text-decoration:none;"><span style=\"color:green;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else if (record.data.CANGDANSTATUS == 2) {
return '<a style="text-decoration:none;"><span style=\"color:yellow;font-size:30px;text-align:center\">&nbsp;&nbsp;●</span></a>'
} else {
return "";
}
}
}
,
{
sortable: true,
id: '',
dataIndex: 'INSPECTSERVICE',
header: Zi.LAN.INSPECTSERVICE, //'NOTIFYPARTY',
width: 100,
renderer: function (value, meta, record) {
var records = DsStoreQueryBy(_this.storeINSPECTSERVICE, 'EnumValueId', value);
if (records.getCount() > 0) {
var data = records.getAt(0).data;
var EnumValueName = data.EnumValueName;
return EnumValueName;
} else return value;
}
}];
this.GridCheckBoxFenModel = Ext.create('Ext.selection.CheckboxModel');
//定义Grid
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
trackMouseOver: true,
selModel: this.GridCheckBoxFenModel,
disableSelection: false,
columns: this.girdcolums,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
})
});
/////////////以下部分为获取存储的gridpanel显示样式
// this.column = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id表名中间column数组跳过一开始的几列
this.gridList.reconfigure(this.storeList, this.girdcolums);
this.gridList.columns[0] = new Ext.grid.RowNumberer();
////////////////////////////////////////////////
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
this.SelectedRecord = record;
this.OprationStatus = 'edit';
DsOpenEditWin('/MvcShipping/MsOpSeai/Edit', "分票信息");
}, this);
_thisfenlist = this;
//按钮工具条
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [{
text: Zi.LAN.btnadd,
iconCls: "btnadd",
handler: function (button, event) {
this.OprationStatus = 'add';
DsOpenEditWin('/MvcShipping/MsOpSeai/Edit', "分票信息");
},
scope: this
}, '-', {
text: Zi.LAN.copyadd, //"国外舱单",
iconCls: "btnadd",
handler: 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];
this.SelectedRecord = record;
this.OprationStatus = 'copyadd';
DsOpenEditWin('/MvcShipping/MsOpSeai/Edit', "分票信息");
},
scope: this
}, {
text: Zi.LAN.btndelete,
iconCls: "btndelete",
handler: function (button, event) {
this.onDeleteClick(button, event);
},
scope: this
}, '-', {
text: Zi.LAN.btnrefresh,
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
},
scope: this
}, {
text: Zi.LAN.btnreset,
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}, '-', {
text: Zi.LAN.btntest,
id: "btntest",
handler: function (button, event) {
this.column = DsTruck.SaveGridPanel(USERID, this.formname, this.gridList.columns, this.column, 1, true);
},
scope: this
}]
});
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 30,
items: [this.panelBtn]
});
Ext.apply(this, {
items: [this.panelTop, this.gridList]
});
this.onRefreshClick();
this.storeList.on('beforeload', function (store) {
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
}, //end initUIComponents
onRefreshClick: function (button, event) {
//var girdcolums = this.gridList.getColumnMode();
var sql = "BSNO<>'" + this.BsNo + "' and MASTERNO='" + this.BsNo + "'";
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
},
onDeleteClick: 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];
if (record.data.BSSTATUS == 'true') {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.YeWuYiSuoDingBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); //'警告', '业务已锁定,不允许删除!'
return;
}
if (record.data.FEESTATUS == 'true') {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FeiYongYiSuoDingBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); //'警告', 费用已锁定,不允许删除!'
return;
}
if (this.StoreOpRange.getCount() == 0) {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.QuanXianBuZuBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
} else {
var op = record.data.OP;
var inputby = record.data.INPUTBY;
var records = DsStoreQueryBy(this.StoreOpRange, 'OPID', op);
if (records.getCount() > 0) {
} else {
var recordins = DsStoreQueryBy(this.StoreOpRange, 'OPID', inputby);
if (recordins.getCount() > 0) {
} else {
canedit = false;
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.QuanXianBuZuBuYunXuShanChu, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
}
}
}
Ext.MessageBox.confirm(Zi.LAN.TiShi, Zi.LAN.QueDingShanChuGaiJiLuMa, function (btn) {
if (btn == 'yes') {
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
url: '/MvcShipping/MsOpSeai/Delete',
params: {
data: Ext.JSON.encode(record.data)
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.storeList.remove(record);
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
OprationSwap: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.SelectedRecord;
ret[3] = this.EditRecord;
ret[4] = this.mainWin;
return ret;
},
//#region 打印
Print: function () {
var basicForm = this.formHead.getForm();
var MASTERNO = this.BsNo;
var printType = 'MSOPSEAIFENLIST';
var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM op_seai WHERE BSNO = '" + MASTERNO + "'";
var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM op_seai WHERE MASTERNO = '" + MASTERNO + "'";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
}
//#endregion
});