diff --git a/src/pages/home/home.js b/src/pages/home/home.js index 119ebc62..b3761541 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -152,8 +152,6 @@ export default class App extends Component { path: "/home/order-list", }, ], - currentTime: new Date().getTime(), - timeOut: 15 * 60 * 1000, //设置超时时间: 1分 }; //打开菜单移入遮罩 openMouseMask() { diff --git a/src/pages/plan/key/detail/list.js b/src/pages/plan/key/detail/list.js index 8a3ba108..b4bcbb74 100644 --- a/src/pages/plan/key/detail/list.js +++ b/src/pages/plan/key/detail/list.js @@ -61,11 +61,11 @@ export default class acclist extends React.Component { page: 1, limit: 10, tabList: [ - { title: '全部', index: 0 }, - { title: '待使用', index: 1 }, - { title: '已使用', index: 2 }, - { title: '已完结', index: 3 }, - { title: '已作废', index: 4 } + { title: "全部", index: 0 }, + { title: "可使用", index: 1 }, + { title: "已使用", index: 2 }, + { title: "已完结", index: 3 }, + { title: "已作废", index: 4 }, ], distdata: [{ title: '士大夫大师傅' }], filterList: [ @@ -273,9 +273,11 @@ export default class acclist extends React.Component { this.getKeyCodeList(data) Notify.success('标记为使用成功') }, - (err) => {} - ) - }) + (err) => { + Notify.error(err); + } + ); + }); } if (key == 2) { let formdata = { @@ -293,24 +295,27 @@ export default class acclist extends React.Component { this.getKeyCodeList(data) Notify.success('作废成功') }, - (err) => {} - ) - }) + (err) => { + Notify.error(err); + } + ); + }); } if (key == 3) { - sessionStorage.setItem('keyCode', rowData.key) - this.props.history.push('/home/key-log') - sessionStorage.setItem('pathname2', '/home/key-log') + sessionStorage.setItem("keyCode", rowData.key); + // this.props.history.push("/home/key-log"); + window.open('#/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) { - cur_nav[0].items.push({ - path: '/home/key-log', - name: cur_nav[0].items[cur_nav[0].items.length - 1].name + '日志' - }) - } - sessionStorage.setItem('breaknav', JSON.stringify(cur_nav)) + // 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 + "日志", + // }); + // } + // sessionStorage.setItem("breaknav", JSON.stringify(cur_nav)); } } multipleCancel() { @@ -404,48 +409,55 @@ export default class acclist extends React.Component { width: 'auto' }, { - title: '总发放条数', - prop: 'total', - name: 'total', - width: 'auto', - type: 'normal' + title: "发放总数", + prop: "total", + name: "total", + width: "auto", + type: "normal", }, { - title: '剩余条数', - prop: 'residue', - name: 'residue', - width: 'auto', - type: 'normal' + title: "剩余总数", + prop: "residue", + name: "residue", + width: "auto", + type: "normal", }, { - title: '已使用条数', - name: 'usage', - prop: 'usage', - type: 'normal', - width: 'auto' + title: "使用总数", + name: "usage", + prop: "usage", + type: "normal", + width: "auto", }, { - title: '已过期条数', - name: 'overdue', - prop: 'overdue', - type: 'normal', - width: 'auto' + title: "失效总数", + name: "overdue", + prop: "overdue", + type: "normal", + width: "auto", }, { - title: '已作废条数', - name: 'invalid', - prop: 'invalid', - type: 'normal', - width: 'auto' + title: "作废总数", + name: "invalid", + prop: "invalid", + type: "normal", + width: "auto", }, { - title: '更新时间', - name: 'update_time', - prop: 'update_time', - type: 'normal', - width: 'auto' - } - ] + title: "已完结总数", + name: "end", + prop: "end", + type: "normal", + width: "auto", + }, + { + title: "更新时间", + name: "update_time", + prop: "update_time", + type: "normal", + width: "auto", + }, + ]; const date = ( 标记成已使用 - + 作废 日志 diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index 1ce89ad0..75a2e40e 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -96,11 +96,11 @@ const Column = [ width: '100px' }, { - title: '发放key总数', - name: 'grant', - type: 'normal', - prop: 'grant', - width: '110px' + title: "发放key码总数", + name: "grant", + type: "normal", + prop: "grant", + width: "110px", }, { title: '领取key总数', @@ -110,48 +110,75 @@ const Column = [ width: '120px' }, { - title: '已使用key总数', - name: 'usage', - type: 'normal', - prop: 'usage', - width: '120px' + title: "使用key码总数", + name: "usage", + type: "normal", + prop: "usage", + width: "120px", }, { - title: '沉默总数', - name: 'silent', - type: 'normal', - prop: 'silent', - width: '140px' + title: "作废key码总数", + name: "invalid", + type: "normal", + prop: "invalid", + width: "120px", }, { - title: '发放总价(预估)', - name: 'grant_total', - type: 'normal', - prop: 'grant_total', - width: '140px' + title: "可用key码总数", + name: "silent", + type: "normal", + prop: "silent", + width: "140px", }, { - title: '领取总价(预估)', - name: 'receive_total', - type: 'normal', - prop: 'receive_total', - width: '140px' + title: "失效key码总数", + name: "overdue", + type: "normal", + prop: "overdue", + width: "140px", }, { - title: '已使用总价(预估)', - name: 'usage_total', - type: 'normal', - prop: 'usage_total', - width: '140px' + title: "完结key码总数", + name: "end", + type: "normal", + prop: "end", + width: "140px", }, - { - title: '沉默总价(预估)', - name: 'silent_total', - type: 'normal', - prop: 'silent_total', - width: '140px' - } -] + // { + // title: "发放总价(预估)", + // name: "grant_total", + // type: "normal", + // prop: "grant_total", + // width: "140px", + // }, + // { + // title: "领取总价(预估)", + // name: "receive_total", + // type: "normal", + // prop: "receive_total", + // width: "140px", + // }, + // { + // title: "已使用总价(预估)", + // name: "usage_total", + // type: "normal", + // prop: "usage_total", + // width: "140px", + // },{ + // title: "已作废总价(预估)", + // name: "invalid_total", + // type: "normal", + // prop: "invalid_total", + // width: "140px", + // }, + // { + // title: "沉默总价(预估)", + // name: "silent_total", + // type: "normal", + // prop: "silent_total", + // width: "140px", + // }, +]; export default class acclist extends React.Component { constructor(props) { @@ -276,8 +303,9 @@ export default class acclist extends React.Component { handelResponse( res, (req, msg) => { - this.setState({ distdata: req.data }) - this.setState({ dataCount: req.total }) + this.setState({ distdata: req.data }); + this.setState({ dataCount: req.total }); + sessionStorage.setItem('key_plan_status',req.plan.status); }, (err) => {} ) diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 4da2b1e4..f84925ee 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -612,11 +612,11 @@ export default class acclist extends React.Component { width: 'auto' }, { - title: '发放key总数', - name: 'grant', - type: 'normal', - prop: 'grant', - width: 'auto' + title: "发放key码总数", + name: "grant", + type: "normal", + prop: "grant", + width: "auto", }, { title: '领取key总数', @@ -626,53 +626,81 @@ export default class acclist extends React.Component { width: 'auto' }, { - title: '已使用总数', - name: 'usage', - type: 'normal', - prop: 'usage', - width: 'auto' + title: "使用key码总数", + name: "usage", + type: "normal", + prop: "usage", + width: "auto", }, { - title: '沉默总数', - name: 'silent', - type: 'normal', - prop: 'silent', - width: 'auto' + title: "失效key码总数", + name: "overdue", + type: "normal", + prop: "overdue", + width: "auto", }, { - title: '发放总价(预估)', - name: 'grant_total', - type: 'normal', - prop: 'grant_total', - width: 'auto', - valueType: 'price' + title: "作废key码总数", + name: "invalid", + type: "normal", + prop: "invalid", + width: "auto", }, + { + title: "可用key码总数", + name: "silent", + type: "normal", + prop: "silent", + width: "auto", + }, + { + title: "完结key码总数", + name: "end", + type: "normal", + prop: "end", + width: "auto", + }, + // { + // title: "发放总价(预估)", + // name: "grant_total", + // type: "normal", + // prop: "grant_total", + // width: "auto", + // valueType: "price", + // }, - { - title: '领取总价(预估)', - name: 'receive_total', - type: 'normal', - prop: 'receive_total', - width: 'auto', - valueType: 'price' - }, - { - title: '已使用总价(预估)', - name: 'usage_total', - type: 'normal', - prop: 'usage_total', - width: 'auto', - valueType: 'price' - }, - { - title: '沉默总价(预估)', - name: 'silent_total', - type: 'normal', - prop: 'silent_total', - width: 'auto', - valueType: 'price' - } - ] + // { + // title: "领取总价(预估)", + // name: "receive_total", + // type: "normal", + // prop: "receive_total", + // width: "auto", + // valueType: "price", + // }, + // { + // title: "已使用总价(预估)", + // name: "usage_total", + // type: "normal", + // prop: "usage_total", + // width: "auto", + // valueType: "price", + // }, { + // title: "已作废总价(预估)", + // name: "invalid_total", + // type: "normal", + // prop: "invalid_total", + // width: "auto", + // valueType: "price", + // }, + // { + // title: "沉默总价(预估)", + // name: "silent_total", + // type: "normal", + // prop: "silent_total", + // width: "auto", + // valueType: "price", + // }, + ]; return (