Model.prototype.orderBtnClick = function(event){
var orderData = this.comp("orderData");
var userData = this.comp("userData");
var CartData = this.comp("CartData");
var me = this;
var content = "";
var orderID = justep.UUID.createUUID();
CartData.each(function(options){
content = content + options.row.val("fMuneName") + "(" + options.row.val("fCount") + ")";
});
var orderRows = orderData.newData({
index: 0,
defaultValues:[{
"fID": orderID,
"fCreateTime": justep.Date.toString(new Date(), justep.Date.STANDART_FORMAT),
"fContent": content,
"fUserID": userData.val("fID"),
"fUserName": userData.val("fName"),
"fPhoneNumber": userData.val("fPhoneNumber"),
"fAddress": userData.val("fAddress"),
"fSum": this.comp("calcData").val("fSumMoney")
}]
})
orderData.saveData({
onSuccess: function(){
justep.Util.hint("下单成功");
CartData.clear();
me.comp("contents").to("orderContent");
},
var orderData = this.comp("orderData");
var userData = this.comp("userData");
var CartData = this.comp("CartData");
var me = this;
var content = "";
var orderID = justep.UUID.createUUID();
CartData.each(function(options){
content = content + options.row.val("fMuneName") + "(" + options.row.val("fCount") + ")";
});
var orderRows = orderData.newData({
index: 0,
defaultValues:[{
"fID": orderID,
"fCreateTime": justep.Date.toString(new Date(), justep.Date.STANDART_FORMAT),
"fContent": content,
"fUserID": userData.val("fID"),
"fUserName": userData.val("fName"),
"fPhoneNumber": userData.val("fPhoneNumber"),
"fAddress": userData.val("fAddress"),
"fSum": this.comp("calcData").val("fSumMoney")
}]
})
orderData.saveData({
onSuccess: function(){
justep.Util.hint("下单成功");
CartData.clear();
me.comp("contents").to("orderContent");
},