81028275
刘淇
发票
|
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
export default {
data() {
return {
custName: '', // 购买方填写名称(开发票个人或公司名称)公司必填
invoiceType: '', // 发票类型(个人、公司),0 表示个人,1表示公司,2表示非企业性质单位
custTaxid: '', // 纳税人识别号(税号) 公司必填
custEmail: '', // 客户电子邮箱
payNum: 0,
moneyTotal: 0,
items: [{
value: '1',
name: '增值税电子普通发票',
checked: 'true'
},
{
value: '2',
name: '增值税纸质专用发票',
}
],
current: 0,
allCheck: {
name: '全选',
value: 'all',
checked: false
},
content: [
// {
// name: '微信支付',
// value: '1',
// id: 1,
// money: '5000',
// time: '2022-01-12',
// whether: true
// },
// {
// name: '微信支付',
// value: '2',
// money: '5000',
// time: '2022-01-12',
// id: 2,
// whether: true
// },
// {
// name: '微信支付',
// value: '3',
// money: '5000',
// time: '2022-01-12',
// id: 3,
// whether: true
// },
// {
// name: '微信支付',
// value: '4',
// money: '5000',
// time: '2022-01-12',
// id: 4,
// whether: true
// },
// {
// name: '线下公对公',
// value: '5',
// money: '5000',
// time: '2022-01-12',
// id: 5,
// whether: true
// }
],
invoiceType:0, // 发票类型
email:'', // 发票邮箱
name:'', // 发票抬头
remark:'', // 备注
type:'1', //
useTitleIfo:{}
}
},
onLoad(params){
console.log(params)
// invoiceType='+i.invoiceType+'&email='+i.email+'&name'+i.name+'&remark'+i.remark
this.invoiceType = params.invoiceType
this.custEmail = params.email
this.custName = params.name
this.remark = params.remark
this.useTitleIfo = JSON.parse(uni.getStorageSync('useTitleIfo'))
this.custTaxid = this.useTitleIfo.taxid
this.name = params.name
this.type = uni.getStorageSync('type') // 发票类型。1-停车记录,2-会员卡,3-余额充值
console.log(this.type)
console.log(this.custTaxid)
console.log(this.useTitleIfo)
},
onShow() {
this.queryRntPayOrderForInvoice()
},
methods: {
queryRntPayOrderForInvoice() {
var queryRntPayOrderForInvoice = this.$common.queryRntPayOrderForInvoice;
var jsondata = {
invoiceType: this.type,
};
uni.request({
url: queryRntPayOrderForInvoice,
data: JSON.stringify(this.$common.requestSign(jsondata)),
dataType: "json",
method: "POST",
success: (res) => {
console.log(res)
if (res.data.code == 0) {
this.content = res.data.data
console.log(this.content)
}
}
})
},
typeChange: function (evt) {
for (let i = 0; i < this.items.length; i++) {
if (this.items[i].value === evt.detail.value) {
this.current = i;
break;
}
}
},
detailClick() {
uni.navigateTo({
url: '../invoiceTitle/invoiceTitle'
});
},
// 全选
changeAll: function (e) {
console.log(e.detail.value)
let me = this
if (e.detail.value.length == 0) {
this.content.map(item => this.$set(item, 'checked', false));
this.$set(this.allCheck, 'checked', false);
this.payNum = 0
this.moneyTotal = 0
} else {
this.content.forEach(function (item, index) {
console.log(item);
me.$set(item, 'checked', true)
me.payNum++
me.moneyTotal += item.orderActFee
});
this.$set(this.allCheck, 'checked', true);
}
},
// 多选
changeCheck: function (e) {
let me = this
var items = this.content;
var len = this.content.length;
var values = e.detail.value;
console.log(values)
for (var i = 0; i < len; i++) {
var item = items[i];
if (values.includes(item.rltOrderId)) {
this.$set(item, 'checked', true);
} else {
this.$set(item, 'checked', false);
}
}
console.log(items)
// 判断选中状态
var arr = [];
this.payNum = 0
this.moneyTotal = 0
// this.content.forEach(item => item.checked == true ? arr.push(item) : '');
this.content.forEach(function (item, index) {
console.log(item);
if (item.checked == true) {
me.payNum++
me.moneyTotal += item.orderActFee
}
});
var isAll = this.content.every(item => item.checked == true);
isAll ? this.$set(this.allCheck, 'checked', true) : this.$set(this.allCheck, 'checked', false)
},
billingSubmit() {
let orderList = []
this.content.forEach(function (item, index) {
if (item.checked == true) {
orderList.push(item)
}
});
if(orderList.length==0){
uni.showToast({
icon:'none',
title: `请至少选择一条再提交`
})
return
}
|
81028275
刘淇
发票
|
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
|
var openTicketForCustInvoiceHisInfo = this.$common.openTicketForCustInvoiceHisInfo;
var jsondata = {
orderList: JSON.stringify(orderList),
invoiceTotalFee: this.moneyTotal,
custName: this.useTitleIfo.name, // 购买方填写名称(开发票个人或公司名称)公司必填
invoiceType: this.invoiceType, // 发票类型(个人、公司),0 表示个人,1表示公司,2表示非企业性质单位
custTaxid: this.custTaxid, // 纳税人识别号(税号) 公司必填
custEmail: this.custEmail, // 客户电子邮箱
invoiceKind: '0', // 发票种类:0 普通发票,1增值发票
orgId: this.$common.public_orgId,
saleTaxid:'91320281MA1X8C486Y',
address:this.useTitleIfo.address,
invoiceState:this.useTitleIfo.dataState,
custBankName:this.useTitleIfo.bankName,
custCardNo:this.useTitleIfo.cardNo,
custAddress:this.useTitleIfo.address,
custPhone:this.useTitleIfo.phone,
remark:this.useTitleIfo.remark
// this.useTitleIfo
};
uni.request({
url: openTicketForCustInvoiceHisInfo,
data: JSON.stringify(this.$common.requestSign(jsondata)),
dataType: "json",
method: "POST",
success: (res) => {
console.log(res)
if (res.data.code == 0) {
this.queryRntPayOrderForInvoice()
uni.showToast({
icon:'none',
title: `提交成功`
})
}
}
})
},
moneyCount() {
},
}
}
|