d5b8e7915b34afa282a2db74e677360333d2dd4f..32d77de0edf205080b302b89ac0386e79ab2cced
2026-09-09 gongchunyi
fix: 基础产品导入修改
32d77d 对比 | 目录
2026-09-09 gongchunyi
fix: 基础产品导入按钮调整
842d3a 对比 | 目录
2026-08-26 zhang_nuo
fix(monitor/operlog): 修复操作日志表格操作日期显示错误
9b25e5 对比 | 目录
2026-09-11 yuan
fix: 修改生产追溯的报工时间和质检时间取值
749664 对比 | 目录
2026-08-29 yuan
fix: 统一销售和采购相关页面金额、单价、数量、总价保留6位小数
35bca0 对比 | 目录
2026-08-26 zss
fix(monitor): 修正操作时间选择器的日期格式
9c19b7 对比 | 目录
2026-08-26 yuan
feat: 添加清除当前用户的所有消息按钮
6a2af2 对比 | 目录
2026-08-26 zhang_nuo
fix[monitor/operlog]: 修正操作日志日期格式并隐藏请求参数
7a74f3 对比 | 目录
2026-08-25 gongchunyi
fix: 日期格式化
41c4ff 对比 | 目录
2026-08-25 zhang_nuo
fix: 调整多个业务模块的页面展示与字段
d8ac1c 对比 | 目录
2026-08-25 yuan
fix: 格式化维修接收时间为YYYY-MM-DD
78dd35 对比 | 目录
2026-08-25 zhang_nuo
2. 取消采购台账的绑定的销售合同号
0a0dc6 对比 | 目录
2026-08-20 zhang_nuo
feat[date]: 新增 parseDate 工具函数并统一日期展示格式
0e8a32 对比 | 目录
2026-08-12 gongchunyi
feat(table): 统一表格日期字段展示格式为YYYY-MM-DD
bdbd35 对比 | 目录
2026-08-11 gongchunyi
fix: 去除采购台账默认当天查询
fd8b9a 对比 | 目录
2026-08-26 yuan
fix: 采购台账隐藏批量生成数据按钮
c32002 对比 | 目录
2026-08-26 yuan
fix: 登录日志的访问日期只保留时分秒
45c26c 对比 | 目录
已修改50个文件
765 ■■■■■ 文件已修改
src/api/system/message.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/PIMTable/PIMTable.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/NotificationCenter/index.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/ruoyi.js 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/summarizeTable.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/parameterMaintenance/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/product/ImportExcel/index.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/product/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/collaborativeApproval/knowledgeBase/index.vue 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/collaborativeApproval/rulesRegulationsManagement/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/collaborativeApproval/sealManagement/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipmentManagement/ledger/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipmentManagement/repair/Modal/RepairModal.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipmentManagement/spareParts/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipmentManagement/upkeep/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/payable/purchaseReturn.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/receivable/salesReturn.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/dispatchLog/Record.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/Record.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/Qualified.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/Record.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/Unqualified.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockReport/index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/monitor/logininfor/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/monitor/operlog/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personnelManagement/employeeRecord/components/JobInfoSection.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personnelManagement/employeeRecord/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personnelManagement/socialSecuritySet/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/paymentLedger/index.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementLedger/index.vue 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementReport/index.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/purchaseReturnOrder/New.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/purchaseReturnOrder/ProductList.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/purchaseReturnOrder/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/index.vue 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionTraceability/index.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/workOrderManagement/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/safeProduction/dangerInvestigation/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/receiptPaymentLedger/index.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/returnOrder/components/detailDia.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/returnOrder/components/formDia.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesQuotation/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/dept/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/dict/data.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/dict/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/post/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/role/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/message.js
@@ -35,6 +35,14 @@
  });
}
// 清除当前用户的全部消息
export function clearAllMessage() {
  return request({
    url: "/system/notice/clearAll",
    method: "delete",
  });
}
// 确认消息
export function confirmMessage(noticeId, status) {
  return request({
src/components/PIMTable/PIMTable.vue
@@ -112,6 +112,10 @@
            {{ formatters(scope.row[item.prop], item.formatData) }}
          </el-tag>
        </div>
        <!-- 时间类型 -->
        <div v-else-if="item.dataType === 'date'">
          {{ scope.row[item.prop] ? dayjs(scope.row[item.prop]).format('YYYY-MM-DD') : '' }}
        </div>
        <!-- 按钮 -->
        <div v-else-if="item.dataType == 'action'"
             @click.stop>
@@ -204,6 +208,7 @@
  import pagination from "./Pagination.vue";
  import { computed, ref, inject, getCurrentInstance } from "vue";
  import { ElMessage } from "element-plus";
  import dayjs from "dayjs";
  // 获取全局的 uploadHeader
  const { proxy } = getCurrentInstance();
src/layout/components/NotificationCenter/index.vue
@@ -2,12 +2,20 @@
  <div class="notification-popover-content">
    <div class="popover-header">
      <span class="popover-title">消息通知</span>
      <el-button type="primary"
                 size="small"
                 @click="handleMarkAllAsRead"
                 :disabled="unreadCount === 0">
        一键已读
      </el-button>
      <div class="popover-actions">
        <el-button type="primary"
                   size="small"
                   @click="handleMarkAllAsRead"
                   :disabled="unreadCount === 0">
          一键已读
        </el-button>
        <el-button type="danger"
                   size="small"
                   plain
                   @click="handleClearAll">
          清除
        </el-button>
      </div>
    </div>
    <div class="notification-content">
      <el-tabs v-model="activeTab"
@@ -91,10 +99,11 @@
    listMessage,
    markAsRead,
    markAllAsRead,
    clearAllMessage,
    confirmMessage,
    getUnreadCount,
  } from "@/api/system/message";
  import { ElMessage } from "element-plus";
  import { ElMessage, ElMessageBox } from "element-plus";
  import useUserStore from "@/store/modules/user";
  import { useRouter } from "vue-router";
@@ -221,6 +230,35 @@
    }
  };
  // 清除全部消息
  const handleClearAll = async () => {
    try {
      await ElMessageBox.confirm("确认清除全部消息吗?清除后无法恢复。", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      });
    } catch (error) {
      // 取消清除
      return;
    }
    try {
      const res = await clearAllMessage();
      if (res.code === 200) {
        ElMessage.success("清除成功");
        unreadList.value = [];
        readList.value = [];
        total.value = 0;
        pageNum.value = 1;
        loadMessages();
        loadUnreadCount();
      }
    } catch (error) {
      console.error("清除消息失败:", error);
      ElMessage.error("清除失败");
    }
  };
  // 分页大小改变
  const handleSizeChange = size => {
    pageSize.value = size;
@@ -272,6 +310,11 @@
      font-weight: 500;
      color: var(--text-primary);
    }
    .popover-actions {
      display: flex;
      align-items: center;
    }
  }
  .notification-content {
src/utils/ruoyi.js
@@ -4,6 +4,47 @@
 */
// 日期格式化
export function parseDate(time, pattern) {
    if (arguments.length === 0 || !time) {
        return null
    }
    const format = pattern || '{y}-{m}-{d}'
    let date
    if (typeof time === 'object') {
        date = time
    } else {
        if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
            time = parseInt(time)
        } else if (typeof time === 'string') {
            time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '')
        }
        if ((typeof time === 'number') && (time.toString().length === 10)) {
            time = time * 1000
        }
        date = new Date(time)
    }
    const formatObj = {
        y: date.getFullYear(),
        m: date.getMonth() + 1,
        d: date.getDate(),
        h: date.getHours(),
        i: date.getMinutes(),
        s: date.getSeconds(),
        a: date.getDay()
    }
    const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
        let value = formatObj[key]
        // Note: getDay() returns 0 on Sunday
        if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
        if (result.length > 0 && value < 10) {
            value = '0' + value
        }
        return value || 0
    })
    return time_str
}
// 日期格式化
export function parseTime(time, pattern) {
  if (arguments.length === 0 || !time) {
    return null
src/utils/summarizeTable.js
@@ -40,14 +40,22 @@
  });
  return sums;
};
// 不含税总价计算
const calculateTaxExclusiveTotalPrice = (taxInclusiveTotalPrice, taxRate) => {
// 不含税总价计算,decimals 为保留小数位数(销售/采购相关页面传 6)
const calculateTaxExclusiveTotalPrice = (
  taxInclusiveTotalPrice,
  taxRate,
  decimals = 2
) => {
  const taxRateDecimal = taxRate / 100;
  return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(2);
  return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(decimals);
};
// 含税总价计算
const calculateTaxIncludeTotalPrice = (taxInclusiveUnitPrice, quantity) => {
  return (taxInclusiveUnitPrice * quantity).toFixed(2);
// 含税总价计算,decimals 为保留小数位数(销售/采购相关页面传 6)
const calculateTaxIncludeTotalPrice = (
  taxInclusiveUnitPrice,
  quantity,
  decimals = 2
) => {
  return (taxInclusiveUnitPrice * quantity).toFixed(decimals);
};
// 导出函数供其他文件使用
export {
src/views/basicData/parameterMaintenance/index.vue
@@ -302,6 +302,7 @@
    {
      label: "创建时间",
      prop: "createTime",
      dataType:"date"
    },
    {
      label: "操作",
@@ -374,7 +375,7 @@
  const formCreateTimeDate = computed({
    get: () => (formData.createTime ? String(formData.createTime).split(" ")[0] : ""),
    set: (value) => {
      formData.createTime = value ? `${value} ${dayjs().format("HH:mm:ss")}` : "";
        formData.createTime = value ? dayjs(value).format("YYYY-MM-DD") : "";
    },
  });
  // const productTypes = ref([]);
src/views/basicData/product/ImportExcel/index.vue
@@ -26,36 +26,21 @@
  name: "产品维护导入",
});
const props = defineProps({
  productId: { type: [String, Number], default: "" },
});
const emits = defineEmits(["uploadSuccess"]);
const fileUploadRef = ref();
const upload = reactive({
  // 是否显示弹出层(供应商导入)
  open: false,
  // 弹出层标题(供应商导入)
  title: "",
  title: "产品导入",
  // 是否禁用上传
  isUploading: false,
  // 设置上传的请求头部
  headers: { Authorization: "Bearer " + getToken() },
});
// 上传的地址(携带 productId 参数,传给后端的 importProduct 接口)
const uploadUrl = computed(
  () =>
    import.meta.env.VITE_APP_BASE_API +
    "/basic/product/import" +
    (props.productId ? `?productId=${props.productId}` : "")
);
// 上传的地址
const uploadUrl = computed(() => import.meta.env.VITE_APP_BASE_API + "/basic/product/import");
// 点击导入
const handleImport = () => {
  if (!props.productId) {
    ElMessage({ message: "请先选择产品", type: "warning" });
    return;
  }
  upload.open = true;
  upload.title = "产品导入";
};
const submitFileForm = () => {
src/views/basicData/product/index.vue
@@ -9,6 +9,9 @@
                  @clear="searchFilter"
                  clearable
                  prefix-icon="Search" />
        <span style="margin-left: 12px">
          <ImportExcel @uploadSuccess="handleImportSuccess" />
        </span>
        <el-button v-if="false"
                   type="primary"
                   @click="openProDia('addOne')"
@@ -72,8 +75,6 @@
                   @click="openModelDia('add')">
          新增规格型号
        </el-button>
        <ImportExcel :product-id="currentId"
                     @uploadSuccess="getModelList" />
        <el-button type="danger"
                   @click="handleDelete"
                   style="margin-left: 10px"
@@ -536,6 +537,13 @@
      tableLoading.value = false;
    });
  };
  // 导入完成后刷新产品树与右侧规格列表
  const handleImportSuccess = () => {
    getProductTreeList();
    if (currentId.value) {
      getModelList();
    }
  };
  // 删除规格型号
  const handleDelete = () => {
    let ids = [];
src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -127,11 +127,11 @@
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="使用次数" prop="usageCount">
              <el-input-number v-model="form.usageCount" :min="0" style="width: 100%" />
            </el-form-item>
          </el-col>
<!--          <el-col :span="12">-->
<!--            <el-form-item label="使用次数" prop="usageCount">-->
<!--              <el-input-number v-model="form.usageCount" :min="0" style="width: 100%" />-->
<!--            </el-form-item>-->
<!--          </el-col>-->
        </el-row>
      </el-form>
    </FormDialog>
@@ -163,9 +163,9 @@
              {{ getEfficiencyLabel(currentKnowledge.efficiency) }}
            </el-tag>
          </el-descriptions-item>
          <el-descriptions-item label="使用次数">
            <el-tag type="info">{{ currentKnowledge.usageCount }} 次</el-tag>
          </el-descriptions-item>
<!--          <el-descriptions-item label="使用次数">-->
<!--            <el-tag type="info">{{ currentKnowledge.usageCount }} 次</el-tag>-->
<!--          </el-descriptions-item>-->
          <el-descriptions-item label="创建人">
            {{ currentKnowledge.creator }}
          </el-descriptions-item>
@@ -202,19 +202,19 @@
          <h4>使用统计</h4>
          <div class="usage-stats">
            <el-row :gutter="20">
              <el-col :span="8">
                <div class="stat-item">
                  <div class="stat-number">{{ currentKnowledge.usageCount }}</div>
                  <div class="stat-label">使用次数</div>
                </div>
              </el-col>
              <el-col :span="8">
<!--              <el-col :span="8">-->
<!--                <div class="stat-item">-->
<!--                  <div class="stat-number">{{ currentKnowledge.usageCount }}</div>-->
<!--                  <div class="stat-label">使用次数</div>-->
<!--                </div>-->
<!--              </el-col>-->
              <el-col :span="12">
                <div class="stat-item">
                  <div class="stat-number">{{ getEfficiencyScore(currentKnowledge.efficiency) }}%</div>
                  <div class="stat-label">效率提升</div>
                </div>
              </el-col>
              <el-col :span="8">
              <el-col :span="12">
                <div class="stat-item">
                  <div class="stat-number">{{ getTimeSaved(currentKnowledge.efficiency) }}</div>
                  <div class="stat-label">平均节省时间</div>
@@ -528,24 +528,24 @@
      return typeMap[params] || "info";
    }
  },
  {
    label: "文件数量",
    prop: "fileCount",
    width: 100,
    align: "center"
  },
  {
    label: "切片数量",
    prop: "totalChunkCount",
    width: 100,
    align: "center"
  },
  {
    label: "使用次数",
    prop: "usageCount",
    width: 100,
    align: "center"
  },
  // {
  //   label: "文件数量",
  //   prop: "fileCount",
  //   width: 100,
  //   align: "center"
  // },
  // {
  //   label: "切片数量",
  //   prop: "totalChunkCount",
  //   width: 100,
  //   align: "center"
  // },
  // {
  //   label: "使用次数",
  //   prop: "usageCount",
  //   width: 100,
  //   align: "center"
  // },
  {
    label: "创建人",
    prop: "creator",
@@ -555,6 +555,7 @@
    label: "创建时间",
    prop: "createTime",
    width: 180,
    dataType:"date"
  },
  {
    dataType: "action",
@@ -577,13 +578,13 @@
          openFilesDialog(row);
        }
      },
      {
        name: "问答",
        type: "text",
        clickFun: (row) => {
          openChatDialog(row);
        }
      },
      // {
      //   name: "问答",
      //   type: "text",
      //   clickFun: (row) => {
      //     openChatDialog(row);
      //   }
      // },
      {
        name: "详情",
        type: "text",
src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
@@ -309,7 +309,7 @@
    },
    { label: "版本", prop: "version", width: 120 },
    { label: "发布人", prop: "createUserName", width: 120 },
    { label: "发布时间", prop: "createTime", width: 180 },
    { label: "发布时间", prop: "createTime", width: 180,dataType: "date" },
    {
      label: "状态",
      prop: "status",
src/views/collaborativeApproval/sealManagement/index.vue
@@ -252,7 +252,7 @@
    formatData: (v) => getSealTypeText(v),
    formatType: () => 'info'
  },
  { label: '申请时间', prop: 'createTime', width: 180 },
  { label: '申请时间', prop: 'createTime', width: 180,dataType: "date" },
  {
    label: '状态',
    prop: 'status',
src/views/equipmentManagement/ledger/index.vue
@@ -127,7 +127,7 @@
        <el-descriptions-item label="含税总价">{{ detailData.taxIncludingPriceTotal }}</el-descriptions-item>
        <el-descriptions-item label="税率(%)">{{ detailData.taxRate }}</el-descriptions-item>
        <el-descriptions-item label="不含税总价">{{ detailData.unTaxIncludingPriceTotal }}</el-descriptions-item>
        <el-descriptions-item label="录入日期">{{ detailData.createTime }}</el-descriptions-item>
        <el-descriptions-item label="录入日期">{{ detailData.createTime ? dayjs(detailData.createTime).format('YYYY-MM-DD') : '' }}</el-descriptions-item>
        <el-descriptions-item label="预计运行时间">{{ detailData.planRuntimeTime ? dayjs(detailData.planRuntimeTime).format('YYYY-MM-DD') : '' }}</el-descriptions-item>
        <el-descriptions-item label="设备图片" :span="2">
          <div v-if="detailData.storageBlobVOs && detailData.storageBlobVOs.length > 0" style="display: flex; gap: 10px; flex-wrap: wrap;">
src/views/equipmentManagement/repair/Modal/RepairModal.vue
@@ -90,8 +90,14 @@
        </el-col>
        <el-col :span="12">
          <el-form-item label="验收时间">
            <el-input v-model="form.acceptanceTime"
                      disabled />
            <el-date-picker
                v-model="form.acceptanceTime"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择验收时间"
                :disabled="true"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="24">
@@ -199,7 +205,9 @@
    form.storageBlobDTOs = data.storageBlobVOs || [];
    form.maintenanceName = data.maintenanceName;
    form.acceptanceName = data.acceptanceName;
    form.acceptanceTime = data.acceptanceTime;
    form.acceptanceTime = data.acceptanceTime
      ? dayjs(data.acceptanceTime).format("YYYY-MM-DD")
      : undefined;
    form.acceptanceRemark = data.acceptanceRemark;
  };
