修正調整很多東西
This commit is contained in:
@@ -1053,6 +1053,105 @@ public class activityController : ApiController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Route("api/activity/GetActRelaList1")]
|
||||||
|
public IHttpActionResult GetActRelaList1([FromBody] Model.activity q,string order_no,int actItem_num)
|
||||||
|
{ //if pagesize==-1 get all data
|
||||||
|
int this_act_id = q.num;
|
||||||
|
if (this_act_id > 0)
|
||||||
|
{
|
||||||
|
//檢查
|
||||||
|
var prod = _db.activities.Where(o => o.num == this_act_id).FirstOrDefault();
|
||||||
|
if (prod != null)
|
||||||
|
{
|
||||||
|
int kind = prod.kind ?? 0; //分類
|
||||||
|
|
||||||
|
var qry = _db.activity_relating.AsQueryable();
|
||||||
|
qry = qry.Where(o => o.activity_num == this_act_id);
|
||||||
|
qry = qry.OrderBy(o => o.num);
|
||||||
|
//IEnumerable<Model.activity_relating> qry1=qry.AsEnumerable();
|
||||||
|
IEnumerable<Model.activity_relating> qry1 = null;
|
||||||
|
|
||||||
|
//var retD = qry1;
|
||||||
|
var count = qry.Count(); //pageSize = count;//一次取回??
|
||||||
|
if (count > 0)
|
||||||
|
{
|
||||||
|
int i = 1;
|
||||||
|
|
||||||
|
qry1 = qry.ToList();
|
||||||
|
|
||||||
|
var orderDetails = _db.pro_order_detail
|
||||||
|
.Where(o => o.pro_order.activity_num == this_act_id&&o.order_no==order_no&&o.actItem_num==actItem_num)
|
||||||
|
.ToList();
|
||||||
|
var ret = new
|
||||||
|
{
|
||||||
|
//list = qry1.ToPagedList(page, pageSize).Select(x => new
|
||||||
|
list = qry1.Select(x => new
|
||||||
|
{
|
||||||
|
id = i++,
|
||||||
|
num = x.num,
|
||||||
|
|
||||||
|
activity_num = x.activity_num,
|
||||||
|
act_item_selected = new
|
||||||
|
{
|
||||||
|
text = x.actItem?.subject,
|
||||||
|
val = x.actItem_num,
|
||||||
|
style = x.actItem.defaultStyle
|
||||||
|
},
|
||||||
|
price = x.price ?? 0,
|
||||||
|
qty = x.qty ?? 0,
|
||||||
|
has_yang_limit = x.has_yang_limit ?? false,
|
||||||
|
has_chao_limit = x.has_yang_limit ?? false,
|
||||||
|
yang_limit_count = x.yang_limit_count ?? 0,
|
||||||
|
chao_limit_count = x.chao_limit_count ?? 0,
|
||||||
|
files = x.actItem?.actItem_files.Select(f => new
|
||||||
|
{
|
||||||
|
num = f.file.num,
|
||||||
|
subject = f.file.subject,
|
||||||
|
list = orderDetails
|
||||||
|
.Where(o => o.actItem_num == x.actItem_num)
|
||||||
|
.OrderBy(o => o.print_id)
|
||||||
|
.ThenBy(o => o.num)
|
||||||
|
.Select(o => new
|
||||||
|
{
|
||||||
|
num = o.num,
|
||||||
|
print_id = o.print_id,
|
||||||
|
order_no = o.order_no,
|
||||||
|
from_id = o.follower1?.u_name,
|
||||||
|
printed_files = o.printed_files,
|
||||||
|
isPrinted = (o.printed_files ?? "").Contains("\"" + f.file.num.ToString() + "\""),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
count = count,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if (ret.list == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||||
|
return Ok(ret);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Ok(new {result="N",message="沒有資料"});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//return NotFound();
|
||||||
|
return Ok(new { result = "N", message = $"找不到活動 {q.num}" });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("api/activity/GetActRelaList")]
|
[Route("api/activity/GetActRelaList")]
|
||||||
public IHttpActionResult GetActRelaList([FromBody] Model.activity q, int page, int pageSize = 100,
|
public IHttpActionResult GetActRelaList([FromBody] Model.activity q, int page, int pageSize = 100,
|
||||||
|
|||||||
@@ -1299,13 +1299,33 @@ public class orderController : ApiController
|
|||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Route("api/order/printMultiFileLogNew")]
|
||||||
|
public IHttpActionResult printMultiFileLogNew([FromBody] List<int> list, int item, int file)
|
||||||
|
{
|
||||||
|
string _num = "\"" + file.ToString() + "\"";
|
||||||
|
|
||||||
|
var order = _db.pro_order_detail.Where(q => list.Any(a => a == q.num)).ToList();
|
||||||
|
if (order.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var row in order)
|
||||||
|
row.printed_files = (row.printed_files ?? "") + _num + ",";
|
||||||
|
|
||||||
|
_db.SaveChanges();
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("api/order/printMultiFileLog")]
|
[Route("api/order/printMultiFileLog")]
|
||||||
public IHttpActionResult printMultiFileLog([FromBody] List<int> list, int item, int file)
|
public IHttpActionResult printMultiFileLog([FromBody] List<int> list, int item, int file)
|
||||||
{
|
{
|
||||||
string _num = "\"" + file.ToString() + "\"";
|
string _num = "\"" + file.ToString() + "\"";
|
||||||
|
|
||||||
var order = _db.pro_order_detail.Where(q => list.Any(a => a == q.num) && !((q.printed_files ?? "").Contains(_num))).ToList();
|
var order = _db.pro_order_detail.Where(q => list.Any(a => a == q.num)
|
||||||
|
&& !((q.printed_files ?? "").Contains(_num))).ToList();
|
||||||
if (order.Count > 0)
|
if (order.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var row in order)
|
foreach (var row in order)
|
||||||
|
|||||||
@@ -206,7 +206,7 @@
|
|||||||
{{ item.dueDate|timeString('YYYY/MM/DD') }}
|
{{ item.dueDate|timeString('YYYY/MM/DD') }}
|
||||||
</template>
|
</template>
|
||||||
<template #item.slot_btn="{ item }">
|
<template #item.slot_btn="{ item }">
|
||||||
<a :href="'reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
|
<a :href="'reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>編輯</a>
|
||||||
<a @click="copyItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>複製</a>
|
<a @click="copyItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>複製</a>
|
||||||
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -454,7 +454,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<template #item.slot_btn="{ item }" >
|
<template #item.slot_btn="{ item }" >
|
||||||
<a v-if="!isEditing" :href="'item_reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
|
<a v-if="!isEditing" :href="'item_reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>編輯</a>
|
||||||
<a v-if="!isEditing" @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
<a v-if="!isEditing" @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
||||||
</template>
|
</template>
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<i class="mdi mdi-sort"></i> 排序選項</asp:LinkButton>
|
<i class="mdi mdi-sort"></i> 排序選項</asp:LinkButton>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="mb-1">
|
<nav class="mb-1">
|
||||||
<asp:Button ID="edit" runat="server" Text="修改" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="add" runat="server" Text="新增" Visible="false" OnClick="add_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="add" runat="server" Text="新增" Visible="false" OnClick="add_Click" CssClass="btn btn-primary" />
|
||||||
|
|
||||||
<asp:PlaceHolder ID="down_table" runat="server">
|
<asp:PlaceHolder ID="down_table" runat="server">
|
||||||
|
|||||||
@@ -583,8 +583,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="edit" runat="server" Text="修改" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="goback" runat="server" Text="回列表" Visible="false" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
<asp:Button ID="goback" runat="server" Text="返回" Visible="false" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
||||||
</div>
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||||
|
|||||||
@@ -343,7 +343,7 @@
|
|||||||
<i class="mdi mdi-sort"></i> 排序選項</asp:LinkButton>
|
<i class="mdi mdi-sort"></i> 排序選項</asp:LinkButton>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="mb-1">
|
<nav class="mb-1">
|
||||||
<asp:Button ID="edit" runat="server" Text="修改" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="add" runat="server" Text="新增" Visible="false" OnClick="add_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="add" runat="server" Text="新增" Visible="false" OnClick="add_Click" CssClass="btn btn-primary" />
|
||||||
|
|
||||||
<asp:PlaceHolder ID="down_table" runat="server">
|
<asp:PlaceHolder ID="down_table" runat="server">
|
||||||
|
|||||||
@@ -1036,8 +1036,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="edit" runat="server" Text="修改" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="goback" runat="server" Text="取消" Visible="true" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
<asp:Button ID="goback" runat="server" Text="返回" Visible="true" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
||||||
</div>
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #item.slot_btn="{ item }">
|
<template #item.slot_btn="{ item }">
|
||||||
<a :href="'reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
|
<a :href="'reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>編輯</a>
|
||||||
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
||||||
</template>
|
</template>
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="edit" runat="server" Text="修改" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="goback" runat="server" Text="回列表" Visible="false" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
<asp:Button ID="goback" runat="server" Text="返回" Visible="false" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
||||||
</div>
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||||
|
|||||||
@@ -158,6 +158,7 @@
|
|||||||
|
|
||||||
this.search_dialog.current = this.search_dialog.controls.search1 ///default
|
this.search_dialog.current = this.search_dialog.controls.search1 ///default
|
||||||
this.initPrintSearch();
|
this.initPrintSearch();
|
||||||
|
this.getList();
|
||||||
|
|
||||||
const navEntries = performance.getEntriesByType("navigation");
|
const navEntries = performance.getEntriesByType("navigation");
|
||||||
const isReload = navEntries.length > 0 && navEntries[0].type === "reload";
|
const isReload = navEntries.length > 0 && navEntries[0].type === "reload";
|
||||||
@@ -498,7 +499,7 @@
|
|||||||
$btn.click();
|
$btn.click();
|
||||||
let el = document.getElementById('offcanvasRight');
|
let el = document.getElementById('offcanvasRight');
|
||||||
let offcanvas = bootstrap.Offcanvas.getOrCreateInstance(el);
|
let offcanvas = bootstrap.Offcanvas.getOrCreateInstance(el);
|
||||||
offcanvas.show();
|
//offcanvas.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -543,7 +544,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #item.slot_btn="{ item }">
|
<template #item.slot_btn="{ item }">
|
||||||
<a :href="'reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
|
<a :href="'reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>編輯</a>
|
||||||
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
||||||
</template>
|
</template>
|
||||||
<template #item.order_record="{item}">
|
<template #item.order_record="{item}">
|
||||||
|
|||||||
@@ -1735,7 +1735,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary edit_Click noedit" />
|
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary edit_Click noedit" />
|
||||||
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary edit_Click noedit" />
|
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary edit_Click noedit" />
|
||||||
<asp:Button ID="goback" runat="server" Text="取消" Visible="true" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
<asp:Button ID="goback" runat="server" Text="返回" Visible="true" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
||||||
</div>
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||||
@@ -1760,9 +1760,9 @@
|
|||||||
<button class="nav-link" id="sec2-tab3" data-bs-toggle="tab" data-bs-target="#sec2-page3"
|
<button class="nav-link" id="sec2-tab3" data-bs-toggle="tab" data-bs-target="#sec2-page3"
|
||||||
type="button" role="tab" aria-controls="profile" aria-selected="false" v-if="lists.length > 0">
|
type="button" role="tab" aria-controls="profile" aria-selected="false" v-if="lists.length > 0">
|
||||||
未付款紀錄 </button>
|
未付款紀錄 </button>
|
||||||
<button class="nav-link" id="sec2-tab4" data-bs-toggle="tab" data-bs-target="#sec2-page4"
|
<%--<button class="nav-link" id="sec2-tab4" data-bs-toggle="tab" data-bs-target="#sec2-page4"
|
||||||
type="button" role="tab" aria-controls="profile" aria-selected="false" display="none">
|
type="button" role="tab" aria-controls="profile" aria-selected="false" display="none">
|
||||||
牌位標題 </button>
|
牌位標題 </button>--%>
|
||||||
<button class="nav-link" id="sec2-tab5" data-bs-toggle="tab" data-bs-target="#sec2-page5"
|
<button class="nav-link" id="sec2-tab5" data-bs-toggle="tab" data-bs-target="#sec2-page5"
|
||||||
type="button" role="tab" aria-controls="profile" aria-selected="false">
|
type="button" role="tab" aria-controls="profile" aria-selected="false">
|
||||||
全年報名 </button>
|
全年報名 </button>
|
||||||
@@ -2278,15 +2278,11 @@
|
|||||||
</v-data-table>
|
</v-data-table>
|
||||||
</v-card>
|
</v-card>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="sec2-page4" role="tabpanel" aria-labelledby="sec2-tab4" >
|
<%--<div class="tab-pane fade" id="sec2-page4" role="tabpanel" aria-labelledby="sec2-tab4" >
|
||||||
<v-card class="mx-auto" outlined v-if="follower_id!=''">
|
<v-card class="mx-auto" outlined v-if="follower_id!=''">
|
||||||
<v-data-table
|
<v-data-table
|
||||||
:headers="tabletTable.headersDetail"
|
:headers="tabletTable.headersDetail"
|
||||||
:items="filteredTabletItems"
|
:items="filteredTabletItems"
|
||||||
<%--:footer-props="footersDetail"--%>
|
|
||||||
<%--
|
|
||||||
:items="tabletTable.desserts"
|
|
||||||
--%>
|
|
||||||
:search="tabletTable.searchDetail"
|
:search="tabletTable.searchDetail"
|
||||||
:loading="tabletTable.Loading"
|
:loading="tabletTable.Loading"
|
||||||
:options.sync="tabletsDetail" class="elevation-1" fixed-header height="350px">
|
:options.sync="tabletsDetail" class="elevation-1" fixed-header height="350px">
|
||||||
@@ -2362,7 +2358,7 @@
|
|||||||
|
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
</v-card>
|
</v-card>
|
||||||
</div>
|
</div>--%>
|
||||||
<div class="tab-pane fade" id="sec2-page5" role="tabpanel" aria-labelledby="sec2-tab5" >
|
<div class="tab-pane fade" id="sec2-page5" role="tabpanel" aria-labelledby="sec2-tab5" >
|
||||||
<v-card class="mx-auto" outlined v-if="follower_id!=''">
|
<v-card class="mx-auto" outlined v-if="follower_id!=''">
|
||||||
<v-data-table class="elevation-1" fixed-header
|
<v-data-table class="elevation-1" fixed-header
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<a class="" style="cursor:pointer;text-decoration: none;color:white;width:30px;height:30px;font-size:30px;"
|
<a class="" style="cursor:pointer;text-decoration: none;color:white;width:30px;height:30px;font-size:30px;"
|
||||||
title="增加版型" onclick="Designer.changeStyle('000001')">+</a></div>
|
title="增加版型" onclick="Designer.styleID='000001';Designer.changeStyle('000001')">+</a></div>
|
||||||
<div class="col-8"> <input type="text" id="styleName" class="form-control" aria-label="版型名稱"></div>
|
<div class="col-8"> <input type="text" id="styleName" class="form-control" aria-label="版型名稱"></div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<a class="" style="cursor:pointer;text-decoration: none;color:white;width:30px;height:30px;font-size:30px;"
|
<a class="" style="cursor:pointer;text-decoration: none;color:white;width:30px;height:30px;font-size:30px;"
|
||||||
@@ -121,14 +121,14 @@
|
|||||||
</select>
|
</select>
|
||||||
<label for="printSize" style="color: black">列印尺寸</label>
|
<label for="printSize" style="color: black">列印尺寸</label>
|
||||||
</div>
|
</div>
|
||||||
<%--<div class="form-floating mb-3">
|
<div class="form-floating mb-3">
|
||||||
<select class="form-select form-select-sm mb-2 " onchange="Designer.changePrintMode()" id="printMode">
|
<select class="form-select form-select-sm mb-2 " onchange="Designer.changePrintMode()" id="printMode">
|
||||||
<option value="">請選擇</option>
|
<option value="">請選擇</option>
|
||||||
<option value="combine">合併</option>
|
<option value="combine">合併</option>
|
||||||
<option value="origin">原尺寸</option>
|
<option value="origin">原尺寸</option>
|
||||||
</select>
|
</select>
|
||||||
<label for="printMode" style="color: black">列印模式</label>
|
<label for="printMode" style="color: black">列印模式</label>
|
||||||
</div>--%>
|
</div>
|
||||||
<%-- <div class="form-floating mb-3">
|
<%-- <div class="form-floating mb-3">
|
||||||
<input type="number" id="rosterLimit" onchange="Designer.changeRosterLimit()" class="form-control form-control-sm mb-2">
|
<input type="number" id="rosterLimit" onchange="Designer.changeRosterLimit()" class="form-control form-control-sm mb-2">
|
||||||
<label class="small" for="rosterLimit" style="color: black;">正名上限</label>
|
<label class="small" for="rosterLimit" style="color: black;">正名上限</label>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<label>查詢條件</label>
|
<label>查詢條件</label>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="8" sm="8" md="2">
|
<v-col cols="8" sm="8" md="2">
|
||||||
<v-btn @click.prevent='fast_signup' class="ms-auto">快速報名</v-btn>
|
<!--<v-btn @click.prevent='fast_signup' class="ms-auto">快速報名</v-btn>-->
|
||||||
<v-btn @click.prevent="back01()" class="ms-auto">返回</v-btn>
|
<v-btn @click.prevent="back01()" class="ms-auto">返回</v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
year: '',
|
year: '',
|
||||||
month: '',
|
month: '',
|
||||||
season: '',
|
season: '',
|
||||||
chk_hasact: false,
|
chk_hasact: true,
|
||||||
chk_noact: false,
|
chk_noact: false,
|
||||||
select_act: '',
|
select_act: '',
|
||||||
select_actitem: '',
|
select_actitem: '',
|
||||||
@@ -217,6 +217,7 @@
|
|||||||
this.search.activity_num = this.this_act;
|
this.search.activity_num = this.this_act;
|
||||||
this.initPrintSearch();
|
this.initPrintSearch();
|
||||||
this.initActivity();
|
this.initActivity();
|
||||||
|
this.getDefault();
|
||||||
const navEntries = performance.getEntriesByType("navigation");
|
const navEntries = performance.getEntriesByType("navigation");
|
||||||
const isReload = navEntries.length > 0 && navEntries[0].type === "reload";
|
const isReload = navEntries.length > 0 && navEntries[0].type === "reload";
|
||||||
|
|
||||||
@@ -247,7 +248,7 @@
|
|||||||
this.isSearched = true;
|
this.isSearched = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (printResult === 'nodata' || printResult === 'success') {
|
if (printResult === 'nodata' || printResult === 'success') {
|
||||||
|
|
||||||
|
|
||||||
@@ -266,6 +267,7 @@
|
|||||||
window.history.replaceState({}, '', cleanUrl);
|
window.history.replaceState({}, '', cleanUrl);
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
options: {
|
options: {
|
||||||
@@ -700,7 +702,7 @@
|
|||||||
$btn.click();
|
$btn.click();
|
||||||
let el = document.getElementById('offcanvasRight');
|
let el = document.getElementById('offcanvasRight');
|
||||||
let offcanvas = bootstrap.Offcanvas.getOrCreateInstance(el);
|
let offcanvas = bootstrap.Offcanvas.getOrCreateInstance(el);
|
||||||
offcanvas.show();
|
//offcanvas.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -747,7 +749,7 @@
|
|||||||
<a v-if="item.f_num != null && item.activity_num != null && item.status == 1" class="btn btn-outline-secondary btn-sm opacity-50" style="pointer-events: none" ><i class="mdi mdi-account-check"></i>已報到</a>
|
<a v-if="item.f_num != null && item.activity_num != null && item.status == 1" class="btn btn-outline-secondary btn-sm opacity-50" style="pointer-events: none" ><i class="mdi mdi-account-check"></i>已報到</a>
|
||||||
</template>
|
</template>
|
||||||
<template #item.slot_btn="{ item }">
|
<template #item.slot_btn="{ item }">
|
||||||
<a :href="'reg.aspx?order_no='+item.order_no" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
|
<a :href="'reg.aspx?order_no='+item.order_no" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>編輯</a>
|
||||||
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
||||||
</template>
|
</template>
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
@@ -877,11 +879,11 @@
|
|||||||
<span class="fs-6 text text-dark">活動 *</span>
|
<span class="fs-6 text text-dark">活動 *</span>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col :cols="10" class="pt-5" >
|
<v-col :cols="10" class="pt-5" >
|
||||||
活動/非活動至少勾選一項
|
<%--活動/非活動至少勾選一項
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-model="print_search.chk_noact"
|
v-model="print_search.chk_noact"
|
||||||
:label="`非活動報名`"
|
:label="`非活動報名`"
|
||||||
></v-checkbox>
|
></v-checkbox> --%>
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-model="print_search.chk_hasact"
|
v-model="print_search.chk_hasact"
|
||||||
:label="`活動報名`"
|
:label="`活動報名`"
|
||||||
|
|||||||
@@ -859,7 +859,7 @@
|
|||||||
isValidDate = Date.parse(item.pay_date);
|
isValidDate = Date.parse(item.pay_date);
|
||||||
if (!isNaN(isValidDate))
|
if (!isNaN(isValidDate))
|
||||||
item.pay_date = new Date(item.pay_date).format("yyyy-MM-dd")
|
item.pay_date = new Date(item.pay_date).format("yyyy-MM-dd")
|
||||||
console.log(item);
|
|
||||||
this.editedItem = $.extend(true, {}, item);
|
this.editedItem = $.extend(true, {}, item);
|
||||||
this.data_dialog.show = true;
|
this.data_dialog.show = true;
|
||||||
this.data_dialog.isAddNew = false;
|
this.data_dialog.isAddNew = false;
|
||||||
@@ -869,6 +869,43 @@
|
|||||||
this.editedIndex = this.desserts.indexOf(item);
|
this.editedIndex = this.desserts.indexOf(item);
|
||||||
this.editedItem = $.extend(true, {}, item);
|
this.editedItem = $.extend(true, {}, item);
|
||||||
this.file_dialog.show = true;
|
this.file_dialog.show = true;
|
||||||
|
},
|
||||||
|
printItemNew(item) {
|
||||||
|
let list = [{
|
||||||
|
num: item.num, print_id: item.print_id, order_no: item.order_no, from_id: item.from_id,
|
||||||
|
printed_files: item.printed_files
|
||||||
|
}]
|
||||||
|
let list_count = 1;
|
||||||
|
|
||||||
|
//// 送出列印
|
||||||
|
let _url = HTTP_HOST + 'admin/print/print_multi_new.aspx';
|
||||||
|
var form = document.createElement("form");
|
||||||
|
form.method = "POST";
|
||||||
|
form.action = _url;
|
||||||
|
form.target = "_blank"; // Open the result in a new tab
|
||||||
|
// Helper function to add hidden fields
|
||||||
|
const addHiddenField = (name, value) => {
|
||||||
|
const hiddenField = document.createElement("input");
|
||||||
|
hiddenField.type = "hidden";
|
||||||
|
hiddenField.name = name;
|
||||||
|
hiddenField.value = value;
|
||||||
|
form.appendChild(hiddenField);
|
||||||
|
};
|
||||||
|
// Add form fields
|
||||||
|
console.log(item.actitem_num_selected, item.num, JSON.stringify(list));
|
||||||
|
addHiddenField("item", item.actitem_num_selected.val);
|
||||||
|
addHiddenField("file", item.num);
|
||||||
|
addHiddenField("list", JSON.stringify(list));
|
||||||
|
addHiddenField("title", `${item.actitem_num_selected} / ${item.subject}`);
|
||||||
|
//console.log("底家:",this.data_table.selected);
|
||||||
|
localStorage.setItem("item", item.actitem_num_selected.val);
|
||||||
|
localStorage.setItem("list", JSON.stringify(list));
|
||||||
|
|
||||||
|
document.body.appendChild(form); // Not entirely sure if this is necessary
|
||||||
|
form.submit();
|
||||||
|
document.body.removeChild(form);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async editTabletNew(item) {
|
async editTabletNew(item) {
|
||||||
this.editedIndex = this.desserts.indexOf(item);
|
this.editedIndex = this.desserts.indexOf(item);
|
||||||
@@ -1849,6 +1886,14 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function validateHiddenField(sender, args) {
|
||||||
|
// 透過 ClientID 取得 HiddenField 的值
|
||||||
|
var hiddenValue = document.getElementById('<%= activity_num.ClientID %>').value;
|
||||||
|
|
||||||
|
// 如果值不為空,則驗證通過 (true)
|
||||||
|
args.IsValid = (hiddenValue.trim() !== "");
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="page_nav" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="page_nav" runat="Server">
|
||||||
@@ -1858,8 +1903,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="edit" runat="server" Text="修改" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary" />
|
||||||
<asp:Button ID="goback" runat="server" Text="取消" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
<asp:Button ID="goback" runat="server" Text="返回" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
||||||
</div>
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||||
@@ -1876,7 +1921,7 @@
|
|||||||
type="button" role="tab" aria-controls="profile" aria-selected="false">
|
type="button" role="tab" aria-controls="profile" aria-selected="false">
|
||||||
報名明細</button>
|
報名明細</button>
|
||||||
<button class="nav-link" id="sec2-tab5" data-bs-toggle="tab" data-bs-target="#sec2-page5"
|
<button class="nav-link" id="sec2-tab5" data-bs-toggle="tab" data-bs-target="#sec2-page5"
|
||||||
type="button" role="tab" aria-controls="profile" aria-selected="false">
|
type="button" role="tab" aria-controls="profile" aria-selected="false" style="display:none;">
|
||||||
疏文名單</button>
|
疏文名單</button>
|
||||||
<button class="nav-link" id="sec2-tab3" data-bs-toggle="tab" data-bs-target="#sec2-page3"
|
<button class="nav-link" id="sec2-tab3" data-bs-toggle="tab" data-bs-target="#sec2-page3"
|
||||||
type="button" role="tab" aria-controls="profile" aria-selected="false" v-if="lists.length > 0">
|
type="button" role="tab" aria-controls="profile" aria-selected="false" v-if="lists.length > 0">
|
||||||
@@ -1915,7 +1960,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 ">
|
<div class="row mb-1 ">
|
||||||
<label class="col-sm-2 col-lg-1 col-form-label">報名活動</label>
|
<label class="col-sm-2 col-lg-1 col-form-label">報名活動 *</label>
|
||||||
<div class="col-sm-10 col-lg-3">
|
<div class="col-sm-10 col-lg-3">
|
||||||
<asp:PlaceHolder ID="activity_numPH" runat="server">
|
<asp:PlaceHolder ID="activity_numPH" runat="server">
|
||||||
<div class="input-group mb-3" data-search-control="search3" @click="order_no=='' && search_show(search_dialog.controls.search3)">
|
<div class="input-group mb-3" data-search-control="search3" @click="order_no=='' && search_show(search_dialog.controls.search3)">
|
||||||
@@ -1925,7 +1970,10 @@
|
|||||||
<button class="btn btn-outline-secondary" type="button">
|
<button class="btn btn-outline-secondary" type="button">
|
||||||
<i class="mdi mdi-view-list-outline"></i>
|
<i class="mdi mdi-view-list-outline"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
<asp:CustomValidator ID="CustomValidator1" runat="server"
|
||||||
|
ErrorMessage="活動不可為空!"
|
||||||
|
ClientValidationFunction="validateHiddenField" />
|
||||||
|
</div>
|
||||||
</asp:PlaceHolder>
|
</asp:PlaceHolder>
|
||||||
<asp:Literal ID="activity_num_txt2" runat="server"></asp:Literal>
|
<asp:Literal ID="activity_num_txt2" runat="server"></asp:Literal>
|
||||||
</div>
|
</div>
|
||||||
@@ -2128,14 +2176,17 @@
|
|||||||
<v-icon title="刪除" color="red" class="mr-2" @click="deleteItem(item)">
|
<v-icon title="刪除" color="red" class="mr-2" @click="deleteItem(item)">
|
||||||
mdi-delete
|
mdi-delete
|
||||||
</v-icon>
|
</v-icon>
|
||||||
<v-icon title="編輯牌位" color="blue" class="mr-2" @click="editTablet(item);">
|
<%--<v-icon title="編輯牌位" color="blue" class="mr-2" @click="editTablet(item);">
|
||||||
mdi-file-document-edit-outline
|
mdi-file-document-edit-outline
|
||||||
</v-icon>
|
</v-icon> --%>
|
||||||
<v-icon title="編輯牌位New" color="blue" class="mr-2" @click="editTabletNew(item);">
|
<v-icon title="編輯牌位New" color="blue" class="mr-2" @click="editTabletNew(item);">
|
||||||
mdi-file-document-edit-outline
|
mdi-file-document-edit-outline
|
||||||
</v-icon>
|
</v-icon>
|
||||||
<v-icon title="列印" color="blue" class="mr-2" @click="printItem(item);" v-if="canPrint || lists.length==0" >
|
<%--<v-icon title="列印" color="blue" class="mr-2" @click="printItem(item);" v-if="canPrint || lists.length==0" >
|
||||||
mdi-printer
|
mdi-printer
|
||||||
|
</v-icon>--%>
|
||||||
|
<v-icon title="預覽" color="blue" class="mr-2" @click="printItemNew(item);" v-if="canPrint || lists.length==0" >
|
||||||
|
mdi-printer-eye
|
||||||
</v-icon>
|
</v-icon>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -71,6 +71,10 @@ public partial class admin_order_print : MyWeb.function
|
|||||||
|
|
||||||
string[] k = detail_data.Split('$');
|
string[] k = detail_data.Split('$');
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(orderItem.address))
|
||||||
|
{
|
||||||
|
_word = _word.Replace("{$右標題}", orderItem.address);
|
||||||
|
}
|
||||||
//取代
|
//取代
|
||||||
for (int i=0; i < k.Length; i++)
|
for (int i=0; i < k.Length; i++)
|
||||||
{
|
{
|
||||||
@@ -87,6 +91,8 @@ public partial class admin_order_print : MyWeb.function
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//加入固定欄位變數定義
|
//加入固定欄位變數定義
|
||||||
//日期
|
//日期
|
||||||
string[] _type = { "zh", "min", "lunar" };
|
string[] _type = { "zh", "min", "lunar" };
|
||||||
|
|||||||
@@ -0,0 +1,500 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="print_list.aspx.cs" Inherits="admin_print_print_list" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" Runat="Server">
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" Runat="Server">
|
||||||
|
<div class="mb-2 mb-sm-0">
|
||||||
|
<label>請選擇需要列印的活動(法會)</label>
|
||||||
|
<div class="input-group mb-3" data-search-control="search2" @click="search_show(search_dialog.controls.search2)">
|
||||||
|
<input class="form-control search-text" type="text" readonly
|
||||||
|
id="activity_txt" runat="server" placeholder="活動(法會)" value="">
|
||||||
|
<asp:HiddenField ID="activity" runat="server" Value="" />
|
||||||
|
<button class="btn btn-outline-secondary" type="button">
|
||||||
|
<i class="mdi mdi-view-list-outline"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<%--<select class="form-select" v-model="selected_activity">
|
||||||
|
<option value="-1">請選擇活動</option>
|
||||||
|
<option v-for="item in activity_list" :key="item.activity_num" :value="item.num">
|
||||||
|
{{item.subject}}
|
||||||
|
</option>
|
||||||
|
</select>--%>
|
||||||
|
</div>
|
||||||
|
<%-- <div>
|
||||||
|
<a @click="print" class="btn btn-primary">列印牌位</a>
|
||||||
|
</div>--%>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
|
||||||
|
<div id="content" class="container-md">
|
||||||
|
<v-data-table
|
||||||
|
v-model="order_data.selected"
|
||||||
|
:items="order_data.list"
|
||||||
|
item-key="order_no"
|
||||||
|
:headers="order_data.header"
|
||||||
|
:loading="order_data.loading"
|
||||||
|
|
||||||
|
class="elevation-1">
|
||||||
|
<template #item.files ="{item}">
|
||||||
|
{{getItemCount(item.files)}}
|
||||||
|
</template>
|
||||||
|
<template #item.print="{item}">
|
||||||
|
<v-icon color="blue" class="mr-2" @click="print(item);" >
|
||||||
|
mdi-printer
|
||||||
|
</v-icon>
|
||||||
|
</template>
|
||||||
|
</v-data-table>
|
||||||
|
</div>
|
||||||
|
<v-dialog v-model="print_data.print_dialog.show" max-width="700px">
|
||||||
|
<div id="content1" class="container-md">
|
||||||
|
<v-card-title class="justify-space-between grey lighten-2">
|
||||||
|
列印清單
|
||||||
|
<v-btn icon @click="print_data.print_dialog.show=false;print_data.selected=[]"><v-icon>mdi-close</v-icon></v-btn>
|
||||||
|
</v-card-title>
|
||||||
|
<v-data-table
|
||||||
|
v-model="print_data.selected"
|
||||||
|
:items="processedItems"
|
||||||
|
item-key="compositeKey"
|
||||||
|
:headers="print_data.header"
|
||||||
|
:loading="print_data.loading"
|
||||||
|
show-select
|
||||||
|
class="elevation-1">
|
||||||
|
<v-divider inset></v-divider>
|
||||||
|
<template v-slot:top>
|
||||||
|
<v-toolbar flat color="white">
|
||||||
|
<div class="d-flex w-100">
|
||||||
|
<v-btn
|
||||||
|
color="primary"
|
||||||
|
class="ml-2 white--text"
|
||||||
|
@click="multiPrintNew">
|
||||||
|
列印<v-icon dark>mdi-turn-right</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
</div>
|
||||||
|
</v-toolbar>
|
||||||
|
</template>
|
||||||
|
</v-data-table>
|
||||||
|
</div>
|
||||||
|
</v-dialog>
|
||||||
|
<v-dialog v-model="search_dialog.show" max-width="700px">
|
||||||
|
<v-card>
|
||||||
|
<v-card-title class="justify-space-between grey lighten-2">
|
||||||
|
查詢:{{search_dialog.current.title}}
|
||||||
|
<v-btn icon @click="search_dialog.show=false; search_dialog.page = 1;"><v-icon>mdi-close</v-icon></v-btn>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text >
|
||||||
|
<v-row>
|
||||||
|
<v-col v-for="item in search_dialog.current.keys"
|
||||||
|
:cols="search_dialog.current.keys.length>1?6:12" >
|
||||||
|
<v-text-field v-model="item.value" :label="item.title" v-if="item.visible===undefined || item.visible==true "></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="12" class="text-end">
|
||||||
|
<v-btn color="primary" elevation="0" @click="search_get()">查詢</v-btn>
|
||||||
|
<v-btn elevation="0" @click="search_clear()">清除條件</v-btn>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-data-table
|
||||||
|
:headers="search_headers()"
|
||||||
|
:items="search_dialog.list"
|
||||||
|
:footer-props="search_dialog.footer"
|
||||||
|
:items-per-page="10"
|
||||||
|
:server-items-length="search_dialog.count"
|
||||||
|
:page.sync="search_dialog.page"
|
||||||
|
:options.sync="options"
|
||||||
|
@click:row="search_select"
|
||||||
|
:loading="search_dialog.loading"
|
||||||
|
></v-data-table>
|
||||||
|
</v-card-text>
|
||||||
|
<v-card-actions>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
|
||||||
|
<script>
|
||||||
|
Vue.filter('timeString', function (value, myFormat) {
|
||||||
|
return value == null || value == "" ? "" : moment(value).format(myFormat || 'YYYY-MM-DD, HH:mm:ss');
|
||||||
|
});
|
||||||
|
let VueApp = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
vuetify: new Vuetify(vuetify_options),
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
canPrint: false,
|
||||||
|
options: {},
|
||||||
|
activity_list: [],
|
||||||
|
order_data: {
|
||||||
|
loading: false,
|
||||||
|
list: [],
|
||||||
|
selected: [],
|
||||||
|
count: 0,
|
||||||
|
header: [
|
||||||
|
{ text: '功德項目', value: 'act_item_selected.text' },
|
||||||
|
{ text: '數量', value: 'files' },
|
||||||
|
{ text: '列印', value: 'print'}
|
||||||
|
],
|
||||||
|
|
||||||
|
},
|
||||||
|
print_data: {
|
||||||
|
item:[],
|
||||||
|
loading: false,
|
||||||
|
list: [],
|
||||||
|
selected: [],
|
||||||
|
count: 0,
|
||||||
|
header: [
|
||||||
|
{ text: '報名單號', value: 'order_no' },
|
||||||
|
{ text: '列印編號', value: 'print_id' },
|
||||||
|
{ text: '已列印', value: 'isPrinted' }
|
||||||
|
],
|
||||||
|
print_dialog: { show: false }
|
||||||
|
},
|
||||||
|
search_dialog: {
|
||||||
|
controls: {
|
||||||
|
search2: {
|
||||||
|
id: 'search2',
|
||||||
|
title: '活動(法會)',
|
||||||
|
text_prop: 'subject',
|
||||||
|
value_prop: 'num',
|
||||||
|
keys: [
|
||||||
|
{ id: 'num', title: '編號', value: '' },
|
||||||
|
{ id: 'subject', title: '活動(法會)名稱', value: '' },
|
||||||
|
],
|
||||||
|
api_url: HTTP_HOST + 'api/activity/GetList',
|
||||||
|
columns: [
|
||||||
|
{ id: 'num', title: '編號' },
|
||||||
|
{ id: 'subject', title: '活動(法會)名稱' },
|
||||||
|
],
|
||||||
|
selected: {},
|
||||||
|
select(item, t) {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
show: false,
|
||||||
|
current: {},
|
||||||
|
list: [],
|
||||||
|
count: 0,
|
||||||
|
page: 1,
|
||||||
|
loading: false,
|
||||||
|
footer: {
|
||||||
|
showFirstLastPage: true,
|
||||||
|
disableItemsPerPage: true,
|
||||||
|
itemsPerPageAllText: '',
|
||||||
|
itemsPerPageText: '',
|
||||||
|
//'items-per-page-options': [10, 20, 30, 40, 50, 100]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
selected_activity: '-1',
|
||||||
|
search: {
|
||||||
|
kind: 0,
|
||||||
|
subject: '',
|
||||||
|
},
|
||||||
|
snackbar: {
|
||||||
|
show: false,
|
||||||
|
text: "",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
processedItems() {
|
||||||
|
return this.print_data.list.map(item => ({
|
||||||
|
...item,
|
||||||
|
compositeKey: `${item.order_no}_${item.num.toString()}_${item.print_id}`
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getItemCount(item) {
|
||||||
|
//console.log("getItemCount:",item[0]?.list.length)
|
||||||
|
return item[0]?.list.length
|
||||||
|
},
|
||||||
|
search_show(curr) {
|
||||||
|
this.search_dialog.current = curr;
|
||||||
|
this.search_clear()
|
||||||
|
//this.search_get()//清除完自動會重抓, 故取消
|
||||||
|
this.search_dialog.show = true;
|
||||||
|
|
||||||
|
},
|
||||||
|
search_clear() {
|
||||||
|
if (!this.search_dialog.current.keys) return;
|
||||||
|
this.search_dialog.current.keys.forEach((t, i) => { t.value = '' })
|
||||||
|
this.search_get()
|
||||||
|
},
|
||||||
|
search_get() {
|
||||||
|
if (!this.search_dialog.current.keys) return;
|
||||||
|
let api_url = this.search_dialog.current.api_url;
|
||||||
|
let keys = this.search_dialog.current.keys;
|
||||||
|
//const { page, itemsPerPage } = this.options
|
||||||
|
//const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||||
|
this.search_dialog.page = this.options.page ?? 1
|
||||||
|
let params = { page: this.search_dialog.page, pageSize: 10 };//url params
|
||||||
|
var search = {};//post body
|
||||||
|
keys.forEach((t, i) => {
|
||||||
|
search[t.id] = t.value;
|
||||||
|
});
|
||||||
|
if (this.search_dialog.current.id == 'search5') {
|
||||||
|
search['num'] = this.activity_id;
|
||||||
|
}
|
||||||
|
if (this.search_dialog.current.id == 'search4') {
|
||||||
|
search['num'] = this.follower_id;
|
||||||
|
}
|
||||||
|
if (this.search_dialog.current.id == 'search6') {
|
||||||
|
search['num'] = this.follower_id;
|
||||||
|
}
|
||||||
|
if (this.search_dialog.current.id == 'search7' || this.search_dialog.current.id == 'search8') {
|
||||||
|
search['num'] = this.follower_id;
|
||||||
|
}
|
||||||
|
console.log("search_get", api_url, search, params, this.options);
|
||||||
|
this.search_dialog.loading = true
|
||||||
|
axios.post(api_url, search, { params: params })
|
||||||
|
.then(response => {
|
||||||
|
this.search_dialog.list = response.data.list
|
||||||
|
this.search_dialog.count = response.data.count
|
||||||
|
this.search_dialog.loading = false
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error)
|
||||||
|
this.search_dialog.list = []
|
||||||
|
this.search_dialog.count = 0
|
||||||
|
this.search_dialog.loading = false
|
||||||
|
this.snackbar.text = "錯誤:" + error
|
||||||
|
this.snackbar.show = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
search_headers() {
|
||||||
|
if (!this.search_dialog.current.columns) return;
|
||||||
|
r = [];
|
||||||
|
this.search_dialog.current.columns.forEach((t, i) => {
|
||||||
|
//console.log("search_headers:", t, i);
|
||||||
|
r.push({
|
||||||
|
text: t.title,
|
||||||
|
width: t.width,
|
||||||
|
align: 'start',
|
||||||
|
sortable: false,
|
||||||
|
value: t.id,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return r
|
||||||
|
},
|
||||||
|
search_select(row) {
|
||||||
|
let curr = this.search_dialog.current;
|
||||||
|
let target = $(`[data-search-control=${curr.id}]`);
|
||||||
|
curr.selected = row;
|
||||||
|
//牌位
|
||||||
|
if (curr.id == 'search7') {
|
||||||
|
this.editedItem.f_num_tablet = curr.selected[curr.text_prop];
|
||||||
|
} else if (curr.id == 'search8') {
|
||||||
|
this.editedItem.from_id_tablet = curr.selected[curr.text_prop];
|
||||||
|
} else {
|
||||||
|
target.children("input.search-text").val(curr.selected[curr.text_prop])//text
|
||||||
|
target.children("input:hidden").val(curr.selected[curr.value_prop])//value
|
||||||
|
}
|
||||||
|
if (curr.select instanceof Function) {
|
||||||
|
curr.select(this.editedItem, row);
|
||||||
|
}
|
||||||
|
this.search_dialog.show = false;
|
||||||
|
this.search_dialog.page = 1;
|
||||||
|
this.get_activity()
|
||||||
|
//console.log(row, row["u_name"], row["f_number"], curr.id, target);
|
||||||
|
},
|
||||||
|
|
||||||
|
get_activity() {
|
||||||
|
const params = {
|
||||||
|
page: 1, pageSize: 1000
|
||||||
|
};
|
||||||
|
let curr = this.search_dialog.current;
|
||||||
|
let target = $(`[data-search-control=${curr.id}]`)
|
||||||
|
this.search = { num: target.children("input:hidden").val() }
|
||||||
|
this.order_data.loading = true
|
||||||
|
axios
|
||||||
|
.post(HTTP_HOST + 'api/activity/GetActRelaList', this.search, { params: params })
|
||||||
|
.then(response => {
|
||||||
|
//console.log("GetActRelaList:", response);
|
||||||
|
this.order_data.list = response.data.list
|
||||||
|
this.order_data.list.forEach(val => {
|
||||||
|
|
||||||
|
val.files.forEach(y => {
|
||||||
|
y.list.forEach(z => {
|
||||||
|
if (z.printed_files.includes(y.num.toString())) {
|
||||||
|
z.isPrinted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
//if(val.files.list) val.files.num
|
||||||
|
});
|
||||||
|
this.order_data.count = response.data.count;
|
||||||
|
this.order_data.loading = false
|
||||||
|
})
|
||||||
|
.catch(error => console.log(error))
|
||||||
|
},
|
||||||
|
get_actItem() {
|
||||||
|
|
||||||
|
},
|
||||||
|
multiPrintNew() {
|
||||||
|
let list = []
|
||||||
|
console.log("print_data.selected:",this.print_data.item);
|
||||||
|
this.print_data.selected.forEach(item => {
|
||||||
|
list.push({
|
||||||
|
num: item.num, print_id: item.print_id, order_no: item.order_no, from_id: item.from_id,
|
||||||
|
printed_files: item.printed_files
|
||||||
|
})
|
||||||
|
})
|
||||||
|
if (list.length > 0) {
|
||||||
|
let item = this.print_data.item[0]
|
||||||
|
var params = {
|
||||||
|
item: item.act_item_selected?.val,
|
||||||
|
file: this.print_data.item[0].files[0].num,
|
||||||
|
};
|
||||||
|
// 記錄已列印
|
||||||
|
let list_num = []
|
||||||
|
list.forEach(val => {
|
||||||
|
list_num.push(val.num)
|
||||||
|
})
|
||||||
|
let _url = HTTP_HOST + 'api/order/printMultiFileLogNew';
|
||||||
|
axios.post(_url, list_num, { params: params })
|
||||||
|
.then(response => {
|
||||||
|
this.order_data.list.forEach(val => {
|
||||||
|
val.files.forEach(y => {
|
||||||
|
y.list.forEach(z => {
|
||||||
|
if (list_num.includes(z.num)) {
|
||||||
|
z.isPrinted=true
|
||||||
|
}
|
||||||
|
//if (z.printed_files.includes(y.num.toString())) {
|
||||||
|
// z.isPrinted = true
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
//for (let i = 0; i < this.print_data.selected.length; i++) {
|
||||||
|
// for (let j = 0; j < this.print_data.item.length; j++) {
|
||||||
|
// if (this.print_data.selected[i].num == this.print_data.item[j].num) {
|
||||||
|
// this.print_data.item[j].isPrinted = true;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error)
|
||||||
|
|
||||||
|
})
|
||||||
|
_url = HTTP_HOST + 'admin/print/print_multi_new.aspx';
|
||||||
|
var form = document.createElement("form");
|
||||||
|
form.method = "POST";
|
||||||
|
form.action = _url;
|
||||||
|
form.target = "_blank";
|
||||||
|
const addHiddenField = (name, value) => {
|
||||||
|
const hiddenField = document.createElement("input");
|
||||||
|
hiddenField.type = "hidden";
|
||||||
|
hiddenField.name = name;
|
||||||
|
hiddenField.value = value;
|
||||||
|
form.appendChild(hiddenField);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add form fields
|
||||||
|
addHiddenField("item", item.act_item_selected?.val);
|
||||||
|
addHiddenField("file", this.print_data.item[0].files[0].num);
|
||||||
|
addHiddenField("list", JSON.stringify(list));
|
||||||
|
addHiddenField("title", `${item.act_item_selected} / ${item.subject}`);
|
||||||
|
localStorage.setItem("item", item.act_item_selected?.val);
|
||||||
|
localStorage.setItem("list", JSON.stringify(list));
|
||||||
|
|
||||||
|
document.body.appendChild(form); // Not entirely sure if this is necessary
|
||||||
|
form.submit();
|
||||||
|
document.body.removeChild(form);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
print(item) {
|
||||||
|
console.log("print:", item)
|
||||||
|
//let list = []
|
||||||
|
this.print_data.list.length = 0
|
||||||
|
this.print_data.item.length = 0
|
||||||
|
|
||||||
|
item.files[0].list.forEach(val => {
|
||||||
|
this.print_data.list.push(val)
|
||||||
|
})
|
||||||
|
|
||||||
|
this.print_data.item.push(item)
|
||||||
|
//let list_count = list.length;
|
||||||
|
this.print_data.print_dialog.show = true
|
||||||
|
|
||||||
|
//_url = HTTP_HOST + 'admin/print/print_multi_new.aspx';
|
||||||
|
//var form = document.createElement("form");
|
||||||
|
//form.method = "POST";
|
||||||
|
//form.action = _url;
|
||||||
|
//form.target = "_blank";
|
||||||
|
//const addHiddenField = (name, value) => {
|
||||||
|
// const hiddenField = document.createElement("input");
|
||||||
|
// hiddenField.type = "hidden";
|
||||||
|
// hiddenField.name = name;
|
||||||
|
// hiddenField.value = value;
|
||||||
|
// form.appendChild(hiddenField);
|
||||||
|
//};
|
||||||
|
//// Add form fields
|
||||||
|
//console.log(JSON.stringify(list));
|
||||||
|
//addHiddenField("item", item.actitem_num_selected.val);
|
||||||
|
//addHiddenField("file", item.num);
|
||||||
|
//addHiddenField("list", JSON.stringify(list));
|
||||||
|
//addHiddenField("title", `${item.actitem_num_selected} / ${item.subject}`);
|
||||||
|
//localStorage.setItem("item", item.actitem_num_selected.val);
|
||||||
|
//localStorage.setItem("list", JSON.stringify(list));
|
||||||
|
|
||||||
|
//document.body.appendChild(form); // Not entirely sure if this is necessary
|
||||||
|
//form.submit();
|
||||||
|
//document.body.removeChild(form);
|
||||||
|
},
|
||||||
|
yulan_single(item) {
|
||||||
|
_url = HTTP_HOST + '/admin/printpw/index.aspx';
|
||||||
|
var form = document.createElement("form");
|
||||||
|
form.method = "POST";
|
||||||
|
form.action = _url;
|
||||||
|
form.target = "_blank"; // Open the result in a new tab
|
||||||
|
|
||||||
|
// Helper function to add hidden fields
|
||||||
|
const addHiddenField = (name, value) => {
|
||||||
|
const hiddenField = document.createElement("input");
|
||||||
|
hiddenField.type = "hidden";
|
||||||
|
hiddenField.name = name;
|
||||||
|
hiddenField.value = value;
|
||||||
|
form.appendChild(hiddenField);
|
||||||
|
};
|
||||||
|
addHiddenField("order_no", item.order_no);
|
||||||
|
document.body.appendChild(form); // Not entirely sure if this is necessary
|
||||||
|
form.submit();
|
||||||
|
document.body.removeChild(form);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
//this.get_activity()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected_activity(newValue, oldValue) {
|
||||||
|
const params = {
|
||||||
|
page: 1, pageSize: 100
|
||||||
|
};
|
||||||
|
console.log("selected_activity:",newValue)
|
||||||
|
if (newValue !== oldValue) {
|
||||||
|
axios
|
||||||
|
.post(HTTP_HOST + 'api/orderdetail/GetList', { activity_num: this.selected_activity }, { params: params })
|
||||||
|
.then(response => {
|
||||||
|
this.order_data.list = response.data.list
|
||||||
|
})
|
||||||
|
.catch(error => console.log(error))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'order_data.selected'(newValue, oldValue){
|
||||||
|
console.log(newValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
public partial class admin_print_print_list : MyWeb.config
|
||||||
|
{
|
||||||
|
private Model.ezEntities _db = new Model.ezEntities();
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -100,6 +100,12 @@ public partial class admin_print_print_multi : MyWeb.function
|
|||||||
|
|
||||||
string detail_data = newStrList.Count > 0 ? string.Join("\r\n", newStrList) : "";//參數集合((名稱及值
|
string detail_data = newStrList.Count > 0 ? string.Join("\r\n", newStrList) : "";//參數集合((名稱及值
|
||||||
string[] k = detail_data.Split('$');
|
string[] k = detail_data.Split('$');
|
||||||
|
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(orderItem.address))
|
||||||
|
{
|
||||||
|
_word = _word.Replace("{$右標題}", orderItem.address);
|
||||||
|
}
|
||||||
for (int i = 0; i < k.Length; i++)
|
for (int i = 0; i < k.Length; i++)
|
||||||
{
|
{
|
||||||
try{
|
try{
|
||||||
|
|||||||
@@ -234,6 +234,7 @@
|
|||||||
},
|
},
|
||||||
async getData() {
|
async getData() {
|
||||||
let list = localStorage.getItem("list")
|
let list = localStorage.getItem("list")
|
||||||
|
|
||||||
let param = [];
|
let param = [];
|
||||||
let data = JSON.parse(list)
|
let data = JSON.parse(list)
|
||||||
data.forEach(x => {
|
data.forEach(x => {
|
||||||
@@ -245,7 +246,15 @@
|
|||||||
|
|
||||||
if (response.status == 200) {
|
if (response.status == 200) {
|
||||||
this.printData = response.data;
|
this.printData = response.data;
|
||||||
|
//console.log("printData:",this.printData);
|
||||||
|
this.printData.sort(function (a,b) {
|
||||||
|
if (a.print_id < b.print_id) {
|
||||||
|
return -1
|
||||||
|
} else if (a.print_id > b.print_id) {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
});
|
||||||
//this.render();
|
//this.render();
|
||||||
//this.print();
|
//this.print();
|
||||||
}
|
}
|
||||||
@@ -278,10 +287,18 @@
|
|||||||
//包含空白用來折的尺寸
|
//包含空白用來折的尺寸
|
||||||
let printSize = self.allSize.find(y => y.paperID == style.printSize);
|
let printSize = self.allSize.find(y => y.paperID == style.printSize);
|
||||||
|
|
||||||
//用長根寬算出一張紙可以印幾張
|
let xCount = 1;
|
||||||
let xCount = parseFloat(pageSize.width) / parseFloat(printSize.width);
|
let yCount = 1;
|
||||||
let yCount = parseFloat(pageSize.height) / parseFloat(printSize.height);
|
|
||||||
let total = Math.floor(xCount) * Math.floor(yCount);
|
|
||||||
|
let total = 1;
|
||||||
|
if (style.printMode === "combine") {
|
||||||
|
//用長根寬算出一張紙可以印幾張
|
||||||
|
xCount=parseFloat(pageSize.width) / parseFloat(size.width);
|
||||||
|
yCount=parseFloat(pageSize.height) / parseFloat(size.height);
|
||||||
|
total=Math.floor(xCount) * Math.floor(yCount);
|
||||||
|
}
|
||||||
|
console.log("xCount,yCount:",xCount,yCount)
|
||||||
//if ((nowPageWidth + parseFloat(printSize.width)) > pageSize.width) {
|
//if ((nowPageWidth + parseFloat(printSize.width)) > pageSize.width) {
|
||||||
if (nowPageWidth >= total) {
|
if (nowPageWidth >= total) {
|
||||||
//$(canvas).css("width", printSize.width + "mm");
|
//$(canvas).css("width", printSize.width + "mm");
|
||||||
@@ -295,7 +312,7 @@
|
|||||||
nowPageWidth = 0;
|
nowPageWidth = 0;
|
||||||
}
|
}
|
||||||
nowPageWidth = nowPageWidth + 1; //parseFloat(printSize.width);
|
nowPageWidth = nowPageWidth + 1; //parseFloat(printSize.width);
|
||||||
tabletpaper = $(` <div class="tablet-paper">
|
tabletpaper = $(` <div class="tablet-paper" style="margin-top:2mm">
|
||||||
</div>`)
|
</div>`)
|
||||||
let img = self.bg.find(y => y.name == style.backendImg);
|
let img = self.bg.find(y => y.name == style.backendImg);
|
||||||
/*tabletpaper.css({
|
/*tabletpaper.css({
|
||||||
@@ -435,9 +452,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
let content = $(`<div class="tablet-element "></div>`)
|
let content = $(`<div class="tablet-element print_id "></div>`)
|
||||||
.css({
|
.css({
|
||||||
position: "absolute", left: "4mm", top: "2mm", fontSize: '12px',
|
position: "absolute", left: "1mm", top: "4mm", fontSize: '12px',
|
||||||
"z-index": 9999,
|
"z-index": 9999,
|
||||||
"align-items": "center"
|
"align-items": "center"
|
||||||
|
|
||||||
@@ -736,10 +753,35 @@
|
|||||||
//$("#textBreakWord").prop("readonly", true);
|
//$("#textBreakWord").prop("readonly", true);
|
||||||
$("#textWidth").prop("readonly", true);
|
$("#textWidth").prop("readonly", true);
|
||||||
$("#textHeight").prop("readonly", true);
|
$("#textHeight").prop("readonly", true);
|
||||||
|
} else if ($(parentElement).hasClass("print_id") ){
|
||||||
|
$("#textX").prop("readonly", false);
|
||||||
|
$("#textY").prop("readonly", false);
|
||||||
|
$("#fontSize").prop("readonly", false);
|
||||||
|
$("#textWidth").prop("readonly", false);
|
||||||
|
$("#textHeight").prop("readonly", false);
|
||||||
|
$("#textBreakCount").prop("readonly", true);
|
||||||
|
$("#textBreakWord").prop("readonly", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//$(".tablet-element .print_id").on("click", function (e) {
|
||||||
|
// let left = $(this).css("left");
|
||||||
|
// let top = $(this).css("top");
|
||||||
|
|
||||||
|
// left = left.replace("px", "");
|
||||||
|
// top = top.replace("px", "");
|
||||||
|
// $("#textX").val(self.fix2(left * 0.265));
|
||||||
|
// $("#textY").val(self.fix2(top * 0.265));
|
||||||
|
// $("#textX").prop("readonly", false);
|
||||||
|
// $("#textY").prop("readonly", false);
|
||||||
|
// $("#fontSize").prop("readonly", false);
|
||||||
|
// $("#textWidth").prop("readonly", false);
|
||||||
|
// $("#textHeight").prop("readonly", false);
|
||||||
|
// $("#textBreakCount").prop("readonly", true);
|
||||||
|
// $("#textBreakWord").prop("readonly", true);
|
||||||
|
//});
|
||||||
|
|
||||||
$(".tablet-element .rosterspan").on("click", function (e) {
|
$(".tablet-element .rosterspan").on("click", function (e) {
|
||||||
$("#toast_body").html("此格式不提供單項物件修改");
|
$("#toast_body").html("此格式不提供單項物件修改");
|
||||||
self.toast.show();
|
self.toast.show();
|
||||||
@@ -826,7 +868,7 @@
|
|||||||
renderNormal(mid, d) {
|
renderNormal(mid, d) {
|
||||||
//sconsole.log("renderNormal:", d)
|
//sconsole.log("renderNormal:", d)
|
||||||
let self = this;
|
let self = this;
|
||||||
let txt = $(`<div class='${d.elementID}'>${mid}</div>`).css({
|
let txt = $(`<div class='${d.elementID}'>${mid==undefined?"":mid}</div>`).css({
|
||||||
"z-index": 9999, visibility: d.visibility,
|
"z-index": 9999, visibility: d.visibility,
|
||||||
width: d.width, height: d.height
|
width: d.width, height: d.height
|
||||||
});
|
});
|
||||||
@@ -889,17 +931,24 @@
|
|||||||
},
|
},
|
||||||
async changeSetup(config) {
|
async changeSetup(config) {
|
||||||
|
|
||||||
let classList = ["liveList", "nameList", "address", "ancestor-wrapper", "lefttitle", "righttitle", "rosterList"]
|
let classList = ["liveList", "nameList", "address", "ancestor-wrapper", "lefttitle", "righttitle", "rosterList", "print_id"]
|
||||||
|
console.log("changeSetup:",config);
|
||||||
switch (config) {
|
switch (config) {
|
||||||
case "X":
|
case "X":
|
||||||
if ($("#indivualSetup").prop("checked")) {
|
if ($("#indivualSetup").prop("checked")) {
|
||||||
$(this.selected).css("left", $("#textX").val() + "mm");
|
$(this.selected).css("left", $("#textX").val() + "mm");
|
||||||
} else if ($("#allSetup").prop("checked")) {
|
} else if ($("#allSetup").prop("checked")) {
|
||||||
classList.forEach(w => {
|
classList.forEach(w => {
|
||||||
|
|
||||||
if ($(this.selected.children()).first().hasClass(w)) {
|
if ($(this.selected.children()).first().hasClass(w)) {
|
||||||
$(`.${w}`).parent().each((index, y) => {
|
$(`.${w}`).parent().each((index, y) => {
|
||||||
$(y).css("left", $("#textX").val() + "mm")
|
$(y).css("left", $("#textX").val() + "mm")
|
||||||
})
|
})
|
||||||
|
} else if ($(this.selected.hasClass(w))) {
|
||||||
|
console.log("QQ:",w,config);
|
||||||
|
$(`.${w}`).each((index, y) => {
|
||||||
|
$(y).css("left", $("#textX").val() + "mm")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -913,6 +962,11 @@
|
|||||||
$(`.${w}`).parent().each((index, y) => {
|
$(`.${w}`).parent().each((index, y) => {
|
||||||
$(y).css("top", $("#textY").val() + "mm")
|
$(y).css("top", $("#textY").val() + "mm")
|
||||||
})
|
})
|
||||||
|
} else if ($(this.selected.hasClass(w))) {
|
||||||
|
console.log("QQ:", w, config);
|
||||||
|
$(`.${w}`).each((index, y) => {
|
||||||
|
$(y).css("top", $("#textY").val() + "mm")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<button class="btn btn-primary" onclick="designer.save()">儲存牌位</button>
|
<button class="btn btn-primary" onclick="designer.save(event)">儲存牌位</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row work_space">
|
<div class="row work_space">
|
||||||
@@ -340,27 +340,34 @@
|
|||||||
if (x.f_num_tablet != "") {
|
if (x.f_num_tablet != "") {
|
||||||
let tablet = JSON.parse(x.f_num_tablet);
|
let tablet = JSON.parse(x.f_num_tablet);
|
||||||
|
|
||||||
let mid_items = tablet.mid_items;
|
let mid_items = tablet?.mid_items;
|
||||||
let left_items = tablet.left_items;
|
let left_items = tablet?.left_items;
|
||||||
let mid_left = tablet.mid_left;
|
let mid_left = tablet?.mid_left;
|
||||||
let mid_right = tablet.mid_right;
|
let mid_right = tablet?.mid_right;
|
||||||
let address = tablet.addr_items;
|
let address = tablet?.addr_items===undefined?"":tablet?.addr_items;
|
||||||
|
if (address === "") {
|
||||||
|
if (x.address!="") {
|
||||||
|
address = x.address
|
||||||
|
}
|
||||||
|
}
|
||||||
self.family_deceased_Y_selected.length = 0;
|
self.family_deceased_Y_selected.length = 0;
|
||||||
self.family_deceased_N_selected.length = 0;
|
self.family_deceased_N_selected.length = 0;
|
||||||
self.family_address = "";
|
self.family_address = address;
|
||||||
self.family_left_title.length = 0;
|
self.family_left_title.length = 0;
|
||||||
self.family_right_title.length = 0;
|
self.family_right_title.length = 0;
|
||||||
Object.assign(self.family_deceased_N_selected, mid_items);
|
Object.assign(self.family_deceased_N_selected, mid_items);
|
||||||
Object.assign(self.family_deceased_Y_selected, left_items);
|
Object.assign(self.family_deceased_Y_selected, left_items);
|
||||||
Object.assign(self.family_left_title, mid_left);
|
Object.assign(self.family_left_title, mid_left);
|
||||||
Object.assign(self.family_right_title, mid_right);
|
Object.assign(self.family_right_title, mid_right);
|
||||||
self.family_address = tablet.addr_items;
|
self.family_address = address;//tablet.addr_items;
|
||||||
//let mid = [];
|
//let mid = [];
|
||||||
//family_deceased_Y_selected family_deceased_N_selected
|
//family_deceased_Y_selected family_deceased_N_selected
|
||||||
mid_items.forEach(y => {
|
if (mid_items) {
|
||||||
self.properTitle.push(y.fam_name);
|
mid_items.forEach(y => {
|
||||||
|
self.properTitle.push(y.fam_name);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
if (mid_left) {
|
if (mid_left) {
|
||||||
mid_left.forEach(y => {
|
mid_left.forEach(y => {
|
||||||
self.leftProperTitle.push(y.fam_name);
|
self.leftProperTitle.push(y.fam_name);
|
||||||
@@ -737,8 +744,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
} else if (element.hasClass("address")) {//地址
|
} else if (element.hasClass("address")) {//地址
|
||||||
|
console.log(self.address);
|
||||||
$(".selectedItem").append(`<li><span style="opacity:0.5">卍</span>
|
$(".selectedItem").append(`<li><span style="opacity:0.5">卍</span>
|
||||||
<span class="selected">${self.address}</span>
|
<span class="selected">${self.address==undefined?"":self.address}</span>
|
||||||
<span class="itemRemove" style="float:right ;margin-left:2rem;cursor:pointer;" >−</span>`);
|
<span class="itemRemove" style="float:right ;margin-left:2rem;cursor:pointer;" >−</span>`);
|
||||||
} else if (element.hasClass("lefttitle")) {//左正名
|
} else if (element.hasClass("lefttitle")) {//左正名
|
||||||
self.leftProperTitle.forEach(x => {
|
self.leftProperTitle.forEach(x => {
|
||||||
@@ -853,7 +861,7 @@
|
|||||||
|
|
||||||
self.bindEvent();
|
self.bindEvent();
|
||||||
},
|
},
|
||||||
async addNewItem() {
|
async addNewItem() {//已選輸入框按加號
|
||||||
console.log("addNewItem:",$("#custom_txt").val())
|
console.log("addNewItem:",$("#custom_txt").val())
|
||||||
if ($("#custom_txt").val()=="") {
|
if ($("#custom_txt").val()=="") {
|
||||||
|
|
||||||
@@ -1592,7 +1600,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async save() {
|
async save(event) {
|
||||||
|
event.preventDefault()
|
||||||
//console.log("tabletItem:", designer.tabletItem);
|
//console.log("tabletItem:", designer.tabletItem);
|
||||||
//拚牌位的內容
|
//拚牌位的內容
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|||||||
Reference in New Issue
Block a user