key码提交

This commit is contained in:
姜棚 2022-01-07 17:33:06 +08:00
parent 597dfa1cb9
commit 1954709354
2 changed files with 17 additions and 16 deletions

View File

@ -216,10 +216,7 @@ export default class acclist extends React.Component{
keyCancel(formdata).then((res)=>{ keyCancel(formdata).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{
Notify.success("作废成功")
},(err)=>{ },(err)=>{
console.log(err) console.log(err)
}) })
@ -235,7 +232,7 @@ export default class acclist extends React.Component{
keyBatchUsage(formdata).then((res)=>{ keyBatchUsage(formdata).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{
Notify.success("标记为使用成功")
},(err)=>{ },(err)=>{
console.log(err) console.log(err)
}) })
@ -244,11 +241,13 @@ export default class acclist extends React.Component{
} }
if(key == 3) if(key == 3)
{ {
console.log(rowData) sessionStorage.setItem("keyCode",rowData.key)
this.props.history.push('/home/key-log?key='+rowData.key); console.log("key数据",rowData)
this.props.history.push('/home/key-log');
sessionStorage.setItem('pathname2','/home/key-log') sessionStorage.setItem('pathname2','/home/key-log')
let cur_nav = sessionStorage.getItem("breakchangenav") let cur_nav = sessionStorage.getItem("breakchangenav")
if(cur_nav.length > 0 && cur_nav[0].items) if(cur_nav.length > 0 && cur_nav[0].items)
{ {
cur_nav[0].items.push({path:"/home/key-log",name:cur_nav[0].items[cur_nav[0].items.length - 1].name+"日志"}) cur_nav[0].items.push({path:"/home/key-log",name:cur_nav[0].items[cur_nav[0].items.length - 1].name+"日志"})
@ -280,12 +279,12 @@ export default class acclist extends React.Component{
}) })
let formdata={ let formdata={
keys:keys.toString() keys:keys
} }
keyBatchCancel(formdata).then((res)=>{ keyBatchCancel(formdata).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{
Notify.success("批量作废成功")
},(err)=>{ },(err)=>{
console.log(err) console.log(err)
}) })
@ -297,12 +296,12 @@ export default class acclist extends React.Component{
}) })
let formdata={ let formdata={
keys:keys.toString() keys:keys
} }
keyBatchUsage(formdata).then((res)=>{ keyBatchUsage(formdata).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{
Notify.success("批量标记为使用成功")
},(err)=>{ },(err)=>{
console.log(err) console.log(err)
}) })

View File

@ -35,6 +35,7 @@ const Column = [
export default class Key extends React.Component{ export default class Key extends React.Component{
constructor(props){ constructor(props){
super(props) super(props)
console.log("属性",props)
this.state={ this.state={
tabList:[{title:"日志"}], tabList:[{title:"日志"}],
tabactive:0, tabactive:0,
@ -42,7 +43,7 @@ export default class Key extends React.Component{
keyDetail_data:{}, keyDetail_data:{},
tableHeight:500, tableHeight:500,
page:1, page:1,
orderNo:'', key:'',
limit:10, limit:10,
total:0, total:0,
} }
@ -50,13 +51,12 @@ export default class Key extends React.Component{
componentDidMount(e){ componentDidMount(e){
let data = { let data = {
page:1, page:1,
limit:10 limit:10,
} }
this.getKeyLogFn(data); this.getKeyLogFn(data);
} }
tabFn(index){ tabFn(index){
this.getKeyLogFn(); this.getKeyLogFn();
} }
selection(){ selection(){
@ -64,10 +64,12 @@ export default class Key extends React.Component{
//获取订单日志 //获取订单日志
getKeyLogFn(){ getKeyLogFn(){
let _self=this; let _self=this;
let {page,limit,orderNo}=this.state; let {page,limit}=this.state;
let data={ let data={
page, page,
limit limit,
key:sessionStorage.getItem("keyCode")
} }
getKeyLog(data).then(res=>{ getKeyLog(data).then(res=>{
handelResponse(res,(response,msg)=>{ handelResponse(res,(response,msg)=>{