张诺
5 小时以前 1932a62477dfc3a7e604918c29d0d0d3bfa9c9d8
src/views/salesManagement/receiptPaymentLedger/index.vue
@@ -38,27 +38,17 @@
            label="客户名称"
            prop="customerName"
            show-overflow-tooltip
                  width="200"
          />
          <el-table-column
            label="合同金额(元)"
            prop="invoiceTotal"
            show-overflow-tooltip
            :formatter="formattedNumber"
                  width="200"
          />
          <el-table-column
            label="回款金额(元)"
            prop="receiptPaymentAmount"
            show-overflow-tooltip
            :formatter="formattedNumber"
                  width="200"
          />
          <el-table-column
            label="应收金额(元)"
            prop="unReceiptPaymentAmount"
            show-overflow-tooltip
                  width="200"
          >
            <template #default="{ row, column }">
              <el-text type="danger">
@@ -98,7 +88,7 @@
                  width="110"
          />
          <el-table-column
            label="销售合同号"
            label="订单编号"
            prop="salesContractNo"
            show-overflow-tooltip
                  width="200"
@@ -106,13 +96,6 @@
          <el-table-column
            label="合同金额(元)"
            prop="invoiceTotal"
            show-overflow-tooltip
            :formatter="formattedNumber"
                  width="200"
          />
          <el-table-column
            label="回款金额(元)"
            prop="receiptPaymentAmount"
            show-overflow-tooltip
            :formatter="formattedNumber"
                  width="200"
@@ -130,14 +113,6 @@
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="recordTotal > 0"
          :total="recordTotal"
          layout="total, sizes, prev, pager, next, jumper"
          :page="recordPage.current"
          :limit="recordPage.size"
          @pagination="recordPaginationChange"
        />
      </div>
    </div>
  </div>
@@ -178,7 +153,6 @@
  getList();
};
const paginationChange = (obj) => {
  console.log("paginationChange", current, limit);
  page.current = obj.page;
  page.size = obj.limit;
  getList();
@@ -197,7 +171,7 @@
  });
};
const formattedNumber = (row, column, cellValue) => {
  return parseFloat(cellValue).toFixed(2);
  return parseFloat(cellValue).toFixed(3);
};
// 主表合计方法
const summarizeMainTable = (param) => {
@@ -205,6 +179,9 @@
    param,
    ["invoiceTotal", "receiptPaymentAmount", "unReceiptPaymentAmount"],
    {
      invoiceTotal: { decimalPlaces: 3 },
      receiptPaymentAmount: { decimalPlaces: 3 },
      unReceiptPaymentAmount: { decimalPlaces: 3 },
      ticketsNum: { noDecimal: true }, // 不保留小数
      futureTickets: { noDecimal: true }, // 不保留小数
    }
@@ -216,6 +193,9 @@
    param,
    ["invoiceAmount", "receiptAmount", "unReceiptAmount"],
    {
      invoiceAmount: { decimalPlaces: 3 },
      receiptAmount: { decimalPlaces: 3 },
      unReceiptAmount: { decimalPlaces: 3 },
      ticketsNum: { noDecimal: true }, // 不保留小数
      futureTickets: { noDecimal: true }, // 不保留小数
    }
@@ -226,9 +206,9 @@
      (item) => item.id == customerId.value
    );
    summarizeTable[summarizeTable.length - 1] =
      tableData.value[index].unReceiptPaymentAmount.toFixed(2);
      tableData.value[index].unReceiptPaymentAmount.toFixed(3);
  } else {
    summarizeTable[summarizeTable.length - 1] = 0.0;
    summarizeTable[summarizeTable.length - 1] = "0.000";
  }
  return summarizeTable;
};