修正很多東西
This commit is contained in:
@@ -381,6 +381,10 @@
|
||||
.catch(error => console.log(error))
|
||||
},
|
||||
renderTabletContent(item) {
|
||||
//console.log("renderTabletContent:", item, item.f_num_tablet)
|
||||
if (item.f_num_tablet==="") {
|
||||
return "";
|
||||
}
|
||||
let data = JSON.parse(item.f_num_tablet)
|
||||
let left = data.left_items
|
||||
let mid = data.mid_items
|
||||
@@ -412,13 +416,14 @@
|
||||
let detail = []
|
||||
//整理資料存檔//只要抓那個活動的那幾筆功德項目代號
|
||||
this.tablet_list.forEach(x => {
|
||||
|
||||
|
||||
if (x.actitem_num_checked && x.actitem_num_checked == true) {
|
||||
console.log("OOQ:", x)
|
||||
//console.log("OOQ:", x.num)
|
||||
let actItem = this.act_items.find(y => y.act_item_selected.val == x.actitem_num_selected.val)
|
||||
detail.push({
|
||||
num: x.num, order_no: x.order_no, change_item_num: x.changeActitem,
|
||||
price: actItem.price, qty: 1, style: actItem.act_item_selected.style, printed_files: actItem.files[0].num
|
||||
price: actItem.price, qty: 1, style: actItem.act_item_selected.style, printed_files: ""//actItem.files[0].num
|
||||
})
|
||||
// console.log("saveOrder:", x, x.num, x.order_no)
|
||||
}
|
||||
@@ -429,9 +434,10 @@
|
||||
this.message_dialog.message = "沒有選擇功德項目,如果無法選擇,請使用一般報名程序"
|
||||
return false
|
||||
}
|
||||
|
||||
//放主檔資料,
|
||||
let main = {
|
||||
activity_num: this.num, f_num: this.follower.num,
|
||||
activity_num: this.num, f_num: this.follower?.num,
|
||||
details: detail
|
||||
}
|
||||
//console.log("saveOrderDetail:",detail);
|
||||
|
||||
+13
-10
@@ -270,14 +270,15 @@
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
options: {
|
||||
handler() {
|
||||
if (this.isSearched) {
|
||||
//if (this.isSearched) {
|
||||
this.getDefault()
|
||||
}
|
||||
else {
|
||||
this.data_table.loading = false;
|
||||
}
|
||||
//}
|
||||
//else {
|
||||
// this.data_table.loading = false;
|
||||
//}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
@@ -413,12 +414,14 @@
|
||||
},
|
||||
getDefault(clearpage = false) {
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
//page = this.data_table.page;
|
||||
|
||||
const params = {
|
||||
sortBy: sortBy[0], sortDesc: sortDesc[0],
|
||||
page: clearpage ? '1' : page, pageSize: itemsPerPage
|
||||
};
|
||||
this.data_table.loading = true
|
||||
sessionStorage.setItem('orderpage', clearpage ? '1' : page);
|
||||
//sessionStorage.setItem('orderpage', clearpage ? '1' : page);
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
|
||||
.then(response => {
|
||||
@@ -427,7 +430,7 @@
|
||||
this.data_table.loading = false
|
||||
|
||||
const dataToStore = JSON.stringify(this.data_table);
|
||||
sessionStorage.setItem("order_list_cache", dataToStore);
|
||||
//sessionStorage.setItem("order_list_cache", dataToStore);
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
},
|
||||
@@ -884,11 +887,11 @@
|
||||
v-model="print_search.chk_noact"
|
||||
:label="`非活動報名`"
|
||||
></v-checkbox> --%>
|
||||
<v-checkbox
|
||||
<%-- <v-checkbox
|
||||
v-model="print_search.chk_hasact"
|
||||
:label="`活動報名`"
|
||||
@change="chk_hasact_change"
|
||||
></v-checkbox>
|
||||
></v-checkbox>--%>
|
||||
<%-- <v-row densee class="pt-3" >
|
||||
<v-col :cols="10" class="pt-5" > --%>
|
||||
<div class="input-group mb-3 single-line d-none" data-search-control="search2" @click="print_search.chk_hasact && search_show(search_dialog.controls.search2)" :disabled="!print_search.chk_hasact">
|
||||
@@ -957,7 +960,7 @@
|
||||
<v-card-text >
|
||||
<v-row>
|
||||
<v-col v-for="item in search_dialog.current.keys"
|
||||
:cols="search_dialog.current.keys.length>1?6:12" >
|
||||
:cols="search_dialog.current.keys.length>1?6:12" v-bind:key="item.value">
|
||||
<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">
|
||||
|
||||
@@ -900,6 +900,7 @@
|
||||
//console.log("底家:",this.data_table.selected);
|
||||
localStorage.setItem("item", item.actitem_num_selected.val);
|
||||
localStorage.setItem("list", JSON.stringify(list));
|
||||
localStorage.setItem("mode","preview");
|
||||
|
||||
document.body.appendChild(form); // Not entirely sure if this is necessary
|
||||
form.submit();
|
||||
@@ -910,7 +911,7 @@
|
||||
async editTabletNew(item) {
|
||||
this.editedIndex = this.desserts.indexOf(item);
|
||||
this.editedItem = $.extend(true, {}, item);
|
||||
|
||||
console.log("editTabletNew:",this.editedItem,item)
|
||||
try {
|
||||
//document.getElementById("tablet_edit_new_iframe").contentWindow.location.reload();
|
||||
// 如果是新項目,先保存
|
||||
@@ -920,6 +921,7 @@
|
||||
if (savedItem) {
|
||||
this.$set(this.desserts, this.editedIndex, savedItem);
|
||||
this.editedItem = $.extend(true, {}, savedItem);
|
||||
console.log("savedItem:", this.editedItem)
|
||||
}
|
||||
}
|
||||
// 先發送消息
|
||||
@@ -1129,7 +1131,8 @@
|
||||
async save(shouldClose = true) {
|
||||
if (this.editedIndex > -1) {
|
||||
if (this.order_no != '') {
|
||||
console.log("ok:",this.editedItem);
|
||||
this.editedItem.order_no=this.order_no
|
||||
//console.log("ok:",this.editedItem);
|
||||
//chcck necessary params
|
||||
if (this.editedItem.actitem_num_selected.val != 0 &&
|
||||
this.editedItem.keyin1_selected.val !=0 &&
|
||||
@@ -1137,11 +1140,11 @@
|
||||
/* (this.editedItem.category=="1"? this.editedItem.from_id_selected.val != 0 : true) &&*/
|
||||
this.requireData(this.editedItem.qty, (this.editedItem.num == 0 ? false : true)) ) /* qty為0視為不需要此項目,不儲存此筆資料*/
|
||||
{
|
||||
console.log(this.editedItem);
|
||||
//console.log(this.editedItem);
|
||||
//check price
|
||||
if (this.editedItem.pay <= this.editedItem.price * this.editedItem.qty) {
|
||||
console.log(this.editedItem.f_num_selected.val);
|
||||
console.log(this.editedItem.from_id_selected.val);
|
||||
//console.log(this.editedItem.f_num_selected.val);
|
||||
//console.log(this.editedItem.from_id_selected.val);
|
||||
//check qty
|
||||
//數量不可小於掛單明細的數量
|
||||
if (this.editedItem.qty >= this.editedItem.writeBedQty + this.editedItem.notBedQty) {
|
||||
@@ -2176,9 +2179,9 @@
|
||||
<v-icon title="刪除" color="red" class="mr-2" @click="deleteItem(item)">
|
||||
mdi-delete
|
||||
</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
|
||||
</v-icon> --%>
|
||||
</v-icon>
|
||||
<v-icon title="編輯牌位New" color="blue" class="mr-2" @click="editTabletNew(item);">
|
||||
mdi-file-document-edit-outline
|
||||
</v-icon>
|
||||
|
||||
Reference in New Issue
Block a user