2 Ревизии

Автор SHA1 Съобщение Дата
  dingxin e4878ffce7 合并 преди 5 години
  dingxin 49c38e5aea 合并 преди 5 години

+ 15
- 1
src/pages/building/list/index.jsx Целия файл

230
 
230
 
231
 
231
 
232
   function toAdd() {
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 Целия файл

27
 
27
 
28
   // 挂载之后
28
   // 挂载之后
29
   componentDidMount() {
29
   componentDidMount() {
30
-    // this.getList({ pageNumber: 1, pageSize: 5 })
30
+    this.getList({ pageNumber: 1, pageSize: 5 })
31
   }
31
   }
32
 
32
 
33
   componentDidUpdate(preProps, preState) {
33
   componentDidUpdate(preProps, preState) {
77
 
77
 
78
   // 积分类型
78
   // 积分类型
79
   showChangeType(str) { 
79
   showChangeType(str) { 
80
-
81
     switch (str) {
80
     switch (str) {
82
       case 'goods':
81
       case 'goods':
83
         return '兑换商品'
82
         return '兑换商品'
126
         title: '发生时间',
125
         title: '发生时间',
127
         dataIndex: 'createDate',
126
         dataIndex: 'createDate',
128
         key: 'createDate',
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
     return (
131
     return (
140
             // onOk={() => this.handleOk()}
139
             // onOk={() => this.handleOk()}
141
             onCancel={(e) => this.handleCancel(e)}
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
           </Modal>
143
           </Modal>
145
       </>
144
       </>
146
     );
145
     );

+ 1
- 1
src/pages/customer/customerlist/components/recommend.jsx Целия файл

109
         title: '推荐时间',
109
         title: '推荐时间',
110
         dataIndex: 'createDate',
110
         dataIndex: 'createDate',
111
         key: 'createDate',
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
         title: '状态',
115
         title: '状态',

+ 1
- 1
src/pages/customer/customerlist/customerDetail.jsx Целия файл

83
       dataIndex: 'visitTime',
83
       dataIndex: 'visitTime',
84
       key: 'visitTime',
84
       key: 'visitTime',
85
       align: 'center',
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
       title: '停留时间',
89
       title: '停留时间',

+ 1
- 0
src/pages/customer/customerlist/index.jsx Целия файл

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

+ 1
- 1
src/pages/customer/customerlist/publicCustomerDetail.jsx Целия файл

84
       dataIndex: 'visitTime',
84
       dataIndex: 'visitTime',
85
       key: 'visitTime',
85
       key: 'visitTime',
86
       align: 'center',
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
       title: '停留时间',
90
       title: '停留时间',

+ 5
- 0
src/services/apis.js Целия файл

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