dingxin 5 år sedan
förälder
incheckning
49c38e5aea

+ 15
- 1
src/pages/building/list/index.jsx Visa fil

@@ -230,7 +230,21 @@ function body(props) {
230 230
 
231 231
 
232 232
   function toAdd() {
233
-    router.push({ pathname: '/building/list/add' })
233
+    // 判断楼盘是否最可以添加
234
+    request({ ...apis.building.verifyMax}).then(res => {
235
+      router.push({ pathname: '/building/list/add' })
236
+    }).catch(err => {
237
+      // eslint-disable-next-line no-unused-expressions
238
+      <Alert
239
+        style={{
240
+          marginBottom: 24,
241
+        }}
242
+        message={err}
243
+        type="error"
244
+        showIcon
245
+      />
246
+      return
247
+    })
234 248
   }
235 249
 
236 250
   /**

+ 3
- 4
src/pages/customer/customerlist/components/integralRecord.jsx Visa fil

@@ -27,7 +27,7 @@ class ModalIntegralRecord extends React.Component {
27 27
 
28 28
   // 挂载之后
29 29
   componentDidMount() {
30
-    // this.getList({ pageNumber: 1, pageSize: 5 })
30
+    this.getList({ pageNumber: 1, pageSize: 5 })
31 31
   }
32 32
 
33 33
   componentDidUpdate(preProps, preState) {
@@ -77,7 +77,6 @@ class ModalIntegralRecord extends React.Component {
77 77
 
78 78
   // 积分类型
79 79
   showChangeType(str) { 
80
-
81 80
     switch (str) {
82 81
       case 'goods':
83 82
         return '兑换商品'
@@ -126,7 +125,7 @@ class ModalIntegralRecord extends React.Component {
126 125
         title: '发生时间',
127 126
         dataIndex: 'createDate',
128 127
         key: 'createDate',
129
-        render: (_, record) => { moment(record.createDate).format('YYYY-MM-DD') },
128
+        render: (text, records) => { moment(records.createDate).format('YYYY-MM-DD') },
130 129
       },
131 130
     ]
132 131
     return (
@@ -140,7 +139,7 @@ class ModalIntegralRecord extends React.Component {
140 139
             // onOk={() => this.handleOk()}
141 140
             onCancel={(e) => this.handleCancel(e)}
142 141
           >
143
-            <Table dataSource={this.state.dataSource.result.records} rowKey="integralrecord" columns={columns} pagination={{ total: this.state.dataSource.result.total, onChange: e => this.onChange(e) }} />
142
+            <Table dataSource={this.state.dataSource.result.records} columns={columns} pagination={{ total: this.state.dataSource.result.total, onChange: e => this.onChange(e) }} />
144 143
           </Modal>
145 144
       </>
146 145
     );

+ 1
- 1
src/pages/customer/customerlist/components/recommend.jsx Visa fil

@@ -109,7 +109,7 @@ class ModalRecommendRecord extends React.Component {
109 109
         title: '推荐时间',
110 110
         dataIndex: 'createDate',
111 111
         key: 'createDate',
112
-        render: (_, record) => <><span>{ record.createDate && moment(record.createDate).format('YYYY-MM-DD') }</span></>,
112
+        render: (_, record) => <><span>{ record.createDate && moment(record.createDate).format('YYYY-MM-DD hh:mm:ss') }</span></>,
113 113
       },
114 114
       {
115 115
         title: '状态',

+ 1
- 1
src/pages/customer/customerlist/customerDetail.jsx Visa fil

@@ -83,7 +83,7 @@ function onChange(number) {
83 83
       dataIndex: 'visitTime',
84 84
       key: 'visitTime',
85 85
       align: 'center',
86
-      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD hh:mm:ss') }</span>,
86
+      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss') }</span>,
87 87
     },
88 88
     {
89 89
       title: '停留时间',

+ 1
- 0
src/pages/customer/customerlist/index.jsx Visa fil

@@ -207,6 +207,7 @@ function body(props) {
207 207
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
208 208
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
209 209
     setRecommendVisibleData({ visible: false, customerId: '' })
210
+    getList({ pageNum: 1, pageSize: 10, customerType, ...props.form.getFieldsValue() })
210 211
   }
211 212
 
212 213
   const publicColumns = [

+ 1
- 1
src/pages/customer/customerlist/publicCustomerDetail.jsx Visa fil

@@ -84,7 +84,7 @@ function onChange(number) {
84 84
       dataIndex: 'visitTime',
85 85
       key: 'visitTime',
86 86
       align: 'center',
87
-      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD hh:mm:ss') }</span>,
87
+      render: (_, record) => <span> {moment(record.visitTime).format('YYYY-MM-DD HH:mm:ss') }</span>,
88 88
     },
89 89
     {
90 90
       title: '停留时间',

+ 5
- 0
src/services/apis.js Visa fil

@@ -45,6 +45,11 @@ export default {
45 45
       url: `${prefix}/buildinglist`,
46 46
       action: 'admin.buildinglist.get',
47 47
     },
48
+    verifyMax: {
49
+      method: 'GET',
50
+      url: `${prefix}/verifyMax`,
51
+      action: 'admin.verifyMax.get',
52
+    },
48 53
     updateStatus: {
49 54
       method: 'PUT',
50 55
       url: `${prefix}/building/update/status`,