src/views/equipmentManagement/spareParts/index.vue
@@ -185,7 +185,7 @@
  { label: "备件名称", prop: "sparePartsName" },
  { label: "领用数量", prop: "quantity" },
  { label: "操作人", prop: "operator" },
  { label: "时间", prop: "createTime" },
  { label: "时间", prop: "createTime",dataType:"date" },
]);
const handleTabChange = async (name) => {
src/views/equipmentManagement/upkeep/index.vue
@@ -349,7 +349,7 @@
      label: "登记日期",
      minWidth: 100,
      formatData: cell =>
        cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-",
        cell ? dayjs(cell).format("YYYY-MM-DD") : "-",
    },
    {
      fixed: "right",
src/views/financialManagement/payable/purchaseReturn.vue
@@ -85,7 +85,7 @@
  { label: "退货单号", prop: "returnNo", minWidth: "150" },
  { label: "供应商", prop: "supplierName", minWidth: "180" },
  { label: "关联入库单号", prop: "inboundBatches", minWidth: "150" },
  { label: "退货日期", prop: "preparedAt", minWidth: "170" },
  { label: "退货日期", prop: "preparedAt", minWidth: "170",dataType: "date"},
  {
    label: "退款总额",
    prop: "totalAmount",
src/views/financialManagement/receivable/salesReturn.vue
@@ -77,7 +77,7 @@
  { label: "退货单号", prop: "returnNo", minWidth: "150" },
  { label: "客户名称", prop: "customerName", minWidth: "180" },
  { label: "关联发货单号", prop: "shippingNo", minWidth: "150" },
  { label: "退货日期", prop: "makeTime", minWidth: "170" },
  { label: "退货日期", prop: "makeTime", minWidth: "170",dataType: "date" },
  {
    label: "退款总额",
    prop: "refundAmount",
src/views/inventoryManagement/dispatchLog/Record.vue
@@ -108,7 +108,11 @@
                         show-overflow-tooltip />
        <el-table-column label="出库日期"
                         prop="createTime"
                         show-overflow-tooltip />
                         show-overflow-tooltip >
          <template #default="scope">
            {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '-' }}
          </template>
        </el-table-column>
        <el-table-column label="产品大类"
                         prop="productName"
                         show-overflow-tooltip />
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -107,9 +107,11 @@
                         prop="inboundBatches"
                         width="200"
                         show-overflow-tooltip />
        <el-table-column label="入库时间"
                         prop="createTime"
                         show-overflow-tooltip />
        <el-table-column label="入库时间" show-overflow-tooltip>
          <template #default="scope">
            {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '-' }}
          </template>
        </el-table-column>
        <el-table-column label="产品大类"
                         prop="productName"
                         show-overflow-tooltip />
src/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue
@@ -50,11 +50,13 @@
            show-overflow-tooltip
          />
          <el-table-column label="备注" prop="remark" show-overflow-tooltip />
          <el-table-column
            label="最近更新时间"
            prop="updateTime"
            show-overflow-tooltip
          />
          <el-table-column label="最近更新时间"
                           prop="updateTime"
                           show-overflow-tooltip >
            <template #default="scope">
              {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }}
            </template>
          </el-table-column>
          <el-table-column fixed="right" label="操作" min-width="180" align="center">
            <template #default="scope">
              <el-button
