xujunjie 3 rokov pred
rodič
commit
04326de47f

+ 22 - 0
src/pages/PurchaseAdmin/PurchaseList/Detail/AuditFlow.js

@@ -33,6 +33,7 @@ function AuditFlow(props) {
     formComponentValues,
     activityId,
     direction,
+    status,
   } = props;
   console.log('------------------------------', props);
   const [flow, setFlow] = useState({ workflowActivityRules: [] });
@@ -51,7 +52,27 @@ function AuditFlow(props) {
   const renderDesc = item => {
     return <></>;
   };
+  const renderAlert = () => {
+    // const audit_comment = history.list[0]?.audit_comment;
+    let item = '';
+    switch (status) {
+      case 0:
+        if (!flow.list || flow.list.FlowNodes?.length == 0) return;
+        item = <Alert message="审批拒绝" type="error" />;
+        break;
+      case 1:
+        item = <Alert message="等待审核中" type="info" />;
+        break;
+      case 2:
+        item = <Alert message={`审批被拒绝`} type="error" />;
+        break;
+      case 3:
+        item = <Alert message="审批通过" type="success" />;
+        break;
+    }
 
+    return <div style={{ marginTop: 20 }}>{item}</div>;
+  };
   const customDot = (dot, { status, index }) => {
     let item = flow.workflowActivityRules[index];
 
@@ -113,6 +134,7 @@ function AuditFlow(props) {
         ))}
         {/* <Step key={item.activityId} title={item?.activityName} description={renderDesc(item)} /> */}
       </Steps>
+      {status !== undefined && renderAlert()}
     </div>
   );
 }

+ 1 - 1
src/pages/PurchaseAdmin/PurchaseList/Detail/Index.js

@@ -956,7 +956,7 @@ function Detail(props) {
         activityId={auditDetail.activityId}
         formComponentValues={auditDetail.formComponentValues}
       />
-      {renderAlert()}
+      {/* {renderAlert()} */}
       {/* 判断是否为比对模式 */}
       {compareList.length == 2 ? (
         <>