Explorar o código

带票额度统计

lowkeyman hai 4 semanas
pai
achega
b9c8617ecf
Modificáronse 1 ficheiros con 2 adicións e 11 borrados
  1. 2 11
      admin/templates/default/refill_quota_stats.index.php

+ 2 - 11
admin/templates/default/refill_quota_stats.index.php

@@ -1313,7 +1313,6 @@
                 const total_issued_tickets = merchantData.reduce((total, item) => {
                     return total + parseFloat(item.total_invoiced);
                 }, 0);
-                // const remaining_tickets = total_received_tickets - total_issued_tickets;
                 const pending_tickets = merchantData.reduce((total, item) => {
                     const estimated_invoice_amount = parseFloat(item.estimated_invoice_amount);
                     if (estimated_invoice_amount > 0) {
@@ -1321,11 +1320,6 @@
                     }
                     return total;
                 }, 0);
-                // const ticket_difference = remaining_tickets - pending_tickets;
-                this.ch_estimated_invoice_amount = channelData.reduce((total, item) => {
-                    return total + parseFloat(item.estimated_invoice_amount);
-                }, 0);
-                // let invoice_needed_amount = pending_tickets - ch_estimated_invoice_amount - parseFloat(invoice_remaining_amount);
                 for (const chan of channelData) { //合并的单元格属性,合并项的数值保持一致
                     chan.invoice_remaining_amount = formatDecimals(invoice_remaining_amount);
                     chan.invoice_needed_amount = formatDecimals(invoice_needed_amount);
@@ -1349,13 +1343,13 @@
                         {field: 'receivable_ticket', title: '应该收票', width: 200},
                         {field: 'total_invoiced', title: '已开', width: 150},
                         {field: 'total_received_tickets', title: '总计收票', width: 150},
+                        {field: 'adjustment_value', title: '矫正值(含跨年)', width: 150},
                         {field: 'issuable_ticket', title: '应出票', width: 150},
                         {field: 'total_issued_tickets', title: '总计出票', width: 150},
                         {field: 'remaining_tickets', title: '剩余票', width: 150},
                         {field: 'pending_tickets', title: '待开票', width: 150},
                         {field: 'ticket_difference', title: '差额', width: 150},
                         {field: 'invoice_remaining_amount', title: '现有多少票', width: 150},
-                        {field: 'adjustment_value', title: '矫正值', width: 150},
                         {field: 'invoice_needed_amount', title: '需进票', width: 150},
                     ]],
                     done: function (res, curr, count) {
@@ -1368,7 +1362,6 @@
             }
 
             calcTicketDifference() {
-                const that = this;
                 const tbRoot = $('#' + this.tableId);
                 const trs = tbRoot.next('.layui-table-view').find('.layui-table-body tbody tr');
                 trs.each(function(i, tr) {
@@ -1384,17 +1377,15 @@
             }
 
             calcInvoiceNeededAmount() {
-                const that = this;
                 const tbRoot = $('#' + this.tableId);
                 const trs = tbRoot.next('.layui-table-view').find('.layui-table-body tbody tr');
                 trs.each(function(i, tr) {
                     const pending_tickets = $(tr).find('td[data-field="pending_tickets"]').not('.layui-hide').find('.layui-table-cell').text().trim();
                     const invoice_remaining_amount = $(tr).find('td[data-field="invoice_remaining_amount"]').not('.layui-hide').find('.layui-table-cell').text().trim();
-                    const adjustment_value = $(tr).find('td[data-field="adjustment_value"]').not('.layui-hide').find('.layui-table-cell').text().trim();
 
                     const $invoiceNeededAmountEl = $(tr).find('td[data-field="invoice_needed_amount"]').not('.layui-hide').find('.layui-table-cell');
                     if ($invoiceNeededAmountEl.length > 0) {
-                        const invoice_needed_amount = parseFloat(pending_tickets) - that.ch_estimated_invoice_amount - parseFloat(invoice_remaining_amount) + parseFloat(adjustment_value);
+                        const invoice_needed_amount = parseFloat(invoice_remaining_amount) - parseFloat(pending_tickets);
                         $invoiceNeededAmountEl.html(formatDecimals(invoice_needed_amount));
                     }
                 });