src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -31,7 +31,13 @@
        <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip />
        <el-table-column label="库存预警数量" prop="warnNum"  show-overflow-tooltip />
        <el-table-column label="备注" prop="remark"  show-overflow-tooltip />
        <el-table-column label="最近更新时间" prop="updateTime" show-overflow-tooltip />
        <el-table-column label="最近更新时间"
                         prop="updateTime"
                         show-overflow-tooltip >
          <template #default="scope">
            {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }}
          </template>
        </el-table-column>
        <el-table-column fixed="right" label="操作" min-width="90" align="center">
          <template #default="scope">
            <el-button link type="primary" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">领用</el-button>
src/views/inventoryManagement/stockManagement/Record.vue
@@ -107,7 +107,11 @@
                         show-overflow-tooltip />
        <el-table-column label="最近更新时间"
                         prop="updateTime"
                         show-overflow-tooltip />
                         show-overflow-tooltip >
          <template #default="scope">
            {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }}
          </template>
        </el-table-column>
        <el-table-column fixed="right"
                         label="操作"
                         min-width="80"
src/views/inventoryManagement/stockManagement/Unqualified.vue
@@ -26,7 +26,13 @@
        <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip />
        <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip />
        <el-table-column label="备注" prop="remark"  show-overflow-tooltip />
        <el-table-column label="最近更新时间" prop="updateTime" show-overflow-tooltip />
        <el-table-column label="最近更新时间"
                         prop="updateTime"
                         show-overflow-tooltip >
          <template #default="scope">
            {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }}
          </template>
        </el-table-column>
        <el-table-column fixed="right" label="操作" min-width="90" align="center">
          <template #default="scope">
            <el-button link type="primary" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">领用</el-button>
src/views/inventoryManagement/stockReport/index.vue
@@ -152,7 +152,11 @@
                           prop="createTime"
                           width="200"
                           show-overflow-tooltip
                           v-if="searchForm.reportType !== 'inout'" />
                           v-if="searchForm.reportType !== 'inout'" >
            <template #default="scope">
              {{ getDate(scope.row.createTime) }}
            </template>
          </el-table-column>
          <el-table-column label="入库批次"
                           prop="inboundBatches"
                           width="180"
@@ -216,6 +220,7 @@
  import { ref, reactive, onMounted, nextTick, getCurrentInstance } from "vue";
  import { ElMessage } from "element-plus";
  import * as echarts from "echarts";
  import dayjs from "dayjs";
  import pagination from "@/components/PIMTable/Pagination.vue";
  import {
    getStockInventoryInAndOutReportList,
@@ -261,6 +266,14 @@
    );
  };
  const getDate = val =>{
    console.log(val)
    if(!val){
      return "--"
    }
    return dayjs(val).isValid() ? dayjs(val).format('YYYY‑MM‑DD') : '--'
  }
  // 获取来源类型选项
  const fetchStockRecordTypeOptions = () => {
    findAllQualifiedStockInRecordTypeOptions().then(res => {
src/views/monitor/logininfor/index.vue
@@ -109,7 +109,7 @@
         <el-table-column label="描述" align="center" prop="msg" :show-overflow-tooltip="true" />
         <el-table-column label="访问时间" align="center" prop="loginTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
            <template #default="scope">
               <span>{{ parseTime(scope.row.loginTime) }}</span>
               <span>{{ parseDate(scope.row.loginTime) }}</span>
            </template>
         </el-table-column>
      </el-table>
@@ -126,6 +126,7 @@
<script setup name="Logininfor">
import { list, delLogininfor, cleanLogininfor, unlockLogininfor } from "@/api/monitor/logininfor"
import {parseDate} from "@/utils/ruoyi.js";
const { proxy } = getCurrentInstance()
const { sys_common_status } = proxy.useDict("sys_common_status")
src/views/monitor/operlog/index.vue
@@ -125,7 +125,7 @@
         </el-table-column>
         <el-table-column label="操作日期" align="center" prop="operTime" width="180" sortable="custom" :sort-orders="['descending', 'ascending']">
            <template #default="scope">
               <span>{{ parseTime(scope.row.operTime) }}</span>
               <span>{{ dayjs(scope.row.operTime).format("YYYY-MM-DD") }}</span>
            </template>
         </el-table-column>
         <el-table-column label="消耗时间" align="center" prop="costTime" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']">
@@ -165,9 +165,9 @@
               <el-col :span="24">
                  <el-form-item label="操作方法:">{{ form.method }}</el-form-item>
               </el-col>
               <el-col :span="24">
                  <el-form-item label="请求参数:">{{ form.operParam }}</el-form-item>
               </el-col>
<!--               <el-col :span="24">-->
<!--                  <el-form-item label="请求参数:">{{ form.operParam }}</el-form-item>-->
<!--               </el-col>-->
               <el-col :span="24">
                  <el-form-item label="返回参数:">{{ form.jsonResult }}</el-form-item>
               </el-col>
@@ -181,7 +181,7 @@
                  <el-form-item label="消耗时间:">{{ form.costTime }}毫秒</el-form-item>
               </el-col>
               <el-col :span="8">
                  <el-form-item label="操作时间:">{{ parseTime(form.operTime) }}</el-form-item>
                  <el-form-item label="操作时间:">{{ dayjs(form.operTime).format("YYYY-MM-DD") }}</el-form-item>
               </el-col>
               <el-col :span="24">
                  <el-form-item label="异常信息:" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item>
@@ -200,6 +200,7 @@
<script setup name="Operlog">
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog"
import {onMounted} from "vue";
import dayjs from "dayjs";
const { proxy } = getCurrentInstance()
const { sys_oper_type, sys_common_status } = proxy.useDict("sys_oper_type","sys_common_status")
src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js
@@ -159,16 +159,18 @@
  if (val == null || val === "") return "";
  if (Array.isArray(val) && val.length >= 3) {
    const [y, m, d, h = 0, min = 0, s = 0] = val;
    return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD HH:mm:ss");
    // return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD HH:mm:ss");
      return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD");
  }
  if (typeof val === "number") {
    const d = val > 1e12 ? dayjs(val) : dayjs.unix(val);
    return d.isValid() ? d.format("YYYY-MM-DD HH:mm:ss") : "";
    return d.isValid() ? d.format("YYYY-MM-DD") : "";
  }
  const s = String(val).trim();
  if (!s) return "";
  const parsed = dayjs(s.includes("T") ? s : s.replace(/-/g, "/"));
  return parsed.isValid() ? parsed.format("YYYY-MM-DD HH:mm:ss") : s;
  return parsed.isValid() ? parsed.format("YYYY-MM-DD") : s;
}
export function formatDisplayTime(val) {
src/views/personnelManagement/employeeRecord/components/JobInfoSection.vue
@@ -10,7 +10,7 @@
    <!-- 第一行:合同开始 / 合同结束 / 试用期 / 转正 -->
    <el-row :gutter="24">
      <el-col :span="6">
        <el-form-item label="入职日期" prop="contractStartTime">
        <el-form-item label="合同开始日期" prop="contractStartTime">
          <el-date-picker
            v-model="form.contractStartTime"
            type="date"
src/views/personnelManagement/employeeRecord/index.vue
@@ -171,17 +171,17 @@
    width: 120,
  },
  {
    label: "入职日期",
    label: "合同开始日期",
    prop: "contractStartTime",
    width: 120,
  },
  {
    label: "转正日期",
    prop: "positiveDate",
    width: 120,
    dataType: "slot",
    slot: "positiveDate",
  },
  // {
  //   label: "转正日期",
  //   prop: "positiveDate",
  //   width: 120,
  //   dataType: "slot",
  //   slot: "positiveDate",
  // },
  {
    label: "年龄",
    prop: "age",
src/views/personnelManagement/socialSecuritySet/index.vue
@@ -65,7 +65,7 @@
  { label: "保险类型", prop: "insuranceTypes", width: 120 },
  { label: "使用范围", prop: "deptNames", width: 120 },
  { label: "备注", prop: "remark", minWidth: 120 },
  { label: "创建时间", prop: "createTime", width: 160 },
  { label: "创建时间", prop: "createTime", width: 160,dataType: "date" },
  { label: "创建人", prop: "createUserName", width: 100 },
  {
    dataType: "action",
src/views/procurementManagement/paymentLedger/index.vue
@@ -79,7 +79,7 @@
                    @pagination="sonPaginationSearch">
            <template #payableAmountSlot="{ row }">
              <el-text type="danger">
                {{ parseFloat(row.payableAmount).toFixed(2) }}
                {{ parseFloat(row.payableAmount).toFixed(6) }}
              </el-text>
            </template>
            <template #paymentActionSlot="{ row }">
@@ -99,8 +99,8 @@
          <el-date-picker style="width:100%" v-model="paymentForm.paymentDate" value-format="YYYY-MM-DD" type="date" placeholder="请选择付款日期" clearable />
        </el-form-item>
        <el-form-item label="付款金额:" prop="paymentAmount">
          <el-input-number style="width:100%" v-model="paymentForm.paymentAmount" :precision="2" :min="0" :max="Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0))" placeholder="请输入付款金额" controls-position="right" />
          <div style="color:#e6a23c;font-size:12px;margin-top:4px">当前可付款余额:{{ Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0)).toFixed(2) }} 元</div>
          <el-input-number style="width:100%" v-model="paymentForm.paymentAmount" :min="0" :precision="6" :max="Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0))" placeholder="请输入付款金额" controls-position="right" />
          <div style="color:#e6a23c;font-size:12px;margin-top:4px">当前可付款余额:{{ Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0)).toFixed(6) }} 元</div>
        </el-form-item>
        <el-form-item label="付款方式:" prop="paymentMethod">
          <el-select v-model="paymentForm.paymentMethod" placeholder="请选择付款方式" style="width:100%" clearable>
