99 lines
4.4 KiB
Plaintext
99 lines
4.4 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="detail.aspx.cs" Inherits="admin_ancestraltablet_ancestraltabletuselist_detail" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" Runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" Runat="Server">
|
|
<nav>
|
|
<a :href="'edit.aspx?registrantCode=' + registrantCode" class="btn btn-primary">修改資料</a>
|
|
</nav>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
|
|
<div>
|
|
{{registrantCode}}
|
|
</div>
|
|
<div>
|
|
<div class="card">
|
|
<h2>登記人資訊</h2>
|
|
<p><strong>登記編碼:</strong> {{ registrant.registrantCode }}</p>
|
|
<p><strong>姓名:</strong> {{ registrant.name }}</p>
|
|
<p><strong>電話:</strong> {{ registrant.phone }}</p>
|
|
<p><strong>地址:</strong> {{ registrant.address }}</p>
|
|
<p><strong>登記日期:</strong> {{ formatDate(registrant.registerDate) }}</p>
|
|
<div style="border: 1px solid #007bff; background-color: #f0f8ff; padding: 10px 15px; border-radius: 5px; display: flex; flex-direction: column; gap: 5px; max-width: 400px; margin-bottom: 10px;">
|
|
<div>
|
|
<label style="font-weight: bold; margin-right: 5px;">已選擇位置:</label>
|
|
<span>{{ registrant?.positionName || '未選擇' }}</span>
|
|
</div>
|
|
</div>
|
|
<p><strong>價格:</strong> {{ registrant.price }}</p>
|
|
<p><strong>開始日期:</strong> {{ formatDate(registrant.startDate) }}</p>
|
|
<p><strong>結束日期:</strong> {{ formatDate(registrant.endDate) }}</p>
|
|
<p><strong>是否長期:</strong> {{ registrant.isLongTerm ? '是' : '否' }}</p>
|
|
<p><strong>是否啟用:</strong> {{ registrant.isActive ? '是' : '否' }}</p>
|
|
</div>
|
|
|
|
<div class="card" v-if="registrant.tabletRecord">
|
|
<h2>牌位資料</h2>
|
|
<p><strong>記錄ID:</strong> {{ registrant.tabletRecord.recordId }}</p>
|
|
<p><strong>登記編碼:</strong> {{ registrant.tabletRecord.registrantCode }}</p>
|
|
|
|
<p><strong>牌位標題:</strong> {{ registrant.tabletRecord.npTitle }}</p>
|
|
<p><strong>立牌日期:</strong> {{ formatDate(registrant.tabletRecord.npStandDate) }}</p>
|
|
<p><strong>陽上:</strong> {{ registrant.tabletRecord.npYangShang }}</p>
|
|
<p><strong>內牌內容:</strong> {{ registrant.tabletRecord.wpContent }}</p>
|
|
</div>
|
|
|
|
<div class="card" v-else>
|
|
<h2>牌位資料</h2>
|
|
<p>暫無牌位資料</p>
|
|
</div>
|
|
</div>
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" Runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
|
|
<script>
|
|
new Vue({
|
|
el: '#app',
|
|
vuetify: new Vuetify(vuetify_options),
|
|
data() {
|
|
return {
|
|
registrantCode: '<%=Request.QueryString["registrantCode"]%>',
|
|
registrant: {}
|
|
}
|
|
},
|
|
methods: {
|
|
formatDate(dateStr) {
|
|
if (!dateStr) return "";
|
|
const date = new Date(dateStr);
|
|
return date.toLocaleDateString();
|
|
},
|
|
getRegistrantByCodeMethod(code) {
|
|
axios.get(HTTP_HOST + 'api/ancestraltablet/registrant/getbycode', {
|
|
params: {
|
|
registrantCode: code
|
|
}
|
|
})
|
|
.then((res => {
|
|
this.registrant = res.data
|
|
}))
|
|
.catch((error => {
|
|
|
|
}))
|
|
}
|
|
},
|
|
mounted() {
|
|
this.getRegistrantByCodeMethod(this.registrantCode);
|
|
}
|
|
})
|
|
</script>
|
|
<style>
|
|
.card {
|
|
border: 1px solid #ccc;
|
|
padding: 15px;
|
|
margin-bottom: 20px;
|
|
border-radius: 5px;
|
|
background-color: #fafafa;
|
|
}
|
|
</style>
|
|
</asp:Content> |