dingxin 5 лет назад
Родитель
Сommit
6b7aa462b2

+ 15
- 9
src/pages/customer/customerlist/components/integralRecord.jsx Просмотреть файл

@@ -76,7 +76,7 @@ class ModalIntegralRecord extends React.Component {
76 76
   }
77 77
 
78 78
   // 积分类型
79
-  showChangeType(str) { 
79
+  showChangeType(str) {
80 80
     switch (str) {
81 81
       case 'goods':
82 82
         return '兑换商品'
@@ -88,56 +88,62 @@ class ModalIntegralRecord extends React.Component {
88 88
         return '注册经纪人'
89 89
       case 'recommend-customer':
90 90
         return '推荐客户'
91
+        case 'group':
92
+        return '拼团'
93
+        case 'recommend-customer':
94
+        return '推荐客户'
91 95
       default:
92 96
         return '未知类型'
93 97
     }
94 98
   }
95
-  
99
+
96 100
   // 判断是否是 - 开头
97
-  subPoints(points) { 
98
-    let subStr = points.toString().substring(0, 1)
101
+  subPoints(points) {
102
+    const subStr = points.toString().substring(0, 1)
99 103
     if (subStr === '-') {
100 104
       return true
101 105
     }
102 106
     return false
103 107
   }
104 108
 
109
+// eslint-disable-next-line class-methods-use-this
105 110
   render() {
106 111
     const columns = [
107 112
       {
108 113
         title: '序号',
109 114
         dataIndex: 'index',
110 115
         key: 'index',
116
+        render: (text, record, index) => <span>{(this.state.dataSource.result.total - this.state.dataSource.result.records.length) * 1 + index + 1}</span>,
111 117
       },
112 118
       {
113 119
         title: '积分类型',
114 120
         dataIndex: 'changeType',
115 121
         key: 'changeType',
116
-        render: (_, record) => { this.showChangeType(record.changeType) },
122
+        render: (_, record) => <span>{this.showChangeType(record.changeType) }</span>,
117 123
       },
118 124
       {
119 125
         title: '积分变化',
120 126
         dataIndex: 'pointsAmount',
121 127
         key: 'pointsAmount',
122
-        render: (_, record) => { <span style={this.subPoints(record.pointsAmount) && {color: 'red'}}>{ record.pointsAmount }</span> },
128
+        // render: (pointsAmount, record) => { <span style={this.subPoints(pointsAmount) && {color: 'red'}}>{ pointsAmount }</span> },
123 129
       },
124 130
       {
125 131
         title: '发生时间',
126 132
         dataIndex: 'createDate',
127 133
         key: 'createDate',
128
-        render: (text, records) => { moment(records.createDate).format('YYYY-MM-DD') },
134
+        render: (createDate, records) => <span> {moment(createDate).format('YYYY-MM-DD')}</span>,
129 135
       },
130 136
     ]
131 137
     return (
132 138
       <>
133 139
         <Modal
134
-            title={ "当前可用积分:" + this.state.dataSource.totalPoints }
140
+            title={ '当前可用积分:' + this.state.dataSource.totalPoints }
135 141
             width={800}
136 142
             destroyOnClose="true"
137 143
             footer={null}
138 144
             visible={this.state.visibleData.visible}
139 145
             // onOk={() => this.handleOk()}
140
-            onCancel={(e) => this.handleCancel(e)}
146
+            onCancel={e => this.handleCancel(e)}
141 147
           >
142 148
             <Table dataSource={this.state.dataSource.result.records} columns={columns} pagination={{ total: this.state.dataSource.result.total, onChange: e => this.onChange(e) }} />
143 149
           </Modal>

+ 3
- 3
src/pages/customer/customerlist/customerDetail.jsx Просмотреть файл

@@ -98,8 +98,8 @@ function onChange(number) {
98 98
     {
99 99
       title: 'Name',
100 100
       dataIndex: 'name',
101
-      width:500,
102
-    render: (_, record) => <span stytle={{width:'450px'}} >{record.buildingName}</span>,
101
+      width: 500,
102
+    render: (_, record) => <span>{record.buildingName}</span>,
103 103
     },
104 104
     {
105 105
       title: 'Address',
@@ -169,7 +169,7 @@ function onChange(number) {
169 169
         <div className={styles.leftBoxCentre}>
170 170
           <div className={styles.tit}>
171 171
                 <span>项目名称</span>
172
-                <span style={{ marginLeft: '47%' }}>意向值</span>
172
+                <span style={{ marginLeft: '50%' }}>意向值</span>
173 173
           </div>
174 174
           {/* <img className={styles.touxiang} src={ data.picture && data.picture } /> */}
175 175
           <div className={styles.infoItem}>

+ 1
- 1
src/pages/customer/customerlist/index.jsx Просмотреть файл

@@ -135,7 +135,7 @@ function body(props) {
135 135
   }
136 136
 
137 137
   function showRecord(record) {
138
-    setRecordVisibleData({ visible: true, customerId: record.customerId })
138
+    setRecordVisibleData({ visible: true, customerId: record.personId })
139 139
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
140 140
     setStatusVisibleData({ visible: false, customerId: '' })
141 141
     setRecommendVisibleData({ visible: false, customerId: '' })