@@ -169,7 +169,7 @@
      prop: "contractAmount",
      width: 200,
      formatData: params => {
        return params ? parseFloat(params).toFixed(2) : 0;
        return params ? parseFloat(params).toFixed(6) : 0;
      },
    },
    {
@@ -177,7 +177,7 @@
      prop: "paymentAmount",
      width: 200,
      formatData: params => {
        return params ? parseFloat(params).toFixed(2) : 0;
        return params ? parseFloat(params).toFixed(6) : 0;
      },
    },
    {
@@ -206,28 +206,11 @@
  const currentPaymentRow = ref({});
  const paymentFormRef = ref(null);
  const paymentForm = reactive({ paymentDate:"", paymentAmount:undefined, paymentMethod:"", remark:"" });
  const validatePaymentAmount = (_,v,cb) => {
    if(!v) return cb(new Error("请输入付款金额"));
    const max = Math.max(0,(Number(currentPaymentRow.value.payableAmount)||0)-(Number(currentPaymentRow.value.paymentAmount)||0));
    if(v > max) return cb(new Error(`付款金额不能超过可付款余额 ${max.toFixed(2)} 元`));
    cb();
  };
  const paymentRules = {
    paymentDate:[{required:true,message:"请选择付款日期",trigger:"change"}],
    paymentAmount:[{required:true,validator:validatePaymentAmount,trigger:"blur"}],
    paymentMethod:[{required:true,message:"请选择付款方式",trigger:"change"}],
  };
  const openPaymentDialog = row => { currentPaymentRow.value=row; paymentForm.paymentDate=""; paymentForm.paymentAmount=undefined; paymentForm.paymentMethod=""; paymentForm.remark=""; paymentDialogVisible.value=true; };
  const validatePaymentAmount = (_,v,cb) => { if(!v) return cb(new Error("请输入付款金额")); const m=Math.max(0,(Number(currentPaymentRow.value.payableAmount)||0)-(Number(currentPaymentRow.value.paymentAmount)||0)); if(v>m) return cb(new Error(`付款金额不能超过可付款余额 ${m.toFixed(6)} 元`)); cb(); };
  const paymentRules = { paymentDate:[{required:true,message:"请选择付款日期",trigger:"change"}], paymentAmount:[{required:true,validator:validatePaymentAmount,trigger:"blur"}], paymentMethod:[{required:true,message:"请选择付款方式",trigger:"change"}] };
  const openPaymentDialog = r => { currentPaymentRow.value=r; paymentForm.paymentDate=""; paymentForm.paymentAmount=undefined; paymentForm.paymentMethod=""; paymentForm.remark=""; paymentDialogVisible.value=true; };
  const closePaymentDialog = () => { paymentFormRef.value?.resetFields(); paymentDialogVisible.value=false; };
  const submitPaymentForm = () => {
    paymentFormRef.value?.validate(valid => {
      if(valid){
        savePayment({ supplierId:currentSupplierId.value, purchaseContractNumber:currentPaymentRow.value.purchaseContractNumber, paymentDate:paymentForm.paymentDate, paymentAmount:paymentForm.paymentAmount, paymentMethod:paymentForm.paymentMethod, remark:paymentForm.remark }).then(res => {
          proxy.$modal.msgSuccess("新增付款成功"); closePaymentDialog(); getPaymenRecordtList(currentSupplierId.value); getList();
        });
      }
    });
  };
  const submitPaymentForm = () => { paymentFormRef.value?.validate(v=>{ if(v){ savePayment({ supplierId:currentSupplierId.value, purchaseContractNumber:currentPaymentRow.value.purchaseContractNumber, paymentDate:paymentForm.paymentDate, paymentAmount:paymentForm.paymentAmount, paymentMethod:paymentForm.paymentMethod, remark:paymentForm.remark }).then(res=>{ proxy.$modal.msgSuccess("新增付款成功"); closePaymentDialog(); getPaymenRecordtList(currentSupplierId.value); getList(); }); } }); };
  // 主表合计方法
  const summarizeMainTable = param => {
@@ -235,6 +218,9 @@
      param,
      ["contractAmounts", "paymentAmount", "payableAmount"],
      {
        contractAmounts: { decimalPlaces: 6 },
        paymentAmount: { decimalPlaces: 6 },
        payableAmount: { decimalPlaces: 6 },
        ticketsNum: { noDecimal: true }, // 不保留小数
        futureTickets: { noDecimal: true }, // 不保留小数
      }
@@ -246,6 +232,9 @@
      param,
      ["contractAmount", "invoiceAmount", "paymentAmount"],
      {
        contractAmount: { decimalPlaces: 6 },
        invoiceAmount: { decimalPlaces: 6 },
        paymentAmount: { decimalPlaces: 6 },
        ticketsNum: { noDecimal: true }, // 不保留小数
        futureTickets: { noDecimal: true }, // 不保留小数
      }
@@ -254,7 +243,7 @@
      summarizeTable[summarizeTable.length - 1] =
        originalTableDataSon.value[
          originalTableDataSon.value.length - 1
        ].payableAmount.toFixed(2);
        ].payableAmount.toFixed(6);
    } else {
      summarizeTable[summarizeTable.length - 1] = 0.0;
    }
@@ -330,7 +319,7 @@
  };
  const formattedNumber = (row, column, cellValue) => {
    if (column.property !== "supplierName") {
      return parseFloat(cellValue).toFixed(2);
      return parseFloat(cellValue).toFixed(6);
    } else {
      return cellValue;
    }
src/views/procurementManagement/procurementLedger/index.vue
@@ -68,6 +68,7 @@
      <div style="display: flex;justify-content: flex-end;margin-bottom: 20px;">
        <el-button type="success"
                   plain
                   v-if="false"
                   @click="handleBatchGenerate">批量生成数据</el-button>
        <el-button type="primary"
                   @click="openForm('add')">新增台账</el-button>
@@ -147,10 +148,10 @@
                         prop="purchaseContractNumber"
                         width="160"
                         show-overflow-tooltip />
        <el-table-column label="销售合同号"
                         prop="salesContractNo"
                         width="160"
                         show-overflow-tooltip />
<!--        <el-table-column label="销售合同号"-->
<!--                         prop="salesContractNo"-->
<!--                         width="160"-->
<!--                         show-overflow-tooltip />-->
        <el-table-column label="供应商名称"
                         prop="supplierName"
                         width="160"
@@ -191,6 +192,11 @@
                         show-overflow-tooltip />
        <el-table-column label="合同金额(元)"
                         prop="contractAmount"
                         width="200"
                         show-overflow-tooltip
                         :formatter="formattedNumber" />
        <el-table-column label="实际合同金额(元)"
                         prop="netContractAmount"
                         width="200"
                         show-overflow-tooltip
                         :formatter="formattedNumber" />
@@ -593,7 +599,7 @@
            <el-form-item label="含税单价(元):"
                          prop="taxInclusiveUnitPrice">
              <el-input-number v-model="productForm.taxInclusiveUnitPrice"
                               :precision="2"
                               :precision="6"
                               :step="0.1"
                               :min="0"
                               clearable
@@ -606,7 +612,7 @@
                          prop="quantity">
              <el-input-number :step="0.1"
                               clearable
                               :precision="2"
                               :precision="6"
                               :min="0"
                               style="width: 100%"
                               v-model="productForm.quantity"
@@ -620,7 +626,7 @@
            <el-form-item label="含税总价(元):"
                          prop="taxInclusiveTotalPrice">
              <el-input-number v-model="productForm.taxInclusiveTotalPrice"
                               :precision="2"
                               :precision="6"
                               :step="0.1"
                               :min="0"
                               clearable
@@ -632,7 +638,7 @@
            <el-form-item label="不含税总价(元):"
                          prop="taxExclusiveTotalPrice">
              <el-input-number v-model="productForm.taxExclusiveTotalPrice"
                               :precision="2"
                               :precision="6"
                               :step="0.1"
                               :min="0"
                               clearable
@@ -659,7 +665,7 @@
            <el-form-item label="库存预警数量:"
                          prop="warnNum">
              <el-input-number v-model="productForm.warnNum"
                               :precision="2"
                               :precision="6"
                               :step="0.1"
                               :min="0"
                               clearable
@@ -1079,7 +1085,7 @@
  };
  const formattedNumber = (row, column, cellValue) => {
    return parseFloat(cellValue).toFixed(2);
    return parseFloat(cellValue).toFixed(6);
  };
  // 查询列表
  /** 搜索按钮操作 */
