gaoluyang
6 天以前 4aaae263a6c728eaa2a3f45a1ae36082619b52a0
宝东
1.小数点后四位修改
已修改34个文件
236 ■■■■ 文件已修改
src/components/AIChatSidebar/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/summarizeTable.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/accounting/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/assets/fixedAssets.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/assets/intangibleAssets.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/financialStatements/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/payable/input-invoice.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/payable/payment.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/payable/paymentApply.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/payable/reconciliation.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/receivable/invoiceApply.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/receivable/outputInvoice.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/receivable/receipt.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/receivable/reconciliation.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/voucher/detailLedger.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/voucher/generalLedger.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/voucher/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockWarning/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/vehicleFuelManagement/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/operationScheduling/components/formDia.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/processRoute/processRouteItem/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productStructure/Detail/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productStructure/StructureEdit.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionCosting/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionDispatching/components/formDia.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/components/formDia.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/safetyMonitoring/index.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/finalInspection/components/formDia.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/nonconformingManagement/components/formDia.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/processInspection/components/formDia.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/rawMaterialInspection/components/formDia.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/visualization/qualityDashboard.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/AIChatSidebar/index.vue
@@ -1951,8 +1951,8 @@
  const bytes = Number(size)
  if (!Number.isFinite(bytes) || bytes <= 0) return '0 B'
  if (bytes < 1024) return `${bytes} B`
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1).replace(/\.0$/, '')} KB`
  return `${(bytes / (1024 * 1024)).toFixed(1).replace(/\.0$/, '')} MB`
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(4).replace(/\.0$/, '')} KB`
  return `${(bytes / (1024 * 1024)).toFixed(4).replace(/\.0$/, '')} MB`
}
const createLocalFileSnapshot = (file, index = 0) => {
@@ -2585,7 +2585,7 @@
const formatCompactNumber = (value) => {
  const amount = Number(value) || 0
  if (Math.abs(amount) >= 10000) {
    return `${(amount / 10000).toFixed(2).replace(/\.?0+$/, '')}\u4e07`
    return `${(amount / 10000).toFixed(4).replace(/\.?0+$/, '')}\u4e07`
  }
  return amount.toLocaleString('zh-CN', { maximumFractionDigits: 2 })
}
src/utils/summarizeTable.js
@@ -28,7 +28,7 @@
        } else {
          // 默认保留两位小数
          sums[index] = parseFloat(sum).toFixed(
            specialFormat[prop]?.decimalPlaces ?? 2
            specialFormat[prop]?.decimalPlaces ?? 4
          );
        }
      } else {
@@ -43,11 +43,11 @@
// 不含税总价计算
const calculateTaxExclusiveTotalPrice = (taxInclusiveTotalPrice, taxRate) => {
  const taxRateDecimal = taxRate / 100;
  return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(2);
  return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(4);
};
// 含税总价计算
const calculateTaxIncludeTotalPrice = (taxInclusiveUnitPrice, quantity) => {
  return (taxInclusiveUnitPrice * quantity).toFixed(2);
  return (taxInclusiveUnitPrice * quantity).toFixed(4);
};
// 导出函数供其他文件使用
export {
src/views/financialManagement/accounting/index.vue
@@ -480,7 +480,7 @@
// 格式化货币
const formatCurrency = (value) => {
  if (!value) return '0.00';
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
};
// 获取状态标签类型
src/views/financialManagement/assets/fixedAssets.vue
@@ -117,7 +117,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="资产原值" prop="originalValue">
              <el-input-number v-model="form.originalValue" :min="0" :precision="2" style="width: 100%;" @change="calculateNetValue" />
              <el-input-number v-model="form.originalValue" :min="0" :precision="4" style="width: 100%;" @change="calculateNetValue" />
            </el-form-item>
          </el-col>
        </el-row>
@@ -130,7 +130,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="残值率" prop="residualRate">
              <el-input-number v-model="form.residualRate" :min="0" :max="10" :precision="2" style="width: 100%;" />
              <el-input-number v-model="form.residualRate" :min="0" :max="10" :precision="4" style="width: 100%;" />
              <span style="margin-left: 10px;">%</span>
            </el-form-item>
          </el-col>
@@ -286,7 +286,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const getCategoryLabel = (category) => {
@@ -315,7 +315,7 @@
const calculateNetValue = () => {
  const originalValue = Number(form.originalValue || 0);
  const accumulatedDepreciation = Number(form.accumulatedDepreciation || 0);
  form.netValue = Number((originalValue - accumulatedDepreciation).toFixed(2));
  form.netValue = Number((originalValue - accumulatedDepreciation).toFixed(4));
};
// 联调约定:分页参数固定为 current/size,返回 data.records/data.total
src/views/financialManagement/assets/intangibleAssets.vue
@@ -119,7 +119,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="资产原值" prop="originalValue">
              <el-input-number v-model="form.originalValue" :min="0" :precision="2" style="width: 100%;" @change="calculateNetValue" />
              <el-input-number v-model="form.originalValue" :min="0" :precision="4" style="width: 100%;" @change="calculateNetValue" />
            </el-form-item>
          </el-col>
        </el-row>
@@ -132,7 +132,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="残值率" prop="residualRate">
              <el-input-number v-model="form.residualRate" :min="0" :max="10" :precision="2" style="width: 100%;" />
              <el-input-number v-model="form.residualRate" :min="0" :max="10" :precision="4" style="width: 100%;" />
              <span style="margin-left: 10px;">%</span>
            </el-form-item>
          </el-col>
@@ -278,7 +278,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const getCategoryLabel = (category) => {
@@ -313,7 +313,7 @@
const calculateNetValue = () => {
  const originalValue = Number(form.originalValue || 0);
  const accumulatedAmortization = Number(form.accumulatedAmortization || 0);
  form.netValue = Number((originalValue - accumulatedAmortization).toFixed(2));
  form.netValue = Number((originalValue - accumulatedAmortization).toFixed(4));
};
// 联调约定:分页参数固定为 current/size,返回 data.records/data.total
src/views/financialManagement/financialStatements/index.vue
@@ -129,7 +129,7 @@
                       :class="pageInfo.netRevenue >= 0 ? 'plus' : 'minus'">
                    {{ pageInfo.netRevenue >= 0 ? '+' : '' }}{{ formatMoney(pageInfo.netRevenue) }}
                  </div>
                  <div class="rate">利润率: {{ pageInfo.totalIncome > 0 ? ((pageInfo.netRevenue / pageInfo.totalIncome) * 100).toFixed(1) : 0 }}%</div>
                  <div class="rate">利润率: {{ pageInfo.totalIncome > 0 ? ((pageInfo.netRevenue / pageInfo.totalIncome) * 100).toFixed(4) : 0 }}%</div>
                </div>
              </div>
            </div>
src/views/financialManagement/payable/input-invoice.vue
@@ -200,7 +200,7 @@
              <el-input-number
                v-model="form.amount"
                :min="0"
                :precision="2"
                :precision="4"
                style="width: 100%;"
                :disabled="isView"
                placeholder="根据入库单含税金额自动换算,可修改"
@@ -213,7 +213,7 @@
              <el-input-number
                v-model="form.taxAmount"
                :min="0"
                :precision="2"
                :precision="4"
                :controls="false"
                style="width: 100%;"
                disabled
@@ -225,7 +225,7 @@
              <el-input-number
                v-model="form.totalAmount"
                :min="0"
                :precision="2"
                :precision="4"
                :controls="false"
                style="width: 100%;"
                disabled
@@ -377,7 +377,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const normalizeStatus = (status) => {
@@ -440,8 +440,8 @@
/** 不含税金额变更:税额、价税合计正向计算 */
const calculateTaxFromExclusive = () => {
  form.taxAmount = Number((form.amount * form.taxRate / 100).toFixed(2));
  form.totalAmount = Number((form.amount + form.taxAmount).toFixed(2));
  form.taxAmount = Number((form.amount * form.taxRate / 100).toFixed(4));
  form.totalAmount = Number((form.amount + form.taxAmount).toFixed(4));
};
/** 价税合计变更:按税率反算不含税金额、税额 */
@@ -454,9 +454,9 @@
    return;
  }
  const rate = Number(form.taxRate) / 100;
  form.totalAmount = Number(total.toFixed(2));
  form.amount = Number((form.totalAmount / (1 + rate)).toFixed(2));
  form.taxAmount = Number((form.totalAmount - form.amount).toFixed(2));
  form.totalAmount = Number(total.toFixed(4));
  form.amount = Number((form.totalAmount / (1 + rate)).toFixed(4));
  form.taxAmount = Number((form.totalAmount - form.amount).toFixed(4));
};
const handleTaxRateChange = () => {
@@ -481,7 +481,7 @@
      .reduce((acc, row) => acc + getInboundRowTaxInclusiveAmount(row), 0);
  }
  calculateTaxFromInclusive(taxInclusiveSum > 0 ? Number(taxInclusiveSum.toFixed(2)) : 0);
  calculateTaxFromInclusive(taxInclusiveSum > 0 ? Number(taxInclusiveSum.toFixed(4)) : 0);
};
const inboundBatchDisplayText = computed(() => {
@@ -520,15 +520,15 @@
  const taxRate = toFormNumber(row.taxRate) || 13;
  if (totalAmount > 0 && amount === 0 && taxAmount === 0) {
    amount = Number((totalAmount / (1 + taxRate / 100)).toFixed(2));
    taxAmount = Number((totalAmount - amount).toFixed(2));
    amount = Number((totalAmount / (1 + taxRate / 100)).toFixed(4));
    taxAmount = Number((totalAmount - amount).toFixed(4));
  } else if (totalAmount > 0 && amount > 0 && taxAmount === 0) {
    taxAmount = Number((totalAmount - amount).toFixed(2));
    taxAmount = Number((totalAmount - amount).toFixed(4));
  } else if (amount > 0 && taxAmount === 0 && totalAmount === 0) {
    taxAmount = Number((amount * taxRate / 100).toFixed(2));
    totalAmount = Number((amount + taxAmount).toFixed(2));
    taxAmount = Number((amount * taxRate / 100).toFixed(4));
    totalAmount = Number((amount + taxAmount).toFixed(4));
  } else if (amount > 0 && taxAmount > 0 && totalAmount === 0) {
    totalAmount = Number((amount + taxAmount).toFixed(2));
    totalAmount = Number((amount + taxAmount).toFixed(4));
  }
  return { amount, taxAmount, totalAmount };
src/views/financialManagement/payable/payment.vue
@@ -53,7 +53,7 @@
        <div>
          <el-statistic title="本页付款合计"
                        :value="totalPaymentAmount"
                        :precision="2"
                        :precision="4"
                        prefix="¥" />
        </div>
        <div>
@@ -152,7 +152,7 @@
  const formatMoney = value => {
    if (value === undefined || value === null) return "0.00";
    return Number(value)
      .toFixed(2)
      .toFixed(4)
      .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  };
src/views/financialManagement/payable/paymentApply.vue
@@ -162,7 +162,7 @@
              <el-input-number
                v-model="form.paymentAmount"
                :min="0"
                :precision="2"
                :precision="4"
                style="width: 100%;"
                :disabled="isView"
                placeholder="根据入库单自动汇总,可修改"
@@ -250,7 +250,7 @@
              <el-input-number
                v-model="paymentForm.paymentAmount"
                :min="0"
                :precision="2"
                :precision="4"
                style="width: 100%;"
              />
            </el-form-item>
@@ -441,7 +441,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const normalizeStatus = (status) => {
@@ -526,7 +526,7 @@
      .reduce((acc, row) => acc + getInboundRowTaxInclusiveAmount(row), 0);
  }
  form.paymentAmount = sum > 0 ? Number(sum.toFixed(2)) : 0;
  form.paymentAmount = sum > 0 ? Number(sum.toFixed(4)) : 0;
};
const inboundBatchDisplayText = computed(() => {
src/views/financialManagement/payable/reconciliation.vue
@@ -407,7 +407,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const getTableData = () => {
src/views/financialManagement/receivable/invoiceApply.vue
@@ -146,7 +146,7 @@
              <el-input-number
                v-model="form.amount"
                :min="0"
                :precision="2"
                :precision="4"
                :disabled="isView"
                style="width: 100%;"
                placeholder="根据所选出库单自动汇总,可修改"
@@ -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;
@@ -628,7 +628,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const getStatusLabel = (status) => {
src/views/financialManagement/receivable/outputInvoice.vue
@@ -170,7 +170,7 @@
              <el-input-number
                v-model="form.amount"
                :min="0"
                :precision="2"
                :precision="4"
                style="width: 100%;"
                :disabled="isView"
                @change="calculateTax"
@@ -326,12 +326,12 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const calculateTax = () => {
  form.taxAmount = Number((form.amount * form.taxRate / 100).toFixed(2));
  form.totalAmount = Number((form.amount + form.taxAmount).toFixed(2));
  form.taxAmount = Number((form.amount * form.taxRate / 100).toFixed(4));
  form.totalAmount = Number((form.amount + form.taxAmount).toFixed(4));
};
const handleInvoiceTypeChange = () => {
src/views/financialManagement/receivable/receipt.vue
@@ -53,7 +53,7 @@
        <div>
          <el-statistic title="本页收款合计"
                        :value="totalReceiptAmount"
                        :precision="2"
                        :precision="4"
                        prefix="¥" />
        </div>
        <div>
@@ -171,7 +171,7 @@
                          prop="amount">
              <el-input-number v-model="form.amount"
                               :min="0"
                               :precision="2"
                               :precision="4"
                               style="width: 100%;"
                               :disabled="isView"
                               placeholder="根据关联单据自动汇总,可修改" />
@@ -408,7 +408,7 @@
  const formatMoney = value => {
    if (value === undefined || value === null) return "0.00";
    return Number(value)
      .toFixed(2)
      .toFixed(4)
      .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  };
@@ -525,7 +525,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 restoreOutboundTableSelection = () => {
src/views/financialManagement/receivable/reconciliation.vue
@@ -390,7 +390,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const getTableData = () => {
src/views/financialManagement/voucher/detailLedger.vue
@@ -199,7 +199,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
// 联调约定:明细账按科目与期间过滤
src/views/financialManagement/voucher/generalLedger.vue
@@ -202,7 +202,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
// 联调约定:总账接口返回行数组(rowType/date/voucherNo/summary/debit/credit/direction/balance)
src/views/financialManagement/voucher/index.vue
@@ -32,8 +32,8 @@
    <div class="table_list">
      <div class="actions">
        <div>
          <el-statistic title="借方合计" :value="totalDebit" :precision="2" prefix="¥" />
          <el-statistic title="贷方合计" :value="totalCredit" :precision="2" prefix="¥" style="margin-left: 30px;" />
          <el-statistic title="借方合计" :value="totalDebit" :precision="4" prefix="¥" />
          <el-statistic title="贷方合计" :value="totalCredit" :precision="4" prefix="¥" style="margin-left: 30px;" />
        </div>
        <div>
          <el-button type="primary" @click="add" icon="Plus">新增凭证</el-button>
@@ -162,7 +162,7 @@
                  <!-- 借方11列 -->
                  <template v-if="editingCell.row === rowIndex && editingCell.type === 'debit'">
                    <td colspan="11" class="debit-input-cell">
                      <el-input-number ref="amountInputRef" v-model="entry.debit" :disabled="isViewMode" :min="0" :precision="2" :controls="false" :value-on-clear="undefined" size="small" @blur="finishEdit" class="full-width-input" />
                      <el-input-number ref="amountInputRef" v-model="entry.debit" :disabled="isViewMode" :min="0" :precision="4" :controls="false" :value-on-clear="undefined" size="small" @blur="finishEdit" class="full-width-input" />
                    </td>
                  </template>
                  <template v-else>
@@ -173,7 +173,7 @@
                  <!-- 贷方11列 -->
                  <template v-if="editingCell.row === rowIndex && editingCell.type === 'credit'">
                    <td colspan="11" class="credit-input-cell">
                      <el-input-number ref="amountInputRef" v-model="entry.credit" :disabled="isViewMode" :min="0" :precision="2" :controls="false" :value-on-clear="undefined" size="small" @blur="finishEdit" class="full-width-input" />
                      <el-input-number ref="amountInputRef" v-model="entry.credit" :disabled="isViewMode" :min="0" :precision="4" :controls="false" :value-on-clear="undefined" size="small" @blur="finishEdit" class="full-width-input" />
                    </td>
                  </template>
                  <template v-else>
@@ -431,7 +431,7 @@
const formatMoney = (value) => {
  if (value === undefined || value === null) return "0.00";
  return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  return Number(value).toFixed(4).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const normalizeVoucherStatus = status => String(status || "").toLowerCase();
@@ -583,7 +583,7 @@
    return new Array(length).fill('');
  }
  const amountStr = Number(amount).toFixed(2);
  const amountStr = Number(amount).toFixed(4);
  const [intPart, decPart] = amountStr.split('.');
  const fullAmount = intPart + decPart;
src/views/index.vue
@@ -712,7 +712,7 @@
    const lines = list
        .map((p) => {
          const colorBox = `<span style="display:inline-block;margin-right:6px;border-radius:2px;width:10px;height:10px;background:${p.color}"></span>`;
          return `${colorBox}${p.seriesName}<b style="float:right;">${Number(p.value || 0).toFixed(2)}</b>`;
          return `${colorBox}${p.seriesName}<b style="float:right;">${Number(p.value || 0).toFixed(4)}</b>`;
        })
        .join("<br/>");
    return `<div style="min-width:140px;"><div style="font-weight:700;margin-bottom:6px;">${name}</div>${lines}</div>`;
@@ -828,7 +828,7 @@
    value: formatNumber(productionOverviewData.value.totalOutput),
    subLabel: "累计报废",
    subValue: formatNumber(productionOverviewData.value.totalScrap),
    trend: `良率 ${Number(productionOverviewData.value.yieldRate || 0).toFixed(2)}%`,
    trend: `良率 ${Number(productionOverviewData.value.yieldRate || 0).toFixed(4)}%`,
    icon: Operation,
    visible: visibleModules.value.production,
  },
@@ -876,7 +876,7 @@
const getCompareText = (value) => {
  const num = Number(value || 0);
  const abs = Math.abs(num).toFixed(2);
  const abs = Math.abs(num).toFixed(4);
  if (num > 0) return `较昨日 ↑ ${abs}%`;
  if (num < 0) return `较昨日 ↓ ${abs}%`;
  return "较昨日 持平";
@@ -894,7 +894,7 @@
      key: "oee",
      label: "设备 OEE",
      percent: clampPercent(oee),
      display: `${oee.toFixed(2)}%`,
      display: `${oee.toFixed(4)}%`,
      delta: getCompareText(oeeCompare),
      trend: getCompareTrend(oeeCompare),
      color: "#2d8cff",
@@ -903,7 +903,7 @@
      key: "order",
      label: "订单达成率",
      percent: clampPercent(orderAchievement),
      display: `${orderAchievement.toFixed(2)}%`,
      display: `${orderAchievement.toFixed(4)}%`,
      delta: getCompareText(orderCompare),
      trend: getCompareTrend(orderCompare),
      color: "#31d2ff",
@@ -912,7 +912,7 @@
      key: "defect",
      label: "不良率",
      percent: clampPercent(defectRate),
      display: `${defectRate.toFixed(2)}%`,
      display: `${defectRate.toFixed(4)}%`,
      delta: getCompareText(defectCompare),
      trend: getCompareTrend(defectCompare),
      color: "#f6a23f",
@@ -1122,7 +1122,7 @@
const trendText = (value) => {
  const num = Number(value || 0);
  const flag = num >= 0 ? "↑" : "↓";
  return `${flag} ${Math.abs(num).toFixed(1)}%`;
  return `${flag} ${Math.abs(num).toFixed(4)}%`;
};
const ratioNumber = (numerator, denominator) => {
@@ -1132,7 +1132,7 @@
  return (n / d) * 100;
};
const ratioText = (numerator, denominator) => `${ratioNumber(numerator, denominator).toFixed(1)}%`;
const ratioText = (numerator, denominator) => `${ratioNumber(numerator, denominator).toFixed(4)}%`;
const clampPercent = (val) => Math.max(0, Math.min(100, Number(val || 0)));
src/views/inventoryManagement/stockWarning/index.vue
@@ -180,7 +180,7 @@
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="容积(m³):" prop="volume">
              <el-input-number v-model="form.volume" :min="0" :precision="2" style="width: 100%" />
              <el-input-number v-model="form.volume" :min="0" :precision="4" style="width: 100%" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
@@ -212,7 +212,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="当前压力(MPa):" prop="currentPressure">
              <el-input-number v-model="form.currentPressure" :min="0" :precision="2" style="width: 100%" />
              <el-input-number v-model="form.currentPressure" :min="0" :precision="4" style="width: 100%" />
            </el-form-item>
          </el-col>
        </el-row>
@@ -243,7 +243,7 @@
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="预警阈值:" prop="warningThreshold">
              <el-input-number v-model="form.warningThreshold" :min="0" :precision="2" style="width: 100%" />
              <el-input-number v-model="form.warningThreshold" :min="0" :precision="4" style="width: 100%" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
src/views/inventoryManagement/vehicleFuelManagement/index.vue
@@ -79,7 +79,7 @@
          align="right"
        >
          <template #default="scope">
            <span>{{ scope.row.amount?.toFixed(2) }}</span>
            <span>{{ scope.row.amount?.toFixed(4) }}</span>
          </template>
        </el-table-column>
        <el-table-column
@@ -89,7 +89,7 @@
          align="right"
        >
          <template #default="scope">
            <span>{{ scope.row.liters?.toFixed(2) }}</span>
            <span>{{ scope.row.liters?.toFixed(4) }}</span>
          </template>
        </el-table-column>
        <el-table-column
@@ -120,7 +120,7 @@
            <span
              :style="scope.row.isAbnormal ? 'color:#F56C6C;font-weight:600;' : ''"
            >
              {{ scope.row.fuelConsumption != null ? scope.row.fuelConsumption.toFixed(2) : '-' }}
              {{ scope.row.fuelConsumption != null ? scope.row.fuelConsumption.toFixed(4) : '-' }}
            </span>
          </template>
        </el-table-column>
@@ -132,7 +132,7 @@
        >
          <template #default="scope">
            <span>
              {{ scope.row.avgConsumption != null ? scope.row.avgConsumption.toFixed(2) : '-' }}
              {{ scope.row.avgConsumption != null ? scope.row.avgConsumption.toFixed(4) : '-' }}
            </span>
          </template>
        </el-table-column>
@@ -228,7 +228,7 @@
                v-model="form.amount"
                :min="0"
                :step="0.01"
                :precision="2"
                :precision="4"
                placeholder="请输入金额"
                style="width: 100%"
              />
@@ -240,7 +240,7 @@
                v-model="form.liters"
                :min="0"
                :step="0.01"
                :precision="2"
                :precision="4"
                placeholder="请输入升数"
                style="width: 100%"
              />
src/views/productionManagement/operationScheduling/components/formDia.vue
@@ -58,7 +58,7 @@
                            placeholder="请输入"
                            :min="0"
                            :step="0.1"
                            :precision="2"
                            :precision="4"
                            clearable
                            style="width: 100%"
                        />
@@ -71,7 +71,7 @@
                            placeholder="请输入"
                            :min="0"
                            :step="0.1"
                            :precision="2"
                            :precision="4"
                            clearable
                            style="width: 100%"
                        />
src/views/productionManagement/processRoute/processRouteItem/index.vue
@@ -340,7 +340,7 @@
                                style="margin: 0">
                    <el-input-number v-model="row.unitQuantity"
                                     :min="0"
                                     :precision="2"
                                     :precision="4"
                                     :step="1"
                                     controls-position="right"
                                     style="width: 100%"
@@ -358,7 +358,7 @@
                                style="margin: 0">
                    <el-input-number v-model="row.demandedQuantity"
                                     :min="0"
                                     :precision="2"
                                     :precision="4"
                                     :step="1"
                                     controls-position="right"
                                     style="width: 100%"
@@ -1203,7 +1203,7 @@
    if (!Number.isFinite(numberValue)) {
      return 0;
    }
    return Number(numberValue.toFixed(2));
    return Number(numberValue.toFixed(4));
  };
  const syncDemandedQuantityTree = (items, parentDemandedQuantity = null) => {
src/views/productionManagement/productStructure/Detail/index.vue
@@ -82,7 +82,7 @@
                                style="margin: 0">
                    <el-input-number v-model="row.unitQuantity"
                                     :min="0"
                                     :precision="2"
                                     :precision="4"
                                     :step="1"
                                     controls-position="right"
                                     style="width: 100%"
@@ -100,7 +100,7 @@
                                style="margin: 0">
                    <el-input-number v-model="row.demandedQuantity"
                                     :min="0"
                                     :precision="2"
                                     :precision="4"
                                     :step="1"
                                     controls-position="right"
                                     style="width: 100%"
@@ -274,7 +274,7 @@
    if (!Number.isFinite(numberValue)) {
      return 0;
    }
    return Number(numberValue.toFixed(2));
    return Number(numberValue.toFixed(4));
  };
  const syncDemandedQuantityTree = (
src/views/productionManagement/productStructure/StructureEdit.vue
@@ -86,7 +86,7 @@
                                style="margin: 0">
                    <el-input-number v-model="row.unitQuantity"
                                     :min="0"
                                     :precision="2"
                                     :precision="4"
                                     :step="1"
                                     controls-position="right"
                                     style="width: 100%"
@@ -103,7 +103,7 @@
                                style="margin: 0">
                    <el-input-number v-model="row.demandedQuantity"
                                     :min="0"
                                     :precision="2"
                                     :precision="4"
                                     :step="1"
                                     controls-position="right"
                                     style="width: 100%"
src/views/productionManagement/productionCosting/index.vue
@@ -169,7 +169,7 @@
      minWidth: 100,
      formatData: val => {
        if (val == null || val === "") return "-";
        return parseFloat(val).toFixed(2) + "%";
        return parseFloat(val).toFixed(4) + "%";
      },
    },
  ]);
src/views/productionManagement/productionDispatching/components/formDia.vue
@@ -51,7 +51,7 @@
                                placeholder="请输入"
                                :min="0"
                                :step="0.1"
                                :precision="2"
                                :precision="4"
                                clearable
                                @change="changeNum"
                                style="width: 100%"
src/views/productionManagement/productionReporting/components/formDia.vue
@@ -27,7 +27,7 @@
                                placeholder="请输入"
                                :min="0"
                                :step="0.1"
                                :precision="2"
                                :precision="4"
                                clearable
                                style="width: 100%"
                                @change="changeNum"
@@ -144,7 +144,7 @@
    const unitPrice = Number(form.value.unitPrice ?? 0);
    
    if (quantity > 0 && unitPrice > 0) {
        form.value.totalPrice = (quantity * unitPrice).toFixed(2);
        form.value.totalPrice = (quantity * unitPrice).toFixed(4);
    } else {
        form.value.totalPrice = '0.00';
    }
src/views/productionManagement/productionReporting/index.vue
@@ -63,7 +63,7 @@
                                 style="width: 100%"
                                 v-model="scope.row.finishedNum"
                                 :disabled="!scope.row.editType"
                                 :precision="2"
                                 :precision="4"
                                 placeholder="请输入"
                                 clearable
                                 @change="changeNum(scope.row)" />
src/views/productionManagement/safetyMonitoring/index.vue
@@ -24,7 +24,7 @@
                                </div>
                                <div class="sensor-data">
                                    <div class="data-item">
                                        <span>甲烷: {{ sensor.methane.toFixed(2) }}%</span>
                                        <span>甲烷: {{ sensor.methane.toFixed(4) }}%</span>
                                        <el-progress
                                            :percentage="Math.min(Math.round(sensor.methane * 40 * 100) / 100, 100)"
                                            :color="getProgressColor(Math.min(Math.round(sensor.methane * 40 * 100) / 100, 100), 80)"
@@ -33,7 +33,7 @@
                                        />
                                    </div>
                                    <div class="data-item">
                                        <span>硫化氢: {{ sensor.h2s.toFixed(2) }}ppm</span>
                                        <span>硫化氢: {{ sensor.h2s.toFixed(4) }}ppm</span>
                                        <el-progress
                                            :percentage="Math.min(Math.round((sensor.h2s / 20) * 100 * 100) / 100, 100)"
                                            :color="getProgressColor(Math.min(Math.round((sensor.h2s / 20) * 100 * 100) / 100, 100), 80)"
@@ -59,7 +59,7 @@
                                </div>
                                <div class="sensor-data">
                                    <div class="data-item">
                                        <span>甲烷: {{ sensor.methane.toFixed(2) }}%</span>
                                        <span>甲烷: {{ sensor.methane.toFixed(4) }}%</span>
                                        <el-progress
                                            :percentage="Math.min(Math.round(sensor.methane * 40 * 100) / 100, 100)"
                                            :color="getProgressColor(sensor.methane, 2.5)"
@@ -68,7 +68,7 @@
                                        />
                                    </div>
                                    <div class="data-item">
                                        <span>硫化氢: {{ sensor.h2s.toFixed(2) }}ppm</span>
                                        <span>硫化氢: {{ sensor.h2s.toFixed(4) }}ppm</span>
                                        <el-progress
                                            :percentage="Math.min(Math.round((sensor.h2s / 20) * 100 * 100) / 100, 100)"
                                            :color="getProgressColor(sensor.h2s, 10)"
@@ -339,7 +339,7 @@
        formatProgress(percentage) {
            if (percentage == null || isNaN(percentage)) return '0.00%'
            const val = Math.round(Number(percentage) * 100) / 100
            return `${val.toFixed(2)}%`
            return `${val.toFixed(4)}%`
        },
        // 初始化图表
        initChart() {
@@ -437,7 +437,7 @@
        generateRandomData(count, min, max) {
            const data = []
            for (let i = 0; i < count; i++) {
                data.push(+(Math.random() * (max - min) + min).toFixed(2))
                data.push(+(Math.random() * (max - min) + min).toFixed(4))
            }
            return data
        },
@@ -455,15 +455,15 @@
        refreshSensorData() {
            // 更新储罐区传感器数据
            this.tankSensors.forEach(sensor => {
                sensor.methane = +(Math.random() * 4).toFixed(2)
                sensor.h2s = +(Math.random() * 15).toFixed(2)
                sensor.methane = +(Math.random() * 4).toFixed(4)
                sensor.h2s = +(Math.random() * 15).toFixed(4)
                sensor.status = this.getSensorStatus(sensor.methane, sensor.h2s)
            })
            
            // 更新压缩机传感器数据
            this.compressorSensors.forEach(sensor => {
                sensor.methane = +(Math.random() * 6).toFixed(2)
                sensor.h2s = +(Math.random() * 20).toFixed(2)
                sensor.methane = +(Math.random() * 6).toFixed(4)
                sensor.h2s = +(Math.random() * 20).toFixed(4)
                sensor.status = this.getSensorStatus(sensor.methane, sensor.h2s)
            })
            
@@ -497,7 +497,7 @@
            const h2sPct = Math.min(Math.round((sensor.h2s / 20) * 100 * 100) / 100, 100)
            const isMethaneMajor = methanePct >= h2sPct
            const overGas = isMethaneMajor ? '甲烷' : '硫化氢'
            const percent = (isMethaneMajor ? methanePct : h2sPct).toFixed(2)
            const percent = (isMethaneMajor ? methanePct : h2sPct).toFixed(4)
            this.currentWarning = {
                location: sensor.name,
                gas: overGas,
src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -61,7 +61,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="数量:" prop="quantity">
              <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="2" :disabled="isViewMode || processQuantityDisabled"/>
              <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="4" :disabled="isViewMode || processQuantityDisabled"/>
            </el-form-item>
          </el-col>
        </el-row>
@@ -75,7 +75,7 @@
                               v-model="form.qualifiedQuantity"
                               placeholder="请输入"
                               clearable
                               :precision="2"
                               :precision="4"
                               @change="handleQualifiedQuantityChange"
                               :disabled="isViewMode" />
            </el-form-item>
@@ -89,7 +89,7 @@
                               v-model="form.unqualifiedQuantity"
                               placeholder="请输入"
                               clearable
                               :precision="2"
                               :precision="4"
                               @change="handleUnqualifiedQuantityChange"
                               :disabled="isViewMode" />
            </el-form-item>
src/views/qualityManagement/nonconformingManagement/components/formDia.vue
@@ -50,7 +50,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="数量:" prop="quantity">
              <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="2"/>
              <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="4"/>
            </el-form-item>
          </el-col>
        </el-row>
src/views/qualityManagement/processInspection/components/formDia.vue
@@ -93,7 +93,7 @@
                               v-model="form.quantity"
                               placeholder="请输入"
                               clearable
                               :precision="2"
                               :precision="4"
                               :disabled="isViewMode || processQuantityDisabled" />
            </el-form-item>
          </el-col>
@@ -108,7 +108,7 @@
                               v-model="form.qualifiedQuantity"
                               placeholder="请输入"
                               clearable
                               :precision="2"
                               :precision="4"
                               @change="handleQualifiedQuantityChange"
                               :disabled="isViewMode" />
            </el-form-item>
@@ -122,7 +122,7 @@
                               v-model="form.unqualifiedQuantity"
                               placeholder="请输入"
                               clearable
                               :precision="2"
                               :precision="4"
                               @change="handleUnqualifiedQuantityChange"
                               :disabled="isViewMode" />
            </el-form-item>
src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -79,7 +79,7 @@
          <el-col :span="12">
            <el-form-item label="数量:" prop="quantity">
              <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入"
                               clearable :precision="2" :disabled="isViewMode || supplierQuantityDisabled"/>
                               clearable :precision="4" :disabled="isViewMode || supplierQuantityDisabled"/>
            </el-form-item>
          </el-col>
        </el-row>
@@ -87,14 +87,14 @@
          <el-col :span="12">
            <el-form-item label="合格数量:" prop="qualifiedQuantity">
              <el-input-number :step="0.01" :min="0" :max="form.quantity || 0" style="width: 100%"
                               v-model="form.qualifiedQuantity" placeholder="请输入" :precision="2"
                               v-model="form.qualifiedQuantity" placeholder="请输入" :precision="4"
                               @change="onQualifiedChange" :disabled="isViewMode"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="不合格数量:" prop="unqualifiedQuantity">
              <el-input-number :step="0.01" :min="0" :max="form.quantity || 0" style="width: 100%"
                               v-model="form.unqualifiedQuantity" placeholder="请输入" :precision="2"
                               v-model="form.unqualifiedQuantity" placeholder="请输入" :precision="4"
                               @change="onUnqualifiedChange" :disabled="isViewMode"/>
            </el-form-item>
          </el-col>
src/views/qualityManagement/visualization/qualityDashboard.vue
@@ -51,7 +51,7 @@
          </template>
          <EChart :series="passRateSeries" :legend="{ show: false }" :chartStyle="{ height: '340px', width: '100%' }" />
          <div class="passrate-text">
            当前合格率:<b>{{ (passRate * 100).toFixed(1) }}%</b>
            当前合格率:<b>{{ (passRate * 100).toFixed(4) }}%</b>
          </div>
        </el-card>
      </el-col>
@@ -121,7 +121,7 @@
    progress: { show: true, width: 12 },
    axisLine: { lineStyle: { width: 12 } },
    pointer: { show: true },
    detail: { valueAnimation: true, formatter: (v) => `${(v * 100).toFixed(1)}%` },
    detail: { valueAnimation: true, formatter: (v) => `${(v * 100).toFixed(4)}%` },
    data: [{ value: passRate.value }],
  },
])
@@ -205,7 +205,7 @@
    spcData.value.shift()
  }
  spcXAxis.value.push(`${spcXAxis.value.length + 1}`)
  spcData.value.push(parseFloat(nextVal.toFixed(2)))
  spcData.value.push(parseFloat(nextVal.toFixed(4)))
  spcSeries.value[0].data = [...spcData.value]
  spcSeries.value[1].data = new Array(spcData.value.length).fill(UCL.value)
  spcSeries.value[2].data = new Array(spcData.value.length).fill(CL.value)
@@ -217,10 +217,10 @@
  }
  const last = spcData.value[spcData.value.length - 1]
  if (last > UCL.value) {
    speak(`预警,最新测量值 ${last.toFixed(2)} 超过上限`)
    speak(`预警,最新测量值 ${last.toFixed(4)} 超过上限`)
  }
  if (last < LCL.value) {
    speak(`预警,最新测量值 ${last.toFixed(2)} 低于下限`)
    speak(`预警,最新测量值 ${last.toFixed(4)} 低于下限`)
  }
}
@@ -235,7 +235,7 @@
  for (let i = 0; i < 20; i++) {
    spcXAxis.value.push(`${i + 1}`)
    const v = CL.value + (Math.random() - 0.5) * 6
    spcData.value.push(parseFloat(v.toFixed(2)))
    spcData.value.push(parseFloat(v.toFixed(4)))
  }
  spcSeries.value[0].data = [...spcData.value]
  spcSeries.value[1].data = new Array(spcData.value.length).fill(UCL.value)