瀏覽代碼

* 新需求

顾绍勇 5 年之前
父節點
當前提交
f636f8fba3

+ 193
- 0
src/pages/eContract/businessConfig/add.jsx 查看文件

@@ -0,0 +1,193 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, Radio, Upload, InputNumber } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import router from 'umi/router';
5
+import moment from 'moment';
6
+import SelectCity from '../../../components/SelectButton/CitySelect'
7
+import BuildSelect2 from '../../../components/SelectButton/BuildSelect2'
8
+import LivePlatSelect from '../../../components/SelectButton/LivePlatSelect'
9
+import CitySelect3 from '../../../components/SelectButton/CitySelect3'
10
+import ImageUpload from '../../../components/XForm/ImageUpload'
11
+import Wangedit from '../../../components/Wangedit/Wangedit'
12
+import apis from '../../../services/apis';
13
+import request from '../../../utils/request';
14
+import AuthButton from '@/components/AuthButton';
15
+import SelectContractTemp from './components/SelectContractTemp';
16
+import SelectRaise from './components/SelectRaise';
17
+import SelectCompany from './components/SelectCompany';
18
+import SelectSeal from './components/SelectSeal';
19
+
20
+const { Option } = Select;
21
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
22
+
23
+let cityId = ''
24
+
25
+const header = props => {
26
+  const { salesBatchId } = props.location.query
27
+  const [ saleBatchData, setSaleBatchData ] = useState({})
28
+  const [showHelp, setShowHelp] = useState(false)
29
+
30
+  const [targetName, setTargetName] = useState({})
31
+  const [companyName, setCompanyName] = useState({})
32
+  const [contractTemplateName, setContractTemplateName] = useState({})
33
+  const [contractTemplateLink, setContractTemplateLink] = useState('')
34
+
35
+  const cancelPage = () =>{
36
+    router.push({
37
+      pathname: '/eContract/businessConfig/list',
38
+    });
39
+  }
40
+
41
+   //打开新页面
42
+   const openIndexImg = () => {
43
+    if(contractTemplateLink){
44
+     window.open(contractTemplateLink);
45
+    }else{
46
+      message.info('请选择合同模板');
47
+    }
48
+ }
49
+
50
+  function highlightsTypeChange(e) {
51
+    setTypeState(e.target.value)
52
+  }
53
+
54
+  function disabledDate(current) {
55
+    // Can not select days before today and today
56
+    return current && current < moment().endOf('day');
57
+  }
58
+
59
+  function companyOnSuccess(e){
60
+    console.log(e)
61
+    setCompanyName(e)
62
+  }
63
+
64
+  function contractOnSuccess(e){
65
+    console.log('contractOnSuccess', e)
66
+    setContractTemplateName(e.name)
67
+    request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: e.id} }).then((data) => {
68
+      setContractTemplateLink(data.contractTemplateAddress)
69
+      console.log(contractTemplateLink,'dddddddddd')
70
+    })
71
+  }
72
+
73
+  function targetOnSuccess(e){
74
+    console.log('targetOnSuccess', e)
75
+    setTargetName(e)
76
+  }
77
+
78
+  function sealOnSuccess(e){
79
+    console.log('sealOnSuccess', e)
80
+  }
81
+
82
+  function handleSubmit (e) {
83
+    e.preventDefault();
84
+    props.form.validateFields((err, values) => {
85
+      if (!err){
86
+        request({ ...apis.taEcontract.addTaContractBusiness, data: { ...values },}).then((data) => {
87
+          message.info("保存成功")
88
+          router.push({
89
+            pathname: '/eContract/businessConfig/list',
90
+          });
91
+        }).catch((err) => {
92
+          message.info(err.msg || err.message)
93
+        })
94
+      }
95
+    });
96
+  }
97
+
98
+  const { getFieldDecorator } = props.form;
99
+
100
+  return (
101
+    <>
102
+      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
103
+        <Form.Item label="合同标题">
104
+          {getFieldDecorator('contractTemplateId', {
105
+            rules: [{ required: true, message: ' 请选择合同模板' }],
106
+          })(<SelectContractTemp  onSuccess={e => contractOnSuccess(e)}/>)}
107
+          {getFieldDecorator('contractTemplateName', {initialValue:contractTemplateName,
108
+            rules: [{ required: true, message: ' 请选择关联业务' }],
109
+          })(<Input  hidden={true}/>)}
110
+        </Form.Item>
111
+        <Form.Item label="合同文件">
112
+          {getFieldDecorator('contractTemplateId')}<Button type="danger" style={{marginRight:'20px'}} onClick={openIndexImg}>查看文件</Button>
113
+        </Form.Item>
114
+        <Form.Item label="关联业务类型"> 
115
+          {getFieldDecorator('targetType', {
116
+              rules: [{ required: true, message: '请选择发布状态' }],
117
+            })(<Select placeholder="关联业务类型" style={{ width: '400px' }}>
118
+            <Option value="raise">房源认筹</Option>
119
+          </Select>)}
120
+        </Form.Item>
121
+        <Form.Item label="关联业务">
122
+          {getFieldDecorator('targetId', {
123
+            rules: [{ required: true, message: ' 请选择关联业务' }],
124
+          })(<SelectRaise onSuccess={e => targetOnSuccess(e)}/>)}
125
+          {getFieldDecorator('targetName', {initialValue:targetName,
126
+            rules: [{ required: true, message: ' 请选择关联业务' }],
127
+          })(<Input  hidden={true}/>)}
128
+        </Form.Item>
129
+        <Form.Item label="甲方" help="系统会在业务需要时自动签所选企业印章,比如用户在签署认筹合同前系统会自动签署企业印章。">
130
+          {getFieldDecorator('companyId', {
131
+            rules: [{ required: true, message: ' 请选择关联企业' }],
132
+          })(<SelectCompany onSuccess={e => companyOnSuccess(e)}/>)}
133
+          {getFieldDecorator('companyName', {initialValue:companyName,
134
+            rules: [{ required: true, message: ' 请选择关联业务' }],
135
+          })(<Input  hidden={true}/>)}
136
+        </Form.Item>
137
+        <Form.Item label="甲方印章" >
138
+          {getFieldDecorator('sealId', {
139
+            rules: [{ required: true, message: ' 请选择企业印章' }],
140
+          })(<SelectSeal onSuccess={e => sealOnSuccess(e)}/>)}
141
+        </Form.Item>
142
+        <Form.Item label="甲方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
143
+          {getFieldDecorator('signatoryKeywords', {
144
+            rules: [{ required: true, message: '请输入甲方签章定位关键字' }],
145
+          })(<Input maxLength={20} style={{width:'400px'}}/>)}
146
+        </Form.Item>
147
+        <Form.Item label="甲方关键字签章策略"> 
148
+          {getFieldDecorator('signatoryStrategy', {
149
+              rules: [{ required: true, message: '请选择甲方关键字签章策略' }],
150
+            })(<Select placeholder="甲方关键字签章策略" style={{ width: '400px' }}>
151
+            <Option value="last">最后一个关键字签章</Option>
152
+            <Option value="all">所有关键字签章</Option>
153
+            <Option value="first">第一给关键字签章</Option>
154
+          </Select>)}
155
+        </Form.Item>
156
+        <Form.Item label="乙方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
157
+          {getFieldDecorator('customerKeywords', {
158
+            rules: [{ required: true, message: '请输入乙方签章定位关键字' }],
159
+          })(<Input maxLength={20} style={{width:'400px'}}/>)}
160
+        </Form.Item>
161
+        <Form.Item label="乙方关键字签章策略"> 
162
+          {getFieldDecorator('customerStrategy', {
163
+              rules: [{ required: true, message: '请选择乙方关键字签章策略' }],
164
+            })(<Select placeholder="乙方关键字签章策略" style={{ width: '400px' }}>
165
+            <Option value="last">最后一个关键字签章</Option>
166
+            <Option value="all">所有关键字签章</Option>
167
+            <Option value="first">第一给关键字签章</Option>
168
+          </Select>)}
169
+        </Form.Item>
170
+        <Form.Item label="发布状态"> 
171
+          {getFieldDecorator('status', {
172
+              rules: [{ required: true, message: '请选择发布状态' }],
173
+            })(<Select placeholder="发布状态" style={{ width: '400px' }}>
174
+            <Option value='0'>否</Option>
175
+            <Option value='1'>是</Option>
176
+          </Select>)}
177
+        </Form.Item>
178
+        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
179
+          <Button type="primary" htmlType="submit"style={{marginRight:'20px'}}>
180
+            确定
181
+          </Button>
182
+          <Button onClick={() => router.go(-1)}>
183
+            取消
184
+          </Button>
185
+        </Form.Item>
186
+      </Form>
187
+    </>
188
+  )
189
+}
190
+
191
+const WrappedHeader = Form.create({ name: 'header' })(header);
192
+
193
+export default WrappedHeader

