xujunjie 1 жил өмнө
parent
commit
5c54a75dea

+ 2 - 1
src/pages/Detail/Index.js

@@ -18,6 +18,7 @@ import MergeModal from './MergeModal';
 import { GetTokenFromUrl, getToken } from '@/utils/utils';
 import { GetTokenFromUrl, getToken } from '@/utils/utils';
 import {
 import {
   getAuditDetail,
   getAuditDetail,
+  getVersionDetail,
   queryDelSheetRecord,
   queryDelSheetRecord,
   queryDetail,
   queryDetail,
   queryDingInstanceExecute,
   queryDingInstanceExecute,
@@ -401,7 +402,7 @@ function Detail(props) {
       localStorage.excelId = version.id;
       localStorage.excelId = version.id;
       localStorage.excelItem = JSON.stringify(version);
       localStorage.excelItem = JSON.stringify(version);
     } else {
     } else {
-      version = await getAuditDetail({ userId: currentUser.ID, excelID });
+      version = await getVersionDetail({ excelID });
       if (!version) {
       if (!version) {
         const excelId = localStorage.excelItem
         const excelId = localStorage.excelItem
           ? JSON.parse(localStorage.excelItem)
           ? JSON.parse(localStorage.excelItem)

+ 6 - 6
src/pages/Detail/TimeNode.js

@@ -27,12 +27,12 @@ function TimeNode(props) {
   const { current, list, active } = flow;
   const { current, list, active } = flow;
   const nodeId = version.template_node_id;
   const nodeId = version.template_node_id;
 
 
-  const showBackBtn = useMemo(() => {
-    if (!nodeId || flowDetail.nodes.length == 0) return false;
-    const node = flowDetail.nodes.find(item => item.Id == nodeId);
-    if (node.label == '三级审批1') return true;
-    return false;
-  }, [nodeId, flowDetail]);
+  // const showBackBtn = useMemo(() => {
+  //   if (!nodeId || flowDetail.nodes.length == 0) return false;
+  //   const node = flowDetail.nodes.find(item => item.Id == nodeId);
+  //   if (node.label == '三级审批1') return true;
+  //   return false;
+  // }, [nodeId, flowDetail]);
 
 
   function calculateHoursDifference(date1, date2) {
   function calculateHoursDifference(date1, date2) {
     const timestamp1 = date1.getTime(); // 获取第一个Date对象的时间戳(以毫秒为单位)
     const timestamp1 = date1.getTime(); // 获取第一个Date对象的时间戳(以毫秒为单位)

+ 6 - 0
src/services/boom.js

@@ -505,3 +505,9 @@ export async function getAuditDetail(params) {
   );
   );
   return res.data;
   return res.data;
 }
 }
+export async function getVersionDetail(params) {
+  const res = await request(
+    `/api/v1/purchase/bom/get-excel-detail?excel_id=${params.excelID}`
+  );
+  return res.data;
+}