spring
2026-05-25 0c4429a719f5c95a7690fae51efaaa799ef4e77d
src/views/collaborativeApproval/purchaseApproval/index.vue
@@ -244,6 +244,7 @@
import useUserStore from "@/store/modules/user";
import { modelList, productTreeList } from "@/api/basicData/product.js";
import dayjs from "dayjs";
import { getCurrentDate } from "@/utils/index.js";
const userStore = useUserStore();
@@ -570,8 +571,12 @@
  getProductOptions();
};
const getProductOptions = () => {
  productTreeList().then((res) => {
    productOptions.value = convertIdToValue(res);
  productTreeList({ productName: "成品" }).then((res) => {
    const tree = convertIdToValue(res);
    const finishedNode = tree.find(
      (item) => item?.label === "成品" || item?.productName === "成品"
    );
    productOptions.value = finishedNode?.children || tree;
  });
};
const getModels = (value) => {
@@ -776,14 +781,6 @@
      proxy.$modal.msg("已取消");
    });
};
// 获取当前日期并格式化为 YYYY-MM-DD
function getCurrentDate() {
  const today = new Date();
  const year = today.getFullYear();
  const month = String(today.getMonth() + 1).padStart(2, "0"); // 月份从0开始
  const day = String(today.getDate()).padStart(2, "0");
  return `${year}-${month}-${day}`;
}
const mathNum = () => {
   if (!productForm.value.taxRate) {
      proxy.$modal.msgWarning("请先选择税率");