修正調整很多東西
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<label>查詢條件</label>
|
||||
</v-col>
|
||||
<v-col cols="8" sm="8" md="2">
|
||||
<v-btn @click.prevent='fast_signup' class="ms-auto">快速報名</v-btn>
|
||||
<!--<v-btn @click.prevent='fast_signup' class="ms-auto">快速報名</v-btn>-->
|
||||
<v-btn @click.prevent="back01()" class="ms-auto">返回</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
year: '',
|
||||
month: '',
|
||||
season: '',
|
||||
chk_hasact: false,
|
||||
chk_hasact: true,
|
||||
chk_noact: false,
|
||||
select_act: '',
|
||||
select_actitem: '',
|
||||
@@ -217,6 +217,7 @@
|
||||
this.search.activity_num = this.this_act;
|
||||
this.initPrintSearch();
|
||||
this.initActivity();
|
||||
this.getDefault();
|
||||
const navEntries = performance.getEntriesByType("navigation");
|
||||
const isReload = navEntries.length > 0 && navEntries[0].type === "reload";
|
||||
|
||||
@@ -247,7 +248,7 @@
|
||||
this.isSearched = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (printResult === 'nodata' || printResult === 'success') {
|
||||
|
||||
|
||||
@@ -266,6 +267,7 @@
|
||||
window.history.replaceState({}, '', cleanUrl);
|
||||
}, 100);
|
||||
});
|
||||
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
@@ -700,7 +702,7 @@
|
||||
$btn.click();
|
||||
let el = document.getElementById('offcanvasRight');
|
||||
let offcanvas = bootstrap.Offcanvas.getOrCreateInstance(el);
|
||||
offcanvas.show();
|
||||
//offcanvas.show();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -747,7 +749,7 @@
|
||||
<a v-if="item.f_num != null && item.activity_num != null && item.status == 1" class="btn btn-outline-secondary btn-sm opacity-50" style="pointer-events: none" ><i class="mdi mdi-account-check"></i>已報到</a>
|
||||
</template>
|
||||
<template #item.slot_btn="{ item }">
|
||||
<a :href="'reg.aspx?order_no='+item.order_no" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
|
||||
<a :href="'reg.aspx?order_no='+item.order_no" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>編輯</a>
|
||||
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
||||
</template>
|
||||
</v-data-table>
|
||||
@@ -877,11 +879,11 @@
|
||||
<span class="fs-6 text text-dark">活動 *</span>
|
||||
</v-col>
|
||||
<v-col :cols="10" class="pt-5" >
|
||||
活動/非活動至少勾選一項
|
||||
<%--活動/非活動至少勾選一項
|
||||
<v-checkbox
|
||||
v-model="print_search.chk_noact"
|
||||
:label="`非活動報名`"
|
||||
></v-checkbox>
|
||||
></v-checkbox> --%>
|
||||
<v-checkbox
|
||||
v-model="print_search.chk_hasact"
|
||||
:label="`活動報名`"
|
||||
|
||||
@@ -859,7 +859,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;
|
||||
@@ -869,6 +869,43 @@
|
||||
this.editedIndex = this.desserts.indexOf(item);
|
||||
this.editedItem = $.extend(true, {}, item);
|
||||
this.file_dialog.show = true;
|
||||
},
|
||||
printItemNew(item) {
|
||||
let list = [{
|
||||
num: item.num, print_id: item.print_id, order_no: item.order_no, from_id: item.from_id,
|
||||
printed_files: item.printed_files
|
||||
}]
|
||||
let list_count = 1;
|
||||
|
||||
//// 送出列印
|
||||
let _url = HTTP_HOST + 'admin/print/print_multi_new.aspx';
|
||||
var form = document.createElement("form");
|
||||
form.method = "POST";
|
||||
form.action = _url;
|
||||
form.target = "_blank"; // Open the result in a new tab
|
||||
// Helper function to add hidden fields
|
||||
const addHiddenField = (name, value) => {
|
||||
const hiddenField = document.createElement("input");
|
||||
hiddenField.type = "hidden";
|
||||
hiddenField.name = name;
|
||||
hiddenField.value = value;
|
||||
form.appendChild(hiddenField);
|
||||
};
|
||||
// Add form fields
|
||||
console.log(item.actitem_num_selected, item.num, JSON.stringify(list));
|
||||
addHiddenField("item", item.actitem_num_selected.val);
|
||||
addHiddenField("file", item.num);
|
||||
addHiddenField("list", JSON.stringify(list));
|
||||
addHiddenField("title", `${item.actitem_num_selected} / ${item.subject}`);
|
||||
//console.log("底家:",this.data_table.selected);
|
||||
localStorage.setItem("item", item.actitem_num_selected.val);
|
||||
localStorage.setItem("list", JSON.stringify(list));
|
||||
|
||||
document.body.appendChild(form); // Not entirely sure if this is necessary
|
||||
form.submit();
|
||||
document.body.removeChild(form);
|
||||
|
||||
|
||||
},
|
||||
async editTabletNew(item) {
|
||||
this.editedIndex = this.desserts.indexOf(item);
|
||||
@@ -1849,6 +1886,14 @@
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
function validateHiddenField(sender, args) {
|
||||
// 透過 ClientID 取得 HiddenField 的值
|
||||
var hiddenValue = document.getElementById('<%= activity_num.ClientID %>').value;
|
||||
|
||||
// 如果值不為空,則驗證通過 (true)
|
||||
args.IsValid = (hiddenValue.trim() !== "");
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="page_nav" runat="Server">
|
||||
@@ -1858,8 +1903,8 @@
|
||||
</div>
|
||||
<div class="">
|
||||
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary" />
|
||||
<asp:Button ID="edit" runat="server" Text="修改" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
||||
<asp:Button ID="goback" runat="server" Text="取消" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
||||
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
||||
<asp:Button ID="goback" runat="server" Text="返回" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||
@@ -1876,7 +1921,7 @@
|
||||
type="button" role="tab" aria-controls="profile" aria-selected="false">
|
||||
報名明細</button>
|
||||
<button class="nav-link" id="sec2-tab5" data-bs-toggle="tab" data-bs-target="#sec2-page5"
|
||||
type="button" role="tab" aria-controls="profile" aria-selected="false">
|
||||
type="button" role="tab" aria-controls="profile" aria-selected="false" style="display:none;">
|
||||
疏文名單</button>
|
||||
<button class="nav-link" id="sec2-tab3" data-bs-toggle="tab" data-bs-target="#sec2-page3"
|
||||
type="button" role="tab" aria-controls="profile" aria-selected="false" v-if="lists.length > 0">
|
||||
@@ -1915,7 +1960,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 ">
|
||||
<label class="col-sm-2 col-lg-1 col-form-label">報名活動</label>
|
||||
<label class="col-sm-2 col-lg-1 col-form-label">報名活動 *</label>
|
||||
<div class="col-sm-10 col-lg-3">
|
||||
<asp:PlaceHolder ID="activity_numPH" runat="server">
|
||||
<div class="input-group mb-3" data-search-control="search3" @click="order_no=='' && search_show(search_dialog.controls.search3)">
|
||||
@@ -1925,7 +1970,10 @@
|
||||
<button class="btn btn-outline-secondary" type="button">
|
||||
<i class="mdi mdi-view-list-outline"></i>
|
||||
</button>
|
||||
</div>
|
||||
<asp:CustomValidator ID="CustomValidator1" runat="server"
|
||||
ErrorMessage="活動不可為空!"
|
||||
ClientValidationFunction="validateHiddenField" />
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<asp:Literal ID="activity_num_txt2" runat="server"></asp:Literal>
|
||||
</div>
|
||||
@@ -2128,14 +2176,17 @@
|
||||
<v-icon title="刪除" color="red" class="mr-2" @click="deleteItem(item)">
|
||||
mdi-delete
|
||||
</v-icon>
|
||||
<v-icon title="編輯牌位" color="blue" class="mr-2" @click="editTablet(item);">
|
||||
<%--<v-icon title="編輯牌位" color="blue" class="mr-2" @click="editTablet(item);">
|
||||
mdi-file-document-edit-outline
|
||||
</v-icon>
|
||||
</v-icon> --%>
|
||||
<v-icon title="編輯牌位New" color="blue" class="mr-2" @click="editTabletNew(item);">
|
||||
mdi-file-document-edit-outline
|
||||
</v-icon>
|
||||
<v-icon title="列印" color="blue" class="mr-2" @click="printItem(item);" v-if="canPrint || lists.length==0" >
|
||||
<%--<v-icon title="列印" color="blue" class="mr-2" @click="printItem(item);" v-if="canPrint || lists.length==0" >
|
||||
mdi-printer
|
||||
</v-icon>--%>
|
||||
<v-icon title="預覽" color="blue" class="mr-2" @click="printItemNew(item);" v-if="canPrint || lists.length==0" >
|
||||
mdi-printer-eye
|
||||
</v-icon>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user