?? delopenroominfo.js
字號:
?// JScript 文件
//退房
DelOpenRoomInfo=function(row)
{
//首先刪除開房信息
Ext.Ajax.request({
url:"URL/OpenRoomInfo/DelOpenRoomInfo.aspx",
method:"POST",
params:{
openroomid:row.data.openroomid
},
success:function()
{
DelOpenRoomInfoWin.show();
},
failure:function()
{
Ext.Msg.alert("提 示","刪除開房信息失敗!");
}
});
var DelOpenRoomInfofp=new Ext.form.FormPanel({
width:305,
height:210,
plain:true,
layout:"form",
defaultType:"textfield",
labelWidth:75,
baseCls:"x-plain",
//錨點布局-
defaults:{anchor:"95%",msgTarget:"side"},
buttonAlign:"center",
bodyStyle:"padding:0 0 0 0",
items:[
{
name:"guestmoney",
xtype:'textfield',
fieldLabel:"預付定金",
readOnly:true,
value:row.data.guestmoney,
renderer:function(value)
{
return value+"元";
}
},{
name:"roommoney",
xtype:"textfield",
fieldLabel:"房費總額",
readOnly:true
},{
name:"totalremark",
xtype:"textarea",
fieldLabel:"備注",
allowBlank:false,
blankText:"詳細備注不允許為空",
regex:/^[\s\S]{1,25}$/,
regexText:"詳細備注請不要超過25個字符",
emptyText:"如果沒有備注請填:暫無備注"
}]
});
var DelOpenRoomInfoWin=new Ext.Window({
title:"退房結帳",
width:340,
height:230,
plain:true,
iconCls:"addicon",
//不可以隨意改變大小
resizable:false,
//是否可以拖動
//draggable:false,
defaultType:"textfield",
labelWidth:100,
collapsible:true, //允許縮放條
closeAction : 'hide',
closable:false,
plain : true,
//彈出模態窗體
modal: 'true',
buttonAlign:"center",
bodyStyle:"padding:10px 0 0 15px",
items:[DelOpenRoomInfofp],
listeners:{
"show":function()
{
DelOpenRoomInfofp.form.load(
{
url:"DATA/OpenRoomRecordInfo/DelRoomOpenInfo.aspx?roomid="+row.data.roomid,
method:"get",
success:function(form,action)
{
},
failure:function(form,action)
{
Ext.Msg.alert("提示信息","對不起加載數據失敗!");
}
}
);
}
},
buttons:[{
text:"確認結帳",
minWidth:70,
handler:function()
{
if(DelOpenRoomInfofp.getForm().isValid())
{
//彈出效果
Ext.MessageBox.show
(
{
msg: '正在結帳,請稍等...',
progressText: 'Saving...',
width:300,
wait:true,
waitConfig: {interval:200},
icon:'download',
animEl: 'saving'
}
);
setTimeout(function(){}, 1000);
DelOpenRoomInfofp.form.submit({
url:"URL/TotalInfo/SaveRoomMoneyInfo.aspx",
method:"POST",
success:function(form,action)
{
//成功后
var flag=action.result.success;
if(flag=="true")
{
Ext.MessageBox.alert("提 示!","結帳成功!");
DelOpenRoomInfoWin.hide();
RoomOpenInfostore.reload();
}
},
failure:function(form,action)
{
Ext.MessageBox.alert("提示!","結帳失敗!");
}
});
}
}
}]
});
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -