|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsSeaeOrderIndex = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsSeaeOrderIndex.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsSeaeOrderIndex, Ext.Panel, {
|
|
|
PageSize: 20,
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
isShowAdvancedQuery: 0, //是否显示高级查询面板
|
|
|
IsAudit: false,
|
|
|
bsno: '',
|
|
|
sqlcontext: '',
|
|
|
initUIComponents: function () {
|
|
|
this.formname = "formMsSeaeOrderIndex"; //页面名称
|
|
|
this.PluginCover = new Shipping.OpSeaCover({ region: "center" }, 1);
|
|
|
this.bsno = '11111';
|
|
|
//定义数据集
|
|
|
this.storectndisp = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CtnDispModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCtnDisp' }
|
|
|
});
|
|
|
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsSeaeOrderModel',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsSeaeOrder/GetDataList',
|
|
|
reader: {
|
|
|
id: 'GId',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//#region List列表显示信息
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 30
|
|
|
});
|
|
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
name: 'bottles',
|
|
|
fieldLabel: '每页记录数',
|
|
|
labelAlign: 'right',
|
|
|
value: this.PageSize,
|
|
|
maxValue: 100000,
|
|
|
width: 180,
|
|
|
minValue: 0,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.initgirdcolums = [{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: '',
|
|
|
header: '',
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '业务编号',
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ORDNO',
|
|
|
header: '订舱编号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: '委托编号',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'ORSTATUSREF',
|
|
|
header: '状态',
|
|
|
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_settle';
|
|
|
} else if (value == '驳回') {
|
|
|
meta.tdCls = 'feestatus_nopass';
|
|
|
} else if (value == '退舱') {
|
|
|
meta.tdCls = 'feestatus_Del';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'SALE',
|
|
|
header: '揽货人',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTSERVICE',
|
|
|
header: '客服员',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'DOC',
|
|
|
header: '海外客服员',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
header: '委托单位',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'LANE',
|
|
|
header: '航线',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSDATE',
|
|
|
header: '接单日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETD',
|
|
|
header: '开船日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BLTYPE',
|
|
|
header: '装运方式',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'STLNAME',
|
|
|
header: '结算方式',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'STLDATE',
|
|
|
header: '结算日期',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BLFRT',
|
|
|
header: '付费方式',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CARGOID',
|
|
|
header: '货物标识',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'MBLNO',
|
|
|
header: '主提单号',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
header: '品名',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'PKGS',
|
|
|
header: '件数',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'KGS',
|
|
|
header: '毛重',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CNTRTOTAL',
|
|
|
header: '集装箱',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTBY',
|
|
|
header: '录入人',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'OP',
|
|
|
header: '操作员',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'VESSEL',
|
|
|
header: '船名',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOYNO',
|
|
|
header: '航次',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
header: '装货港',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTDISCHARGE',
|
|
|
header: '卸货港',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTINATION',
|
|
|
header: '目的港',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMSER',
|
|
|
header: '报关行',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'KINDPKGS',
|
|
|
header: '件数包装',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CARRIER',
|
|
|
header: '船公司',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AGENTID',
|
|
|
header: '国外代理',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITOPERATOR',
|
|
|
header: '审核人',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITDATE',
|
|
|
header: '审核日期',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONFIRMOP',
|
|
|
header: '确认人',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONFIRMDATE',
|
|
|
header: '确认日期',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARK',
|
|
|
header: '备注',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'SERVICECONTRACTNO',
|
|
|
header: '服务合同号',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'SALECORP',
|
|
|
header: '所属分部',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'STLNAME',
|
|
|
header: '结算方式',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
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';
|
|
|
}
|
|
|
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';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
}];
|
|
|
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.initgirdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
// this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
// this.gridList.columns[0] = new Ext.grid.RowNumberer();
|
|
|
|
|
|
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,
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
disableSelection: false,
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true, //允许复制数据
|
|
|
autoFill: true,
|
|
|
getRowClass: function (record, rowIndex, rowParams, store) {
|
|
|
var ORSTATUS = record.get('ORSTATUS');
|
|
|
if (ORSTATUS == '4')
|
|
|
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: "没有数据"
|
|
|
}), this.Pagenum]
|
|
|
});
|
|
|
|
|
|
/////////////以下部分为获取存储的gridpanel显示样式
|
|
|
// this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.initgirdcolums, 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/MsSeaeOrder/Edit');
|
|
|
}, this);
|
|
|
|
|
|
_this = this;
|
|
|
this.gridList.getSelectionModel().on('select', function (model, record, index) {
|
|
|
var bsno = record.data.BSNO;
|
|
|
_this.bsno = bsno;
|
|
|
var btntxt = Ext.getCmp('btnCover').getText();
|
|
|
if (btntxt == '隐藏Cover')
|
|
|
_this.RefreshCover(bsno);
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
//#region formSearch 下拉框信息加载
|
|
|
//权限范围
|
|
|
this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsOP',
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetOpRang' }
|
|
|
});
|
|
|
this.StoreOpRange.load({ params: { optype: "modSeaeOrderList"} });
|
|
|
|
|
|
//人员信息加载
|
|
|
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',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
//录入人
|
|
|
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.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '委托单位',
|
|
|
store: this.storeCustCode,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: 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/GetCustomRefListCARRIER' }
|
|
|
});
|
|
|
|
|
|
//船公司
|
|
|
this.comboxCARRIER = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '船公司',
|
|
|
store: this.storeCARRIER,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'CARRIER',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//键值维护表_委托单类型
|
|
|
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',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//国际港口(进口装货港、出口卸货港)
|
|
|
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: 'PORT',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//国内港口(出口装货港、进口卸货港)
|
|
|
// this.storeCodeLoadport = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
// model: 'DsShipping.ux.CodeLoadportModel',
|
|
|
// proxy: { url: '/CommMng/BasicDataRef/GetCodeLoadportList' }
|
|
|
// });
|
|
|
// this.storeCodeLoadport.load();
|
|
|
|
|
|
this.storeCodeDisport = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CodeDisportModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' }
|
|
|
});
|
|
|
// this.storeCodeDisport.load();
|
|
|
this.comboxPORTDISCHARGE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '卸货港',
|
|
|
store: this.storeCodeDisport,
|
|
|
name: 'PORTDISCHARGE',
|
|
|
valueField: 'PORT',
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'PORT',
|
|
|
displayField: 'PORT',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeCodeDisport2 = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CodeDisportModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' }
|
|
|
});
|
|
|
this.comboxDESTINATION = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '目的港',
|
|
|
store: this.storeCodeDisport2,
|
|
|
name: 'DESTINATION',
|
|
|
valueField: 'PORT',
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'PORT',
|
|
|
displayField: 'PORT',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.StoreStatus = Ext.create('Ext.data.Store', {
|
|
|
fields: ['ID', 'STATUS']
|
|
|
});
|
|
|
this.StoreStatus.add({ "ID": "9", "STATUS": "录入状态" });
|
|
|
this.StoreStatus.add({ "ID": "1", "STATUS": "提交审核" });
|
|
|
this.StoreStatus.add({ "ID": "2", "STATUS": "驳回提交" });
|
|
|
this.StoreStatus.add({ "ID": "4", "STATUS": "退舱" });
|
|
|
this.StoreStatus.add({ "ID": "8", "STATUS": "确认订舱" });
|
|
|
this.StoreStatus.add({ "ID": "0", "STATUS": "审核通过" });
|
|
|
this.StoreStatus.add({ "ID": "", "STATUS": "全部" });
|
|
|
|
|
|
|
|
|
this.comboxStatus = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
store: this.StoreStatus,
|
|
|
fieldLabel: '订舱状态',
|
|
|
forceSelection: true,
|
|
|
name: 'ORSTATUS',
|
|
|
valueField: 'ID',
|
|
|
displayField: 'STATUS',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeLANE = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.Lane',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCodeLaneList' }
|
|
|
});
|
|
|
this.storeLANE.load();
|
|
|
this.comboxLANE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '航线',
|
|
|
store: this.storeLANE,
|
|
|
// forceSelection: true,
|
|
|
name: 'LANE',
|
|
|
valueField: 'LANE',
|
|
|
displayField: 'LANE'
|
|
|
});
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
//#region formSearch 查询面板
|
|
|
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: [this.comboxStatus, {
|
|
|
fieldLabel: '编号',
|
|
|
name: 'MblNo',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
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.comboxGOODSNAME]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxCustCode, this.comboxOP, this.comboxSALE, this.comboxPORTDISCHARGE, this.comboxDESTINATION]
|
|
|
}]//end items(fieldset 1)
|
|
|
}]//end root items
|
|
|
});
|
|
|
//#endregion formSearch
|
|
|
|
|
|
//#region formSearch2 隐藏查询面板
|
|
|
this.formSearch2 = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'north',
|
|
|
bodyPadding: 0,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1, //所占列
|
|
|
labelWidth: 70, //值 能够使 text框也是对齐状态
|
|
|
msgTarget: 'qtip'//文本框显示的必填样式,修改这里的值msgTarget:"title" msgTarget:"under" msgTarget:"side"
|
|
|
},
|
|
|
|
|
|
items: [{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxCARRIER, {
|
|
|
fieldLabel: '集装箱',
|
|
|
name: 'CNTRTOTAL'
|
|
|
}, this.comboxBLTYPE, {
|
|
|
fieldLabel: '备注',
|
|
|
name: 'REMARK'
|
|
|
}, this.comboxPORTLOAD]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '船名',
|
|
|
name: 'VESSEL'
|
|
|
}, {
|
|
|
fieldLabel: '航次',
|
|
|
name: 'VOYNO'
|
|
|
}, this.comboxLANE, this.comboxINPUTBY, { xtype: 'hiddenfield'}]
|
|
|
}]//end items(fieldset 1)
|
|
|
}]//end root items
|
|
|
});
|
|
|
//#endregion formSearch2
|
|
|
|
|
|
//按钮工具条
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [{
|
|
|
text: "新建",
|
|
|
iconCls: "btnadd",
|
|
|
handler: function (button, event) {
|
|
|
this.OprationStatus = 'add';
|
|
|
DsOpenEditWin('/MvcShipping/MsSeaeOrder/Edit');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "复制新建", //"复制新建",
|
|
|
iconCls: "btnadd",
|
|
|
handler: 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];
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'copyadd';
|
|
|
DsOpenEditWin('/MvcShipping/MsSeaeOrder/Edit');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "删除",
|
|
|
iconCls: "btndelete",
|
|
|
handler: function (button, event) {
|
|
|
this.onDeleteClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "重置条件",
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
this.onClearSql(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
id: 'btnSubmitAudit',
|
|
|
text: '提交审核',
|
|
|
tooltip: '提交审核',
|
|
|
handler: function (button, event) {
|
|
|
this.onSubmitAuditClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
id: 'btnSubmitAuditBack',
|
|
|
text: '撤销提交',
|
|
|
tooltip: '撤销提交',
|
|
|
handler: function (button, event) {
|
|
|
this.onSubmitAuditBackClick();
|
|
|
},
|
|
|
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);
|
|
|
},
|
|
|
scope: this
|
|
|
}, { text: "初始化", //"初始化",
|
|
|
handler: function (menu, event) {
|
|
|
// _this.InitGrid(_this.initgirdcolums);
|
|
|
_this.gridList.reconfigure(_this.storeList, _this.initgirdcolums);
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
|
|
|
}
|
|
|
}]
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "打印", //"打印",
|
|
|
iconCls: 'btnprint',
|
|
|
menu: [
|
|
|
{
|
|
|
text: "全部", //"全部",
|
|
|
handler: function (menu, event) {
|
|
|
_this.Print();
|
|
|
}
|
|
|
}, {
|
|
|
text: "选择打印", //"选择打印",
|
|
|
handler: function (menu, event) {
|
|
|
_this.PrintSelect();
|
|
|
}
|
|
|
}],
|
|
|
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "高级查询面板",
|
|
|
id: "btIsShowAdvancedQuery",
|
|
|
handler: function (button, event) {
|
|
|
this.setIsShowAdvancedQuery(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
xtype: 'button',
|
|
|
width: 50,
|
|
|
// 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
|
|
|
}, '-', {
|
|
|
text: "查看操作信息",
|
|
|
handler: 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 ORSTATUS = record.data.ORSTATUS;
|
|
|
if (ORSTATUS == '9' || ORSTATUS == '1' || ORSTATUS == '2' || ORSTATUS == '0') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '当前状态无法查看!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
DsOpenEditWin('/MvcShipping/MsOpSeae/SaleEdit');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
|
|
|
|
|
|
//, '-', {
|
|
|
// text: "业务申请修改",
|
|
|
// handler: 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 ORSTATUS = record.data.ORSTATUS;
|
|
|
// if (ORSTATUS == '9' || ORSTATUS == '1' || ORSTATUS == '2' || ORSTATUS == '0') {
|
|
|
// Ext.Msg.show({ title: '提示', msg: '当前状态无法申请修改!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
// return;
|
|
|
// }
|
|
|
// var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
|
|
|
// var openType = "_blank";
|
|
|
// var openUrl = "";
|
|
|
// openUrl = "../../MvcShipping/MsOpSeae/ModifyEdit?handle=check&bstype=Seaeorder&bsno=" + record.data.BSNO;
|
|
|
// this.SelectedRecord = record;
|
|
|
// this.OprationStatus = 'edit';
|
|
|
// window.open(openUrl, openType, openSet);
|
|
|
// },
|
|
|
// scope: this
|
|
|
//}
|
|
|
|
|
|
, '-', {
|
|
|
text: '显示Cover',
|
|
|
id: 'btnCover',
|
|
|
handler: function (button, event) {
|
|
|
this.readingPaneChange(button);
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
this.panelSearch = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 80,
|
|
|
autoSize: true,
|
|
|
hidden: true,
|
|
|
items: [this.formSearch2]
|
|
|
});
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 100,
|
|
|
items: [this.panelBtn, this.formSearch]
|
|
|
});
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelTop, this.panelSearch, this.gridList, this.createEast()]
|
|
|
});
|
|
|
|
|
|
|
|
|
var sql = " (ORSTATUS='9' or ORSTATUS='1' or ORSTATUS='2') ";
|
|
|
this.sqlcontext = sql;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
var sql = this.sqlcontext;
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
}, this);
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "modSaleOrderNoSubMit"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success == true) {
|
|
|
Ext.getCmp('btnSubmitAudit').disable();
|
|
|
Ext.getCmp('btnSubmitAuditBack').disable();
|
|
|
} else {
|
|
|
//
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
this.relayEvents(this.PluginCover, ['opentab']);
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
//var girdcolums = this.gridList.getColumnMode();
|
|
|
var sql = this.getCondition();
|
|
|
this.sqlcontext = sql;
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
onDsQuery: function (button, event) {
|
|
|
//var girdcolums = this.gridList.getColumnMode();
|
|
|
var sql = this.sqlcontext;
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
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: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var record = selections[0];
|
|
|
|
|
|
if (record.data.ORSTATUS == '1') {
|
|
|
Ext.Msg.show({ title: '警告', msg: '此业务已提交审核,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
if (record.data.ORSTATUS == '0') {
|
|
|
Ext.Msg.show({ title: '警告', msg: '此业务已审核通过,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
if (record.data.ORSTATUS == '8') {
|
|
|
Ext.Msg.show({ title: '警告', msg: '此业务已确认订舱,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
if (record.data.ORSTATUS == '4') {
|
|
|
Ext.Msg.show({ title: '警告', msg: '此业务已退舱,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (this.StoreOpRange.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '权限不足,不允许删除!', 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: '警告', msg: '权限不足,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/MvcShipping/MsSeaeOrder/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: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
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
|
|
|
}
|
|
|
}, this);
|
|
|
},
|
|
|
|
|
|
onSubmitAuditClick: function () {
|
|
|
|
|
|
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];
|
|
|
|
|
|
|
|
|
if (record.data.ORSTATUS != '9' && record.data.ORSTATUS != '2') {
|
|
|
Ext.Msg.show({ title: '警告', msg: '当前状态,无法提交!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定提交选中的业务吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在提交数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在提交数据...',
|
|
|
url: '/MvcShipping/MsSeaeOrder/SubmitAudit',
|
|
|
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.onRefreshClick();
|
|
|
Ext.Msg.show({ title: '提示', msg: '提交成功!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
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
|
|
|
}
|
|
|
}, this);
|
|
|
|
|
|
},
|
|
|
|
|
|
onSubmitAuditBackClick: function () {
|
|
|
|
|
|
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];
|
|
|
|
|
|
|
|
|
if (record.data.ORSTATUS != '1') {
|
|
|
Ext.Msg.show({ title: '警告', msg: '当前状态,不无法撤销提交!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定撤销提交选中的业务吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在撤销提交数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在撤销提交数据...',
|
|
|
url: '/MvcShipping/MsSeaeOrder/SubmitAuditBack',
|
|
|
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.onRefreshClick();
|
|
|
Ext.Msg.show({ title: '提示', msg: '撤销成功!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
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
|
|
|
}
|
|
|
}, this);
|
|
|
|
|
|
},
|
|
|
|
|
|
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() || !form2.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, "(ORDNO like '%" + MblNo + "%' OR BSNO IN (select BSNO from v_op_bs A where A.MBLNO like '%" + MblNo + "%' OR A.CUSTNO like '%" + MblNo + "%' OR A.APPLYNO like '%" + MblNo + "%'))");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//状态
|
|
|
var ORSTATUS = form.findField('ORSTATUS').getValue();
|
|
|
sql = sql + getAndConSql(sql, ORSTATUS, "ORSTATUS='" + ORSTATUS + "'");
|
|
|
|
|
|
|
|
|
|
|
|
//客户名称
|
|
|
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
|
|
|
//到港日期
|
|
|
var ETDbgn = form.findField('ETDbgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDbgn, "ETD >='" + ETDbgn + "'");
|
|
|
var ETDend = form.findField('ETDend').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDend, "ETD <='" + ETDend + "'");
|
|
|
|
|
|
//操作人
|
|
|
var OP = form.findField('OP').getValue();
|
|
|
sql = sql + getAndConSql(sql, OP, "OP='" + OP + "'");
|
|
|
|
|
|
//揽货人
|
|
|
var SALE = form.findField('SALE').getValue();
|
|
|
sql = sql + getAndConSql(sql, SALE, "SALE='" + SALE + "'");
|
|
|
|
|
|
//录入人
|
|
|
var INPUTBY = form2.findField('INPUTBY').getValue();
|
|
|
sql = sql + getAndConSql(sql, INPUTBY, "INPUTBY='" + INPUTBY + "'");
|
|
|
|
|
|
//航线
|
|
|
var LANE = form2.findField('LANE').getValue();
|
|
|
sql = sql + getAndConSql(sql, LANE, "LANE='" + LANE + "'");
|
|
|
|
|
|
|
|
|
//牌号
|
|
|
var CNTRTOTAL = form2.findField('CNTRTOTAL').getValue();
|
|
|
sql = sql + getAndConSql(sql, CNTRTOTAL, "CNTRTOTAL like '%" + CNTRTOTAL + "%'");
|
|
|
|
|
|
|
|
|
//装货港
|
|
|
var PORTLOAD = form2.findField('PORTLOAD').getValue();
|
|
|
sql = sql + getAndConSql(sql, PORTLOAD, "PORTLOAD like '%" + PORTLOAD + "%'");
|
|
|
|
|
|
//卸货港
|
|
|
var PORTDISCHARGE = form.findField('PORTDISCHARGE').getValue();
|
|
|
sql = sql + getAndConSql(sql, PORTDISCHARGE, "PORTDISCHARGE like '%" + PORTDISCHARGE + "%'");
|
|
|
|
|
|
var DESTINATION = form.findField('DESTINATION').getValue();
|
|
|
sql = sql + getAndConSql(sql, DESTINATION, "DESTINATION like '%" + DESTINATION + "%'");
|
|
|
|
|
|
//船名
|
|
|
var VESSEL = form2.findField('VESSEL').getValue();
|
|
|
sql = sql + getAndConSql(sql, VESSEL, "VESSEL like '%" + VESSEL + "%'");
|
|
|
|
|
|
//航次
|
|
|
var VOYNO = form2.findField('VOYNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, VOYNO, "VOYNO like '%" + VOYNO + "%'");
|
|
|
|
|
|
//船公司
|
|
|
var CARRIER = form2.findField('CARRIER').getValue();
|
|
|
sql = sql + getAndConSql(sql, CARRIER, "CARRIER='" + CARRIER + "'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//装运方式
|
|
|
var BLTYPE = form2.findField('BLTYPE').getValue();
|
|
|
sql = sql + getAndConSql(sql, BLTYPE, "BLTYPE='" + BLTYPE + "'");
|
|
|
|
|
|
//备注
|
|
|
var REMARK = form2.findField('REMARK').getValue();
|
|
|
sql = sql + getAndConSql(sql, REMARK, "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;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
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 = 'BSDATE desc ';
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在操作数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/MvcShipping/MsSeaeOrder/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 condition = jsonresult.Message;
|
|
|
if (condition != '') condition = ' where ' + condition;
|
|
|
|
|
|
var printType = 'MSOPSEAEORDERLIST';
|
|
|
var sql1 = returnstr;
|
|
|
var sql2 = "select * from crm_seaeorder 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 = 'BSDATE desc';
|
|
|
|
|
|
|
|
|
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 mblno = '';
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length != 0) {
|
|
|
var record = selections[0];
|
|
|
bsno = record.data.BSNO;
|
|
|
mblno = record.data.MBLNO;
|
|
|
}
|
|
|
|
|
|
var printType = 'MSOPSEAEORDERLISTSELECT';
|
|
|
var sql1 = "select * from crm_seaeorder WHERE BSNO IN (" + feeGidSql + ") order by " + sortstr;
|
|
|
var sql2 = "select * from crm_seaeorder where BSNO='" + bsno + "'";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6, mblno);
|
|
|
},
|
|
|
|
|
|
|
|
|
//#region 增加cover模块
|
|
|
readingPaneChange: function (btn) {
|
|
|
this.east.add(this.PluginCover);
|
|
|
switch (btn.text) {
|
|
|
case '显示Cover':
|
|
|
this.east.show();
|
|
|
Ext.getCmp('btnCover').setText('隐藏Cover');
|
|
|
this.RefreshCover(this.bsno);
|
|
|
break;
|
|
|
default:
|
|
|
this.east.hide();
|
|
|
Ext.getCmp('btnCover').setText('显示Cover');
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
createEast: function () {
|
|
|
this.east = Ext.create('Ext.panel.Panel', {
|
|
|
layout: 'fit',
|
|
|
region: 'east',
|
|
|
title: 'COVER',
|
|
|
flex: 1,
|
|
|
split: true,
|
|
|
hidden: true,
|
|
|
width: 150,
|
|
|
minWidth: 150,
|
|
|
border: false
|
|
|
});
|
|
|
return this.east;
|
|
|
},
|
|
|
RefreshCover: function (bsno) {
|
|
|
this.PluginCover.loadCoverWithBSNO(bsno);
|
|
|
},
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
OprationSwap: function () {
|
|
|
var ret = new Array();
|
|
|
ret[0] = this.OprationStatus;
|
|
|
ret[1] = this.storeList;
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
ret[3] = this.IsAudit;
|
|
|
return ret;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|