快速報名,功德內容設定調整:只要選擇預設版型
This commit is contained in:
@@ -32,6 +32,8 @@ namespace Model.ViewModel
|
|||||||
public string subject { get; set; }
|
public string subject { get; set; }
|
||||||
public int? num { get; set; }
|
public int? num { get; set; }
|
||||||
public string is_reconcile { get; set; }
|
public string is_reconcile { get; set; }
|
||||||
|
public string up_time1 { get; set; }
|
||||||
|
public string up_time2 { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -235,6 +235,114 @@ public class activityController : ApiController
|
|||||||
var count = _db.activities.Count();
|
var count = _db.activities.Count();
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Route("api/activity/GetListNew")]
|
||||||
|
public IHttpActionResult GetListNew([FromBody] Model.ViewModel.activity q, int page, int pageSize = 10,
|
||||||
|
string sortBy = "", bool sortDesc = false)
|
||||||
|
{
|
||||||
|
var qry = _db.activities.AsQueryable();
|
||||||
|
if (!string.IsNullOrEmpty(q.subject))
|
||||||
|
qry = qry.Where(o => o.subject.Contains(q.subject));
|
||||||
|
if (q.kind.HasValue && q.kind > 0)
|
||||||
|
{
|
||||||
|
var _subKinds = new TreeView().subKinds(_db.activity_kind.Select(o => new TreeItem()
|
||||||
|
{
|
||||||
|
num = o.num,
|
||||||
|
root = o.root,
|
||||||
|
}).ToList(), q.kind.Value);
|
||||||
|
|
||||||
|
//qry = qry.Where(o => o.kind == q.kind);
|
||||||
|
qry = qry.Where(o => o.kind == q.kind.Value || _subKinds.Any(s => s == o.kind));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(q.up_time1))
|
||||||
|
{
|
||||||
|
var s = DateTime.Parse(q.up_time1);
|
||||||
|
qry = qry.Where(o => o.startDate_solar <=s&&o.endDate_solar>=s);
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (!string.IsNullOrEmpty(q.up_time2))
|
||||||
|
//{
|
||||||
|
// var end = DateTime.Parse(q.up_time2);
|
||||||
|
// qry = qry.Where(o => o.endDate_solar<=end);
|
||||||
|
//}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(q.kindTxt))
|
||||||
|
qry = qry.Where(o => o.activity_kind.kind.Contains(q.kindTxt));
|
||||||
|
|
||||||
|
if (sortBy.Equals("subject"))
|
||||||
|
{
|
||||||
|
if (sortDesc)
|
||||||
|
qry = qry.OrderByDescending(o => o.subject);
|
||||||
|
else
|
||||||
|
qry = qry.OrderBy(o => o.subject);
|
||||||
|
}
|
||||||
|
else if (sortBy.Equals("kind"))
|
||||||
|
{
|
||||||
|
if (sortDesc)
|
||||||
|
qry = qry.OrderByDescending(o => o.kind);
|
||||||
|
else
|
||||||
|
qry = qry.OrderBy(o => o.kind);
|
||||||
|
}
|
||||||
|
else if (sortBy.Equals("startDate_solar"))
|
||||||
|
{
|
||||||
|
if (sortDesc)
|
||||||
|
qry = qry.OrderByDescending(o => o.startDate_solar);
|
||||||
|
else
|
||||||
|
qry = qry.OrderBy(o => o.startDate_solar);
|
||||||
|
}
|
||||||
|
else if (sortBy.Equals("endDate_solar"))
|
||||||
|
{
|
||||||
|
if (sortDesc)
|
||||||
|
qry = qry.OrderByDescending(o => o.endDate_solar);
|
||||||
|
else
|
||||||
|
qry = qry.OrderBy(o => o.endDate_solar);
|
||||||
|
}
|
||||||
|
else if (sortBy.Equals("dueDate"))
|
||||||
|
{
|
||||||
|
if (sortDesc)
|
||||||
|
qry = qry.OrderByDescending(o => o.dueDate);
|
||||||
|
else
|
||||||
|
qry = qry.OrderBy(o => o.dueDate);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
qry = qry.OrderByDescending(o => o.num);
|
||||||
|
|
||||||
|
var count = qry.Count(); //pageSize = count;//一次取回??
|
||||||
|
var qryList = (pageSize > 0) ? qry.ToPagedList(page, pageSize).ToList() : qry.ToList();
|
||||||
|
|
||||||
|
var ret = new
|
||||||
|
{
|
||||||
|
list = qryList.Select(x => new
|
||||||
|
{
|
||||||
|
num = x.num,
|
||||||
|
subject = x.subject,
|
||||||
|
kind = x.kind,
|
||||||
|
kindTxt = x.kind.HasValue ? x.activity_kind.kind : "",
|
||||||
|
kindsTxt = x.kind.HasValue ? new TreeView().kindText(_db.activity_kind.Select(o => new TreeItem()
|
||||||
|
{
|
||||||
|
kind = o.kind,
|
||||||
|
num = o.num,
|
||||||
|
root = o.root,
|
||||||
|
}).ToList(), x.kind) : "",
|
||||||
|
startDate_solar = x.startDate_solar,
|
||||||
|
endDate_solar = x.endDate_solar,
|
||||||
|
startDate_lunar = x.startDate_lunar,
|
||||||
|
endDate_lunar = x.endDate_lunar,
|
||||||
|
dueDate = x.dueDate,
|
||||||
|
orderCounts = _db.pro_order.Where(y => y.activity_num == x.num).Count(),
|
||||||
|
}),
|
||||||
|
count = count,
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if (ret.list == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||||
|
return Ok(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("api/activity/GetList")]
|
[Route("api/activity/GetList")]
|
||||||
public IHttpActionResult GetList([FromBody] Model.ViewModel.activity q, int page, int pageSize = 10,
|
public IHttpActionResult GetList([FromBody] Model.ViewModel.activity q, int page, int pageSize = 10,
|
||||||
|
|||||||
@@ -199,19 +199,24 @@
|
|||||||
val: 0
|
val: 0
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
style_datas: [],
|
||||||
|
paper_datas: [],
|
||||||
|
defaultStyle: "",
|
||||||
|
paperID: "",
|
||||||
|
printID:""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.search_dialog.current = this.search_dialog.controls.search1
|
this.search_dialog.current = this.search_dialog.controls.search1
|
||||||
//console.log("mounted");
|
//console.log("mounted");
|
||||||
|
this.initialize()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
options: {
|
options: {
|
||||||
handler() {
|
handler() {
|
||||||
//console.log("watch1", this.search_dialog, this.search_dialog.page);
|
//console.log("watch1", this.search_dialog, this.search_dialog.page);
|
||||||
this.search_get()
|
this.search_get()
|
||||||
console.log("watch2", this.search_dialog, this.search_dialog.page);
|
},
|
||||||
},
|
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
optionsDetail: {
|
optionsDetail: {
|
||||||
@@ -248,7 +253,6 @@
|
|||||||
if (this.this_id == "")
|
if (this.this_id == "")
|
||||||
search['status'] = "Y";//啟用
|
search['status'] = "Y";//啟用
|
||||||
}
|
}
|
||||||
console.log("search_get", api_url, search, params, this.options);
|
|
||||||
this.search_dialog.loading = true
|
this.search_dialog.loading = true
|
||||||
axios.post(api_url, search, { params: params })
|
axios.post(api_url, search, { params: params })
|
||||||
.then(response => {
|
.then(response => {
|
||||||
@@ -289,7 +293,7 @@
|
|||||||
else {
|
else {
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log("search_select", row, editem);
|
|
||||||
//debugger;
|
//debugger;
|
||||||
target.children("input.search-text").val(curr.selected[curr.text_prop])//text
|
target.children("input.search-text").val(curr.selected[curr.text_prop])//text
|
||||||
target.children("input:hidden").val(curr.selected[curr.value_prop])//value
|
target.children("input:hidden").val(curr.selected[curr.value_prop])//value
|
||||||
@@ -336,46 +340,19 @@
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
axios
|
this.paper_datas.length = 0
|
||||||
.post(HTTP_HOST + 'api/tablet/GetPaperSize', {})
|
this.style_datas.length = 0
|
||||||
.then(response => {
|
|
||||||
console.log(response);
|
|
||||||
if (response.status == "200") {
|
|
||||||
let data = response.data;
|
|
||||||
if (data.result == "Y") {
|
|
||||||
data.data.forEach(x => {
|
|
||||||
this.paperlist.push({ name: x.paperName, id: x.paperID, width: x.width, height: x.height })
|
|
||||||
$('#<%= ddlPageSize.ClientID %>').append(`<option value="${x.paperID}">${x.paperName}</option>`);
|
|
||||||
$('#<%= ddlPrintSize.ClientID %>').append(`<option value="${x.paperID}">${x.paperName}</option>`);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#<%= ddlPageSize.ClientID %>').val($("#<%= hidPageSize.ClientID %>").val())
|
|
||||||
$('#<%= ddlPrintSize.ClientID %>').val($("#<%= hidPrintSize.ClientID %>").val())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(
|
|
||||||
error => console.log(error)
|
|
||||||
)
|
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.post(HTTP_HOST + 'api/tablet/GetStyleData', {})
|
.post(HTTP_HOST + 'api/tablet/GetStyleData', {})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
console.log(response);
|
|
||||||
if (response.status == "200") {
|
if (response.status == "200") {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
if (data.result == "Y") {
|
if (data.result == "Y") {
|
||||||
data.data.forEach(x => {
|
this.style_datas = data.data
|
||||||
if (x.styleID != "000001") {
|
this.defaultStyle=$("#<%=hidDefaultStyle.ClientID %>").val()
|
||||||
this.stylelist.push({ styleID: x.styleID, name: x.name })
|
}
|
||||||
$('#<%= ddlDefaultStyle.ClientID %>').append(`<option value="${x.styleID}">${x.name}</option>`);
|
}})
|
||||||
//$("#defaultStyle").append(`<option value="${x.styleID}">${x.name}</option>`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#<%= ddlDefaultStyle.ClientID %>').val($("#<%= hidDefaultStyle.ClientID %>").val())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(
|
.catch(
|
||||||
error => console.log(error)
|
error => console.log(error)
|
||||||
)
|
)
|
||||||
@@ -492,7 +469,7 @@
|
|||||||
bom_editItem(item) {
|
bom_editItem(item) {
|
||||||
this.bom_editedIndex = this.bom_list.indexOf(item);
|
this.bom_editedIndex = this.bom_list.indexOf(item);
|
||||||
this.bom_editedItem = $.extend(true, {}, item);
|
this.bom_editedItem = $.extend(true, {}, item);
|
||||||
console.log("bom_editItem:", this.bom_editedIndex, this.bom_editedItem);
|
|
||||||
//debugger;
|
//debugger;
|
||||||
},
|
},
|
||||||
bom_deleteItem(item) {
|
bom_deleteItem(item) {
|
||||||
@@ -572,13 +549,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeSel(selType) {
|
changeSel(selType) {
|
||||||
if (selType=="ddlPageSize") {
|
let style = this.style_datas.find(x => x.styleID == this.defaultStyle)
|
||||||
$("#<%= hidPageSize.ClientID %>").val($("#<%= ddlPageSize.ClientID %>").val())
|
this.paperID = style.paperSize
|
||||||
} else if (selType == "ddlPrintSize") {
|
this.printID = style.printSize
|
||||||
$("#<%= hidPrintSize.ClientID %>").val($("#<%=ddlPrintSize.ClientID %>").val())
|
$("#<%= hidPageSize.ClientID %>").val(this.paperID)
|
||||||
} else if (selType == "ddlDefaultStyle") {
|
$("#<%=hidPrintSize.ClientID %>").val(this.printID)
|
||||||
$("#<%= hidDefaultStyle.ClientID %>").val($("#<%= ddlDefaultStyle.ClientID %>").val())
|
$("#<%=hidDefaultStyle.ClientID %>").val(this.defaultStyle)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -659,47 +636,43 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 label-sm-right">
|
<div class="row mb-1 label-sm-right">
|
||||||
<label class="col-sm-2 col-form-label">料號</label>
|
<%-- <label class="col-sm-2 col-form-label">料號</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<asp:TextBox ID="PARTNO" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入料號"></asp:TextBox>
|
<asp:TextBox ID="PARTNO" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入料號"></asp:TextBox>
|
||||||
</div>
|
</div>--%>
|
||||||
<label class="col-sm-2 col-form-label">項目名稱 *</label>
|
<label class="col-sm-2 col-form-label">項目名稱 *</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<asp:TextBox ID="subject" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入品項名稱"></asp:TextBox>
|
<asp:TextBox ID="subject" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入品項名稱"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="subject" runat="server" ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="subject" runat="server" ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row mb-1 label-sm-right">
|
|
||||||
<label class="col-sm-2 col-form-label">牌位編號開頭</label>
|
<label class="col-sm-2 col-form-label">牌位編號開頭</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<asp:TextBox ID="print_init" MaxLength="20" runat="server" CssClass="form-control" placeholder="請輸入牌位編號開頭"></asp:TextBox>
|
<asp:TextBox ID="print_init" MaxLength="20" runat="server" CssClass="form-control" placeholder="請輸入牌位編號開頭"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-1 label-sm-right">
|
||||||
|
|
||||||
<label class="col-sm-2 col-form-label">預設金額</label>
|
<label class="col-sm-2 col-form-label">預設金額</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<asp:TextBox ID="price" MaxLength="7" runat="server" CssClass="form-control" placeholder="請輸入預設金額"></asp:TextBox>
|
<asp:TextBox ID="price" MaxLength="7" runat="server" CssClass="form-control" placeholder="請輸入預設金額"></asp:TextBox>
|
||||||
<asp:RegularExpressionValidator ControlToValidate="price" Display="Dynamic" SetFocusOnError="true" ErrorMessage="只能輸入數字" ID="RegularExpressionValidator3" runat="server" ValidationExpression="^(-?\d+)(\.\d+)?$" />
|
<asp:RegularExpressionValidator ControlToValidate="price" Display="Dynamic" SetFocusOnError="true" ErrorMessage="只能輸入數字" ID="RegularExpressionValidator3" runat="server" ValidationExpression="^(-?\d+)(\.\d+)?$" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row mb-1 label-sm-right">
|
<label class="col-sm-2 col-form-label">預設版型</label>
|
||||||
<label class="col-sm-2 col-form-label">預設頁面尺寸</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<select ID="ddlPageSize" runat="server" onchange="VueApp.changeSel('ddlPageSize')"></select>
|
|
||||||
<asp:HiddenField ID="hidPageSize" runat="server" />
|
|
||||||
</div>
|
|
||||||
<label class="col-sm-2 col-form-label">預設列印尺寸</label>
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<select ID="ddlPrintSize" runat="server" onchange="VueApp.changeSel('ddlPrintSize')"></select>
|
<v-select
|
||||||
<asp:HiddenField ID="hidPrintSize" runat="server" />
|
:items="style_datas"
|
||||||
|
|
||||||
|
item-text="name" @change="changeSel('ddlDefaultStyle')"
|
||||||
|
item-value="styleID" v-model="defaultStyle">
|
||||||
|
</v-select>
|
||||||
|
<%-- <select ID="ddlDefaultStyle" runat="server"
|
||||||
|
onchange="VueApp.changeSel('ddlDefaultStyle')"></select>--%>
|
||||||
|
<asp:HiddenField ID="hidDefaultStyle" runat="server" />
|
||||||
|
<asp:HiddenField ID="hidPrintSize" runat="server" />
|
||||||
|
<asp:HiddenField ID="hidPageSize" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 label-sm-right">
|
|
||||||
<label class="col-sm-2 col-form-label">預設版型</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<select ID="ddlDefaultStyle" runat="server" onchange="VueApp.changeSel('ddlDefaultStyle')"></select>
|
|
||||||
<asp:HiddenField ID="hidDefaultStyle" runat="server" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" class="row mb-1 label-sm-right">
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" class="row mb-1 label-sm-right">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -909,7 +882,7 @@
|
|||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text >
|
<v-card-text >
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col v-for="item in search_dialog.current.keys"
|
<v-col v-for="item in search_dialog.current.keys" :key="item.value"
|
||||||
:cols="search_dialog.current.keys.length>1?6:12" >
|
: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-text-field v-model="item.value" :label="item.title" v-if="item.visible===undefined || item.visible==true "></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|||||||
@@ -42,21 +42,21 @@ public partial class admin_activity_item_reg : MyWeb.config
|
|||||||
BuildKind();
|
BuildKind();
|
||||||
subject.Text = prod.subject;
|
subject.Text = prod.subject;
|
||||||
print_init.Text = prod.print_init;
|
print_init.Text = prod.print_init;
|
||||||
PARTNO.Text = prod.partno;
|
//PARTNO.Text = prod.partno;
|
||||||
//kind.SelectedValue = prod.kind.ToString();
|
//kind.SelectedValue = prod.kind.ToString();
|
||||||
if (!isStrNull(prod.pageSize))
|
if (!isStrNull(prod.pageSize))
|
||||||
{
|
{
|
||||||
ddlPageSize.Value = prod.pageSize.ToString();
|
//ddlPageSize.Value = prod.pageSize.ToString();
|
||||||
hidPageSize.Value = prod.pageSize.ToString();
|
hidPageSize.Value = prod.pageSize.ToString();
|
||||||
}
|
}
|
||||||
if (!isStrNull(prod.printSize))
|
if (!isStrNull(prod.printSize))
|
||||||
{
|
{
|
||||||
ddlPrintSize.Value = prod.printSize.ToString();
|
//ddlPrintSize.Value = prod.printSize.ToString();
|
||||||
hidPrintSize.Value = prod.printSize.ToString();
|
hidPrintSize.Value = prod.printSize.ToString();
|
||||||
}
|
}
|
||||||
if (!isStrNull(prod.defaultStyle))
|
if (!isStrNull(prod.defaultStyle))
|
||||||
{
|
{
|
||||||
ddlDefaultStyle.Value = prod.defaultStyle.ToString();
|
//ddlDefaultStyle.Value = prod.defaultStyle.ToString();
|
||||||
hidDefaultStyle.Value = prod.defaultStyle.ToString();
|
hidDefaultStyle.Value = prod.defaultStyle.ToString();
|
||||||
}
|
}
|
||||||
if (prod.kind.HasValue)
|
if (prod.kind.HasValue)
|
||||||
@@ -136,18 +136,18 @@ public partial class admin_activity_item_reg : MyWeb.config
|
|||||||
int maxSort = _db.actItems.Max(x => (int?)x.sort_order) ?? 0;
|
int maxSort = _db.actItems.Max(x => (int?)x.sort_order) ?? 0;
|
||||||
actItem.subject = subject.Text;
|
actItem.subject = subject.Text;
|
||||||
actItem.print_init = print_init.Text;
|
actItem.print_init = print_init.Text;
|
||||||
actItem.partno = PARTNO.Text;
|
//actItem.partno = PARTNO.Text;
|
||||||
if (!isStrNull(ddlPageSize.Value))
|
if (!isStrNull(hidPageSize.Value))
|
||||||
{
|
{
|
||||||
actItem.pageSize = ddlPageSize.Value;
|
actItem.pageSize = hidPageSize.Value;
|
||||||
}
|
}
|
||||||
if (!isStrNull(ddlPrintSize.Value))
|
if (!isStrNull(hidPrintSize.Value))
|
||||||
{
|
{
|
||||||
actItem.printSize = ddlPrintSize.Value;
|
actItem.printSize = hidPrintSize.Value;
|
||||||
}
|
}
|
||||||
if (!isStrNull(ddlDefaultStyle.Value))
|
if (!isStrNull(hidDefaultStyle.Value))
|
||||||
{
|
{
|
||||||
actItem.defaultStyle = (ddlDefaultStyle.Value);
|
actItem.defaultStyle = (hidDefaultStyle.Value);
|
||||||
}
|
}
|
||||||
//if (!isStrNull(kind.SelectedValue)) { actItem.kind = Val(kind.SelectedValue); } else { actItem.kind = null; }
|
//if (!isStrNull(kind.SelectedValue)) { actItem.kind = Val(kind.SelectedValue); } else { actItem.kind = null; }
|
||||||
if (!isStrNull(category.SelectedValue)) { actItem.category = Val(category.SelectedValue); } else { actItem.category = null; }
|
if (!isStrNull(category.SelectedValue)) { actItem.category = Val(category.SelectedValue); } else { actItem.category = null; }
|
||||||
@@ -196,7 +196,7 @@ public partial class admin_activity_item_reg : MyWeb.config
|
|||||||
{
|
{
|
||||||
actItem.subject = subject.Text;
|
actItem.subject = subject.Text;
|
||||||
actItem.print_init = print_init.Text;
|
actItem.print_init = print_init.Text;
|
||||||
actItem.partno = PARTNO.Text;
|
//actItem.partno = PARTNO.Text;
|
||||||
if (!isStrNull(hidPageSize.Value))
|
if (!isStrNull(hidPageSize.Value))
|
||||||
{
|
{
|
||||||
actItem.pageSize = hidPageSize.Value;
|
actItem.pageSize = hidPageSize.Value;
|
||||||
|
|||||||
@@ -12,19 +12,54 @@
|
|||||||
</v-text-field>
|
</v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="2" md="2">
|
<v-col cols="2" md="2">
|
||||||
<v-text-field label="法會名稱">
|
<v-text-field label="法會名稱" v-model="search.subject">
|
||||||
|
|
||||||
</v-text-field>
|
</v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="2" md="2">
|
<v-col cols="2" md="2">
|
||||||
<v-text-field label="開始日期">
|
<!--<v-text-field label="開始日期" v-model="search.uptime1">
|
||||||
|
|
||||||
</v-text-field>
|
</v-text-field>-->
|
||||||
|
<v-menu v-model="startmenu"
|
||||||
|
:close-on-content-click="false"
|
||||||
|
:nudge-right="40"
|
||||||
|
transition="scale-transition"
|
||||||
|
offset-y
|
||||||
|
min-width="auto">
|
||||||
|
<template v-slot:activator="{ on, attrs }">
|
||||||
|
<v-text-field v-model="search.up_time1"
|
||||||
|
label="法會日期"
|
||||||
|
prepend-icon="mdi-calendar"
|
||||||
|
readonly
|
||||||
|
v-bind="attrs"
|
||||||
|
v-on="on"></v-text-field>
|
||||||
|
</template>
|
||||||
|
<v-date-picker v-model="search.up_time1"
|
||||||
|
@input="startmenu = false"></v-date-picker>
|
||||||
|
</v-menu>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
<!--<v-col cols="2" md="2">
|
||||||
|
<v-menu v-model="endmenu"
|
||||||
|
:close-on-content-click="false"
|
||||||
|
:nudge-right="40"
|
||||||
|
transition="scale-transition"
|
||||||
|
offset-y
|
||||||
|
min-width="auto">
|
||||||
|
<template v-slot:activator="{ on, attrs }">
|
||||||
|
<v-text-field v-model="search.up_time2"
|
||||||
|
label="結束日期"
|
||||||
|
prepend-icon="mdi-calendar"
|
||||||
|
readonly
|
||||||
|
v-bind="attrs"
|
||||||
|
v-on="on"></v-text-field>
|
||||||
|
</template>
|
||||||
|
<v-date-picker v-model="search.up_time2"
|
||||||
|
@input="endmenu = false"></v-date-picker>
|
||||||
|
</v-menu>
|
||||||
|
</v-col>-->
|
||||||
<v-col cols="2" md="2">
|
<v-col cols="2" md="2">
|
||||||
<v-text-field label="結束日期">
|
<v-btn @click.prevent="getDefault()">查詢</v-btn>
|
||||||
|
<v-btn @click.prevent="clearSearch()">清空條件</v-btn>
|
||||||
</v-text-field>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-expansion-panel-content>
|
</v-expansion-panel-content>
|
||||||
@@ -91,6 +126,8 @@
|
|||||||
this_act:'',
|
this_act:'',
|
||||||
options: { multiSort: false },
|
options: { multiSort: false },
|
||||||
search_options: { multiSort: false },
|
search_options: { multiSort: false },
|
||||||
|
startmenu: false,
|
||||||
|
endmenu: false,
|
||||||
data_table: {
|
data_table: {
|
||||||
loading: true,
|
loading: true,
|
||||||
list: [],
|
list: [],
|
||||||
@@ -270,6 +307,10 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
clearSearch() {
|
||||||
|
this.search.subject = ""
|
||||||
|
this.search.up_time1=""
|
||||||
|
},
|
||||||
gotoSignup(item) {
|
gotoSignup(item) {
|
||||||
this.$emit('custom-event', { action: 'add', item: item });
|
this.$emit('custom-event', { action: 'add', item: item });
|
||||||
},
|
},
|
||||||
@@ -305,7 +346,7 @@
|
|||||||
sessionStorage.setItem('orderpage', clearpage ? '1' : page);
|
sessionStorage.setItem('orderpage', clearpage ? '1' : page);
|
||||||
axios
|
axios
|
||||||
//.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
|
//.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
|
||||||
.post(HTTP_HOST + 'api/activity/GetList', this.search, { params: params })
|
.post(HTTP_HOST + 'api/activity/GetListNew', this.search, { params: params })
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.data_table.list = response.data.list
|
this.data_table.list = response.data.list
|
||||||
this.data_table.count = response.data.count;
|
this.data_table.count = response.data.count;
|
||||||
|
|||||||
@@ -1,51 +1,55 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<template>
|
<v-card>
|
||||||
<v-btn @click.prevent='fast_signup'>快速報名</v-btn>
|
<v-card-title class="bg-primary white--text text-center">
|
||||||
</template>
|
<v-btn @click.prevent='fast_signup'>快速報名</v-btn>
|
||||||
<v-data-table v-model="detail_table.selected"
|
<v-btn @click.prevent="back01()" class="ms-auto">返回</v-btn>
|
||||||
:items="detail_table.list"
|
</v-card-title>
|
||||||
:search-props="search"
|
<v-card-text>
|
||||||
item-key="order_no"
|
<v-data-table v-model="detail_table.selected"
|
||||||
:options.sync="options"
|
:items="detail_table.list"
|
||||||
:headers="detail_table.header"
|
:search-props="search"
|
||||||
:footer-props="detail_table.footer"
|
item-key="order_no"
|
||||||
:server-items-length="detail_table.count"
|
:options.sync="options"
|
||||||
:loading="detail_table.loading"
|
:headers="detail_table.header"
|
||||||
:single-select="detail_table.singleSelect"
|
:footer-props="detail_table.footer"
|
||||||
show-select
|
:server-items-length="detail_table.count"
|
||||||
hide-default-footer
|
:loading="detail_table.loading"
|
||||||
:page.sync="detail_table.page"
|
:single-select="detail_table.singleSelect"
|
||||||
:items-per-page.sync="detail_table.pageSize"
|
show-select
|
||||||
class="elevation-1">
|
hide-default-footer
|
||||||
<template #item.slot_btn="{ item }">
|
:page.sync="detail_table.page"
|
||||||
<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>
|
:items-per-page.sync="detail_table.pageSize"
|
||||||
<a @click="$root.currentView='step-three';$root.selected_order=item.order_no" class="btn btn-outline-secondary btn-sm">明細</a>
|
class="elevation-1">
|
||||||
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
<template #item.slot_btn="{ item }">
|
||||||
</template>
|
<!--<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>
|
||||||
</v-data-table>
|
<a @click="$root.currentView='step-three';$root.selected_order=item.order_no" class="btn btn-outline-secondary btn-sm">明細</a>
|
||||||
<v-container>
|
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>-->
|
||||||
<v-row class="align-baseline" wrap>
|
</template>
|
||||||
<v-col cols="12" md="9">
|
</v-data-table>
|
||||||
<v-pagination v-model="detail_table.page"
|
<v-container>
|
||||||
:length="pageCount">
|
<v-row class="align-baseline" wrap>
|
||||||
</v-pagination>
|
<v-col cols="12" md="9">
|
||||||
</v-col>
|
<v-pagination v-model="detail_table.page"
|
||||||
<v-col class="text-truncate text-right" cols="12" md="2">
|
:length="pageCount">
|
||||||
共 {{ detail_table.count }} 筆, 頁數:
|
</v-pagination>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="6" md="1">
|
<v-col class="text-truncate text-right" cols="12" md="2">
|
||||||
<v-text-field v-model="detail_table.page"
|
共 {{ detail_table.count }} 筆, 頁數:
|
||||||
type="number"
|
</v-col>
|
||||||
hide-details
|
<v-col cols="6" md="1">
|
||||||
dense
|
<v-text-field v-model="detail_table.page"
|
||||||
min="1"
|
type="number"
|
||||||
:max="pageCount"
|
hide-details
|
||||||
@input="detail_table.page = parseInt($event, 10)"></v-text-field>
|
dense
|
||||||
</v-col>
|
min="1"
|
||||||
</v-row>
|
:max="pageCount"
|
||||||
</v-container>
|
@input="detail_table.page = parseInt($event, 10)"></v-text-field>
|
||||||
</div>
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-container>
|
||||||
|
</v-card-text>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -113,8 +117,11 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
back01() {
|
||||||
|
this.$emit('custom-event', { action: 'signup1', item: this.num });
|
||||||
|
},
|
||||||
fast_signup() {
|
fast_signup() {
|
||||||
this.$emit('custom-event', { action: 'add', item: null });
|
this.$emit('custom-event', { action: 'add', item: this.num });
|
||||||
},
|
},
|
||||||
getDetail() {
|
getDetail() {
|
||||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
|
|
||||||
<v-dialog v-model="transfer_dialog.show" style="width: 300px !important; height: 300px !important;">
|
<v-dialog v-model="transfer_dialog.show" width="300px" style="width: 300px !important; height: 300px !important;">
|
||||||
<template>
|
<template>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
@@ -204,10 +204,12 @@
|
|||||||
copytablet(item) {
|
copytablet(item) {
|
||||||
let t = this.act_items.find(x => x.act_item_selected.val == item.changeActitem)
|
let t = this.act_items.find(x => x.act_item_selected.val == item.changeActitem)
|
||||||
let newTablet = structuredClone(item)
|
let newTablet = structuredClone(item)
|
||||||
newTablet.id = this.tablet_list.length+1
|
newTablet.id = this.tablet_list.length + 1
|
||||||
|
//console.log("copytablet:",newTablet.nu, newTablet.actitem_num_selected, item.changeActitem);
|
||||||
newTablet.actitem_num_selected.val = t.act_item_selected.val
|
newTablet.actitem_num_selected.val = t.act_item_selected.val
|
||||||
newTablet.actitem_num_selected.text = t.act_item_selected.text
|
newTablet.actitem_num_selected.text = t.act_item_selected.text
|
||||||
newTablet.changeActitem = ""
|
|
||||||
|
newTablet.changeActitem = item.changeActitem
|
||||||
newTablet.disabled=false
|
newTablet.disabled=false
|
||||||
this.tablet_list.push(newTablet)
|
this.tablet_list.push(newTablet)
|
||||||
},
|
},
|
||||||
@@ -226,7 +228,7 @@
|
|||||||
// ...x,selected:""
|
// ...x,selected:""
|
||||||
// }))
|
// }))
|
||||||
//}
|
//}
|
||||||
console.log("QOO:",this.act_items)
|
//console.log("QOO:",this.act_items)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
console.log("查無資料");
|
console.log("查無資料");
|
||||||
@@ -243,7 +245,7 @@
|
|||||||
.post(HTTP_HOST + 'api/follower/GetFollowerNew', this.search)
|
.post(HTTP_HOST + 'api/follower/GetFollowerNew', this.search)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.data.list) {
|
if (response.data.list) {
|
||||||
console.log(response.data.list)
|
//console.log(response.data.list)
|
||||||
if (response.data.list.length > 1) {
|
if (response.data.list.length > 1) {
|
||||||
//alert("相同條件不只一人")
|
//alert("相同條件不只一人")
|
||||||
this.message_dialog.show = true
|
this.message_dialog.show = true
|
||||||
@@ -276,8 +278,15 @@
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.data.list && response.data.list.length > 0) {
|
if (response.data.list && response.data.list.length > 0) {
|
||||||
this.orders = response.data.list
|
this.orders = response.data.list
|
||||||
|
//先確定是否有報名過
|
||||||
|
let o = this.orders.find(x => x.activity_num === this.num)
|
||||||
|
if (o != null && o != undefined) {
|
||||||
|
this.message_dialog.show = true
|
||||||
|
this.message_dialog.message="此人已有報名資料,請勿重複報名"
|
||||||
|
return
|
||||||
|
}
|
||||||
this.orders = this.orders.filter(x => x.activity_num !== this.num)
|
this.orders = this.orders.filter(x => x.activity_num !== this.num)
|
||||||
console.log("orders",this.orders)
|
//console.log("orders",this.orders)
|
||||||
if (this.orders && this.orders.length > 0) {
|
if (this.orders && this.orders.length > 0) {
|
||||||
|
|
||||||
this.getOrderDetail()
|
this.getOrderDetail()
|
||||||
@@ -356,7 +365,7 @@
|
|||||||
if (mid_left) {
|
if (mid_left) {
|
||||||
returnVal = returnVal + "<br>左正名:" + mid_left.map(x => x.fam_name).join("、")
|
returnVal = returnVal + "<br>左正名:" + mid_left.map(x => x.fam_name).join("、")
|
||||||
}
|
}
|
||||||
return item.actitem_num_selected.val+":" + returnVal
|
return returnVal //item.actitem_num_selected.val+":" +
|
||||||
},
|
},
|
||||||
success_confirm() {
|
success_confirm() {
|
||||||
this.message_dialog.show = false
|
this.message_dialog.show = false
|
||||||
@@ -371,7 +380,7 @@
|
|||||||
this.tablet_list.forEach(x => {
|
this.tablet_list.forEach(x => {
|
||||||
|
|
||||||
if (x.actitem_num_checked && x.actitem_num_checked == true) {
|
if (x.actitem_num_checked && x.actitem_num_checked == true) {
|
||||||
console.log("OOQ:", x.num)
|
//console.log("OOQ:", x.num)
|
||||||
let actItem = this.act_items.find(y => y.act_item_selected.val == x.actitem_num_selected.val)
|
let actItem = this.act_items.find(y => y.act_item_selected.val == x.actitem_num_selected.val)
|
||||||
detail.push({
|
detail.push({
|
||||||
num: x.num, order_no: x.order_no, change_item_num: x.changeActitem,
|
num: x.num, order_no: x.order_no, change_item_num: x.changeActitem,
|
||||||
@@ -386,18 +395,20 @@
|
|||||||
activity_num: this.num, f_num: this.follower.num,
|
activity_num: this.num, f_num: this.follower.num,
|
||||||
details: detail
|
details: detail
|
||||||
}
|
}
|
||||||
|
//console.log("saveOrderDetail:",detail);
|
||||||
axios
|
axios
|
||||||
.post(HTTP_HOST + 'api/order/SaveWithDetails', main)
|
.post(HTTP_HOST + 'api/order/SaveWithDetails', main)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.result && response.result === "Y") {
|
//console.log("哪尼:",response)
|
||||||
console.log("shit");
|
if (response.data.result && response.data.result === "Y") {
|
||||||
|
//console.log("shit");
|
||||||
}
|
}
|
||||||
console.log("蝦:", response)
|
//console.log("蝦:", response)
|
||||||
this.message_dialog.show_confirm = true
|
this.message_dialog.show_confirm = true
|
||||||
this.message_dialog.show = true
|
this.message_dialog.show = true
|
||||||
this.message_dialog.message = response.message
|
this.message_dialog.message = response.data.message
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
this.message_dialog.show_confirm = false
|
||||||
this.message_dialog.show = true
|
this.message_dialog.show = true
|
||||||
this.message_dialog.message =error
|
this.message_dialog.message =error
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|||||||
Reference in New Issue
Block a user