invoiceDetail.js
4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_hotel = require("../../common/hotel.js");
require("../../common/request.js");
require("../../config.js");
require("../../common/login.js");
require("../../common/api.js");
const _sfc_main = {
__name: "invoiceDetail",
setup(__props) {
const list = common_vendor.ref([]);
const form = common_vendor.ref({});
const nowAddress = common_vendor.ref({});
const addressList = common_vendor.ref([]);
common_vendor.index.getStorageSync("currUser");
common_vendor.onShow(() => {
list.value = [];
getList();
});
let invoiceId;
common_vendor.onLoad((option) => {
invoiceId = option.invoiceId;
});
function getList() {
common_hotel.getInvoiceDetailBills(invoiceId).then((res) => {
list.value = res.rows;
for (var bill of list.value) {
bill.messageObj = JSON.parse(bill.message);
}
});
common_hotel.getInvoiceDetail(invoiceId).then((res) => {
form.value = res.data;
if (form.value.invoiceForm != "1") {
getAddressList();
}
});
}
function getAddressList() {
common_hotel.addressList().then((res) => {
addressList.value = res.rows;
for (var a of addressList.value) {
if (a.id == form.value.address) {
nowAddress.value = a;
}
}
});
}
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.f(list.value, (b, k0, i0) => {
return common_vendor.e({
a: b.orderType == 0
}, b.orderType == 0 ? {
b: common_vendor.t(b.name),
c: common_vendor.t(b.messageObj.roomInfo),
d: common_vendor.t(b.messageObj.roomStayDate),
e: common_vendor.t(b.total)
} : {}, {
f: b.orderType == 1
}, b.orderType == 1 ? {
g: common_vendor.t(b.name),
h: common_vendor.f(b.messageObj.carsList, (car, index, i1) => {
return {
a: common_vendor.t(car.name),
b: common_vendor.t(car.num),
c: index,
d: car.num > 0
};
}),
i: common_vendor.t(b.total)
} : {}, {
j: b.orderType == 2
}, b.orderType == 2 ? {
k: common_vendor.t(b.name),
l: common_vendor.f(b.messageObj.foodsList, (n, index, i1) => {
return common_vendor.e({
a: n.num > 0
}, n.num > 0 ? {
b: common_vendor.t(n.name),
c: common_vendor.t(n.categoryName),
d: common_vendor.t(n.num)
} : {}, {
e: index
});
}),
m: common_vendor.t(b.total)
} : {}, {
n: b.id
});
}),
b: form.value.invoiceForm == "1"
}, form.value.invoiceForm == "1" ? {} : {}, {
c: form.value.invoiceForm == "2"
}, form.value.invoiceForm == "2" ? {} : {}, {
d: form.value.invoiceForm == "3"
}, form.value.invoiceForm == "3" ? {} : {}, {
e: common_vendor.t(form.value.total),
f: form.value.invoiceForm == "1"
}, form.value.invoiceForm == "1" ? {
g: common_vendor.t(form.value.address)
} : {
h: common_vendor.t(nowAddress.value.contact),
i: common_vendor.t(nowAddress.value.phone),
j: common_vendor.t(nowAddress.value.addName)
}, {
k: form.value.invoiceType == "0",
l: form.value.invoiceType == "1",
m: common_vendor.t(form.value.invoiceTitle),
n: form.value.invoiceType == "0"
}, form.value.invoiceType == "0" ? {
o: common_vendor.t(form.value.invoiceTfn)
} : {}, {
p: form.value.invoiceForm == "3" && form.value.invoiceType == "0"
}, form.value.invoiceForm == "3" && form.value.invoiceType == "0" ? common_vendor.e({
q: common_vendor.t(form.value.invoiceAddress),
r: common_vendor.t(form.value.invoicePhone),
s: common_vendor.t(form.value.invoiceBank),
t: form.value.invoiceAccount
}, form.value.invoiceAccount ? {
v: common_vendor.t(form.value.invoiceAccount)
} : {}) : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-3297860d"], ["__file", "/Users/yangyang/project/j-mini/Venue/pages_hotel/hotel/invoiceDetail.vue"]]);
wx.createPage(MiniProgramPage);