@@ -1199,6 +1205,11 @@
        "futureTicketsAmount",
      ],
      {
        taxInclusiveUnitPrice: { decimalPlaces: 6 },
        taxInclusiveTotalPrice: { decimalPlaces: 6 },
        taxExclusiveTotalPrice: { decimalPlaces: 6 },
        ticketsAmount: { decimalPlaces: 6 },
        futureTicketsAmount: { decimalPlaces: 6 },
        ticketsNum: { noDecimal: true }, // 不保留小数
        futureTickets: { noDecimal: true }, // 不保留小数
      }
@@ -1264,15 +1275,30 @@
  };
  // 主表合计方法
  const summarizeMainTable = param => {
    return proxy.summarizeTable(param, ["contractAmount"]);
    return proxy.summarizeTable(
      param,
      ["contractAmount", "netContractAmount"],
      {
        contractAmount: { decimalPlaces: 6 },
        netContractAmount: { decimalPlaces: 6 },
      }
    );
  };
  // 子表合计方法
  const summarizeProTable = param => {
    return proxy.summarizeTable(param, [
      "taxInclusiveUnitPrice",
      "taxInclusiveTotalPrice",
      "taxExclusiveTotalPrice",
    ]);
    return proxy.summarizeTable(
      param,
      [
        "taxInclusiveUnitPrice",
        "taxInclusiveTotalPrice",
        "taxExclusiveTotalPrice",
      ],
      {
        taxInclusiveUnitPrice: { decimalPlaces: 6 },
        taxInclusiveTotalPrice: { decimalPlaces: 6 },
        taxExclusiveTotalPrice: { decimalPlaces: 6 },
      }
    );
  };
  // 打开弹框
  const openForm = async (type, row) => {
@@ -1780,14 +1806,16 @@
    productForm.value.taxInclusiveTotalPrice =
      proxy.calculateTaxIncludeTotalPrice(
        productForm.value.taxInclusiveUnitPrice,
        productForm.value.quantity
        productForm.value.quantity,
        6
      );
    if (productForm.value.taxRate) {
      // 不含税总价计算
      productForm.value.taxExclusiveTotalPrice =
        proxy.calculateTaxExclusiveTotalPrice(
          productForm.value.taxInclusiveTotalPrice,
          productForm.value.taxRate
          productForm.value.taxRate,
          6
        );
    }
  };
@@ -1818,7 +1846,7 @@
        productForm.value.taxInclusiveUnitPrice = (
          Number(productForm.value.taxInclusiveTotalPrice) /
          Number(productForm.value.quantity)
        ).toFixed(2);
        ).toFixed(6);
        // 确保结果不为负数
        if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
          productForm.value.taxInclusiveUnitPrice = "0";
@@ -1829,7 +1857,7 @@
        productForm.value.quantity = (
          Number(productForm.value.taxInclusiveTotalPrice) /
          Number(productForm.value.taxInclusiveUnitPrice)
        ).toFixed(2);
        ).toFixed(6);
        // 确保结果不为负数
        if (Number(productForm.value.quantity) < 0) {
          productForm.value.quantity = "0";
@@ -1839,7 +1867,7 @@
      productForm.value.taxExclusiveTotalPrice = (
        Number(productForm.value.taxInclusiveTotalPrice) /
        (1 + taxRate / 100)
      ).toFixed(2);
      ).toFixed(6);
      // 确保结果不为负数
      if (Number(productForm.value.taxExclusiveTotalPrice) < 0) {
        productForm.value.taxExclusiveTotalPrice = "0";
@@ -1849,7 +1877,7 @@
      productForm.value.taxInclusiveTotalPrice = (
        Number(productForm.value.taxExclusiveTotalPrice) *
        (1 + taxRate / 100)
      ).toFixed(2);
      ).toFixed(6);
      // 确保结果不为负数
      if (Number(productForm.value.taxInclusiveTotalPrice) < 0) {
        productForm.value.taxInclusiveTotalPrice = "0";
@@ -1859,7 +1887,7 @@
        productForm.value.taxInclusiveUnitPrice = (
          Number(productForm.value.taxInclusiveTotalPrice) /
          Number(productForm.value.quantity)
        ).toFixed(2);
        ).toFixed(6);
        // 确保结果不为负数
        if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
          productForm.value.taxInclusiveUnitPrice = "0";
@@ -1870,7 +1898,7 @@
        productForm.value.quantity = (
          Number(productForm.value.taxInclusiveTotalPrice) /
          Number(productForm.value.taxInclusiveUnitPrice)
        ).toFixed(2);
        ).toFixed(6);
        // 确保结果不为负数
        if (Number(productForm.value.quantity) < 0) {
          productForm.value.quantity = "0";
src/views/procurementManagement/procurementReport/index.vue
@@ -48,7 +48,7 @@
          <div class="summary-stats">
            <div class="stat-item">
              <span class="stat-label">采购总额:</span>
              <span class="stat-value">¥{{ businessSummaryStats.totalAmount.toLocaleString() }}</span>
              <span class="stat-value">¥{{ formatStatAmount(businessSummaryStats.totalAmount) }}</span>
            </div>
            <div class="stat-item">
              <span class="stat-label">商品种类:</span>
@@ -56,7 +56,7 @@
            </div>
            <div class="stat-item">
              <span class="stat-label">退款总额:</span>
              <span class="stat-value">{{ businessSummaryStats.returnAmount }}</span>
              <span class="stat-value">¥{{ formatStatAmount(businessSummaryStats.returnAmount) }}</span>
            </div>
          </div>
        </div>
@@ -101,8 +101,17 @@
// 统计数据
const businessSummaryStats = ref({
  totalAmount: 0,
  returnAmount: 0,
  productTypes: 0
})
// 汇总金额展示,保留6位小数
const formatStatAmount = (val) => {
  return Number(val || 0).toLocaleString('zh-CN', {
    minimumFractionDigits: 6,
    maximumFractionDigits: 6
  })
}
// 表格列配置(根据后端字段定义)
const tableColumns = ref([
@@ -119,7 +128,7 @@
    prop: 'purchaseNum',
    width: 120,
    formatData: (val) => {
      return val ? parseFloat(val).toLocaleString() : '0'
      return val ? parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 6, maximumFractionDigits: 6 }) : '0'
    }
  },
  {
@@ -127,7 +136,7 @@
    prop: 'returnQuantity',
    width: 120,
    formatData: (val) => {
      return val ? parseFloat(val).toLocaleString() : '0'
      return val ? parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 6, maximumFractionDigits: 6 }) : '0'
    }
  },
  {
@@ -135,14 +144,14 @@
    prop: 'returnAmount',
    width: 120,
    formatData: (val) => {
      return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '¥0.00'
      return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 6, maximumFractionDigits: 6 })}` : '¥0.000000'
    }
  },
  {
    label: '退款储量',
    prop: 'purchaseAmount',
    formatData: (val) => {
      return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '¥0.00'
      return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 6, maximumFractionDigits: 6 })}` : '¥0.000000'
    }
  },
  {
@@ -155,7 +164,7 @@
    prop: 'averagePrice',
    width: 120,
    formatData: (val) => {
      return val ? `¥${parseFloat(val).toFixed(2)}` : '¥0.00'
      return val ? `¥${parseFloat(val).toFixed(6)}` : '¥0.000000'
    }
  },
  {
@@ -266,6 +275,7 @@
      } else {
        businessSummaryStats.value = {
          totalAmount: 0,
          returnAmount: 0,
          productTypes: 0
        }
      }
src/views/procurementManagement/purchaseReturnOrder/New.vue
@@ -275,6 +275,7 @@
                  <el-input-number v-model="scope.row.returnQuantity"
                            controls-position="right"
                            :step="1"
                            :precision="6"
                            :min="0"
                            :max="getReturnQtyMax(scope.row)"
                            :disabled="getReturnQtyMax(scope.row) <= 0"
@@ -340,7 +341,7 @@
          <el-input-number v-model="formState.totalDiscountAmount"
                           controls-position="right"
                           :step="0.01"
                           :precision="2"
                           :precision="6"
                           style="width: 100%;"
                           @change="handleChangeTotalDiscountAmount"
                           placeholder="请输入整单折扣额"/>
@@ -353,7 +354,7 @@
          <el-input v-model="formState.totalDiscountRate"
                           controls-position="right"
                           :step="0.01"
                           :precision="2"
                           :precision="6"
                           style="width: 100%;"
                           @change="totalDiscount"
                           placeholder="请输入整单折扣率">
@@ -377,7 +378,7 @@
          <el-input-number v-model="formState.totalAmount"
                           controls-position="right"
                           :step="0.01"
                           :precision="2"
                           :precision="6"
                           style="width: 100%;"
                           placeholder="请输入成交金额"/>
        </el-form-item>
