魏超 5 years ago
parent
commit
3340bb9520

+ 9
- 8
src/pages/eContract/businessConfig/add.jsx View File

21
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
21
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
22
 
22
 
23
 let cityId = ''
23
 let cityId = ''
24
+let contractTemplateName = ''
25
+let targetName = ''
24
 
26
 
25
 const header = props => {
27
 const header = props => {
26
   const { salesBatchId } = props.location.query
28
   const { salesBatchId } = props.location.query
27
   const [ saleBatchData, setSaleBatchData ] = useState({})
29
   const [ saleBatchData, setSaleBatchData ] = useState({})
28
   const [showHelp, setShowHelp] = useState(false)
30
   const [showHelp, setShowHelp] = useState(false)
29
 
31
 
30
-  const [targetName, setTargetName] = useState({})
32
+  // const [targetName, setTargetName] = useState({})
31
   const [companyName, setCompanyName] = useState({})
33
   const [companyName, setCompanyName] = useState({})
32
-  const [contractTemplateName, setContractTemplateName] = useState('')
34
+  // const [contractTemplateName, setContractTemplateName] = useState('')
33
   const [contractTemplateLink, setContractTemplateLink] = useState('')
35
   const [contractTemplateLink, setContractTemplateLink] = useState('')
34
 
36
 
35
   const cancelPage = () =>{
37
   const cancelPage = () =>{
62
   }
64
   }
63
 
65
 
64
   function contractOnSuccess(e){
66
   function contractOnSuccess(e){
65
-    console.log('contractOnSuccess', e)
66
-    setContractTemplateName(e.name)
67
+    contractTemplateName = e.name
67
     request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: e.id} }).then((data) => {
68
     request({ ...apis.taEcontract.taContractTemplateById, urlData: {id: e.id} }).then((data) => {
68
       setContractTemplateLink(data.contractTemplateAddress)
69
       setContractTemplateLink(data.contractTemplateAddress)
69
     })
70
     })
71
 
72
 
72
   function targetOnSuccess(e){
73
   function targetOnSuccess(e){
73
     console.log('targetOnSuccess', e)
74
     console.log('targetOnSuccess', e)
74
-    setTargetName(e)
75
+    targetName = e
76
+    console.log('targetOnSuccess', targetName)
75
   }
77
   }
76
 
78
 
77
   function sealOnSuccess(e){
79
   function sealOnSuccess(e){
81
   function handleSubmit (e) {
83
   function handleSubmit (e) {
82
     e.preventDefault();
84
     e.preventDefault();
83
     props.form.validateFields((err, values) => {
85
     props.form.validateFields((err, values) => {
86
+      console.log(values)
84
       if (!err){
87
       if (!err){
85
         request({ ...apis.taEcontract.addTaContractBusiness, data: { ...values },}).then((data) => {
88
         request({ ...apis.taEcontract.addTaContractBusiness, data: { ...values },}).then((data) => {
86
           message.info("保存成功")
89
           message.info("保存成功")
103
           {getFieldDecorator('contractTemplateId', {
106
           {getFieldDecorator('contractTemplateId', {
104
             rules: [{ required: true, message: ' 请选择合同模板' }],
107
             rules: [{ required: true, message: ' 请选择合同模板' }],
105
           })(<SelectContractTemp  onSuccess={e => contractOnSuccess(e)}/>)}
108
           })(<SelectContractTemp  onSuccess={e => contractOnSuccess(e)}/>)}
106
-          {getFieldDecorator('contractTemplateName', {initialValue:contractTemplateName,
107
-            rules: [{ required: true, message: ' 请选择关联业务' }],
108
-          })(<Input  hidden={true}/>)}
109
+          {getFieldDecorator('contractTemplateName')(<Input  hidden={true}/>)}
109
         </Form.Item>
110
         </Form.Item>
110
         <Form.Item label="合同文件">
111
         <Form.Item label="合同文件">
111
           {getFieldDecorator('contractTemplate')}<Button type="danger" style={{marginRight:'20px'}} onClick={openIndexImg}>查看文件</Button>
112
           {getFieldDecorator('contractTemplate')}<Button type="danger" style={{marginRight:'20px'}} onClick={openIndexImg}>查看文件</Button>

+ 3
- 3
src/pages/eContract/manage/styles.less View File

1
 .title {
1
 .title {
2
     height     : 45px;
2
     height     : 45px;
3
-    font-size  : 20px;
3
+    font-size  : 16px;
4
     font-family: PingFangSC-Regular, PingFang SC;
4
     font-family: PingFangSC-Regular, PingFang SC;
5
     font-weight: 400;
5
     font-weight: 400;
6
     color      : rgba(102, 102, 102, 1);
6
     color      : rgba(102, 102, 102, 1);
8
    
8
    
9
 }
9
 }
10
 .text {
10
 .text {
11
-    font-size  : 18px;
11
+    font-size  : 16px;
12
     font-family: PingFangSC-Regular, PingFang SC;
12
     font-family: PingFangSC-Regular, PingFang SC;
13
-    font-weight: 400;
13
+    // font-weight: 400;
14
     color      : rgba(51, 51, 51, 1);
14
     color      : rgba(51, 51, 51, 1);
15
     line-height: 45px;
15
     line-height: 45px;
16
 }
16
 }