diff --git a/src/pages/home/home.js b/src/pages/home/home.js index 7b2682b8..336080fb 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -36,7 +36,7 @@ import planlist from '../plan/list/list'; import planadd from "../plan/add/add" import keylist from "../plan/key/list" - +import keyorderlist from "../plan/keyorder/keyorder" import accountlist from '../system/account/list/list'; import accountadd from '../system/account/add/add'; @@ -117,23 +117,12 @@ export default class App extends Component { items:[{path:'/home/order-list',name:'订单列表'}] }], path:'/home/order-list' - },{ - name:'概览', - childmenu:[], - path:'/home/overview' - },{ - name:'推广', - childmenu:[], - path:'/home/extension', - }], lastTime:new Date().getTime(), currentTime: new Date().getTime(), timeOut:15 * 60 * 1000, //设置超时时间: 1分 }; - - - + componentDidMount(e){ if (this.state.noShowSubMenu.indexOf(this.props.location.pathname) > -1 ) { console.log(789789798) @@ -233,7 +222,8 @@ export default class App extends Component { - + + ( diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index ce1622eb..28a456d4 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -135,16 +135,16 @@ export default class acclist extends React.Component{ sessionStorage.setItem('breaknav',JSON.stringify(activerou)); } aboutFn(e,row){ - this.props.history.push('/home/exchange-addcommodity'); - sessionStorage.setItem('pathname2','/home/exchange-addcommodity') + this.props.history.push('/home/addkeyorder'); + sessionStorage.setItem('pathname2','/home/addkeyorder') let activerou=[{pagetitle:'编辑',items:[ { - "path": "/home/exchangecode-list", + "path": "/home/keyorder", "name": "兑换码管理" }, { - "path": "/home/exchangecode-add", - "name": row.name+"兑换码的商品范围列表" + "path": "/home/addkeyorder", + "name": row.name+"列表管理" } ]}] sessionStorage.setItem('breaknav',JSON.stringify(activerou)); diff --git a/src/pages/plan/keyorder/keyorder.js b/src/pages/plan/keyorder/keyorder.js new file mode 100644 index 00000000..e164af30 --- /dev/null +++ b/src/pages/plan/keyorder/keyorder.js @@ -0,0 +1,223 @@ +import ReactDOM from 'react-dom'; +import React, { Component } from 'react'; +import { Link } from "react-router-dom"; +import { Button,Tag,Alert,Icon,Notify,Sweetalert,CombinedDateRangePicker} from 'zent'; +import "../../../assets/comm.css" +import Ipt from "../../../components/input/main" +import Grid from "../../../components/gird/main.js" +import TabPage from "../../../components/tabPage/main.js" +import Filterbar from "../../../components/filterbar/main.js" +const Column = [ + { + title: 'Key码', + name: 'id', + prop:'id', + className: 'name', + type: "normal", + width:'auto' + }, { + title: '归属营销计划', + prop:'name', + name: 'name', + width:'400px', + type: "normal", + }, { + title: '状态', + name: 'fail', + prop:'fail', + type: "normal", + width:'auto' + }, + { + title: '剩余条数', + name: 'plan', + type: "normal", + prop:'plan', + width:'auto' + }, + { + title: '更新时间', + name: 'belongid', + type: "normal", + prop:'time', + width:'auto', + }, + + { + title: '操作', + prop: 'opearo', + name: 'opearo', + type: "slot", + width:'200px', + }, +]; + +export default class commoditylist extends React.Component{ + constructor(props){ + super(props) + this.state={ + tabList:[{title:"全部"},{title:"待使用"},{title:"已使用"},{title:"暂停中"},{title:"已结束"},{title:"已作废"}], + distdata:[{id:12313123213123,name:'爱奇艺月卡兑换券',time:'2021-11-08 14:21:06',plan:'营销计划2',belongid:3123213,send:100,record:58,used:41,dead:11,fail:12,status:'进行中'},{id:12313123213123,name:'爱奇艺月卡兑换券',time:'2021-11-08 14:21:06',plan:'营销计划2',belongid:3123213,send:100,record:58,used:41,dead:11,fail:12,status:'进行中'},{id:12313123213123,name:'爱奇艺月卡兑换券',time:'2021-11-08 14:21:06',plan:'营销计划2',belongid:3123213,send:100,record:58,used:41,dead:11,fail:12,status:'进行中'},{id:12313123213123,name:'爱奇艺月卡兑换券',time:'2021-11-08 14:21:06',plan:'营销计划2',belongid:3123213,send:100,record:58,used:41,dead:11,fail:12,status:'进行中'},{id:12313123213123,name:'爱奇艺月卡兑换券',time:'2021-11-08 14:21:06',plan:'营销计划2',belongid:3123213,send:100,record:58,used:41,dead:11,fail:12,status:'已作废'}], + selectiondata:[], + filterList:[{id:0,label:"商品类型",menuList:[{id:0,name:"卡密"},{id:1,name:"直充"}]}, + ], + menuList:[{id:0,name:"商品类型",check:false}], + combinedValue:[], + activepage:'' + } + } + clickFn(){ + this.props.history.push('/exchange-goodsadd'); + sessionStorage.setItem('pathname2','/exchangecode-goodsadd') + let activerou=[{pagetitle:'新建',items:[ + { + "path": "/exchangecode-list", + "name": "兑换码管理" + }, + { + "path": "/exchangecode-goodsadd", + "name": "新建商品" + } + ]}] + sessionStorage.setItem('breaknav',JSON.stringify(activerou)); + } + aboutFn(e,row){ + this.props.history.push('/exchange-commodity'); + } + selection(selection){ + this.setState({selectiondata:selection}); + + } + batchdelFn(){ + if(this.state.selectiondata<1){ + Notify.clear(); + Notify.warn('请先勾选需删除的选项') + }else{ + Sweetalert.confirm({ + type:'warning', + closeBtn:true, + title:'确认操作', + content:

