Merge branch 'addMenu' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend into addMenu

This commit is contained in:
wangsongsole 2022-06-13 18:25:04 +08:00
commit f74789c1e7
4 changed files with 209 additions and 143 deletions

View File

@ -152,8 +152,6 @@ export default class App extends Component {
path: "/home/order-list", path: "/home/order-list",
}, },
], ],
currentTime: new Date().getTime(),
timeOut: 15 * 60 * 1000, //设置超时时间: 1分
}; };
//打开菜单移入遮罩 //打开菜单移入遮罩
openMouseMask() { openMouseMask() {

View File

@ -61,11 +61,11 @@ export default class acclist extends React.Component {
page: 1, page: 1,
limit: 10, limit: 10,
tabList: [ tabList: [
{ title: '全部', index: 0 }, { title: "全部", index: 0 },
{ title: '待使用', index: 1 }, { title: "可使用", index: 1 },
{ title: '已使用', index: 2 }, { title: "已使用", index: 2 },
{ title: '已完结', index: 3 }, { title: "已完结", index: 3 },
{ title: '已作废', index: 4 } { title: "已作废", index: 4 },
], ],
distdata: [{ title: '士大夫大师傅' }], distdata: [{ title: '士大夫大师傅' }],
filterList: [ filterList: [
@ -273,9 +273,11 @@ export default class acclist extends React.Component {
this.getKeyCodeList(data) this.getKeyCodeList(data)
Notify.success('标记为使用成功') Notify.success('标记为使用成功')
}, },
(err) => {} (err) => {
) Notify.error(err);
}) }
);
});
} }
if (key == 2) { if (key == 2) {
let formdata = { let formdata = {
@ -293,24 +295,27 @@ export default class acclist extends React.Component {
this.getKeyCodeList(data) this.getKeyCodeList(data)
Notify.success('作废成功') Notify.success('作废成功')
}, },
(err) => {} (err) => {
) Notify.error(err);
}) }
);
});
} }
if (key == 3) { if (key == 3) {
sessionStorage.setItem('keyCode', rowData.key) sessionStorage.setItem("keyCode", rowData.key);
this.props.history.push('/home/key-log') // this.props.history.push("/home/key-log");
sessionStorage.setItem('pathname2', '/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) { // if (cur_nav.length > 0 && cur_nav[0].items) {
cur_nav[0].items.push({ // cur_nav[0].items.push({
path: '/home/key-log', // path: "/home/key-log",
name: cur_nav[0].items[cur_nav[0].items.length - 1].name + '日志' // name: cur_nav[0].items[cur_nav[0].items.length - 1].name + "日志",
}) // });
} // }
sessionStorage.setItem('breaknav', JSON.stringify(cur_nav)) // sessionStorage.setItem("breaknav", JSON.stringify(cur_nav));
} }
} }
multipleCancel() { multipleCancel() {
@ -404,48 +409,55 @@ export default class acclist extends React.Component {
width: 'auto' width: 'auto'
}, },
{ {
title: '总发放条数', title: "发放总数",
prop: 'total', prop: "total",
name: 'total', name: "total",
width: 'auto', width: "auto",
type: 'normal' type: "normal",
}, },
{ {
title: '剩余条数', title: "剩余总数",
prop: 'residue', prop: "residue",
name: 'residue', name: "residue",
width: 'auto', width: "auto",
type: 'normal' type: "normal",
}, },
{ {
title: '已使用条数', title: "使用总数",
name: 'usage', name: "usage",
prop: 'usage', prop: "usage",
type: 'normal', type: "normal",
width: 'auto' width: "auto",
}, },
{ {
title: '已过期条数', title: "失效总数",
name: 'overdue', name: "overdue",
prop: 'overdue', prop: "overdue",
type: 'normal', type: "normal",
width: 'auto' width: "auto",
}, },
{ {
title: '已作废条数', title: "作废总数",
name: 'invalid', name: "invalid",
prop: 'invalid', prop: "invalid",
type: 'normal', type: "normal",
width: 'auto' width: "auto",
}, },
{ {
title: '更新时间', title: "已完结总数",
name: 'update_time', name: "end",
prop: 'update_time', prop: "end",
type: 'normal', type: "normal",
width: 'auto' width: "auto",
} },
] {
title: "更新时间",
name: "update_time",
prop: "update_time",
type: "normal",
width: "auto",
},
];
const date = ( const date = (
<CombinedDateRangePicker <CombinedDateRangePicker
className='zent-datepicker-demo' className='zent-datepicker-demo'
@ -637,7 +649,7 @@ export default class acclist extends React.Component {
<MenuItem key='1' disabled> <MenuItem key='1' disabled>
标记成已使用 标记成已使用
</MenuItem> </MenuItem>
<MenuItem key='2' disabled> <MenuItem key="2" disabled={rowData.status !=2}>
作废 作废
</MenuItem> </MenuItem>
<MenuItem key='3'>日志</MenuItem> <MenuItem key='3'>日志</MenuItem>

View File

@ -96,11 +96,11 @@ const Column = [
width: '100px' width: '100px'
}, },
{ {
title: '发放key总数', title: "发放key码总数",
name: 'grant', name: "grant",
type: 'normal', type: "normal",
prop: 'grant', prop: "grant",
width: '110px' width: "110px",
}, },
{ {
title: '领取key总数', title: '领取key总数',
@ -110,48 +110,75 @@ const Column = [
width: '120px' width: '120px'
}, },
{ {
title: '已使用key总数', title: "使用key码总数",
name: 'usage', name: "usage",
type: 'normal', type: "normal",
prop: 'usage', prop: "usage",
width: '120px' width: "120px",
}, },
{ {
title: '沉默总数', title: "作废key码总数",
name: 'silent', name: "invalid",
type: 'normal', type: "normal",
prop: 'silent', prop: "invalid",
width: '140px' width: "120px",
}, },
{ {
title: '发放总价(预估)', title: "可用key码总数",
name: 'grant_total', name: "silent",
type: 'normal', type: "normal",
prop: 'grant_total', prop: "silent",
width: '140px' width: "140px",
}, },
{ {
title: '领取总价(预估)', title: "失效key码总数",
name: 'receive_total', name: "overdue",
type: 'normal', type: "normal",
prop: 'receive_total', prop: "overdue",
width: '140px' width: "140px",
}, },
{ {
title: '已使用总价(预估)', title: "完结key码总数",
name: 'usage_total', name: "end",
type: 'normal', type: "normal",
prop: 'usage_total', prop: "end",
width: '140px' width: "140px",
}, },
{ // {
title: '沉默总价(预估)', // title: "发放总价(预估)",
name: 'silent_total', // name: "grant_total",
type: 'normal', // type: "normal",
prop: 'silent_total', // prop: "grant_total",
width: '140px' // 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 { export default class acclist extends React.Component {
constructor(props) { constructor(props) {
@ -276,8 +303,9 @@ export default class acclist extends React.Component {
handelResponse( handelResponse(
res, res,
(req, msg) => { (req, msg) => {
this.setState({ distdata: req.data }) this.setState({ distdata: req.data });
this.setState({ dataCount: req.total }) this.setState({ dataCount: req.total });
sessionStorage.setItem('key_plan_status',req.plan.status);
}, },
(err) => {} (err) => {}
) )

View File

@ -612,11 +612,11 @@ export default class acclist extends React.Component {
width: 'auto' width: 'auto'
}, },
{ {
title: '发放key总数', title: "发放key码总数",
name: 'grant', name: "grant",
type: 'normal', type: "normal",
prop: 'grant', prop: "grant",
width: 'auto' width: "auto",
}, },
{ {
title: '领取key总数', title: '领取key总数',
@ -626,53 +626,81 @@ export default class acclist extends React.Component {
width: 'auto' width: 'auto'
}, },
{ {
title: '已使用总数', title: "使用key码总数",
name: 'usage', name: "usage",
type: 'normal', type: "normal",
prop: 'usage', prop: "usage",
width: 'auto' width: "auto",
}, },
{ {
title: '沉默总数', title: "失效key码总数",
name: 'silent', name: "overdue",
type: 'normal', type: "normal",
prop: 'silent', prop: "overdue",
width: 'auto' width: "auto",
}, },
{ {
title: '发放总价(预估)', title: "作废key码总数",
name: 'grant_total', name: "invalid",
type: 'normal', type: "normal",
prop: 'grant_total', prop: "invalid",
width: 'auto', width: "auto",
valueType: 'price'
}, },
{
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: '领取总价(预估)', // title: "领取总价(预估)",
name: 'receive_total', // name: "receive_total",
type: 'normal', // type: "normal",
prop: 'receive_total', // prop: "receive_total",
width: 'auto', // width: "auto",
valueType: 'price' // valueType: "price",
}, // },
{ // {
title: '已使用总价(预估)', // title: "已使用总价(预估)",
name: 'usage_total', // name: "usage_total",
type: 'normal', // type: "normal",
prop: 'usage_total', // prop: "usage_total",
width: 'auto', // width: "auto",
valueType: 'price' // valueType: "price",
}, // }, {
{ // title: "已作废总价(预估)",
title: '沉默总价(预估)', // name: "invalid_total",
name: 'silent_total', // type: "normal",
type: 'normal', // prop: "invalid_total",
prop: 'silent_total', // width: "auto",
width: 'auto', // valueType: "price",
valueType: 'price' // },
} // {
] // title: "沉默总价(预估)",
// name: "silent_total",
// type: "normal",
// prop: "silent_total",
// width: "auto",
// valueType: "price",
// },
];
return ( return (
<div id='dislist'> <div id='dislist'>
<TabPage tabs={this.state.tabList}> <TabPage tabs={this.state.tabList}>