+ 99
- 53
src/pages/eContract/businessConfig/components/SelectCompany.jsx 查看文件

@@ -1,11 +1,12 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col } from 'antd';
3
-import { apis, fetch } from '../../../../utils/request';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon } from 'antd';
3
+import request from '../../../../utils/request';
4
+import apis from '../../../../services/apis';
5
+import moment from 'moment';
4 6
 
5 7
 const { Column, ColumnGroup } = Table;
6
-const getH5List = fetch(apis.h5Activity.EffectiveList)
7 8
 const { Search } = Input;
8
-export default props => {
9
+const SelectContractTemp = props => {
9 10
   const {
10 11
     value,
11 12
     onChange,
@@ -14,43 +15,29 @@ export default props => {
14 15
 
15 16
   const [list, setList] = useState([]);
16 17
   const [visible, setVisible] = useState(false);
17
-  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
18
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '甲方企业' })
18 19
   const getGroupTitle = val => {
19
-    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
20
+    return (list.filter(x => x.companyId == val)[0] || {}).companyName || '请选择'
20 21
   }
21 22
   const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
22 23
 
23 24
   const buildingId = props.buildingId
24 25
 
25 26
   useEffect(() => {
26
-    getH5List({
27
-      params: {
28
-        pageNum: 1,
29
-        pageSize: 999,
30
-        isMiniapp: 1,
31
-        status: 1,
32
-        buildingId,
33
-      },
34
-    }).then(data => {
27
+    getList({ pageNum: 1, pageSize: 10 })
28
+  }, [buildingId]);
29
+
30
+  // 查询列表
31
+  const getList = (params) => {
32
+    request({ ...apis.taEcontract.taCompanyList, params: { ...params } }).then((data) => {
35 33
       setList(data.records || [])
36 34
 
37 35
       updateGroup(buildingId ? undefined : value);
38 36
     })
39
-  }, [buildingId]);
40
-  const searchH5 = (e) => {
41
-    getH5List({
42
-      params: {
43
-        pageNum: 1,
44
-        pageSize: 999,
45
-        isMiniapp: 1,
46
-        status: 1,
47
-        name: e
48
-      },
49
-    }).then(data => {
50
-      setList(data.records || [])
37
+  }
51 38
 
52
-      updateGroup(value ? undefined : value);
53
-    })
39
+  const searchContractTemp = (e) => {
40
+    getList({ pageNum: 1, pageSize: 10 })
54 41
   }
55 42
 
56 43
   if (value !== group.groupId) {
@@ -68,19 +55,61 @@ export default props => {
68 55
     props.onSuccess(val.name);
69 56
   }
70 57
 
58
+  // 提交事件
59
+  const handleSubmit = (e, props) => {
60
+    e.preventDefault();
61
+    e.stopPropagation();
62
+    props.form.validateFields((err, values) => {
63
+      if (!err) {
64
+        getList({ pageNum: 1, pageSize: 10, companyName: values.companyName, companyCode: values.companyCode })
65
+      }
66
+    });
67
+  }
68
+
69
+  //重置搜索
70
+  function handleReset () {
71
+    props.form.resetFields();
72
+  }
73
+
71 74
   const clearVal = val => {
72 75
     onChange(val)
73
-    setVisible(false)
74 76
   }
75 77
 
76 78
   const columns = [
77 79
     {
78
-      title: '标题',
79
-      dataIndex: 'name',
80
-      key: 'drainageId',
80
+      title: '企业名称',
81
+      dataIndex: 'companyName',
82
+      key: 'companyName',
83
+      align: 'center',
84
+      ellipsis: true,
85
+    },
86
+    {
87
+      title: '企业编号',
88
+      dataIndex: 'companyCode',
89
+      key: 'companyCode',
90
+      align: 'center',
91
+      ellipsis: true,
92
+    },
93
+    {
94
+      title: '实名认证状态',
95
+      dataIndex: 'certifiedStatus',
96
+      key: 'certifiedStatus',
97
+      align: 'center',
98
+      ellipsis: true,
99
+    },
100
+    {
101
+      title: '印章数',
102
+      dataIndex: 'sealNum',
103
+      key: 'sealNum',
104
+      align: 'center',
105
+      ellipsis: true,
106
+    },
107
+    {
108
+      title: '自动签章授权状态',
109
+      dataIndex: 'authorizeStatus',
110
+      key: 'authorizeStatus',
81 111
       align: 'center',
82 112
       ellipsis: true,
83
-      render: text => <a>{text}</a>,
84 113
     },
85 114
     {
86 115
       title: '操作',
@@ -88,40 +117,57 @@ export default props => {
88 117
       width: '20%',
89 118
       render: (text, record) => (
90 119
         <span>
91
-          <a onClick={() => setData({id:record.drainageId, name:record.name})} style={{ color: 'blue' }}>选择</a>
120
+          <a onClick={() => setData({id:record.companyId, name:record.companyName})} style={{ color: 'blue' }}>选择</a>
92 121
         </span>
93 122
       ),
94 123
     },
95 124
   ];
96 125
 
126
+  const { getFieldDecorator } = props.form
127
+
97 128
   return (
98 129
     <div>
99 130
       <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择关联企业</a></div>
100 131
       <Modal
101
-        title="选择"
132
+        title="选择关联企业"
102 133
         visible={visible}
103 134
         onCancel={() => setVisible(false)}
104 135
         footer={[]}
136
+        width={900}
105 137
       >
106
-        <Row>
107
-          <Col span={18}>
108
-            <Search
109
-              placeholder="请输入标题"
110
-              enterButton="搜索"
111
-              size="default"
112
-              allowClear="true"
113
-              onSearch={value => searchH5(value)}
114
-              style={{ marginBottom: '16px' }}
115
-            />
116
-          </Col>
117
-          <Col span={4} offset={1}>
118
-            <Button type="primary" onClick={()=>clearVal('')}>重置</Button>
119
-          </Col>
120
-        </Row>
121
-
122
-        <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
138
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
139
+        <Form.Item>
140
+          {getFieldDecorator('companyName')(
141
+            <Input
142
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
143
+            placeholder="企业名称"
144
+          />,
145
+          )}
146
+        </Form.Item>
147
+        <Form.Item>
148
+          {getFieldDecorator('companyCode')(
149
+            <Input
150
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
151
+            placeholder="企业编号"
152
+          />,
153
+          )}
154
+        </Form.Item>
155
+        <Form.Item>
156
+          <Button type="primary" htmlType="submit" >
157
+                 搜索
158
+          </Button>
159
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
160
+                 重置
161
+          </Button>     
162
+        </Form.Item>
163
+      </Form>
164
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
123 165
 
124 166
       </Modal>
125 167
     </div>
126 168
   )
127 169
 }
170
+
171
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
172
+
173
+export default WrappedHeader

+ 77
- 53
src/pages/eContract/businessConfig/components/SelectContractTemp.jsx 查看文件

@@ -1,11 +1,12 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col } from 'antd';
3
-import { apis, fetch } from '../../../../utils/request';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon } from 'antd';
3
+import request from '../../../../utils/request';
4
+import apis from '../../../../services/apis';
5
+import moment from 'moment';
4 6
 
5 7
 const { Column, ColumnGroup } = Table;
6
-const getH5List = fetch(apis.h5Activity.EffectiveList)
7 8
 const { Search } = Input;
8
-export default props => {
9
+const SelectContractTemp = props => {
9 10
   const {
10 11
     value,
11 12
     onChange,
@@ -16,41 +17,27 @@ export default props => {
16 17
   const [visible, setVisible] = useState(false);
17 18
   const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
18 19
   const getGroupTitle = val => {
19
-    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
20
+    return (list.filter(x => x.contractTemplateId == val)[0] || {}).contractTemplateName || '请选择'
20 21
   }
21 22
   const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
22 23
 
23 24
   const buildingId = props.buildingId
24 25
 
25 26
   useEffect(() => {
26
-    getH5List({
27
-      params: {
28
-        pageNum: 1,
29
-        pageSize: 999,
30
-        isMiniapp: 1,
31
-        status: 1,
32
-        buildingId,
33
-      },
34
-    }).then(data => {
27
+    getList({ pageNum: 1, pageSize: 10 })
28
+  }, [buildingId]);
29
+
30
+  // 查询列表
31
+  const getList = (params) => {
32
+    request({ ...apis.taEcontract.taContractTemplateList, params: { ...params } }).then((data) => {
35 33
       setList(data.records || [])
36 34
 
37 35
       updateGroup(buildingId ? undefined : value);
38 36
     })
39
-  }, [buildingId]);
40
-  const searchH5 = (e) => {
41
-    getH5List({
42
-      params: {
43
-        pageNum: 1,
44
-        pageSize: 999,
45
-        isMiniapp: 1,
46
-        status: 1,
47
-        name: e
48
-      },
49
-    }).then(data => {
50
-      setList(data.records || [])
37
+  }
51 38
 
52
-      updateGroup(value ? undefined : value);
53
-    })
39
+  const searchContractTemp = (e) => {
40
+    getList({ pageNum: 1, pageSize: 10 })
54 41
   }
55 42
 
56 43
   if (value !== group.groupId) {
@@ -65,22 +52,51 @@ export default props => {
65 52
     updateGroup(val.id)
66 53
     onChange(val.id)
67 54
     setVisible(false)
68
-    props.onSuccess(val.name);
55
+    props.onSuccess(val);
56
+  }
57
+
58
+  // 提交事件
59
+  const handleSubmit = (e, props) => {
60
+    e.preventDefault();
61
+    e.stopPropagation();
62
+    props.form.validateFields((err, values) => {
63
+      if (!err) {
64
+        getList({ pageNum: 1, pageSize: 10, contractTemplateName:values.contractTemplateName })
65
+      }
66
+    });
67
+  }
68
+
69
+  //重置搜索
70
+  function handleReset () {
71
+    props.form.resetFields();
69 72
   }
70 73
 
71 74
   const clearVal = val => {
72 75
     onChange(val)
73
-    setVisible(false)
74 76
   }
75 77
 
76 78
   const columns = [
77 79
     {
78
-      title: '标题',
79
-      dataIndex: 'name',
80
-      key: 'drainageId',
80
+      title: '合同编号',
81
+      dataIndex: 'contractTemplateId',
82
+      key: 'contractTemplateId',
81 83
       align: 'center',
82 84
       ellipsis: true,
83
-      render: text => <a>{text}</a>,
85
+    },
86
+    {
87
+      title: '合同标题',
88
+      dataIndex: 'contractTemplateName',
89
+      key: 'contractTemplateName',
90
+      align: 'center',
91
+      ellipsis: true,
92
+    },
93
+    {
94
+      title: '新增时间',
95
+      dataIndex: 'createDate',
96
+      key: 'createDate',
97
+      align: 'center',
98
+      ellipsis: true,
99
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
84 100
     },
85 101
     {
86 102
       title: '操作',
@@ -88,40 +104,48 @@ export default props => {
88 104
       width: '20%',
89 105
       render: (text, record) => (
90 106
         <span>
91
-          <a onClick={() => setData({id:record.drainageId, name:record.name})} style={{ color: 'blue' }}>选择</a>
107
+          <a onClick={() => setData({id:record.contractTemplateId, name:record.contractTemplateName})} style={{ color: 'blue' }}>选择</a>
92 108
         </span>
93 109
       ),
94 110
     },
95 111
   ];
96 112
 
113
+  const { getFieldDecorator } = props.form
114
+
97 115
   return (
98 116
     <div>
99 117
       <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择合同模板</a></div>
100 118
       <Modal
101
-        title="选择"
119
+        title="选择合同模板"
102 120
         visible={visible}
103 121
         onCancel={() => setVisible(false)}
104 122
         footer={[]}
105 123
       >
106
-        <Row>
107
-          <Col span={18}>
108
-            <Search
109
-              placeholder="请输入标题"
110
-              enterButton="搜索"
111
-              size="default"
112
-              allowClear="true"
113
-              onSearch={value => searchH5(value)}
114
-              style={{ marginBottom: '16px' }}
115
-            />
116
-          </Col>
117
-          <Col span={4} offset={1}>
118
-            <Button type="primary" onClick={()=>clearVal('')}>重置</Button>
119
-          </Col>
120
-        </Row>
121
-
122
-        <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
124
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
125
+        <Form.Item>
126
+          {getFieldDecorator('contractTemplateName')(
127
+            <Input
128
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
129
+            placeholder="合同标题"
130
+          />,
131
+          )}
132
+        </Form.Item>
133
+        <Form.Item>
134
+          <Button type="primary" htmlType="submit" >
135
+                 搜索
136
+          </Button>
137
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
138
+                 重置
139
+          </Button>     
140
+        </Form.Item>
141
+      </Form>
142
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
123 143
 
124 144
       </Modal>
125 145
     </div>
126 146
   )
127 147
 }
148
+
149
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
150
+
151
+export default WrappedHeader

+ 103
- 54
src/pages/eContract/businessConfig/components/SelectRaise.jsx 查看文件

@@ -1,11 +1,13 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col } from 'antd';
3
-import { apis, fetch } from '../../../../utils/request';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon } from 'antd';
3
+import request from '../../../../utils/request';
4
+import apis from '../../../../services/apis';
5
+import BuildSelect from '../../../../components/SelectButton/BuildSelect'
6
+import moment from 'moment';
4 7
 
5 8
 const { Column, ColumnGroup } = Table;
6
-const getH5List = fetch(apis.h5Activity.EffectiveList)
7 9
 const { Search } = Input;
8
-export default props => {
10
+const SelectContractTemp = props => {
9 11
   const {
10 12
     value,
11 13
     onChange,
@@ -14,43 +16,29 @@ export default props => {
14 16
 
15 17
   const [list, setList] = useState([]);
16 18
   const [visible, setVisible] = useState(false);
17
-  const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
19
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '关联业务' })
18 20
   const getGroupTitle = val => {
19
-    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
21
+    return (list.filter(x => x.raiseId == val)[0] || {}).salesBatchName || '请选择'
20 22
   }
21 23
   const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
22 24
 
23 25
   const buildingId = props.buildingId
24 26
 
25 27
   useEffect(() => {
26
-    getH5List({
27
-      params: {
28
-        pageNum: 1,
29
-        pageSize: 999,
30
-        isMiniapp: 1,
31
-        status: 1,
32
-        buildingId,
33
-      },
34
-    }).then(data => {
28
+    getList({ pageNum: 1, pageSize: 10 })
29
+  }, [buildingId]);
30
+
31
+  // 查询列表
32
+  const getList = (params) => {
33
+    request({ ...apis.house.taRaiseList, params: { ...params } }).then((data) => {
35 34
       setList(data.records || [])
36 35
 
37 36
       updateGroup(buildingId ? undefined : value);
38 37
     })
39
-  }, [buildingId]);
40
-  const searchH5 = (e) => {
41
-    getH5List({
42
-      params: {
43
-        pageNum: 1,
44
-        pageSize: 999,
45
-        isMiniapp: 1,
46
-        status: 1,
47
-        name: e
48
-      },
49
-    }).then(data => {
50
-      setList(data.records || [])
38
+  }
51 39
 
52
-      updateGroup(value ? undefined : value);
53
-    })
40
+  const searchContractTemp = (e) => {
41
+    getList({ pageNum: 1, pageSize: 10 })
54 42
   }
55 43
 
56 44
   if (value !== group.groupId) {
@@ -68,19 +56,66 @@ export default props => {
68 56
     props.onSuccess(val.name);
69 57
   }
70 58
 
59
+  // 提交事件
60
+  const handleSubmit = (e, props) => {
61
+    e.preventDefault();
62
+    e.stopPropagation();
63
+    props.form.validateFields((err, values) => {
64
+      if (!err) {
65
+        getList({ pageNum: 1, pageSize: 10, buildingId:values.buildingId, salesBatchName:values.salesBatchName })
66
+      }
67
+    });
68
+  }
69
+
70
+  //重置搜索
71
+  function handleReset () {
72
+    props.form.resetFields();
73
+  }
74
+
71 75
   const clearVal = val => {
72 76
     onChange(val)
73
-    setVisible(false)
74 77
   }
75 78
 
76 79
   const columns = [
77 80
     {
78
-      title: '标题',
79
-      dataIndex: 'name',
80
-      key: 'drainageId',
81
+      title: '销售批次名',
82
+      dataIndex: 'salesBatchName',
83
+      key: 'salesBatchName',
81 84
       align: 'center',
82
-      ellipsis: true,
83
-      render: text => <a>{text}</a>,
85
+    },
86
+    {
87
+      title: '楼盘名称',
88
+      dataIndex: 'buildingName',
89
+      key: 'buildingName',
90
+      align: 'center',
91
+    },
92
+    {
93
+      title: '认筹开始时间',
94
+      dataIndex: 'raiseStartTime',
95
+      key: 'raiseStartTime',
96
+      align: 'center',
97
+      render: (x, row) => <><span>{`${moment(row.raiseStartTime).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
98
+    },
99
+    {
100
+      title: '认筹结束时间',
101
+      dataIndex: 'raiseEndTime',
102
+      key: 'raiseEndTime',
103
+      align: 'center',
104
+      render: (x, row) => <><span>{`${moment(row.raiseEndTime).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
105
+    },
106
+    {
107
+      title: '锁房方式',
108
+      dataIndex: 'houseLockingType',
109
+      key: 'houseLockingType',
110
+      align: 'center',
111
+      render: (x, row) => <><span>{row.houseLockingType == 'auto' ? "自动锁房" : "手动锁房"}</span></>,
112
+    },
113
+    {
114
+      title: '缴费方式',
115
+      dataIndex: 'payType',
116
+      key: 'payType',
117
+      align: 'center',
118
+      render: (x, row) => <><span>{row.payType == 'offLine' ? "线下缴费" : row.payType == 'onLine' ? "线上缴费" : "线上缴费,线下缴费"}</span></>,
84 119
     },
85 120
     {
86 121
       title: '操作',
@@ -88,40 +123,54 @@ export default props => {
88 123
       width: '20%',
89 124
       render: (text, record) => (
90 125
         <span>
91
-          <a onClick={() => setData({id:record.drainageId, name:record.name})} style={{ color: 'blue' }}>选择</a>
126
+          <a onClick={() => setData({id:record.raiseId, name:record.salesBatchName})} style={{ color: 'blue' }}>选择</a>
92 127
         </span>
93 128
       ),
94 129
     },
95 130
   ];
96 131
 
132
+  const { getFieldDecorator } = props.form
133
+
97 134
   return (
98 135
     <div>
99 136
       <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择关联业务</a></div>
100 137
       <Modal
101
-        title="选择"
138
+        title="选择关联业务"
102 139
         visible={visible}
103 140
         onCancel={() => setVisible(false)}
104 141
         footer={[]}
142
+        width={900}
105 143
       >
106
-        <Row>
107
-          <Col span={18}>
108
-            <Search
109
-              placeholder="请输入标题"
110
-              enterButton="搜索"
111
-              size="default"
112
-              allowClear="true"
113
-              onSearch={value => searchH5(value)}
114
-              style={{ marginBottom: '16px' }}
115
-            />
116
-          </Col>
117
-          <Col span={4} offset={1}>
118
-            <Button type="primary" onClick={()=>clearVal('')}>重置</Button>
119
-          </Col>
120
-        </Row>
121
-
122
-        <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
144
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
145
+        <Form.Item>
146
+          {getFieldDecorator('buildingId')(
147
+            <BuildSelect />,
148
+          )}
149
+        </Form.Item>
150
+        <Form.Item>
151
+          {getFieldDecorator('salesBatchName')(
152
+            <Input
153
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
154
+            placeholder="销售批次名"
155
+          />,
156
+          )}
157
+        </Form.Item>
158
+        <Form.Item>
159
+          <Button type="primary" htmlType="submit" >
160
+                 搜索
161
+          </Button>
162
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
163
+                 重置
164
+          </Button>     
165
+        </Form.Item>
166
+      </Form>
167
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
123 168
 
124 169
       </Modal>
125 170
     </div>
126 171
   )
127 172
 }
173
+
174
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
175
+
176
+export default WrappedHeader

+ 89
- 53
src/pages/eContract/businessConfig/components/SelectSeal.jsx 查看文件

@@ -1,11 +1,12 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col } from 'antd';
3
-import { apis, fetch } from '../../../../utils/request';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col,Icon, Avatar } from 'antd';
3
+import request from '../../../../utils/request';
4
+import apis from '../../../../services/apis';
5
+import moment from 'moment';
4 6
 
5 7
 const { Column, ColumnGroup } = Table;
6
-const getH5List = fetch(apis.h5Activity.EffectiveList)
7 8
 const { Search } = Input;
8
-export default props => {
9
+const SelectContractTemp = props => {
9 10
   const {
10 11
     value,
11 12
     onChange,
@@ -16,41 +17,27 @@ export default props => {
16 17
   const [visible, setVisible] = useState(false);
17 18
   const [group, setGroup] = useState({ groupId: undefined, groupName: '合同标题' })
18 19
   const getGroupTitle = val => {
19
-    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
20
+    return (list.filter(x => x.sealId == val)[0] || {}).sealImg || '请选择'
20 21
   }
21 22
   const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
22 23
 
23 24
   const buildingId = props.buildingId
24 25
 
25 26
   useEffect(() => {
26
-    getH5List({
27
-      params: {
28
-        pageNum: 1,
29
-        pageSize: 999,
30
-        isMiniapp: 1,
31
-        status: 1,
32
-        buildingId,
33
-      },
34
-    }).then(data => {
27
+    getList({ pageNum: 1, pageSize: 10 })
28
+  }, [buildingId]);
29
+
30
+  // 查询列表
31
+  const getList = (params) => {
32
+    request({ ...apis.taEcontract.taCompanySealList, params: { ...params } }).then((data) => {
35 33
       setList(data.records || [])
36 34
 
37 35
       updateGroup(buildingId ? undefined : value);
38 36
     })
39
-  }, [buildingId]);
40
-  const searchH5 = (e) => {
41
-    getH5List({
42
-      params: {
43
-        pageNum: 1,
44
-        pageSize: 999,
45
-        isMiniapp: 1,
46
-        status: 1,
47
-        name: e
48
-      },
49
-    }).then(data => {
50
-      setList(data.records || [])
37
+  }
51 38
 
52
-      updateGroup(value ? undefined : value);
53
-    })
39
+  const searchContractTemp = (e) => {
40
+    getList({ pageNum: 1, pageSize: 10 })
54 41
   }
55 42
 
56 43
   if (value !== group.groupId) {
@@ -68,19 +55,56 @@ export default props => {
68 55
     props.onSuccess(val.name);
69 56
   }
70 57
 
58
+  // 提交事件
59
+  const handleSubmit = (e, props) => {
60
+    e.preventDefault();
61
+    e.stopPropagation();
62
+    props.form.validateFields((err, values) => {
63
+      if (!err) {
64
+        getList({ pageNum: 1, pageSize: 10, sealName:values.sealName })
65
+      }
66
+    });
67
+  }
68
+
69
+  //重置搜索
70
+  function handleReset () {
71
+    props.form.resetFields();
72
+  }
73
+
71 74
   const clearVal = val => {
72 75
     onChange(val)
73
-    setVisible(false)
74 76
   }
75 77
 
76 78
   const columns = [
77 79
     {
78
-      title: '标题',
79
-      dataIndex: 'name',
80
-      key: 'drainageId',
80
+      title: '印章编号',
81
+      dataIndex: 'sealId',
82
+      key: 'sealId',
83
+      align: 'center',
84
+      ellipsis: true,
85
+    },
86
+    {
87
+      title: '印章名称',
88
+      dataIndex: 'sealName',
89
+      key: 'sealName',
81 90
       align: 'center',
82 91
       ellipsis: true,
83
-      render: text => <a>{text}</a>,
92
+    },
93
+    {
94
+      title: '印章图',
95
+      dataIndex: 'sealImg',
96
+      key: 'sealImg',
97
+      align: 'center',
98
+      ellipsis: true,
99
+      render: (_, record) => <Avatar shape="square" style={{color: 'blue',cursor: 'pointer'}} src={record.sealImg} size={64} icon="user" />,
100
+    },
101
+    {
102
+      title: '印章上传时间',
103
+      dataIndex: 'createDate',
104
+      key: 'createDate',
105
+      align: 'center',
106
+      ellipsis: true,
107
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
84 108
     },
85 109
     {
86 110
       title: '操作',
@@ -88,40 +112,52 @@ export default props => {
88 112
       width: '20%',
89 113
       render: (text, record) => (
90 114
         <span>
91
-          <a onClick={() => setData({id:record.drainageId, name:record.name})} style={{ color: 'blue' }}>选择</a>
115
+          <a onClick={() => setData({id:record.sealId, name:record.sealName})} style={{ color: 'blue' }}>选择</a>
92 116
         </span>
93 117
       ),
94 118
     },
95 119
   ];
96 120
 
121
+  const { getFieldDecorator } = props.form
122
+
97 123
   return (
98 124
     <div>
99
-      <div>{group.groupName}<a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择企业印章</a></div>
125
+      <div>
126
+        <Avatar shape="square" style={{color: 'blue',cursor: 'pointer'}} src={group.groupName} size={54} icon="user" />
127
+        <a style={{marginLeft:'30px', color: 'blue' }} onClick={() => setVisible(true)}>选择企业印章</a>
128
+      </div>
100 129
       <Modal
101
-        title="请选择"
130
+        title="选择企业印章"
102 131
         visible={visible}
103 132
         onCancel={() => setVisible(false)}
104 133
         footer={[]}
134
+        width={900}
105 135
       >
106
-        <Row>
107
-          <Col span={18}>
108
-            <Search
109
-              placeholder="请输入标题"
110
-              enterButton="搜索"
111
-              size="default"
112
-              allowClear="true"
113
-              onSearch={value => searchH5(value)}
114
-              style={{ marginBottom: '16px' }}
115
-            />
116
-          </Col>
117
-          <Col span={4} offset={1}>
118
-            <Button type="primary" onClick={()=>clearVal('')}>重置</Button>
119
-          </Col>
120
-        </Row>
121
-
122
-        <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
136
+        <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
137
+        <Form.Item>
138
+          {getFieldDecorator('sealName')(
139
+            <Input
140
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
141
+            placeholder="印章名称"
142
+          />,
143
+          )}
144
+        </Form.Item>
145
+        <Form.Item>
146
+          <Button type="primary" htmlType="submit" >
147
+                 搜索
148
+          </Button>
149
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
150
+                 重置
151
+          </Button>     
152
+        </Form.Item>
153
+      </Form>
154
+      <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
123 155
 
124 156
       </Modal>
125 157
     </div>
126 158
   )
127 159
 }
160
+
161
+const WrappedHeader = Form.create({ name: 'SelectContractTemp' })(SelectContractTemp);
162
+
163
+export default WrappedHeader

+ 50
- 29
src/pages/eContract/businessConfig/detail.jsx 查看文件

@@ -20,28 +20,46 @@ import SelectSeal from './components/SelectSeal';
20 20
 const { Option } = Select;
21 21
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
22 22
 
23
-let cityId = ''
24 23
 
25 24
 const header = props => {
26
-  const { salesBatchId } = props.location.query
27
-  const [ saleBatchData, setSaleBatchData ] = useState({})
28
-  const [showHelp, setShowHelp] = useState(false)
25
+  const contractBusinessId = props.location.query.id
26
+  const [ contractBusinessData, setContractBusinessData ] = useState({})
29 27
 
30 28
   const [targetName, setTargetName] = useState({})
31 29
   const [companyName, setCompanyName] = useState({})
32 30
   const [contractTemplateName, setContractTemplateName] = useState({})
33
-  // const [targetName, setTargetName] = useState({})
31
+  const [contractTemplateLink, setContractTemplateLink] = useState('')
32
+
33
+  if(contractBusinessId){
34
+    useEffect(() => {
35
+      getContractBusinessData(contractBusinessId);
36
+    },[])
37
+
38
+  // 查询列表
39
+  const getContractBusinessData = (contractBusinessId) => {
40
+    request({ ...apis.taEcontract.taContractBusinessById, urlData: {id: contractBusinessId} }).then((data) => {
41
+        setContractBusinessData(data)
42
+        request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: data.contractTemplateId} }).then((data) => {
43
+          setContractTemplateLink(data.contractTemplateAddress)
44
+        })
45
+    }) 
46
+  }
47
+  }
48
+
34 49
 
35 50
   const cancelPage = () =>{
36 51
     router.push({
37
-      pathname: '/activity/liveActivity/list',
52
+      pathname: '/eContract/businessConfig/list',
38 53
     });
39 54
   }
40 55
 
41 56
    //打开新页面
42 57
    const openIndexImg = () => {
43
-    const newWin=window.open('about:blank');
44
-    newWin.location.href="http://njcj.oss-cn-shanghai.aliyuncs.com/%E6%95%99%E7%A8%8B.png"
58
+     if(contractTemplateLink){
59
+      window.open(contractTemplateLink);
60
+     }else{
61
+       message.info('请选择合同模板');
62
+     }
45 63
   }
46 64
 
47 65
   function highlightsTypeChange(e) {
@@ -49,7 +67,6 @@ const header = props => {
49 67
   }
50 68
 
51 69
   function disabledDate(current) {
52
-    // Can not select days before today and today
53 70
     return current && current < moment().endOf('day');
54 71
   }
55 72
 
@@ -60,7 +77,11 @@ const header = props => {
60 77
 
61 78
   function contractOnSuccess(e){
62 79
     console.log('contractOnSuccess', e)
63
-    setContractTemplateName(e)
80
+    setContractTemplateName(e.name)
81
+    request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: e.id} }).then((data) => {
82
+      setContractTemplateLink(data.contractTemplateAddress)
83
+      console.log(contractTemplateLink,'dddddddddd')
84
+    })
64 85
   }
65 86
 
66 87
   function targetOnSuccess(e){
@@ -76,10 +97,10 @@ const header = props => {
76 97
     e.preventDefault();
77 98
     props.form.validateFields((err, values) => {
78 99
       if (!err){
79
-        request({ ...apis.taEcontract.addTaContractBusiness, data: { ...values },}).then((data) => {
100
+        request({ ...apis.taEcontract.updateTaContractBusinessById, urlData: {id: contractBusinessId}, data: { ...values },}).then((data) => {
80 101
           message.info("保存成功")
81 102
           router.push({
82
-            pathname: '/activity/liveActivity/list/index',
103
+            pathname: '/eContract/businessConfig/list',
83 104
           });
84 105
         }).catch((err) => {
85 106
           message.info(err.msg || err.message)
@@ -94,10 +115,10 @@ const header = props => {
94 115
     <>
95 116
       <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
96 117
         <Form.Item label="合同标题">
97
-          {getFieldDecorator('contractTemplateId', {
118
+          {getFieldDecorator('contractTemplateId', {initialValue:contractBusinessData.contractTemplateId,
98 119
             rules: [{ required: true, message: ' 请选择合同模板' }],
99 120
           })(<SelectContractTemp  onSuccess={e => contractOnSuccess(e)}/>)}
100
-          {getFieldDecorator('contractTemplateName', {initialValue:contractTemplateName,
121
+          {getFieldDecorator('contractTemplateName', {initialValue:contractBusinessData.contractTemplateName,
101 122
             rules: [{ required: true, message: ' 请选择关联业务' }],
102 123
           })(<Input  hidden={true}/>)}
103 124
         </Form.Item>
@@ -105,40 +126,40 @@ const header = props => {
105 126
           {getFieldDecorator('contractTemplateId')}<Button type="danger" style={{marginRight:'20px'}} onClick={openIndexImg}>查看文件</Button>
106 127
         </Form.Item>
107 128
         <Form.Item label="关联业务类型"> 
108
-          {getFieldDecorator('targetType', {
129
+          {getFieldDecorator('targetType', {initialValue:contractBusinessData.targetType,
109 130
               rules: [{ required: true, message: '请选择发布状态' }],
110 131
             })(<Select placeholder="关联业务类型" style={{ width: '400px' }}>
111 132
             <Option value="raise">房源认筹</Option>
112 133
           </Select>)}
113 134
         </Form.Item>
114 135
         <Form.Item label="关联业务">
115
-          {getFieldDecorator('targetId', {
136
+          {getFieldDecorator('targetId', {initialValue:contractBusinessData.targetId,
116 137
             rules: [{ required: true, message: ' 请选择关联业务' }],
117 138
           })(<SelectRaise onSuccess={e => targetOnSuccess(e)}/>)}
118
-          {getFieldDecorator('targetName', {initialValue:targetName,
139
+          {getFieldDecorator('targetName', {initialValue:contractBusinessData.targetName,
119 140
             rules: [{ required: true, message: ' 请选择关联业务' }],
120 141
           })(<Input  hidden={true}/>)}
121 142
         </Form.Item>
122 143
         <Form.Item label="甲方" help="系统会在业务需要时自动签所选企业印章,比如用户在签署认筹合同前系统会自动签署企业印章。">
123
-          {getFieldDecorator('companyId', {
144
+          {getFieldDecorator('companyId', {initialValue:contractBusinessData.companyId,
124 145
             rules: [{ required: true, message: ' 请选择关联企业' }],
125 146
           })(<SelectCompany onSuccess={e => companyOnSuccess(e)}/>)}
126
-          {getFieldDecorator('companyName', {initialValue:companyName,
147
+          {getFieldDecorator('companyName', {initialValue:contractBusinessData.companyName,
127 148
             rules: [{ required: true, message: ' 请选择关联业务' }],
128 149
           })(<Input  hidden={true}/>)}
129 150
         </Form.Item>
130 151
         <Form.Item label="甲方印章" >
131
-          {getFieldDecorator('sealId', {
152
+          {getFieldDecorator('sealId', {initialValue:contractBusinessData.sealId,
132 153
             rules: [{ required: true, message: ' 请选择企业印章' }],
133 154
           })(<SelectSeal onSuccess={e => sealOnSuccess(e)}/>)}
134 155
         </Form.Item>
135 156
         <Form.Item label="甲方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
136
-          {getFieldDecorator('signatoryKeywords', {
157
+          {getFieldDecorator('signatoryKeywords', {initialValue:contractBusinessData.signatoryKeywords,
137 158
             rules: [{ required: true, message: '请输入甲方签章定位关键字' }],
138 159
           })(<Input maxLength={20} style={{width:'400px'}}/>)}
139 160
         </Form.Item>
140 161
         <Form.Item label="甲方关键字签章策略"> 
141
-          {getFieldDecorator('signatoryStrategy', {
162
+          {getFieldDecorator('signatoryStrategy', {initialValue:contractBusinessData.signatoryStrategy,
142 163
               rules: [{ required: true, message: '请选择甲方关键字签章策略' }],
143 164
             })(<Select placeholder="甲方关键字签章策略" style={{ width: '400px' }}>
144 165
             <Option value="last">最后一个关键字签章</Option>
@@ -147,12 +168,12 @@ const header = props => {
147 168
           </Select>)}
148 169
         </Form.Item>
149 170
         <Form.Item label="乙方签章定位关键字" help="关键字为合同文件中的文字内容(能被ctrl+f 查找功能检索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均可能会盖上指定用户的电子章,建议关键字在合同中保持唯一。">
150
-          {getFieldDecorator('customerKeywords', {
171
+          {getFieldDecorator('customerKeywords', {initialValue:contractBusinessData.customerKeywords,
151 172
             rules: [{ required: true, message: '请输入乙方签章定位关键字' }],
152 173
           })(<Input maxLength={20} style={{width:'400px'}}/>)}
153 174
         </Form.Item>
154 175
         <Form.Item label="乙方关键字签章策略"> 
155
-          {getFieldDecorator('customerStrategy', {
176
+          {getFieldDecorator('customerStrategy', {initialValue:contractBusinessData.customerStrategy,
156 177
               rules: [{ required: true, message: '请选择乙方关键字签章策略' }],
157 178
             })(<Select placeholder="乙方关键字签章策略" style={{ width: '400px' }}>
158 179
             <Option value="last">最后一个关键字签章</Option>
@@ -160,12 +181,12 @@ const header = props => {
160 181
             <Option value="first">第一给关键字签章</Option>
161 182
           </Select>)}
162 183
         </Form.Item>
163
-        <Form.Item label="发布状态"> 
164
-          {getFieldDecorator('status', {
184
+        <Form.Item label="发布状态">
185
+          {getFieldDecorator('status', {initialValue:contractBusinessData.status,
165 186
               rules: [{ required: true, message: '请选择发布状态' }],
166
-            })(<Select placeholder="发布状态" style={{ width: '400px' }}>
167
-            <Option value='0'>否</Option>
168
-            <Option value='1'>是</Option>
187
+            })(<Select placeholder="发布状态" style={{ width: '300px' }}>
188
+            <Option value={0}>否</Option>
189
+            <Option value={1}>是</Option>
169 190
           </Select>)}
170 191
         </Form.Item>
171 192
         <Form.Item wrapperCol={{ span: 15, offset: 7 }}>

+ 7
- 5
src/pages/eContract/businessConfig/list.jsx 查看文件

@@ -46,7 +46,7 @@ const header = props => {
46 46
       router.push({
47 47
       pathname: '/eContract/businessConfig/detail',
48 48
       query: {
49
-        id: rowData.demandId,
49
+        id: rowData.contractBusinessId,
50 50
       },
51 51
     });
52 52
       return
@@ -72,7 +72,7 @@ const header = props => {
72 72
       dataIndex: 'targetType',
73 73
       key: 'targetType',
74 74
       align: 'center',
75
-      
75
+      render: (x, row) => <><span>{row.targetType === 'raise' ? '房源认筹' : ''}</span></>
76 76
     },
77 77
     {
78 78
       title: '关联业务标题',
@@ -162,8 +162,10 @@ const header = props => {
162 162
     }
163 163
   }
164 164
 
165
-  function addDemandInfo(e){
166
-    setAddDemand(e);
165
+  function addContractManage(){
166
+    router.push({
167
+      pathname: '/eContract/businessConfig/add',
168
+    });
167 169
   }
168 170
 
169 171
   const { getFieldDecorator } = props.form
@@ -227,7 +229,7 @@ const header = props => {
227 229
         </Form.Item>
228 230
       </Form>
229 231
       <AuthButton name="admin.h5Demand.add.post" noRight={null}>
230
-        <Button type="danger" onClick={() => addDemandInfo({visable:true})} className={styles.addBtn}>新增</Button>
232
+        <Button type="danger" onClick={() => addContractManage()} className={styles.addBtn}>新增</Button>
231 233
       </AuthButton>
232 234
       <AuthButton name="admin.h5Demand.del" noRight={null}>
233 235
         <Button type="primary" onClick={() => showBatchDel({visable:true, demandIds: demandIds})} className={styles.addBtn} style={{marginLeft:'30px'}}>删除</Button>

+ 0
- 0
src/pages/eContract/template/pdfDetail.jsx 查看文件


+ 25
- 1
src/services/apis.js 查看文件

@@ -1502,6 +1502,30 @@ export default {
1502 1502
       url: `${prefix}/taContractTemplate/:id`,
1503 1503
       action: 'admin.getContractTemplate.get',
1504 1504
     },
1505
-    
1505
+    listContractTemplate: {
1506
+      method: 'GET',
1507
+      url: `${prefix}/taContractTemplate`,
1508
+      action: 'admin.listContractTemplate.get',
1509
+    },
1510
+    addContractTemplate: {
1511
+      method: 'post',
1512
+      url: `${prefix}/contract/template/add`,
1513
+      action: 'admin.addContractTemplate.post',
1514
+    },
1515
+    batchDeleteContractTemplate: {
1516
+      method: 'put',
1517
+      url: `${prefix}/contract/template/batchDelete`,
1518
+      action: 'admin.batchDeleteContractTemplate.put',
1519
+    },
1520
+    updateContractTemplate: {
1521
+      method: 'put',
1522
+      url: `${prefix}/contract/template/update/:id`,
1523
+      action: 'admin.updateContractTemplate.put',
1524
+    },
1525
+    getContractTemplate: {
1526
+      method: 'get',
1527
+      url: `${prefix}/taContractTemplate/:id`,
1528
+      action: 'admin.getContractTemplate.get',
1529
+    },
1506 1530
   },
1507 1531
 }