chore: 首次簽入 Thinkyu ASP.NET 專案

- 加入 Visual Studio / ASP.NET .gitignore
- 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
2026-09-10 09:42:37 +08:00
commit 577060bc78
2496 changed files with 501389 additions and 0 deletions
@@ -0,0 +1,280 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="付款設定.ascx.cs" Inherits="Education.付款設定" %>
<div id="PaymentSettingAPP" style="padding: 1rem 0">
<!-- 訊息浮動提示 -->
<transition name="toast">
<div v-show="ShowMessage" :class="['toast-message', 'toast-' + MessageType]">
<span class="toast-icon">
<template v-if="MessageType === 'success'">✓</template>
<template v-else-if="MessageType === 'error'">✕</template>
<template v-else-if="MessageType === 'warning'">⚠</template>
<template v-else></template>
</span>
<span class="toast-text">{{MessageText}}</span>
</div>
</transition>
<b>[{{講師編號}} {{講師姓名}}] 付款設定</b>
<button type="button" class="button blue80" v-on:click="Append" v-show="!(Appending || Editing)">新增</button>
<table style="table-layout:fixed">
<thead>
<tr>
<th style="width: 6rem">操作</th>
<th style="width: 8rem">生效日期</th>
<th style="width: auto">憑證類別</th>
<th style="width: auto">扣繳類別</th>
<th style="width: auto">銀行分行</th>
<th style="width: auto">戶名帳號</th>
<th style="width: auto">備註</th>
<th style="width: 8rem">建檔日期人員</th>
<th style="width: 8rem">更新日期人員</th>
</tr>
</thead>
<tbody>
<!-- 新增列 -->
<tr v-show="Appending">
<td>
<button type="button" class="button green40" v-on:click="Save">儲存</button>
<button type="button" class="button gray40" v-on:click="Cancel">取消</button>
</td>
<td>
<input type="date" v-model="EditingItem.生效日期" class="inputFull"/>
<div v-show="EditErrorMessages.生效日期" class="error-message">{{EditErrorMessages.生效日期}}</div>
</td>
<td>
<select v-model="EditingItem.憑證類別" class="inputFull">
<option v-for="voucher in 憑證類別Options" :key="voucher.Value" :value="voucher.Value">{{voucher.Name}}</option>
</select>
<div v-show="EditErrorMessages.憑證類別" class="error-message">{{EditErrorMessages.憑證類別}}</div>
</td>
<td>
<select v-model="EditingItem.扣繳類別" class="inputFull">
<option v-for="withholding in 扣繳類別Options" :key="withholding.Value" :value="withholding.Value">{{withholding.Name}}</option>
</select>
<div v-show="EditErrorMessages.扣繳類別" class="error-message">{{EditErrorMessages.扣繳類別}}</div>
</td>
<td style="position: relative;">
<input type="text"
v-model="EditingItem.銀行分行代碼"
v-on:input="FilterBankBranch"
v-on:focus="ShowBankBranchList"
v-on:blur="HideBankBranchList"
placeholder="輸入代碼或名稱搜尋"
autocomplete="off"
class="inputFull"/>
<div v-show="EditErrorMessages.銀行分行代碼" class="error-message">{{EditErrorMessages.銀行分行代碼}}</div>
<input type="text"
v-model="EditingItem.銀行分行"
placeholder="銀行分行名稱"
readonly
class="inputFull"/>
<div v-show="EditErrorMessages.銀行分行" class="error-message">{{EditErrorMessages.銀行分行}}</div>
<!-- 浮動選單 -->
<div class="bank-branch-dropdown" v-show="ShowBankDropdown && FilteredBankBranches.length > 0">
<div class="bank-branch-item"
v-for="(branch, bIdx) in FilteredBankBranches"
:key="bIdx"
v-on:mousedown="SelectBankBranch(branch)">
<span class="branch-code">{{branch.Value}}</span>
<span class="branch-name">{{branch.Name}}</span>
</div>
</div>
</td>
<td>
<input type="text" v-model="EditingItem.匯款戶名" placeholder="戶名" class="inputFull"/>
<div v-show="EditErrorMessages.匯款戶名" class="error-message">{{EditErrorMessages.匯款戶名}}</div>
<input type="text" v-model="EditingItem.匯款帳號" placeholder="帳號" class="inputFull"/>
<div v-show="EditErrorMessages.匯款帳號" class="error-message">{{EditErrorMessages.匯款帳號}}</div>
</td>
<td>
<textarea v-model="EditingItem.備註" rows="3" class="inputFullBlock" placeholder="更新資料內容、更新日期、更新人員姓名"></textarea>
<div v-show="EditErrorMessages.備註" class="error-message">{{EditErrorMessages.備註}}</div>
</td>
<td>(自動填入)</td>
<td>(自動填入)</td>
</tr>
<!-- 資料列 -->
<tr v-for="(dataItem, rowIndex) in Items" :key="rowIndex" v-show="!Appending">
<td>
<!-- 編輯模式 -->
<template v-if="Editing && EditingItem.Index === rowIndex">
<button type="button" class="button green40" v-on:click="Save">儲存</button>
<button type="button" class="button gray40" v-on:click="Cancel">取消</button>
</template>
<!-- 檢視模式 -->
<template v-else>
<button type="button" class="button blue40" v-on:click="Edit(dataItem, rowIndex)" v-show="!Editing">更正</button>
<button type="button" class="button red40" v-on:click="Delete(dataItem, rowIndex)" v-show="!Editing">刪除</button>
</template>
</td>
<!-- 編輯模式的輸入欄位 -->
<template v-if="Editing && EditingItem.Index === rowIndex">
<td>
<input type="date" v-model="EditingItem.生效日期" class="inputFull"/>
<div v-show="EditErrorMessages.生效日期" class="error-message">{{EditErrorMessages.生效日期}}</div>
</td>
<td>
<select v-model="EditingItem.憑證類別" class="inputFull">
<option v-for="voucher in 憑證類別Options" :key="voucher.Value" :value="voucher.Value">{{voucher.Name}}</option>
</select>
<div v-show="EditErrorMessages.憑證類別" class="error-message">{{EditErrorMessages.憑證類別}}</div>
</td>
<td>
<select v-model="EditingItem.扣繳類別" class="inputFull">
<option v-for="withholding in 扣繳類別Options" :key="withholding.Value" :value="withholding.Value">{{withholding.Name}}</option>
</select>
<div v-show="EditErrorMessages.扣繳類別" class="error-message">{{EditErrorMessages.扣繳類別}}</div>
</td>
<td style="position: relative;">
<input type="text"
v-model="EditingItem.銀行分行代碼"
v-on:input="FilterBankBranch"
v-on:focus="ShowBankBranchList"
v-on:blur="HideBankBranchList"
placeholder="輸入代碼或名稱搜尋"
autocomplete="off"
class="inputFull"/>
<div v-show="EditErrorMessages.銀行分行代碼" class="error-message">{{EditErrorMessages.銀行分行代碼}}</div>
<input type="text"
v-model="EditingItem.銀行分行"
placeholder="銀行分行名稱"
readonly
class="inputFull"/>
<div v-show="EditErrorMessages.銀行分行" class="error-message">{{EditErrorMessages.銀行分行}}</div>
<!-- 浮動選單 -->
<div class="bank-branch-dropdown" v-show="ShowBankDropdown && FilteredBankBranches.length > 0">
<div class="bank-branch-item"
v-for="(branch, bIdx) in FilteredBankBranches"
:key="bIdx"
v-on:mousedown="SelectBankBranch(branch)">
<span class="branch-code">{{branch.Value}}</span>
<span class="branch-name">{{branch.Name}}</span>
</div>
</div>
</td>
<td>
<input type="text" v-model="EditingItem.匯款戶名" placeholder="戶名" class="inputFull"/>
<div v-show="EditErrorMessages.匯款戶名" class="error-message">{{EditErrorMessages.匯款戶名}}</div>
<input type="text" v-model="EditingItem.匯款帳號" placeholder="帳號" class="inputFull"/>
<div v-show="EditErrorMessages.匯款帳號" class="error-message">{{EditErrorMessages.匯款帳號}}</div>
</td>
<td>
<textarea v-model="EditingItem.備註" rows="3" class="inputFullBlock" placeholder="更新資料內容"></textarea>
<div v-show="EditErrorMessages.備註" class="error-message">{{EditErrorMessages.備註}}</div>
</td>
<td>{{EditingItem.DB_CRDAT}}<br>{{EditingItem.DB_CRUSR_NAME}}</td>
<td>(自動填入)</td>
</template>
<!-- 檢視模式的顯示欄位 -->
<template v-else>
<td class="ta-center">{{dataItem.生效日期}}</td>
<td class="ta-center">{{GetOptionName(憑證類別Options, dataItem.憑證類別)}}</td>
<td>{{GetOptionName(扣繳類別Options, dataItem.扣繳類別)}}</td>
<td>{{dataItem.銀行分行代碼}} {{dataItem.銀行分行}}</td>
<td>{{dataItem.匯款戶名}} {{dataItem.匯款帳號}}</td>
<td>{{dataItem.備註}}</td>
<td>{{dataItem.DB_CRDAT}}<br>{{dataItem.DB_CRUSR_NAME}}</td>
<td>{{dataItem.DB_TRDAT > '0001-01-01' ? dataItem.DB_TRDAT : ''}}<br>{{dataItem.DB_TRUSR_NAME}}</td>
</template>
</tr>
<!-- 無資料提示 -->
<tr v-show="Items.length === 0 && !Appending">
<td colspan="9" style="text-align: center; padding: 2rem; color: #999;">
尚無付款設定資料
</td>
</tr>
</tbody>
</table>
</div>
<style>
#APP table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
#APP th,
#APP td {
border: 1px solid #ddd;
padding: 8px;
vertical-align: middle;
}
#APP th {
background-color: #f5f5f5;
font-weight: bold;
text-align: center;
}
#APP input[type="text"],
#APP input[type="date"],
#APP select,
#APP textarea {
padding: 4px 8px;
border: 1px solid #ddd;
border-radius: 2px;
}
#APP button {
margin: 2px;
}
.error-message {
color: #d32f2f;
font-size: 10px;
margin-top: 4px;
min-height: 16px;
}
.bank-branch-dropdown {
position: absolute;
top: 100%;
left: 0;
background: white;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
max-height: 300px;
overflow-y: auto;
z-index: 1000;
min-width: 400px;
margin-top: 2px;
}
.bank-branch-item {
padding: 8px 12px;
cursor: pointer;
border-bottom: 1px solid #f0f0f0;
display: flex;
justify-content: flex-start;
align-items: center;
}
.bank-branch-item:hover {
background-color: #e6f7ff;
}
.branch-code {
font-weight: bold;
color: #1890ff;
margin-right: 12px;
min-width: 80px;
}
.branch-name {
color: #333;
flex: 1;
}
.bank-branch-item:last-child {
border-bottom: none;
}
</style>
@@ -0,0 +1,89 @@
using Newtonsoft.Json;
using System;
using System.Web.UI;
namespace Education
{
public partial class : UserControlBase
{
private DAC_付款設定 dao付款設定;
public string
{
get
{
if (ViewState["人員類別"] == null)
return null;
return ViewState["人員類別"].ToString();
}
set
{
ViewState["人員類別"] = value;
}
}
public string
{
get
{
if (ViewState["講師編號"] == null)
return null;
return ViewState["講師編號"].ToString();
}
set
{
ViewState["講師編號"] = value;
}
}
public string
{
get
{
if (ViewState["講師姓名"] == null)
return null;
return ViewState["講師姓名"].ToString();
}
set
{
ViewState["講師姓名"] = value;
}
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
dao付款設定 = new DAC_付款設定(ParentPage.conn);
if (string.IsNullOrEmpty())
{
= "講師";
}
}
protected void Page_Load(object sender, EventArgs e)
{
#if DEBUG
Page.ClientScript.RegisterClientScriptInclude("Vue", ResolveClientUrl($"~/Scripts/vue.js?v={PublicVariable.SystemVersion}"));
#else
Page.ClientScript.RegisterClientScriptInclude("Vue", ResolveClientUrl($"~/Scripts/vue.min.js?v={PublicVariable.SystemVersion}"));
#endif
Page.ClientScript.RegisterClientScriptInclude("Axios", ResolveClientUrl($"~/Scripts/axios.min.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("DateMixin", ResolveClientUrl($"~/Scripts/vue-date-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("ToastMixin", ResolveClientUrl($"~/Scripts/vue-toast-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("ApiMixin", ResolveClientUrl($"~/Scripts/api-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("付款設定", ResolveClientUrl($"~/Scripts/付款設定.js?v={PublicVariable.SystemVersion}"));
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "CreatePaymentSettingApp", "CreatePaymentSettingApp();", true);
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "憑證類別",
$@"V憑證類別 = {JsonConvert.SerializeObject(憑證類別.InputSelectList)};", true);
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "扣繳類別",
$@"V扣繳類別 = {JsonConvert.SerializeObject(扣繳類別.InputSelectList)};", true);
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "銀行分行",
$@"V銀行分行 = {JsonConvert.SerializeObject(new BRML(ParentPage.conn).BankBranchList())};", true);
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "初始資料",
$@"V人員類別 = '{人員類別}';
V講師編號 = '{講師編號}';
V講師姓名 = '{講師姓名}';", true);
}
}
}
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education
{
public partial class
{
}
}
@@ -0,0 +1,225 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="火車票價匯出匯入.ascx.cs" Inherits="Education.Forms.領據系統.火車票價匯出匯入" %>
<div id="TrainFareImportExportAPP" style="padding: 1rem 0">
<!-- 訊息浮動提示 -->
<transition name="toast">
<div v-show="ShowMessage" :class="['toast-message', 'toast-' + MessageType]">
<span class="toast-icon">
<template v-if="MessageType === 'success'">✓</template>
<template v-else-if="MessageType === 'error'">✕</template>
<template v-else-if="MessageType === 'warning'">⚠</template>
<template v-else></template>
</span>
<span class="toast-text">{{MessageText}}</span>
</div>
</transition>
<!-- Tab 切換 -->
<div style="margin-bottom: 1rem; border-bottom: 1px solid #ddd;">
<button type="button"
@click="activeTab = 'export'"
:class="['tab-button', {active: activeTab === 'export'}]">
匯出
</button>
<button type="button"
@click="activeTab = 'import'"
:class="['tab-button', {active: activeTab === 'import'}]">
匯入
</button>
</div>
<!-- 匯出頁籤 -->
<div v-if="activeTab === 'export'" style="margin-top: 1rem;">
<div style="margin-bottom: 1rem;">
<label>選擇要匯出的版本:</label>
<select v-model="exportVersionId" class="inputFull" style="margin-top: 0.5rem;">
<option value="">請選擇版本...</option>
<option v-for="version in versions" :key="version.Value" :value="version.Value">
{{version.Name}}
</option>
</select>
</div>
<div style="margin-bottom: 1rem;">
<button type="button" class="button blue120" @click="DownloadTemplate" style="margin-right: 1rem;">
下載匯入範本
</button>
<button type="button" class="button green120" @click="ExportData" v-if="exportVersionId">
匯出為 Excel
</button>
</div>
<!-- 預覽表格 -->
<div v-if="exportVersionId && exportResponse && Object.keys(exportData).length > 0" style="margin-top: 1rem;">
<h4>預覽資料:</h4>
<table style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 80px;">訖站\起站</th>
<th v-for="originStation in exportOriginStations" :key="originStation" style="width: 60px;">
{{originStation}}
</th>
</tr>
</thead>
<tbody>
<tr v-for="destStation in exportDestStations" :key="destStation">
<th style="text-align: center; background-color: #f5f5f5;">{{destStation}}</th>
<td v-for="originStation in exportOriginStations" :key="originStation"
:style="originStation === destStation ? {backgroundColor: '#f0f0f0'} : {}"
style="text-align: right; padding: 8px;">
<template v-if="originStation === destStation">
-
</template>
<template v-else>
{{GetExportFare(originStation, destStation)}}
</template>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 匯入頁籤 -->
<div v-if="activeTab === 'import'" style="margin-top: 1rem;">
<div style="margin-bottom: 1rem;">
<p style="color: #666; margin-bottom: 1rem;">
<strong>說明:</strong>每次匯入都將建立為新版本,版本號自動遞增。
</p>
</div>
<div style="margin-bottom: 1rem;">
<label>選擇 Excel 檔案:</label>
<input type="file" @change="OnFileSelected" accept=".xlsx,.xls" style="margin-top: 0.5rem;" />
<div style="color: #999; font-size: 12px; margin-top: 0.5rem;">
支援 .xlsx 和 .xls 格式
</div>
</div>
<button type="button" class="button blue80" @click="ImportData"
:disabled="isImportButtonDisabled"
:style="isImportButtonDisabled ? {opacity: 0.5, cursor: 'not-allowed'} : {}"
v-if="selectedFile" style="margin-right: 1rem;">
匯入
</button>
<button type="button" class="button gray40" @click="CancelImport" v-if="selectedFile">
取消
</button>
<!-- 檢查結果 -->
<div v-if="checkResult" style="margin-top: 1rem; padding: 1rem; border: 1px solid #ddd; border-radius: 4px;">
<div v-if="checkResult.success" style="color: #4caf50; background-color: #f1f8e9; padding: 1rem; border-radius: 4px;">
<strong>檢查成功</strong><br/>
請點擊「匯入」按鈕執行匯入。
</div>
<div v-else style="color: #f44336; background-color: #ffebee; padding: 1rem; border-radius: 4px;">
<strong>檢查失敗</strong><br/>
<div v-for="(error, idx) in checkResult.errors" :key="idx">
{{error}}
</div>
</div>
</div>
<!-- 預覽表格 -->
<div v-if="checkResult && checkResult.success && Object.keys(importPreviewData).length > 0" style="margin-top: 1rem;">
<h4>預覽資料:</h4>
<table style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 80px;">訖站\起站</th>
<th v-for="originStation in importOriginStations" :key="originStation" style="width: 60px;">
{{originStation}}
</th>
</tr>
</thead>
<tbody>
<tr v-for="destStation in importDestStations" :key="destStation">
<th style="text-align: center; background-color: #f5f5f5;">{{destStation}}</th>
<td v-for="originStation in importOriginStations" :key="originStation"
:style="originStation === destStation ? {backgroundColor: '#f0f0f0'} : {}"
style="text-align: right; padding: 8px;">
<template v-if="originStation === destStation">
-
</template>
<template v-else>
{{GetImportFare(originStation, destStation)}}
</template>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<style>
#TrainFareImportExportAPP table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
#TrainFareImportExportAPP th,
#TrainFareImportExportAPP td {
border: 1px solid #ddd;
padding: 8px;
vertical-align: middle;
}
#TrainFareImportExportAPP th {
background-color: #f5f5f5;
font-weight: bold;
text-align: center;
}
.tab-button {
padding: 10px 20px;
border: none;
background-color: transparent;
cursor: pointer;
border-bottom: 3px solid transparent;
margin-right: 10px;
font-size: 14px;
}
.tab-button.active {
border-bottom-color: #1890ff;
color: #1890ff;
font-weight: bold;
}
.tab-button:hover {
background-color: #f5f5f5;
}
.inputFull {
width: 100%;
padding: 4px 8px;
border: 1px solid #ddd;
border-radius: 2px;
}
#TrainFareImportExportAPP button {
margin: 2px;
}
/* 訊息浮動提示圖示與文字樣式 */
.toast-message {
display: flex;
align-items: center;
min-width: 300px;
font-size: 14px;
}
.toast-icon {
font-size: 20px;
font-weight: bold;
margin-right: 12px;
flex-shrink: 0;
}
.toast-text {
flex: 1;
word-break: break-word;
}
</style>
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,121 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="火車票價查詢修改.ascx.cs" Inherits="Education.Forms.領據系統.火車票價查詢修改" %>
<div id="TrainFareAPP" style="padding: 1rem 0">
<!-- Loading 指示器 -->
<div v-if="loading" class="loading-overlay">
<div class="loading-spinner">
<div class="spinner"></div>
<p>處理中...</p>
</div>
</div>
<!-- 訊息浮動提示 -->
<transition name="toast">
<div v-show="ShowMessage" :class="['toast-message', 'toast-' + MessageType]">
<span class="toast-icon">
<template v-if="MessageType === 'success'">✓</template>
<template v-else-if="MessageType === 'error'">✕</template>
<template v-else-if="MessageType === 'warning'">⚠</template>
<template v-else></template>
</span>
<span class="toast-text">{{MessageText}}</span>
</div>
</transition>
<!-- 查詢區塊 -->
<div style="margin-bottom: 2rem;">
<label>版本號/生效日期:</label>
<select v-model="selectedVersionId" @change="LoadFareTable" class="inputFull">
<option value="">請選擇版本...</option>
<option v-for="version in versions" :key="version.Value" :value="version.Value">
{{version.Name}}
</option>
</select>
<button type="button" class="button red120" @click="DeleteVersion" v-if="selectedVersionId" style="margin-top: 0.5rem;">
刪除此版本
</button>
</div>
<!-- 票價編輯表格 -->
<div v-if="selectedVersionId" style="margin-top: 1rem;">
<button type="button" class="button blue80" @click="EnterEditMode" v-if="!isEditMode">進入修改</button>
<button type="button" class="button green80" @click="SaveChanges" v-if="isEditMode">儲存</button>
<button type="button" class="button gray80" @click="CancelEdit" v-if="isEditMode">取消</button>
<table style="table-layout: fixed; margin-top: 1rem;">
<thead>
<tr>
<th style="width: 80px;">訖站\起站</th>
<th v-for="originStation in originStations" :key="originStation" style="width: 60px;">
{{originStation}}
</th>
</tr>
</thead>
<tbody>
<tr v-for="destStation in destStations" :key="destStation">
<th style="text-align: center; background-color: #f5f5f5;">{{destStation}}</th>
<td v-for="originStation in originStations" :key="originStation"
:style="originStation === destStation ? {backgroundColor: '#f0f0f0'} : {}"
style="text-align: right; padding: 8px;">
<template v-if="originStation === destStation">
-
</template>
<template v-else-if="!isEditMode">
{{GetFare(originStation, destStation)}}
</template>
<template v-else>
<input type="number"
:value="GetFareInput(originStation, destStation)"
@input="SetFareInput(originStation, destStation, $event.target.value)"
class="inputFull"
style="width: 100%; text-align: right;"/>
</template>
</td>
</tr>
</tbody>
</table>
</div>
<div v-else style="text-align: center; padding: 2rem; color: #999;">
請選擇要查看的版本
</div>
</div>
<style>
#TrainFareAPP table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
#TrainFareAPP th,
#TrainFareAPP td {
border: 1px solid #ddd;
padding: 8px;
vertical-align: middle;
}
#TrainFareAPP th {
background-color: #f5f5f5;
font-weight: bold;
text-align: center;
}
#TrainFareAPP input[type="number"] {
padding: 4px 8px;
border: 1px solid #ddd;
border-radius: 2px;
}
#TrainFareAPP button {
margin: 2px;
}
.inputFull {
width: 100%;
padding: 4px 8px;
border: 1px solid #ddd;
border-radius: 2px;
}
</style>
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,29 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="火車票價維護.aspx.cs" Inherits="Education.Forms.領據系統.火車票價維護" %>
<%@ Register Src="~/Forms/領據系統/火車票價查詢修改.ascx" TagPrefix="uc1" TagName="火車票價查詢修改" %>
<%@ Register Src="~/Forms/領據系統/火車票價匯出匯入.ascx" TagPrefix="uc1" TagName="火車票價匯出匯入" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:LinkButton ID="btnTab1" runat="server"
CssClass="tabButtonSelected">查詢</asp:LinkButton>
<asp:LinkButton ID="btnTab2" runat="server"
CssClass="tabButton">匯出/匯入</asp:LinkButton>
<div style="border-top: solid 1px gray;">
<asp:MultiView ID="MultiView1" runat="server"
ActiveViewIndex="0">
<asp:View ID="View查詢" runat="server">
<uc1:火車票價查詢修改 runat="server" id="火車票價查詢修改" />
</asp:View>
<asp:View ID="View匯出匯入" runat="server">
<uc1:火車票價匯出匯入 runat="server" id="火車票價匯出匯入" />
</asp:View>
</asp:MultiView>
</div>
</asp:Content>
@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "火車票價維護";
HelpUrl = "~/Help/領據/火車票價維護.html";
AddTabButton(MultiView1, 0, btnTab1);
AddTabButton(MultiView1, 1, btnTab2);
#if DEBUG
Page.ClientScript.RegisterClientScriptInclude("Vue", ResolveClientUrl($"~/Scripts/vue.js?v={PublicVariable.SystemVersion}"));
#else
Page.ClientScript.RegisterClientScriptInclude("Vue", ResolveClientUrl($"~/Scripts/vue.min.js?v={PublicVariable.SystemVersion}"));
#endif
Page.ClientScript.RegisterClientScriptInclude("Axios", ResolveClientUrl($"~/Scripts/axios.min.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("DateMixin", ResolveClientUrl($"~/Scripts/vue-date-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("ToastMixin", ResolveClientUrl($"~/Scripts/vue-toast-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("ApiMixin", ResolveClientUrl($"~/Scripts/api-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("Base64Mixin", ResolveClientUrl($"~/Scripts/base64-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("火車票價維護", ResolveClientUrl($"~/Scripts/火車票價維護.js?v={PublicVariable.SystemVersion}"));
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "CreateTrainFareApp", "CreateTrainFareApp();", true);
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "CreateTrainFareImportExportApp", "CreateTrainFareImportExportApp();", true);
}
protected override void LoadViewState(object savedViewState)
{
base.LoadViewState(savedViewState);
Page.ClientScript.RegisterForEventValidation(btnTab1.UniqueID);
Page.ClientScript.RegisterForEventValidation(btnTab2.UniqueID);
}
}
}
@@ -0,0 +1,80 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// btnTab1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab1;
/// <summary>
/// btnTab2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab2;
/// <summary>
/// MultiView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView MultiView1;
/// <summary>
/// View查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View查詢;
/// <summary>
/// 火車票價查詢修改 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::Education.Forms.. ;
/// <summary>
/// View匯出匯入 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View匯出匯入;
/// <summary>
/// 火車票價匯出匯入 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::Education.Forms.. ;
}
}
@@ -0,0 +1,950 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="財稅作業與領據關帳.aspx.cs" Inherits="Education.Forms.領據系統.財稅作業與領據關帳" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link rel="stylesheet" href="<%= ResolveClientUrl("~/Styles/領據資料處理.css") %>" />
<style>
.tab-container {
display: flex;
border-bottom: 2px solid #ddd;
margin-bottom: 15px;
}
.tab-button {
flex: 1;
padding: 10px 16px;
background: #f8f9fa;
border: none;
cursor: pointer;
font-size: 14px;
border-bottom: 3px solid transparent;
transition: all 0.3s;
}
.tab-button:hover {
background: #e9ecef;
}
.tab-button.active {
background: #fff;
border-bottom-color: #007bff;
color: #007bff;
font-weight: bold;
}
.tab-content {
padding: 15px 0;
}
.tab-pane {
animation: fadeIn 0.3s;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.form-section {
background: #f8f9fa;
padding: 15px;
border-radius: 4px;
margin-bottom: 15px;
}
.form-label {
font-weight: 500;
margin-bottom: 4px;
}
.form-group {
margin-bottom: 0;
}
/* .form-control, .form-control:focus {
border: 1px solid #ced4da;
padding: 6px 12px;
border-radius: 4px;
font-size: 14px;
}
.form-control:focus {
border-color: #80bdff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
*/
.alert {
padding: 10px 12px;
border-radius: 4px;
margin-bottom: 12px;
border-left: 4px solid;
}
.alert-warning {
background: #fff3cd;
border-left-color: #ffc107;
color: #856404;
}
.alert-info {
background: #d1ecf1;
border-left-color: #17a2b8;
color: #0c5460;
}
.alert-success {
background: #d4edda;
border-left-color: #28a745;
color: #155724;
}
.alert-danger {
background: #f8d7da;
border-left-color: #dc3545;
color: #721c24;
}
.text-danger {
color: #dc3545;
}
.table {
width: 100%;
}
.table thead th {
vertical-align: bottom;
border-bottom: 2px solid #dee2e6;
background: #f8f9fa;
font-weight: 600;
padding: 8px;
border: 1px solid #dee2e6;
/*font-size: 12px;*/
}
.table tbody td {
padding: 8px;
border: 1px solid #dee2e6;
vertical-align: middle;
/*font-size: 12px;*/
}
.table tbody tr:nth-child(even) {
background: #f8f9fa;
}
.table tbody tr:hover {
background: #e9ecef;
}
.table-striped tbody tr:nth-child(odd) {
background: #fff;
}
.table-bordered {
border: 1px solid #dee2e6;
}
.table-bordered thead th,
.table-bordered tbody td {
border: 1px solid #dee2e6;
}
/* .table-sm th,
.table-sm td {
padding: 5px;
font-size: 11px;
}
*/
.table-light {
background: #f8f9fa;
}
.table-responsive {
display: block;
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.card {
border: 1px solid #dee2e6;
border-radius: 4px;
margin-bottom: 15px;
background: white;
}
.card-body {
padding: 15px;
}
h5 {
font-size: 16px;
font-weight: 600;
margin-bottom: 0 !important;
margin-top: 0 !important;
}
.blue80 {
background: #007bff;
color: white;
border-color: #007bff;
}
.blue80:hover:not(:disabled) {
background: #0056b3;
border-color: #004085;
}
.row {
display: flex;
flex-wrap: wrap;
margin-right: -6px;
margin-left: -6px;
gap: 8px;
}
.col-md-3,
.col-md-6,
.col-md-12 {
flex: 0 0 calc(25% - 12px);
margin: 0;
}
.col-md-6 {
flex: 0 0 calc(50% - 12px);
}
.col-md-12 {
flex: 0 0 calc(100% - 12px);
}
.col-md-4 {
flex: 0 0 calc(33.333% - 12px);
margin: 0;
}
.col-md-2 {
flex: 0 0 calc(16.666% - 12px);
margin: 0;
}
.mb-2 {
margin-bottom: 8px;
}
.mb-3 {
margin-bottom: 12px;
}
.mb-4 {
margin-bottom: 15px;
}
.mt-3 {
margin-top: 12px;
}
.mt-4 {
margin-top: 15px;
}
.ml-2 {
margin-left: 8px;
}
.button {
padding: 0 5px;
/* border: none;
border-radius: 4px;*/
cursor: pointer;
font-weight: 500;
transition: all 0.3s;
}
.button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.green80 {
background: #28a745;
color: white;
border-color: #28a745;
}
.green80:hover:not(:disabled) {
background: #218838;
border-color: #1e7e34;
}
.blue80 {
background: #007bff;
color: white;
border-color: #007bff;
}
.blue80:hover:not(:disabled) {
background: #0056b3;
border-color: #004085;
}
/* 郵件預覽小窗樣式 */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
visibility: visible;
opacity: 1;
}
.modal-overlay[style*="display: none"],
[v-cloak] .modal-overlay {
display: none !important;
visibility: hidden;
opacity: 0;
}
.modal-dialog {
background: white;
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
width: 90%;
max-width: 1200px;
max-height: 90vh;
display: flex;
flex-direction: column;
}
.modal-header {
padding: 15px;
border-bottom: 2px solid #dee2e6;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h5 {
margin: 0;
color: #333;
}
.modal-close-btn {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #999;
padding: 0;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
}
.modal-close-btn:hover {
color: #333;
}
.modal-body {
flex: 1;
overflow-y: auto;
padding: 15px;
}
.email-preview-item {
border: 1px solid #dee2e6;
border-radius: 4px;
margin-bottom: 15px;
background: #f8f9fa;
}
.email-preview-header {
padding: 12px 15px;
background: #007bff;
color: white;
border-radius: 4px 4px 0 0;
font-weight: 500;
}
.email-preview-info {
padding: 12px 15px;
border-bottom: 1px solid #dee2e6;
background: white;
}
.email-preview-info-row {
display: flex;
margin-bottom: 8px;
align-items: flex-start;
}
.email-preview-info-row:last-child {
margin-bottom: 0;
}
.email-preview-label {
font-weight: 500;
min-width: 80px;
color: #333;
}
.email-preview-content {
flex: 1;
color: #666;
word-break: break-word;
}
.email-preview-body {
padding: 12px 15px;
background: white;
border-bottom: 1px solid #dee2e6;
color: #333;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-word;
}
.email-preview-table {
padding: 12px 15px;
background: white;
}
.attachment-table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.attachment-table thead th {
background: #f0f0f0;
padding: 8px;
border: 1px solid #dee2e6;
text-align: left;
font-weight: 600;
color: #333;
}
.attachment-table tbody td {
padding: 8px;
border: 1px solid #dee2e6;
color: #333;
}
.attachment-table tbody tr:nth-child(even) {
background: #f8f9fa;
}
.attachment-table tbody tr:hover {
background: #f0f0f0;
}
.attachment-table .summary-row {
background: #e9ecef;
font-weight: 600;
}
.attachment-table .summary-row td {
border-top: 2px solid #dee2e6;
}
.modal-footer {
padding: 12px 15px;
border-top: 1px solid #dee2e6;
background: #f8f9fa;
display: flex;
justify-content: flex-end;
gap: 8px;
}
.btn-close {
background: #6c757d;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
}
.btn-close:hover {
background: #5a6268;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="taxReceiptApp">
<!-- Tab 區塊 -->
<div class="tab-container">
<button type="button" class="tab-button" :class="{ active: activeTab === 0 }" v-on:click="activeTab = 0">個人費用彙整表</button>
<button type="button" class="tab-button" :class="{ active: activeTab === 1 }" v-on:click="activeTab = 1">扣繳明細及寄發通知</button>
<button type="button" class="tab-button" :class="{ active: activeTab === 2 }" v-on:click="activeTab = 2">領據關帳</button>
</div>
<!-- Tab 內容 -->
<div class="tab-content">
<!-- Tab 0: 個人費用彙整表 -->
<div v-if="activeTab === 0" class="tab-pane">
<div class="card">
<div class="card-body">
<!-- 查詢表單 -->
<div class="form-section mb-4">
<h5 class="mb-3">查詢條件</h5>
<div class="alert alert-info mb-3" style="margin-bottom: 12px !important;">
&#9432; 僅列出已完成列印的領據及差旅費資料
</div>
<div class="row mb-2">
<div class="col-md-2">
<div class="form-group">
<label class="form-label">起日:</label>
<input type="date" class="form-control" v-model="summaryTable.startDate">
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="form-label">迄日:</label>
<input type="date" class="form-control" v-model="summaryTable.endDate">
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="form-label">身分別:</label>
<select class="form-control" v-model="summaryTable.identity">
<option value="">-- 全部 --</option>
<option v-for="item in summaryTable.identityOptions" :key="item.Value" :value="item.Value">
{{ item.Name }}
</option>
</select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="form-label">付款方式:</label>
<select class="form-control" v-model="summaryTable.paymentMethod">
<option value="">-- 全部 --</option>
<option v-for="item in summaryTable.paymentMethodOptions" :key="item.Value" :value="item.Value">
{{ item.Name }}
</option>
</select>
</div>
</div>
<!-- 操作按鈕 -->
<div class="col-md-4">
<button type="button" class="button green80" v-on:click="searchSummaryTable" :disabled="summaryTable.loading">
<span v-if="summaryTable.loading">查詢中...</span>
<span v-else>查詢</span>
</button>
<button type="button" class="button blue80 ml-2" v-on:click="exportSummaryTable" :disabled="summaryTable.loading || summaryTable.dataList.length === 0">
<span v-if="summaryTable.loading">處理中...</span>
<span v-else>匯出</span>
</button>
</div>
</div>
</div>
<!-- 查詢結果訊息 -->
<div v-if="summaryTable.message" :class="['alert', 'alert-' + summaryTable.messageType, 'mt-3']" role="alert">
{{ summaryTable.message }}
</div>
<!-- 查詢結果表格 -->
<div v-if="summaryTable.dataList.length > 0" class="mt-3">
<h5 class="mb-2">查詢結果 (共 {{ summaryTable.dataList.length }} 筆)</h5>
<div class="table-responsive">
<table class="table table-striped table-bordered table-sm">
<thead class="table-light">
<tr>
<th>領款人姓名</th>
<th>身分證字號</th>
<th>堂數</th>
<th>扣繳類別</th>
<th>帳戶名</th>
<th>付款金額</th>
<th>匯款帳號</th>
<th>銀行分行代碼</th>
<th>銀行分行</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in summaryTable.dataList" :key="index">
<td>{{ item.領款人姓名 }}</td>
<td>{{ item.身分證字號 }}</td>
<td class="ta-right">{{ item.堂數 }}</td>
<td>{{ item.扣繳類別名稱 }}</td>
<td>{{ item.帳戶名 }}</td>
<td class="ta-right">{{ formatCurrency(item.付款金額) }}</td>
<td>{{ item.匯款帳號 }}</td>
<td>{{ item.銀行分行代碼 }}</td>
<td>{{ item.銀行分行 }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Tab 1: 扣繳明細及寄發通知 -->
<div v-if="activeTab === 1" class="tab-pane">
<div class="card">
<div class="card-body">
<!-- 查詢條件區塊 -->
<div class="form-section">
<h5 class="mb-3">查詢條件</h5>
<div class="alert alert-info mb-3" style="margin-bottom: 12px !important;">
&#9432; 僅列出已完成列印的領據資料
</div>
<div class="row mb-2">
<div class="col-md-2">
<div class="form-group">
<label class="form-label">起日:</label>
<input type="date" class="form-control" v-model="detailTable.startDate">
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="form-label">迄日:</label>
<input type="date" class="form-control" v-model="detailTable.endDate">
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="form-label">身分別:</label>
<select class="form-control" v-model="detailTable.identity">
<option value="">-- 全部 --</option>
<option v-for="item in detailTable.identityOptions" :key="item.Value" :value="item.Value">
{{ item.Name }}
</option>
</select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="form-label">憑證類別:</label>
<select class="form-control" v-model="detailTable.certificateType">
<option value="">-- 全部 --</option>
<option v-for="item in detailTable.certificateTypeOptions" :key="item.Value" :value="item.Value">
{{ item.Name }}
</option>
</select>
</div>
</div>
<div class="col-md-4">
<button type="button" class="button green80" v-on:click="searchDetailTable" :disabled="detailTable.loading">
<span v-if="detailTable.loading">查詢中...</span>
<span v-else>查詢</span>
</button>
<button type="button" class="button blue80 ml-2" style="width:auto" v-on:click="exportDetailTable('SUMMARY')" :disabled="detailTable.loading || detailTable.dataList.length === 0">
<span v-if="detailTable.loading">處理中...</span>
<span v-else>匯出扣繳彙整表</span>
</button>
<button type="button" class="button blue80 ml-2" style="width:auto" v-on:click="exportDetailTable('DETAIL')" :disabled="detailTable.loading || detailTable.dataList.length === 0">
<span v-if="detailTable.loading">處理中...</span>
<span v-else>匯出扣繳明細表</span>
</button>
</div>
</div>
</div>
<!-- 查詢結果訊息 -->
<div v-if="detailTable.message" :class="['alert', 'alert-' + detailTable.messageType, 'mt-3']" role="alert">
{{ detailTable.message }}
</div>
<!-- 查詢結果表格 -->
<div v-if="detailTable.dataList.length > 0" class="mt-3">
<h5 class="mb-2">查詢結果 (共 {{ detailTable.dataList.length }} 筆)</h5>
<div class="table-responsive">
<table class="table table-striped table-bordered table-sm">
<thead class="table-light">
<tr>
<th style="width: 40px;"><input type="checkbox" v-model="detailTable.selectAll" v-on:change="toggleSelectAll"></th>
<th style="width: 40px;"></th>
<th>已發送</th>
<th>領款人姓名</th>
<th>身分證字號</th>
<th>戶籍地址</th>
<th>扣繳類別</th>
<th class="ta-right">合計金額</th>
<th class="ta-right">應扣繳稅額</th>
<th class="ta-right">服務費</th>
</tr>
</thead>
<tbody>
<template v-for="(item, index) in detailTable.dataList">
<tr :key="'row-' + index">
<td class="ta-center"><input type="checkbox" v-model="item.selected"></td>
<td class="ta-center" style="cursor: pointer;" v-on:click="item.showDetail = !item.showDetail">
{{ item.showDetail ? '▼' : '▶' }}
</td>
<td class="ta-center">{{
!item.明細 || item.明細.length === 0 ? '未發送' :
item.明細.filter(function(d){ return d.郵件已發送 === '1'; }).length === item.明細.length ? '已全部發送' :
item.明細.filter(function(d){ return d.郵件已發送 === '1'; }).length === 0 ? '未發送' :
'已部分發送'
}}</td>
<td class="ta-center">{{ item.領款人姓名 }}</td>
<td class="ta-center">{{ item.身分證字號 }}</td>
<td>{{ item.戶籍地址 }}</td>
<td class="ta-center">{{ item.扣繳類別名稱 }}</td>
<td class="ta-right">{{ formatCurrency(item.講師勞務費合計) }}</td>
<td class="ta-right">{{ formatCurrency(item.應扣繳稅額合計) }}</td>
<td class="ta-right">{{ formatCurrency(item.服務費合計) }}</td>
</tr>
<tr v-show="item.showDetail" class="table-light" :key="'detail-' + index">
<td colspan="10" style="padding: 10px;">
<div class="table-responsive">
<table class="table table-sm" style="margin-bottom: 0;">
<thead>
<tr>
<th>序</th>
<th>已發送</th>
<th>計畫代號</th>
<th>活動日期</th>
<th>活動名稱/事由</th>
<th>扣繳類別</th>
<th class="ta-right">講師/勞務費</th>
<th class="ta-right">應扣繳稅額</th>
<th class="ta-right">服務費</th>
</tr>
</thead>
<tbody>
<tr v-for="(detail, detailIndex) in (item.明細 || [])" :key="'detail-' + index + '-' + detailIndex">
<td class="ta-center">{{ detailIndex + 1 }}</td>
<td class="ta-center">{{ detail.郵件已發送 === '1' ? '是' : '否' }}</td>
<td class="ta-center">{{ detail.計畫代號 }}</td>
<td class="ta-center">{{ detail.活動日期 }}</td>
<td>{{ detail.活動名稱事由 }}</td>
<td class="ta-center">{{ item.扣繳類別名稱 }}</td>
<td class="ta-right">{{ formatCurrency(detail.講師勞務費) }}</td>
<td class="ta-right">{{ formatCurrency(detail.應扣繳稅額) }}</td>
<td class="ta-right">{{ formatCurrency(detail.服務費) }}</td>
</tr>
<tr v-if="!item.明細 || item.明細.length === 0">
<td colspan="8" style="text-align: center; color: #999;">沒有明細資料</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</template>
</tbody>
</table>
</div>
</div>
<!-- 郵件設定區塊 -->
<div v-if="detailTable.dataList.length > 0" class="form-section mt-4">
<h5 class="mb-3">寄件人與郵件內容</h5>
<div class="row mb-2">
<div class="col-md-12">
<div class="form-group">
<label class="form-label">寄件人郵箱:</label>
<input type="email" class="form-control" v-model="detailTable.senderEmail" placeholder="example@example.com" style="width: calc(100% - 8rem);">
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-md-12">
<div class="form-group">
<label class="form-label">郵件主旨:</label>
<input type="text" class="form-control" v-model="detailTable.emailSubject" placeholder="輸入郵件主旨" style="width: calc(100% - 8rem);">
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-md-12">
<div class="form-group">
<label class="form-label">郵件內文:</label>
<textarea class="form-control" v-model="detailTable.emailBody" rows="5" placeholder="輸入郵件內文" style="width: calc(100% - 8rem);"></textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<button type="button" class="button blue80" v-on:click="previewEmail" :disabled="!canSendEmail">預覽</button>
<button type="button" class="button green80 ml-2" v-on:click="sendEmail" :disabled="!canSendEmail">發送</button>
</div>
</div>
</div>
<!-- 郵件預覽/結果訊息 -->
<div v-if="detailTable.emailMessage" :class="['alert', 'alert-' + detailTable.emailMessageType, 'mt-3']" role="alert">
{{ detailTable.emailMessage }}
</div>
</div>
</div>
</div>
<!-- Tab 2: 領據關帳 -->
<div v-if="activeTab === 2" class="tab-pane">
<div class="card">
<div class="card-body">
<!-- 提示訊息 -->
<div class="alert alert-warning">
<strong>重要提醒:</strong><br />
費用出帳後,財務即將領據關帳。<br />
領據關帳後,只能作廢不能修改,唯總管理處財務部可修改。
</div>
<!-- 表單區域 -->
<div class="form-section">
<div class="row mb-2">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">領據現行年度:</label>
<input type="text" class="form-control" v-model="currentYear" readonly>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">領據已關帳年月:</label>
<input type="text" class="form-control" v-model="currentClosingMonth" readonly>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-md-6">
<div class="form-group">
<label class="form-label">調整關帳年月為:<span class="text-danger">*</span></label>
<input type="month" class="form-control" v-model="newClosingMonth" v-on:change="validateMonth">
</div>
</div>
</div>
<!-- 操作按鈕 -->
<div class="row mt-3">
<div class="col-md-6">
<button type="button" class="button green80" v-on:click="saveClosingMonth" :disabled="loading || !newClosingMonth">
<span v-if="loading">處理中...</span>
<span v-else>確定</span>
</button>
</div>
</div>
</div>
<!-- 訊息提示 -->
<div v-if="message" :class="['alert', 'alert-' + messageType, 'mt-3']" role="alert">
{{ message }}
</div>
</div>
</div>
</div>
</div>
<!-- 郵件預覽小窗 -->
<div v-if="detailTable.showEmailPreview" class="modal-overlay" v-on:click.self="closeEmailPreview">
<div class="modal-dialog">
<!-- Modal Header -->
<div class="modal-header">
<h5>郵件預覽 (共 {{ detailTable.previewData.length }} 封)</h5>
<button type="button" class="modal-close-btn" v-on:click="closeEmailPreview">&times;</button>
</div>
<!-- Modal Body -->
<div class="modal-body">
<div v-if="detailTable.previewData.length === 0" style="text-align: center; padding: 30px; color: #999;">
沒有郵件數據
</div>
<template v-for="(email, index) in detailTable.previewData">
<div class="email-preview-item" :key="index">
<!-- 郵件頭部 -->
<div class="email-preview-header">
郵件 {{ index + 1 }} / {{ detailTable.previewData.length }}
</div>
<!-- 郵件資訊 -->
<div class="email-preview-info">
<div class="email-preview-info-row">
<div class="email-preview-label">收件人:</div>
<div class="email-preview-content">{{ email.收件人姓名 }} &lt;{{ email.收件人郵箱 }}&gt;</div>
</div>
<div class="email-preview-info-row">
<div class="email-preview-label">主旨:</div>
<div class="email-preview-content">{{ email.主旨 }}</div>
</div>
</div>
<!-- 郵件內文 -->
<div class="email-preview-body">
{{ email.內文 }}
</div>
<!-- 附件表格 -->
<div class="email-preview-table">
<table class="attachment-table">
<thead>
<tr>
<th style="width: 10%;">序</th>
<th style="width: 12%;">計畫代號</th>
<th style="width: 12%;">活動日期</th>
<th style="width: 20%;">活動名稱/事由</th>
<th style="width: 12%;">扣繳類別</th>
<th style="width: 12%; text-align: right;">講師勞務費</th>
<th style="width: 12%; text-align: right;">應扣繳稅額</th>
<th style="width: 12%; text-align: right;">服務費</th>
</tr>
</thead>
<tbody>
<template v-if="email.明細 && email.明細.length > 0">
<tr v-for="(item, itemIndex) in email.明細" :key="itemIndex">
<td>{{ itemIndex + 1 }}</td>
<td>{{ item.計畫代號 }}</td>
<td>{{ item.活動日期 }}</td>
<td>{{ item.活動名稱事由 }}</td>
<td>{{ item.扣繳類別名稱 }}</td>
<td class="ta-right">{{ formatCurrency(item.講師勞務費) }}</td>
<td class="ta-right">{{ formatCurrency(item.應扣繳稅額) }}</td>
<td class="ta-right">{{ formatCurrency(item.服務費) }}</td>
</tr>
<!-- 表尾合計 -->
<tr class="summary-row">
<td colspan="5" style="text-align: right; padding: 8px;">合計:</td>
<td class="ta-right">{{ formatCurrency(email.講師勞務費合計) }}</td>
<td class="ta-right">{{ formatCurrency(email.應扣繳稅額合計) }}</td>
<td class="ta-right">{{ formatCurrency(email.服務費合計) }}</td>
</tr>
</template>
<tr v-else>
<td colspan="8" style="text-align: center; color: #999;">沒有附件資料</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
</div>
<!-- Modal Footer -->
<div class="modal-footer">
<button type="button" class="btn-close" v-on:click="closeEmailPreview">關閉</button>
</div>
</div>
</div>
</div>
<!-- 隱藏欄位 -->
<input type="hidden" id="ctl00_ContentPlaceHolder1_hidCurrentYear" runat="server" />
<input type="hidden" id="ctl00_ContentPlaceHolder1_hidCurrentClosingMonth" runat="server" />
</asp:Content>
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "財稅作業與領據關帳";
HelpUrl = "~/Help/領據/財稅作業與領據關帳.html";
// 註冊 JavaScript 檔案
#if DEBUG
Page.ClientScript.RegisterClientScriptInclude("Vue", ResolveClientUrl($"~/Scripts/vue.js?v={PublicVariable.SystemVersion}"));
#else
Page.ClientScript.RegisterClientScriptInclude("Vue", ResolveClientUrl($"~/Scripts/vue.min.js?v={PublicVariable.SystemVersion}"));
#endif
Page.ClientScript.RegisterClientScriptInclude("Axios", ResolveClientUrl($"~/Scripts/axios.min.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("ToastMixin", ResolveClientUrl($"~/Scripts/vue-toast-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("ApiMixin", ResolveClientUrl($"~/Scripts/api-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("財稅作業與領據關帳", ResolveClientUrl($"~/Scripts/財稅作業與領據關帳.js?v={PublicVariable.SystemVersion}"));
// 啟動 Vue 應用程式
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "CreateTaxReceiptApp", "CreateTaxReceiptApp();", true);
}
}
}
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// ctl00_ContentPlaceHolder1_hidCurrentYear 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputHidden ctl00_ContentPlaceHolder1_hidCurrentYear;
/// <summary>
/// ctl00_ContentPlaceHolder1_hidCurrentClosingMonth 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputHidden ctl00_ContentPlaceHolder1_hidCurrentClosingMonth;
}
}
@@ -0,0 +1,825 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master"
AutoEventWireup="true" CodeBehind="非講師.aspx.cs" Inherits="Education.Forms.領據系統.非講師" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<%@ Register Src="~/Forms/領據系統/付款設定.ascx" TagPrefix="uc1" TagName="PaymentSettings" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script>
function show_hide_export_columns() {
if ($("#<%=hfCanExport.ClientID%>").val() == "Y") {
if ($("#export_columns").hasClass("hide"))
$("#export_columns").removeClass("hide");
else
$("#export_columns").addClass("hide");
} else {
alert("您沒有匯出的權限");
}
}
function toggle_export_all(checked) {
if (checked == true)
$("input[type=checkbox][id^=<%=cblExport.ClientID%>]").prop("checked", true);
else
$("input[type=checkbox][id^=<%=cblExport.ClientID%>]").prop("checked", false);
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ObjectDataSource ID="ds非講師Grid" runat="server" DataObjectTypeName="Education.非講師Item"
TypeName="Education.DAC_非講師" OldValuesParameterFormatString="original_{0}"
EnablePaging="true" SelectMethod="SelectPage" SelectCountMethod="SelectCount"
OnObjectCreating="ds非講師Grid_ObjectCreating">
<SelectParameters>
<asp:Parameter Name="noInputReturnAll" Type="Boolean" DefaultValue="true" />
<asp:Parameter Name="orderBy" Type="String" DefaultValue="" />
<asp:ControlParameter Name="編號" Type="String" ControlID="txt編號_Search"></asp:ControlParameter>
<asp:ControlParameter Name="姓名" Type="String" ControlID="txt姓名_Search"></asp:ControlParameter>
<asp:ControlParameter Name="身分證字號" Type="String" ControlID="txt身分證字號_Search"></asp:ControlParameter>
<asp:ControlParameter Name="聯絡電話" Type="String" ControlID="txt聯絡電話_Search"></asp:ControlParameter>
<asp:ControlParameter Name="電子郵件" Type="String" ControlID="txt電子郵件_Search"></asp:ControlParameter>
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds非講師Form" runat="server" DataObjectTypeName="Education.非講師Item"
TypeName="Education.DAC_非講師" OldValuesParameterFormatString="original_{0}"
SelectMethod="SelectOne" InsertMethod="InsertOne" UpdateMethod="UpdateOne" DeleteMethod="DeleteOne"
OnObjectCreating="ds非講師Form_ObjectCreating">
<SelectParameters>
<asp:ControlParameter ControlID="gv非講師" Name="編號"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ds片語合作滿意度" runat="server"
TypeName="Education.DAC_片語" SelectMethod="SelectBy適用欄位">
<SelectParameters>
<asp:Parameter DefaultValue="合作滿意度" Name="適用欄位" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:LinkButton ID="btnTab1" runat="server"
CssClass="tabButtonSelected">非講師資料查詢</asp:LinkButton>
<asp:LinkButton ID="btnTab2" runat="server"
CssClass="tabButton">非講師資料處理</asp:LinkButton>
<asp:LinkButton ID="btnTab3" runat="server"
CssClass="tabButton">帳戶/扣繳資料</asp:LinkButton>
<asp:LinkButton ID="btnTab4" runat="server"
CssClass="tabButton">匯入</asp:LinkButton>
<div style="border-top: solid 1px gray;">
<asp:MultiView ID="MultiView1" runat="server"
ActiveViewIndex="0">
<asp:View ID="View查詢" runat="server">
<table border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt編號_Search" runat="server" Text="" MaxLength="10"></asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb姓名Label" runat="server" Text="姓名"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt姓名_Search" runat="server" Text="" MaxLength="20"></asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb身分證字號Label" runat="server" Text="身分證字號"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt身分證字號_Search" runat="server" Text="" MaxLength="12"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯絡電話Label" runat="server" Text="聯絡電話"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt聯絡電話_Search" runat="server" Text="" MaxLength="50"></asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb電子郵件Label" runat="server" Text="電子郵件"></asp:Label>
</td>
<td class="datainput">
<asp:TextBox ID="txt電子郵件_Search" runat="server" Text="" MaxLength="100"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="7">
<asp:LinkButton ID="btnSearch" runat="server" Text="查詢" CssClass="button blue80" OnClick="btnSearch_Click" />
<asp:LinkButton ID="btnClear" runat="server" Text="清除" CssClass="button orange80" OnClick="btnClear_Click" />
<button type="button" class="button gray80" onclick="show_hide_export_columns()">匯出</button>
<asp:HiddenField runat="server" ID="hfCanExport" Value="N" />
<br />
<asp:Label ID="lbMessage" runat="server" CssClass="ErrorMessage" EnableViewState="False"></asp:Label>
</td>
</tr>
<tr class="hide" id="export_columns">
<td class="caption" style="vertical-align: top; padding-top: 6px">匯出欄位
</td>
<td colspan="7">
<button type="button" class="button gray60" onclick="toggle_export_all(true)">全選</button>
<button type="button" class="button gray60" onclick="toggle_export_all(false)">全不選</button>
<asp:LinkButton ID="btnExport" runat="server" CssClass="button purple120"
OnClick="btnExport_Click">匯出檔案</asp:LinkButton>
<asp:CheckBoxList ID="cblExport" runat="server" RepeatLayout="Table" RepeatDirection="Horizontal" RepeatColumns="5">
<asp:ListItem Selected="True" Text="編號" Value="編號"></asp:ListItem>
<asp:ListItem Selected="True" Text="姓名" Value="姓名"></asp:ListItem>
<asp:ListItem Selected="True" Text="身分證字號" Value="身分證字號"></asp:ListItem>
<asp:ListItem Selected="True" Text="藝名網名" Value="藝名網名"></asp:ListItem>
<asp:ListItem Selected="True" Text="聯絡電話" Value="聯絡電話"></asp:ListItem>
<asp:ListItem Selected="True" Text="電子郵件" Value="電子郵件"></asp:ListItem>
<asp:ListItem Selected="True" Text="戶籍地址" Value="戶籍地址"></asp:ListItem>
<asp:ListItem Selected="True" Text="居住地址" Value="居住地址"></asp:ListItem>
<asp:ListItem Selected="True" Text="職務內容" Value="職務內容"></asp:ListItem>
<asp:ListItem Selected="True" Text="合作滿意度" Value="合作滿意度"></asp:ListItem>
<asp:ListItem Selected="True" Text="窗口" Value="窗口"></asp:ListItem>
<asp:ListItem Selected="True" Text="是否接受邀約" Value="是否接受邀約"></asp:ListItem>
<asp:ListItem Selected="True" Text="聯繫狀況與報價" Value="聯繫狀況與報價"></asp:ListItem>
<asp:ListItem Selected="True" Text="備註" Value="備註"></asp:ListItem>
</asp:CheckBoxList>
</td>
</tr>
</table>
<asp:GridView ID="gv非講師" runat="server"
DataKeyNames="編號,DB_APPNO"
AutoGenerateColumns="False"
EnableModelValidation="True"
DataSourceID="ds非講師Grid"
AllowPaging="True"
EnableViewState="True"
Width="100%">
<Columns>
<asp:TemplateField HeaderText="編號" SortExpression="編號">
<ItemTemplate>
<asp:Label ID="lb編號" runat="server"
Text='<%# Bind("編號", "{0:0000}") %>'></asp:Label>
<asp:LinkButton ID="LinkButton1" runat="server"
CausesValidation="False" CommandName="Select" Text=""></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="3em" />
</asp:TemplateField>
<asp:BoundField DataField="姓名" HeaderText="姓名" SortExpression="姓名" />
<asp:BoundField DataField="身分證字號" HeaderText="身分證字號" SortExpression="身分證字號" />
<asp:BoundField DataField="藝名網名" HeaderText="藝名/網名" SortExpression="藝名網名" />
<asp:BoundField DataField="聯絡電話" HeaderText="聯絡電話" SortExpression="聯絡電話" />
<asp:BoundField DataField="電子郵件" HeaderText="電子郵件" SortExpression="電子郵件" />
<asp:BoundField DataField="窗口" HeaderText="窗口" SortExpression="窗口" />
<asp:TemplateField HeaderText="是否接受邀約" SortExpression="接受邀約">
<ItemTemplate>
<asp:Label ID="lb接受邀約" runat="server" Text='<%# Eval("接受邀約", "{0}") == "1" ? "是" : "否" %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="3em" />
</asp:TemplateField>
</Columns>
<PagerTemplate>
<weblib:GridViewPager ID="GridViewPager1" runat="server" />
</PagerTemplate>
<EmptyDataTemplate>
無資料
</EmptyDataTemplate>
</asp:GridView>
</asp:View>
<asp:View ID="View處理" runat="server">
<asp:FormView ID="fv非講師" runat="server"
DataKeyNames="編號,DB_APPNO" DataSourceID="ds非講師Form"
EnableModelValidation="True" EnableViewState="False">
<ItemTemplate>
<div>
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New" CssClass="button blue80" />
<asp:LinkButton ID="btnUpdate" runat="server" Text="更正" CommandName="Edit" CssClass="button green80" />
<asp:LinkButton ID="btnDelete" runat="server" Text="刪除" CommandName="Delete" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定刪除此筆資料?&quot;);" />
</div>
<table border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
<asp:Label ID="lb編號" runat="server" Text='<%# Bind("編號") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb姓名Label" runat="server" Text="姓名"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
<asp:Label ID="lb姓名" runat="server" Text='<%# Bind("姓名") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb身分證字號Label" runat="server" Text="身分證字號"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
<asp:Label ID="lb身分證字號" runat="server" Text='<%# Bind("身分證字號") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯絡電話Label" runat="server" Text="聯絡電話"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
<asp:Label ID="lb聯絡電話" runat="server" Text='<%# Bind("聯絡電話") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb電子郵件Label" runat="server" Text="電子郵件"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
<asp:Label ID="lb電子郵件" runat="server" Text='<%# Bind("電子郵件") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb藝名網名Label" runat="server" Text="藝名/網名"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
<asp:Label ID="lb藝名網名" runat="server" Text='<%# Bind("藝名網名") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb戶籍地址Label" runat="server" Text="戶籍地址"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="Label1" runat="server" Text='<%# Bind("戶籍地址_郵編") %>'
CssClass="input"></asp:Label>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("戶籍地址_縣市") %>'
CssClass="input"></asp:Label>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("戶籍地址_鄉鎮市區") %>'
CssClass="input"></asp:Label>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("戶籍地址_街道地址") %>'
CssClass="input"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb居住地址Label" runat="server" Text="居住地址"></asp:Label>
</td>
<td class="datadisplay" colspan="5">
<asp:Label ID="lb居住地址_郵編" runat="server" Text='<%# Bind("居住地址_郵編") %>'
CssClass="input"></asp:Label>
<asp:Label ID="lb居住地址_縣市" runat="server" Text='<%# Bind("居住地址_縣市") %>'
CssClass="input"></asp:Label>
<asp:Label ID="lb居住地址_鄉鎮市區" runat="server" Text='<%# Bind("居住地址_鄉鎮市區") %>'
CssClass="input"></asp:Label>
<asp:Label ID="lb居住地址_街道地址" runat="server" Text='<%# Bind("居住地址_街道地址") %>'
CssClass="input"></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb職務內容Label" runat="server" Text="職務內容"></asp:Label>
</td>
<td colspan="7" class="datadisplay">
<asp:Label ID="lb職務內容" runat="server" Text='<%# Bind("職務內容") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb合作滿意度Label" runat="server" Text="合作滿意度"></asp:Label>
</td>
<td colspan="7" class="datadisplay">
<asp:Label ID="lb合作滿意度" runat="server" Text='<%# Bind("合作滿意度") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb窗口Label" runat="server" Text="窗口"></asp:Label>
</td>
<td colspan="3" class="datadisplay">
<asp:Label ID="lb窗口" runat="server" Text='<%# Bind("窗口") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb接受邀約Label" runat="server" Text="接受邀約"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
<asp:Label ID="lb接受邀約" runat="server" Text='<%# Eval("接受邀約", "{0}") == "1" ? "是" : "否" %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯繫狀況與報價Label" runat="server" Text="聯繫狀況與報價"></asp:Label>
</td>
<td colspan="7" class="datadisplay">
<asp:Label ID="lb聯繫狀況與報價" runat="server" Text='<%# Bind("聯繫狀況與報價") %>'></asp:Label>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb備註Label" runat="server" Text="備註"></asp:Label>
</td>
<td colspan="7" class="datadisplay">
<asp:Label ID="lb備註" runat="server" Text='<%# Bind("備註") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
<InsertItemTemplate>
<div>
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Insert" CssClass="button blue80" />
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" CausesValidation="false" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定取消新增?&quot;);" />
</div>
<table border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 100px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
<asp:Label ID="txt編號" runat="server" Text='(自動編號)' MaxLength="10"></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb姓名Label" runat="server" Text="姓名"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt姓名" runat="server" Text='<%# Bind("姓名") %>' MaxLength="20"></asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb身分證字號Label" runat="server" Text="身分證字號"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt身分證字號" runat="server" Text='<%# Bind("身分證字號") %>' MaxLength="12"></asp:TextBox>
<asp:CustomValidator ID="cv身分證字號" runat="server" ControlToValidate="txt身分證字號"
ErrorMessage="身分證字號重複" Display="Dynamic" ValidateEmptyText="false"
OnServerValidate="cv身分證字號_ServerValidate"></asp:CustomValidator>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯絡電話Label" runat="server" Text="聯絡電話"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt聯絡電話" runat="server" Text='<%# Bind("聯絡電話") %>' MaxLength="50"></asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb電子郵件Label" runat="server" Text="電子郵件"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt電子郵件" runat="server" Text='<%# Bind("電子郵件") %>' MaxLength="100"></asp:TextBox>
<asp:CustomValidator ID="cv電子郵件" runat="server" ControlToValidate="txt電子郵件"
ErrorMessage="電子郵件格式錯誤" Display="Dynamic" ValidateEmptyText="false"
OnServerValidate="cv電子郵件_ServerValidate"></asp:CustomValidator>
</td>
<td class="caption">
<asp:Label ID="lb藝名網名Label" runat="server" Text="藝名/網名"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt藝名網名" runat="server" Text='<%# Bind("藝名網名") %>' MaxLength="20"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb戶籍地址_郵編Label" runat="server" Text="戶籍地址"></asp:Label>
</td>
<td colspan="5" class="datainput">
<weblib:AddressEditor ID="txt戶籍地址" runat="server"
County='<%# Bind("戶籍地址_縣市") %>'
CountyControlWidth="6em"
CssClass="inputFull"
ScriptFileName="../../utility/AddressEditor.js"
StreetAddress='<%# Bind("戶籍地址_街道地址") %>'
TownControlWidth="6em" Township='<%# Bind("戶籍地址_鄉鎮市區") %>'
ZipCode='<%# Bind("戶籍地址_郵編") %>'
ZipCodeControlWidth="4em" />
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb居住地址_郵編Label" runat="server" Text="居住地址"></asp:Label>
</td>
<td colspan="5" class="datainput">
<weblib:AddressEditor ID="txt居住地址" runat="server"
County='<%# Bind("居住地址_縣市") %>'
CountyControlWidth="6em"
CssClass="inputFull"
ScriptFileName="../../utility/AddressEditor.js"
StreetAddress='<%# Bind("居住地址_街道地址") %>'
TownControlWidth="6em" Township='<%# Bind("居住地址_鄉鎮市區") %>'
ZipCode='<%# Bind("居住地址_郵編") %>'
ZipCodeControlWidth="4em" />
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb職務內容Label" runat="server" Text="職務內容"></asp:Label>
</td>
<td colspan="7" class="datainput">
<asp:TextBox ID="txt職務內容" runat="server"
Text='<%# Bind("職務內容") %>' MaxLength="500"
TextMode="MultiLine" Rows="5" Width="100%"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb合作滿意度Label" runat="server" Text="合作滿意度"></asp:Label>
<div>
<button type="button" class="button floatRight gray40"
onclick="togglePhrase('div合作滿意度')">
片語</button>
</div>
</td>
<td colspan="7" class="datainput">
<asp:TextBox ID="txt合作滿意度" runat="server"
Text='<%# Bind("合作滿意度") %>' MaxLength="2000"
TextMode="MultiLine" Rows="5" Width="100%"></asp:TextBox>
<div id="div合作滿意度" class="hide" style="width: 100%">
<asp:Repeater runat="server" DataSourceID="ds片語合作滿意度">
<ItemTemplate>
<span runat="server" class="phraselink"
onclick='<%# GetPhraseClientClick("txt合作滿意度", Eval("片語內容", "{0}")) %>'>
<%# Eval("片語內容") %>
</span>
</ItemTemplate>
</asp:Repeater>
</div>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb窗口Label" runat="server" Text="窗口"></asp:Label>
</td>
<td colspan="3" class="datainput">
<asp:TextBox ID="txt窗口" runat="server" Text='<%# Bind("窗口") %>'
MaxLength="100" Width="100%" placeholder="窗口姓名/聯絡方式">
</asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb接受邀約Label" runat="server" Text="接受邀約"></asp:Label>
</td>
<td colspan="1" class="datainput">
<weblib:WDropDownList ID="dd接受邀約" runat="server" SelectedValue='<%# Bind("接受邀約") %>' Width="100%" >
<asp:ListItem Value="1" Text="是" />
<asp:ListItem Value="0" Text="否" />
</weblib:WDropDownList>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯繫狀況與報價Label" runat="server" Text="聯繫狀況與報價"></asp:Label>
</td>
<td colspan="7" class="datainput">
<asp:TextBox ID="txt聯繫狀況與報價" runat="server" Text='<%# Bind("聯繫狀況與報價") %>'
TextMode="MultiLine" Rows="5" MaxLength="2000" Width="100%"
placeholder="邀約人、聯絡日期、聯絡狀況、可配合時間、出席總時數及價格、車資計算方式">
</asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb備註Label" runat="server" Text="備註"></asp:Label>
</td>
<td colspan="7" class="datainput">
<asp:TextBox ID="txt備註" runat="server" Text='<%# Bind("備註") %>' MaxLength="2000" Width="100%"
placeholder="是否同意錄影、異常/特殊狀況">
</asp:TextBox>
</td>
</tr>
</table>
</InsertItemTemplate>
<EditItemTemplate>
<div>
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Update" CssClass="button blue80" />
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" CausesValidation="false" CssClass="button red80" OnClientClick="return confirm(&quot;是否確定取消更正?&quot;);" />
<asp:HiddenField ID="hfDBAPPNO" runat="server" Value='<%# Bind("DB_APPNO") %>' />
</div>
<table border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
<asp:Label ID="lb編號" runat="server" Text='<%# Bind("編號") %>'></asp:Label>
</td>
<td class="caption">
<asp:Label ID="lb姓名Label" runat="server" Text="姓名"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt姓名" runat="server" Text='<%# Bind("姓名") %>' MaxLength="20"></asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb身分證字號Label" runat="server" Text="身分證字號"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt身分證字號" runat="server" Text='<%# Bind("身分證字號") %>' MaxLength="12"></asp:TextBox>
<asp:CustomValidator ID="cv身分證字號" runat="server" ControlToValidate="txt身分證字號"
ErrorMessage="身分證字號重複" Display="Dynamic" ValidateEmptyText="false"
OnServerValidate="cv身分證字號_ServerValidate"></asp:CustomValidator>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯絡電話Label" runat="server" Text="聯絡電話"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt聯絡電話" runat="server" Text='<%# Bind("聯絡電話") %>' MaxLength="50"></asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb電子郵件Label" runat="server" Text="電子郵件"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt電子郵件" runat="server" Text='<%# Bind("電子郵件") %>' MaxLength="100"></asp:TextBox>
<asp:CustomValidator ID="cv電子郵件" runat="server" ControlToValidate="txt電子郵件"
ErrorMessage="電子郵件格式錯誤" Display="Dynamic" ValidateEmptyText="false"
OnServerValidate="cv電子郵件_ServerValidate"></asp:CustomValidator>
</td>
<td class="caption">
<asp:Label ID="lb藝名網名Label" runat="server" Text="藝名/網名"></asp:Label>
</td>
<td colspan="1" class="datainput">
<asp:TextBox ID="txt藝名網名" runat="server" Text='<%# Bind("藝名網名") %>' MaxLength="20"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb戶籍地址_郵編Label" runat="server" Text="戶籍地址"></asp:Label>
</td>
<td colspan="5" class="datainput">
<weblib:AddressEditor ID="txt戶籍地址" runat="server"
County='<%# Bind("戶籍地址_縣市") %>'
CountyControlWidth="6em"
CssClass="inputFull"
ScriptFileName="../../utility/AddressEditor.js"
StreetAddress='<%# Bind("戶籍地址_街道地址") %>'
TownControlWidth="6em" Township='<%# Bind("戶籍地址_鄉鎮市區") %>'
ZipCode='<%# Bind("戶籍地址_郵編") %>'
ZipCodeControlWidth="4em" />
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb居住地址_郵編Label" runat="server" Text="居住地址"></asp:Label>
</td>
<td colspan="5" class="datainput">
<weblib:AddressEditor ID="txt居住地址" runat="server"
County='<%# Bind("居住地址_縣市") %>'
CountyControlWidth="6em"
CssClass="inputFull"
ScriptFileName="../../utility/AddressEditor.js"
StreetAddress='<%# Bind("居住地址_街道地址") %>'
TownControlWidth="6em" Township='<%# Bind("居住地址_鄉鎮市區") %>'
ZipCode='<%# Bind("居住地址_郵編") %>'
ZipCodeControlWidth="4em" />
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb職務內容Label" runat="server" Text="職務內容"></asp:Label>
</td>
<td colspan="7" class="datainput">
<asp:TextBox ID="txt職務內容" runat="server"
Text='<%# Bind("職務內容") %>'
TextMode="MultiLine" Rows="5"
MaxLength="500" Width="100%"></asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb合作滿意度Label" runat="server" Text="合作滿意度"></asp:Label>
<div>
<button type="button" class="button floatRight gray40"
onclick="togglePhrase('div合作滿意度')">
片語</button>
</div>
</td>
<td colspan="7" class="datainput">
<asp:TextBox ID="txt合作滿意度" runat="server"
Text='<%# Bind("合作滿意度") %>'
TextMode="MultiLine" Rows="5"
MaxLength="2000" Width="100%"></asp:TextBox>
<div id="div合作滿意度" class="hide" style="width: 100%">
<asp:Repeater runat="server" DataSourceID="ds片語合作滿意度">
<ItemTemplate>
<span runat="server" class="phraselink"
onclick='<%# GetPhraseClientClick("txt合作滿意度", Eval("片語內容", "{0}")) %>'>
<%# Eval("片語內容") %>
</span>
</ItemTemplate>
</asp:Repeater>
</div>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb窗口Label" runat="server" Text="窗口"></asp:Label>
</td>
<td colspan="3" class="datainput">
<asp:TextBox ID="txt窗口" runat="server" Text='<%# Bind("窗口") %>'
MaxLength="100" placeholder="窗口姓名/聯絡方式" Width="100%">
</asp:TextBox>
</td>
<td class="caption">
<asp:Label ID="lb接受邀約Label" runat="server" Text="接受邀約"></asp:Label>
</td>
<td colspan="1" class="datainput">
<weblib:WDropDownList ID="dd接受邀約" runat="server" SelectedValue='<%# Bind("接受邀約") %>' Width="100%" >
<asp:ListItem Value="1" Text="是" />
<asp:ListItem Value="0" Text="否" />
</weblib:WDropDownList>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯繫狀況與報價Label" runat="server" Text="聯繫狀況與報價"></asp:Label>
</td>
<td colspan="7" class="datainput">
<asp:TextBox ID="txt聯繫狀況與報價" runat="server" Text='<%# Bind("聯繫狀況與報價") %>'
TextMode="MultiLine" Rows="5" MaxLength="2000" Width="100%"
placeholder="邀約人、聯絡日期、聯絡狀況、可配合時間、出席總時數及價格、車資計算方式">
</asp:TextBox>
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb備註Label" runat="server" Text="備註"></asp:Label>
</td>
<td colspan="7" class="datainput">
<asp:TextBox ID="txt備註" runat="server" Text='<%# Bind("備註") %>' MaxLength="2000" Width="100%"
placeholder="是否同意錄影、異常/特殊狀況">
</asp:TextBox>
</td>
</tr>
</table>
</EditItemTemplate>
<EmptyDataTemplate>
<div>
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New" CssClass="button blue80" />
</div>
<table border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
<tr>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
<td colspan="1" class="widthcontrol" style="width: 180px;"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
</td>
<td colspan="1" class="datadisplay"></td>
<td class="caption">
<asp:Label ID="lb姓名Label" runat="server" Text="姓名"></asp:Label>
</td>
<td colspan="1" class="datadisplay"></td>
<td class="caption">
<asp:Label ID="lb身分證字號Label" runat="server" Text="身分證字號"></asp:Label>
</td>
<td colspan="1" class="datadisplay"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯絡電話Label" runat="server" Text="聯絡電話"></asp:Label>
</td>
<td colspan="1" class="datadisplay"></td>
<td class="caption">
<asp:Label ID="lb電子郵件Label" runat="server" Text="電子郵件"></asp:Label>
</td>
<td colspan="1" class="datadisplay"></td>
<td class="caption">
<asp:Label ID="lb藝名網名Label" runat="server" Text="藝名/網名"></asp:Label>
</td>
<td colspan="1" class="datadisplay"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb戶籍地址Label" runat="server" Text="戶籍地址"></asp:Label>
</td>
<td class="datadisplay" colspan="5">&nbsp;</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb居住地址Label" runat="server" Text="居住地址"></asp:Label>
</td>
<td class="datadisplay" colspan="5">&nbsp;</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb職務內容Label" runat="server" Text="職務內容"></asp:Label>
</td>
<td colspan="7" class="datadisplay"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb合作滿意度Label" runat="server" Text="合作滿意度"></asp:Label>
</td>
<td colspan="7" class="datadisplay"></td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb窗口Label" runat="server" Text="窗口"></asp:Label>
</td>
<td colspan="3" class="datadisplay">
</td>
<td class="caption">
<asp:Label ID="lb接受邀約Label" runat="server" Text="接受邀約"></asp:Label>
</td>
<td colspan="1" class="datadisplay">
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb聯繫狀況與報價Label" runat="server" Text="聯繫狀況與報價"></asp:Label>
</td>
<td colspan="7" class="datadisplay">
</td>
</tr>
<tr>
<td class="caption">
<asp:Label ID="lb備註Label" runat="server" Text="備註"></asp:Label>
</td>
<td colspan="7" class="datadisplay">
</td>
</tr>
</table>
</EmptyDataTemplate>
</asp:FormView>
</asp:View>
<asp:View ID="View付款設定" runat="server">
<uc1:PaymentSettings ID="Uc付款設定" runat="server" 人員類別="非講師" />
</asp:View>
<asp:View ID="View匯入" runat="server">
<div style="padding: 1rem">
1.
<asp:FileUpload runat="server" ID="fu匯入檔案" CssClass="fileupload"></asp:FileUpload>
<br />
<br />
2.
<asp:LinkButton runat="server" ID="btn上傳檔案" CssClass="button blue80 hide" OnClick="btn上傳檔案_Click">上傳檔案</asp:LinkButton>
<br />
<span>檢查結果:</span>
<br />
<asp:Literal runat="server" ID="ltl檢查結果">
(請先上傳檔案)
</asp:Literal>
<br />
<br />
3.
<asp:LinkButton runat="server" ID="btn匯入" CssClass="button blue80" OnClick="btn匯入_Click">匯入</asp:LinkButton>
<br />
<span>匯入結果:</span>
<br />
<asp:Literal runat="server" ID="ltl匯入結果">
(請先上傳檔案)
</asp:Literal>
<br />
<br />
<asp:LinkButton runat="server" ID="btn下載範本" CssClass="button gray120" OnClick="btn下載範本_Click">下載匯入範本</asp:LinkButton>
</div>
</asp:View>
</asp:MultiView>
</div>
</asp:Content>
@@ -0,0 +1,217 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
using Newtonsoft.Json;
namespace Education.Forms.
{
public partial class : FormBase
{
private DAC_非講師 Dao非講師;
private bool canExport = false;
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Dao非講師 = new DAC_非講師(conn);
}
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "非講師/名人基本資料";
// 設定 Form 的 enctype 為 multipart/form-data,才能上傳檔案
Page.Form.Attributes["enctype"] = "multipart/form-data";
Form_View = fv非講師;
Grid_View = gv非講師;
FormView_DataSource = ds非講師Form;
GridView_DataSource = ds非講師Grid;
AddTabButton(MultiView1, 0, btnTab1);
AddTabButton(MultiView1, 1, btnTab2);
AddTabButton(MultiView1, 2, btnTab3);
AddTabButton(MultiView1, 3, btnTab4);
RegisterPostbackTrigger(btnExport);
RegisterPostbackTrigger(btn下載範本);
RegisterPostbackTrigger(btn匯入);
RegisterPostbackTrigger(btn上傳檔案);
InitJSVar();
GetRights();
if (!IsPostBack)
{
ActivateTab(MultiView1, 0);
}
else
{
Grid_View.DataBind();
Form_View.DataBind();
}
}
protected void GetRights()
{
canExport = new MWEB().CheckRight(ProgramID., WRightName.Execute, UserId);
hfCanExport.Value = (canExport ? "Y" : "");
}
protected void btnSearch_Click(object sender, EventArgs e)
{
Grid_View.PageIndex = 0;
Grid_View.DataBind();
}
protected void btnClear_Click(object sender, EventArgs e)
{
txt編號_Search.Text = "";
txt姓名_Search.Text = "";
txt身分證字號_Search.Text = "";
txt聯絡電話_Search.Text = "";
txt電子郵件_Search.Text = "";
}
protected override void GridView_SelectedIndexChanged(object sender, EventArgs e)
{
base.GridView_SelectedIndexChanged(sender, e);
ActivateTab(MultiView1, 1);
}
protected void cv電子郵件_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = IsValidEmail(args.Value);
}
protected void cv身分證字號_ServerValidate(object source, ServerValidateEventArgs args)
{
string = Form_View.DataItem == null ? "" : (Form_View.DataItem as Item).;
args.IsValid = !Dao非講師.Is身份證字號Dulicate(, args.Value);
}
protected void ds非講師Grid_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao非講師;
}
protected void ds非講師Form_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao非講師;
}
protected void btnExport_Click(object sender, EventArgs e)
{
if (!canExport)
{
return;
}
var export_columns = new List<string>();
for (var i = 0; i < cblExport.Items.Count; i++)
{
if (cblExport.Items[i].Selected)
export_columns.Add(cblExport.Items[i].Value);
}
var report = new Report.()
{
data = Dao非講師.SelectPage(true, 0, Int32.MaxValue,
txt編號_Search.Text, txt姓名_Search.Text,
txt身分證字號_Search.Text, txt聯絡電話_Search.Text,
txt電子郵件_Search.Text),
export_columns = export_columns
};
MemoryStream ms = report.DoReport();
ResponseWriteStream(ms, String.Format("{0:yyyyMMdd_HHmmss}_非講師資料匯出.xlsx", PublicVariable.TaiwanNow));
}
protected void btn下載範本_Click(object sender, EventArgs e)
{
var ms = new ().ImportExample();
ResponseWriteStream(ms, "非講師資料匯入範本.xlsx");
}
protected void btn匯入_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(DAC.GetString(Session["非講師匯入檔案"])))
{
ltl匯入結果.Text = "請先上傳匯入檔案";
return;
}
try
{
var import = new ();
import.Connection = conn;
var importResult = import.Import<Item>(
DAC.GetString(Session["非講師匯入檔案"]),
out string message);
ltl匯入結果.Text = message;
}
catch (Exception ex)
{
ltl匯入結果.Text = "資料匯入失敗: " + ex.Message;
}
}
protected void btn上傳檔案_Click(object sender, EventArgs e)
{
// 檔案上傳
if (fu匯入檔案.HasFile)
{
ltl檢查結果.Text = "";
try
{
var fileName = $"{PublicVariable.TaiwanNow:yyyyMMdd_HHmmss}_{fu匯入檔案.PostedFile.FileName}";
var fullFileName = Path.Combine(ImportBase.ImportFilePath, fileName);
fu匯入檔案.PostedFile.SaveAs(fullFileName);
Session["非講師匯入檔案"] = fullFileName;
var import = new ();
var checkErrors = import.Validate(fullFileName, typeof(Item), out int rowCount);
if (checkErrors.Count == 0)
{
ltl檢查結果.Text = $"上傳檔案 {fu匯入檔案.PostedFile.FileName} 上傳成功並通過檢查<br/>共有 {rowCount} 筆資料<br/>請點擊匯入按鈕執行匯入。";
}
else
{
ltl檢查結果.Text = $"上傳檔案 {fu匯入檔案.PostedFile.FileName} 上傳成功,但有以下錯誤:<br/>{string.Join("<br/>", checkErrors.ToArray())}";
}
}
catch (Exception ex)
{
ltl檢查結果.Text = "檔案上傳失敗: " + ex.Message;
}
}
else
{
ltl檢查結果.Text = "請選擇要上傳的檔案";
}
}
protected override void AfterChangeTab()
{
base.AfterChangeTab();
InitJSVar();
}
private void InitJSVar()
{
if (Grid_View.SelectedDataKey != null)
{
var = DAC.GetString(Grid_View.SelectedDataKey["編號"]);
var = string.Empty;
var = Dao非講師.SelectOne().FirstOrDefault();
if ( != null) = .;
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "Init",
$@"V人員類別 = '非講師'; V講師編號 = '{Grid_View.SelectedDataKey[""]}'; V講師姓名 = '{講師姓名}';", true);
}
}
}
}
@@ -0,0 +1,350 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// ds非講師Grid 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds非講師Grid;
/// <summary>
/// ds非講師Form 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds非講師Form;
/// <summary>
/// ds片語合作滿意度 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ds片語合作滿意度;
/// <summary>
/// btnTab1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab1;
/// <summary>
/// btnTab2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab2;
/// <summary>
/// btnTab3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab3;
/// <summary>
/// btnTab4 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab4;
/// <summary>
/// MultiView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView MultiView1;
/// <summary>
/// View查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View查詢;
/// <summary>
/// lb編號Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb編號Label;
/// <summary>
/// txt編號_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt編號_Search;
/// <summary>
/// lb姓名Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb姓名Label;
/// <summary>
/// txt姓名_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt姓名_Search;
/// <summary>
/// lb身分證字號Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb身分證字號Label;
/// <summary>
/// txt身分證字號_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt身分證字號_Search;
/// <summary>
/// lb聯絡電話Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb聯絡電話Label;
/// <summary>
/// txt聯絡電話_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt聯絡電話_Search;
/// <summary>
/// lb電子郵件Label 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lb電子郵件Label;
/// <summary>
/// txt電子郵件_Search 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txt電子郵件_Search;
/// <summary>
/// btnSearch 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnSearch;
/// <summary>
/// btnClear 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnClear;
/// <summary>
/// hfCanExport 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfCanExport;
/// <summary>
/// lbMessage 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbMessage;
/// <summary>
/// btnExport 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnExport;
/// <summary>
/// cblExport 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBoxList cblExport;
/// <summary>
/// gv非講師 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gv非講師;
/// <summary>
/// View處理 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View處理;
/// <summary>
/// fv非講師 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FormView fv非講師;
/// <summary>
/// View付款設定 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View付款設定;
/// <summary>
/// Uc付款設定 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::Education. Uc付款設定;
/// <summary>
/// View匯入 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View匯入;
/// <summary>
/// fu匯入檔案 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.FileUpload fu匯入檔案;
/// <summary>
/// btn上傳檔案 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btn上傳檔案;
/// <summary>
/// ltl檢查結果 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Literal ltl檢查結果;
/// <summary>
/// btn匯入 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btn匯入;
/// <summary>
/// ltl匯入結果 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.Literal ltl匯入結果;
/// <summary>
/// btn下載範本 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btn下載範本;
}
}
@@ -0,0 +1,3 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="領據列印.ascx.cs" Inherits="Education.Forms.領據系統.領據列印" %>
<hidden id="hid列印"></hidden>
<h1>尚未完成</h1>
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class : UserControlBase
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
}
}
@@ -0,0 +1,100 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="領據匯出匯入.ascx.cs" Inherits="Education.Forms.領據系統.領據匯出匯入" %>
<div id="receiptImportApp">
<!-- Toast 訊息顯示容器 -->
<div v-if="ShowMessage" :class="['toast-message', 'toast-' + MessageType]">
{{ MessageText }}
</div>
<div class="card mb-3">
<div class="card-header">
<div class="header-content">步驟 1: 上傳檔案</div>
</div>
<div class="card-body">
<div class="row g-3" style="display: flex; flex-wrap: wrap;">
<div class="col-md-8">
<input type="file" class="form-control" @change="onFileSelected" accept=".xls,.xlsx" :disabled="isProcessing" />
<small class="form-text text-muted">只支援 .xls 或 .xlsx 檔案</small>
</div>
<div class="col-md-4">
<button type="button" class="button blue120 w-100" @click="uploadFile" :disabled="!selectedFile || isProcessing">上傳並檢查</button>
<button type="button" class="button blue120" @click="downloadTemplate" :disabled="isProcessing">下載匯入範本</button>
</div>
</div>
</div>
<hr />
</div>
<div v-if="validationMessages.length > 0" class="card mb-3">
<div class="card-header">
<div class="header-content" :class="validationSuccess ? 'text-success' : 'text-danger'">
步驟 2: 檢查結果
</div>
</div>
<div class="card-body">
<div v-if="validationSuccess" class="alert alert-success">
<strong>✓ 檢查完成</strong><br/>
共有 {{ validatedRowCount }} 列資料,欄位驗證和內容驗證均已通過,可以進行匯入
</div>
<div v-else class="alert alert-danger">
<strong>✗ 檢查失敗</strong><br/>
請修正以下錯誤後重新上傳:
</div>
<div class="validation-messages" style="max-height: 300px; overflow-y: auto;">
<div v-for="(msg, index) in validationMessages.slice(0, 100)" :key="index" class="validation-message">
{{ msg }}
</div>
<div v-if="validationMessages.length > 100" class="text-muted">
... 還有 {{ validationMessages.length - 100 }} 個訊息未顯示
</div>
</div>
</div>
<hr />
</div>
<div v-if="validationSuccess && !importDone && importMessages.length === 0" class="card mb-3">
<div class="card-header">
<div class="header-content">步驟 3: 匯入資料</div>
</div>
<div class="card-body">
<button type="button" class="button green80" @click="importData" :disabled="!validationSuccess || isProcessing || importDone">
<span v-if="isProcessing">匯入中...</span>
<span v-else>開始匯入</span>
</button>
</div>
<hr />
</div>
<div v-if="importDone || importMessages.length > 0" class="card mb-3">
<div class="card-header">
<div class="header-content" :class="importSuccess ? 'text-success' : 'text-danger'">
步驟 3: 匯入結果
</div>
</div>
<div class="card-body">
<div v-if="importSuccess" class="alert alert-success">
<strong>✓ 匯入完成</strong><br/>
成功匯入:<span class="text-success font-weight-bold">{{ importSuccessCount }}</span> 筆<br/>
<span v-if="importFailCount > 0" class="text-danger">失敗匯入:{{ importFailCount }} 筆</span>
</div>
<div v-else class="alert alert-danger">
<strong>✗ 匯入失敗</strong>
</div>
<div v-if="importFailCount > 0" class="import-messages" style="max-height: 300px; overflow-y: auto;">
<h6>失敗詳情:</h6>
<div v-for="(msg, index) in importMessages.slice(0, 50)" :key="index" class="import-message text-danger">
{{ msg }}
</div>
<div v-if="importMessages.length > 50" class="text-muted">
... 還有 {{ importMessages.length - 50 }} 筆未顯示
</div>
</div>
<%--
<div class="mt-3">
<button type="button" class="button gray80" @click="resetImport" :disabled="isProcessing">重新匯入</button>
</div>
--%>
</div>
</div>
</div>
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Newtonsoft.Json;
namespace Education.Forms.
{
public partial class : UserControlBase
{
protected void Page_Load(object sender, EventArgs e)
{
Page.ClientScript.RegisterClientScriptInclude("Base64Mixin", ResolveClientUrl($"~/Scripts/base64-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("領據匯入", ResolveClientUrl($"~/Scripts/領據匯入.js?v={PublicVariable.SystemVersion}"));
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "CreateReceiptImportApp", "CreateReceiptImportApp();", true);
}
}
}
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
}
}
@@ -0,0 +1,229 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="領據查詢.ascx.cs" Inherits="Education.Forms.領據系統.領據查詢" %>
<link rel="stylesheet" href="<%= ResolveClientUrl("~/Styles/領據資料處理.css") %>" />
<div id="receiptSearchApp">
<!-- Loading 指示器 -->
<div v-if="loading" class="loading-overlay">
<div class="loading-spinner">
<div class="spinner"></div>
<p>處理中...</p>
</div>
</div>
<!-- Toast 訊息顯示容器 -->
<div v-if="ShowMessage" v-bind:class="['toast-message', 'toast-' + MessageType]">
{{ MessageText }}
</div>
<!-- 查詢條件區塊 -->
<div class="control-panel search-panel card">
<div class="card-body">
<div class="row g-3">
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="field-wrapper">
<label class="form-label">計畫代號</label>
<input type="text" class="form-control" v-model="searchParams.計畫代號">
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="field-wrapper">
<label class="form-label">計畫名稱</label>
<input type="text" class="form-control" v-model="searchParams.計畫名稱">
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="field-wrapper">
<label class="form-label">活動日期(起)</label>
<input type="date" class="form-control" v-model="searchParams.活動日期_1">
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="field-wrapper">
<label class="form-label">活動日期(迄)</label>
<input type="date" class="form-control" v-model="searchParams.活動日期_2">
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="field-wrapper">
<label class="form-label">身分別</label>
<select class="form-select" v-model="searchParams.身分別">
<option v-for="item in dropdown.身分別" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="field-wrapper">
<label class="form-label">憑證類別</label>
<select class="form-select" v-model="searchParams.憑證類別">
<option v-for="item in dropdown.憑證類別" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="field-wrapper">
<label class="form-label">活動類別</label>
<input type="text" class="form-control" v-model="searchParams.活動類別">
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="field-wrapper">
<label class="form-label">付款方式</label>
<select class="form-select" v-model="searchParams.付款方式">
<option v-for="item in dropdown.付款方式" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-2">
<div class="field-wrapper">
<label class="form-label">領款人姓名</label>
<input type="text" class="form-control" v-model="searchParams.領款人姓名">
</div>
</div>
</div>
<div class="row mt-3 button-panel">
<div class="col-12">
<button type="button" class="button blue80" v-on:click.prevent="searchButtonClick" v-bind:disabled="loading">
<span v-if="loading">查詢中...</span>
<span v-else>查詢</span>
</button>
<button type="button" class="button gray80" v-on:click.prevent="clearSearch">清除查詢</button>
<button type="button" class="button blue80" v-on:click.prevent="addNew">新增領據</button>
<button type="button" class="button gray80" v-on:click.prevent="printSelected" v-bind:disabled="selectedItems.length === 0">列印領據</button>
<button type="button" class="button gray80" v-on:click.prevent="doExport" v-bind:disabled="dataList.length === 0">匯出領據</button>
</div>
</div>
</div>
</div>
<!-- 結果列表區塊 -->
<div class="results-panel card">
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-hover" style="table-layout: fixed">
<thead>
<tr class="text-center">
<th style="min-width: 2rem; max-width: 2rem;">
<input type="checkbox" v-on:change="toggleSelectAll" v-model="selectAll">
</th>
<th style="min-width: 7rem; max-width: 7rem;">表單編號</th>
<th style="min-width: 7rem; max-width: 7rem;">計畫代號</th>
<th style="min-width: 6rem; max-width: 6rem;">活動日期</th>
<th style="min-width: 5rem; max-width: 5rem;">領款人<br />
姓名</th>
<th style="min-width: 6rem; max-width: 6rem;">身分證字號</th>
<th style="min-width: 5rem; max-width: 5rem;">憑證類別</th>
<th style="min-width: 5rem; max-width: 5rem;">講師評鑑</th>
<th style="min-width: 5rem; max-width: 5rem;">活動類別</th>
<th style="min-width: 10rem; max-width: 10rem;">活動名稱/事由</th>
<th style="min-width: 5rem; max-width: 5rem;">費用別</th>
<th style="min-width: 3rem; max-width: 3rem;">單價</th>
<th style="min-width: 3rem; max-width: 3rem;">數量</th>
<th style="min-width: 3rem; max-width: 3rem;">單位</th>
<th style="min-width: 10rem; max-width: 10rem;">扣繳類別</th>
<th style="min-width: 4rem; max-width: 4rem;">勞務費<br />
合計金額</th>
<th style="min-width: 4rem; max-width: 4rem;">應扣繳<br />
稅額</th>
<th style="min-width: 4rem; max-width: 4rem;">服務費</th>
<th style="min-width: 4rem; max-width: 4rem;">差旅費<br />
合計金額</th>
<th style="min-width: 4rem; max-width: 4rem;">付款金額</th>
<th style="min-width: 7rem; max-width: 7rem;">建檔人員<br />
日期</th>
<th style="min-width: 7rem; max-width: 7rem;">更正人員<br />
日期</th>
<th style="min-width: 2rem; max-width: 2rem;">作廢<br />
紀錄</th>
<th style="min-width: 2rem; max-width: 2rem;">列印<br />
次數</th>
</tr>
</thead>
<tbody>
<tr v-for="item in dataList" v-bind:key="item.編號" v-bind:class="{ 'row-voided': item.作廢 === 1 }">
<td class="ta-center">
<input type="checkbox" v-bind:value="item" v-model="selectedItems">
</td>
<td class="ta-center">
<button class="button gray120" v-on:click="edit(item.編號)">{{item.表單編號 || '尚未列印'}}</button>
</td>
<td class="ta-center">{{item.計畫代號}}</td>
<td class="ta-center">{{item.活動日期}}</td>
<td class="ta-center">{{item.領款人姓名}}</td>
<td class="ta-center">{{item.身分證字號}}</td>
<td class="ta-center">{{item.憑證類別}}</td>
<td class="ta-center">{{item.講師評價}}</td>
<td class="ta-center">{{item.活動類別}}</td>
<td class="ta-center">{{item.活動名稱事由}}</td>
<td class="ta-center">{{item.勞務費_費用別}}</td>
<td class="ta-center">{{item.勞務費_單價}}</td>
<td class="ta-center">{{item.勞務費_數量}}</td>
<td class="ta-center">{{item.勞務費_單位}}</td>
<td class="ta-center">{{item.勞務費_扣繳類別名稱}}</td>
<td class="ta-center">{{item.勞務費_合計金額}}</td>
<td class="ta-center">{{item.勞務費_應扣繳稅額}}</td>
<td class="ta-center">{{item.勞務費_服務費}}</td>
<td class="ta-center">{{item.差旅費_合計}}</td>
<td class="ta-center">{{(item.勞務費_合計金額 || 0) - (item.勞務費_應扣繳稅額 || 0) - (item.勞務費_服務費 || 0) + (item.差旅費_合計 || 0)}}</td>
<td class="ta-center">{{item.DB_CRUSR}} {{item.DB_CRUSR_NAME}}<br />
{{item.DB_CRDAT}}</td>
<td class="ta-center"><span v-html="item.DB_TRDAT > '0001-01-01' ? `${item.DB_TRUSR} ${item.DB_TRUSR_NAME}<br />${item.DB_TRDAT}` : ''"></span></td>
<td class="ta-center">{{item.作廢 === 1 ? '是' : '否'}}</td>
<td class="ta-center">{{item.列印次數}}</td>
</tr>
<tr v-if="dataList.length === 0">
<td colspan="21" class="text-center">無資料</td>
</tr>
</tbody>
</table>
</div>
<!-- 分頁 -->
<div class="row mt-3">
<div class="col-12">
<div class="pagination-wrapper">
<!-- 第一頁 -->
<button type="button" class="button gray60" v-on:click="changePage(1)" v-bind:disabled="totalPages === 0 || currentPage === 1" title="第一頁">第一頁</button>
<!-- 上一頁 -->
<button type="button" class="button gray60" v-on:click="changePage(currentPage - 1)" v-bind:disabled="totalPages === 0 || currentPage === 1">上一頁</button>
<!-- 頁數下拉 -->
<div class="field-wrapper" style="margin: 0;">
<select class="form-select d-inline-block w-auto" v-model.number="currentPage" v-on:change="changePage(currentPage)" v-bind:disabled="totalPages === 0">
<option v-for="page in totalPages" v-bind:key="page" v-bind:value="page">第 {{page}} 頁</option>
</select>
</div>
<!-- 下一頁 -->
<button type="button" class="button gray60" v-on:click="changePage(currentPage + 1)" v-bind:disabled="totalPages === 0 || currentPage === totalPages">下一頁</button>
<!-- 最後頁 -->
<button type="button" class="button gray60" v-on:click="changePage(totalPages)" v-bind:disabled="totalPages === 0 || currentPage === totalPages" title="最後頁">最後頁</button>
<!-- 分隔線 -->
<span style="margin: 0 5px;">|</span>
<!-- 每頁筆數 -->
<label class="form-label" style="margin: 0;">每頁</label>
<div class="field-wrapper" style="margin: 0;">
<select class="form-select d-inline-block w-auto" v-model.number="pageSize" v-on:change="search">
<option v-bind:value="10">10</option>
<option v-bind:value="20">20</option>
<option v-bind:value="30">30</option>
</select>
</div>
<label class="form-label" style="margin: 0;">筆</label>
<!-- 分隔線 -->
<span style="margin: 0 5px;">|</span>
<!-- 筆數信息 -->
<span>共 <strong>{{totalCount}}</strong> 筆</span>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Newtonsoft.Json;
namespace Education.Forms.
{
public partial class : UserControlBase
{
protected void Page_Load(object sender, EventArgs e)
{
Page.ClientScript.RegisterClientScriptInclude("領據查詢", ResolveClientUrl($"~/Scripts/領據查詢.js?v={PublicVariable.SystemVersion}"));
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "CreateReceiptSearchApp", "CreateReceiptSearchApp();", true);
}
}
}
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
}
}
@@ -0,0 +1,468 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="領據處理.ascx.cs" Inherits="Education.Forms.領據系統.領據處理" %>
<link rel="stylesheet" href="<%= ResolveClientUrl("~/Styles/領據資料處理.css") %>" />
<div id="receiptEditApp">
<!-- Loading 指示器 -->
<div v-if="loading" class="loading-overlay">
<div class="loading-spinner">
<div class="spinner"></div>
<p>處理中...</p>
</div>
</div>
<!-- Toast 訊息顯示容器 -->
<div v-if="ShowMessage" v-bind:class="['toast-message', 'toast-' + MessageType]">
{{ MessageText }}
</div>
<div class="text-center">
<button type="button" class="button blue80" v-on:click="addNew" v-bind:disabled="!canAddNew || loading">新增</button>
<button type="button" class="button blue80" v-on:click="edit" v-bind:disabled="編號 === 0 || !canEdit || loading || closed">更正</button>
<button type="button" class="button green80" v-on:click="save" v-bind:disabled="!canSave || loading || closed || (laborWarnings || []).length > 0">
<span v-if="loading">儲存中...</span>
<span v-else>儲存</span>
</button>
<button type="button" class="button red80" v-on:click="cancel" v-bind:disabled="!canCancel || loading">取消</button>
<button type="button" class="button red80" v-on:click="voidVoucher" v-bind:disabled="!canReturnToList || loading || closed">
{{ mainData.作廢 === 1 ? '取消作廢' : '作廢領據' }}
</button>
<button type="button" class="button gray80" v-on:click="print" v-bind:disabled="!canReturnToList || loading">列印</button>
<button type="button" class="button gray80" v-on:click="goPrev" v-bind:disabled="!hasPrev">上一筆</button>
<button type="button" class="button gray80" v-on:click="goNext" v-bind:disabled="!hasNext">下一筆</button>
<button type="button" class="button gray80" v-on:click="returnToList" v-bind:disabled="!canReturnToList || loading">返回查詢</button>
</div>
<div class="control-panel card mb-3">
<div class="card-header">
<div class="header-content">
領據資料
<span v-if="mainData.作廢 === 1" class="void-badge">已作廢</span>
<span v-if="closed" class="void-badge">已關帳</span>
</div>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">表單編號</label>
<input type="text" class="form-control" v-model="mainData.表單編號" readonly>
</div>
</div>
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">活動日期</label>
<input type="date" class="form-control" v-model="mainData.活動日期" v-bind:disabled="isViewMode">
</div>
</div>
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">身分別 <span class="text-danger">*</span></label>
<select class="form-select" v-model="mainData.身分別" required v-bind:disabled="isViewMode">
<option v-for="item in dropdown.身分別" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
</div>
<div class="row g-3">
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">領款人姓名 <span class="text-danger">*</span></label>
<div class="autocomplete-wrapper">
<input type="text" class="form-control" v-model="mainData.領款人姓名" v-on:input="searchRecipient" v-on:focus="showRecipientDropdown = true" v-on:blur="hideRecipientDropdown" required v-bind:disabled="isViewMode">
<ul v-show="showRecipientDropdown && recipientList.length > 0" class="autocomplete-dropdown">
<li v-for="recipient in recipientList" v-bind:key="recipient.Value" v-on:click="selectRecipient(recipient)" class="autocomplete-item">
<div class="item-name">{{recipient.Name}}</div>
<div class="item-id">{{recipient.IdNumber}}</div>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">身分證字號</label>
<input type="text" class="form-control" v-model="mainData.身分證字號" readonly v-bind:disabled="isViewMode">
</div>
</div>
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">憑證類別</label>
<select class="form-select" v-model="mainData.憑證類別" v-bind:disabled="isViewMode">
<option v-for="item in dropdown.憑證類別" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
</div>
<div class="row g-3">
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">計畫代號 <span class="text-danger">*</span></label>
<div class="autocomplete-wrapper">
<input type="text" class="form-control" v-model="mainData.計畫代號" v-on:input="searchPlan" v-on:focus="showPlanDropdown = true" v-on:blur="hidePlanDropdown" required v-bind:disabled="isViewMode">
<ul v-show="showPlanDropdown && planList.length > 0" class="autocomplete-dropdown">
<li v-for="plan in planList" v-bind:key="plan.Value" v-on:click="selectPlan(plan)" class="autocomplete-item">
<div class="item-name">{{plan.Code}}</div>
<div class="item-id">{{plan.Name}}</div>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-8">
<div class="field-wrapper">
<label class="form-label">計畫名稱</label>
<input type="text" class="form-control" v-model="mainData.計畫名稱" v-bind:disabled="isViewMode">
</div>
</div>
</div>
<div class="row g-3">
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">活動地點</label>
<div class="input-with-button">
<button type="button" class="btn-phrase" v-on:click="toggleActivityLocationPhrase" v-bind:disabled="isViewMode">片語</button>
<input type="text" class="form-control" v-model="mainData.活動地點" v-bind:disabled="isViewMode" ref="活動地點Input">
<ul v-show="showActivityLocationPhrase" class="phrase-dropdown">
<li v-for="phrase in activityLocationPhrases" v-bind:key="phrase" v-on:click="insertPhrase('活動地點', phrase)" class="phrase-item">
{{phrase}}
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">活動類別</label>
<div class="input-with-button">
<button type="button" class="btn-phrase" v-on:click="toggleActivityCategoryPhrase" v-bind:disabled="isViewMode">片語</button>
<input type="text" class="form-control" v-model="mainData.活動類別" v-bind:disabled="isViewMode" ref="活動類別Input">
<ul v-show="showActivityCategoryPhrase" class="phrase-dropdown">
<li v-for="phrase in activityCategoryPhrases" v-bind:key="phrase" v-on:click="insertPhrase('活動類別', phrase)" class="phrase-item">
{{phrase}}
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">付款方式</label>
<select class="form-select" v-model="mainData.付款方式" v-bind:disabled="isViewMode">
<option v-for="item in dropdown.付款方式" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
</div>
<div class="row g-3">
<div class="col-md-12">
<div class="field-wrapper">
<label class="form-label">活動名稱/事由</label>
<input type="text" class="form-control" v-model="mainData.活動名稱事由" v-bind:disabled="isViewMode">
</div>
</div>
</div>
<div class="row g-3">
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">建檔人員日期</label>
<input type="text" class="form-control" readonly v-bind:value="`${mainData.DB_CRUSR} ${mainData.DB_CRUSR_NAME} ${mainData.DB_CRDAT}`" />
</div>
</div>
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">更正人員日期</label>
<input type="text" class="form-control" readonly v-bind:value="`${mainData.DB_TRUSR} ${mainData.DB_TRUSR_NAME} ${mainData.DB_TRDAT}`" />
</div>
</div>
</div>
</div>
</div>
<div class="control-panel card mb-3">
<div class="card-header">
<div class="header-content">
<span>講師 / 勞務費</span>
<span v-if="laborData.作廢 === 1" class="void-badge">已作廢</span>
</div>
<button type="button"
class="button blue120"
v-on:click="searchInstructorEvaluation"
v-bind:disabled="loading">
查詢講師評鑑
</button>
<button v-if="isViewMode && laborData.編號"
type="button"
class="button red120"
v-on:click="voidLaborFee"
v-bind:disabled="!canEdit || loading || closed"
>
{{ laborData.作廢 === 1 ? '取消作廢勞務費' : '作廢勞務費' }}
</button>
</div>
<div class="card-body">
<template v-if="laborWarnings.length > 0">
<div class="alert alert-warning mb-3">
<i class="icon-warning"></i>
<ul class="alert-list">
<li v-for="(warning, index) in laborWarnings" v-bind:key="index">{{warning}}</li>
</ul>
</div>
</template>
<div class="row g-3">
<div class="col-md-2">
<div class="field-wrapper">
<label class="form-label">領據編號</label>
<span><b>{{laborData.編號 || "無"}}</b></span>
</div>
</div>
<div class="col-md-3">
<div class="field-wrapper">
<label class="form-label">費用別</label>
<select class="form-select" v-model="laborData.費用別" v-bind:disabled="isViewMode">
<option v-for="item in dropdown.勞務費_費用別" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="field-wrapper">
<label class="form-label">扣繳類別</label>
<select class="form-select" v-model="laborData.扣繳類別" v-on:change="calculateTax" v-bind:disabled="isViewMode">
<option v-for="item in dropdown.扣繳類別" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
</div>
<div class="row g-3">
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">單價</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">數量</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">單位</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">合計金額</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">應扣繳稅額</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">服務費</label>
</div>
</div>
</div>
<div class="row g-3">
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="laborData.單價" v-on:input="calculateLaborTotal" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" step="0.01" class="form-control" v-model.number="laborData.數量" v-on:input="calculateLaborTotal" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<select class="form-select" v-model="laborData.單位" v-bind:disabled="isViewMode">
<option v-for="item in dropdown.單位別" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="laborData.合計金額" readonly v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="laborData.應扣繳稅額" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="laborData.服務費" v-bind:disabled="isViewMode">
</div>
</div>
</div>
</div>
</div>
<div class="control-panel card mb-3">
<div class="card-header">
<div class="header-content">
<span>差旅費</span>
<span v-if="travelData.作廢 === 1" class="void-badge">已作廢</span>
</div>
<button v-if="isViewMode && travelData.編號"
type="button"
class="button red120"
v-on:click="voidTravelFee"
v-bind:disabled="!canEdit || loading || closed"
>
{{ travelData.作廢 === 1 ? '取消作廢差旅費' : '作廢差旅費' }}
</button>
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-md-2">
<div class="field-wrapper">
<label class="form-label">領據編號</label>
<span><b>{{travelData.編號 || "無"}}</b></span>
</div>
</div>
<div class="col-md-8">
<div class="field-wrapper">
<label class="form-label">票價資訊</label>
<div class="input-with-button">
<button type="button" class="btn-phrase" v-on:click="toggleTicketPricePhrase" v-bind:disabled="isViewMode">片語</button>
<input type="text" class="form-control" v-model="travelData.票價資訊" v-bind:disabled="isViewMode" ref="票價資訊Input">
<ul v-show="showTicketPricePhrase" class="phrase-dropdown">
<li v-for="phrase in ticketPricePhrases" v-bind:key="phrase" v-on:click="insertPhrase('票價資訊', phrase)" class="phrase-item">
{{phrase}}
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row g-3">
<div class="col-md-3">
<div class="field-wrapper">
<label class="form-label">費用別</label>
<select class="form-select" v-model="travelData.費用別" v-bind:disabled="isViewMode">
<option v-for="item in dropdown.差旅費_費用別" v-bind:key="item.Value" v-bind:value="item.Value">{{item.Name}}</option>
</select>
</div>
</div>
<div class="col-md-3">
<div class="field-wrapper">
<label class="form-label">起點</label>
<div class="autocomplete-wrapper">
<input type="text" class="form-control" v-model="travelData.起點" v-on:input="searchOriginStation" v-on:focus="showOriginDropdown = true" v-on:blur="hideOriginDropdown" v-bind:disabled="isViewMode">
<ul v-show="showOriginDropdown && originStations.length > 0" class="autocomplete-dropdown">
<li v-for="station in originStations" v-bind:key="station.Value" v-on:click="selectOriginStation(station)" class="autocomplete-item">
<div class="item-name">{{station.Name}}</div>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-3">
<div class="field-wrapper">
<label class="form-label">訖點</label>
<div class="autocomplete-wrapper">
<input type="text" class="form-control" v-model="travelData.訖點" v-on:input="searchDestStation" v-on:focus="showDestDropdown = true" v-on:blur="hideDestDropdown" v-bind:disabled="isViewMode">
<ul v-show="showDestDropdown && destStations.length > 0" class="autocomplete-dropdown">
<li v-for="station in destStations" v-bind:key="station.Value" v-on:click="selectDestStation(station)" class="autocomplete-item">
<div class="item-name">{{station.Name}}</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row g-3">
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">捷運/公車</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">火車</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">計程車</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">高鐵/飛機</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">自行開車</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">過路費/停車費</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">住宿費</label>
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<label class="form-label">合計金額</label>
</div>
</div>
</div>
<div class="row g-3">
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="travelData.捷運公車" v-on:input="calculateTravelTotal" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="travelData.火車" v-on:input="calculateTravelTotal" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="travelData.計程車" v-on:input="calculateTravelTotal" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="travelData.高鐵飛機" v-on:input="calculateTravelTotal" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="travelData.自行開車" v-on:input="calculateTravelTotal" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="travelData.過路費停車費" v-on:input="calculateTravelTotal" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="travelData.住宿費" v-on:input="calculateTravelTotal" v-bind:disabled="isViewMode">
</div>
</div>
<div class="travel-fee-col">
<div class="field-wrapper">
<input type="number" class="form-control" v-model.number="travelData.合計" readonly v-bind:disabled="isViewMode">
</div>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Newtonsoft.Json;
namespace Education.Forms.
{
public partial class : UserControlBase
{
protected void Page_Load(object sender, EventArgs e)
{
Page.ClientScript.RegisterClientScriptInclude("領據處理", ResolveClientUrl($"~/Scripts/領據處理.js?v={PublicVariable.SystemVersion}"));
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "CreateReceiptEditApp", "CreateReceiptEditApp();", true);
}
}
}
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
}
}
@@ -0,0 +1,57 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="領據資料作業.aspx.cs" Inherits="Education.Forms.領據系統.領據資料作業" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
<%@ Register Src="~/Forms/領據系統/領據查詢.ascx" TagPrefix="uc1" TagName="領據查詢" %>
<%@ Register Src="~/Forms/領據系統/領據處理.ascx" TagPrefix="uc1" TagName="領據處理" %>
<%@ Register Src="~/Forms/領據系統/領據匯出匯入.ascx" TagPrefix="uc1" TagName="領據匯出匯入" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<!-- 從查詢頁帶表單編號給編輯頁 -->
<asp:HiddenField runat="server" ID="hid編號"></asp:HiddenField>
<!-- 保留查詢結果 -->
<asp:HiddenField runat="server" ID="hid計畫代號"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hid計畫名稱"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hid活動日期_1"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hid活動日期_2"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hid身分別"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hid憑證類別"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hid活動類別"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hid付款方式"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hid領款人姓名"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hidCurrentPage"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hidPageSize"></asp:HiddenField>
<asp:HiddenField runat="server" ID="hidIdList" />
<asp:HiddenField runat="server" ID="hidNavTotalPages" />
<asp:LinkButton ID="btnTab1" runat="server"
CssClass="tabButtonSelected">查詢</asp:LinkButton>
<asp:LinkButton ID="btnTab2" runat="server"
CssClass="tabButton">處理</asp:LinkButton>
<asp:LinkButton ID="btnTab3" runat="server"
CssClass="tabButton">匯入</asp:LinkButton>
<div style="border-top: solid 1px gray;">
<asp:MultiView ID="MultiView1" runat="server"
ActiveViewIndex="0">
<asp:View ID="View查詢" runat="server">
<uc1:領據查詢 runat="server" id="領據查詢" />
</asp:View>
<asp:View ID="View處理" runat="server">
<uc1:領據處理 runat="server" id="領據處理" />
</asp:View>
<asp:View ID="View匯出匯入" runat="server">
<uc1:領據匯出匯入 runat="server" id="領據匯出匯入" />
</asp:View>
</asp:MultiView>
</div>
</asp:Content>
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Education.Forms.
{
public partial class : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "領據資料查詢登錄";
HelpUrl = "~/Help/領據/領據資料查詢登錄.html";
AddTabButton(MultiView1, 0, btnTab1);
AddTabButton(MultiView1, 1, btnTab2);
AddTabButton(MultiView1, 2, btnTab3);
InitJSVar();
#if DEBUG
Page.ClientScript.RegisterClientScriptInclude("Vue", ResolveClientUrl($"~/Scripts/vue.js?v={PublicVariable.SystemVersion}"));
#else
Page.ClientScript.RegisterClientScriptInclude("Vue", ResolveClientUrl($"~/Scripts/vue.min.js?v={PublicVariable.SystemVersion}"));
#endif
Page.ClientScript.RegisterClientScriptInclude("Axios", ResolveClientUrl($"~/Scripts/axios.min.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("DateMixin", ResolveClientUrl($"~/Scripts/vue-date-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("ToastMixin", ResolveClientUrl($"~/Scripts/vue-toast-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("ApiMixin", ResolveClientUrl($"~/Scripts/api-mixin.js?v={PublicVariable.SystemVersion}"));
Page.ClientScript.RegisterClientScriptInclude("領據資料作業", ResolveClientUrl($"~/Scripts/領據資料作業.js?v={PublicVariable.SystemVersion}"));
ScriptManager.RegisterStartupScript(
this,
this.GetType(),
"destroy_VueApp",
"DestroyVue('receiptEditApp'); DestroyVue('receiptSearchApp');",
true
);
if (!IsPostBack)
{
ActivateTab(MultiView1, 0);
}
else
{
}
}
protected override void LoadViewState(object savedViewState)
{
base.LoadViewState(savedViewState);
Page.ClientScript.RegisterForEventValidation(btnTab1.UniqueID);
Page.ClientScript.RegisterForEventValidation(btnTab2.UniqueID);
Page.ClientScript.RegisterForEventValidation(btnTab3.UniqueID);
}
private void InitJSVar()
{
// Add JavaScript variable initialization here if needed
}
}
}
@@ -0,0 +1,224 @@
//------------------------------------------------------------------------------
// <自動產生>
// 這段程式碼是由工具產生的。
//
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
// 程式碼,則會遺失變更。
// </自動產生>
//------------------------------------------------------------------------------
namespace Education.Forms.
{
public partial class
{
/// <summary>
/// hid編號 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hid編號;
/// <summary>
/// hid計畫代號 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hid計畫代號;
/// <summary>
/// hid計畫名稱 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hid計畫名稱;
/// <summary>
/// hid活動日期_1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hid活動日期_1;
/// <summary>
/// hid活動日期_2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hid活動日期_2;
/// <summary>
/// hid身分別 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hid身分別;
/// <summary>
/// hid憑證類別 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hid憑證類別;
/// <summary>
/// hid活動類別 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hid活動類別;
/// <summary>
/// hid付款方式 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hid付款方式;
/// <summary>
/// hidCurrentPage 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hidCurrentPage;
/// <summary>
/// hidPageSize 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hidPageSize;
/// <summary>
/// hidIdList 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hidIdList;
/// <summary>
/// hidNavTotalPages 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hidNavTotalPages;
/// <summary>
/// btnTab1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab1;
/// <summary>
/// btnTab2 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab2;
/// <summary>
/// btnTab3 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnTab3;
/// <summary>
/// MultiView1 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.MultiView MultiView1;
/// <summary>
/// View查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View查詢;
/// <summary>
/// 領據查詢 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::Education.Forms.. ;
/// <summary>
/// View處理 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View處理;
/// <summary>
/// 領據處理 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::Education.Forms.. ;
/// <summary>
/// View匯出匯入 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::System.Web.UI.WebControls.View View匯出匯入;
/// <summary>
/// 領據匯出匯入 控制項。
/// </summary>
/// <remarks>
/// 自動產生的欄位。
/// 若要修改,請將欄位宣告從設計工具檔案移到程式碼後置檔案。
/// </remarks>
protected global::Education.Forms.. ;
}
}