|
|
@ -837,14 +837,46 @@ Ext.extend(Shipping.MsCodeFeeTemplateAgentEdit, Ext.Panel, {
|
|
|
|
|
|
|
|
|
|
|
|
deleteDetail: function (type) {
|
|
|
|
deleteDetail: function (type) {
|
|
|
|
|
|
|
|
|
|
|
|
var selectedRecords = this.gridList.selModel.getSelection();
|
|
|
|
|
|
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
|
for (var i = 0; i < selectedRecords.length; i++) {
|
|
|
|
if (selections.length == 0) {
|
|
|
|
var rec = selectedRecords[i];
|
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
|
|
|
return;
|
|
|
|
this.storeBodyList.remove(rec);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var record = selections[0];
|
|
|
|
|
|
|
|
var GID = record.data.GID;
|
|
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
|
|
|
|
|
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
|
|
|
waitMsg: '正在删除数据...',
|
|
|
|
|
|
|
|
url: '/MvcShipping/MsCodeFeeTemplateAgent/DeleteDetail',
|
|
|
|
|
|
|
|
params: {
|
|
|
|
|
|
|
|
GID: GID
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
|
|
|
if (success) {
|
|
|
|
|
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
|
|
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
|
|
|
this.storeBodyList.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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|