fangmingyue 1 jaar geleden
bovenliggende
commit
7662284719

+ 3
- 4
src/pages/custom/Edit.jsx Bestand weergeven

@@ -6,6 +6,7 @@ import {
6 6
   ProFormMoney,
7 7
   ProFormSelect,
8 8
   ProFormText,
9
+  ProFormRadio,
9 10
 } from '@ant-design/pro-components'
10 11
 import useBool from '@/utils/hooks/useBool'
11 12
 import { useSearchParams, useNavigate } from 'react-router-dom'
@@ -16,11 +17,9 @@ const { Option } = Select
16 17
 
17 18
 export default (props) => {
18 19
   const formRef = useRef()
19
-  const [loading, startLoading, cancelLoading] = useBool()
20 20
   const [submiting, startSubmit, cancelSubmit] = useBool()
21 21
 
22 22
   const [searchParams] = useSearchParams()
23
-  // const [form] = Form.useForm()
24 23
   const navigate = useNavigate()
25 24
 
26 25
   const id = searchParams.get('id')
@@ -61,7 +60,7 @@ export default (props) => {
61 60
 
62 61
   return (
63 62
     <Page>
64
-      <Card loading={loading}>
63
+      <Card>
65 64
         <ProForm
66 65
           formRef={formRef}
67 66
           onFinish={onFinish}
@@ -90,7 +89,7 @@ export default (props) => {
90 89
           <ProFormText name="contactsTitle" label="联系人头衔" />
91 90
           <ProFormText name="contactsPhone" label="联系人手机" />
92 91
           <ProFormText name="contactsEmail" label="联系人邮箱" />
93
-          <ProFormSelect
92
+          <ProFormRadio.Group
94 93
             name="isOrg"
95 94
             label="是否企业"
96 95
             options={[

+ 26
- 118
src/pages/project/Edit.jsx Bestand weergeven

@@ -1,129 +1,37 @@
1
-import React, { useEffect, useRef, useState } from 'react'
2
-import {
3
-  postTaProject,
4
-  putTaProject,
5
-  getTaProjectId,
6
-} from '@/services/taProject'
7
-import { getTaCustom } from '@/services/taCustom'
1
+import React, { useState } from 'react'
8 2
 import Page from '@/components/Page'
9
-import { Button, Card, Row, Col } from 'antd'
10
-import {
11
-  ProForm,
12
-  ProFormDateTimeRangePicker,
13
-  ProFormMoney,
14
-  ProFormSelect,
15
-  ProFormText,
16
-  ProFormTextArea,
17
-} from '@ant-design/pro-components'
18
-import { formItemLayout, tailFormItemLayout } from '@/utils/form'
19
-import { useNavigate, useSearchParams } from 'react-router-dom'
20
-import moment from 'moment'
3
+import ProjectMessage from './components/ProjectMessage'
4
+import ProjectDeploy from './components/ProjectDeploy'
5
+import { Card } from 'antd'
21 6
 
22 7
 export default (props) => {
23
-  const formRef = useRef()
24
-  const navigate = useNavigate()
8
+  const [activeTabKey, setActiveTabKey] = useState('tab1')
25 9
 
26
-  const [params] = useSearchParams()
27
-  const id = params.get('id')
28
-  const [customSelect, setCustomSelect] = useState()
10
+  const tabList = [
11
+    {
12
+      key: 'tab1',
13
+      tab: '项目信息',
14
+    },
15
+    {
16
+      key: 'tab2',
17
+      tab: '部署信息',
18
+    },
19
+  ]
29 20
 
30
-  useEffect(() => {
31
-    if (id) {
32
-      getTaProjectId(id).then((res) => {
33
-        formRef.current?.setFieldsValue({
34
-          ...res,
35
-          time: [moment(res.startTime), moment(res.endTime)],
36
-        })
37
-      })
38
-    }
39
-
40
-    //所属客户下拉
41
-    getTaCustom().then((res) => {
42
-      setCustomSelect(
43
-        res.records?.map(
44
-          (x) =>
45
-            ({
46
-              label: x.customName,
47
-              value: x.customId,
48
-            } || [])
49
-        )
50
-      )
51
-    })
52
-  }, [])
53
-  const onFinish = (values) => {
54
-    const data = {
55
-      ...values,
56
-      startTime: values.time[0],
57
-      endTime: values.time[1],
58
-    }
59
-    console.log(data)
60
-    if (!id) {
61
-      postTaProject(data).then((res) => {
62
-        navigate(-1)
63
-      })
64
-    } else if (id) {
65
-      putTaProject(id, data).then((res) => {
66
-        navigate(-1)
67
-      })
68
-    }
21
+  const contentList = {
22
+    tab1: <ProjectMessage />,
23
+    tab2: <ProjectDeploy />,
69 24
   }
25
+
70 26
   return (
71 27
     <Page>
72
-      <Card>
73
-        <ProForm
74
-          formRef={formRef}
75
-          onFinish={onFinish}
76
-          layout="horizontal"
77
-          {...formItemLayout}
78
-          submitter={{
79
-            render: (_, doms) => [
80
-              // doms.find((dom) => dom.props?.children === '提交'),
81
-              <Row>
82
-                <Col offset={6}>
83
-                  <Button type="primary" htmlType="submit">
84
-                    提交
85
-                  </Button>
86
-                </Col>
87
-                <Col offset={1}>
88
-                  <Button onClick={() => navigate(-1)}>返回</Button>
89
-                </Col>
90
-              </Row>,
91
-            ],
92
-          }}
93
-        >
94
-          <ProFormText name="partyA" label="甲方联系人" />
95
-          <ProFormText name="partyAName" label="甲方名称" />
96
-          <ProFormText name="partyB" label="乙方联系人" />
97
-          <ProFormText name="partyBName" label="乙方名称" />
98
-          <ProFormText name="projectName" label="项目名称" />
99
-          <ProFormTextArea name="introduction" label="项目简介" />
100
-          <ProFormDateTimeRangePicker name="time" label="工作周期" />
101
-          <ProFormMoney name="quotation" label="合同报价" />
102
-          <ProFormMoney name="receivedMoney" label="已收款" />
103
-          <ProFormMoney name="invoicedMoney" label="已开票额" />
104
-          <ProFormSelect
105
-            name="stageName"
106
-            label="阶段名称"
107
-            options={[
108
-              { label: '未开始', value: '0' },
109
-              { label: '处理中', value: '1' },
110
-              { label: '已完成', value: '2' },
111
-            ]}
112
-          />
113
-          <ProFormSelect
114
-            name="status"
115
-            label="项目状态"
116
-            options={[
117
-              { label: '禁用', value: 0 },
118
-              { label: '正常', value: 1 },
119
-            ]}
120
-          />
121
-          <ProFormSelect
122
-            options={customSelect}
123
-            name="customId"
124
-            label="所属客户"
125
-          />
126
-        </ProForm>
28
+      <Card
29
+        style={{ backgroundColor: '#F0F2F5' }}
30
+        tabList={tabList}
31
+        activeTabKey={activeTabKey}
32
+        onTabChange={(key) => setActiveTabKey(key)}
33
+      >
34
+        {contentList[activeTabKey]}
127 35
       </Card>
128 36
     </Page>
129 37
   )

+ 56
- 0
src/pages/project/components/Custom.jsx Bestand weergeven

@@ -0,0 +1,56 @@
1
+import React, { useState } from 'react'
2
+import { Button, Card, Form, Input, Select, Row, Col, Descriptions } from 'antd'
3
+import {
4
+  ProForm,
5
+  ProFormDateTimeRangePicker,
6
+  ProFormMoney,
7
+  ProFormSelect,
8
+  ProFormText,
9
+  ProFormRadio,
10
+} from '@ant-design/pro-components'
11
+import Page from '@/components/Page'
12
+import { postTaCustom, putTaCustom, getTaCustomId } from '@/services/taCustom'
13
+const { Option } = Select
14
+
15
+export default (props) => {
16
+  const { customId } = props
17
+  const [list, setList] = useState()
18
+
19
+  React.useEffect(() => {
20
+    if (customId) {
21
+      getTaCustomId(customId).then((res) => {
22
+        setList(res)
23
+      })
24
+    }
25
+  }, [customId])
26
+  console.log('customId', customId)
27
+  return (
28
+    <Card title={<div style={{ fontWeight: 'bold' }}>客户基本信息</div>}>
29
+      <Descriptions bordered={true} column={1}>
30
+        <Descriptions.Item label="客户名">{list?.customName}</Descriptions.Item>
31
+        <Descriptions.Item label="客户税号">
32
+          {list?.isOrg == 1 ? list?.dutyParagraph : ''}
33
+        </Descriptions.Item>
34
+        <Descriptions.Item label="开户行">
35
+          {list?.openingBank}
36
+        </Descriptions.Item>
37
+        <Descriptions.Item label="客户账号">{list?.account}</Descriptions.Item>
38
+        <Descriptions.Item label="联系人姓名">
39
+          {list?.contactsName}
40
+        </Descriptions.Item>
41
+        <Descriptions.Item label="联系人头衔">
42
+          {list?.contactsTitle}
43
+        </Descriptions.Item>
44
+        <Descriptions.Item label="联系人手机">
45
+          {list?.contactsPhone}
46
+        </Descriptions.Item>
47
+        <Descriptions.Item label="联系人邮箱">
48
+          {list?.contactsEmail}
49
+        </Descriptions.Item>
50
+        <Descriptions.Item label="是否企业">
51
+          {customId && (list?.isOrg == 1 ? '是' : '否')}
52
+        </Descriptions.Item>
53
+      </Descriptions>
54
+    </Card>
55
+  )
56
+}

+ 97
- 0
src/pages/project/components/Finance.jsx Bestand weergeven

@@ -0,0 +1,97 @@
1
+import React, { useEffect, useRef, useState } from 'react'
2
+import { getTfFinance } from '@/services/tfFinance'
3
+import { Button, Card, Row, Col } from 'antd'
4
+import { ProTable } from '@ant-design/pro-components'
5
+import FinanceModalForm from './FinanceModalForm'
6
+
7
+export default (props) => {
8
+  const actionRef = useRef()
9
+  const [open, setOpen] = useState(false)
10
+
11
+  const columns = [
12
+    {
13
+      title: '记录名称',
14
+      dataIndex: 'financeName',
15
+      ellipsis: true,
16
+    },
17
+    {
18
+      title: '项目状态',
19
+      dataIndex: 'bizStatus',
20
+      search: false,
21
+      ellipsis: true,
22
+    },
23
+    {
24
+      title: '总费用',
25
+      dataIndex: 'totalCharges',
26
+      search: false,
27
+      ellipsis: true,
28
+    },
29
+    {
30
+      title: '毛利润',
31
+      dataIndex: 'grossProfits',
32
+      search: false,
33
+      ellipsis: true,
34
+    },
35
+    {
36
+      title: '总成本',
37
+      dataIndex: 'totalCost',
38
+      search: false,
39
+      ellipsis: true,
40
+    },
41
+    {
42
+      title: '已支出',
43
+      dataIndex: 'expense',
44
+      search: false,
45
+      ellipsis: true,
46
+    },
47
+    {
48
+      title: '已收款',
49
+      dataIndex: 'received',
50
+      search: false,
51
+      ellipsis: true,
52
+    },
53
+    {
54
+      title: '尾款',
55
+      dataIndex: 'balancePayment',
56
+      search: false,
57
+      ellipsis: true,
58
+    },
59
+    {
60
+      title: '发票',
61
+      dataIndex: 'invoice',
62
+      search: false,
63
+      ellipsis: true,
64
+    },
65
+  ]
66
+
67
+  const onAdd = () => {
68
+    setOpen(true)
69
+  }
70
+  const onCancel = () => {
71
+    setOpen(false)
72
+  }
73
+  return (
74
+    <Card title={<div style={{ fontWeight: 'bold' }}>收付款信息</div>}>
75
+      <ProTable
76
+        toolBarRender={() => [
77
+          <Button key="1" type="primary" onClick={onAdd}>
78
+            新增
79
+          </Button>,
80
+        ]}
81
+        // title={() => {
82
+        //   return (
83
+        //     <div style={{ fontWeight: 'bold', fontSize: '16px' }}>
84
+        //       收付款信息
85
+        //     </div>
86
+        //   )
87
+        // }}
88
+        options={false}
89
+        actionRef={actionRef}
90
+        rowKey="financeId"
91
+        request={getTfFinance}
92
+        columns={columns}
93
+      />
94
+      <FinanceModalForm open={open} onAdd={onAdd} onCancel={onCancel} />
95
+    </Card>
96
+  )
97
+}

+ 37
- 0
src/pages/project/components/FinanceModalForm.jsx Bestand weergeven

@@ -0,0 +1,37 @@
1
+import React, { useEffect, useRef, useState } from 'react'
2
+import { Form } from 'antd'
3
+import { postTfFinance } from '@/services/tfFinance'
4
+import {
5
+  ModalForm,
6
+  ProFormText,
7
+  ProFormMoney,
8
+} from '@ant-design/pro-components'
9
+
10
+export default (props) => {
11
+  const { open, onCancel } = props
12
+  const [form] = Form.useForm()
13
+
14
+  const onFinish = () => {}
15
+  return (
16
+    <ModalForm
17
+      form={form}
18
+      title="收付款维护"
19
+      open={open}
20
+      grid={true}
21
+      labelCol={{ sm: 3 }}
22
+      layout="horizontal"
23
+      onFinish={onFinish}
24
+      modalProps={{
25
+        destroyOnClose: true,
26
+        onCancel: onCancel,
27
+      }}
28
+    >
29
+      <ProFormText name="ycItemName" label="收支名称" />
30
+      <ProFormMoney name="money" label="收支金额" />
31
+      <ProFormText name="itemType" label="明细类型" />
32
+      <ProFormText name="ycType" label="收支类型" />
33
+      <ProFormText name="fromOrg" label="来源机构" />
34
+      <ProFormText name="toOrg" label="目的机构" />
35
+    </ModalForm>
36
+  )
37
+}

+ 121
- 0
src/pages/project/components/ProjectDeploy.jsx Bestand weergeven

@@ -0,0 +1,121 @@
1
+import React, { useEffect, useRef, useState } from 'react'
2
+import { ProTable } from '@ant-design/pro-components'
3
+import { queryTable } from '@/utils/request'
4
+import { getTaProjectDeploy } from '@/services/taProjectDeploy'
5
+
6
+export default (props) => {
7
+  const actionRef = useRef()
8
+  const projectDeployList = queryTable(getTaProjectDeploy)
9
+
10
+  const columns = [
11
+    {
12
+      title: '服务名称',
13
+      dataIndex: 'serviceName',
14
+      ellipsis: true,
15
+    },
16
+    {
17
+      title: '服务类型',
18
+      dataIndex: 'serviceType',
19
+      search: false,
20
+      ellipsis: true,
21
+    },
22
+    {
23
+      title: '服务商',
24
+      dataIndex: 'isp',
25
+      ellipsis: true,
26
+    },
27
+    {
28
+      title: '主机IP',
29
+      dataIndex: 'ip',
30
+      ellipsis: true,
31
+    },
32
+    {
33
+      title: '端口',
34
+      dataIndex: 'port',
35
+      search: false,
36
+      ellipsis: true,
37
+    },
38
+    {
39
+      title: '进程',
40
+      dataIndex: 'process',
41
+      search: false,
42
+      ellipsis: true,
43
+    },
44
+    {
45
+      title: '系统服务名称',
46
+      dataIndex: 'sysServiceName',
47
+      ellipsis: true,
48
+    },
49
+    {
50
+      title: '访问地址',
51
+      dataIndex: 'webUrl',
52
+      search: false,
53
+      ellipsis: true,
54
+    },
55
+    {
56
+      title: 'OSS',
57
+      dataIndex: 'ossBucket',
58
+      ellipsis: true,
59
+    },
60
+    {
61
+      title: '账户',
62
+      dataIndex: 'account',
63
+      search: false,
64
+      ellipsis: true,
65
+    },
66
+    {
67
+      title: '密码',
68
+      dataIndex: 'password',
69
+      render: () => '******',
70
+      search: false,
71
+      ellipsis: true,
72
+    },
73
+    {
74
+      title: '函数计算信息',
75
+      dataIndex: 'serverlessInfo',
76
+      search: false,
77
+      ellipsis: true,
78
+    },
79
+    {
80
+      title: '小程序服务商',
81
+      dataIndex: 'miniappIsp',
82
+      ellipsis: true,
83
+    },
84
+    {
85
+      title: '小程序名称',
86
+      dataIndex: 'miniappName',
87
+      ellipsis: true,
88
+    },
89
+    // {
90
+    //   title: '操作',
91
+    //   valueType: 'option',
92
+    //   key: 'option',
93
+    //   ellipsis: true,
94
+    //   fixed: 'right',
95
+    //   render: (_, record) => [],
96
+    // },
97
+  ]
98
+
99
+  return (
100
+    <ProTable
101
+      actionRef={actionRef}
102
+      rowKey="serviceId"
103
+      // scroll={{ x: 1300 }}
104
+      // onEdit={(record) => navigate(`/member/edit?id=${record.memberId}`)}
105
+      // onDelete={(record) => handleDelete(record.memberId)}
106
+      // toolBarRender={() => [
107
+      //   <Button
108
+      //     key="1"
109
+      //     type="primary"
110
+      //     onClick={() => {
111
+      //       navigate("/member/edit");
112
+      //     }}
113
+      //   >
114
+      //     新增
115
+      //   </Button>,
116
+      // ]}
117
+      request={projectDeployList}
118
+      columns={columns}
119
+    />
120
+  )
121
+}

+ 165
- 0
src/pages/project/components/ProjectEdit.jsx Bestand weergeven

@@ -0,0 +1,165 @@
1
+import React, { useEffect, useRef, useState } from 'react'
2
+import {
3
+  postTaProject,
4
+  putTaProject,
5
+  getTaProjectId,
6
+} from '@/services/taProject'
7
+import { getTaCustom } from '@/services/taCustom'
8
+import { Button, Card, Row, Col } from 'antd'
9
+import {
10
+  ProForm,
11
+  ProFormDateTimeRangePicker,
12
+  ProFormMoney,
13
+  ProFormSelect,
14
+  ProFormText,
15
+  ProFormTextArea,
16
+  ProFormRadio,
17
+} from '@ant-design/pro-components'
18
+import { useNavigate, useSearchParams } from 'react-router-dom'
19
+import moment from 'moment'
20
+
21
+export default (props) => {
22
+  const { setCustomId } = props
23
+  const formRef = useRef()
24
+  const navigate = useNavigate()
25
+
26
+  const [params] = useSearchParams()
27
+  const id = params.get('id')
28
+  const [customSelect, setCustomSelect] = useState()
29
+
30
+  useEffect(() => {
31
+    if (id) {
32
+      getTaProjectId(id).then((res) => {
33
+        formRef.current?.setFieldsValue({
34
+          ...res,
35
+          time: [moment(res.startTime), moment(res.endTime)],
36
+        })
37
+        setCustomId(res?.customId)
38
+      })
39
+    }
40
+
41
+    //所属客户下拉
42
+    getTaCustom().then((res) => {
43
+      setCustomSelect(
44
+        res.records?.map(
45
+          (x) =>
46
+            ({
47
+              label: x.customName,
48
+              value: x.customId,
49
+            } || [])
50
+        )
51
+      )
52
+    })
53
+  }, [])
54
+  const onFinish = (values) => {
55
+    const data = {
56
+      ...values,
57
+      startTime: values.time[0],
58
+      endTime: values.time[1],
59
+    }
60
+
61
+    if (!id) {
62
+      postTaProject(data).then((res) => {})
63
+    } else if (id) {
64
+      putTaProject(id, data).then((res) => {})
65
+    }
66
+  }
67
+  let formatter = new Intl.NumberFormat('zh-CN', {
68
+    minimumFractionDigits: 4,
69
+    maximumFractionDigits: 4,
70
+  })
71
+  return (
72
+    <Card
73
+      title={<div style={{ fontWeight: 'bold' }}>项目维护</div>}
74
+      style={{
75
+        marginRight: '24px',
76
+        marginBottom: '24px',
77
+        paddingBottom: '26px',
78
+      }}
79
+    >
80
+      <ProForm
81
+        formRef={formRef}
82
+        onFinish={onFinish}
83
+        layout="horizontal"
84
+        grid={true}
85
+        submitter={{
86
+          render: (_, doms) => [
87
+            <Row justify="center">
88
+              <Col>
89
+                <Button type="primary" htmlType="submit">
90
+                  提交
91
+                </Button>
92
+              </Col>
93
+              <Col offset={1}>
94
+                <Button onClick={() => navigate(-1)}>返回</Button>
95
+              </Col>
96
+            </Row>,
97
+          ],
98
+        }}
99
+      >
100
+        <ProFormText
101
+          colProps={{ xl: 12 }}
102
+          labelCol={{ sm: 4 }}
103
+          name="partyA"
104
+          label="甲方"
105
+        />
106
+        <ProFormText colProps={{ xl: 12 }} name="partyAName" label="甲方名称" />
107
+        <ProFormText
108
+          colProps={{ xl: 12 }}
109
+          labelCol={{ sm: 4 }}
110
+          name="partyB"
111
+          label="乙方"
112
+        />
113
+        <ProFormText colProps={{ xl: 12 }} name="partyBName" label="乙方名称" />
114
+        <ProFormText
115
+          colProps={{ xl: 12 }}
116
+          name="projectName"
117
+          label="项目名称"
118
+        />
119
+        <ProFormSelect
120
+          colProps={{ xl: 12 }}
121
+          options={customSelect}
122
+          name="customId"
123
+          label="所属客户"
124
+        />
125
+        <ProFormMoney colProps={{ xl: 12 }} name="quotation" label="合同报价" />
126
+        <ProFormMoney
127
+          colProps={{ xl: 12 }}
128
+          labelCol={{ sm: 4 }}
129
+          name="receivedMoney"
130
+          label="已收款"
131
+        />
132
+        <ProFormMoney
133
+          colProps={{ xl: 12 }}
134
+          name="invoicedMoney"
135
+          label="已开票额"
136
+        />
137
+        <ProFormSelect
138
+          colProps={{ xl: 12 }}
139
+          name="stageName"
140
+          label="阶段名称"
141
+          options={[
142
+            { label: '未开始', value: '0' },
143
+            { label: '处理中', value: '1' },
144
+            { label: '已完成', value: '2' },
145
+          ]}
146
+        />
147
+        <ProFormRadio.Group
148
+          colProps={{ xl: 12 }}
149
+          name="status"
150
+          label="项目状态"
151
+          options={[
152
+            { label: '正常', value: 1 },
153
+            { label: '禁用', value: 0 },
154
+          ]}
155
+        />
156
+        <ProFormDateTimeRangePicker
157
+          colProps={{ xl: 12 }}
158
+          name="time"
159
+          label="工作周期"
160
+        />
161
+        <ProFormTextArea name="introduction" label="项目简介" />
162
+      </ProForm>
163
+    </Card>
164
+  )
165
+}

+ 26
- 0
src/pages/project/components/ProjectMessage.jsx Bestand weergeven

@@ -0,0 +1,26 @@
1
+import React, { useState } from 'react'
2
+import { Row, Col } from 'antd'
3
+import ProjectEdit from './ProjectEdit'
4
+import Finance from './Finance'
5
+import ProjectNode from './ProjectNode'
6
+import Custom from './Custom'
7
+import style from './style.module.less'
8
+
9
+export default (props) => {
10
+  const [customId, setCustomId] = useState()
11
+
12
+  return (
13
+    <div>
14
+      <div className={style.box}>
15
+        <div className={style.flex1d5}>
16
+          <ProjectEdit setCustomId={setCustomId} />
17
+        </div>
18
+        <div className={style.flex1}>
19
+          <Custom customId={customId} />
20
+        </div>
21
+      </div>
22
+      <Finance />
23
+      <ProjectNode />
24
+    </div>
25
+  )
26
+}

+ 47
- 0
src/pages/project/components/ProjectNode.jsx Bestand weergeven

@@ -0,0 +1,47 @@
1
+import React, { useEffect, useRef, useState } from 'react'
2
+import { getTaProjectNode } from '@/services/taProjectNode'
3
+import { Button, Card, Row, Col } from 'antd'
4
+import { queryTable } from '@/utils/request'
5
+import { ProTable } from '@ant-design/pro-components'
6
+import moment from 'moment'
7
+
8
+export default (props) => {
9
+  const actionRef = useRef()
10
+  const projectNodeList = queryTable(getTaProjectNode)
11
+
12
+  const columns = [
13
+    {
14
+      title: '跟进状态',
15
+      dataIndex: 'bizStatus',
16
+      ellipsis: true,
17
+    },
18
+    {
19
+      title: '备注',
20
+      dataIndex: 'remark',
21
+      search: false,
22
+      ellipsis: true,
23
+    },
24
+    {
25
+      title: '业务发生时间',
26
+      dataIndex: 'bizDate',
27
+      render: (t) => moment(t).format('YYYY-MM-DD'),
28
+      search: false,
29
+      ellipsis: true,
30
+    },
31
+  ]
32
+
33
+  return (
34
+    <Card
35
+      title={<div style={{ fontWeight: 'bold' }}>跟进信息</div>}
36
+      style={{ marginTop: '24px' }}
37
+    >
38
+      <ProTable
39
+        options={false}
40
+        actionRef={actionRef}
41
+        rowKey="nodeId"
42
+        request={projectNodeList}
43
+        columns={columns}
44
+      />
45
+    </Card>
46
+  )
47
+}

+ 9
- 0
src/pages/project/components/style.module.less Bestand weergeven

@@ -0,0 +1,9 @@
1
+.box {
2
+  display: flex;
3
+  .flex1d5 {
4
+    flex: 1.5;
5
+  }
6
+  .flex1 {
7
+    flex: 1;
8
+  }
9
+}

+ 55
- 55
src/pages/projectContact/index.jsx Bestand weergeven

@@ -1,95 +1,95 @@
1
-import React, { useRef } from "react";
1
+import React, { useRef } from 'react'
2 2
 import {
3 3
   getTaProjectContact,
4 4
   deleteTaProjectContact,
5
-} from "@/services/taProjectContact";
6
-import { Button } from "antd";
7
-import List from "@/components/Page/List";
8
-import { useNavigate } from "react-router-dom";
9
-import moment from "moment";
5
+} from '@/services/taProjectContact'
6
+import { Button } from 'antd'
7
+import List from '@/components/Page/List'
8
+import { useNavigate } from 'react-router-dom'
9
+import moment from 'moment'
10 10
 export default (props) => {
11
-  const navigate = useNavigate();
12
-  const actionRef = useRef();
11
+  const navigate = useNavigate()
12
+  const actionRef = useRef()
13 13
 
14 14
   const columns = [
15
-    {
16
-      title: "发生周期",
17
-      dataIndex: "startTime1",
18
-      search: {
19
-        transform: (value) => {
20
-          return {
21
-            startTime: value[0],
22
-            endTime: value[1],
23
-          };
24
-        },
25
-      },
15
+    // {
16
+    //   title: "发生周期",
17
+    //   dataIndex: "startTime1",
18
+    //   search: {
19
+    //     transform: (value) => {
20
+    //       return {
21
+    //         startTime: value[0],
22
+    //         endTime: value[1],
23
+    //       };
24
+    //     },
25
+    //   },
26 26
 
27
-      hideInTable: true,
28
-    },
27
+    //   hideInTable: true,
28
+    // },
29 29
 
30 30
     {
31
-      title: "联系人名称",
32
-      dataIndex: "personName",
31
+      title: '联系人名称',
32
+      dataIndex: 'personName',
33 33
     },
34 34
     {
35
-      title: "性别",
36
-      dataIndex: "sex",
35
+      title: '性别',
36
+      dataIndex: 'sex',
37 37
       search: false,
38
-      render: (t) => (t == 1 ? "男" : t == 2 ? "女" : "未知"),
38
+      render: (t) => (t == 1 ? '男' : t == 2 ? '女' : '未知'),
39 39
     },
40 40
     {
41
-      title: "年龄",
42
-      dataIndex: "age",
41
+      title: '年龄',
42
+      dataIndex: 'age',
43 43
       search: false,
44 44
     },
45 45
     {
46
-      title: "生日",
47
-      dataIndex: "birthDay",
46
+      title: '生日',
47
+      dataIndex: 'birthDay',
48 48
       search: false,
49
-      render: (t) => moment(t).format("YYYY-MM-DD"),
49
+      render: (t) => moment(t).format('YYYY-MM-DD'),
50 50
     },
51 51
 
52 52
     {
53
-      title: "手机号",
54
-      dataIndex: "phone",
53
+      title: '手机号',
54
+      dataIndex: 'phone',
55 55
     },
56 56
     {
57
-      title: "邮箱",
58
-      dataIndex: "email",
57
+      title: '邮箱',
58
+      dataIndex: 'email',
59 59
     },
60 60
     {
61
-      title: "职位",
62
-      dataIndex: "position",
61
+      title: '职位',
62
+      dataIndex: 'position',
63 63
     },
64 64
     {
65
-      title: "是否默认联系人",
66
-      dataIndex: "isDefault",
67
-      render: (t) => (t == 1 ? "是" : "否"),
65
+      title: '是否默认联系人',
66
+      dataIndex: 'isDefault',
67
+      render: (t) => (t == 1 ? '是' : '否'),
68 68
     },
69
-  ];
69
+  ]
70 70
   return (
71 71
     <List
72 72
       rowKey="personId"
73 73
       actionRef={actionRef}
74
-      //   onEdit={(record) => navigate(`/project/edit?id=${record.personId}`)}
74
+      //   onEdit={(record) => navigate(`/projectContact/edit?id=${record.personId}`)}
75 75
       onDelete={(record) =>
76 76
         deleteTaProjectContact(record.projectId).then(() =>
77 77
           actionRef.current.reload()
78 78
         )
79 79
       }
80
-      //   toolBarRender={() => [
81
-      //     <Button
82
-      //       key="1"
83
-      //       type="primary"
84
-      //       onClick={() => {
85
-      //         navigate("/project/edit");
86
-      //       }}
87
-      //     >
88
-      //       新增
89
-      //     </Button>,
90
-      //   ]}
80
+      toolBarRender={() => [
81
+        <Button
82
+          key="1"
83
+          type="primary"
84
+          onClick={() => {
85
+            navigate('/projectContact/edit')
86
+          }}
87
+        >
88
+          新增
89
+        </Button>,
90
+      ]}
91 91
       request={getTaProjectContact}
92 92
       columns={columns}
93 93
     />
94
-  );
95
-};
94
+  )
95
+}

+ 89
- 92
src/routes/routes.jsx Bestand weergeven

@@ -5,29 +5,28 @@ import {
5 5
   HeartOutlined,
6 6
   HourglassTwoTone,
7 7
   StopFilled,
8
-} from "@ant-design/icons";
9
-import { Outlet, Navigate } from "react-router-dom";
10
-import AuthLayout from "@/layouts/AuthLayout";
11
-import Login from "@/pages/login";
12
-import Page404 from "@/pages/404";
13
-import AdUser from "@/pages/adUser";
14
-import AdUserEdit from "@/pages/adUser/Edit";
15
-import Project from "@/pages/project";
16
-import ProjectEdit from "@/pages/project/Edit";
17
-import ProjectContact from "@/pages/projectContact";
18
-import ProjectDeploy from "@/pages/projectDeploy";
19
-import ProjectNode from "@/pages/projectNode";
20
-
21
-import Role from "@/pages/role";
22
-import Dept from "@/pages/dept";
23
-import Package from "@/pages/package";
24
-import PackageEdit from "@/pages/package/Edit";
25
-import Member from "@/pages/member";
26
-import MemberEdit from "@/pages/member/Edit";
27
-import Custom from "@/pages/custom";
28
-import CustomEdit from "@/pages/custom/Edit";
29
-import Finance from "@/pages/finance";
8
+} from '@ant-design/icons'
9
+import { Outlet, Navigate } from 'react-router-dom'
10
+import AuthLayout from '@/layouts/AuthLayout'
11
+import Login from '@/pages/login'
12
+import Page404 from '@/pages/404'
13
+import AdUser from '@/pages/adUser'
14
+import AdUserEdit from '@/pages/adUser/Edit'
15
+import Project from '@/pages/project'
16
+import ProjectEdit from '@/pages/project/Edit'
17
+import ProjectContact from '@/pages/projectContact'
18
+import ProjectDeploy from '@/pages/projectDeploy'
19
+import ProjectNode from '@/pages/projectNode'
30 20
 
21
+import Role from '@/pages/role'
22
+import Dept from '@/pages/dept'
23
+import Package from '@/pages/package'
24
+import PackageEdit from '@/pages/package/Edit'
25
+import Member from '@/pages/member'
26
+import MemberEdit from '@/pages/member/Edit'
27
+import Custom from '@/pages/custom'
28
+import CustomEdit from '@/pages/custom/Edit'
29
+import Finance from '@/pages/finance'
31 30
 
32 31
 // import RoleEdit from "@/pages/role/Edit";
33 32
 /**
@@ -49,186 +48,184 @@ export const authRoutes = [
49 48
     element: <Navigate to="/aduser" replace={true} />,
50 49
   },
51 50
   {
52
-    path: "aduser",
51
+    path: 'aduser',
53 52
     element: <AdUser />,
54 53
     meta: {
55
-      title: "用户管理",
54
+      title: '用户管理',
56 55
       icon: <SolutionOutlined />,
57 56
     },
58 57
   },
59 58
   {
60
-    path: "aduser/edit",
59
+    path: 'aduser/edit',
61 60
     element: <AdUserEdit />,
62 61
     meta: {
63
-      title: "用户维护",
62
+      title: '用户维护',
64 63
       hideInMenu: true,
65 64
     },
66 65
   },
67 66
   {
68
-    path: "project",
67
+    path: 'project',
69 68
     element: <Project />,
70 69
     meta: {
71
-      title: "项目管理",
70
+      title: '项目管理',
72 71
       icon: <FileTextOutlined />,
73 72
     },
74 73
   },
75 74
   {
76
-    path: "project/edit",
75
+    path: 'project/edit',
77 76
     element: <ProjectEdit />,
78 77
     meta: {
79
-      title: "项目维护",
78
+      title: '项目维护',
80 79
       hideInMenu: true,
81 80
     },
82 81
   },
83 82
   {
84
-    path: "projectContact",
83
+    path: 'projectContact',
85 84
     element: <ProjectContact />,
86 85
     meta: {
87
-      title: "项目联系人管理",
86
+      title: '项目联系人管理',
88 87
       icon: <FileTextOutlined />,
89 88
     },
90 89
   },
91
-  {
92
-    path: "projectDeploy",
93
-    element: <ProjectDeploy />,
94
-    meta: {
95
-      title: "服务器管理",
96
-      icon: <FileTextOutlined />,
97
-    },
98
-  },
99
-  {
100
-    path: "projectNode",
101
-    element: <ProjectNode />,
102
-    meta: {
103
-      title: "流程节点管理",
104
-      icon: <FileTextOutlined />,
105
-    },
106
-  },
107
-  {
108
-    path: "dept",
90
+  // {
91
+  //   path: "projectDeploy",
92
+  //   element: <ProjectDeploy />,
93
+  //   meta: {
94
+  //     title: "服务器管理",
95
+  //     icon: <FileTextOutlined />,
96
+  //   },
97
+  // },
98
+  // {
99
+  //   path: "projectNode",
100
+  //   element: <ProjectNode />,
101
+  //   meta: {
102
+  //     title: "流程节点管理",
103
+  //     icon: <FileTextOutlined />,
104
+  //   },
105
+  // },
106
+  {
107
+    path: 'dept',
109 108
     element: <Dept />,
110 109
     meta: {
111
-      title: "部门管理",
110
+      title: '部门管理',
112 111
       icon: <HeartOutlined />,
113 112
     },
114 113
   },
115 114
 
116 115
   {
117
-    path: "role",
116
+    path: 'role',
118 117
     element: <Role />,
119 118
     meta: {
120
-      title: "角色管理",
119
+      title: '角色管理',
121 120
       icon: <UserOutlined />,
122 121
     },
123 122
   },
124 123
   {
125
-    path: "custom",
124
+    path: 'custom',
126 125
     element: <Custom />,
127 126
     meta: {
128
-      title: "客户管理",
127
+      title: '客户管理',
129 128
       icon: <StopFilled />,
130 129
     },
131 130
   },
132 131
   {
133
-    path: "custom/edit",
132
+    path: 'custom/edit',
134 133
     element: <CustomEdit />,
135 134
     meta: {
136
-      title: "客户维护",
135
+      title: '客户维护',
137 136
       hideInMenu: true,
138 137
     },
139 138
   },
140 139
 
141
-
142 140
   {
143
-    path: "package",
141
+    path: 'package',
144 142
     element: <Package />,
145 143
     meta: {
146
-      title: "套餐管理",
144
+      title: '套餐管理',
147 145
       icon: <HourglassTwoTone />,
148 146
     },
149 147
   },
150 148
   {
151
-    path: "package/edit",
149
+    path: 'package/edit',
152 150
     element: <PackageEdit />,
153 151
     meta: {
154
-      title: "套餐维护",
152
+      title: '套餐维护',
155 153
       hideInMenu: true,
156 154
     },
157 155
   },
158 156
   {
159
-    path: "member",
157
+    path: 'member',
160 158
     element: <Member />,
161 159
     meta: {
162
-      title: "会员管理",
160
+      title: '会员管理',
163 161
       icon: <HourglassTwoTone />,
164 162
     },
165 163
   },
166 164
   {
167
-    path: "member/edit",
165
+    path: 'member/edit',
168 166
     element: <MemberEdit />,
169 167
     meta: {
170
-      title: "会员管理",
168
+      title: '会员管理',
171 169
       hideInMenu: true,
172 170
     },
173 171
   },
174 172
 
175
-  
176 173
   {
177
-    path: "finance",
174
+    path: 'finance',
178 175
     element: <Finance />,
179 176
     meta: {
180
-      title: "公司财务管理",
177
+      title: '公司财务管理',
181 178
       icon: <HourglassTwoTone />,
182 179
     },
183 180
   },
184
-];
181
+]
185 182
 
186 183
 export const defaultRoutes = [
187 184
   {
188
-    path: "/",
185
+    path: '/',
189 186
     element: <AuthLayout />,
190 187
     children: [
191 188
       {
192
-        path: "*",
189
+        path: '*',
193 190
         element: <Page404 />,
194 191
       },
195 192
     ],
196 193
   },
197 194
   {
198
-    path: "/login",
195
+    path: '/login',
199 196
     element: <Login />,
200 197
   },
201 198
   {
202
-    path: "*",
199
+    path: '*',
203 200
     element: <Page404 />,
204 201
   },
205
-];
202
+]
206 203
 
207 204
 export function mergeAuthRoutes(r1, r2) {
208
-  const r = r1.slice();
209
-  const children = r1[0].children.slice();
210
-  r[0].children = children.concat(r2);
211
-  return r;
205
+  const r = r1.slice()
206
+  const children = r1[0].children.slice()
207
+  r[0].children = children.concat(r2)
208
+  return r
212 209
 }
213 210
 
214 211
 // 全部路由
215
-export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
216
-function getPath(parent = "/", current = "") {
217
-  if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
218
-    return current;
219
-  return `${parent}/${current}`.replace(/\/\//g, "/");
212
+export const routes = mergeAuthRoutes(defaultRoutes, authRoutes)
213
+function getPath(parent = '/', current = '') {
214
+  if (current.indexOf('/') === 0 || current.indexOf('http') === 0)
215
+    return current
216
+  return `${parent}/${current}`.replace(/\/\//g, '/')
220 217
 }
221 218
 
222 219
 // 路由数组, 一维数组
223 220
 export const routeArr = (() => {
224
-  const flatten = (routes, parentPath = "/") => {
221
+  const flatten = (routes, parentPath = '/') => {
225 222
     return routes.reduce((acc, route) => {
226
-      const path = getPath(parentPath, route.path);
227
-      const children = route.children ? flatten(route.children, path) : [];
223
+      const path = getPath(parentPath, route.path)
224
+      const children = route.children ? flatten(route.children, path) : []
228 225
 
229
-      return acc.concat([{ ...route, path }].concat(children));
230
-    }, []);
231
-  };
226
+      return acc.concat([{ ...route, path }].concat(children))
227
+    }, [])
228
+  }
232 229
 
233
-  return flatten(routes);
234
-})();
230
+  return flatten(routes)
231
+})()

+ 12
- 0
src/services/tfFinance.js Bestand weergeven

@@ -0,0 +1,12 @@
1
+import request from "@/utils/request";
2
+
3
+
4
+/*
5
+ * 分页查询
6
+ */
7
+export const getTfFinance = (params) => request(`/tfFinance`, { params });
8
+
9
+/*
10
+ * 新增数据
11
+ */
12
+export const postTfFinance = (data) => request('/tfFinance', { data, method: 'post' });