快速報名
This commit is contained in:
@@ -43,6 +43,7 @@ namespace Model.ViewModel
|
|||||||
public string country { get; set; }
|
public string country { get; set; }
|
||||||
public string country2 { get; set; }
|
public string country2 { get; set; }
|
||||||
public string phone_idcode { get; set; } // 電話/證號搜尋欄位
|
public string phone_idcode { get; set; } // 電話/證號搜尋欄位
|
||||||
|
public string cellphone { get; set; }
|
||||||
}
|
}
|
||||||
public class followers_tablet
|
public class followers_tablet
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ namespace Model.ViewModel
|
|||||||
|
|
||||||
public List<pro_order_detail> details { get; set; }
|
public List<pro_order_detail> details { get; set; }
|
||||||
|
|
||||||
|
public follower f_user { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class pro_order_detail
|
public class pro_order_detail
|
||||||
@@ -85,6 +87,10 @@ namespace Model.ViewModel
|
|||||||
public string follower_name { get; set; }
|
public string follower_name { get; set; }
|
||||||
public string full_description { get; set; }
|
public string full_description { get; set; }
|
||||||
public string order_info { get; set; }
|
public string order_info { get; set; }
|
||||||
|
public string style { get; set; }
|
||||||
|
|
||||||
|
public List<family_members> mid_items { get; set; }
|
||||||
|
public List<family_members> left_items { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1008,6 +1008,7 @@ public class activityController : ApiController
|
|||||||
{
|
{
|
||||||
text = x.actItem?.subject,
|
text = x.actItem?.subject,
|
||||||
val = x.actItem_num,
|
val = x.actItem_num,
|
||||||
|
style=x.actItem.defaultStyle
|
||||||
},
|
},
|
||||||
price = x.price ?? 0,
|
price = x.price ?? 0,
|
||||||
qty = x.qty ?? 0,
|
qty = x.qty ?? 0,
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
using Model;
|
using Model;
|
||||||
using MyWeb;
|
using MyWeb;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
|
||||||
|
using Org.BouncyCastle.Utilities.Encoders;
|
||||||
using PagedList;
|
using PagedList;
|
||||||
using System;
|
using System;
|
||||||
using System.Activities.Expressions;
|
using System.Activities.Expressions;
|
||||||
@@ -202,6 +204,142 @@ public class orderController : ApiController
|
|||||||
var count = _db.pro_order.Count();
|
var count = _db.pro_order.Count();
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Route("api/order/AddOrderWithDetail")]
|
||||||
|
public IHttpActionResult AddOrderWithDetail([FromBody] Model.ViewModel.pro_order q)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MyWeb.encrypt encrypt = new MyWeb.encrypt();
|
||||||
|
//先塞信眾
|
||||||
|
Model.follower follower = new Model.follower();
|
||||||
|
follower.u_name = q.f_user.u_name;
|
||||||
|
follower.phone = encrypt.EncryptAutoKey(q.f_user.phone);
|
||||||
|
follower.cellphone = encrypt.EncryptAutoKey(q.f_user.cellphone);
|
||||||
|
follower.country = q.f_user.country;
|
||||||
|
follower.id_code = q.f_user.id_code;
|
||||||
|
follower.sex = q.f_user.sex;
|
||||||
|
follower.identity_type = q.f_user.identity_type;
|
||||||
|
follower.birthday = q.f_user.birthday;
|
||||||
|
string sex = q.f_user.sex;
|
||||||
|
follower.f_number = Model.follower.generate_f_number(sex);
|
||||||
|
_db.followers.Add(follower);
|
||||||
|
_db.SaveChanges();
|
||||||
|
int _id = follower.num;//取回信眾的sql server自動編號
|
||||||
|
Hashtable ht= new Hashtable();
|
||||||
|
//再塞親友
|
||||||
|
foreach (var detail in q.details)
|
||||||
|
{
|
||||||
|
//要考慮相同名字只能塞一次,下一個遇到要幫他塞回num
|
||||||
|
foreach (var mid in detail.mid_items)
|
||||||
|
{
|
||||||
|
if (ht.ContainsKey(mid.fam_name))
|
||||||
|
{
|
||||||
|
mid.num = int.Parse(ht[mid.fam_name].ToString());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Model.family_members fam = new Model.family_members();
|
||||||
|
fam.follower_num = _id;
|
||||||
|
fam.fam_name = mid.fam_name;
|
||||||
|
fam.deceased = mid.deceased;
|
||||||
|
_db.family_members.Add(fam);
|
||||||
|
_db.SaveChanges();
|
||||||
|
|
||||||
|
mid.num = fam.num;
|
||||||
|
ht.Add(mid.fam_name, fam.num);
|
||||||
|
}
|
||||||
|
foreach (var left in detail.left_items)
|
||||||
|
{
|
||||||
|
if (ht.ContainsKey(left.fam_name))
|
||||||
|
{
|
||||||
|
left.num =int.Parse( ht[left.fam_name].ToString());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Model.family_members fam = new Model.family_members();
|
||||||
|
fam.follower_num = _id;
|
||||||
|
fam.fam_name = left.fam_name;
|
||||||
|
fam.deceased = left.deceased;
|
||||||
|
_db.family_members.Add(fam);
|
||||||
|
_db.SaveChanges();
|
||||||
|
left.num = fam.num;
|
||||||
|
ht.Add(left.fam_name, fam.num);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//再來報名主檔
|
||||||
|
Model.pro_order order = new Model.pro_order();
|
||||||
|
order.order_no = createOrderNumber();
|
||||||
|
order.up_time = DateTime.Now;
|
||||||
|
order.reg_time = DateTime.Now;
|
||||||
|
order.keyin1 = "A01";
|
||||||
|
order.f_num = _id;
|
||||||
|
order.phone = !string.IsNullOrEmpty(q.f_user.phone)?
|
||||||
|
encrypt.EncryptAutoKey(q.f_user.phone): encrypt.EncryptAutoKey(q.f_user.cellphone);
|
||||||
|
order.activity_num = q.activity_num;
|
||||||
|
order.address = q.f_user.address;
|
||||||
|
order.demo = "";
|
||||||
|
order.send_receipt=false;
|
||||||
|
_db.pro_order.Add(order);
|
||||||
|
//最後功德項目
|
||||||
|
foreach (var detail in q.details)
|
||||||
|
{
|
||||||
|
Model.pro_order_detail o_detail = new Model.pro_order_detail();
|
||||||
|
o_detail.order_no = order.order_no;
|
||||||
|
o_detail.actItem_num = detail.actItem_num;
|
||||||
|
o_detail.price = detail.price;
|
||||||
|
o_detail.qty = detail.qty;
|
||||||
|
o_detail.printed_files = detail.printed_files;
|
||||||
|
o_detail.style = detail.style;
|
||||||
|
Newtonsoft.Json.Linq.JArray mid_items = new Newtonsoft.Json.Linq.JArray();
|
||||||
|
foreach (var data in detail.mid_items)
|
||||||
|
{
|
||||||
|
Newtonsoft.Json.Linq.JObject item = new Newtonsoft.Json.Linq.JObject();
|
||||||
|
item["num"] = data.num;
|
||||||
|
item["fam_name"] = data.fam_name;
|
||||||
|
item["fam_gender"] = "";
|
||||||
|
item["deceased"] = data.deceased;
|
||||||
|
item["fam_title"] = "";
|
||||||
|
item["option_break"] = false;
|
||||||
|
item["IsShuWen"] = false;
|
||||||
|
mid_items.Add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
Newtonsoft.Json.Linq.JArray left_items = new Newtonsoft.Json.Linq.JArray();
|
||||||
|
foreach (var data in detail.left_items)
|
||||||
|
{
|
||||||
|
Newtonsoft.Json.Linq.JObject item = new Newtonsoft.Json.Linq.JObject();
|
||||||
|
item["num"] = data.num;
|
||||||
|
item["fam_name"] = data.fam_name;
|
||||||
|
item["fam_gender"] = "";
|
||||||
|
item["deceased"] = data.deceased;
|
||||||
|
item["fam_title"] = "";
|
||||||
|
item["option_break"] = false;
|
||||||
|
item["IsShuWen"] = false;
|
||||||
|
left_items.Add(item);
|
||||||
|
}
|
||||||
|
Newtonsoft.Json.Linq.JObject tablet = new Newtonsoft.Json.Linq.JObject();
|
||||||
|
tablet["mid_items"] = mid_items;
|
||||||
|
tablet["left_items"] = left_items;
|
||||||
|
o_detail.f_num_tablet = tablet.ToString();
|
||||||
|
_db.pro_order_detail.Add(o_detail);
|
||||||
|
}
|
||||||
|
_db.SaveChanges();
|
||||||
|
|
||||||
|
return Ok(new
|
||||||
|
{
|
||||||
|
result = "Y",message="報名成功"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return Ok(new
|
||||||
|
{
|
||||||
|
result = "N",message=ex.Message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("api/order/GetList")]
|
[Route("api/order/GetList")]
|
||||||
public IHttpActionResult GetList([FromBody] Model.ViewModel.pro_order q, int page, int pageSize = 10,
|
public IHttpActionResult GetList([FromBody] Model.ViewModel.pro_order q, int page, int pageSize = 10,
|
||||||
|
|||||||
@@ -3,7 +3,10 @@
|
|||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title class="bg-primary white--text text-center">
|
<v-card-title class="bg-primary white--text text-center">
|
||||||
<h5 class="mb-0">快速報名</h5>
|
<h5 class="mb-0">快速報名</h5>
|
||||||
<v-btn class="ms-auto" @click.prevent="saveOrder()">儲存</v-btn>
|
<div class="ms-auto">
|
||||||
|
<v-btn @click.prevent="saveOrder()" v-if="follower.f_number!=undefined&&follower.f_number!=''">儲存</v-btn>
|
||||||
|
<v-btn @click.prevent="back01()">返回</v-btn>
|
||||||
|
</div>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-row>
|
<v-row>
|
||||||
@@ -27,7 +30,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
<v-row>
|
<v-row v-if="follower.f_number!=undefined&&follower.f_number!=''">
|
||||||
<v-col cols="12" md="2">
|
<v-col cols="12" md="2">
|
||||||
<v-text-field v-model="follower.f_number" readonly
|
<v-text-field v-model="follower.f_number" readonly
|
||||||
label="信眾編號"></v-text-field>
|
label="信眾編號"></v-text-field>
|
||||||
@@ -53,14 +56,14 @@
|
|||||||
label="護照號碼"></v-text-field>
|
label="護照號碼"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row>
|
<v-row v-if="follower.f_number!=undefined&&follower.f_number!=''">
|
||||||
<v-col cols="12" md="12">
|
<v-col cols="12" md="12">
|
||||||
<v-text-field v-model="follower.address" readonly
|
<v-text-field v-model="follower.address" readonly
|
||||||
label="地址"></v-text-field>
|
label="地址"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<hr class="hr-text" data-content="前次法會功德">
|
<hr class="hr-text" data-content="前次法會功德" v-if="follower.f_number!=undefined&&follower.f_number!=''">
|
||||||
<v-row v-show="tablet_show">
|
<v-row v-show="tablet_show">
|
||||||
<v-col cols="12" sm="12">
|
<v-col cols="12" sm="12">
|
||||||
<v-data-iterator :items="tablet_list" :items-per-page="-1"
|
<v-data-iterator :items="tablet_list" :items-per-page="-1"
|
||||||
@@ -108,6 +111,21 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</template>
|
</template>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<v-dialog v-model="transfer_dialog.show" style="width: 300px !important; height: 300px !important;">
|
||||||
|
<template>
|
||||||
|
<v-card>
|
||||||
|
<v-card-title>
|
||||||
|
{{ transfer_dialog.message }}
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text>
|
||||||
|
<v-btn @click.prevent="transfer_dialog.show=false">關閉</v-btn>
|
||||||
|
<v-btn @click.prevent="gotoSignUp4()">報名並將資料回寫信眾資料</v-btn>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
|
</v-dialog>
|
||||||
</v-container>
|
</v-container>
|
||||||
|
|
||||||
|
|
||||||
@@ -122,6 +140,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
transfer_dialog: { show: false, message: "" },
|
||||||
message_dialog: { show: false, message: "" },
|
message_dialog: { show: false, message: "" },
|
||||||
idNo: "",
|
idNo: "",
|
||||||
phoneNum: "",
|
phoneNum: "",
|
||||||
@@ -143,6 +162,12 @@
|
|||||||
this.getActItem()
|
this.getActItem()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
back01() {
|
||||||
|
this.$emit('custom-event', { action: 'signup1', item: this.num });
|
||||||
|
},
|
||||||
|
gotoSignUp4() {
|
||||||
|
this.$emit('custom-event', { action: 'signup4', item: this.num });
|
||||||
|
},
|
||||||
renderDisabled(item) {
|
renderDisabled(item) {
|
||||||
if (item.disabled) {
|
if (item.disabled) {
|
||||||
return "disabled-checkbox"
|
return "disabled-checkbox"
|
||||||
@@ -181,7 +206,11 @@
|
|||||||
//alert("相同條件不只一人")
|
//alert("相同條件不只一人")
|
||||||
this.message_dialog.show = true
|
this.message_dialog.show = true
|
||||||
this.message_dialog.message = "相同條件不只一人,請增加查詢條件"
|
this.message_dialog.message = "相同條件不只一人,請增加查詢條件"
|
||||||
|
} else if (response.data.list.length==0) {
|
||||||
|
this.transfer_dialog.show = true
|
||||||
|
this.transfer_dialog.message = "查無信眾資料"
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.tablet_show = true
|
this.tablet_show = true
|
||||||
this.follower = response.data.list[0]
|
this.follower = response.data.list[0]
|
||||||
this.getOrder()
|
this.getOrder()
|
||||||
|
|||||||
@@ -0,0 +1,434 @@
|
|||||||
|
<template>
|
||||||
|
<v-container>
|
||||||
|
<v-card>
|
||||||
|
<v-card-title class ="bg-primary white--text text-center">
|
||||||
|
<h4>快速報名</h4>
|
||||||
|
<div class="ms-auto">
|
||||||
|
<v-btn @click.prevent="addOrderWithDetail()">儲存</v-btn>
|
||||||
|
<v-btn @click.prevent="back01()">返回</v-btn>
|
||||||
|
</div>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text>
|
||||||
|
<v-row>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-text-field v-model="follower.u_name" :rules="requiredrules"
|
||||||
|
label="*姓名"></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-text-field v-model="follower.phone" :rules="phonerules"
|
||||||
|
label="*電話"></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-text-field v-model="follower.cellphone" :rules="cellrules"
|
||||||
|
label="*行動電話"></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-select :items="countrys" :rules="requiredrules"
|
||||||
|
label="*國籍"
|
||||||
|
item-text="name_zh"
|
||||||
|
item-value="id" v-model="follower.country">
|
||||||
|
</v-select>
|
||||||
|
<!--<v-text-field v-model="follower.country" :rules="requiredrules"
|
||||||
|
label="*國籍"></v-text-field>-->
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-text-field v-model="follower.id_code"
|
||||||
|
label="身分證號碼"></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-text-field v-model="follower.passport"
|
||||||
|
label="旅行證件號碼"></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-select :items="sex_items" :rules="requiredrules"
|
||||||
|
label="*性別"
|
||||||
|
item-text="text"
|
||||||
|
item-value="val" v-model="follower.sex">
|
||||||
|
</v-select>
|
||||||
|
<!--<v-text-field v-model="follower.sex" :rules="[rules.required]"
|
||||||
|
label="*性別"></v-text-field>-->
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-select :items="identity_items" :rules="requiredrules"
|
||||||
|
label="*身分別"
|
||||||
|
item-text="text"
|
||||||
|
item-value="val" v-model="follower.identity_type">
|
||||||
|
</v-select>
|
||||||
|
<!--<v-text-field v-model="follower.identity_type" :rules="[rules.required]"
|
||||||
|
label="*身分別"></v-text-field>-->
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-menu v-model="menu"
|
||||||
|
: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="follower.birthday"
|
||||||
|
label="生日"
|
||||||
|
prepend-icon="mdi-calendar"
|
||||||
|
readonly
|
||||||
|
v-bind="attrs"
|
||||||
|
v-on="on"></v-text-field>
|
||||||
|
</template>
|
||||||
|
<v-date-picker v-model="follower.birthday"
|
||||||
|
@input="menu = false"></v-date-picker>
|
||||||
|
</v-menu>
|
||||||
|
<!--<v-date-picker v-model="follower.birthday"
|
||||||
|
label="生日"></v-date-picker>-->
|
||||||
|
<!--<v-text-field v-model="follower.birthday"
|
||||||
|
label="生日"></v-text-field>-->
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-checkbox v-model="follower.send_receipt"
|
||||||
|
label="寄送收據"></v-checkbox>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="4" md="4">
|
||||||
|
<v-text-field v-model="follower.receipt_title"
|
||||||
|
label="收據抬頭"></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="12" md="12">
|
||||||
|
<v-text-field v-model="follower.address"
|
||||||
|
label="地址"></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<hr class="hr-text" data-content="功德項目">
|
||||||
|
<v-row>
|
||||||
|
<v-col cols="3" md="3">
|
||||||
|
<v-select :items="act_items"
|
||||||
|
label="功德項目"
|
||||||
|
item-text="act_item_selected.text"
|
||||||
|
item-value="act_item_selected.val" v-model="select_act_item">
|
||||||
|
</v-select>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="2" md="2">
|
||||||
|
<v-btn @click.prevent="newTablet()">新增</v-btn>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
|
<v-row>
|
||||||
|
<v-col cols="12" md="12">
|
||||||
|
<v-expansion-panels>
|
||||||
|
<v-expansion-panel v-for="(item,i) in tablets"
|
||||||
|
:key="i">
|
||||||
|
<v-expansion-panel-header>
|
||||||
|
<h2>{{ item.actItem_subject }}</h2>
|
||||||
|
</v-expansion-panel-header>
|
||||||
|
<v-expansion-panel-content>
|
||||||
|
<v-container>
|
||||||
|
<v-row>
|
||||||
|
<v-col col="12" md="1">
|
||||||
|
標題
|
||||||
|
</v-col>
|
||||||
|
<v-col col="12" md="11">
|
||||||
|
<v-row>
|
||||||
|
<v-col>
|
||||||
|
<v-text-field v-model="title_new.name"
|
||||||
|
label="姓名"></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<v-col>
|
||||||
|
<v-select :items="live_select"
|
||||||
|
label="存/歿"
|
||||||
|
item-text="text"
|
||||||
|
item-value="val" v-model="title_new.islive">
|
||||||
|
</v-select>
|
||||||
|
<!--<v-text-field v-model="title_new.islive"
|
||||||
|
label="存/歿"></v-text-field>-->
|
||||||
|
</v-col>
|
||||||
|
<v-col>
|
||||||
|
<v-btn @click.prevent="addTitle(item)">加入</v-btn>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row>
|
||||||
|
<v-col cols="12" md="12">
|
||||||
|
{{ renderContent( item.tablet.title) }}
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row v-if="checkType(item)">
|
||||||
|
<v-col col="12" md="1">
|
||||||
|
陽上
|
||||||
|
</v-col>
|
||||||
|
<v-col col="12" md="11">
|
||||||
|
<v-row>
|
||||||
|
<v-col>
|
||||||
|
<v-text-field v-model="alive_new.name"
|
||||||
|
label="姓名"></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<v-col>
|
||||||
|
<v-select :items="live_select"
|
||||||
|
label="存/歿"
|
||||||
|
item-text="text"
|
||||||
|
item-value="val" v-model="alive_new.islive">
|
||||||
|
</v-select>
|
||||||
|
<!--<v-text-field v-model="alive_new.islive"
|
||||||
|
label="存/歿"></v-text-field>-->
|
||||||
|
</v-col>
|
||||||
|
<v-col>
|
||||||
|
<v-btn @click.prevent="addLive(item)">加入</v-btn>
|
||||||
|
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row>
|
||||||
|
<v-col cols="12" md="12">
|
||||||
|
{{ renderContent( item.tablet.alive) }}
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-container>
|
||||||
|
</v-expansion-panel-content>
|
||||||
|
</v-expansion-panel>
|
||||||
|
</v-expansion-panels>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</v-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
module.exports = {
|
||||||
|
props: {
|
||||||
|
num: {
|
||||||
|
type: Number
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
follower: {
|
||||||
|
u_name: "", sex: "", identity_type: "", phone: "",
|
||||||
|
cellphone: "", country: "", address: "",
|
||||||
|
birthday: "", send_recript: "", receipt_title: "",
|
||||||
|
id_code:"",passport:""
|
||||||
|
},
|
||||||
|
act_items: [],
|
||||||
|
search: {},
|
||||||
|
date: new Date().toISOString().substr(0, 10),
|
||||||
|
menu: false,
|
||||||
|
tablets: [],
|
||||||
|
select_act_item: {},
|
||||||
|
title_new: { name: "", islive: true },
|
||||||
|
alive_new: { name: "", islive: true },
|
||||||
|
live_select: [
|
||||||
|
{ val: true, text: '存' },
|
||||||
|
{ val: false, text: '歿' },
|
||||||
|
],
|
||||||
|
requiredrules: [
|
||||||
|
v=>!!v||'必須填寫',
|
||||||
|
],
|
||||||
|
cellrules: [
|
||||||
|
v => (!!v||!!this.follower.phone) || '行動電話或電話為必須擇一填寫',
|
||||||
|
v => /^09\d{2}-?\d{3}-?\d{3}$/.test(v) || '行動電話必須為09xx-xxx-xxx',
|
||||||
|
],
|
||||||
|
phonerules: [
|
||||||
|
v => (!!v || !!this.follower.cellphone) || '行動電話或電話為必須擇一填寫',
|
||||||
|
],
|
||||||
|
sex_items: [
|
||||||
|
{ text: "男眾", val: "男眾" },
|
||||||
|
{ text: "女眾", val: "女眾" },
|
||||||
|
],
|
||||||
|
identity_items: [
|
||||||
|
{ text: "出家眾", val: "1" },
|
||||||
|
{ text: "個人", val: "2" },
|
||||||
|
{ text: "法人", val: "3" },
|
||||||
|
{ text: "往生菩薩", val: "4" },
|
||||||
|
{ text: "蓮友", val: "10" },
|
||||||
|
],
|
||||||
|
countrys:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.getActItem();
|
||||||
|
this.getCountrys();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
back01() {
|
||||||
|
this.$emit('custom-event', { action: 'signup1', item: this.num });
|
||||||
|
},
|
||||||
|
addOrderWithDetail() {
|
||||||
|
//組資料,信眾資料,報名資料,功德資料
|
||||||
|
console.log("addOrderWithDetail:",this.follower);
|
||||||
|
console.log("addOrderWithDetail:", this.tablets);
|
||||||
|
let details = []
|
||||||
|
|
||||||
|
|
||||||
|
this.tablets.forEach(x => {
|
||||||
|
let mid_items = []
|
||||||
|
let left_items = []
|
||||||
|
if (x.tablet.title) {
|
||||||
|
x.tablet.title.forEach(y => {
|
||||||
|
mid_items.push(
|
||||||
|
{
|
||||||
|
num: 0,
|
||||||
|
follower_num: 0,
|
||||||
|
fam_name: y.name,
|
||||||
|
deceased: !y.islive,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (x.tablet.alive) {
|
||||||
|
x.tablet.alive.forEach(y => {
|
||||||
|
left_items.push(
|
||||||
|
{
|
||||||
|
num: 0,
|
||||||
|
follower_num: 0,
|
||||||
|
fam_name: y.name,
|
||||||
|
deceased: !y.islive,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//let f_num_tablet = {
|
||||||
|
// mid_items: mid_items,
|
||||||
|
// left_items:left_items
|
||||||
|
//}//這應該只存名字跟存歿,因為還要先存親友資料取得num
|
||||||
|
details.push({
|
||||||
|
num: 0,
|
||||||
|
actItem_num: x.actItem_num,
|
||||||
|
price: x.price,
|
||||||
|
qty: x.qty,
|
||||||
|
printed_files: x.files.val,
|
||||||
|
style: x.style,
|
||||||
|
mid_items: mid_items,
|
||||||
|
left_items: left_items,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
let order = {
|
||||||
|
order_no: "",
|
||||||
|
f_num: 0,
|
||||||
|
u_name: "",
|
||||||
|
activity_num: this.num,
|
||||||
|
phone: this.follower.phone,
|
||||||
|
address: this.follower.address,
|
||||||
|
send_recript: this.follower.send_recript,
|
||||||
|
receipt_title: this.follower.receipt_title,
|
||||||
|
f_user: this.follower,
|
||||||
|
details:details
|
||||||
|
}
|
||||||
|
axios
|
||||||
|
.post(HTTP_HOST + 'api/order/AddOrderWithDetail', order)
|
||||||
|
.then(response => {
|
||||||
|
console.log(response);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
renderContent(titles) {
|
||||||
|
return titles.map(title => title.name).join('、');
|
||||||
|
//return title.join("、")
|
||||||
|
},
|
||||||
|
checkType(item) {
|
||||||
|
if (item.actItem_subject.startsWith("超")) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
addTitle(item) {
|
||||||
|
item.tablet.title.push({
|
||||||
|
name: this.title_new.name, islive: this.title_new.islive
|
||||||
|
});
|
||||||
|
this.title_new = { name: "", islive: this.title_new.islive }
|
||||||
|
},
|
||||||
|
addLive(item) {
|
||||||
|
item.tablet.alive.push({
|
||||||
|
name: this.alive_new.name, islive: this.alive_new.islive
|
||||||
|
});
|
||||||
|
this.alive_new = { name: "", islive: this.alive_new.islive }
|
||||||
|
},
|
||||||
|
newTablet() {
|
||||||
|
console.log(this.act_items);
|
||||||
|
console.log(this.select_act_item);
|
||||||
|
let item = this.act_items.find(x => x.act_item_selected.val == this.select_act_item);
|
||||||
|
this.tablets.push({
|
||||||
|
actItem_num: item.act_item_selected.val,
|
||||||
|
actItem_subject: item.act_item_selected.text,
|
||||||
|
f_num_tablet: [],
|
||||||
|
num: this.tablets.length,
|
||||||
|
qty: 1,
|
||||||
|
price: item.price,
|
||||||
|
files: item.files,
|
||||||
|
style: item.act_item_selected.style,
|
||||||
|
tablet: {
|
||||||
|
title: [],
|
||||||
|
alive: []
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getCountrys() {
|
||||||
|
let search = {}
|
||||||
|
let params = { sortBy: 'ID', sortDesc: false, page: 1, pageSize: -1 };
|
||||||
|
axios
|
||||||
|
.post(HTTP_HOST + 'api/country/GetList', this.search, { params: params })
|
||||||
|
.then(response => {
|
||||||
|
|
||||||
|
if (response.data.list) {
|
||||||
|
this.countrys = response.data.list
|
||||||
|
}
|
||||||
|
else
|
||||||
|
console.log("查無資料");
|
||||||
|
})
|
||||||
|
.catch(error => console.log(error))
|
||||||
|
},
|
||||||
|
getActItem() {//抓法會可用功德項目
|
||||||
|
this.act_items.length = 0
|
||||||
|
this.search = { num: this.num }
|
||||||
|
let params = { sortBy: 'num', sortDesc: false, page: 1, pageSize: -1 };
|
||||||
|
axios
|
||||||
|
.post(HTTP_HOST + 'api/activity/GetActRelaList', this.search, { params: params })
|
||||||
|
.then(response => {
|
||||||
|
|
||||||
|
if (response.data.list) {
|
||||||
|
this.act_items = response.data.list
|
||||||
|
console.log(this.act_items);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
console.log("查無資料");
|
||||||
|
})
|
||||||
|
.catch(error => console.log(error))
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.hr-text {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hr-text::before,
|
||||||
|
.hr-text::after {
|
||||||
|
content: "";
|
||||||
|
flex: 1;
|
||||||
|
border-top: 1px solid #ccc; /* 分隔線樣式 */
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hr-text::before {
|
||||||
|
content: attr(data-content);
|
||||||
|
padding: 0 50px;
|
||||||
|
color: black;
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
/* 当 checkbox 被禁用时,改变鼠标状态 */
|
||||||
|
input[type="checkbox"]:disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: 0.4; /* 控制反灰程度 */
|
||||||
|
color: lightgray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled-checkbox {
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: 0.8; /* 控制反灰程度 */
|
||||||
|
color: lightgray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.enabled-checkbox {
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -94,6 +94,7 @@
|
|||||||
'fastSignUp-component': httpVueLoader('./fastSignUp.vue'),
|
'fastSignUp-component': httpVueLoader('./fastSignUp.vue'),
|
||||||
'fastSignUp2-component': httpVueLoader('./fastSignUp2.vue'),
|
'fastSignUp2-component': httpVueLoader('./fastSignUp2.vue'),
|
||||||
'fastSignUp3-component': httpVueLoader('./fastSignUp3.vue'),
|
'fastSignUp3-component': httpVueLoader('./fastSignUp3.vue'),
|
||||||
|
'fastSignUp4-component': httpVueLoader('./fastSignUp4.vue'),
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
options: {
|
options: {
|
||||||
@@ -113,6 +114,9 @@
|
|||||||
} else if (item.action === "add") {
|
} else if (item.action === "add") {
|
||||||
this.twoData=item.item.num
|
this.twoData=item.item.num
|
||||||
this.currentView = "fastSignUp3-component"
|
this.currentView = "fastSignUp3-component"
|
||||||
|
} else if (item.action === "signup4") {
|
||||||
|
this.twoData = item.item
|
||||||
|
this.currentView = "fastSignUp4-component"
|
||||||
}
|
}
|
||||||
console.log("item.action:",this.twoData)
|
console.log("item.action:",this.twoData)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user