1. 加上返回鍵
2. 修改報名記錄中的活動開始結束時間 3. 修正列印問題 4. 信眾資料及報名管理起始不會出現資料 5. 信眾不得重複報名相同活動 6. 信眾資料的 cache(含結果與搜尋條件) 7. 修復信眾、活動、品項刪除功能 8. 增加自訂是否自動編號 9. 優化信眾資料頁面(彈出查詢頁面、顯示剛新增資料) 10. 新增管理表單匯出 excel 功能 11. 無查詢資料時不可點選匯出/列印按鈕 12. 匯出/列印管理報表時,若無資料則顯示提示 13. 新增信眾資料時,加入日期預設為今日
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
vuetify: new Vuetify(vuetify_options),
|
||||
data() {
|
||||
return {
|
||||
isFirstLoad: true,
|
||||
this_act : '<%= Request["act_id"]%>',
|
||||
options: { multiSort: false },
|
||||
search_options: { multiSort: false },
|
||||
@@ -211,9 +212,13 @@
|
||||
this.initActivity();
|
||||
const navEntries = performance.getEntriesByType("navigation");
|
||||
const isReload = navEntries.length > 0 && navEntries[0].type === "reload";
|
||||
const isBackForward = navEntries.length > 0 && navEntries[0].type === "back_forward";
|
||||
if (isReload) {
|
||||
sessionStorage.removeItem("orderpage");
|
||||
}
|
||||
else if (isBackForward) {
|
||||
this.isFirstLoad = false;
|
||||
}
|
||||
else {
|
||||
const savedPage = parseInt(sessionStorage.getItem('orderpage'));
|
||||
if (savedPage) {
|
||||
@@ -224,6 +229,11 @@
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
if (this.isFirstLoad) {
|
||||
this.isFirstLoad = false;
|
||||
this.data_table.loading = false;
|
||||
return;
|
||||
}
|
||||
this.getDefault()
|
||||
},
|
||||
deep: true,
|
||||
@@ -368,7 +378,8 @@
|
||||
//}
|
||||
//this.data_table.selected = [];
|
||||
//this.data_table.count = this.data_table.list.length
|
||||
location.reload();
|
||||
//location.reload();
|
||||
this.getDefault();
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
}
|
||||
@@ -537,7 +548,7 @@
|
||||
initActivity() {
|
||||
axios.get(HTTP_HOST + 'api/activity')
|
||||
.then(response => {
|
||||
this.select_act_list = response.data
|
||||
this.select_act_list = response.data
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
|
||||
@@ -526,7 +526,7 @@
|
||||
window.addEventListener('message', async (event) => {
|
||||
if (event.data.source === 'editor.btn.click') {
|
||||
const receivedData = event.data.data;
|
||||
|
||||
|
||||
// 更新編輯中的項目
|
||||
//if (receivedData.tabletItem && this.editedIndex > -1) {
|
||||
if (receivedData.tabletItem) {
|
||||
@@ -807,7 +807,7 @@
|
||||
isValidDate = Date.parse(item.pay_date);
|
||||
if (!isNaN(isValidDate))
|
||||
item.pay_date = new Date(item.pay_date).format("yyyy-MM-dd")
|
||||
|
||||
console.log(item);
|
||||
this.editedItem = $.extend(true, {}, item);
|
||||
this.data_dialog.show = true;
|
||||
this.data_dialog.isAddNew = false;
|
||||
@@ -971,9 +971,11 @@
|
||||
/* (this.editedItem.category=="1"? this.editedItem.from_id_selected.val != 0 : true) &&*/
|
||||
this.requireData(this.editedItem.qty, (this.editedItem.num == 0 ? false : true)) ) /* qty為0視為不需要此項目,不儲存此筆資料*/
|
||||
{
|
||||
console.log(this.editedItem);
|
||||
//check price
|
||||
if (this.editedItem.pay <= this.editedItem.price * this.editedItem.qty) {
|
||||
|
||||
console.log(this.editedItem.f_num_selected.val);
|
||||
console.log(this.editedItem.from_id_selected.val);
|
||||
//check qty
|
||||
//數量不可小於掛單明細的數量
|
||||
if (this.editedItem.qty >= this.editedItem.writeBedQty + this.editedItem.notBedQty) {
|
||||
|
||||
+23
-12
@@ -1,15 +1,16 @@
|
||||
using System;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
using System.Data.OleDb;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
|
||||
public partial class admin_order_reg : MyWeb.config
|
||||
{
|
||||
@@ -187,16 +188,26 @@ public partial class admin_order_reg : MyWeb.config
|
||||
{
|
||||
if (!isStrNull(pro_order.order_no))
|
||||
{
|
||||
_db.pro_order.Add(pro_order);
|
||||
_db.SaveChanges();
|
||||
bool isRegistered = _db.pro_order.Any(x => x.f_num == pro_order.f_num && x.activity_num == pro_order.activity_num);
|
||||
|
||||
Model.admin_log admin_log = new Model.admin_log();
|
||||
admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Order, (int)Model.admin_log.Status.Insert, pro_order.order_no);
|
||||
if (isRegistered) // 重複報名
|
||||
{
|
||||
L_msg.Type = alert_type.warning;
|
||||
L_msg.Text = "此信眾已報名過本活動";
|
||||
}
|
||||
else
|
||||
{
|
||||
_db.pro_order.Add(pro_order);
|
||||
_db.SaveChanges();
|
||||
|
||||
Model.admin_log admin_log = new Model.admin_log();
|
||||
admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Order, (int)Model.admin_log.Status.Insert, pro_order.order_no);
|
||||
|
||||
|
||||
string url = "index.aspx";
|
||||
url = "reg.aspx?order_no=" + pro_order.order_no;
|
||||
Response.Redirect(url);
|
||||
string url = "index.aspx";
|
||||
url = "reg.aspx?order_no=" + pro_order.order_no;
|
||||
Response.Redirect(url);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user