key列表的对接,页码筛选条件的bug处理
This commit is contained in:
parent
0f7f5a6731
commit
6b53de026d
|
@ -835,6 +835,10 @@ export const delSystemTemplate= (id) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//key码列表
|
||||||
|
export const getkeyDetailList= (id,data) => {
|
||||||
|
return req('get', baseurl + "/key/"+id,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,8 @@
|
||||||
border-top: 1px solid #ddd;
|
border-top: 1px solid #ddd;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.th-td-total {
|
.th-td-total {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import Ipt from "../../../../components/input/main"
|
||||||
import Grid from "../../../../components/gird/main.js"
|
import Grid from "../../../../components/gird/main.js"
|
||||||
import TabPage from "../../../../components/tabPage/main.js"
|
import TabPage from "../../../../components/tabPage/main.js"
|
||||||
import Filterbar from "../../../../components/filterbar/main.js"
|
import Filterbar from "../../../../components/filterbar/main.js"
|
||||||
import {planIsSend,getPlanList,handelResponse,startOrStopPlan,getAllEnum,resKeyEmail,planSend,planResend,planReceive,getReseller} from "../../../../assets/api.js"
|
import {planIsSend,getPlanList,handelResponse,startOrStopPlan,getAllEnum,resKeyEmail,planSend,planResend,planReceive,getReseller,getkeyDetailList} from "../../../../assets/api.js"
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import menu from "../../../../assets/enum.js"
|
import menu from "../../../../assets/enum.js"
|
||||||
import common from "../../../../assets/comm.js"
|
import common from "../../../../assets/comm.js"
|
||||||
|
@ -123,19 +123,20 @@ export default class acclist extends React.Component{
|
||||||
page:1,
|
page:1,
|
||||||
limit:10
|
limit:10
|
||||||
}
|
}
|
||||||
this.getPlanList(data);
|
this.getKeyCodeList(data);
|
||||||
}
|
}
|
||||||
componentWillMount(){
|
componentWillMount(){
|
||||||
this.setState({tableHeight:window.innerHeight-430});
|
this.setState({tableHeight:window.innerHeight-430});
|
||||||
}
|
}
|
||||||
|
|
||||||
getPlanList(data){
|
getKeyCodeList(data){
|
||||||
|
|
||||||
let queryParams = _.omitBy(data, (value) => {
|
let queryParams = _.omitBy(data, (value) => {
|
||||||
return _.isNaN(value) || _.isNil(value)
|
return _.isNaN(value) || _.isNil(value)
|
||||||
})
|
})
|
||||||
|
let id = sessionStorage.getItem("key_batch_id")
|
||||||
|
|
||||||
getPlanList(queryParams).then((res)=>{
|
getkeyDetailList(id,queryParams).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
this.setState({distdata:req.data})
|
this.setState({distdata:req.data})
|
||||||
this.setState({dataCount:req.total})
|
this.setState({dataCount:req.total})
|
||||||
|
@ -266,16 +267,16 @@ export default class acclist extends React.Component{
|
||||||
}
|
}
|
||||||
//营销系统名称
|
//营销系统名称
|
||||||
linkTo(row){
|
linkTo(row){
|
||||||
sessionStorage.setItem('showflag',true);
|
// sessionStorage.setItem('showflag',true);
|
||||||
let arr=[{pagetitle:'编辑',items:[{path:'/home/key-list',name:'营销计划管理'},
|
// let arr=[{pagetitle:'编辑',items:[{path:'/home/key-list',name:'营销计划管理'},
|
||||||
{path:'/home/key-list',name:row.title+'key列表'}
|
// {path:'/home/key-list',name:row.title+'key列表'}
|
||||||
]}]
|
// ]}]
|
||||||
sessionStorage.setItem("plan_item",JSON.stringify(row))
|
// sessionStorage.setItem("plan_item",JSON.stringify(row))
|
||||||
sessionStorage.setItem('breaknav',JSON.stringify(arr));
|
// sessionStorage.setItem('breaknav',JSON.stringify(arr));
|
||||||
sessionStorage.setItem('linkshowname',"营销计划管理");
|
// sessionStorage.setItem('linkshowname',"营销计划管理");
|
||||||
sessionStorage.setItem("key_plan_id",row.id)
|
// sessionStorage.setItem("key_plan_id",row.id)
|
||||||
sessionStorage.setItem("key_plan_status",row.status)
|
// sessionStorage.setItem("key_plan_status",row.status)
|
||||||
this.props.history.push('/home/key-list');
|
// this.props.history.push('/home/key-list');
|
||||||
}
|
}
|
||||||
menuItemClick(e,key,row){
|
menuItemClick(e,key,row){
|
||||||
|
|
||||||
|
@ -550,32 +551,33 @@ export default class acclist extends React.Component{
|
||||||
const Column = [
|
const Column = [
|
||||||
{
|
{
|
||||||
title: 'key码',
|
title: 'key码',
|
||||||
name: 'key',
|
name: 'key_code',
|
||||||
prop:'key',
|
prop:'key_code',
|
||||||
type: "slot",
|
type: "normal",
|
||||||
width:'auto',
|
width:'auto',
|
||||||
},{
|
},{
|
||||||
title: '归属营销计划',
|
title: '归属营销计划',
|
||||||
width:'auto',
|
width:'auto',
|
||||||
type: "normal",
|
type: "normal",
|
||||||
prop:'switch'
|
prop:'plan_title',
|
||||||
|
name: 'plan_title',
|
||||||
}, {
|
}, {
|
||||||
title: '状态',
|
title: '状态',
|
||||||
prop:'reseller_name',
|
|
||||||
name: 'reseller_name',
|
|
||||||
width:'auto',
|
|
||||||
type: "normal",
|
|
||||||
}, {
|
|
||||||
title: '剩余条数',
|
|
||||||
name: 'status',
|
|
||||||
prop:'status',
|
prop:'status',
|
||||||
|
name: 'status',
|
||||||
|
width:'auto',
|
||||||
type: "slot",
|
type: "slot",
|
||||||
|
}, {
|
||||||
|
title: '使用量',
|
||||||
|
name: 'usage',
|
||||||
|
prop:'usage',
|
||||||
|
type: "normal",
|
||||||
width:'auto'
|
width:'auto'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '更新时间',
|
title: '更新时间',
|
||||||
name: 'creator_name',
|
name: 'update_time',
|
||||||
prop:'creator_name',
|
prop:'update_time',
|
||||||
type: "normal",
|
type: "normal",
|
||||||
width:'auto'
|
width:'auto'
|
||||||
},
|
},
|
||||||
|
@ -598,9 +600,6 @@ export default class acclist extends React.Component{
|
||||||
onChange={this.onChangeCombinedDate}
|
onChange={this.onChangeCombinedDate}
|
||||||
/>
|
/>
|
||||||
return(
|
return(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="dislist">
|
<div id="dislist">
|
||||||
<TabPage tabs={this.state.tabList} slot={date} tabChange={this.tabFn.bind(this)}>
|
<TabPage tabs={this.state.tabList} slot={date} tabChange={this.tabFn.bind(this)}>
|
||||||
<div className="distable dflexj">
|
<div className="distable dflexj">
|
||||||
|
|
|
@ -23,9 +23,9 @@ const Column = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '批次名称',
|
title: '批次名称',
|
||||||
name: 'batch_name',
|
name: 'link',
|
||||||
prop:'batch_name',
|
prop:'link',
|
||||||
type: "normal",
|
type: "slot",
|
||||||
width:'100px'
|
width:'100px'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -552,6 +552,21 @@ onChangeCombinedDate(e){
|
||||||
this.setState({combinedValue:e});
|
this.setState({combinedValue:e});
|
||||||
this.getKeyList(e);
|
this.getKeyList(e);
|
||||||
}
|
}
|
||||||
|
linkTo(row){
|
||||||
|
// sessionStorage.setItem('showflag',true);
|
||||||
|
let arr=[{pagetitle:'编辑',items:[{path:'/home/key-list',name:'营销计划管理'},
|
||||||
|
{path:'/home/key-list',name:row.plan_title+'key列表'},
|
||||||
|
{path:'/home/key-detail',name:row.batch_name+'key码列表'}
|
||||||
|
]}]
|
||||||
|
sessionStorage.setItem("plan_item",JSON.stringify(row))
|
||||||
|
sessionStorage.setItem('breaknav',JSON.stringify(arr));
|
||||||
|
sessionStorage.setItem('linkshowname',"营销计划管理");
|
||||||
|
sessionStorage.setItem("key_batch_id",row.id)
|
||||||
|
this.props.history.push('/home/key-detail');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 监听组件内部状态的变化:
|
// 监听组件内部状态的变化:
|
||||||
componentDidUpdate(prevProps,prevState){
|
componentDidUpdate(prevProps,prevState){
|
||||||
// 参数分别为改变之前的数据状态对象
|
// 参数分别为改变之前的数据状态对象
|
||||||
|
@ -606,6 +621,13 @@ onChangeCombinedDate(e){
|
||||||
|
|
||||||
}}
|
}}
|
||||||
ComponentHandler={(com,rowData)=>{
|
ComponentHandler={(com,rowData)=>{
|
||||||
|
|
||||||
|
if(com == "link"){
|
||||||
|
|
||||||
|
return <span className="grid-link" onClick={(e)=>{this.linkTo(rowData)} }>{rowData.batch_name}</span>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if(com == "switch")
|
if(com == "switch")
|
||||||
{
|
{
|
||||||
return <Switch size="small" checked={rowData.status==4?true:false} disabled={rowData.status >= 6 ? true :false } onChange={(e)=>{this.onSwitchChange(e,rowData)}}></Switch>;
|
return <Switch size="small" checked={rowData.status==4?true:false} disabled={rowData.status >= 6 ? true :false } onChange={(e)=>{this.onSwitchChange(e,rowData)}}></Switch>;
|
||||||
|
|
Loading…
Reference in New Issue