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