配置新建兑换码路由以及新建兑换码相关文件

This commit is contained in:
wangsongsole 2022-08-25 11:00:28 +08:00
parent 3d733e2205
commit 2f2c7b746b
6 changed files with 1634 additions and 18 deletions

View File

@ -90,6 +90,7 @@ export default class topNav extends React.Component {
pathnamestr.includes('add') ||
pathnamestr.includes('aid') ||
pathnamestr.includes('exchangecode-copyCode') ||
pathnamestr.includes('exchangecode-exchangecodeAdd') ||
pathnamestr.includes('distributor-edit') ||
pathnamestr.includes('key-list') ||
pathnamestr.includes('key-detail') ||

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
.edit-btnList{
width: 90%;
margin: 0 auto;
button{
width: 100px;
}
.goods-boxs{
display: flex;
justify-content: flex-start;
}
}

View File

@ -1,5 +1,11 @@
import React from 'react'
import { Sweetalert, CombinedDateRangePicker, Notify, Switch } from 'zent'
import {
Sweetalert,
CombinedDateRangePicker,
Notify,
Switch,
Button
} from 'zent'
import './list.less'
import _ from 'lodash'
import '../../../assets/comm.css'
@ -14,7 +20,6 @@ import {
putCodeStatus,
terminateApprovals
} from '../../../assets/api.js'
var moment = require('moment')
const Column = [
{
title: '兑换码-批次ID',
@ -142,28 +147,29 @@ export default class acclist extends React.Component {
tabIndex: 0
}
}
clickFn() {
this.props.history.push('/home/exchangecode-add')
sessionStorage.setItem('pathname2', '/home/exchangecode-add')
/* 新建兑换码 */
addCodeFunction() {
let activerou = [
{
pagetitle: '新建',
pagetitle: '新建兑换码',
items: [
{
path: '/home/exchangecode-list',
name: '兑换码管理'
},
{
path: '/home/exchangecode-add',
path: '/home/exchangecode-exchangecodeAdd',
name: '新建兑换码'
}
]
}
]
sessionStorage.setItem('breaknav', JSON.stringify(activerou))
sessionStorage.setItem('pathname2', '/home/exchangecode-exchangecodeAdd')
this.props.history.push('/home/exchangecode-exchangecodeAdd')
}
aboutFn(e, row) {
// this.props.history.push('/home/exchange-addcommodity');
sessionStorage.setItem('pathname2', '/home/exchange-addcommodity')
let activerou = [
{
@ -486,7 +492,6 @@ export default class acclist extends React.Component {
}}
/>
)
const { current, pageSize } = this.state
return (
<div id='exchangecodelist'>
<TabPage
@ -494,9 +499,13 @@ export default class acclist extends React.Component {
tabs={this.state.tabList}
tabChange={this.tabFn.bind(this)}
width={130}>
<div className='codetable dflexajce'>
{/* <Button type="primary" icon="plus" onClick={this.clickFn.bind(this)}>新建兑换码</Button> */}
{/* <Button type="info">批量操作</Button> */}
<div className='codetable '>
<Button
type='primary'
icon='plus'
onClick={this.addCodeFunction.bind(this)}>
新建兑换码
</Button>
<Ipt
onClearItem={(e) => {
this.setState({ key_word: '' })

View File

@ -1,18 +1,24 @@
#exchangecodelist{
#exchangecodelist {
width: 98%;
margin: 0 auto;
.codetable{
.codetable {
padding: 24px;
display: flex;
justify-content: space-between;
}
.code-table{
.code-table {
border-top: 1px solid #e0e0e0;
padding-bottom: 24px;
}
.grid-link{
.grid-link {
color: #2B66F2;
cursor: pointer;
}
.zent-datepicker-trigger{
background: #f5f6f7!important;
.zent-datepicker-trigger {
background: #f5f6f7 !important;
}
}

View File

@ -38,6 +38,7 @@ import DistriButorEdit from '@/pages/distributor/add/add'
import MyTempMouldAdd from '@/pages/exchangepage/template/main.js'
import MyExChangeTemplate from '@/pages/exchangepage/mytemplate/main.js'
import CopyCode from '@/pages/exchangecode/copyCode/index'
import ExchangeCodeAdds from '@/pages/exchangecode/exchangecodeAdd'
/* 基础路由 */
const router = [
@ -240,6 +241,11 @@ const router = [
path: '/home/system/account-list',
component: AccountList,
meta: { exact: true }
},
{
path: '/home/exchangecode-exchangecodeAdd',
component: ExchangeCodeAdds,
meta: { exact: true }
}
]