修复bug
This commit is contained in:
parent
b4a28a252f
commit
8ba912366b
File diff suppressed because it is too large
Load Diff
|
@ -2,13 +2,13 @@
|
|||
* @Author: Wind
|
||||
* @Date: 2022-07-25 10:53:41
|
||||
* @LastEditors: Wind
|
||||
* @LastEditTime: 2022-08-10 15:12:44
|
||||
* @LastEditTime: 2022-08-10 15:52:01
|
||||
* @Description:key列表查询组件
|
||||
* @FilePath: \frontend\src\components\keysFind\index.jsx
|
||||
*/
|
||||
import './index.less'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Button, Select, DateRangePicker } from 'zent'
|
||||
import { Button, Select, DateRangePicker, Notify } from 'zent'
|
||||
import Ipt from '@/components/input/main'
|
||||
import Form from '@/components/form/main'
|
||||
import FormItem from '@/components/form-item/main'
|
||||
|
@ -157,7 +157,19 @@ export default ({ onQuery }) => {
|
|||
</FormItem>
|
||||
|
||||
<div className='button_box'>
|
||||
<Button type='primary' onClick={() => onQuery(onChange(models))}>
|
||||
<Button
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
if (
|
||||
onChange(models).plan_id ||
|
||||
onChange(models).reseller_id ||
|
||||
onChange(models).key
|
||||
) {
|
||||
onQuery(onChange(models))
|
||||
} else {
|
||||
Notify.warn('请输入【分销商】或【计划名称】或【key】进行查询')
|
||||
}
|
||||
}}>
|
||||
查询
|
||||
</Button>
|
||||
<Button
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.keysFind {
|
||||
width: 100%;
|
||||
width: 1200px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ export default class acclist extends React.Component {
|
|||
}
|
||||
|
||||
/* 处理可复制数据逻辑 */
|
||||
copyElementFunction({ key_batch_id, status, end_time, keyBatch, id ,title}) {
|
||||
copyElementFunction({ key_batch_id, status, end_time, keyBatch, id, title }) {
|
||||
const today = moment().format('yyyy-MM-DD HH:mm:ss')
|
||||
let element = ''
|
||||
if (
|
||||
|
@ -199,8 +199,8 @@ export default class acclist extends React.Component {
|
|||
element = (
|
||||
<span
|
||||
className='grid-link'
|
||||
style={{ marginLeft: '10px' }}
|
||||
onClick={(e) => this.copyFunction(key_batch_id, id, keyBatch,title)}>
|
||||
style={{}}
|
||||
onClick={(e) => this.copyFunction(key_batch_id, id, keyBatch, title)}>
|
||||
复制
|
||||
</span>
|
||||
)
|
||||
|
@ -208,7 +208,6 @@ export default class acclist extends React.Component {
|
|||
element = (
|
||||
<span
|
||||
style={{
|
||||
marginLeft: '10px',
|
||||
paddingRight: '10px',
|
||||
color: '#d8dbdd'
|
||||
}}>
|
||||
|
@ -247,7 +246,7 @@ export default class acclist extends React.Component {
|
|||
}
|
||||
|
||||
/* 复制 */
|
||||
copyFunction(key_batch_id, id, keyBatch,title) {
|
||||
copyFunction(key_batch_id, id, keyBatch, title) {
|
||||
sessionStorage.setItem('keybatch_id', key_batch_id)
|
||||
sessionStorage.setItem('copy_code_id', id)
|
||||
sessionStorage.setItem('key_reseller_id', keyBatch.plan.reseller_id)
|
||||
|
@ -585,6 +584,7 @@ export default class acclist extends React.Component {
|
|||
编辑
|
||||
</span>
|
||||
)}
|
||||
{this.copyElementFunction(rowData)}
|
||||
{rowData.status != 4 && rowData.status != 5 ? (
|
||||
<span
|
||||
className='grid-link'
|
||||
|
@ -609,7 +609,6 @@ export default class acclist extends React.Component {
|
|||
) : (
|
||||
<span style={{ color: '#d8dbdd' }}>撤销审批</span>
|
||||
)}
|
||||
{this.copyElementFunction(rowData)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -305,7 +305,13 @@ export default class acclist extends React.Component {
|
|||
handelResponse(
|
||||
res,
|
||||
(req, msg) => {
|
||||
this.setState({ distdata: req.data })
|
||||
const newData = req.data.map((item) => {
|
||||
if ([1, 2, 8, 7].includes(item.status)) {
|
||||
item.disabled = true
|
||||
}
|
||||
return item
|
||||
})
|
||||
this.setState({ distdata: newData })
|
||||
this.setState({ planStatus: req.plan.status }) //计划状态
|
||||
this.setState({ dataCount: req.total })
|
||||
sessionStorage.setItem('key_plan_status', req.plan.status)
|
||||
|
@ -586,7 +592,7 @@ export default class acclist extends React.Component {
|
|||
bulkSendFunction() {
|
||||
let isNotify = ''
|
||||
this.state.gridSelection.filter((item) => {
|
||||
if (![4, 5, 6].includes(item.state)) {
|
||||
if (![4, 5, 6].includes(item.status)) {
|
||||
return (isNotify = true)
|
||||
}
|
||||
})
|
||||
|
@ -594,7 +600,6 @@ export default class acclist extends React.Component {
|
|||
if (isNotify) {
|
||||
return Notify.warn('只有状态为进行中、暂停中、已完结的允许发送')
|
||||
}
|
||||
|
||||
this.getResellerInfoFunction(this.state.gridSelection[0].reseller_id)
|
||||
this.setState({ isBulkSend: true })
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import {
|
|||
keyBatchUsage,
|
||||
keyBatchCancel,
|
||||
handelResponse,
|
||||
getkeyDetailList,
|
||||
getKeysList,
|
||||
batchUploadVoid,
|
||||
batchUploadUsed
|
||||
|
@ -101,7 +100,7 @@ export default class acclist extends React.Component {
|
|||
}
|
||||
|
||||
componentDidMount(e) {
|
||||
this.iptsureFn()
|
||||
// this.iptsureFn()
|
||||
}
|
||||
componentWillMount() {
|
||||
this.setState({ tableHeight: window.innerHeight - 430 })
|
||||
|
@ -604,6 +603,7 @@ export default class acclist extends React.Component {
|
|||
pageChange={(e) => {
|
||||
this.onPageChange(e)
|
||||
}}
|
||||
emptyText='查询 请输入【分销商】或【计划名称】或【key】进行查询'
|
||||
countChange={(e) => {
|
||||
this.onCountChange(e)
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue