魏超 5 år sedan
förälder
incheckning
4e8102edee
1 ändrade filer med 30 tillägg och 7 borttagningar
  1. 30
    7
      src/pages/activity/helpActivity/helpRecord.jsx

+ 30
- 7
src/pages/activity/helpActivity/helpRecord.jsx Visa fil

@@ -103,6 +103,8 @@ class InviteTable extends React.Component {
103 103
           // onOk={() => this.handleOk()}
104 104
           onCancel={(e) => this.handleCancel(e)}
105 105
         >
106
+
107
+          
106 108
           <Table rowKey="independent" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
107 109
         </Modal>
108 110
       </>
@@ -111,11 +113,6 @@ class InviteTable extends React.Component {
111 113
 }
112 114
 
113 115
 
114
-
115
-
116
-
117
-
118
-
119 116
 /**
120 117
  * 助力者弹框
121 118
  */
@@ -179,6 +176,31 @@ class Verifier extends React.Component {
179 176
     this.getList({ helpRecordInitiateId: this.state.visibleData.customerId, verifyCode: this.state.visibleData.verificationCode })
180 177
   }
181 178
 
179
+  //  exportCustomer() {
180
+  //   const code = customerType === 'helpSucceed' ? 1 : 0
181
+  //   request({ ...apis.helpActivity.HelpInitiateRecordSucceed, responseType: 'blob', params: { ...fieldsValue, customerType, helpActivityId, code } })
182
+  //     .then(response => {
183
+  //       download(response)
184
+  //     }).catch(() => {
185
+
186
+  //     })
187
+  // }
188
+
189
+  //  download(data) {
190
+  //   if (!data) {
191
+  //     return
192
+  //   }
193
+  //   const url = window.URL.createObjectURL(new Blob([data]))
194
+  //   const link = document.createElement('a')
195
+  //   link.style.display = 'none'
196
+  //   link.href = url
197
+  //   link.setAttribute('download', '助力记录.xlsx')
198
+  //   document.body.append(link)
199
+  //   link.click()
200
+  // }
201
+
202
+
203
+
182 204
   render () {
183 205
     return (
184 206
       <>
@@ -309,7 +331,8 @@ function body(props) {
309 331
 
310 332
   function exportCustomer () {
311 333
     const fieldsValue = getFieldsValue()
312
-    request({ ...apis.customer.customerRecommendExport, responseType: 'blob', params: { ...fieldsValue, customerType } })
334
+    const code = customerType === 'helpSucceed' ? 1 : 0
335
+    request({ ...apis.helpActivity.HelpInitiateRecordSucceed, responseType: 'blob', params: { ...fieldsValue, customerType, helpActivityId, code } })
313 336
       .then(response => {
314 337
         download(response)
315 338
       }).catch(error => {
@@ -325,7 +348,7 @@ function body(props) {
325 348
     const link = document.createElement('a')
326 349
     link.style.display = 'none'
327 350
     link.href = url
328
-    link.setAttribute('download', '客户列表.xlsx')
351
+    link.setAttribute('download', '助力记录.xlsx')
329 352
     document.body.append(link)
330 353
     link.click()
331 354
   }