2 Commits

3 changed files with 9 additions and 11 deletions
+8
View File
@@ -522,6 +522,10 @@ public class orderController : ApiController
text = ar.actItem.subject, text = ar.actItem.subject,
val = ar.actItem_num, val = ar.actItem_num,
}, },
has_yang_limit = ar.has_yang_limit ?? false,
has_chao_limit = ar.has_chao_limit ?? false,
yang_limit_count = ar.yang_limit_count ?? 0,
chao_limit_count = ar.chao_limit_count ?? 0,
parent_num = q.num, parent_num = q.num,
f_num_selected = new f_num_selected = new
{ {
@@ -602,6 +606,10 @@ public class orderController : ApiController
text = x.actItem.subject, text = x.actItem.subject,
val = x.actItem.num, val = x.actItem.num,
}, },
has_yang_limit = x.has_yang_limit,
has_chao_limit = x.has_chao_limit,
yang_limit_count = x.yang_limit_count,
chao_limit_count = x.chao_limit_count,
f_num_selected = new f_num_selected = new
{ {
text = "", text = "",
-8
View File
@@ -502,15 +502,12 @@ public partial class admin_follower_reg : MyWeb.config
{ {
if (!isStrNull(pro_order.order_no)) if (!isStrNull(pro_order.order_no))
{ {
Debug.WriteLine(pro_order.order_no);
_db.pro_order.Add(pro_order); _db.pro_order.Add(pro_order);
_db.SaveChanges(); _db.SaveChanges();
// 報名品項(最近一次訂單內容) // 報名品項(最近一次訂單內容)
if (latestOrder != null) if (latestOrder != null)
{ {
Debug.WriteLine("上次的單號 ", latestOrder.order_no);
var last_order_details = _db.pro_order_detail.Where(o => o.order_no == latestOrder.order_no).ToList(); var last_order_details = _db.pro_order_detail.Where(o => o.order_no == latestOrder.order_no).ToList();
foreach (var last_order_detail in last_order_details) foreach (var last_order_detail in last_order_details)
{ {
@@ -564,7 +561,6 @@ public partial class admin_follower_reg : MyWeb.config
if (!string.IsNullOrEmpty(hid_delete_order_list.Value)) if (!string.IsNullOrEmpty(hid_delete_order_list.Value))
{ {
var ids = hid_delete_order_list.Value.TrimEnd(',').Split(','); var ids = hid_delete_order_list.Value.TrimEnd(',').Split(',');
Debug.WriteLine(ids);
var prod = _db.pro_order.Where(q => ids.Contains(q.order_no)).ToList(); var prod = _db.pro_order.Where(q => ids.Contains(q.order_no)).ToList();
if (prod.Count() > 0) if (prod.Count() > 0)
{ {
@@ -616,7 +612,6 @@ public partial class admin_follower_reg : MyWeb.config
if (!string.IsNullOrEmpty(hid_delete_order_list.Value)) if (!string.IsNullOrEmpty(hid_delete_order_list.Value))
{ {
var ids = hid_delete_order_list.Value.TrimEnd(',').Split(','); var ids = hid_delete_order_list.Value.TrimEnd(',').Split(',');
Debug.WriteLine(ids);
var prod = _db.pro_order.Where(q => ids.Contains(q.order_no)).ToList(); var prod = _db.pro_order.Where(q => ids.Contains(q.order_no)).ToList();
if (prod.Count() > 0) if (prod.Count() > 0)
{ {
@@ -693,15 +688,12 @@ public partial class admin_follower_reg : MyWeb.config
{ {
if (!isStrNull(pro_order.order_no)) if (!isStrNull(pro_order.order_no))
{ {
Debug.WriteLine(pro_order.order_no);
_db.pro_order.Add(pro_order); _db.pro_order.Add(pro_order);
_db.SaveChanges(); _db.SaveChanges();
// 報名品項(最近一次訂單內容) // 報名品項(最近一次訂單內容)
if (latestOrder != null) if (latestOrder != null)
{ {
Debug.WriteLine("上次的單號 ", latestOrder.order_no);
var last_order_details = _db.pro_order_detail.Where(o => o.order_no == latestOrder.order_no).ToList(); var last_order_details = _db.pro_order_detail.Where(o => o.order_no == latestOrder.order_no).ToList();
foreach (var last_order_detail in last_order_details) foreach (var last_order_detail in last_order_details)
{ {
-2
View File
@@ -783,8 +783,6 @@
this.desserts_count = response.data.list !== undefined ? response.data.count : 0 this.desserts_count = response.data.list !== undefined ? response.data.count : 0
this.calutotalPrice(); this.calutotalPrice();
this.disableButton = false; this.disableButton = false;
console.log(response.data.list);
}) })
.catch( .catch(
error => console.log(error) error => console.log(error)