@@ -511,7 +512,7 @@
});
const formattedNumber = (row, column, cellValue) => {
  return parseFloat(cellValue).toFixed(2);
  return parseFloat(cellValue).toFixed(6);
};
const formatAmount = (value) => {
@@ -522,7 +523,7 @@
  if (Number.isNaN(num)) {
    return '--'
  }
  return num.toFixed(2)
  return num.toFixed(6)
}
const toNumber = (val) => {
@@ -535,14 +536,15 @@
  const total = Number(row?.stockInNum ?? row?.totalQuantity ?? row?.quantity ?? 0)
  const un = Number(row?.unQuantity ?? 0)
  if (!Number.isFinite(total) || !Number.isFinite(un)) return 0
  return Math.max(total - un, 0)
  // 保留6位小数,避免浮点减法产生精度误差
  return Math.max(parseFloat((total - un).toFixed(6)), 0)
}
const getReturnTotal = (row) => {
  const qty = toNumber(row?.returnQuantity)
  const unitPrice = toNumber(row?.taxInclusiveUnitPrice)
  const total = qty * unitPrice
  return Number(total.toFixed(2))
  return Number(total.toFixed(6))
}
const syncReturnTotal = (row) => {
@@ -568,7 +570,7 @@
  }
  const baseAmount = getBaseAmount()
  // 折扣额 = 产品退货总价合计 * 折扣率
  formState.value.totalDiscountAmount = Number((baseAmount * (discountRate / 100)).toFixed(2))
  formState.value.totalDiscountAmount = Number((baseAmount * (discountRate / 100)).toFixed(6))
  syncTotalAmount()
}
@@ -596,9 +598,12 @@
        "taxExclusiveTotalPrice",
      ],
      {
        stockInNum: { noDecimal: true }, // 不保留小数
        returnQuantity: { noDecimal: true }, // 不保留小数
        unQuantity: { noDecimal: true }, // 不保留小数
        stockInNum: { decimalPlaces: 6 },
        returnQuantity: { decimalPlaces: 6 },
        unQuantity: { decimalPlaces: 6 },
        taxInclusiveUnitPrice: { decimalPlaces: 6 },
        taxInclusiveTotalPrice: { decimalPlaces: 6 },
        taxExclusiveTotalPrice: { decimalPlaces: 6 },
      }
  );
};
@@ -620,11 +625,11 @@
  if (normalizedAmount > baseAmount) {
    proxy.$modal.msgError("整单折扣额不能大于产品退货总价合计")
    formState.value.totalDiscountAmount = Number(baseAmount.toFixed(2))
    formState.value.totalDiscountAmount = Number(baseAmount.toFixed(6))
  }
  const discountRate = (toNumber(formState.value.totalDiscountAmount) / baseAmount) * 100
  formState.value.totalDiscountRate = Number(discountRate.toFixed(2))
  formState.value.totalDiscountRate = Number(discountRate.toFixed(6))
  syncTotalAmount()
}
@@ -639,7 +644,7 @@
  const baseAmount = getBaseAmount()
  const discount = toNumber(formState.value.totalDiscountAmount)
  // 成交金额 = 产品退货总价合计 - 折扣额
  formState.value.totalAmount = Number((baseAmount - discount).toFixed(2))
  formState.value.totalAmount = Number((baseAmount - discount).toFixed(6))
}
// 获取供应商选项
src/views/procurementManagement/purchaseReturnOrder/ProductList.vue
@@ -116,7 +116,7 @@
const selectedRows = ref([])
const tableLoading = ref(false)
const formattedNumber = (row, column, cellValue) => {
  return parseFloat(cellValue).toFixed(2);
  return parseFloat(cellValue).toFixed(6);
};
/** 已退货数量 = 入库行总数量 − 当前可退货数量(剩余) */
src/views/procurementManagement/purchaseReturnOrder/index.vue
@@ -458,7 +458,7 @@
  if (Number.isNaN(num)) {
    return value;
  }
  return num.toFixed(2);
  return num.toFixed(6);
};
/** 已退货数量 = 入库行总数量 − 当前可退货数量(剩余) */
@@ -466,7 +466,8 @@
  const total = Number(row?.stockInNum ?? row?.totalQuantity ?? row?.quantity ?? 0);
  const un = Number(row?.unQuantity ?? 0);
  if (!Number.isFinite(total) || !Number.isFinite(un)) return 0;
  return Math.max(total - un, 0);
  // 保留6位小数,避免浮点减法产生精度误差
  return Math.max(parseFloat((total - un).toFixed(6)), 0);
};
onMounted(() => {
src/views/productionManagement/productionReporting/index.vue
@@ -236,6 +236,7 @@
      label: "创建时间",
      prop: "createTime",
      width: 120,
      dataType: "date"
    },
    {
      dataType: "action",
src/views/productionManagement/productionTraceability/index.vue
@@ -44,7 +44,7 @@
            </el-tag>
          </el-descriptions-item>
          <el-descriptions-item label="客户名称">{{ rowData.productionOrderDto?.customerName || '-' }}</el-descriptions-item>
          <el-descriptions-item label="开始日期">{{ parseTime(rowData.productionOrderDto?.startTime) || '-' }}</el-descriptions-item>
          <el-descriptions-item label="开始日期">{{ parseDate(rowData.productionOrderDto?.startTime) || '-' }}</el-descriptions-item>
          <el-descriptions-item label="完成进度">
            <el-progress :percentage="rowData.productionOrderDto?.completionStatus>=100?100:rowData.productionOrderDto?.completionStatus"
                         :color="customColors(rowData.productionOrderDto?.completionStatus)"
@@ -132,8 +132,8 @@
            <el-descriptions-item label="生产工单号">{{ detailData.workOrder.workOrderNo || '-' }}</el-descriptions-item>
            <el-descriptions-item label="计划数量">{{ detailData.workOrder.planQuantity || 0 }}</el-descriptions-item>
            <el-descriptions-item label="完成数量">{{ detailData.workOrder.completeQuantity || 0 }}</el-descriptions-item>
            <el-descriptions-item label="实际开始时间">{{ parseTime(detailData.workOrder.actualStartTime) || '-' }}</el-descriptions-item>
            <el-descriptions-item label="实际结束时间">{{ parseTime(detailData.workOrder.actualEndTime) || '-' }}</el-descriptions-item>
            <el-descriptions-item label="实际开始时间">{{ parseDate(detailData.workOrder.actualStartTime) || '-' }}</el-descriptions-item>
            <el-descriptions-item label="实际结束时间">{{ parseDate(detailData.workOrder.actualEndTime) || '-' }}</el-descriptions-item>
            <!-- <el-descriptions-item label="完成进度">
              <el-progress :percentage="detailData.workOrder.completionStatus >= 100 ? 100 : (detailData.workOrder.completionStatus || 0)"
                           :color="customColors(detailData.workOrder.completionStatus)"
@@ -157,7 +157,7 @@
            <el-table-column label="创建时间"
                             align="center">
              <template #default="{ row }">
                {{ parseTime(row.createTime) }}
                {{ parseDate(row.createTime) }}
              </template>
            </el-table-column>
            <el-table-column label="工时(h)"
@@ -230,10 +230,10 @@
             :key="record.id"
             class="quality-record-block">
          <div class="detail-section">
            <h3 class="section-title">检测记录 {{ index + 1 }} - {{ parseTime(record.createTime) }}</h3>
            <h3 class="section-title">检测记录 {{ index + 1 }} - {{ parseDate(record.checkTime) }}</h3>
            <el-descriptions :column="3"
                             border>
              <el-descriptions-item label="检测日期">{{ parseTime(record.createTime) || '-' }}</el-descriptions-item>
              <el-descriptions-item label="检测日期">{{ parseDate(record.checkTime) || '-' }}</el-descriptions-item>
              <el-descriptions-item label="报工单号">{{ record.reportNo || '-' }}</el-descriptions-item>
              <el-descriptions-item label="检验员">{{ record.userName || '-' }}</el-descriptions-item>
              <el-descriptions-item label="产品名称">{{ record.productName || '-' }}</el-descriptions-item>
@@ -287,7 +287,7 @@
  import { ref, reactive, onMounted, computed } from "vue";
  import { useRoute, useRouter } from "vue-router";
  import { ElMessage } from "element-plus";
  import { parseTime } from "@/utils/ruoyi";
  import { parseDate } from "@/utils/ruoyi";
  import InputModal from "@/views/productionManagement/productionReporting/Input.vue";
  import {
    getOrderDetail,
@@ -408,8 +408,9 @@
    detailData.value = {
      workOrder: row.workOrder || {},
      reports: (row.reportList || []).map(r => ({
        ...r.reportMain,
        // 产出数据先展开,报工单数据后展开,保证创建时间用报工单的
        ...(r.reportOutputList[0] || {}),
        ...r.reportMain,
        productionOperationParamList: r.reportParamList || [],
      })),
    };
src/views/productionManagement/workOrderManagement/index.vue
@@ -544,6 +544,12 @@
    },
  });
  const { searchForm } = toRefs(data);
  // 数量运算保留6位小数,避免浮点减法出现 7.199999999999999 这类精度误差
  const toQuantity = val => {
    const n = Number(val);
    if (!Number.isFinite(n)) return 0;
    return parseFloat(n.toFixed(6));
  };
  const toProgressPercentage = val => {
    const n = Number(val);
    if (!Number.isFinite(n)) return 0;
@@ -675,7 +681,10 @@
    currentReportRowData.value = row;
    const planQuantity = Number(row.planQuantity || 0);
    const completeQuantity = Number(row.completeQuantity || 0);
    const remainingQuantity = Math.max(0, planQuantity - completeQuantity);
    const remainingQuantity = Math.max(
      0,
      toQuantity(planQuantity - completeQuantity)
    );
    reportForm.planQuantity = remainingQuantity;
    reportForm.quantity =
      row.quantity !== undefined && row.quantity !== null ? row.quantity : null;
src/views/safeProduction/dangerInvestigation/index.vue
@@ -69,7 +69,11 @@
                         show-overflow-tooltip />
        <el-table-column label="上报时间"
                         prop="createTime"
                         show-overflow-tooltip />
                         show-overflow-tooltip >
          <template #default="scope">
            {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '-' }}
          </template>
        </el-table-column>
        <el-table-column label="整改完成期限"
                         prop="rectifyTime"
                         width="120"
