dingxin 5 anos atrás
pai
commit
3068cfb77e
1 arquivos alterados com 30 adições e 9 exclusões
  1. 30
    9
      src/pages/activity/helpActivity/helpRecord.jsx

+ 30
- 9
src/pages/activity/helpActivity/helpRecord.jsx Ver arquivo

103
           // onOk={() => this.handleOk()}
103
           // onOk={() => this.handleOk()}
104
           onCancel={(e) => this.handleCancel(e)}
104
           onCancel={(e) => this.handleCancel(e)}
105
         >
105
         >
106
+
107
+          
106
           <Table rowKey="independent" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
108
           <Table rowKey="independent" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
107
         </Modal>
109
         </Modal>
108
       </>
110
       </>
111
 }
113
 }
112
 
114
 
113
 
115
 
114
-
115
-
116
-
117
-
118
-
119
 /**
116
 /**
120
  * 助力者弹框
117
  * 助力者弹框
121
  */
118
  */
179
     this.getList({ helpRecordInitiateId: this.state.visibleData.customerId, verifyCode: this.state.visibleData.verificationCode })
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
   render () {
204
   render () {
183
     return (
205
     return (
184
       <>
206
       <>
309
 
331
 
310
   function exportCustomer () {
332
   function exportCustomer () {
311
     const fieldsValue = getFieldsValue()
333
     const fieldsValue = getFieldsValue()
312
-    // request({ ...apis.helpActivity.HelpInitiateRecordSucceed, responseType: 'blob', params: { ...fieldsValue, customerType } })
313
-    request({ ...apis.helpActivity.HelpInitiateRecordSucceed, responseType: 'blob', params: { helpActivityId: 6 } })
314
-
334
+    const code = customerType === 'helpSucceed' ? 1 : 0
335
+    request({ ...apis.helpActivity.HelpInitiateRecordSucceed, responseType: 'blob', params: { ...fieldsValue, customerType, helpActivityId, code } })
315
       .then(response => {
336
       .then(response => {
316
         download(response)
337
         download(response)
317
       }).catch(error => {
338
       }).catch(error => {
327
     const link = document.createElement('a')
348
     const link = document.createElement('a')
328
     link.style.display = 'none'
349
     link.style.display = 'none'
329
     link.href = url
350
     link.href = url
330
-    link.setAttribute('download', '客户列表.xlsx')
351
+    link.setAttribute('download', '助力记录.xlsx')
331
     document.body.append(link)
352
     document.body.append(link)
332
     link.click()
353
     link.click()
333
   }
354
   }