Bladeren bron

Merge branch 'develop' of http://120.55.44.4:10080/xujunjie/BomWeb into develop

ZhaoJun 1 jaar geleden
bovenliggende
commit
e335aa4c9b

+ 4 - 0
config/router.config.js

@@ -53,6 +53,10 @@ export default [
         path: '/mobile/detail/:templateId/:versionId',
         component: './Detail/Mobile',
       },
+      {
+        path: '/temp',
+        component: './Temp/index',
+      },
 
       // {
       //   path: '/dd-login/:dingUserId',

+ 20 - 2
src/components/Flow/node/rect/mapServe.tsx

@@ -10,6 +10,7 @@ import {
   InputFiled,
   UploadFiled,
   RadioField,
+  SelectField,
 } from '../fields';
 import { PREFIX } from '../constants';
 import { UnityAction } from '@/utils/utils';
@@ -41,12 +42,14 @@ export interface IConfig {
   excel_info?: ExcelInfo;
   role_list?: string;
   is_seal?: string | number;
+  node_type_psr?: number | string;
 }
 
 const defaultConfig: IConfig = {
   muti_version: 1,
   is_start_node: 0,
   is_seal: 0,
+  node_type_psr: 0,
   excel_info: { file_name: '' },
 };
 
@@ -96,7 +99,7 @@ const Component = (props: any) => {
         console.log(exportJson);
         // const sheet = exportJson.sheets[0];
         let cell = [];
-        exportJson.sheets.forEach(sheet => {
+        exportJson.sheets.forEach((sheet, index) => {
           let titleCell = [];
           sheet.celldata.forEach(item => {
             if (item.r == 0) {
@@ -106,6 +109,7 @@ const Component = (props: any) => {
             // 生成cid
             item.v.cid = `${item.r}-${item.c}`;
           });
+          sheet.order = index;
           let tempCell = titleCell.map(item => {
             let value = '';
             if (item.v?.v) {
@@ -133,7 +137,7 @@ const Component = (props: any) => {
   };
 
   useEffect(() => {
-    if(config.id != nodeConfig.id) {
+    if (config.id != nodeConfig.id) {
       setNodeConfig({
         ...defaultConfig,
         ...config,
@@ -225,6 +229,20 @@ const Component = (props: any) => {
             { label: '否', value: 0 },
           ]}
         />
+        <SelectField
+          label="节点类型"
+          value={nodeConfig.node_type_psr}
+          onChange={value => {
+            onNodeConfigChange('node_type_psr', value);
+          }}
+          options={[
+            { label: '默认', value: 0 },
+            { label: '投标版', value: 1 },
+            { label: '签字版', value: 2 },
+            { label: '投标测算', value: 3 },
+            { label: '合同测算', value: 4 },
+          ]}
+        />
         {nodeConfig.is_start_node == 1 && (
           <>
             <InputFiled

+ 2 - 2
src/pages/Detail/AuditModal.js

@@ -5,7 +5,7 @@ import { Modal, Input } from 'antd';
 
 // 审批意见
 function AuditModal(props) {
-  const { flow, version, flowDetail, visible, onClose, onOk, form, sheetRef, loading } = props;
+  const { flow, version, flowDetail, visible, onClose, onOk, form, sheetRef, loading, versionList } = props;
 
   const handleOk = () => {
     form.validateFields((err, fieldsValue) => {
@@ -75,7 +75,7 @@ function AuditModal(props) {
           str += `单元格${col}${item.r}:${item.value}\n`;
         });
         form.setFieldsValue({ audit_comment: str });
-      } catch (error) {}
+      } catch (error) { }
     }
   }, [visible]);
 

+ 113 - 53
src/pages/Detail/CommitAuditModal.js

@@ -40,6 +40,8 @@ import ApprovalProcess from './ApprovalProcess';
 import { uuidv4 } from '@antv/xflow';
 import AliyunOSSUpload from '@/components/OssUpload/AliyunOssUploader';
 import AttachmentTable from '@/components/AttachmentTable';
+import { getToken } from '@/utils/utils';
+import LuckyExcel from 'luckyexcel';
 
 const { TextArea } = Input;
 const { Option } = Select;
@@ -52,7 +54,7 @@ function CommitAuditModal(props) {
     dispatch,
     visible,
     onClose,
-    loading,
+    // loading,
     version,
     versionList,
     flowDetail,
@@ -75,6 +77,7 @@ function CommitAuditModal(props) {
   const [curNodeIdx, setCurNodeIdx] = useState(-1);
 
   const [dataSource, setDataSource] = useState([]);
+  const [loading, setLoading] = useState(false);
   const uploadList = useRef([]);
 
   useEffect(() => {
@@ -85,7 +88,8 @@ function CommitAuditModal(props) {
     const currentId = flowDetail.nodes.find?.(item => item.Id == Id)?.node_id;
     const data = treeData(currentId);
     console.log('===============审批节点======', data);
-    if (data.length <= 0) {
+    const nextNodes = getNextNodes(currentId, 'custom-rect');
+    if (data.length <= 0 || nextNodes.length > 0) {
       setAuditId(currentId);
     } else {
       let defaultValues = {};
@@ -210,6 +214,10 @@ function CommitAuditModal(props) {
     //     return edge.source.cell == currentId && line && line[0] == '0';
     //   })
     //   .map(item => item.target.cell);
+    console.log(
+      '---------',
+      edges.filter(edge => edge.source.cell == currentId)
+    );
     let targetIds = edges
       .filter(edge => edge.source.cell == currentId)
       .map(item => item.target.cell);
@@ -484,63 +492,74 @@ function CommitAuditModal(props) {
     }
 
     const flowPath = result.map(item => getFlowPath(item));
-    const formList = await getFromData(result);
-    let params = {
-      desc: fieldsValue.desc,
-      // 审核流程id
-      // flow_id: approvalNode?.flow_id || 0,
-      // node_level_id: approvalNode?.flow_id ? 1 : 0,
-
-      id: version.id,
-      project_id: version.project_id,
-      cur_template_node_id: version.template_node_id * 1, // 当前节点
-      next_template_node_id: serviceNode.Id * 1, // 审核完成后的业务节点
-      // template_node_id: result[0][0], // 将要流转的节点审批节点
-      // flow_path:flow_path, //审批节点数组
-      // 模板id.一致就行
-      template_id: version.template_id,
-      cur_template_id: version.template_id,
-      next_template_id: version.template_id,
-    };
-    if (result.length <= 0) {
-      //直接走业务节点
-    } else if (result.length <= 1 && result[0]?.length <= 1) {
-      //单个审批节点
-      let approvalNode = flowDetail.nodes.find?.(item => item.Id == result[0][0]);
-      params.flow_id = approvalNode?.flow_id || 0;
-      params.node_level_id = approvalNode?.flow_id ? 1 : 0;
-      params.template_node_id = result[0][0]; // 将要流转的节点审批节点
-      params.form_list = formList; //创建钉钉表单所需数据
-      if (approvalNode?.Id) {
-        if (!approvalNode?.flow_id) {
-          hasFlowId = false;
+    setLoading(true);
+    try {
+      const formList = await getFromData(result);
+      let params = {
+        desc: fieldsValue.desc,
+        // 审核流程id
+        // flow_id: approvalNode?.flow_id || 0,
+        // node_level_id: approvalNode?.flow_id ? 1 : 0,
+
+        id: version.id,
+        project_id: version.project_id,
+        cur_template_node_id: version.template_node_id * 1, // 当前节点
+        next_template_node_id: serviceNode.Id * 1, // 审核完成后的业务节点
+        // template_node_id: result[0][0], // 将要流转的节点审批节点
+        // flow_path:flow_path, //审批节点数组
+        // 模板id.一致就行
+        template_id: version.template_id,
+        cur_template_id: version.template_id,
+        next_template_id: version.template_id,
+      };
+      if (serviceNode.node_type_psr == 3 || serviceNode.node_type_psr == 4) {
+        params.data = await uploadExcelByUrl(serviceNode.node_type_psr, version.id);
+      }
+      // params.data = await uploadExcelByUrl(3, version.id);
+      console.log(params);
+
+      if (result.length <= 0) {
+        //直接走业务节点
+      } else if (result.length <= 1 && result[0]?.length <= 1) {
+        //单个审批节点
+        let approvalNode = flowDetail.nodes.find?.(item => item.Id == result[0][0]);
+        params.flow_id = approvalNode?.flow_id || 0;
+        params.node_level_id = approvalNode?.flow_id ? 1 : 0;
+        params.template_node_id = result[0][0]; // 将要流转的节点审批节点
+        params.form_list = formList; //创建钉钉表单所需数据
+        if (approvalNode?.Id) {
+          if (!approvalNode?.flow_id) {
+            hasFlowId = false;
+          }
         }
+      } else {
+        //多节点审批
+        params.template_node_id = result[0][0]; // 将要流转的节点审批节点
+        params.flow_path = flowPath;
+        params.form_list = formList; //创建钉钉表单所需数据
       }
-    } else {
-      //多节点审批
-      params.template_node_id = result[0][0]; // 将要流转的节点审批节点
-      params.flow_path = flowPath;
-      params.form_list = formList; //创建钉钉表单所需数据
-    }
-    if (!hasFlowId) {
-      message.error('当前存在审批节点未绑定审批流程!请联系管理员。');
-      return;
+      if (!hasFlowId) {
+        message.error('当前存在审批节点未绑定审批流程!请联系管理员。');
+        return;
+      }
+      await querySaveBomForm({
+        project_id: version.project_id,
+        node_id: version.template_node_id,
+        json: JSON.stringify({ approvalProcess }),
+      });
+      params.audit_series = uuidv4();
+      params.files = uploadList.current.join(',');
+      onSubmitNextNode(params);
+    } catch (error) {
+      console.error(error);
     }
-    await querySaveBomForm({
-      project_id: version.project_id,
-      node_id: version.template_node_id,
-      json: JSON.stringify({ approvalProcess }),
-    });
-    params.audit_series = uuidv4();
-    params.files = uploadList.current.join(',');
-    console.log(params);
-    onSubmitNextNode(params);
   };
   const onSubmitNextNode = values => {
     dispatch({
       type: 'detail/submitNextNode',
       payload: values,
       callback: newVersion => {
+        setLoading(false);
         onClose();
         // 更新flow流程图
         dispatch({
@@ -609,7 +628,7 @@ function CommitAuditModal(props) {
 
   return (
     <Modal
-      confirmLoading={loading.global}
+      confirmLoading={loading}
       destroyOnClose
       title="提交流转目标"
       width={1000}
@@ -680,12 +699,53 @@ function getDataValue(item) {
   }
   return arr;
 }
+const uploadExcelByUrl = (nodeType, versionId) => {
+  const TEMPLATE_URL =
+    'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/doc/contract/2023-06-29/ed0d5dcd-6ce0-40df-9d17-a1f69245dbb9.xlsx';
+  const TEMPLATE_URL2 =
+    'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/doc/contract/2023-06-29/431733cd-0abc-4a68-a439-d24c466e9845.xlsx';
+
+  return new Promise((reslove, reject) => {
+    LuckyExcel.transformExcelToLuckyByUrl(
+      nodeType == 3 ? TEMPLATE_URL : TEMPLATE_URL2,
+      '模板.xlsx',
+      async (exportJson, luckysheetfile) => {
+        let [record] = await getExcel(versionId);
+
+        let len = exportJson.sheets.length;
+        const excelData = exportJson.sheets?.map(item => {
+          return { ...item, order: Number(item.order) };
+        });
+        delete record.id;
+        record.order = len;
+        record.index = String(len);
+        record.status = '0';
+        record.name = '投标成本';
+        var res = [...excelData, record];
+        console.log(res);
+        reslove(JSON.stringify(res));
+      }
+    );
+  });
+};
+
+async function getExcel(gridKey) {
+  var formData = new FormData();
+  formData.append('gridKey', gridKey);
+  let res = await fetch(
+    `/api/v1/purchase/record/sheet?gridKey=${gridKey}&JWT-TOKEN=${getToken()}`,
+    {
+      method: 'POST',
+      body: formData,
+    }
+  ).then(response => response.text());
+  return JSON.parse(JSON.parse(res));
+}
 
-export default connect(({ xflow, detail, user, loading }) => ({
+export default connect(({ xflow, detail, user }) => ({
   flowDetail: xflow.flowDetail,
   versionList: detail.versionList,
   currentUser: user.currentUser,
   userList: user.list,
   OSSData: detail.OSSData,
-  loading,
 }))(CommitAuditModal);

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

@@ -686,6 +686,7 @@ function Detail(props) {
         flow={flow}
         flowDetail={flowDetail}
         version={version}
+        versionList={versionList}
       />
       <VersionModal
         typeOptions={typeOptions}

+ 378 - 240
src/pages/Flow/FlowDetail.json

@@ -18,38 +18,10 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": -580,
+      "x": -789,
       "y": -150,
-      "zIndex": 0,
-      "muti_version": 1,
       "flow_id": 0,
-      "node_type": 0,
-      "count": 0,
-      "role_list": "139"
-    },
-    {
-      "id": "975bf288",
-      "renderKey": "custom-circle",
-      "name": "custom-circle",
-      "label": "方案总审",
-      "width": 90,
-      "height": 90,
-      "ports": {
-        "items": [
-          { "group": "top", "id": "a61170c3" },
-          { "group": "right", "id": "821f59c0" },
-          { "group": "bottom", "id": "17360bc4" },
-          { "group": "left", "id": "15d1b217" }
-        ]
-      },
-      "isCustom": true,
-      "parentKey": "1",
-      "x": -290,
-      "y": -170,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 5,
-      "node_type": 1,
+      "node_type_psr": 0,
       "count": 0,
       "role_list": ""
     },
@@ -70,14 +42,12 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": -138,
+      "x": -78,
       "y": -150,
-      "zIndex": 0,
-      "muti_version": 1,
       "flow_id": 0,
-      "node_type": 0,
+      "node_type_psr": 0,
       "count": 0,
-      "role_list": "139"
+      "role_list": ""
     },
     {
       "id": "5359e23c",
@@ -96,12 +66,10 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": -335,
+      "x": -578,
       "y": 6,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 9,
-      "node_type": 1,
+      "flow_id": 1,
+      "node_type_psr": 1,
       "count": 0,
       "role_list": ""
     },
@@ -112,7 +80,6 @@
       "label": "采购执行",
       "width": 120,
       "height": 50,
-      "is_seal": 1,
       "ports": {
         "items": [
           { "group": "top", "id": "f71ce55b" },
@@ -123,12 +90,10 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": -138,
+      "x": -264,
       "y": 26,
-      "zIndex": 0,
-      "muti_version": 1,
       "flow_id": 0,
-      "node_type": 0,
+      "node_type_psr": 0,
       "count": 0,
       "role_list": ""
     },
@@ -149,14 +114,12 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": -580,
+      "x": -789,
       "y": 26,
-      "zIndex": 0,
-      "muti_version": 1,
       "flow_id": 0,
-      "node_type": 0,
+      "node_type_psr": 0,
       "count": 0,
-      "role_list": "147"
+      "role_list": ""
     },
     {
       "id": "8c1f18d0",
@@ -175,20 +138,18 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": -305,
-      "y": -304,
-      "zIndex": 0,
-      "muti_version": 1,
+      "x": -552,
+      "y": -345,
       "flow_id": 0,
-      "node_type": 0,
+      "node_type_psr": 0,
       "count": 0,
-      "role_list": "148"
+      "role_list": ""
     },
     {
       "id": "1aed14d1",
       "renderKey": "custom-rect",
       "name": "custom-rect",
-      "label": "初版PSR",
+      "label": "投标毛利测算",
       "width": 120,
       "height": 50,
       "ports": {
@@ -201,38 +162,10 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": -138,
-      "y": -304,
-      "zIndex": 0,
-      "muti_version": 1,
+      "x": -78,
+      "y": -254,
       "flow_id": 0,
-      "node_type": 0,
-      "count": 0,
-      "role_list": ""
-    },
-    {
-      "id": "4651130e",
-      "renderKey": "custom-circle",
-      "name": "custom-circle",
-      "label": "PSR审批",
-      "width": 90,
-      "height": 90,
-      "ports": {
-        "items": [
-          { "group": "top", "id": "cf1c4df0" },
-          { "group": "right", "id": "1eb352b0" },
-          { "group": "bottom", "id": "83b59198" },
-          { "group": "left", "id": "94f485b5" }
-        ]
-      },
-      "isCustom": true,
-      "parentKey": "1",
-      "x": 356,
-      "y": -324,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 2,
-      "node_type": 1,
+      "node_type_psr": 4,
       "count": 0,
       "role_list": ""
     },
@@ -253,12 +186,10 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 446,
+      "x": 616,
       "y": -150,
-      "zIndex": 0,
-      "muti_version": 0,
       "flow_id": 0,
-      "node_type": 0,
+      "node_type_psr": 0,
       "count": 0,
       "role_list": ""
     },
@@ -279,12 +210,10 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 621,
-      "y": -150,
-      "zIndex": 0,
-      "muti_version": 1,
+      "x": 616,
+      "y": -556,
       "flow_id": 0,
-      "node_type": 0,
+      "node_type_psr": 0,
       "count": 0,
       "role_list": ""
     },
@@ -305,12 +234,10 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 446,
+      "x": 616,
       "y": 26,
-      "zIndex": 0,
-      "muti_version": 1,
       "flow_id": 0,
-      "node_type": 0,
+      "node_type_psr": 0,
       "count": 0,
       "role_list": ""
     },
@@ -318,7 +245,7 @@
       "id": "3fb8d302",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "事业部",
+      "label": "方案总审",
       "width": 90,
       "height": 90,
       "ports": {
@@ -331,12 +258,10 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 308,
+      "x": 325,
       "y": -170,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 7,
-      "node_type": 1,
+      "flow_id": 1,
+      "node_type_psr": 1,
       "count": 0,
       "role_list": ""
     },
@@ -357,43 +282,87 @@
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 173,
+      "x": 111,
       "y": 6,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 8,
-      "node_type": 1,
+      "flow_id": 1,
+      "node_type_psr": 1,
       "count": 0,
       "role_list": ""
     },
     {
-      "id": "2427bf29",
+      "id": "node-1c030340-1f9e-43c1-8499-c588c9b91d9d",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "工艺分部经理",
+      "label": "投标毛利测算审批",
       "width": 90,
       "height": 90,
       "ports": {
         "items": [
-          { "group": "top", "id": "e5a149c4" },
-          { "group": "right", "id": "e1a1ecea" },
-          { "group": "bottom", "id": "6e131e6a" },
-          { "group": "left", "id": "6bbf9ae4" }
+          { "group": "top", "id": "b13bb61c-c1b7-48c1-adc5-7c8faaa148e4" },
+          { "group": "right", "id": "7340a213-4694-46a8-abdb-5dd44d4abbaf" },
+          { "group": "bottom", "id": "197efb3d-74bf-48f9-9881-2611b35ab9ab" },
+          { "group": "left", "id": "0ddbee0a-0814-4a87-a976-601cb6a3f7c4" }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "1",
+      "x": -63,
+      "y": -435,
+      "flow_id": 10,
+      "node_type_psr": 1,
+      "count": 0,
+      "role_list": ""
+    },
+    {
+      "id": "node-6a336a93-76a6-42e6-87dc-68e3da1c8c41",
+      "renderKey": "custom-rect",
+      "name": "custom-rect",
+      "label": "投标版PSR",
+      "width": 120,
+      "height": 50,
+      "ports": {
+        "items": [
+          { "group": "top", "id": "0d7185aa-498d-4d8f-8edf-9bdcbec011ad" },
+          { "group": "right", "id": "15c55ebe-d085-4e00-8f2e-c2049ca694cf" },
+          { "group": "bottom", "id": "ca8cab66-e7e3-4381-872f-6dd2b5ae8ea8" },
+          { "group": "left", "id": "978347ae-fed3-4765-bc75-ffd0e22399f4" }
         ]
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": -425,
-      "y": -224,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 3,
-      "node_type": 1,
+      "x": -78,
+      "y": -556,
+      "flow_id": 0,
+      "node_type_psr": 1,
       "count": 0,
       "role_list": ""
     },
     {
-      "id": "be25fe75",
+      "id": "node-f2a8ea49-52c2-45af-aaf4-80344b36e794",
+      "renderKey": "custom-circle",
+      "name": "custom-circle",
+      "label": "工艺分部经理",
+      "width": 90,
+      "height": 90,
+      "ports": {
+        "items": [
+          { "group": "top", "id": "fbfc57f0-2975-419c-a3c1-3a50550035c7" },
+          { "group": "right", "id": "148b50b4-6252-4cb6-b515-27ed224cc360" },
+          { "group": "bottom", "id": "9bc730f5-97ba-4f23-abe7-1d0105d04d89" },
+          { "group": "left", "id": "7eb6eb33-6474-4053-909a-72dabc531cbd" }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "custom",
+      "x": -537,
+      "y": -240,
+      "zIndex": 10,
+      "flow_id": 0,
+      "node_type_psr": 1,
+      "count": 0
+    },
+    {
+      "id": "node-1d99da2f-3481-476e-92a2-da4a16c6b6e7",
       "renderKey": "custom-circle",
       "name": "custom-circle",
       "label": "电气分部经理",
@@ -401,77 +370,71 @@
       "height": 90,
       "ports": {
         "items": [
-          { "group": "top", "id": "13e4b9ea" },
-          { "group": "right", "id": "ce651308" },
-          { "group": "bottom", "id": "9a0b8942" },
-          { "group": "left", "id": "a705e7ed" }
+          { "group": "top", "id": "bae85e23-7b27-4137-8f08-1b5e68eaf20e" },
+          { "group": "right", "id": "4648f47d-12a5-46a8-a4b1-9f2df6cb56de" },
+          { "group": "bottom", "id": "683748bf-fba2-4849-85eb-42bcb91ce50b" },
+          { "group": "left", "id": "ea341271-cc2f-4c6d-8dfe-68dbb96b54ed" }
         ]
       },
       "isCustom": true,
-      "parentKey": "1",
-      "x": -425,
-      "y": -115,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 4,
-      "node_type": 1,
-      "count": 0,
-      "role_list": ""
+      "parentKey": "custom",
+      "x": -537,
+      "y": -117,
+      "zIndex": 10,
+      "flow_id": 0,
+      "node_type_psr": 1,
+      "count": 0
     },
     {
-      "id": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db",
+      "id": "b5a78b40",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "工艺分部经理",
+      "label": "电气分部经理",
       "width": 90,
       "height": 90,
       "ports": {
         "items": [
-          { "group": "top", "id": "c6ec15a8-2db4-4ca8-ad81-fd1783b4ca0f" },
-          { "group": "right", "id": "e134d65d-a197-4116-ad74-f47dbbb727d1" },
-          { "group": "bottom", "id": "2c633cdf-7bb5-49ea-a4dc-e3d8c837e513" },
-          { "group": "left", "id": "6d880b9d-7d7e-4357-94dd-caf7d73b5f80" }
+          { "group": "top", "id": "8ab6c3f6" },
+          { "group": "right", "id": "205f1437" },
+          { "group": "bottom", "id": "761ad2b5" },
+          { "group": "left", "id": "22d16375" }
         ]
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 27,
-      "y": -224,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 3,
-      "node_type": 1,
+      "x": 168,
+      "y": -117,
+      "flow_id": 1,
+      "node_type_psr": 1,
       "count": 0,
       "role_list": ""
     },
     {
-      "id": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8",
+      "id": "5f071153",
       "renderKey": "custom-circle",
       "name": "custom-circle",
-      "label": "电气分部经理",
+      "label": "工艺分部经理",
       "width": 90,
       "height": 90,
       "ports": {
         "items": [
-          { "group": "top", "id": "7b9fcd52-4fca-47c7-aaae-e3b117c0c234" },
-          { "group": "right", "id": "6316d87e-2eb3-4ff6-bd8e-0cfd11bff4ce" },
-          { "group": "bottom", "id": "38113945-040f-4374-aca8-38e2e81d71a8" },
-          { "group": "left", "id": "8637b869-7924-416a-b938-30a7ca932901" }
+          { "group": "top", "id": "8ab6c3f6" },
+          { "group": "right", "id": "205f1437" },
+          { "group": "bottom", "id": "761ad2b5" },
+          { "group": "left", "id": "22d16375" }
         ]
       },
       "isCustom": true,
       "parentKey": "1",
-      "x": 27,
-      "y": -115,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 4,
-      "node_type": 1,
+      "x": 168,
+      "y": -240,
+      "flow_id": 1,
+      "node_type_psr": 1,
       "count": 0,
       "role_list": ""
     },
     {
-      "id": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
+      "id": "node-9e654259-45f9-4e28-b39a-cf3934fa4f5b",
       "renderKey": "custom-circle",
       "name": "custom-circle",
       "label": "方案总审",
@@ -479,60 +442,148 @@
       "height": 90,
       "ports": {
         "items": [
-          { "group": "top", "id": "d9b27b16-08ab-4e0d-84dc-fdec64c0a129" },
-          { "group": "right", "id": "1ab6b2a4-dccd-41e9-83c6-d1642c9ad844" },
-          { "group": "bottom", "id": "b763caac-37c1-4659-ae0e-c7b7c760fec1" },
-          { "group": "left", "id": "2408c946-a670-48b5-a676-d882946b8e36" }
+          { "group": "top", "id": "e5973271-7719-4f5f-87c2-8f8c195e3de4" },
+          { "group": "right", "id": "bb020273-11e3-435b-bb22-86eb68aaffba" },
+          { "group": "bottom", "id": "800f850f-7e47-4deb-8f8f-5d869371507a" },
+          { "group": "left", "id": "8ac4bd2d-e4af-442d-b175-bd0711567bfa" }
         ]
       },
       "isCustom": true,
-      "parentKey": "1",
-      "x": 173,
+      "parentKey": "custom",
+      "x": -264,
       "y": -170,
-      "zIndex": 0,
-      "muti_version": 1,
-      "flow_id": 5,
-      "node_type": 1,
-      "count": 0,
-      "role_list": ""
-    }
-  ],
-  "edges": [
-    {
-      "id": "975bf288:a61170c3-8c1f18d0:89c0bc16",
-      "source": { "cell": "975bf288", "port": "a61170c3" },
-      "target": { "cell": "8c1f18d0", "port": "89c0bc16" },
-      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+      "zIndex": 10,
+      "flow_id": 0,
+      "node_type_psr": 1,
+      "count": 0
     },
     {
-      "id": "8c1f18d0:a3adcac9-41561012:293a90b5",
-      "source": { "cell": "8c1f18d0", "port": "a3adcac9" },
-      "target": { "cell": "41561012", "port": "293a90b5" },
-      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+      "id": "node-4ac6948b-b549-4dc7-ab45-987fcbc35844",
+      "renderKey": "custom-circle",
+      "name": "custom-circle",
+      "label": "事业部",
+      "width": 90,
+      "height": 90,
+      "ports": {
+        "items": [
+          { "group": "top", "id": "3fc3d78a-9a63-4a82-b3c7-ddc0dcf0f767" },
+          { "group": "right", "id": "fc6e076d-e6d4-470f-adc1-30162839efe2" },
+          { "group": "bottom", "id": "99adc585-48cf-459e-ba8a-053790ccac86" },
+          { "group": "left", "id": "75c90ab9-9f7c-419d-9608-46607db1a265" }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "custom",
+      "x": 471,
+      "y": -170,
+      "zIndex": 10,
+      "flow_id": 0,
+      "node_type_psr": 1,
+      "count": 0
     },
     {
-      "id": "5764f3ce:4b4d9fa6-1aed14d1:d348b56a",
-      "source": { "cell": "5764f3ce", "port": "4b4d9fa6" },
-      "target": { "cell": "1aed14d1", "port": "d348b56a" },
-      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
+      "id": "0322b7c6",
+      "renderKey": "custom-rect",
+      "name": "custom-rect",
+      "label": "合同毛利测算",
+      "width": 120,
+      "height": 50,
+      "ports": {
+        "items": [
+          { "group": "top", "id": "7f8dc65b" },
+          { "group": "right", "id": "9a699e3f" },
+          { "group": "bottom", "id": "d348b56a" },
+          { "group": "left", "id": "47317157" }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "1",
+      "x": 616,
+      "y": -277,
+      "flow_id": 0,
+      "node_type_psr": 3, 
+      "count": 0,
+      "role_list": ""
     },
     {
-      "id": "1aed14d1:9a699e3f-4651130e:94f485b5",
-      "source": { "cell": "1aed14d1", "port": "9a699e3f" },
-      "target": { "cell": "4651130e", "port": "94f485b5" },
-      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+      "id": "node-19ab31fd-8c23-41a3-bdcb-186751815e1d",
+      "renderKey": "custom-circle",
+      "name": "custom-circle",
+      "label": "签字版PSR审批",
+      "width": 90,
+      "height": 90,
+      "ports": {
+        "items": [
+          { "group": "top", "id": "8846e2ad-8d81-459b-8fcd-001b31073cac" },
+          { "group": "right", "id": "fa1aa4ab-5096-49b8-9ec2-c70f824dd746" },
+          { "group": "bottom", "id": "10e09e8a-b49b-476c-986c-33841b533bc2" },
+          { "group": "left", "id": "d24cfc22-605a-451e-b197-8597cb5b5ed7" }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "custom",
+      "x": 631,
+      "y": -435,
+      "zIndex": 10,
+      "flow_id": 0,
+      "node_type_psr": 2,
+      "count": 0
     },
     {
-      "id": "3fb8d302:205f1437-a48131e0:bac7962b",
-      "source": { "cell": "3fb8d302", "port": "205f1437" },
-      "target": { "cell": "a48131e0", "port": "bac7962b" },
-      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+      "id": "node-d825c5a0-6077-4d64-a63c-5b3cde59211b",
+      "renderKey": "custom-rect",
+      "name": "custom-rect",
+      "label": "现金流",
+      "width": 120,
+      "height": 50,
+      "ports": {
+        "items": [
+          { "group": "top", "id": "3816dfce-c9a4-4655-9ecb-ecdc6f05fe53" },
+          { "group": "right", "id": "eab92693-4051-449f-b76c-b90587d47f70" },
+          { "group": "bottom", "id": "bb9edb5b-212e-491f-ac79-2bd9096739aa" },
+          { "group": "left", "id": "f65c9954-8273-4f77-9cae-a37cbafe147e" }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "custom",
+      "x": -789,
+      "y": 129,
+      "zIndex": 10,
+      "flow_id": 0,
+      "node_type_psr": 0,
+      "count": 0
     },
     {
-      "id": "a48131e0:4dee75d9-b57b57c8:73307680",
-      "source": { "cell": "a48131e0", "port": "4dee75d9" },
-      "target": { "cell": "b57b57c8", "port": "73307680" },
-      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":\"5 5\",\"strokeWidth\":1}}"
+      "id": "node-050b15a7-5bc8-4091-bcc3-d48013eacadd",
+      "renderKey": "custom-rect",
+      "name": "custom-rect",
+      "label": "过程/终版PSR",
+      "width": 120,
+      "height": 50,
+      "ports": {
+        "items": [
+          { "group": "top", "id": "c52f65b7-3fb9-4e68-b039-05ab37414983" },
+          { "group": "right", "id": "fbba2fdc-f26d-488f-aaaf-f7ead51460a9" },
+          { "group": "bottom", "id": "37d3ccbf-3b3d-4e65-bd5a-cdafc81685b8" },
+          { "group": "left", "id": "8751b4b6-25ff-4843-9db0-a6ae4b7258e4" }
+        ]
+      },
+      "isCustom": true,
+      "parentKey": "custom",
+      "x": -789,
+      "y": 232,
+      "zIndex": 10,
+      "flow_id": 0,
+      "node_type_psr": 0,
+      "count": 0
+    }
+  ],
+  "edges": [
+    {
+      "id": "8c1f18d0:a3adcac9-41561012:293a90b5",
+      "source": { "cell": "8c1f18d0", "port": "a3adcac9" },
+      "target": { "cell": "41561012", "port": "293a90b5" },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
       "id": "a48131e0:0f72f2ba-3631eae9:2aae2a71",
@@ -565,90 +616,177 @@
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "b57b57c8:04c81e99-4651130e:1eb352b0",
-      "source": { "cell": "b57b57c8", "port": "04c81e99" },
-      "target": { "cell": "4651130e", "port": "1eb352b0" },
+      "id": "5764f3ce:4b4d9fa6-1aed14d1:d348b56a",
+      "source": { "cell": "5764f3ce", "port": "4b4d9fa6" },
+      "target": { "cell": "1aed14d1", "port": "d348b56a" },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+    },
+    {
+      "id": "1aed14d1:7f8dc65b-node-1c030340-1f9e-43c1-8499-c588c9b91d9d:197efb3d-74bf-48f9-9881-2611b35ab9ab",
+      "source": { "cell": "1aed14d1", "port": "7f8dc65b" },
+      "target": {
+        "cell": "node-1c030340-1f9e-43c1-8499-c588c9b91d9d",
+        "port": "197efb3d-74bf-48f9-9881-2611b35ab9ab"
+      },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "41561012:92334433-2427bf29:6bbf9ae4",
+      "id": "41561012:92334433-node-f2a8ea49-52c2-45af-aaf4-80344b36e794:7eb6eb33-6474-4053-909a-72dabc531cbd",
       "source": { "cell": "41561012", "port": "92334433" },
-      "target": { "cell": "2427bf29", "port": "6bbf9ae4" },
+      "target": {
+        "cell": "node-f2a8ea49-52c2-45af-aaf4-80344b36e794",
+        "port": "7eb6eb33-6474-4053-909a-72dabc531cbd"
+      },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "41561012:92334433-be25fe75:a705e7ed",
+      "id": "41561012:92334433-node-1d99da2f-3481-476e-92a2-da4a16c6b6e7:ea341271-cc2f-4c6d-8dfe-68dbb96b54ed",
       "source": { "cell": "41561012", "port": "92334433" },
-      "target": { "cell": "be25fe75", "port": "a705e7ed" },
+      "target": {
+        "cell": "node-1d99da2f-3481-476e-92a2-da4a16c6b6e7",
+        "port": "ea341271-cc2f-4c6d-8dfe-68dbb96b54ed"
+      },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "2427bf29:e1a1ecea-975bf288:15d1b217",
-      "source": { "cell": "2427bf29", "port": "e1a1ecea" },
-      "target": { "cell": "975bf288", "port": "15d1b217" },
+      "id": "5764f3ce:ce88d7e2-5f071153:22d16375",
+      "source": { "cell": "5764f3ce", "port": "ce88d7e2" },
+      "target": { "cell": "5f071153", "port": "22d16375" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "be25fe75:ce651308-975bf288:15d1b217",
-      "source": { "cell": "be25fe75", "port": "ce651308" },
-      "target": { "cell": "975bf288", "port": "15d1b217" },
+      "id": "5764f3ce:ce88d7e2-b5a78b40:22d16375",
+      "source": { "cell": "5764f3ce", "port": "ce88d7e2" },
+      "target": { "cell": "b5a78b40", "port": "22d16375" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "975bf288:821f59c0-5764f3ce:c29d7b43",
-      "source": { "cell": "975bf288", "port": "821f59c0" },
+      "id": "5f071153:205f1437-3fb8d302:22d16375",
+      "source": { "cell": "5f071153", "port": "205f1437" },
+      "target": { "cell": "3fb8d302", "port": "22d16375" },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+    },
+    {
+      "id": "b5a78b40:205f1437-3fb8d302:22d16375",
+      "source": { "cell": "b5a78b40", "port": "205f1437" },
+      "target": { "cell": "3fb8d302", "port": "22d16375" },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+    },
+    {
+      "id": "node-f2a8ea49-52c2-45af-aaf4-80344b36e794:148b50b4-6252-4cb6-b515-27ed224cc360-node-9e654259-45f9-4e28-b39a-cf3934fa4f5b:8ac4bd2d-e4af-442d-b175-bd0711567bfa",
+      "source": {
+        "cell": "node-f2a8ea49-52c2-45af-aaf4-80344b36e794",
+        "port": "148b50b4-6252-4cb6-b515-27ed224cc360"
+      },
+      "target": {
+        "cell": "node-9e654259-45f9-4e28-b39a-cf3934fa4f5b",
+        "port": "8ac4bd2d-e4af-442d-b175-bd0711567bfa"
+      },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+    },
+    {
+      "id": "node-1d99da2f-3481-476e-92a2-da4a16c6b6e7:4648f47d-12a5-46a8-a4b1-9f2df6cb56de-node-9e654259-45f9-4e28-b39a-cf3934fa4f5b:8ac4bd2d-e4af-442d-b175-bd0711567bfa",
+      "source": {
+        "cell": "node-1d99da2f-3481-476e-92a2-da4a16c6b6e7",
+        "port": "4648f47d-12a5-46a8-a4b1-9f2df6cb56de"
+      },
+      "target": {
+        "cell": "node-9e654259-45f9-4e28-b39a-cf3934fa4f5b",
+        "port": "8ac4bd2d-e4af-442d-b175-bd0711567bfa"
+      },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+    },
+    {
+      "id": "node-9e654259-45f9-4e28-b39a-cf3934fa4f5b:bb020273-11e3-435b-bb22-86eb68aaffba-5764f3ce:c29d7b43",
+      "source": {
+        "cell": "node-9e654259-45f9-4e28-b39a-cf3934fa4f5b",
+        "port": "bb020273-11e3-435b-bb22-86eb68aaffba"
+      },
       "target": { "cell": "5764f3ce", "port": "c29d7b43" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "5764f3ce:ce88d7e2-node-186a9d31-0bd3-4b36-b61f-6b5380c824db:6d880b9d-7d7e-4357-94dd-caf7d73b5f80",
-      "source": { "cell": "5764f3ce", "port": "ce88d7e2" },
+      "id": "node-1c030340-1f9e-43c1-8499-c588c9b91d9d:b13bb61c-c1b7-48c1-adc5-7c8faaa148e4-node-6a336a93-76a6-42e6-87dc-68e3da1c8c41:ca8cab66-e7e3-4381-872f-6dd2b5ae8ea8",
+      "source": {
+        "cell": "node-1c030340-1f9e-43c1-8499-c588c9b91d9d",
+        "port": "b13bb61c-c1b7-48c1-adc5-7c8faaa148e4"
+      },
       "target": {
-        "cell": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db",
-        "port": "6d880b9d-7d7e-4357-94dd-caf7d73b5f80"
+        "cell": "node-6a336a93-76a6-42e6-87dc-68e3da1c8c41",
+        "port": "ca8cab66-e7e3-4381-872f-6dd2b5ae8ea8"
       },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "5764f3ce:ce88d7e2-node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8:8637b869-7924-416a-b938-30a7ca932901",
-      "source": { "cell": "5764f3ce", "port": "ce88d7e2" },
+      "id": "node-9e654259-45f9-4e28-b39a-cf3934fa4f5b:e5973271-7719-4f5f-87c2-8f8c195e3de4-8c1f18d0:b3dfbc16",
+      "source": {
+        "cell": "node-9e654259-45f9-4e28-b39a-cf3934fa4f5b",
+        "port": "e5973271-7719-4f5f-87c2-8f8c195e3de4"
+      },
+      "target": { "cell": "8c1f18d0", "port": "b3dfbc16" },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+    },
+    {
+      "id": "3fb8d302:205f1437-node-4ac6948b-b549-4dc7-ab45-987fcbc35844:75c90ab9-9f7c-419d-9608-46607db1a265",
+      "source": { "cell": "3fb8d302", "port": "205f1437" },
       "target": {
-        "cell": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8",
-        "port": "8637b869-7924-416a-b938-30a7ca932901"
+        "cell": "node-4ac6948b-b549-4dc7-ab45-987fcbc35844",
+        "port": "75c90ab9-9f7c-419d-9608-46607db1a265"
       },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db:e134d65d-a197-4116-ad74-f47dbbb727d1-node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862:2408c946-a670-48b5-a676-d882946b8e36",
+      "id": "node-4ac6948b-b549-4dc7-ab45-987fcbc35844:fc6e076d-e6d4-470f-adc1-30162839efe2-a48131e0:bac7962b",
       "source": {
-        "cell": "node-186a9d31-0bd3-4b36-b61f-6b5380c824db",
-        "port": "e134d65d-a197-4116-ad74-f47dbbb727d1"
+        "cell": "node-4ac6948b-b549-4dc7-ab45-987fcbc35844",
+        "port": "fc6e076d-e6d4-470f-adc1-30162839efe2"
       },
+      "target": { "cell": "a48131e0", "port": "bac7962b" },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+    },
+    {
+      "id": "a48131e0:3ca1320c-0322b7c6:d348b56a",
+      "source": { "cell": "a48131e0", "port": "3ca1320c" },
+      "target": { "cell": "0322b7c6", "port": "d348b56a" },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+    },
+    {
+      "id": "0322b7c6:7f8dc65b-node-19ab31fd-8c23-41a3-bdcb-186751815e1d:10e09e8a-b49b-476c-986c-33841b533bc2",
+      "source": { "cell": "0322b7c6", "port": "7f8dc65b" },
       "target": {
-        "cell": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
-        "port": "2408c946-a670-48b5-a676-d882946b8e36"
+        "cell": "node-19ab31fd-8c23-41a3-bdcb-186751815e1d",
+        "port": "10e09e8a-b49b-476c-986c-33841b533bc2"
       },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8:6316d87e-2eb3-4ff6-bd8e-0cfd11bff4ce-node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862:2408c946-a670-48b5-a676-d882946b8e36",
+      "id": "node-19ab31fd-8c23-41a3-bdcb-186751815e1d:8846e2ad-8d81-459b-8fcd-001b31073cac-b57b57c8:17ff5fe6",
       "source": {
-        "cell": "node-c5171e2d-1cd8-4019-83dc-9f2ed0cab6e8",
-        "port": "6316d87e-2eb3-4ff6-bd8e-0cfd11bff4ce"
+        "cell": "node-19ab31fd-8c23-41a3-bdcb-186751815e1d",
+        "port": "8846e2ad-8d81-459b-8fcd-001b31073cac"
       },
+      "target": { "cell": "b57b57c8", "port": "17ff5fe6" },
+      "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
+    },
+    {
+      "id": "5216c5dc:188c9b68-node-d825c5a0-6077-4d64-a63c-5b3cde59211b:3816dfce-c9a4-4655-9ecb-ecdc6f05fe53",
+      "source": { "cell": "5216c5dc", "port": "188c9b68" },
       "target": {
-        "cell": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
-        "port": "2408c946-a670-48b5-a676-d882946b8e36"
+        "cell": "node-d825c5a0-6077-4d64-a63c-5b3cde59211b",
+        "port": "3816dfce-c9a4-4655-9ecb-ecdc6f05fe53"
       },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {
-      "id": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862:1ab6b2a4-dccd-41e9-83c6-d1642c9ad844-3fb8d302:22d16375",
+      "id": "node-d825c5a0-6077-4d64-a63c-5b3cde59211b:bb9edb5b-212e-491f-ac79-2bd9096739aa-node-050b15a7-5bc8-4091-bcc3-d48013eacadd:c52f65b7-3fb9-4e68-b039-05ab37414983",
       "source": {
-        "cell": "node-2b3fc359-de49-4f9d-adb5-4eb70b6ba862",
-        "port": "1ab6b2a4-dccd-41e9-83c6-d1642c9ad844"
+        "cell": "node-d825c5a0-6077-4d64-a63c-5b3cde59211b",
+        "port": "bb9edb5b-212e-491f-ac79-2bd9096739aa"
+      },
+      "target": {
+        "cell": "node-050b15a7-5bc8-4091-bcc3-d48013eacadd",
+        "port": "c52f65b7-3fb9-4e68-b039-05ab37414983"
       },
-      "target": { "cell": "3fb8d302", "port": "22d16375" },
       "attr": "{\"line\":{\"stroke\":\"#A2B1C3\",\"targetMarker\":{\"name\":\"block\",\"width\":12,\"height\":8},\"strokeDasharray\":[0,0],\"strokeWidth\":1}}"
     },
     {

+ 1 - 1
src/pages/Flow/List.js

@@ -82,7 +82,7 @@ function List(props) {
       <Table
         rowKey="Id"
         loading={loading['flow/queryFlowList']}
-        dataSource={list}
+        dataSource={list.reverse()}
         columns={columns}
       />
 

+ 1 - 1
src/pages/List/ClassifyModal.js

@@ -6,7 +6,7 @@ const ClassifyModal = ({ data, visible, userList, onClose, handleChange, loading
   const { classify = [], project_id } = data;
   const list = useMemo(() => {
     return userList.map(item => {
-      return { label: item.CName, value: item.ID };
+      return { label: `${item.CName}(${item.UserName})`, value: item.ID };
     });
   }, [userList]);
 

+ 1 - 1
src/pages/Login/Login.js

@@ -129,7 +129,7 @@ class LoginPage extends Component {
     const { type, autoLogin, depList, depId, loginType } = this.state;
     console.log(referrer);
     return (
-      <DocumentTitle title={`登录-${loginType == 'bom' ? '采购清单' : '人日'}`}>
+      <DocumentTitle title={`登录-人日`}>
         <div className={styles.container}>
           <div className={styles.content}>
             <div className={styles.main}>

+ 85 - 0
src/pages/Psr/index.js

@@ -0,0 +1,85 @@
+import { queryRecordSheet } from '@/services/boom';
+import LuckySheet from '../Detail/LuckySheet';
+import react, { useRef } from 'react';
+import LuckyExcel from 'luckyexcel';
+import { Button, message } from 'antd';
+
+const TEMPLATE_URL =
+  'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/bom/635/%E5%90%88%E5%90%8C%E6%96%87%E4%BB%B6/%E6%8A%95%E6%A0%87%E6%A8%A1%E6%9D%BF.xlsx';
+const TEMPLATE_URL2 = 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/public/bom/psr.xlsx';
+
+function Index(props) {
+  const { versionId = 2418 } = props;
+
+  const sheetRef = useRef();
+  const luckysheetRef = useRef();
+
+  const uploadExcelByUrl = type => {
+    LuckyExcel.transformExcelToLuckyByUrl(
+      type == 1 ? TEMPLATE_URL : TEMPLATE_URL2,
+      '模板.xlsx',
+      async (exportJson, luckysheetfile) => {
+        let record = await getExcel(versionId);
+        console.log(record);
+
+        luckysheetRef.current.destroy();
+
+        luckysheetRef.current.create({
+          lang: 'zh',
+          showinfobar: false,
+          showstatisticBar: false,
+          data: [...exportJson.sheets, ...record],
+          hook: {
+            cellMousedown: (cell, position, sheet) => {
+              console.log(cell, position, sheet);
+            },
+            cellUpdated: () => {
+              luckysheetRef.current.refreshFormula();
+            },
+          },
+        });
+      }
+    );
+  };
+
+  const handleLoad = () => {
+    let contentWindow = sheetRef.current.contentWindow;
+    luckysheetRef.current = contentWindow.luckysheet;
+  };
+
+  return (
+    <div>
+      <Button type="primary" onClick={() => uploadExcelByUrl(1)}>
+        导入投标投标
+      </Button>
+      <Button type="primary" onClick={() => uploadExcelByUrl(2)}>
+        导入合同模板
+      </Button>
+
+      <iframe
+        style={{
+          width: '100%',
+          height: '80vh',
+        }}
+        ref={sheetRef}
+        onLoad={handleLoad}
+        src="/luckysheet.html"
+      ></iframe>
+    </div>
+  );
+}
+
+async function getExcel(gridKey) {
+  var formData = new FormData();
+  formData.append('gridKey', gridKey);
+  let res = await fetch(
+    `/api/v1/purchase/record/sheet?gridKey=${gridKey}&JWT-TOKEN=${getToken()}`,
+    {
+      method: 'POST',
+      body: formData,
+    }
+  ).then(response => response.text());
+  return JSON.parse(JSON.parse(res));
+}
+
+export default Index;

File diff suppressed because it is too large
+ 0 - 0
src/pages/Temp/excel_json.json


+ 109 - 0
src/pages/Temp/index.js

@@ -0,0 +1,109 @@
+import { queryRecordSheet } from '@/services/boom';
+import LuckySheet from '../Detail/LuckySheet';
+import react, { useRef } from 'react';
+import LuckyExcel from 'luckyexcel';
+import { Button, message } from 'antd';
+import { getToken } from '@/utils/utils';
+import moment from 'moment';
+
+const TEMPLATE_URL =
+  'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/bom/635/%E5%90%88%E5%90%8C%E6%96%87%E4%BB%B6/%E6%8A%95%E6%A0%87%E6%A8%A1%E6%9D%BF.xlsx';
+
+const TEMPLATE_URL2 = 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/public/bom/psr.xlsx';
+
+function Index(props) {
+  const { versionId = 2376 } = props;
+
+  const sheetRef = useRef();
+  const luckysheetRef = useRef();
+
+  const uploadExcelByUrl = type => {
+    LuckyExcel.transformExcelToLuckyByUrl(
+      type == 1 ? TEMPLATE_URL : TEMPLATE_URL2,
+      '模板.xlsx',
+      async (exportJson, luckysheetfile) => {
+        // if (type == 2) initData(exportJson.sheets);
+        let [record] = await getExcel(versionId);
+
+        let len = exportJson.sheets.length;
+        record.order = len - 1;
+        record.index = len;
+        record.status = '0';
+
+        const data = [...exportJson.sheets, record];
+        console.log(data);
+
+        luckysheetRef.current.destroy();
+
+        luckysheetRef.current.create({
+          data,
+          lang: 'zh',
+          showinfobar: false,
+          showstatisticBar: false,
+          hook: {
+            cellMousedown: (cell, position, sheet) => {
+              console.log(cell, position, sheet);
+            },
+            cellUpdated: () => {
+              luckysheetRef.current.refreshFormula();
+            },
+          },
+        });
+      }
+    );
+  };
+
+  const handleLoad = () => {
+    let contentWindow = sheetRef.current.contentWindow;
+    luckysheetRef.current = contentWindow.luckysheet;
+  };
+
+  const initData = sheets => {
+    let r = 5,
+      c = 12;
+    // let dateCell = sheets[3].celldata.find(item => item.r == 1 && item.c == 3);
+    let timer = sheets[3].celldata.filter(item => item.r == r && item.c >= c);
+    timer.forEach((item, index) => {
+      const cell = item.v;
+      
+      cell.f = `=EDATE(D2,${index})`;
+    });
+    console.log(timer);
+  };
+
+  return (
+    <div>
+      <Button type="primary" style={{ marginRight: 20 }} onClick={() => uploadExcelByUrl(1)}>
+        导入投标投标
+      </Button>
+      <Button type="primary" onClick={() => uploadExcelByUrl(2)}>
+        导入合同模板
+      </Button>
+
+      <iframe
+        style={{
+          width: '100%',
+          height: '80vh',
+        }}
+        ref={sheetRef}
+        onLoad={handleLoad}
+        src="/luckysheet.html"
+      ></iframe>
+    </div>
+  );
+}
+
+async function getExcel(gridKey) {
+  var formData = new FormData();
+  formData.append('gridKey', gridKey);
+  let res = await fetch(
+    `/api/v1/purchase/record/sheet?gridKey=${gridKey}&JWT-TOKEN=${getToken()}`,
+    {
+      method: 'POST',
+      body: formData,
+    }
+  ).then(response => response.text());
+  return JSON.parse(JSON.parse(res));
+}
+
+export default Index;

+ 2 - 1
src/services/boom.js

@@ -241,7 +241,7 @@ export async function queryBoomFlowDetail(params) {
       ...item,
       id: item.node_id,
       renderKey: item.render_key,
-      zIndex: item.z_index,
+      zIndex: 1,
       isCustom: !!item.is_custom,
       ports: JSON.parse(item.ports || '{}'),
     };
@@ -261,6 +261,7 @@ export async function queryBoomFlowDetail(params) {
         cell: item.target_cell,
         port: item.target_port,
       },
+      zIndex:0
     };
     try {
       edge.attrs = item.attr ? JSON.parse(item.attr) : attrs;

Some files were not shown because too many files changed in this diff