src/views/salesManagement/receiptPaymentLedger/index.vue
@@ -126,12 +126,12 @@
    <el-dialog v-model="receiptDialogVisible" title="新增回款" width="35%" @close="closeReceiptDialog">
      <el-form :model="receiptForm" label-width="100px" :rules="receiptRules" ref="receiptFormRef">
        <el-form-item label="销售合同号:"> {{ currentRow.salesContractNo || '--' }} </el-form-item>
        <el-form-item label="销售合同号:">{{ currentRow.salesContractNo || '--' }}</el-form-item>
        <el-form-item label="回款日期:" prop="paymentDate">
          <el-date-picker style="width:100%" v-model="receiptForm.paymentDate" value-format="YYYY-MM-DD" type="date" placeholder="请选择回款日期" clearable />
        </el-form-item>
        <el-form-item label="回款金额:" prop="paymentAmount">
          <el-input-number style="width:100%" v-model="receiptForm.paymentAmount" :precision="2" :min="0" :max="Math.max(0,(Number(currentRow.receiptableAmount)||0)-(Number(currentRow.receiptPaymentAmount)||0))" placeholder="请输入回款金额" controls-position="right" />
          <el-input-number style="width:100%" v-model="receiptForm.paymentAmount" :min="0" :precision="6" :max="Math.max(0,(Number(currentRow.receiptableAmount)||0)-(Number(currentRow.receiptPaymentAmount)||0))" placeholder="请输入回款金额" controls-position="right" />
          <div style="color:#e6a23c;font-size:12px;margin-top:4px">当前可回款余额:{{ formattedNumber(null,null,Math.max(0,(Number(currentRow.receiptableAmount)||0)-(Number(currentRow.receiptPaymentAmount)||0))) }} 元</div>
        </el-form-item>
        <el-form-item label="回款方式:" prop="paymentMethod">
@@ -184,28 +184,11 @@
  const currentRow = ref({});
  const receiptFormRef = ref(null);
  const receiptForm = reactive({ paymentDate:"", paymentAmount:undefined, paymentMethod:"", remark:"" });
  const validatePaymentAmount = (_,v,cb) => {
    if(!v) return cb(new Error("请输入回款金额"));
    const max = Math.max(0,(Number(currentRow.value.receiptableAmount)||0)-(Number(currentRow.value.receiptPaymentAmount)||0));
    if(v > max) return cb(new Error(`回款金额不能超过可回款余额 ${max.toFixed(2)} 元`));
    cb();
  };
  const receiptRules = {
    paymentDate:[{required:true,message:"请选择回款日期",trigger:"change"}],
    paymentAmount:[{required:true,validator:validatePaymentAmount,trigger:"blur"}],
    paymentMethod:[{required:true,message:"请选择回款方式",trigger:"change"}],
  };
  const openReceiptDialog = row => { currentRow.value=row; receiptForm.paymentDate=""; receiptForm.paymentAmount=undefined; receiptForm.paymentMethod=""; receiptForm.remark=""; receiptDialogVisible.value=true; };
  const validatePaymentAmount = (_,v,cb) => { if(!v) return cb(new Error("请输入回款金额")); const m=Math.max(0,(Number(currentRow.value.receiptableAmount)||0)-(Number(currentRow.value.receiptPaymentAmount)||0)); if(v>m) return cb(new Error(`回款金额不能超过可回款余额 ${m.toFixed(6)} 元`)); cb(); };
  const receiptRules = { paymentDate:[{required:true,message:"请选择回款日期",trigger:"change"}], paymentAmount:[{required:true,validator:validatePaymentAmount,trigger:"blur"}], paymentMethod:[{required:true,message:"请选择回款方式",trigger:"change"}] };
  const openReceiptDialog = r => { currentRow.value=r; receiptForm.paymentDate=""; receiptForm.paymentAmount=undefined; receiptForm.paymentMethod=""; receiptForm.remark=""; receiptDialogVisible.value=true; };
  const closeReceiptDialog = () => { receiptFormRef.value?.resetFields(); receiptDialogVisible.value=false; };
  const submitReceiptForm = () => {
    receiptFormRef.value?.validate(valid => {
      if(valid){
        saveReceiptPayment({ customerId:customerId.value, salesContractNo:currentRow.value.salesContractNo, paymentDate:receiptForm.paymentDate, paymentAmount:receiptForm.paymentAmount, paymentMethod:receiptForm.paymentMethod, remark:receiptForm.remark }).then(res => {
          proxy.$modal.msgSuccess("新增回款成功"); closeReceiptDialog(); receiptPaymentList(customerId.value); getList();
        });
      }
    });
  };
  const submitReceiptForm = () => { receiptFormRef.value?.validate(v=>{ if(v){ saveReceiptPayment({ customerId:customerId.value, salesContractNo:currentRow.value.salesContractNo, paymentDate:receiptForm.paymentDate, paymentAmount:receiptForm.paymentAmount, paymentMethod:receiptForm.paymentMethod, remark:receiptForm.remark }).then(res=>{ proxy.$modal.msgSuccess("新增回款成功"); closeReceiptDialog(); receiptPaymentList(customerId.value); getList(); }); } }); };
  // 查询列表
  /** 搜索按钮操作 */
  const handleQuery = () => {
@@ -231,7 +214,7 @@
    });
  };
  const formattedNumber = (row, column, cellValue) => {
    return cellValue ? parseFloat(cellValue).toFixed(2) : "0.00";
    return cellValue ? parseFloat(cellValue).toFixed(6) : "0.000000";
  };
  // 主表合计方法
  const summarizeMainTable = param => {
@@ -239,6 +222,9 @@
      param,
      ["invoiceTotal", "receiptPaymentAmount", "unReceiptPaymentAmount"],
      {
        invoiceTotal: { decimalPlaces: 6 },
        receiptPaymentAmount: { decimalPlaces: 6 },
        unReceiptPaymentAmount: { decimalPlaces: 6 },
        ticketsNum: { noDecimal: true }, // 不保留小数
        futureTickets: { noDecimal: true }, // 不保留小数
      }
@@ -250,6 +236,9 @@
      param,
      ["contractAmount", "receiptPaymentAmount", "receiptableAmount"],
      {
        contractAmount: { decimalPlaces: 6 },
        receiptPaymentAmount: { decimalPlaces: 6 },
        receiptableAmount: { decimalPlaces: 6 },
        ticketsNum: { noDecimal: true }, // 不保留小数
        futureTickets: { noDecimal: true }, // 不保留小数
      }
src/views/salesManagement/returnOrder/components/detailDia.vue
@@ -239,7 +239,7 @@
      raw?.canReturnQuantity,
    returnQuantity: Number.isFinite(num) ? num : 0,
    price: Number(raw?.taxInclusiveUnitPrice ?? raw?.price ?? 0),
    amount: Number(raw?.amount ?? 0).toFixed(2),
    amount: Number(raw?.amount ?? 0).toFixed(6),
    isQuality: raw?.isQuality ?? 2,
    remark: raw?.remark ?? "",
  };
