YingHang
dengyu 3 months ago
parent b46bed03f7
commit 01caa8eef9

@ -53,13 +53,24 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
}); });
//this.storeLOADPORT.load({ params: { enumTypeId: 96303 } }); //this.storeLOADPORT.load({ params: { enumTypeId: 96303 } });
this.comboxLOADPORT = Ext.create('DsExt.ux.RefTableCombox', { this.comboxLOADPORT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:'口岸', fieldLabel: '口岸',
flex: 1, flex: 1,
store: this.storeLOADPORT, store: this.storeLOADPORT,
name: 'LOADPORT', name: 'LOADPORT',
valueField: 'EnumValueName', valueField: 'EnumValueId',
displayField: 'EnumValueName' displayField: 'EnumValueName',
listeners: {
scope: this,
change: function (field, newValue, oldValue, eOpts) {
if (newValue == null || newValue == '') return;
if (newValue != oldValue) {
//alert(newValue);
_this.storeMATOU.load({ params: { enumTypeId: 96304, sCondition: "EnumValueName_2='" + newValue + "'" } });
}
}
}
}); });
this.storeMATOU = Ext.create('DsExt.ux.RefTableStore', { this.storeMATOU = Ext.create('DsExt.ux.RefTableStore', {
@ -69,11 +80,11 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
//this.storeMATOU.load({ params: { enumTypeId: 96304 } }); //this.storeMATOU.load({ params: { enumTypeId: 96304 } });
this.comboxMATOU = Ext.create('DsExt.ux.RefTableCombox', { this.comboxMATOU = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel:'码头', fieldLabel: '码头',
flex: 2, flex: 2,
store: this.storeMATOU, store: this.storeMATOU,
name: 'MATOU', name: 'MATOU',
valueField: 'EnumValueName', valueField: 'EnumValueId',
displayField: 'EnumValueName' displayField: 'EnumValueName'
}); });
@ -128,8 +139,8 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
this.StoreWEIGHTYPE = Ext.create('Ext.data.Store', { this.StoreWEIGHTYPE = Ext.create('Ext.data.Store', {
fields: ['NAME'] fields: ['NAME']
}); });
this.StoreWEIGHTYPE.add({ "NAME":'SM2' }); this.StoreWEIGHTYPE.add({ "NAME": 'SM2' });
this.StoreWEIGHTYPE.add({ "NAME":'SM1' }); this.StoreWEIGHTYPE.add({ "NAME": 'SM1' });
this.StoreWEIGHTYPE.add({ "NAME": "" }); this.StoreWEIGHTYPE.add({ "NAME": "" });
this.comboxWEIGHTYPE = Ext.create('DsExt.ux.RefTableCombox', { this.comboxWEIGHTYPE = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreWEIGHTYPE, store: this.StoreWEIGHTYPE,
@ -166,13 +177,19 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
header: 'BSNO', //'业务编号', header: 'BSNO', //'业务编号',
hidden: true, hidden: true,
width: 0 width: 0
}, { }, {
sortable: true, sortable: true,
dataIndex: 'MFNO',
header: 'MFNO', //'业务编号',
hidden: true,
width: 0
}, {
sortable: true,
dataIndex: 'SENDGID', dataIndex: 'SENDGID',
header: 'SENDGID', //'业务编号', header: 'SENDGID', //'业务编号',
hidden: true, hidden: true,
width: 0 width: 0
}, },
{ {
dataIndex: 'CTNALL', dataIndex: 'CTNALL',
header: '箱型', //'箱型', header: '箱型', //'箱型',
@ -199,7 +216,7 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
} }
}, { }, {
dataIndex: 'KGS', dataIndex: 'KGS',
header:'毛重', //'重量', header: '毛重', //'重量',
width: 80, width: 80,
editor: { editor: {
xtype: 'textfield', xtype: 'textfield',
@ -218,25 +235,27 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
header: '称重方式', //'称重方式', header: '称重方式', //'称重方式',
width: 80, width: 80,
editor: this.comboxWEIGHTYPE editor: this.comboxWEIGHTYPE
}, { }, {
dataIndex: 'VGMKGS', dataIndex: 'VGMKGS',
header: 'VGM重量', //'参考重量', header: 'VGM重量', //'参考重量',
width: 80, width: 80,
renderer: function (value, meta, record) { renderer: function (value, meta, record) {
return Add(record.data.KGS, record.data.TAREWEIGHT); return Add(record.data.KGS, record.data.TAREWEIGHT);
} }
}, { }, {
dataIndex: 'WEIGHDATE', dataIndex: 'WEIGHDATE',
header: '称重时间', //'箱皮重', header: '称重时间', //'箱皮重',
width: 80, width: 80,
editor: { renderer: Ext.util.Format.dateRenderer('Y-m-d'),
xtype: 'textfield', editor: {
selectOnFocus: true xtype: 'datefield',
} format: 'Y-m-d',
}, { selectOnFocus: true
}
}, {
dataIndex: 'YARD', dataIndex: 'YARD',
header:'场站', //'箱状态', header: '场站', //'箱状态',
width: 100, width: 100,
editor: this.comboxYARD editor: this.comboxYARD
}] }]
@ -270,66 +289,130 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
}, },
items: [ items: [
{//fieldset 1 {//fieldset 1
//xtype: 'fieldset', //xtype: 'fieldset',
xtype: 'container', xtype: 'container',
defaultType: 'textfield', defaultType: 'textfield',
layout: 'anchor', layout: 'anchor',
defaults: { defaults: {
anchor: '100%' anchor: '100%'
}, },
items: [{ items: [{
xtype: 'container', xtype: 'container',
layout: 'hbox', layout: 'hbox',
defaultType: 'textfield', defaultType: 'textfield',
items: [ { items: [
fieldLabel: 'VGM申报', {
readOnly: true, fieldLabel: '发送状态',
hidden: true, id: "VGMSTATUS",
name: 'VGMSTATUS' flex: 0.4,
}, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' }] //hidden: true,
}, { html: "",
xtype: 'container', }
layout: 'hbox', ,
defaultType: 'textfield', {
items: [{ xtype: 'checkboxgroup',
fieldLabel: 'GID', flex: 2,
name: 'GID', flex: 0, hidden: true, margins: '0' fieldLabel: '发送方', //'文件功能',
items: [{
xtype: "checkbox", //checkbox控件
name: "ISCARRIER",
boxLabel: "",
fieldLabel: "船公司",
labelWidth: 50,
inputValue: true, //选中的值
uncheckedValue: false, //未选中的值
checked: true //绘制时的选中状态
}, {
xtype: "checkbox", //checkbox控件
name: "ISYGT",
labelWidth: 50,
boxLabel: "",
fieldLabel: "云港通",
inputValue: true, //选中的值
uncheckedValue: false, //未选中的值
checked: true //绘制时的选中状态
}
]
}
, { xtype: 'hiddenfield', flex: 0.6 },
{
xtype: 'radiogroup',
flex: 2,
fieldLabel: '操作类型', //'文件功能',
id: 'vGMFILEROLE',
defaults: { flex: 1 },
layout: 'hbox',
items: [{
boxLabel: "新增", //'原始',
name: 'FILEROLE',
inputValue: '9',
checked: true
}, {
boxLabel: "修改", //'更新',
name: 'FILEROLE',
inputValue: '5'
}
//, {
//boxLabel: "删除", //'删除',
//name: 'FILEROLE',
//inputValue: '4'
//}
]
}
]
}, { }, {
fieldLabel: 'BSNO', xtype: 'container',
name: 'BSNO', flex: 0, hidden: true, margins: '0' layout: 'hbox',
}, { defaultType: 'textfield',
fieldLabel: 'ISCARRIER', items: [{
name: 'ISCARRIER', flex: 0, hidden: true, margins: '0' fieldLabel: 'GID',
}, { name: 'GID', flex: 0, hidden: true, margins: '0'
fieldLabel: 'ISYGT',
name: 'ISYGT', flex: 0, hidden: true, margins: '0'
}, { }, {
fieldLabel: 'BSNO',
name: 'BSNO', flex: 0, hidden: true, margins: '0'
}
//, {
// fieldLabel: 'ISCARRIER',
//name: 'ISCARRIER', flex: 0, hidden: true, margins: '0'
//}
//, {
// fieldLabel: 'ISYGT',
//name: 'ISYGT', flex: 0, hidden: true, margins: '0'
//}
, {
fieldLabel: 'SENDTYPE', fieldLabel: 'SENDTYPE',
name: 'SENDTYPE', flex: 0, hidden: true, margins: '0' name: 'SENDTYPE', flex: 0, hidden: true, margins: '0'
}, { }, {
fieldLabel: 'MBLNO', fieldLabel: 'MBLNO',
name: 'MBLNO', flex: 0, hidden: true, margins: '0' name: 'MBLNO', flex: 0, hidden: true, margins: '0'
},{ }, {
fieldLabel: '船名', fieldLabel: '船名',
name: 'VESSEL' name: 'VESSEL'
},{ }, {
fieldLabel: '航次', fieldLabel: '航次',
name: 'VOYNO' name: 'VOYNO'
}, { }, {
fieldLabel: '订舱编号', fieldLabel: '订舱编号',
name: 'ORDERNO' name: 'ORDERNO'
}, { }, {
fieldLabel: '截止日期', fieldLabel: '截止日期',
format: 'Y-m-d', format: 'Y-m-d',
flex: 1, flex: 1,
xtype: 'datefield', xtype: 'datefield',
name: 'VGM_TIME' name: 'VGM_TIME'
}] }]
}, { }, {
xtype: 'container', xtype: 'container',
layout: 'hbox', layout: 'hbox',
defaultType: 'textfield', defaultType: 'textfield',
items: [ items: [
this.comboxCARRIER, this.comboxLOADPORT, this.comboxMATOU] this.comboxCARRIER, this.comboxLOADPORT, this.comboxMATOU]
@ -337,60 +420,78 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
xtype: 'container', xtype: 'container',
layout: 'hbox', layout: 'hbox',
defaultType: 'textfield', defaultType: 'textfield',
items: [{ items: [{
fieldLabel: '备注', fieldLabel: '备注',
name: 'REMARK' name: 'REMARK'
}] }]
}, this.panelBodyCtn }, this.panelBodyCtn
, { , {
xtype: 'container', xtype: 'container',
layout: 'hbox', layout: 'hbox',
defaultType: 'textfield', defaultType: 'textfield',
items: [ items: [
{ {
labelWidth: 90, labelWidth: 90,
fieldLabel: '船公司状态', fieldLabel: '船公司状态',
//hideLabel:true, //hideLabel:true,
name: 'CARRIERSTATUS', name: 'CARRIERSTATUS',
readOnly:true, readOnly: true,
listeners: { listeners: {
scope: this, scope: this,
focus: function () { focus: function () {
// 在这里编写你的点击事件逻辑 // 在这里编写你的点击事件逻辑
this.ShowHistory(this.bsno); this.ShowStatus(this.bsno, "CARRIER");
}
} }
}, {
labelWidth: 90,
fieldLabel: '云港通状态',
//hideLabel: true,
name: 'YGTSTATUS'
}, {
labelWidth: 90,
fieldLabel: '场站状态',
//hideLabel: true,
name: 'YARDSTATUS'
} }
] }, {
} labelWidth: 90,
, { fieldLabel: '云港通状态',
xtype: 'container', //hideLabel: true,
layout: 'hbox', name: 'YGTSTATUS',
defaultType: 'textfield', listeners: {
items: [ scope: this,
{ focus: function () {
fieldLabel: '链接地址', // 在这里编写你的点击事件逻辑
id: "LINKURL", this.ShowStatus(this.bsno, "YGT");
hidden:true, }
html:"",
} }
] }, {
} labelWidth: 90,
]//end items(fieldset 1) fieldLabel: '场站状态',
}//end fieldset 1 //hideLabel: true,
name: 'YARDSTATUS',
listeners: {
scope: this,
focus: function () {
// 在这里编写你的点击事件逻辑
this.ShowStatus(this.bsno, "YARD");
}
}
}
]
}
, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [
{
name: "LINKURL",
hidden: true
},
{
fieldLabel: '链接地址',
id: "LINKURL",
hidden: true,
html: "",
}
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items ]//end root items
}); //end this.formEdit }); //end this.formEdit
@ -399,7 +500,7 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
//按钮Toolbar //按钮Toolbar
this.panelBtn = new Ext.Panel({ this.panelBtn = new Ext.Panel({
region: "south", region: "south",
fbar: [ { fbar: [{
text: "关闭", text: "关闭",
handler: function (button, event) { handler: function (button, event) {
window.close(); window.close();
@ -411,13 +512,51 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
this.ShowHistory(this.bsno); this.ShowHistory(this.bsno);
}, },
scope: this scope: this
}, '-', { }
text: "发送/获取链接",
, {
xtype: 'button',
width: 90,
text: "复制链接",
id: "LINKURLbtn", hidden: true,
iconCls: "btnrefresh",
handler: function (button, event) { handler: function (button, event) {
this.winVGMShow.show(); var url = _this.formEdit.getForm().findField('LINKURL').getValue();
copyToClipboard(url);
}, },
scope: this scope: this
}] }
, '-',
{
text: "发送VGM", //"生成并发送VGM报文",
minWidth: 70,
handler: function () {
var cgFILEROLE = Ext.getCmp('vGMFILEROLE');
var FILEROLE = cgFILEROLE.getValue();
var ISCARRIER = _this.formEdit.getForm().findField('ISCARRIER').getValue();
var ISYGT = _this.formEdit.getForm().findField('ISYGT').getValue();
_this.onSendVGM(ISCARRIER, ISYGT, FILEROLE.FILEROLE);
}
}, {
text: "获取链接",
handler: function (button, event) {
_this.GetVgmLink();
},
scope: this
}
//, {
//text: "发送/获取链接",
//handler: function (button, event) {
// this.winVGMShow.show();
//}
//,
//scope: this
//}
]
}); //end 按钮Toolbar }); //end 按钮Toolbar
@ -426,7 +565,7 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
this.panelTop = new Ext.Panel({ this.panelTop = new Ext.Panel({
layout: "border", layout: "border",
region: "north", region: "north",
height: 360, height: 390,
items: [this.formEdit, this.panelBtn] items: [this.formEdit, this.panelBtn]
}); });
@ -468,39 +607,49 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
uncheckedValue: false, //未选中的值 uncheckedValue: false, //未选中的值
checked: true //绘制时的选中状态 checked: true //绘制时的选中状态
}, { }, {
xtype: "checkbox", //checkbox控件 xtype: "checkbox", //checkbox控件
name: "ISYGT", name: "ISYGT",
boxLabel: "", boxLabel: "",
fieldLabel: "运港通", fieldLabel: "云港通",
inputValue: true, //选中的值 inputValue: true, //选中的值
uncheckedValue: false, //未选中的值 uncheckedValue: false, //未选中的值
checked: true //绘制时的选中状态 checked: true //绘制时的选中状态
}] }
},{
]
},
{ xtype: 'hiddenfield', flex: 0.2 }
, {
xtype: 'container', xtype: 'container',
layout: 'hbox', layout: 'hbox',
defaultType: 'textfield', defaultType: 'textfield',
items: [{ items: [
xtype: 'radiogroup', {
fieldLabel:'操作类型', //'文件功能', xtype: 'radiogroup',
id: 'vGMFILEROLE', fieldLabel: '操作类型', //'文件功能',
defaults: { flex: 1 }, id: 'vGMFILEROLE',
layout: 'hbox', defaults: { flex: 1 },
items: [{ layout: 'hbox',
boxLabel: "新增", //'原始', items: [{
name: 'FILEROLE', boxLabel: "新增", //'原始',
inputValue: '9', name: 'FILEROLE',
checked: true inputValue: '9',
}, { checked: true
boxLabel: "修改", //'更新', }, {
name: 'FILEROLE', boxLabel: "修改", //'更新',
inputValue: '5' name: 'FILEROLE',
}, { inputValue: '5'
boxLabel: "删除", //'删除', }
name: 'FILEROLE',
inputValue: '4' //, {
}] //boxLabel: "删除", //'删除',
}] //name: 'FILEROLE',
//inputValue: '4'
//}
]
}
]
} }
]//end items(fieldset 1) ]//end items(fieldset 1)
}]//end root items }]//end root items
@ -563,7 +712,7 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
var ret = parentWin.OprationSwap_VGM(); var ret = parentWin.OprationSwap_VGM();
this.MeditRecord = ret[0]; this.MeditRecord = ret[0];
this.MStoreList = ret[1]; this.MStoreList = ret[1];
var _carrier= ret[2]; var _carrier = ret[2];
var _loadport = ret[3]; var _loadport = ret[3];
var _matou = ret[4]; var _matou = ret[4];
@ -578,24 +727,24 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
LoadData: function (bsno) { LoadData: function (bsno) {
this.formEdit.getForm().reset(); this.formEdit.getForm().reset();
this.formEdit.getForm().setValues(this.MeditRecord.data); this.formEdit.getForm().setValues(this.MeditRecord.data);
for (var j = 0; j < this.MStoreList.getCount(); j += 1) { //for (var j = 0; j < this.MStoreList.getCount(); j += 1) {
var memberbody = this.MStoreList.getAt(j); // var memberbody = this.MStoreList.getAt(j);
var record = Ext.create('MsOpVgmCtn', { // var record = Ext.create('MsOpVgmCtn', {
BSNO: memberbody.data.BSNO, // BSNO: memberbody.data.BSNO,
CTNALL: memberbody.data.CTNALL, // CTNALL: memberbody.data.CTNALL,
CNTRNO: memberbody.data.CNTRNO, // CNTRNO: memberbody.data.CNTRNO,
SEALNO: memberbody.data.SEALNO, // SEALNO: memberbody.data.SEALNO,
KGS: memberbody.data.KGS, // KGS: memberbody.data.KGS,
WEIGHTYPE: 'SM2', // WEIGHTYPE: 'SM2',
TAREWEIGHT: memberbody.data.TAREWEIGHT, // TAREWEIGHT: memberbody.data.TAREWEIGHT,
VGMKGS: Add(memberbody.data.KGS, memberbody.data.TAREWEIGHT), // VGMKGS: Add(memberbody.data.KGS, memberbody.data.TAREWEIGHT),
YARD: this.MeditRecord.data.YARD, // YARD: this.MeditRecord.data.YARD,
WEIGHDATE: memberbody.data.WEIGHDATE // WEIGHDATE: memberbody.data.WEIGHDATE
}); // });
this.storeCtnList.add(record); // this.storeCtnList.add(record);
}; //};
Ext.Ajax.request({ Ext.Ajax.request({
waitMsg: '正在查询主表数据...', waitMsg: '正在查询主表数据...',
@ -616,17 +765,41 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
return; return;
} }
var data = result.data; var data = result.data;
this.formEdit.getForm().findField('VGMSTATUS').setValue(data.VGMSTATUS);
//this.formEdit.getForm().findField('CARRIERSTATUS').setValue(data.CARRIERSTATUS);
//this.formEdit.getForm().findField('YGTSTATUS').setValue(data.YGTSTATUS);
if (data.BSNO) {
data.VGM_TIME = data.VGM_TIME.replace(" 0:00:00", "");
this.formEdit.getForm().setValues(data);
this.formEdit.getForm().findField('VGMSTATUS').setValue(data.VGMSTATUS);
this.formEdit.getForm().findField('CARRIERSTATUS').setValue(data.CARRIERSTATUS);
this.formEdit.getForm().findField('YGTSTATUS').setValue(data.YGTSTATUS);
this.formEdit.getForm().findField('YARDSTATUS').setValue(data.YARDSTATUS);
if (data.LOADPORT) {
this.storeMATOU.load({ params: { enumTypeId: 96304, sCondition: "EnumValueName_2='" + data.LOADPORT + "'" } });
}
}
if (data.LINKURL) { if (data.LINKURL) {
var url = `<a href="` + data.LINKURL + `" target="_blank">` + data.LINKURL +`</a>`; var url = `<a href="` + data.LINKURL + `" target="_blank">` + data.LINKURL + `</a>`;
Ext.getCmp("LINKURL").show(); Ext.getCmp("LINKURL").show();
Ext.getCmp("LINKURL").getEl().dom.innerHTML = url; Ext.getCmp("LINKURL").getEl().dom.innerHTML = url;
this.formEdit.getForm().findField('LINKURL').setValue(data.LINKURL);
Ext.getCmp("LINKURLbtn").show();
}
if (data.VGMSTATUS) {
var url2 = `<a ><b>` + data.VGMSTATUS + `</b></a>`;
Ext.getCmp("VGMSTATUS").show();
Ext.getCmp("VGMSTATUS").getEl().dom.innerHTML = url2;
} }
@ -636,7 +809,34 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
}, },
scope: this scope: this
}); });
//this.storeCtnList.load({ params: { bsno: this.bsno} }); _this = this;
this.storeCtnList.load({
params: { condition: "bsno='" + this.bsno + "'" },
callback: function (options, success, response) {
if (_this.storeCtnList.getCount() == 0) {
for (var j = 0; j < _this.MStoreList.getCount(); j += 1) {
var memberbody = _this.MStoreList.getAt(j);
var record = Ext.create('MsOpVgmCtn', {
BSNO: memberbody.data.BSNO,
CTNALL: memberbody.data.CTNALL,
CNTRNO: memberbody.data.CNTRNO,
SEALNO: memberbody.data.SEALNO,
KGS: memberbody.data.KGS,
WEIGHTYPE: 'SM2',
TAREWEIGHT: memberbody.data.TAREWEIGHT,
VGMKGS: Add(memberbody.data.KGS, memberbody.data.TAREWEIGHT),
YARD: _this.MeditRecord.data.YARD,
WEIGHDATE: memberbody.data.WEIGHDATE
});
_this.storeCtnList.add(record);
};
}
}
});
}, // end LoadDate }, // end LoadDate
@ -651,6 +851,9 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
this.formEdit.getForm().findField('ISYGT').setValue(ISYGT); this.formEdit.getForm().findField('ISYGT').setValue(ISYGT);
this.formEdit.getForm().findField('SENDTYPE').setValue(FILEROLE); this.formEdit.getForm().findField('SENDTYPE').setValue(FILEROLE);
MATOU = this.formEdit.getForm().findField('MATOU').getValue();
LOADPORT = this.formEdit.getForm().findField('LOADPORT').getValue();
this.formEdit.getForm().findField('GID').setDisabled(false); this.formEdit.getForm().findField('GID').setDisabled(false);
var data = this.formEdit.getForm().getValues(false, false, false); var data = this.formEdit.getForm().getValues(false, false, false);
this.formEdit.getForm().findField('GID').setDisabled(true); this.formEdit.getForm().findField('GID').setDisabled(true);
@ -678,14 +881,19 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
Ext.MessageBox.hide(); Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText); var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) { if (jsonresult.Success) {
var returnData = jsonresult.Data; //var returnData = jsonresult.Data;
_this.formEdit.getForm().setValues(returnData); //_this.formEdit.getForm().setValues(returnData);
_this.LoadData(_this.bsno);
_this.winVGMShow.close(); _this.winVGMShow.close();
} else { } else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
_this.winVGMShow.close();
} }
} else { } else {
Ext.Msg.show({ title: '请重试', Ext.Msg.show({
title: '请重试',
msg: '服务器响应出错', msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
}); });
@ -765,15 +973,42 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
var ISCARRIER = this.formVGMShow.getForm().findField('ISCARRIER').getValue(); var ISCARRIER = this.formVGMShow.getForm().findField('ISCARRIER').getValue();
var ISYGT = this.formVGMShow.getForm().findField('ISYGT').getValue(); var ISYGT = this.formVGMShow.getForm().findField('ISYGT').getValue();
var basicForm = this.formEdit.getForm();
if (!basicForm.isValid()) {
return;
}
this.formEdit.getForm().findField('ISCARRIER').setValue(ISCARRIER);
this.formEdit.getForm().findField('ISYGT').setValue(ISYGT);
var cgFILEROLE = Ext.getCmp('vGMFILEROLE');
var FILEROLE = cgFILEROLE.getValue();
this.formEdit.getForm().findField('SENDTYPE').setValue(FILEROLE);
MATOU = this.formEdit.getForm().findField('MATOU').getValue();
LOADPORT = this.formEdit.getForm().findField('LOADPORT').getValue();
this.formEdit.getForm().findField('GID').setDisabled(false);
var data = this.formEdit.getForm().getValues(false, false, false);
this.formEdit.getForm().findField('GID').setDisabled(true);
var bodyctndatas = [];
for (var i = 0; i < this.storeCtnList.getCount(); i += 1) {
var member = this.storeCtnList.getAt(i);
bodyctndatas.push(member);
}
;
var jsonCtnBody = ConvertRecordsToJsonAll(bodyctndatas);
Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({ Ext.Ajax.request({
waitMsg: '正在保存数据...', waitMsg: '正在保存数据...',
url: '/MvcShipping/MsOpVgmSend/GetVgmLink', url: '/MvcShipping/MsOpVgmSend/GetVgmLink',
scope: this, scope: this,
params: { params: {
BSNO: this.bsno, data: Ext.JSON.encode(data),
sendCarr: ISCARRIER, bodylist: jsonCtnBody,
sendYGT: ISYGT
}, },
callback: function (options, success, response) { callback: function (options, success, response) {
if (success) { if (success) {
@ -781,12 +1016,15 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
var jsonresult = Ext.JSON.decode(response.responseText); var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) { if (jsonresult.Success) {
var returnData = jsonresult.Data; var returnData = jsonresult.Data;
//_this.sendVgm.formEdit.getForm().setValues(returnData); _this.LoadData(_this.bsno);
//_this.winVGMShow.close();
_this.winVGMShow.close(); _this.winVGMShow.close();
} else { } else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
_this.winVGMShow.close();
_this.LoadData(_this.bsno); _this.LoadData(_this.bsno);
_this.winVGMShow.close();
} }
} else { } else {
Ext.Msg.show({ Ext.Msg.show({
@ -798,10 +1036,20 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
} }
}); });
} //end save } //end save
, ShowStatus: function (BSNO,type) { , ShowStatus: function (BSNO, type) {
//var customername = this.formHead.getForm().findField('CUSTOMERNAME').getValue(); //var customername = this.formHead.getForm().findField('CUSTOMERNAME').getValue();
title = "历史记录"; titlehead = "";
if (type == "CARRIER") {
titlehead = "船公司"
}
if (type == "YGT") {
titlehead = "云港通"
}
if (type == "YARD") {
titlehead = "场站"
}
title = titlehead + " 历史记录";
model = Ext.define('op_seae_vgm_history_md', { model = Ext.define('op_seae_vgm_history_md', {
extend: 'Ext.data.Model', extend: 'Ext.data.Model',
@ -815,7 +1063,7 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, {
] ]
}); });
proxyUrl = '/MvcShipping/MsOpVgmSend/GetStatusList'+"_"+type; proxyUrl = '/MvcShipping/MsOpVgmSend/GetStatusList' + "_" + type;
condition = BSNO; condition = BSNO;

Loading…
Cancel
Save