是否删除所选择的商品?

, + onConfirm(){ + alert('开始调用作废接口'); + }, + onCancel(){ + console.log('点击了取消按钮'); + }, + className:'questModal', + parentComponent: this + }); + } + } + //删除 + deleteFn(e,row){ + Sweetalert.confirm({ + type:'warning', + closeBtn:true, + title:'确认操作', + content:

是否删除该商品?

, + onConfirm(){ + alert('开始调用作废接口'); + }, + onCancel(){ + console.log('点击了取消按钮'); + }, + className:'questModal', + parentComponent: this + }); +} + editinfo(e,rowData){ + this.props.history.push('/home/exchangecode-add'); + sessionStorage.setItem('pathname2','/home/exchangecode-add') + let activerou=[{pagetitle:'编辑',items:[ + { + "path": "/home/exchangecode-list", + "name": "兑换码管理" + }, + { + "path": "/home/exchangecode-add", + "name": "编辑兑换码" + } + ]}] + sessionStorage.setItem('breaknav',JSON.stringify(activerou)); + } + //选择时间 + onChangeCombinedDate(e){ + this.setState({combinedValue:e}); + } + tabFn(index){ + this.setState({activepage:index}); + if(index==0){ + + } + if(index==1){ + } + } + render(){ + const { current, pageSize } = this.state; + const date = {this.onChangeCombinedDate(e)}} + /> + return( +
+ +

+ + + + + + + + {/* */} + +

+
+ + +
+ {this.state.selectiondata.length>0?(清空} + > + 已选择{this.state.selectiondata.length}项,库存金额30.00万,库存数总计:36.4万 + ):null + } +
+ { + this.pageChange(e) + }} + checkChange ={this.selection.bind(this)} + ComponentHandler={(com,rowData)=>{ + if(com == "status") + { + return + {rowData.status} + ; + } + if(com == "opearo") + { + return
+ this.editinfo(e,rowData)}>详情 + this.deleteFn(e,rowData)}>更多 +
+ } + }} + /> + +
+
+
+ ) + } +} \ No newline at end of file diff --git a/src/pages/plan/keyorder/keyorder.less b/src/pages/plan/keyorder/keyorder.less new file mode 100644 index 00000000..e69de29b diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 03b8c715..6795e7e2 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -20,10 +20,7 @@ export default class acclist extends React.Component{ super(props) this.state={ tabList:[{title:"营销计划列表"}], - distdata:[ - - - ], + distdata:[{title:'士大夫大师傅'}], filterList:[{id:0,label:"状态",menuList:[{id:0,name:"创建中"},{id:1,name:"审核中"},{id:2,name:"生效中"},{id:3,name:"暂停中"},{id:4,name:"已失效"},{id:5,name:"待生效"}]}, ], menuList:[{id:0,name:"状态",check:false}] @@ -85,7 +82,11 @@ export default class acclist extends React.Component{ //输入值变化 onInputChange(e){ - } + } + //营销系统名称 + tokeyBtn(){ + this.props.history.push('/home/key-list'); + } render(){ @@ -95,7 +96,7 @@ export default class acclist extends React.Component{ title: '营销计划名称', name: 'title', prop:'title', - type: "normal", + type: "slot", width:'100px', },{ title: '启用', @@ -201,6 +202,11 @@ export default class acclist extends React.Component{ console.log(selection) }} ComponentHandler={(com,rowData)=>{ + + if(com == "title") + { + return {rowData.title} + } if(com == "switch") { return {this.onSwitchChange(e,rowData)}}>;