Files
2026-11-06 18:06:50 +08:00

176 lines
6.0 KiB
Plaintext

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="admin_guadan_index" %>
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" Runat="Server">
<script src="/js/httpVueLoader.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" Runat="Server">
<%-- <nav>
<a href="create.aspx" class="btn btn-primary" >新增</a>
</nav>
<div class="d-flex align-items-center gap-3">
<label class="mb-0">掛單單號</label>
<input class="form-control w-auto" style="width:150px;" v-model="search.guaDanOrderNo" />
<label class="mb-0">掛單登記人</label>
<input class="form-control w-auto" style="width:150px;" v-model="search.guadanUser" />
<label class="mb-0">開始時間</label>
<input class="form-control w-auto" style="width:150px;" type="date" v-model="search.startDate" />
<label class="mb-0">結束時間</label>
<input class="form-control w-auto" style="width:150px;" type="date" v-model="search.endDate" />
<button class="btn btn-primary" type="button" @click="handleSearch">查詢</button>
<button class="btn btn-outline-primary" type="button" @click="clearSearch">清除條件</button>
</div>--%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="content" class="container-fluid py-4">
<keep-alive>
<component :is="currentView" :form-data="$data"
:num="twoData"
@custom-event="changeView">
</component>
</keep-alive>
<template>
<v-dialog
v-model="dialog"
min-width="85%"
max-width="95%"
min-height="900"
max-height="95%"
hide-overlay
transition="dialog-bottom-transition">
<v-card>
<v-toolbar dark color="primary">
<v-btn icon dark @click="dialog = false">
<v-icon>mdi-close</v-icon>
</v-btn>
<v-toolbar-title>掛單作業</v-toolbar-title>
</v-toolbar>
<v-card-text>
<apply-component v-if="dialog" @close="dialog = false" />
</v-card-text>
</v-card>
</v-dialog>
<v-dialog
v-model="viewdialog"
min-width="85%"
max-width="95%"
min-height="900"
max-height="95%"
hide-overlay
transition="dialog-bottom-transition">
<v-card>
<v-toolbar dark color="primary">
<v-btn icon dark @click="viewdialog = false">
<v-icon>mdi-close</v-icon>
</v-btn>
<v-toolbar-title>掛單作業</v-toolbar-title>
</v-toolbar>
<v-card-text>
<view-component v-if="viewdialog" @close="viewdialog = false" :form-Data="formData" />
</v-card-text>
</v-card>
</v-dialog>
<v-dialog
v-model="editdialog"
min-width="85%"
max-width="95%"
min-height="900"
max-height="95%"
hide-overlay
transition="dialog-bottom-transition">
<v-card>
<v-toolbar dark color="primary">
<v-btn icon dark @click="editdialog = false">
<v-icon>mdi-close</v-icon>
</v-btn>
<v-toolbar-title>掛單作業</v-toolbar-title>
</v-toolbar>
<v-card-text>
<edit-component v-if="editdialog" @close="editdialog = false" :form-Data="formData" />
</v-card-text>
</v-card>
</v-dialog>
</template>
</div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
<script>
let VueApp = new Vue({
el: '#app',
vuetify: new Vuetify(),
mounted() {
},
data() {
return {
dialog: false,
viewdialog: false,
editdialog: false,
notifications: false,
sound: true,
widgets: false,
currentView: 'main-component',
twoData: {},
formData: null,
};
},
components: {
'main-component': httpVueLoader('./main.vue'),
'apply-component': httpVueLoader('./apply.vue'),
'view-component': httpVueLoader('./view.vue'),
'edit-component': httpVueLoader('./edit.vue'),
},
watch: {
options: {
handler() {
},
deep: true,
},
},
methods: {
changeView(item) {
console.log("index changeView", item);
if (item.action === "new") {
console.log("go to new");
this.dialog = true;
} else if (item.action === "view") {
console.log("go to view", item.item);
this.formData = item.item.uuid;
//Object.assign(this.formData , item.item);
this.viewdialog = true;
} else if (item.action === "edit") {
//修改只能改主檔,明細要個別新增或個別修改
console.log("go to edit");
this.formData = item.item.uuid;
this.editdialog = true;
}
}
},
computed: {
}
});
</script>
<style>
.row-timeout {
background-color: #ffdddd !important;
}
</style>
</asp:Content>