|
|
@ -858,6 +858,106 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
//#endregion
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region 航线
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: Zi.LAN.LANE, //'航线',
|
|
|
|
|
|
|
|
store: this.storeLANE,
|
|
|
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
|
|
|
name: 'LANE',
|
|
|
|
|
|
|
|
valueField: 'LANE',
|
|
|
|
|
|
|
|
displayField: 'LANE',
|
|
|
|
|
|
|
|
listeners: {
|
|
|
|
|
|
|
|
scope: this,
|
|
|
|
|
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
|
|
|
|
|
//if (records.length > 0) {
|
|
|
|
|
|
|
|
// if (records[0].data.OP != '')
|
|
|
|
|
|
|
|
// this.formHead.getForm().findField('OP').setValue(records[0].data.OP);
|
|
|
|
|
|
|
|
// if (records[0].data.DOC != '')
|
|
|
|
|
|
|
|
// this.formHead.getForm().findField('DOC').setValue(records[0].data.DOC);
|
|
|
|
|
|
|
|
// if (records[0].data.CUSTSERVICE != '')
|
|
|
|
|
|
|
|
// this.formHead.getForm().findField('CUSTSERVICE').setValue(records[0].data.CUSTSERVICE);
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
this.storeListLANE = Ext.create('Ext.data.Store', {
|
|
|
|
|
|
|
|
model: 'MsCodeCtnEdi',
|
|
|
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
|
|
|
proxy: {
|
|
|
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
|
|
|
url: '/MvcShipping/MsCodeCtnEdi/GetLANEList',
|
|
|
|
|
|
|
|
reader: {
|
|
|
|
|
|
|
|
id: 'GID',
|
|
|
|
|
|
|
|
root: 'data',
|
|
|
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.gridListLANECellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
|
|
|
|
|
|
|
|
clicksToEdit: 1
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
|
|
|
this.gridListLANE = new Ext.grid.GridPanel({
|
|
|
|
|
|
|
|
store: this.storeListLANE,
|
|
|
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
|
|
|
region: 'center',
|
|
|
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
|
|
|
plugins: [this.gridListLANECellEditing],
|
|
|
|
|
|
|
|
selType: 'cellmodel',
|
|
|
|
|
|
|
|
columns: [{
|
|
|
|
|
|
|
|
sortable: true,
|
|
|
|
|
|
|
|
dataIndex: 'GID',
|
|
|
|
|
|
|
|
header: 'GID',
|
|
|
|
|
|
|
|
hidden: true,
|
|
|
|
|
|
|
|
width: 120
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
sortable: true,
|
|
|
|
|
|
|
|
dataIndex: 'CTN',
|
|
|
|
|
|
|
|
header: '航线',
|
|
|
|
|
|
|
|
width: 160,
|
|
|
|
|
|
|
|
editor: this.comboxLANE
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
sortable: true,
|
|
|
|
|
|
|
|
dataIndex: 'EDINAME',
|
|
|
|
|
|
|
|
header: 'EDI类别',
|
|
|
|
|
|
|
|
width: 100,
|
|
|
|
|
|
|
|
editor: this.comboxEdiType,
|
|
|
|
|
|
|
|
renderer: function (value, p, record) {
|
|
|
|
|
|
|
|
return record.data.EDINAMEREF;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
sortable: true,
|
|
|
|
|
|
|
|
dataIndex: 'EDICODE',
|
|
|
|
|
|
|
|
header: 'EDI代码',
|
|
|
|
|
|
|
|
width: 160,
|
|
|
|
|
|
|
|
editor: {
|
|
|
|
|
|
|
|
xtype: 'textfield',
|
|
|
|
|
|
|
|
selectOnFocus: true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
sortable: true,
|
|
|
|
|
|
|
|
dataIndex: 'REMARK',
|
|
|
|
|
|
|
|
header: '备注',
|
|
|
|
|
|
|
|
width: 160,
|
|
|
|
|
|
|
|
editor: {
|
|
|
|
|
|
|
|
xtype: 'textfield',
|
|
|
|
|
|
|
|
selectOnFocus: true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region formSearch
|
|
|
|
//#region formSearch
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
|
frame: true,
|
|
|
|
frame: true,
|
|
|
@ -1008,6 +1108,14 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
items: [this.gridListReeferf]
|
|
|
|
items: [this.gridListReeferf]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.panelLANE = new Ext.Panel({
|
|
|
|
|
|
|
|
layout: "border",
|
|
|
|
|
|
|
|
title: '航线',
|
|
|
|
|
|
|
|
id: 'pnlLANE',
|
|
|
|
|
|
|
|
region: "center",
|
|
|
|
|
|
|
|
items: [this.gridListLANE]
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.MainCenter = new Ext.TabPanel({
|
|
|
|
this.MainCenter = new Ext.TabPanel({
|
|
|
|
activeTab: 0,
|
|
|
|
activeTab: 0,
|
|
|
@ -1018,7 +1126,7 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
enableTabScroll: true,
|
|
|
|
enableTabScroll: true,
|
|
|
|
items:
|
|
|
|
items:
|
|
|
|
[
|
|
|
|
[
|
|
|
|
this.panelCtn, this.panelCust, this.panelPkgs, this.panelSERVICE, this.panelPORTDISCHARGE, this.panelVESSEL, this.panelISSUETYPE, this.panelFeeName, this.panelReeferf
|
|
|
|
this.panelCtn, this.panelCust, this.panelPkgs, this.panelSERVICE, this.panelPORTDISCHARGE, this.panelVESSEL, this.panelISSUETYPE, this.panelFeeName, this.panelReeferf, this.panelLANE
|
|
|
|
]
|
|
|
|
]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -1093,6 +1201,15 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
}, this);
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeListLANE.on('beforeload', function (store) {
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
this.gridListLANE.on('edit', function (editor, e, eOpts) {
|
|
|
|
|
|
|
|
this.gridListAfterEdit(editor, e, eOpts);
|
|
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.onRefreshClick();
|
|
|
|
this.onRefreshClick();
|
|
|
|
//#endregion
|
|
|
|
//#endregion
|
|
|
|
}, //end initUIComponents
|
|
|
|
}, //end initUIComponents
|
|
|
@ -1135,17 +1252,19 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
scope: this
|
|
|
|
scope: this
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.storeListFeeName.load({
|
|
|
|
this.storeListFeeName.load({
|
|
|
|
params: { start: 0, limit: 500, sort: '', condition: sql },
|
|
|
|
params: { start: 0, limit: 500, sort: '', condition: sql },
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
scope: this
|
|
|
|
scope: this
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.storeListFeeName.load({
|
|
|
|
this.storeListReeferf.load({
|
|
|
|
params: { start: 0, limit: 500, sort: '', condition: sql },
|
|
|
|
params: { start: 0, limit: 500, sort: '', condition: sql },
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
scope: this
|
|
|
|
scope: this
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.storeListReeferf.load({
|
|
|
|
|
|
|
|
|
|
|
|
this.storeListLANE.load({
|
|
|
|
params: { start: 0, limit: 500, sort: '', condition: sql },
|
|
|
|
params: { start: 0, limit: 500, sort: '', condition: sql },
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
scope: this
|
|
|
|
scope: this
|
|
|
@ -1216,6 +1335,10 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
this.storeListReeferf.add(record);
|
|
|
|
this.storeListReeferf.add(record);
|
|
|
|
var n = this.storeListReeferf.getCount();
|
|
|
|
var n = this.storeListReeferf.getCount();
|
|
|
|
this.gridListReeferfCellEditing.startEditByPosition({ row: n - 1, column: 1 });
|
|
|
|
this.gridListReeferfCellEditing.startEditByPosition({ row: n - 1, column: 1 });
|
|
|
|
|
|
|
|
} else if (this.MainCenter.activeTab.id == 'pnlLANE') {
|
|
|
|
|
|
|
|
this.storeListLANE.add(record);
|
|
|
|
|
|
|
|
var n = this.storeListLANE.getCount();
|
|
|
|
|
|
|
|
this.gridListLANECellEditing.startEditByPosition({ row: n - 1, column: 1 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//#endregion
|
|
|
|
//#endregion
|
|
|
@ -1340,6 +1463,20 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var n = this.storeListReeferf.getCount();
|
|
|
|
var n = this.storeListReeferf.getCount();
|
|
|
|
this.gridListReeferfCellEditing.startEditByPosition({ row: n - 1, column: 1 });
|
|
|
|
this.gridListReeferfCellEditing.startEditByPosition({ row: n - 1, column: 1 });
|
|
|
|
|
|
|
|
} else if (this.MainCenter.activeTab.id == 'pnlLANE') {
|
|
|
|
|
|
|
|
for (i = 0; i < this.storeLANE.getCount(); i += 1) {
|
|
|
|
|
|
|
|
var memberyf = this.storeLANE.getAt(i);
|
|
|
|
|
|
|
|
var record = Ext.create('MsCodeCtnEdi', {
|
|
|
|
|
|
|
|
GID: '*',
|
|
|
|
|
|
|
|
EDICODE: '',
|
|
|
|
|
|
|
|
EDINAME: '',
|
|
|
|
|
|
|
|
CTN: '',
|
|
|
|
|
|
|
|
REMARK: ''
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.storeListLANE.add(record);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var n = this.storeListLANE.getCount();
|
|
|
|
|
|
|
|
this.gridListLANECellEditing.startEditByPosition({ row: n - 1, column: 1 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//#endregion
|
|
|
|
//#endregion
|
|
|
@ -1368,6 +1505,8 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
this.onPostDetailFeeNameClick(button, event);
|
|
|
|
this.onPostDetailFeeNameClick(button, event);
|
|
|
|
} else if (this.MainCenter.activeTab.id == 'pnlReeferf') {
|
|
|
|
} else if (this.MainCenter.activeTab.id == 'pnlReeferf') {
|
|
|
|
this.onPostDetailReeferfClick(button, event);
|
|
|
|
this.onPostDetailReeferfClick(button, event);
|
|
|
|
|
|
|
|
} else if (this.MainCenter.activeTab.id == 'pnlLANE') {
|
|
|
|
|
|
|
|
this.onPostDetailLANEClick(button, event);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onPostCtnDetailClick: function (button, event) {
|
|
|
|
onPostCtnDetailClick: function (button, event) {
|
|
|
@ -1711,6 +1850,44 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, //end save
|
|
|
|
}, //end save
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onPostDetailLANEClick: function (button, event) {
|
|
|
|
|
|
|
|
var bodyDrChFeeDatas = [];
|
|
|
|
|
|
|
|
var i;
|
|
|
|
|
|
|
|
for (i = 0; i < this.storeListLANE.getCount(); i += 1) {
|
|
|
|
|
|
|
|
var memberyf = this.storeListLANE.getAt(i);
|
|
|
|
|
|
|
|
bodyDrChFeeDatas.push(memberyf);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var jsonChFeeBody = ConvertGIDRecordsToJson(bodyDrChFeeDatas);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_thisfee = this;
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在保存数据, 请稍侯..');
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
|
|
|
waitMsg: '正在保存数据...',
|
|
|
|
|
|
|
|
url: '/MvcShipping/MsCodeCtnEdi/SaveLANEDetail',
|
|
|
|
|
|
|
|
scope: this,
|
|
|
|
|
|
|
|
params: {
|
|
|
|
|
|
|
|
body: jsonChFeeBody
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
|
|
|
if (success) {
|
|
|
|
|
|
|
|
Ext.MessageBox.hide();
|
|
|
|
|
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
|
|
|
this.onRefreshClick();
|
|
|
|
|
|
|
|
} 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
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}, //end save
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
//#region 删除
|
|
|
|
//#region 删除
|
|
|
@ -1737,6 +1914,8 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
this.onDeleteFeeNameClick(button, event);
|
|
|
|
this.onDeleteFeeNameClick(button, event);
|
|
|
|
} else if (this.MainCenter.activeTab.id == 'pnlReeferf') {
|
|
|
|
} else if (this.MainCenter.activeTab.id == 'pnlReeferf') {
|
|
|
|
this.onDeleteReeferfClick(button, event);
|
|
|
|
this.onDeleteReeferfClick(button, event);
|
|
|
|
|
|
|
|
} else if (this.MainCenter.activeTab.id == 'pnlLANE') {
|
|
|
|
|
|
|
|
this.onDeleteLANEClick(button, event);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onDeleteCtnClick: function (button, event) {
|
|
|
|
onDeleteCtnClick: function (button, event) {
|
|
|
@ -2104,6 +2283,47 @@ Ext.extend(Shipping.MsCodeCtnEdiIndex, Ext.Panel, {
|
|
|
|
}, this);
|
|
|
|
}, this);
|
|
|
|
}, //onDeleteClick
|
|
|
|
}, //onDeleteClick
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onDeleteLANEClick: function (button, event) {
|
|
|
|
|
|
|
|
var selections = this.gridListLANE.getSelectionModel().getSelection();
|
|
|
|
|
|
|
|
if (selections.length == 0) {
|
|
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var record = selections[0];
|
|
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
|
|
|
|
|
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
|
|
|
waitMsg: '正在删除数据...',
|
|
|
|
|
|
|
|
url: '/MvcShipping/MsCodeCtnEdi/DeleteLANE',
|
|
|
|
|
|
|
|
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.storeListLANE.remove(record);
|
|
|
|
|
|
|
|
//Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
}, //onDeleteClick
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
//#region 修改
|
|
|
|
//#region 修改
|
|
|
|