编辑发票时,为什么我看不到发票项目?

编程入门 行业动态 更新时间:2024-10-26 18:22:47
本文介绍了编辑发票时,为什么我看不到发票项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用`Laravel 5.7`& `VueJs 2.5。*`... 我正在使用单一的Bootstrap模型创建和编辑我的`TicketInvoice`&它是`TicketInvocieItems`,但当我点击Edit时,Bootstrap Model打开&我看到数据用`TicketInvoice`填充但看不到`TicketInvoiceItems`的数据。我不知道如何填写TicketInvoiceItems的数据。 更好理解的图像 点击此处打开图片 我尝试过:

I'm using `Laravel 5.7` & `VueJs 2.5.*` ... I'm using a single Bootstrap Model to create as well as edit my `TicketInvoice` & it's `TicketInvocieItems`, but when i hit Edit, Bootstrap Model opens & i see data fill with `TicketInvoice` but can't see data of `TicketInvoiceItems`. I don't know how to fill data of `TicketInvoiceItems` as well. An Image For Better Understanding CLICK HERE TO OPEN IMAGE What I have tried:

My `ticketInvoiceItems` input fields: <pre> <tbody> <tr v-for="(ticketInvoiceItem, key) in form.ticketInvoiceItems" :key="key"> <!--Passenger Name--> <td> <input v-model="ticketInvoiceItem.passenger_name" size="40" type="text" name="passenger_name" class="table-control form-control" :class="{ 'is-invalid': form.errors.has('passenger_name') }"> <has-error :form="form" field="passenger_name"></has-error> </td> <!--Ticket No.--> <td> <input v-model="ticketInvoiceItem.ticket_no" size="24" type="text" name="ticket_no" class="table-control form-control" :class="{ 'is-invalid': form.errors.has('ticket_no') }"> <has-error :form="form" field="ticket_no"></has-error> </td> </tr>

我的`HTML`编辑按钮:

My `HTML` edit Button:

<a href="#" @click="editModel(ticketInvoice)"> </a>

我的'VueJs``editModel()`代码:

My `VueJs` `editModel()` code:

<script> /*==============EDIT INVOICE CODE==============*/ editModel(ticketInvoice) { this.editmode = true; this.form.reset(); this.form.clear(); $("#addNewTicketInvoice").modal("show"); this.form.fill(ticketInvoice); } </script>

我在`VueJs`中的`data()`:

My `data()` in `VueJs`:

<script> export default { data() { return { editmode: true, ticketInvoices: {}, vendors: null, form: new Form({ id: "", vendor_id: "", ticket_invoice_no: "", ticket_invoice_date: "", ticket_invoice_fares_total: "", ticket_invoice_grand_total: "", ticketInvoiceItems: [{ id: "", ticket_invoice_id: "", passenger_name: "", ticket_no: "", departure_date: "", fares: "", sub_total: 0 }] }) }; }, </script>

推荐答案

( #addNewTicketInvoice)。modal( show); this .form.fill(ticketInvoice); } < / script> ("#addNewTicketInvoice").modal("show"); this.form.fill(ticketInvoice); } </script>

我在`VueJs`中的`data()`:

My `data()` in `VueJs`:

<script> export default { data() { return { editmode: true, ticketInvoices: {}, vendors: null, form: new Form({ id: "", vendor_id: "", ticket_invoice_no: "", ticket_invoice_date: "", ticket_invoice_fares_total: "", ticket_invoice_grand_total: "", ticketInvoiceItems: [{ id: "", ticket_invoice_id: "", passenger_name: "", ticket_no: "", departure_date: "", fares: "", sub_total: 0 }] }) }; }, </script>

更多推荐

编辑发票时,为什么我看不到发票项目?

本文发布于:2023-11-27 20:33:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1639502.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:发票   我看   编辑   项目

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!