张延森 vor 4 Jahren
Ursprung
Commit
65b7113c39

+ 2
- 2
src/pages/property/bill/info/Add.jsx Datei anzeigen

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

+ 2
- 1
src/pages/property/bill/info/components/AddOne.jsx Datei anzeigen

@@ -64,7 +64,8 @@ export default Form.create()(props => {
64 64
   const handleSubmit = e => {
65 65
     e.preventDefault();
66 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 69
         props.onSubmit({
69 70
           phaseId,
70 71
           buildingId,

+ 6
- 2
src/pages/property/bill/info/components/Edit.jsx Datei anzeigen

@@ -1,5 +1,6 @@
1 1
 import React, { useEffect, useState } from 'react'
2 2
 import { Modal, Form, Input, DatePicker, Button } from 'antd'
3
+import moment from 'moment'
3 4
 
4 5
 const formItemLayout = {
5 6
   labelCol: {
@@ -30,13 +31,16 @@ export default Form.create()(props => {
30 31
     e.preventDefault()
31 32
     props.form.validateFields((err, values) => {
32 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 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 44
   }, [props.initialData])
41 45
 
42 46
   return (

+ 2
- 2
src/pages/property/bill/info/index.jsx Datei anzeigen

@@ -1,5 +1,5 @@
1 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 3
 import { fetch, fetchList, apis } from '@/utils/request'
4 4
 import NavLink from 'umi/navlink'
5 5
 import Prompt from '@/components/Prompt'
@@ -295,7 +295,7 @@ export default props => {
295 295
       </div>
296 296
 
297 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 299
         <Button type="link" onClick={exportExcel}><Icon type="export" />导出数据</Button>
300 300
         <div style={{height: '40px', lineHeight: '40px', marginLeft: '10px', fontSize: '14px', color: '#888' }}>未缴户主费用可以直接点击 收费金额数字 修改,已缴费户主无法修改,需要线下多退少补</div>
301 301
       </div>

+ 2
- 2
src/pages/property/proprietor/index.jsx Datei anzeigen

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

+ 1
- 1
src/services/bill_api.js Datei anzeigen

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