1、修复 key列表管理条件查询组件 输入框清除报错问题

2、与后端对接 key列表管理条件查询组件 静态字段
3、调试完成key列表展示以及相关操作
4、优化代码
This commit is contained in:
wangsongsole 2022-07-28 15:44:33 +08:00
parent f29bd59fc0
commit 33e5a49f9f
3 changed files with 21 additions and 18 deletions

View File

@ -868,7 +868,7 @@ export const addFund = (data, id) => {
// key列表 // key列表
export const getKeysList = (data) => { export const getKeysList = (data) => {
return req('post', baseurl + '/key', data) return req('get', baseurl + '/key', data)
} }
// 批量上传查询 // 批量上传查询

View File

@ -2,7 +2,7 @@
* @Author: Wind * @Author: Wind
* @Date: 2022-07-25 10:53:41 * @Date: 2022-07-25 10:53:41
* @LastEditors: Wind * @LastEditors: Wind
* @LastEditTime: 2022-07-28 14:43:42 * @LastEditTime: 2022-07-28 15:29:24
* @Description:key列表查询组件 * @Description:key列表查询组件
* @FilePath: \frontend\src\components\keysFind\index.jsx * @FilePath: \frontend\src\components\keysFind\index.jsx
*/ */
@ -15,11 +15,11 @@ import FormItem from '@/components/form-item/main'
import _ from 'lodash' import _ from 'lodash'
const stateList = [ const stateList = [
{ key: 1, text: '全部' }, { key: 0, text: '全部' },
{ key: 2, text: '待使用' }, { key: 1, text: '待使用' },
{ key: 3, text: '已使用' }, { key: 2, text: '已使用' },
{ key: 4, text: '已完结' }, { key: 3, text: '已完结' },
{ key: 5, text: '已作废' } { key: 4, text: '已作废' }
] ]
function init() { function init() {
return { return {
@ -38,9 +38,9 @@ export default ({ onQuery }) => {
return { return {
begin_time: data.date[0] || null, begin_time: data.date[0] || null,
end_time: data.date[1] || null, end_time: data.date[1] || null,
reseller_name: data.reseller?.text, reseller_name: data.reseller || null,
plan_name: data.plan?.text, plan_name: data.plan || null,
status: data.state?.key, status: data.state?.key || null,
key: data.key || null key: data.key || null
} }
} }
@ -75,7 +75,8 @@ export default ({ onQuery }) => {
labelWidth='0px' labelWidth='0px'
placeholder='请输入' placeholder='请输入'
width={204} width={204}
onChange={(va) => setModels({ ...models, key: va })} onClearItem={() => setModels({ ...models, reseller: '' })}
onChange={(va) => setModels({ ...models, reseller: va })}
/> />
</FormItem> </FormItem>
@ -86,7 +87,8 @@ export default ({ onQuery }) => {
labelWidth='0px' labelWidth='0px'
placeholder='请输入' placeholder='请输入'
width={204} width={204}
onChange={(va) => setModels({ ...models, key: va })} onChange={(va) => setModels({ ...models, plan: va })}
onClearItem={() => setModels({ ...models, plan: '' })}
/> />
</FormItem> </FormItem>
<FormItem labelname='KEY' required='' labelwidth='50px'> <FormItem labelname='KEY' required='' labelwidth='50px'>
@ -97,6 +99,7 @@ export default ({ onQuery }) => {
placeholder='请输入' placeholder='请输入'
width={204} width={204}
onChange={(va) => setModels({ ...models, key: va })} onChange={(va) => setModels({ ...models, key: va })}
onClearItem={() => setModels({ ...models, key: '' })}
/> />
</FormItem> </FormItem>

View File

@ -375,15 +375,15 @@ export default class acclist extends React.Component {
title: '归属营销计划', title: '归属营销计划',
width: 'auto', width: 'auto',
type: 'normal', type: 'normal',
prop: 'plan_title', prop: 'title',
name: 'plan_title' name: 'title'
}, },
{ {
title: '归属KEY批次', title: '归属KEY批次',
prop: 'status', prop: 'batch_name',
name: 'status', name: 'batch_name',
width: 'auto', width: 'auto',
type: 'slot' type: 'normal'
}, },
{ {
title: '状态', title: '状态',
@ -446,7 +446,7 @@ export default class acclist extends React.Component {
name: 'update_time', name: 'update_time',
prop: 'update_time', prop: 'update_time',
type: 'normal', type: 'normal',
width: 'auto' width: '220px'
} }
] ]
const date = ( const date = (