张延森 před 4 roky
rodič
revize
65b7113c39

+ 2
- 2
src/pages/property/bill/info/Add.jsx Zobrazit soubor

30
   )
30
   )
31
 
31
 
32
   const handleAdd = (vals, callback) => {
32
   const handleAdd = (vals, callback) => {
33
-    addTempBillInvoice({
33
+    addTempBillInvoice({data: {
34
       billId: id,
34
       billId: id,
35
       ...vals,
35
       ...vals,
36
-    }).then(res => {
36
+    }}).then(res => {
37
       callback()
37
       callback()
38
       getListData()
38
       getListData()
39
       setShowAdd(false)
39
       setShowAdd(false)

+ 2
- 1
src/pages/property/bill/info/components/AddOne.jsx Zobrazit soubor

64
   const handleSubmit = e => {
64
   const handleSubmit = e => {
65
     e.preventDefault();
65
     e.preventDefault();
66
     props.form.validateFields((err, values) => {
66
     props.form.validateFields((err, values) => {
67
-      if (!err && !phaseId && !buildingId && !unitId && !levelId && !roomNoId) {
67
+      // console.log(values, !phaseId && !buildingId && !unitId && !levelId && !roomNoId)
68
+      if (!err && phaseId && buildingId && unitId && levelId && roomNoId) {
68
         props.onSubmit({
69
         props.onSubmit({
69
           phaseId,
70
           phaseId,
70
           buildingId,
71
           buildingId,

+ 6
- 2
src/pages/property/bill/info/components/Edit.jsx Zobrazit soubor

1
 import React, { useEffect, useState } from 'react'
1
 import React, { useEffect, useState } from 'react'
2
 import { Modal, Form, Input, DatePicker, Button } from 'antd'
2
 import { Modal, Form, Input, DatePicker, Button } from 'antd'
3
+import moment from 'moment'
3
 
4
 
4
 const formItemLayout = {
5
 const formItemLayout = {
5
   labelCol: {
6
   labelCol: {
30
     e.preventDefault()
31
     e.preventDefault()
31
     props.form.validateFields((err, values) => {
32
     props.form.validateFields((err, values) => {
32
       if (!err && props.onSubmit) {
33
       if (!err && props.onSubmit) {
33
-        props.onSubmit(values)
34
+        const endDate = values.endDate ? moment(values.endDate).toDate() : undefined
35
+        props.onSubmit({...values, endDate})
34
       }
36
       }
35
     })
37
     })
36
   }
38
   }
37
 
39
 
38
   useEffect(() => {
40
   useEffect(() => {
39
-    props.form.setFieldsValue(props.initialData || {})
41
+    const vals = props.initialData || {}
42
+    const endDate = vals.endDate ? moment(vals.endDate) : undefined
43
+    props.form.setFieldsValue({...vals, endDate})
40
   }, [props.initialData])
44
   }, [props.initialData])
41
 
45
 
42
   return (
46
   return (

+ 2
- 2
src/pages/property/bill/info/index.jsx Zobrazit soubor

1
 import React, { useEffect, useRef, useState } from 'react'
1
 import React, { useEffect, useRef, useState } from 'react'
2
-import { PageHeader, Button, Descriptions, Typography, Select, Icon, Table, Modal, Form, Input, notification } from 'antd'
2
+import { PageHeader, Button, Descriptions, Typography, Select, Icon, Table, Modal, Form, Input, Popconfirm, Divider, notification } from 'antd'
3
 import { fetch, fetchList, apis } from '@/utils/request'
3
 import { fetch, fetchList, apis } from '@/utils/request'
4
 import NavLink from 'umi/navlink'
4
 import NavLink from 'umi/navlink'
5
 import Prompt from '@/components/Prompt'
5
 import Prompt from '@/components/Prompt'
295
       </div>
295
       </div>
296
 
296
 
297
       <div style={{margin: '24px 0'}}>
297
       <div style={{margin: '24px 0'}}>
298
-        <NavLink to="/property/bill/management/info/add"><Button type="primary"><Icon type="plus" />添加更多收费单</Button></NavLink>
298
+        <NavLink to={`/property/bill/management/info/add?id=${id}`}><Button type="primary"><Icon type="plus" />添加更多收费单</Button></NavLink>
299
         <Button type="link" onClick={exportExcel}><Icon type="export" />导出数据</Button>
299
         <Button type="link" onClick={exportExcel}><Icon type="export" />导出数据</Button>
300
         <div style={{height: '40px', lineHeight: '40px', marginLeft: '10px', fontSize: '14px', color: '#888' }}>未缴户主费用可以直接点击 收费金额数字 修改,已缴费户主无法修改,需要线下多退少补</div>
300
         <div style={{height: '40px', lineHeight: '40px', marginLeft: '10px', fontSize: '14px', color: '#888' }}>未缴户主费用可以直接点击 收费金额数字 修改,已缴费户主无法修改,需要线下多退少补</div>
301
       </div>
301
       </div>

+ 2
- 2
src/pages/property/proprietor/index.jsx Zobrazit soubor

203
           dataIndex="ownerName"
203
           dataIndex="ownerName"
204
           key="ownerName"
204
           key="ownerName"
205
           render={(_, row) => {
205
           render={(_, row) => {
206
-            return (
206
+            return row.userVerifyId ? (
207
               <NavLink to={`/property/proprietor/detail?id=${row.userVerifyId}`}>
207
               <NavLink to={`/property/proprietor/detail?id=${row.userVerifyId}`}>
208
                 <Button type="link">{row.ownerName}</Button>
208
                 <Button type="link">{row.ownerName}</Button>
209
               </NavLink>
209
               </NavLink>
210
-            )
210
+            ) : row.ownerName
211
           }}
211
           }}
212
         />
212
         />
213
         <Table.Column title="手机号" dataIndex="ownerTel" key="ownerTel" />
213
         <Table.Column title="手机号" dataIndex="ownerTel" key="ownerTel" />

+ 1
- 1
src/services/bill_api.js Zobrazit soubor

148
 
148
 
149
   // 由前台批量添加收费单, 进行统一的提交, 修改为有效
149
   // 由前台批量添加收费单, 进行统一的提交, 修改为有效
150
   updateBillInvoiceStatus: {
150
   updateBillInvoiceStatus: {
151
-    url: '/bill/invoice/updateBillInvoiceStatus',
151
+    url: `${prefix}/bill/invoice/updateBillInvoiceStatus`,
152
     method: 'post',
152
     method: 'post',
153
     action: 'admin.bill-invoice.updateStatus'
153
     action: 'admin.bill-invoice.updateStatus'
154
   }
154
   }