gaoluyang
2026-06-12 ac00bb7b8eae1bf6aabb7f1ae67c2e5aa5b8ae90
src/views/financialManagement/receivable/invoiceApply.vue
@@ -56,8 +56,8 @@
        @selection-change="handleSelectionChange"
        @pagination="changePage"
      >
        <template #amount="{ row }">
          <span class="text-primary">¥{{ formatMoney(row.amount) }}</span>
        <template #invoiceAmount="{ row }">
          <span class="text-primary">¥{{ formatMoney(row.invoiceAmount) }}</span>
        </template>
        <template #taxRate="{ row }">
          <span>{{ row.taxRate }}%</span>
@@ -146,7 +146,7 @@
              <el-input-number
                v-model="form.amount"
                :min="0"
                :precision="2"
                :precision="4"
                :disabled="isView"
                style="width: 100%;"
                placeholder="根据所选出库单自动汇总,可修改"
@@ -288,9 +288,9 @@
});
const columns = [
  { label: "申请单号", prop: "applyCode", width: "150" },
  { label: "申请单号", prop: "invoiceApplicationNo", width: "150" },
  { label: "客户名称", prop: "customerName", width: "180" },
  { label: "开票金额", prop: "amount", dataType: "slot", slot: "amount" },
  { label: "开票金额", prop: "invoiceAmount", dataType: "slot", slot: "invoiceAmount" },
  { label: "税率", prop: "taxRate", dataType: "slot", slot: "taxRate" },
  { label: "发票类型", prop: "invoiceType", width: "130" },
  { label: "申请日期", prop: "applyDate", width: "120" },
@@ -393,7 +393,7 @@
  const sum = outboundBatchOptions.value
    .filter((opt) => selected.some((id) => isSameOutboundId(id, opt.value)))
    .reduce((acc, opt) => acc + (Number(opt.outboundAmount) || 0), 0);
  form.amount = sum > 0 ? Number(sum.toFixed(2)) : 0;
  form.amount = sum > 0 ? Number(sum.toFixed(4)) : 0;
};
const getOutboundRowId = (row) => row?.id ?? row?.stockOutRecordId;
@@ -577,8 +577,6 @@
const normalizeTableRow = (row) => ({
  ...row,
  applyCode: row.invoiceApplicationNo ?? row.applyCode,
  amount: row.invoiceAmount ?? row.amount,
  content: row.invoiceContent ?? row.content,
  status: normalizeStatus(row.status ?? row.auditStatus),
  stockOutRecordIds: row.stockOutRecordIds ?? row.stockOutRecordId ?? "",
@@ -628,7 +626,9 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  const parts = Number(value).toFixed(4).split(".");
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return parts.join(".");
};
const getStatusLabel = (status) => {
@@ -700,8 +700,8 @@
    : parseStockOutRecordIds(row.stockOutRecordIds ?? row.stockOutRecordId);
  Object.assign(form, {
    ...row,
    applyCode: row.applyCode ?? row.invoiceApplicationNo ?? "",
    amount: Number(row.amount ?? row.invoiceAmount ?? 0),
    applyCode: row.invoiceApplicationNo ?? row.applyCode ?? "",
    amount: Number(row.invoiceAmount ?? row.amount ?? 0),
    content: row.content ?? row.invoiceContent,
    status: normalizeStatus(row.status ?? row.auditStatus),
    outboundBatchNos,
@@ -792,7 +792,7 @@
};
const handleDelete = (row) => {
  ElMessageBox.confirm(`确认删除申请单「${row.applyCode ?? row.invoiceApplicationNo}」吗?`, "提示", {
  ElMessageBox.confirm(`确认删除申请单「${row.invoiceApplicationNo ?? row.applyCode}」吗?`, "提示", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning",