This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head><title></title> | |
<!--JQUERY UI--> | |
<script type="text/javascript" src="http://web.systemlead.com/bufferorderweb/scripts/jquery-2.0.1.min.js"></script> | |
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
<script type="text/javascript"> | |
$(function () { | |
ShowMenu(); | |
}); | |
//顯示菜單 | |
function ShowMenu() { | |
var TRANSDT = '2013-09-07'; | |
var BOSTORE_NO = '30001000' | |
jQuery.ajax({ | |
url: 'http://web.systemlead.com/bufferorderweb/OrderProcess.aspx/ShowMenu', | |
type: 'post', | |
contentType: "application/json; charset=utf-8", | |
data: '{"BOSTORE_NO":"' + BOSTORE_NO + '","TRANSDT":"' + TRANSDT + '"}', | |
dataType: 'json', | |
success: BindMenuItem, | |
error: function () { | |
alert("error"); | |
} | |
}); | |
} | |
function BindMenuItem(response) { | |
//alert(response.d); | |
var rList = $.parseJSON(response.d); | |
var tmp = ""; | |
$.each(rList, function (i, item) { | |
//alert(item.aVAILABLE_QTYField); | |
var str1 = ""; | |
if ((item.aVAILABLE_QTYField).toString() != "0") { | |
str1 = "<input type='button' class='add' />" | |
+ "<input type='text' placeholder='0' class='align-center' value='0' onkeypress='TextBoxNumCheck_Int();' " | |
+ "id='txt" + item.mEALNOField + "' alt='" + item.mEAL_PRICEField + "'>" | |
+ "<input type='button' class='less' />" | |
+ "<span class='checkNumber'>數量:0</span>"; | |
} | |
else { | |
str1 = "<button class='info disabled center'>已售完</button>"; | |
} | |
tmp = tmp + "<div alt='dishesList _" + item.cAEGORY_NOField + "' id='" + "divMEALKIND" + item.mEALKINDField + "'>" | |
+ "<h2>" + item.mEALNAField + "</h2>" | |
+ "<span class='roll' title='" + item.dESCTXTField + "'></span>" | |
+ "<img src='http://web.systemlead.com/bufferorderweb/show_image.ashx?W=190&H=220&FID=" + item.fIDField + "' " | |
+ "alt='" + item.mEALNOField + "' title='" + item.dESCTXTField + "' " | |
+ "id='img" + item.mEALNOField + "' />" | |
+ "$" + item.mEAL_PRICEField + "元 <span>每日供應" + item.dATE_LIMITField + "份</span>" | |
+ "<div class='dishesMenu'>" | |
+ str1 | |
+ "</div></div>"; | |
}); | |
$("#rptMain").children().remove(); | |
$("#rptMain").append(tmp); | |
} | |
</script> | |
</head> | |
<body> | |
<form> | |
<div id='rptMain'></div> | |
</form> | |
</body> | |
</html> |
沒有留言:
張貼留言