| | |
| | | v-model="form.invoiceAmount" |
| | | placeholder="自动填充" |
| | | clearable |
| | | :disabled="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | const rules = ref({ |
| | | invoiceNumber: [ |
| | | { required: true, message: "请输入发票号", trigger: "blur" }, |
| | | { type: "string" }, |
| | | { required: false, message: "请输入发票号", trigger: "blur" }, |
| | | ], |
| | | invoiceAmount: [ |
| | | { required: true, message: "请输入发票金额", trigger: "blur" }, |
| | |
| | | prop: "taxInclusiveUnitPrice", |
| | | width: 150, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(2) : 0; |
| | | return val ? parseFloat(val).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | prop: "taxInclusiveTotalPrice", |
| | | width: 150, |
| | | formatData: (val) => { |
| | | return parseFloat(val).toFixed(2) ?? 0; |
| | | return parseFloat(val).toFixed(5) ?? 0; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | prop: "taxExclusiveTotalPrice", |
| | | width: 150, |
| | | formatData: (val) => { |
| | | return parseFloat(val).toFixed(2) ?? 0; |
| | | return parseFloat(val).toFixed(5) ?? 0; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | return; |
| | | } |
| | | // 计算本次来票金额 |
| | | row.ticketsAmount = (row.ticketsNum * row.taxInclusiveUnitPrice).toFixed(2) |
| | | row.ticketsAmount = (row.ticketsNum * row.taxInclusiveUnitPrice).toFixed(5) |
| | | // 计算未来票数 |
| | | row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2) |
| | | row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(5) |
| | | // 计算未来票金额 |
| | | row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2) |
| | | row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(5) |
| | | calculateinvoiceAmount(); |
| | | }; |
| | | |
| | |
| | | } |
| | | // 计算本次来票数 |
| | | row.ticketsNum = Number( |
| | | (row.ticketsAmount / row.taxInclusiveUnitPrice).toFixed(2) |
| | | (row.ticketsAmount / row.taxInclusiveUnitPrice).toFixed(5) |
| | | ); |
| | | // 计算未来票数 |
| | | row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(2) |
| | | row.futureTickets = (row.tempFutureTickets - row.ticketsNum).toFixed(5) |
| | | // 计算未来票金额 |
| | | row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(2) |
| | | row.futureTicketsAmount = (row.tempFutureTicketsAmount - row.ticketsAmount).toFixed(5) |
| | | calculateinvoiceAmount(); |
| | | }; |
| | | |
| | |
| | | invoiceAmountTotal += Number(item.ticketsAmount); |
| | | } |
| | | }); |
| | | form.invoiceAmount = invoiceAmountTotal.toFixed(2); |
| | | form.invoiceAmount = invoiceAmountTotal.toFixed(5); |
| | | }; |
| | | |
| | | const open = (type, eid) => { |