src/views/salesManagement/returnOrder/components/formDia.vue
@@ -216,7 +216,8 @@
  const total = Number(row?.stockOutNum ?? row?.totalQuantity ?? row?.totalReturnNum ?? 0);
  const un = Number(row?.unQuantity ?? 0);
  if (!Number.isFinite(total) || !Number.isFinite(un)) return 0;
  return Math.max(total - un, 0);
  // 保留6位小数,避免浮点减法产生精度误差
  return Math.max(parseFloat((total - un).toFixed(6)), 0);
};
const tableColumn = ref([
@@ -437,7 +438,7 @@
    num,
    returnQuantity: Number.isFinite(num) ? num : 0,
    price: Number(raw?.taxInclusiveUnitPrice ?? raw?.price ?? 0),
    amount: Number(raw?.amount ?? 0).toFixed(2),
    amount: Number(raw?.amount ?? 0).toFixed(6),
    isQuality: raw?.isQuality ?? 2,
    remark: raw?.remark ?? "",
  };
@@ -666,14 +667,14 @@
const calculateRowAmount = (row) => {
  const stockOutNum = Number(row.returnQuantity || 0);
  const price = Number(row.price || 0);
  row.amount = (stockOutNum * price).toFixed(2);
  row.amount = (stockOutNum * price).toFixed(6);
};
const calculateTotalRefund = () => {
  const total = tableData.value.reduce((sum, row) => {
    return sum + Number(row.amount || 0);
  }, 0);
  form.value.refundAmount = total.toFixed(2);
  form.value.refundAmount = total.toFixed(6);
};
const availableProducts = ref([]);
@@ -715,7 +716,7 @@
        returnQuantity: 0,
        num: 0,
        price: Number(product.taxInclusiveUnitPrice ?? 0),
        amount: "0.00",
        amount: "0.000000",
        isQuality: 2,
        remark: "",
        productCategory: product.productCategory ?? product.productName ?? "",
src/views/salesManagement/salesLedger/index.vue
@@ -664,7 +664,7 @@
          align="right"
        >
          <template #default="scope">
            {{ Number(scope.row.totalAmount ?? 0).toFixed(2) }}
            {{ Number(scope.row.totalAmount ?? 0).toFixed(6) }}
          </template>
        </el-table-column>
        <el-table-column fixed="right" label="操作" width="120" align="center">
@@ -776,7 +776,7 @@
                :min="0"
                v-model="productForm.taxInclusiveUnitPrice"
                style="width: 100%"
                :precision="2"
                :precision="6"
                placeholder="请输入"
                clearable
                @change="calculateFromUnitPrice"
@@ -791,7 +791,7 @@
                v-model="productForm.quantity"
                placeholder="请输入"
                clearable
                :precision="2"
                :precision="6"
                @change="calculateFromQuantity"
                style="width: 100%"
              />
@@ -1144,7 +1144,7 @@
                      v-model="scope.row.deliveryQuantity"
                      :min="0"
                      :max="getDeliveryBatchDeliveryMax(scope.row)"
                      :precision="2"
                      :precision="6"
                      :step="0.01"
                      controls-position="right"
                      @change="handleDeliveryBatchQuantityChange(scope.row)"
@@ -1542,9 +1542,9 @@
};
const formattedNumber = (row, column, cellValue) => {
  if (cellValue === undefined || cellValue === null || cellValue === "") {
    return "0.00";
    return "0.000000";
  }
  return parseFloat(cellValue).toFixed(2);
  return parseFloat(cellValue).toFixed(6);
};
const findLedgerRecordByRow = (row) => {
  if (!row) return null;
@@ -1708,11 +1708,15 @@
};
// 主表合计方法
const summarizeMainTable = (param) => {
  return proxy.summarizeTable(param, [
    "contractAmount",
    "taxInclusiveTotalPrice",
    "taxExclusiveTotalPrice",
  ]);
  return proxy.summarizeTable(
    param,
    ["contractAmount", "taxInclusiveTotalPrice", "taxExclusiveTotalPrice"],
    {
      contractAmount: { decimalPlaces: 6 },
      taxInclusiveTotalPrice: { decimalPlaces: 6 },
      taxExclusiveTotalPrice: { decimalPlaces: 6 },
    }
  );
};
// 子表合计方法
const summarizeChildrenTable = (param, parentRow) => {
@@ -1734,11 +1738,19 @@
      return "";
    });
  }
  return proxy.summarizeTable(param, [
    "taxInclusiveUnitPrice",
    "taxInclusiveTotalPrice",
    "taxExclusiveTotalPrice",
  ]);
  return proxy.summarizeTable(
    param,
    [
      "taxInclusiveUnitPrice",
      "taxInclusiveTotalPrice",
      "taxExclusiveTotalPrice",
    ],
    {
      taxInclusiveUnitPrice: { decimalPlaces: 6 },
      taxInclusiveTotalPrice: { decimalPlaces: 6 },
      taxExclusiveTotalPrice: { decimalPlaces: 6 },
    }
  );
};
// 打开弹框
const openForm = async (type, row) => {
@@ -1868,10 +1880,11 @@
    const quantity = Number(p.quantity ?? 0) || 0;
    const unitPrice = Number(p.unitPrice ?? 0) || 0;
    const taxRate = "13"; // 默认 13%,便于直接提交(如需可在产品中自行修改)
    const taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2);
    const taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(6);
    const taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(
      taxInclusiveTotalPrice,
      taxRate
      taxRate,
      6
    );
    return {
      // 台账字段
@@ -1880,7 +1893,7 @@
      unit: p.unit || "",
      quantity: quantity,
      taxRate: taxRate,
      taxInclusiveUnitPrice: unitPrice.toFixed(2),
      taxInclusiveUnitPrice: unitPrice.toFixed(6),
      taxInclusiveTotalPrice: taxInclusiveTotalPrice,
      taxExclusiveTotalPrice: taxExclusiveTotalPrice,
      invoiceType: "增普票",
@@ -2549,7 +2562,7 @@
  const total = products.reduce((sum, product) => {
    return sum + (parseFloat(product.quantity) || 0);
  }, 0);
  return total.toFixed(2);
  return total.toFixed(6);
};
// 计算产品总金额
@@ -2558,7 +2571,7 @@
  const total = products.reduce((sum, product) => {
    return sum + (parseFloat(product.taxInclusiveTotalPrice) || 0);
  }, 0);
  return total.toFixed(2);
  return total.toFixed(6);
};
// 用于打印的计算函数
@@ -2567,7 +2580,7 @@
  const total = products.reduce((sum, product) => {
    return sum + (parseFloat(product.quantity) || 0);
  }, 0);
  return total.toFixed(2);
  return total.toFixed(6);
};
const getTotalAmountForPrint = (products) => {
@@ -2575,7 +2588,7 @@
  const total = products.reduce((sum, product) => {
    return sum + (parseFloat(product.taxInclusiveTotalPrice) || 0);
  }, 0);
  return total.toFixed(2);
  return total.toFixed(6);
};
const mathNum = () => {
@@ -2590,14 +2603,16 @@
  productForm.value.taxInclusiveTotalPrice =
    proxy.calculateTaxIncludeTotalPrice(
      productForm.value.taxInclusiveUnitPrice,
      productForm.value.quantity
      productForm.value.quantity,
      6
    );
  if (productForm.value.taxRate) {
    // 不含税总价计算
    productForm.value.taxExclusiveTotalPrice =
      proxy.calculateTaxExclusiveTotalPrice(
        productForm.value.taxInclusiveTotalPrice,
        productForm.value.taxRate
        productForm.value.taxRate,
        6
      );
  }
};
@@ -2616,14 +2631,15 @@
  isCalculating.value = true;
  // 计算含税单价 = 含税总价 / 数量
  productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(2);
  productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(6);
  // 如果有税率,计算不含税总价
  if (productForm.value.taxRate) {
    productForm.value.taxExclusiveTotalPrice =
      proxy.calculateTaxExclusiveTotalPrice(
        totalPrice,
        productForm.value.taxRate
        productForm.value.taxRate,
        6
      );
  }
@@ -2653,12 +2669,12 @@
  // 先计算含税总价 = 不含税总价 / (1 - 税率/100)
  const taxRateDecimal = taxRate / 100;
  const inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal);
  productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(2);
  productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(6);
  // 计算含税单价 = 含税总价 / 数量
  productForm.value.taxInclusiveUnitPrice = (
    inclusiveTotalPrice / quantity
  ).toFixed(2);
  ).toFixed(6);
  isCalculating.value = false;
};
@@ -2681,14 +2697,15 @@
  isCalculating.value = true;
  // 计算含税总价
  productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2);
  productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(6);
  // 如果有税率,计算不含税总价
  if (productForm.value.taxRate) {
    productForm.value.taxExclusiveTotalPrice =
      proxy.calculateTaxExclusiveTotalPrice(
        productForm.value.taxInclusiveTotalPrice,
        productForm.value.taxRate
        productForm.value.taxRate,
        6
      );
  }
@@ -2713,14 +2730,15 @@
  isCalculating.value = true;
  // 计算含税总价
  productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2);
  productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(6);
  // 如果有税率,计算不含税总价
  if (productForm.value.taxRate) {
    productForm.value.taxExclusiveTotalPrice =
      proxy.calculateTaxExclusiveTotalPrice(
        productForm.value.taxInclusiveTotalPrice,
        productForm.value.taxRate
        productForm.value.taxRate,
        6
      );
  }
@@ -2748,7 +2766,7 @@
  // 计算不含税总价
  productForm.value.taxExclusiveTotalPrice =
    proxy.calculateTaxExclusiveTotalPrice(inclusiveTotalPrice, taxRate);
    proxy.calculateTaxExclusiveTotalPrice(inclusiveTotalPrice, taxRate, 6);
  isCalculating.value = false;
};
src/views/salesManagement/salesQuotation/index.vue
@@ -65,7 +65,7 @@
        </el-table-column>
        <el-table-column prop="totalAmount" label="报价金额" width="120">
          <template #default="scope">
            ¥{{ scope.row.totalAmount.toFixed(2) }}
            ¥{{ scope.row.totalAmount.toFixed(6) }}
          </template>
        </el-table-column>
        <el-table-column label="操作" width="200" fixed="right" align="center">
@@ -215,7 +215,7 @@
            <el-table-column prop="unitPrice" label="单价">
              <template #default="scope">
                <el-form-item :prop="`products.${scope.$index}.unitPrice`" class="product-table-form-item">
                  <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="2" style="width: 100%" />
                  <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="6" style="width: 100%" />
                </el-form-item>
              </template>
            </el-table-column>
@@ -267,7 +267,7 @@
<!--          <el-tag :type="getStatusType(currentQuotation.status)">{{ currentQuotation.status }}</el-tag>-->
<!--        </el-descriptions-item>-->
        <el-descriptions-item label="报价总额" :span="2">
          <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">¥{{ currentQuotation.totalAmount?.toFixed(2) }}</span>
          <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">¥{{ currentQuotation.totalAmount?.toFixed(6) }}</span>
        </el-descriptions-item>
      </el-descriptions>
@@ -279,7 +279,7 @@
          <el-table-column prop="unit" label="单位" />
          <el-table-column prop="unitPrice" label="单价">
            <template #default="scope">
              ¥{{ scope.row.unitPrice.toFixed(2) }}
              ¥{{ scope.row.unitPrice.toFixed(6) }}
            </template>
          </el-table-column>
        </el-table>
src/views/system/dept/index.vue
@@ -63,7 +63,7 @@
            </el-table-column>
            <el-table-column label="创建时间" align="center" prop="createTime" width="200">
                <template #default="scope">
                    <span>{{ parseTime(scope.row.createTime) }}</span>
                    <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
                </template>
            </el-table-column>
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
src/views/system/dict/data.vue
@@ -105,7 +105,7 @@
         <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
         <el-table-column label="创建时间" align="center" prop="createTime" width="180">
            <template #default="scope">
               <span>{{ parseTime(scope.row.createTime) }}</span>
               <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
            </template>
         </el-table-column>
         <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
src/views/system/dict/index.vue
@@ -120,7 +120,7 @@
         <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
         <el-table-column label="创建时间" align="center" prop="createTime" width="180">
            <template #default="scope">
               <span>{{ parseTime(scope.row.createTime) }}</span>
               <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
            </template>
         </el-table-column>
         <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
src/views/system/post/index.vue
@@ -90,7 +90,7 @@
         </el-table-column>
         <el-table-column label="创建时间" align="center" prop="createTime" width="180">
            <template #default="scope">
               <span>{{ parseTime(scope.row.createTime) }}</span>
               <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
            </template>
         </el-table-column>
         <el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
src/views/system/role/index.vue
@@ -108,11 +108,11 @@
               ></el-switch>
            </template>
         </el-table-column>
         <el-table-column label="创建时间" align="center" prop="createTime">
            <template #default="scope">
               <span>{{ parseTime(scope.row.createTime) }}</span>
            </template>
         </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime">
             <template #default="scope">
                <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
             </template>
          </el-table-column>
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
            <template #default="scope">
              <el-tooltip content="修改" placement="top" v-if="scope.row.roleId !== 1">