修改ESLint问题
This commit is contained in:
parent
701eb95f03
commit
8db86081eb
@ -1,5 +1,5 @@
|
||||
const Mock = require('mockjs')
|
||||
const {param2Obj} = require('./utils')
|
||||
const { param2Obj } = require('./utils')
|
||||
|
||||
const user = require('./user')
|
||||
const table = require('./table')
|
||||
@ -16,7 +16,7 @@ function mockXHR() {
|
||||
// mock patch
|
||||
// https://github.com/nuysoft/Mock/issues/300
|
||||
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
|
||||
Mock.XHR.prototype.send = function () {
|
||||
Mock.XHR.prototype.send = function() {
|
||||
if (this.custom.xhr) {
|
||||
this.custom.xhr.withCredentials = this.withCredentials || false
|
||||
|
||||
@ -28,10 +28,10 @@ function mockXHR() {
|
||||
}
|
||||
|
||||
function XHR2ExpressReqWrap(respond) {
|
||||
return function (options) {
|
||||
return function(options) {
|
||||
let result = null
|
||||
if (respond instanceof Function) {
|
||||
const {body, type, url} = options
|
||||
const { body, type, url } = options
|
||||
// https://expressjs.com/en/4x/api.html#req
|
||||
result = respond({
|
||||
method: type,
|
||||
|
@ -8,7 +8,7 @@ const mockDir = path.join(process.cwd(), 'mock')
|
||||
|
||||
function registerRoutes(app) {
|
||||
let mockLastIndex
|
||||
const {mocks} = require('./index.js')
|
||||
const { mocks } = require('./index.js')
|
||||
const mocksForServer = mocks.map(route => {
|
||||
return responseFake(route.url, route.type, route.response)
|
||||
})
|
||||
|
@ -28,7 +28,7 @@ module.exports = [
|
||||
url: '/vue-admin-template/user/login',
|
||||
type: 'post',
|
||||
response: config => {
|
||||
const {username} = config.body
|
||||
const { username } = config.body
|
||||
const token = tokens[username]
|
||||
|
||||
// mock error
|
||||
@ -51,7 +51,7 @@ module.exports = [
|
||||
url: '/vue-admin-template/user/info\.*',
|
||||
type: 'get',
|
||||
response: config => {
|
||||
const {token} = config.query
|
||||
const { token } = config.query
|
||||
const info = users[token]
|
||||
|
||||
// mock error
|
||||
|
@ -13,6 +13,5 @@
|
||||
to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -66,7 +66,7 @@ export default {
|
||||
return request({
|
||||
url: `${api_name}/doAssign`,
|
||||
method: 'post',
|
||||
params: {roleId, permissionId}
|
||||
params: { roleId, permissionId }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -5,11 +5,11 @@ const api_name = '/admin/acl/user'
|
||||
/*
|
||||
登陆
|
||||
*/
|
||||
export function login({username, password}) {
|
||||
export function login({ username, password }) {
|
||||
return request({
|
||||
url: '/admin/acl/index/login',
|
||||
method: 'post',
|
||||
data: {username, password}
|
||||
data: { username, password }
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
export * as user from './acl/user'
|
||||
export {default as role} from './acl/role'
|
||||
export {default as permission} from './acl/permission'
|
||||
export { default as role } from './acl/role'
|
||||
export { default as permission } from './acl/permission'
|
||||
|
@ -12,7 +12,7 @@ export function getInfo(token) {
|
||||
return request({
|
||||
url: '/admin/acl/index/info',
|
||||
method: 'get',
|
||||
params: {token}
|
||||
params: { token }
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{
|
||||
item.meta.title
|
||||
}}</span>
|
||||
item.meta.title
|
||||
}}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
const first = matched[0]
|
||||
|
||||
if (!this.isDashboard(first)) {
|
||||
matched = [{path: '/dashboard', meta: {title: 'Dashboard'}}].concat(matched)
|
||||
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
|
||||
}
|
||||
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
@ -49,12 +49,12 @@ export default {
|
||||
},
|
||||
pathCompile(path) {
|
||||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
||||
const {params} = this.$route
|
||||
const { params } = this.$route
|
||||
var toPath = pathToRegexp.compile(path)
|
||||
return toPath(params)
|
||||
},
|
||||
handleLink(item) {
|
||||
const {redirect, path} = item
|
||||
const { redirect, path } = item
|
||||
if (redirect) {
|
||||
this.$router.push(redirect)
|
||||
return
|
||||
|
@ -9,7 +9,8 @@
|
||||
height="64"
|
||||
>
|
||||
<path
|
||||
d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"/>
|
||||
d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-tooltip :content="title" placement="top-start">
|
||||
<el-button v-bind="$attrs" v-on="$listeners"/>
|
||||
<el-button v-bind="$attrs" v-on="$listeners" />
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners"/>
|
||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
||||
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
||||
<use :xlink:href="iconName"/>
|
||||
<use :xlink:href="iconName" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
|
||||
import {isExternal} from '@/utils/validate'
|
||||
import { isExternal } from '@/utils/validate'
|
||||
|
||||
export default {
|
||||
name: 'SvgIcon',
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<section class="app-main">
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
<router-view :key="key"/>
|
||||
<router-view :key="key" />
|
||||
</transition>
|
||||
</section>
|
||||
</template>
|
||||
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar"/>
|
||||
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb class="breadcrumb-container"/>
|
||||
<breadcrumb class="breadcrumb-container" />
|
||||
|
||||
<div class="right-menu">
|
||||
<el-dropdown class="avatar-container" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar">
|
||||
<i class="el-icon-caret-bottom"/>
|
||||
<i class="el-icon-caret-bottom" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown" class="user-dropdown">
|
||||
<router-link to="/">
|
||||
@ -32,7 +32,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
|
||||
|
@ -13,7 +13,7 @@ export default {
|
||||
}
|
||||
},
|
||||
render(h, context) {
|
||||
const {icon, title} = context.props
|
||||
const { icon, title } = context.props
|
||||
const vnodes = []
|
||||
|
||||
if (icon) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<component :is="type" v-bind="linkProps(to)">
|
||||
<slot/>
|
||||
<slot />
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {isExternal} from '@/utils/validate'
|
||||
import { isExternal } from '@/utils/validate'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<div v-if="!item.hidden">
|
||||
<template
|
||||
v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||
v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"
|
||||
>
|
||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title"/>
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
</template>
|
||||
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template slot="title">
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title"/>
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||
</template>
|
||||
<sidebar-item
|
||||
v-for="child in item.children"
|
||||
@ -27,14 +28,14 @@
|
||||
|
||||
<script>
|
||||
import path from 'path'
|
||||
import {isExternal} from '@/utils/validate'
|
||||
import { isExternal } from '@/utils/validate'
|
||||
import Item from './Item'
|
||||
import AppLink from './Link'
|
||||
import FixiOSBug from './FixiOSBug'
|
||||
|
||||
export default {
|
||||
name: 'SidebarItem',
|
||||
components: {Item, AppLink},
|
||||
components: { Item, AppLink },
|
||||
mixins: [FixiOSBug],
|
||||
props: {
|
||||
// route object
|
||||
@ -76,7 +77,7 @@ export default {
|
||||
|
||||
// Show parent if there are no child router to display
|
||||
if (showingChildren.length === 0) {
|
||||
this.onlyOneChild = {...parent, path: '', noShowingChildren: true}
|
||||
this.onlyOneChild = { ...parent, path: '', noShowingChildren: true }
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div :class="{'has-logo':showLogo}">
|
||||
<logo v-if="showLogo" :collapse="isCollapse"/>
|
||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
@ -12,20 +12,20 @@
|
||||
:collapse-transition="false"
|
||||
mode="vertical"
|
||||
>
|
||||
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path"/>
|
||||
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
|
||||
</el-menu>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Logo from './Logo'
|
||||
import SidebarItem from './SidebarItem'
|
||||
import variables from '@/styles/variables.scss'
|
||||
|
||||
export default {
|
||||
components: {SidebarItem, Logo},
|
||||
components: { SidebarItem, Logo },
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar'
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
},
|
||||
activeMenu() {
|
||||
const route = this.$route
|
||||
const {meta, path} = route
|
||||
const { meta, path } = route
|
||||
// if set path, the sidebar will highlight the path you set
|
||||
if (meta.activeMenu) {
|
||||
return meta.activeMenu
|
||||
|
@ -1,3 +1,3 @@
|
||||
export {default as Navbar} from './Navbar'
|
||||
export {default as Sidebar} from './Sidebar'
|
||||
export {default as AppMain} from './AppMain'
|
||||
export { default as Navbar } from './Navbar'
|
||||
export { default as Sidebar } from './Sidebar'
|
||||
export { default as AppMain } from './AppMain'
|
||||
|
@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<div :class="classObj" class="app-wrapper">
|
||||
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
|
||||
<sidebar class="sidebar-container"/>
|
||||
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
||||
<sidebar class="sidebar-container" />
|
||||
<div class="main-container">
|
||||
<div :class="{'fixed-header':fixedHeader}">
|
||||
<navbar/>
|
||||
<navbar />
|
||||
</div>
|
||||
<app-main/>
|
||||
<app-main />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Navbar, Sidebar, AppMain} from './components'
|
||||
import { Navbar, Sidebar, AppMain } from './components'
|
||||
import ResizeMixin from './mixin/ResizeHandler'
|
||||
|
||||
export default {
|
||||
@ -44,7 +44,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch('app/closeSideBar', {withoutAnimation: false})
|
||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
import store from '@/store'
|
||||
|
||||
const {body} = document
|
||||
const { body } = document
|
||||
const WIDTH = 992 // refer to Bootstrap's responsive design
|
||||
|
||||
export default {
|
||||
watch: {
|
||||
$route(route) {
|
||||
if (this.device === 'mobile' && this.sidebar.opened) {
|
||||
store.dispatch('app/closeSideBar', {withoutAnimation: false})
|
||||
store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -21,7 +21,7 @@ export default {
|
||||
const isMobile = this.$_isMobile()
|
||||
if (isMobile) {
|
||||
store.dispatch('app/toggleDevice', 'mobile')
|
||||
store.dispatch('app/closeSideBar', {withoutAnimation: true})
|
||||
store.dispatch('app/closeSideBar', { withoutAnimation: true })
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -37,7 +37,7 @@ export default {
|
||||
store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
|
||||
|
||||
if (isMobile) {
|
||||
store.dispatch('app/closeSideBar', {withoutAnimation: true})
|
||||
store.dispatch('app/closeSideBar', { withoutAnimation: true })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,12 +32,12 @@ Vue.prototype.$hasBP = hasBtnPermission
|
||||
* please remove it before going online ! ! !
|
||||
*/
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
const {mockXHR} = require('../mock')
|
||||
const { mockXHR } = require('../mock')
|
||||
mockXHR()
|
||||
}
|
||||
|
||||
// set ElementUI lang to EN
|
||||
Vue.use(ElementUI, {locale})
|
||||
Vue.use(ElementUI, { locale })
|
||||
// 如果想要中文版 element-ui,按如下方式声明
|
||||
// Vue.use(ElementUI)
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import {Message} from 'element-ui'
|
||||
import { Message } from 'element-ui'
|
||||
import NProgress from 'nprogress' // progress bar
|
||||
import 'nprogress/nprogress.css' // progress bar style
|
||||
import {getToken} from '@/utils/auth' // get token from cookie
|
||||
import { getToken } from '@/utils/auth' // get token from cookie
|
||||
import getPageTitle from '@/utils/get-page-title'
|
||||
|
||||
NProgress.configure({showSpinner: false}) // NProgress Configuration
|
||||
NProgress.configure({ showSpinner: false }) // NProgress Configuration
|
||||
|
||||
const whiteList = ['/login'] // no redirect whitelist
|
||||
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
router.beforeEach(async(to, from, next) => {
|
||||
// start progress bar
|
||||
NProgress.start()
|
||||
|
||||
@ -23,7 +23,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (hasToken) {
|
||||
if (to.path === '/login') {
|
||||
// if is logged in, redirect to the home page
|
||||
next({path: '/'})
|
||||
next({ path: '/' })
|
||||
NProgress.done()
|
||||
} else {
|
||||
const hasGetUserInfo = store.getters.name
|
||||
|
@ -51,7 +51,7 @@ export const constantRoutes = [
|
||||
path: 'dashboard',
|
||||
name: 'Dashboard',
|
||||
component: () => import('@/views/dashboard/index'),
|
||||
meta: {title: 'Dashboard', icon: 'dashboard'}
|
||||
meta: { title: 'Dashboard', icon: 'dashboard' }
|
||||
}]
|
||||
},
|
||||
|
||||
@ -130,88 +130,88 @@ export const constantRoutes = [
|
||||
path: '/product',
|
||||
component: Layout,
|
||||
redirect: '/product/category/list',
|
||||
meta: {title: '商品信息管理', icon: 'dashboard'},
|
||||
meta: { title: '商品信息管理', icon: 'dashboard' },
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: 'category/list',
|
||||
name: 'Category',
|
||||
component: () => import('@/views/product/category/list'),
|
||||
meta: {title: '商品分类'}
|
||||
meta: { title: '商品分类' }
|
||||
},
|
||||
{
|
||||
path: 'category/add',
|
||||
name: 'CategoryAdd',
|
||||
component: () => import('@/views/product/category/form'),
|
||||
meta: {title: '添加'},
|
||||
meta: { title: '添加' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'category/edit/:id',
|
||||
name: 'CategoryEdit',
|
||||
component: () => import('@/views/product/category/form'),
|
||||
meta: {title: '编辑', noCache: true},
|
||||
meta: { title: '编辑', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'attrGroup/list',
|
||||
name: 'AttrGroup',
|
||||
component: () => import('@/views/product/attrGroup/list'),
|
||||
meta: {title: '平台属性分组'}
|
||||
meta: { title: '平台属性分组' }
|
||||
},
|
||||
{
|
||||
path: 'attrGroup/add',
|
||||
name: 'AttrGroupAdd',
|
||||
component: () => import('@/views/product/attrGroup/form'),
|
||||
meta: {title: '添加'},
|
||||
meta: { title: '添加' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'attrGroup/edit/:id',
|
||||
name: 'AttrGroupEdit',
|
||||
component: () => import('@/views/product/attrGroup/form'),
|
||||
meta: {title: '编辑', noCache: true},
|
||||
meta: { title: '编辑', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'attr/list/:id',
|
||||
name: 'AttrList',
|
||||
component: () => import('@/views/product/attr/list'),
|
||||
meta: {title: '平台属性列表', noCache: true},
|
||||
meta: { title: '平台属性列表', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'attr/add',
|
||||
name: 'AttrAdd',
|
||||
component: () => import('@/views/product/attr/form'),
|
||||
meta: {title: '添加'},
|
||||
meta: { title: '添加' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'attr/edit/:id',
|
||||
name: 'AttrEdit',
|
||||
component: () => import('@/views/product/attr/form'),
|
||||
meta: {title: '编辑', noCache: true},
|
||||
meta: { title: '编辑', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'skuInfo/list',
|
||||
name: 'SkuInfo',
|
||||
component: () => import('@/views/product/skuInfo/list'),
|
||||
meta: {title: 'SKU列表'}
|
||||
meta: { title: 'SKU列表' }
|
||||
},
|
||||
{
|
||||
path: 'skuInfo/add',
|
||||
name: 'SkuInfoAdd',
|
||||
component: () => import('@/views/product/skuInfo/form'),
|
||||
meta: {title: '添加'},
|
||||
meta: { title: '添加' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'skuInfo/edit/:id',
|
||||
name: 'SkuInfoEdit',
|
||||
component: () => import('@/views/product/skuInfo/form'),
|
||||
meta: {title: '编辑', noCache: true},
|
||||
meta: { title: '编辑', noCache: true },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -222,7 +222,7 @@ export const constantRoutes = [
|
||||
component: Layout,
|
||||
redirect: '/activity/seckill',
|
||||
name: 'Activity',
|
||||
meta: {title: '营销活动管理', icon: 'dashboard'},
|
||||
meta: { title: '营销活动管理', icon: 'dashboard' },
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
// {
|
||||
@ -257,54 +257,54 @@ export const constantRoutes = [
|
||||
path: 'activityInfo/list',
|
||||
name: 'ActivityInfo',
|
||||
component: () => import('@/views/activity/activityInfo/list'),
|
||||
meta: {title: '活动列表'}
|
||||
meta: { title: '活动列表' }
|
||||
},
|
||||
{
|
||||
path: 'activityInfo/add',
|
||||
name: 'ActivityInfoAdd',
|
||||
component: () => import('@/views/activity/activityInfo/form'),
|
||||
meta: {title: '添加'},
|
||||
meta: { title: '添加' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'activityInfo/edit/:id',
|
||||
name: 'ActivityInfoEdit',
|
||||
component: () => import('@/views/activity/activityInfo/form'),
|
||||
meta: {title: '编辑', noCache: true},
|
||||
meta: { title: '编辑', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'activityInfo/rule/:id',
|
||||
name: 'ActivityInfoRule',
|
||||
component: () => import('@/views/activity/activityInfo/rule'),
|
||||
meta: {title: '规则', noCache: true},
|
||||
meta: { title: '规则', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'couponInfo/list',
|
||||
name: 'CouponInfo',
|
||||
component: () => import('@/views/activity/couponInfo/list'),
|
||||
meta: {title: '优惠券列表'}
|
||||
meta: { title: '优惠券列表' }
|
||||
},
|
||||
{
|
||||
path: 'couponInfo/add',
|
||||
name: 'CouponInfoAdd',
|
||||
component: () => import('@/views/activity/couponInfo/form'),
|
||||
meta: {title: '添加'},
|
||||
meta: { title: '添加' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'couponInfo/edit/:id',
|
||||
name: 'CouponInfoEdit',
|
||||
component: () => import('@/views/activity/couponInfo/form'),
|
||||
meta: {title: '编辑', noCache: true},
|
||||
meta: { title: '编辑', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'couponInfo/rule/:id',
|
||||
name: 'CouponInfoRule',
|
||||
component: () => import('@/views/activity/couponInfo/rule'),
|
||||
meta: {title: '规则', noCache: true},
|
||||
meta: { title: '规则', noCache: true },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -315,20 +315,20 @@ export const constantRoutes = [
|
||||
component: Layout,
|
||||
redirect: '/user/leader/list',
|
||||
name: 'Leader',
|
||||
meta: {title: '团长管理', icon: 'table'},
|
||||
meta: { title: '团长管理', icon: 'table' },
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: 'leader/checkList',
|
||||
name: 'LeaderCheck',
|
||||
component: () => import('@/views/user/leader/checkList'),
|
||||
meta: {title: '团长待审核'}
|
||||
meta: { title: '团长待审核' }
|
||||
},
|
||||
{
|
||||
path: 'leader/list',
|
||||
name: 'leader',
|
||||
component: () => import('@/views/user/leader/list'),
|
||||
meta: {title: '团长已审核'}
|
||||
meta: { title: '团长已审核' }
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -338,38 +338,38 @@ export const constantRoutes = [
|
||||
path: '/order',
|
||||
component: Layout,
|
||||
redirect: '/order/orderInfo/list',
|
||||
meta: {title: '订单管理', icon: 'table'},
|
||||
meta: { title: '订单管理', icon: 'table' },
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: 'orderInfo/list',
|
||||
name: 'OrderInfo',
|
||||
component: () => import('@/views/order/orderInfo/list'),
|
||||
meta: {title: '订单列表'}
|
||||
meta: { title: '订单列表' }
|
||||
},
|
||||
{
|
||||
path: 'orderInfo/show/:id',
|
||||
name: 'OrderInfoShow',
|
||||
component: () => import('@/views/order/orderInfo/show'),
|
||||
meta: {title: '查看', noCache: true},
|
||||
meta: { title: '查看', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'orderInfo/deliverList',
|
||||
name: 'DetailList',
|
||||
component: () => import('@/views/order/orderInfo/deliverList'),
|
||||
meta: {title: '发货列表'}
|
||||
meta: { title: '发货列表' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// 404 page must be placed at the end !!!
|
||||
{path: '*', redirect: '/404', hidden: true}
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
]
|
||||
|
||||
const createRouter = () => new Router({
|
||||
// mode: 'history', // require service support
|
||||
scrollBehavior: () => ({y: 0}),
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes
|
||||
})
|
||||
|
||||
|
@ -29,13 +29,13 @@ const mutations = {
|
||||
}
|
||||
|
||||
const actions = {
|
||||
toggleSideBar({commit}) {
|
||||
toggleSideBar({ commit }) {
|
||||
commit('TOGGLE_SIDEBAR')
|
||||
},
|
||||
closeSideBar({commit}, {withoutAnimation}) {
|
||||
closeSideBar({ commit }, { withoutAnimation }) {
|
||||
commit('CLOSE_SIDEBAR', withoutAnimation)
|
||||
},
|
||||
toggleDevice({commit}, device) {
|
||||
toggleDevice({ commit }, device) {
|
||||
commit('TOGGLE_DEVICE', device)
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import defaultSettings from '@/settings'
|
||||
|
||||
const {showSettings, fixedHeader, sidebarLogo} = defaultSettings
|
||||
const { showSettings, fixedHeader, sidebarLogo } = defaultSettings
|
||||
|
||||
const state = {
|
||||
showSettings: showSettings,
|
||||
@ -9,7 +9,7 @@ const state = {
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
CHANGE_SETTING: (state, {key, value}) => {
|
||||
CHANGE_SETTING: (state, { key, value }) => {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (state.hasOwnProperty(key)) {
|
||||
state[key] = value
|
||||
@ -18,7 +18,7 @@ const mutations = {
|
||||
}
|
||||
|
||||
const actions = {
|
||||
changeSetting({commit}, data) {
|
||||
changeSetting({ commit }, data) {
|
||||
commit('CHANGE_SETTING', data)
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {login, logout, getInfo} from '@/api/user'
|
||||
import {getToken, setToken, removeToken} from '@/utils/auth'
|
||||
import {resetRouter} from '@/router'
|
||||
import { login, logout, getInfo } from '@/api/user'
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||
import { resetRouter } from '@/router'
|
||||
|
||||
const getDefaultState = () => {
|
||||
return {
|
||||
@ -29,11 +29,11 @@ const mutations = {
|
||||
|
||||
const actions = {
|
||||
// user login
|
||||
login({commit}, userInfo) {
|
||||
const {username, password} = userInfo
|
||||
login({ commit }, userInfo) {
|
||||
const { username, password } = userInfo
|
||||
return new Promise((resolve, reject) => {
|
||||
login({username: username.trim(), password: password}).then(response => {
|
||||
const {data} = response
|
||||
login({ username: username.trim(), password: password }).then(response => {
|
||||
const { data } = response
|
||||
commit('SET_TOKEN', data.token)
|
||||
setToken(data.token)
|
||||
resolve()
|
||||
@ -44,16 +44,16 @@ const actions = {
|
||||
},
|
||||
|
||||
// get user info
|
||||
getInfo({commit, state}) {
|
||||
getInfo({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo(state.token).then(response => {
|
||||
const {data} = response
|
||||
const { data } = response
|
||||
|
||||
if (!data) {
|
||||
return reject('Verification failed, please Login again.')
|
||||
}
|
||||
|
||||
const {name, avatar} = data
|
||||
const { name, avatar } = data
|
||||
|
||||
commit('SET_NAME', name)
|
||||
commit('SET_AVATAR', avatar)
|
||||
@ -65,7 +65,7 @@ const actions = {
|
||||
},
|
||||
|
||||
// user logout
|
||||
logout({commit, state}) {
|
||||
logout({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout(state.token).then(() => {
|
||||
removeToken() // must remove token first
|
||||
@ -79,7 +79,7 @@ const actions = {
|
||||
},
|
||||
|
||||
// remove token
|
||||
resetToken({commit}) {
|
||||
resetToken({ commit }) {
|
||||
return new Promise(resolve => {
|
||||
removeToken() // must remove token first
|
||||
commit('RESET_STATE')
|
||||
|
@ -1,7 +1,7 @@
|
||||
import axios from 'axios'
|
||||
import {MessageBox, Message} from 'element-ui'
|
||||
import { MessageBox, Message } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import {getToken} from '@/utils/auth'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
// create an axios instance
|
||||
const service = axios.create({
|
||||
|
@ -14,20 +14,32 @@
|
||||
:tree-props="{children: 'children'}"
|
||||
>
|
||||
|
||||
<el-table-column prop="name" label="菜单名称" width="200"/>
|
||||
<el-table-column prop="name" label="菜单名称" width="200" />
|
||||
|
||||
<el-table-column prop="code" label="权限标识" width="180"/>
|
||||
<el-table-column prop="code" label="权限标识" width="180" />
|
||||
|
||||
<el-table-column prop="createTime" label="创建时间" width="200"/>
|
||||
<el-table-column prop="createTime" label="创建时间" width="200" />
|
||||
|
||||
<el-table-column prop="updateTime" label="修改时间" width="200"/>
|
||||
<el-table-column prop="updateTime" label="修改时间" width="200" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.type !== 2" type="success" icon="el-icon-plus" size="mini" title="添加下级节点"
|
||||
@click="add(scope.row)"/>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" title="修改" @click="edit(scope.row)"/>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" title="删除"
|
||||
:disabled="scope.row.children.length > 0" @click="removeDataById(scope.row.id)"/>
|
||||
<el-button
|
||||
v-if="scope.row.type !== 2"
|
||||
type="success"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
title="添加下级节点"
|
||||
@click="add(scope.row)"
|
||||
/>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" title="修改" @click="edit(scope.row)" />
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
title="删除"
|
||||
:disabled="scope.row.children.length > 0"
|
||||
@click="removeDataById(scope.row.id)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -35,7 +47,7 @@
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
|
||||
<el-form ref="dataForm" :model="sysMenu" label-width="150px" size="small" style="padding-right: 40px;">
|
||||
<el-form-item v-if="sysMenu.id === ''" label="上级部门">
|
||||
<el-input v-model="sysMenu.parentName" disabled="true"/>
|
||||
<el-input v-model="sysMenu.parentName" disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="菜单类型" prop="type">
|
||||
<el-radio-group v-model="sysMenu.type" :disabled="typeDisabled">
|
||||
@ -45,24 +57,26 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="菜单名称" prop="name">
|
||||
<el-input v-model="sysMenu.name"/>
|
||||
<el-input v-model="sysMenu.name" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="sysMenu.type !== 0" prop="to_code">
|
||||
<span slot="label">
|
||||
<el-tooltip content="访问的组件路径,如:`system/user/index`,默认在`views`目录下" placement="top">
|
||||
<i class="el-icon-question"/>
|
||||
<i class="el-icon-question" />
|
||||
</el-tooltip>
|
||||
组件路径
|
||||
</span>
|
||||
<el-input v-model="sysMenu.to_code" placeholder="请输入组件路径"/>
|
||||
<el-input v-model="sysMenu.to_code" placeholder="请输入组件路径" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="sysMenu.type === 2">
|
||||
<el-input v-model="sysMenu.code" placeholder="请输入权限标识" maxlength="100"/>
|
||||
<el-input v-model="sysMenu.code" placeholder="请输入权限标识" maxlength="100" />
|
||||
<span slot="label">
|
||||
<el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(hasAuthority('bnt.sysRole.list'))"
|
||||
placement="top">
|
||||
<i class="el-icon-question"/>
|
||||
<el-tooltip
|
||||
content="控制器中定义的权限字符,如:@PreAuthorize(hasAuthority('bnt.sysRole.list'))"
|
||||
placement="top"
|
||||
>
|
||||
<i class="el-icon-question" />
|
||||
</el-tooltip>
|
||||
权限字符
|
||||
</span>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div style="margin-top: 15px">
|
||||
<el-form :inline="true" size="small" label-width="140px">
|
||||
<el-form-item label="输入搜索:">
|
||||
<el-input v-model="tempSearchObj.roleName" style="width: 203px" placeholder="角色名称"/>
|
||||
<el-input v-model="tempSearchObj.roleName" style="width: 203px" placeholder="角色名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
@ -16,12 +16,17 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
|
||||
<el-button class="btn-add" size="mini" @click="addRole">添加</el-button>
|
||||
<el-button class="btn-add" size="mini" :disabled="selectedRoles.length === 0" style="margin: 0 10px;"
|
||||
@click="removeRoles()">批量删除
|
||||
<el-button
|
||||
class="btn-add"
|
||||
size="mini"
|
||||
:disabled="selectedRoles.length === 0"
|
||||
style="margin: 0 10px;"
|
||||
@click="removeRoles()"
|
||||
>批量删除
|
||||
</el-button>
|
||||
</el-card>
|
||||
|
||||
@ -48,7 +53,7 @@
|
||||
<el-table-column label="角色名称" width="500" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<template v-if="row.edit">
|
||||
<el-input v-model="row.roleName" class="edit-input" size="small"/>
|
||||
<el-input v-model="row.roleName" class="edit-input" size="small" />
|
||||
<el-button
|
||||
class="cancel-btn"
|
||||
size="small"
|
||||
@ -156,7 +161,7 @@ export default {
|
||||
更新角色
|
||||
*/
|
||||
updateRole(role) {
|
||||
this.$API.role.updateById({id: role.id, roleName: role.roleName})
|
||||
this.$API.role.updateById({ id: role.id, roleName: role.roleName })
|
||||
.then(result => {
|
||||
this.$message.success(result.message || '更新角色成功!')
|
||||
this.getRoles(this.page)
|
||||
@ -179,8 +184,8 @@ export default {
|
||||
this.$prompt('请输入新名称', '添加角色', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({value}) => {
|
||||
this.$API.role.save({roleName: value}).then(result => {
|
||||
}).then(({ value }) => {
|
||||
this.$API.role.save({ roleName: value }).then(result => {
|
||||
this.$message.success(result.message || '添加角色成功')
|
||||
this.getRoles()
|
||||
})
|
||||
@ -195,10 +200,10 @@ export default {
|
||||
getRoles(page = 1) {
|
||||
this.page = page
|
||||
this.listLoading = true
|
||||
const {limit, searchObj} = this
|
||||
const { limit, searchObj } = this
|
||||
this.$API.role.getPageList(page, limit, searchObj).then(
|
||||
result => {
|
||||
const {records, total} = result.data
|
||||
const { records, total } = result.data
|
||||
this.roles = records.map(item => {
|
||||
item.edit = false // 用于标识是否显示编辑输入框的属性
|
||||
item.originRoleName = item.roleName // 缓存角色名称, 用于取消
|
||||
@ -215,7 +220,7 @@ export default {
|
||||
根据搜索条件进行搜索
|
||||
*/
|
||||
search() {
|
||||
this.searchObj = {...this.tempSearchObj}
|
||||
this.searchObj = { ...this.tempSearchObj }
|
||||
this.getRoles()
|
||||
},
|
||||
|
||||
@ -235,10 +240,10 @@ export default {
|
||||
/*
|
||||
删除指定的角色
|
||||
*/
|
||||
removeRole({id, roleName}) {
|
||||
removeRole({ id, roleName }) {
|
||||
this.$confirm(`确定删除 '${roleName}' 吗?`, '提示', {
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
}).then(async() => {
|
||||
const result = await this.$API.role.removeById(id)
|
||||
this.getRoles(this.roles.length === 1 ? this.page - 1 : this.page)
|
||||
this.$message.success(result.message || '删除成功!')
|
||||
@ -260,7 +265,7 @@ export default {
|
||||
removeRoles() {
|
||||
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
}).then(async() => {
|
||||
const ids = this.selectedRoles.map(role => role.id)
|
||||
const result = await this.$API.role.removeRoles(ids)
|
||||
this.getRoles()
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-input disabled :value="$route.query.roleName"/>
|
||||
<el-input disabled :value="$route.query.roleName" />
|
||||
<el-tree
|
||||
ref="tree"
|
||||
style="margin: 20px 0"
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div style="margin-top: 15px">
|
||||
<el-form :inline="true" size="small" label-width="140px">
|
||||
<el-form-item label="输入搜索:">
|
||||
<el-input v-model="tempSearchObj.username" style="width: 203px" placeholder="用户名"/>
|
||||
<el-input v-model="tempSearchObj.username" style="width: 203px" placeholder="用户名" />
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="getUsers()">查询</el-button>
|
||||
@ -16,11 +16,16 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" @click="showAddUser">添 加</el-button>
|
||||
<el-button class="btn-add" size="mini" :disabled="selectedIds.length===0" style="margin: 0 10px;"
|
||||
@click="revomveUsers">批量删除
|
||||
<el-button
|
||||
class="btn-add"
|
||||
size="mini"
|
||||
:disabled="selectedIds.length===0"
|
||||
style="margin: 0 10px;"
|
||||
@click="revomveUsers"
|
||||
>批量删除
|
||||
</el-button>
|
||||
</el-card>
|
||||
|
||||
@ -46,10 +51,10 @@
|
||||
align="center"
|
||||
/>
|
||||
|
||||
<el-table-column prop="username" label="用户名" width="120"/>
|
||||
<el-table-column prop="name" label="用户名称" width="120"/>
|
||||
<el-table-column prop="createTime" label="创建时间" width="180"/>
|
||||
<el-table-column prop="updateTime" label="更新时间" width="180"/>
|
||||
<el-table-column prop="username" label="用户名" width="120" />
|
||||
<el-table-column prop="name" label="用户名称" width="120" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="180" />
|
||||
<el-table-column prop="updateTime" label="更新时间" width="180" />
|
||||
|
||||
<el-table-column label="操作" width="220" align="center">
|
||||
<!-- <template slot-scope="{row}">-->
|
||||
@ -84,14 +89,14 @@
|
||||
<el-dialog :title="user.id ? '修改用户' : '添加用户'" :visible.sync="dialogUserVisible">
|
||||
<el-form ref="userForm" :model="user" :rules="userRules" label-width="120px">
|
||||
<el-form-item label="用户名" prop="username">
|
||||
<el-input v-model="user.username"/>
|
||||
<el-input v-model="user.username" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名称">
|
||||
<el-input v-model="user.name"/>
|
||||
<el-input v-model="user.name" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="!user.id" label="用户密码" prop="password">
|
||||
<el-input v-model="user.password"/>
|
||||
<el-input v-model="user.password" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -103,13 +108,13 @@
|
||||
<el-dialog title="设置角色" :visible.sync="dialogRoleVisible" :before-close="resetRoleData">
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="用户名">
|
||||
<el-input disabled :value="user.username"/>
|
||||
<el-input disabled :value="user.username" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="角色列表">
|
||||
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选
|
||||
</el-checkbox>
|
||||
<div style="margin: 15px 0;"/>
|
||||
<div style="margin: 15px 0;" />
|
||||
<el-checkbox-group v-model="userRoleIds" @change="handleCheckedChange">
|
||||
<el-checkbox v-for="role in allRoles" :key="role.id" :label="role.id">{{ role.roleName }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
@ -148,11 +153,11 @@ export default {
|
||||
dialogUserVisible: false, // 是否显示用户添加/修改的dialog
|
||||
userRules: { // 用户添加/修改表单的校验规则
|
||||
username: [
|
||||
{required: true, message: '用户名必须输入'},
|
||||
{min: 4, message: '用户名不能小于4位'}
|
||||
{ required: true, message: '用户名必须输入' },
|
||||
{ min: 4, message: '用户名不能小于4位' }
|
||||
],
|
||||
password: [
|
||||
{required: true, validator: this.validatePassword}
|
||||
{ required: true, validator: this.validatePassword }
|
||||
]
|
||||
},
|
||||
loading: false, // 是否正在提交请求中
|
||||
@ -193,7 +198,7 @@ export default {
|
||||
*/
|
||||
async getRoles() {
|
||||
const result = await this.$API.user.getRoles(this.user.id)
|
||||
const {allRolesList, assignRoles} = result.data
|
||||
const { allRolesList, assignRoles } = result.data
|
||||
this.allRoles = allRolesList
|
||||
this.userRoleIds = assignRoles.map(item => item.id)
|
||||
this.checkAll = allRolesList.length === assignRoles.length
|
||||
@ -204,7 +209,7 @@ export default {
|
||||
角色列表选中项发生改变的监听
|
||||
*/
|
||||
handleCheckedChange(value) {
|
||||
const {userRoleIds, allRoles} = this
|
||||
const { userRoleIds, allRoles } = this
|
||||
this.checkAll = userRoleIds.length === allRoles.length && allRoles.length > 0
|
||||
this.isIndeterminate = userRoleIds.length > 0 && userRoleIds.length < allRoles.length
|
||||
},
|
||||
@ -254,7 +259,7 @@ export default {
|
||||
根据输入进行搜索
|
||||
*/
|
||||
search() {
|
||||
this.searchObj = {...this.tempSearchObj}
|
||||
this.searchObj = { ...this.tempSearchObj }
|
||||
this.getUsers()
|
||||
},
|
||||
|
||||
@ -285,7 +290,7 @@ export default {
|
||||
删除所有选中的用户
|
||||
*/
|
||||
revomveUsers() {
|
||||
this.$confirm('确定删除吗?').then(async () => {
|
||||
this.$confirm('确定删除吗?').then(async() => {
|
||||
await this.$API.user.removeUsers(this.selectedIds)
|
||||
this.$message.success('删除成功')
|
||||
this.getUsers()
|
||||
@ -323,11 +328,11 @@ export default {
|
||||
*/
|
||||
async getUsers(page = 1) {
|
||||
this.page = page
|
||||
const {limit, tempSearchObj} = this
|
||||
const { limit, tempSearchObj } = this
|
||||
this.listLoading = true
|
||||
const result = await this.$API.user.getPageList(page, limit, tempSearchObj)
|
||||
this.listLoading = false
|
||||
const {records, total} = result.data
|
||||
const { records, total } = result.data
|
||||
this.users = records
|
||||
this.total = total - 1
|
||||
this.selectedIds = []
|
||||
@ -355,7 +360,7 @@ export default {
|
||||
addOrUpdate() {
|
||||
this.$refs.userForm.validate(valid => {
|
||||
if (valid) {
|
||||
const {user} = this
|
||||
const { user } = this
|
||||
this.loading = true
|
||||
this.$API.user[user.id ? 'update' : 'add'](user).then((result) => {
|
||||
this.loading = false
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-form label-width="120px">
|
||||
|
||||
<el-form-item label="活动名称">
|
||||
<el-input v-model="activityInfo.activityName"/>
|
||||
<el-input v-model="activityInfo.activityName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="活动类型">
|
||||
<el-radio-group v-model="activityInfo.activityType">
|
||||
@ -27,7 +27,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动描述">
|
||||
<el-input v-model="activityInfo.activityDesc" :rows="3" type="textarea"/>
|
||||
<el-input v-model="activityInfo.activityDesc" :rows="3" type="textarea" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -85,7 +85,7 @@ export default {
|
||||
this.fetchDataById(id)
|
||||
} else {
|
||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||
this.activityInfo = {...defaultForm}
|
||||
this.activityInfo = { ...defaultForm }
|
||||
}
|
||||
},
|
||||
|
||||
@ -106,7 +106,7 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/activity/activityInfo/list'})
|
||||
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -119,13 +119,13 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/activity/activityInfo/list'})
|
||||
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$router.push({path: '/activity/activityInfo/list'})
|
||||
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||
},
|
||||
|
||||
// 根据id查询记录
|
||||
|
@ -4,7 +4,7 @@
|
||||
<!-- 工具条 -->
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||
</el-card>
|
||||
@ -29,11 +29,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="activityName" label="活动名称"/>
|
||||
<el-table-column prop="activityTypeString" label="活动类型"/>
|
||||
<el-table-column prop="startTime" label="开始时间"/>
|
||||
<el-table-column prop="endTime" label="结束时间"/>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="activityName" label="活动名称" />
|
||||
<el-table-column prop="activityTypeString" label="活动类型" />
|
||||
<el-table-column prop="startTime" label="开始时间" />
|
||||
<el-table-column prop="endTime" label="结束时间" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
|
||||
<el-table-column label="操作" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -99,7 +99,7 @@ export default {
|
||||
},
|
||||
|
||||
add() {
|
||||
this.$router.push({path: '/activity/activityInfo/add'})
|
||||
this.$router.push({ path: '/activity/activityInfo/add' })
|
||||
},
|
||||
|
||||
// 加载banner列表数据
|
||||
|
@ -4,41 +4,41 @@
|
||||
<h4>活动信息</h4>
|
||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="15%">活动标题</th>
|
||||
<td width="35%"><b style="font-size: 14px">{{ activityInfo.activityName }}</b></td>
|
||||
<th width="15%">活动时间</th>
|
||||
<td width="35%">{{ activityInfo.startTime }}至{{ activityInfo.endTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>活动类型</th>
|
||||
<td>{{ activityInfo.activityTypeString }}</td>
|
||||
<th>创建时间</th>
|
||||
<td>{{ activityInfo.createTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>活动描述</th>
|
||||
<td colspan="3">{{ activityInfo.activityDesc }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="15%">活动标题</th>
|
||||
<td width="35%"><b style="font-size: 14px">{{ activityInfo.activityName }}</b></td>
|
||||
<th width="15%">活动时间</th>
|
||||
<td width="35%">{{ activityInfo.startTime }}至{{ activityInfo.endTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>活动类型</th>
|
||||
<td>{{ activityInfo.activityTypeString }}</td>
|
||||
<th>创建时间</th>
|
||||
<td>{{ activityInfo.createTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>活动描述</th>
|
||||
<td colspan="3">{{ activityInfo.activityDesc }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<el-dialog title="添加规则" :visible.sync="dialogRuleVisible" width="490px">
|
||||
<el-form label-width="120px">
|
||||
<el-form-item v-if="activityInfo.activityType == 'FULL_REDUCTION'" label="满减金额">
|
||||
<el-input v-model="activityRule.conditionAmount"/>
|
||||
<el-input v-model="activityRule.conditionAmount" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="activityInfo.activityType == 'FULL_REDUCTION'" label="优惠金额">
|
||||
<el-input v-model="activityRule.benefitAmount"/>
|
||||
<el-input v-model="activityRule.benefitAmount" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="activityInfo.activityType == 'FULL_DISCOUNT'" label="满减件数">
|
||||
<el-input v-model="activityRule.conditionNum"/>
|
||||
<el-input v-model="activityRule.conditionNum" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="activityInfo.activityType == 'FULL_DISCOUNT'" label="优惠折扣">
|
||||
<el-input v-model="activityRule.benefitDiscount"/>
|
||||
<el-input v-model="activityRule.benefitDiscount" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -75,11 +75,11 @@
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-if="activityInfo.activityType == 'FULL_REDUCTION'" prop="conditionAmount" label="满减金额"/>
|
||||
<el-table-column v-if="activityInfo.activityType == 'FULL_REDUCTION'" prop="benefitAmount" label="优惠金额"/>
|
||||
<el-table-column v-if="activityInfo.activityType == 'FULL_REDUCTION'" prop="conditionAmount" label="满减金额" />
|
||||
<el-table-column v-if="activityInfo.activityType == 'FULL_REDUCTION'" prop="benefitAmount" label="优惠金额" />
|
||||
|
||||
<el-table-column v-if="activityInfo.activityType == 'FULL_DISCOUNT'" prop="conditionNum" label="满减量数"/>
|
||||
<el-table-column v-if="activityInfo.activityType == 'FULL_DISCOUNT'" prop="benefitDiscount" label="优惠折扣"/>
|
||||
<el-table-column v-if="activityInfo.activityType == 'FULL_DISCOUNT'" prop="conditionNum" label="满减量数" />
|
||||
<el-table-column v-if="activityInfo.activityType == 'FULL_DISCOUNT'" prop="benefitDiscount" label="优惠折扣" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -132,7 +132,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="id" label="SKU ID" width="100"/>
|
||||
<el-table-column prop="id" label="SKU ID" width="100" />
|
||||
<el-table-column label="图片" width="320" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="info">
|
||||
@ -142,8 +142,8 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="skuName" label="名称"/>
|
||||
<el-table-column prop="price" label="价格" width="70"/>
|
||||
<el-table-column prop="skuName" label="名称" />
|
||||
<el-table-column prop="price" label="价格" width="70" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -241,13 +241,13 @@ export default {
|
||||
|
||||
save() {
|
||||
const skuList = []
|
||||
this.skuInfoList.forEach(function (item) {
|
||||
this.skuInfoList.forEach(function(item) {
|
||||
skuList.push({
|
||||
skuId: item.id
|
||||
})
|
||||
})
|
||||
const couponIdList = []
|
||||
this.couponInfoList.forEach(function (item) {
|
||||
this.couponInfoList.forEach(function(item) {
|
||||
couponIdList.push(item.id)
|
||||
})
|
||||
const ruleData = {
|
||||
@ -259,7 +259,7 @@ export default {
|
||||
debugger
|
||||
api.saveActivityRule(ruleData).then(response => {
|
||||
this.$message.success(response.message)
|
||||
this.$router.push({path: '/activity/activityInfo/list'})
|
||||
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||
})
|
||||
},
|
||||
|
||||
@ -268,7 +268,7 @@ export default {
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$router.push({path: '/activity/activityInfo/list'})
|
||||
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||
},
|
||||
|
||||
fetchRuleDataById(id) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-form label-width="120px">
|
||||
|
||||
<el-form-item label="优惠券名称">
|
||||
<el-input v-model="couponInfo.couponName"/>
|
||||
<el-input v-model="couponInfo.couponName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券类型">
|
||||
<el-radio-group v-model="couponInfo.couponType">
|
||||
@ -13,7 +13,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="发行数量">
|
||||
<el-input v-model="couponInfo.publishCount"/>
|
||||
<el-input v-model="couponInfo.publishCount" />
|
||||
</el-form-item>
|
||||
<el-form-item label="领取时间">
|
||||
<el-date-picker
|
||||
@ -106,7 +106,7 @@ export default {
|
||||
this.fetchDataById(id)
|
||||
} else {
|
||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||
this.couponInfo = {...defaultForm}
|
||||
this.couponInfo = { ...defaultForm }
|
||||
}
|
||||
},
|
||||
|
||||
@ -128,7 +128,7 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/activity/couponInfo/list'})
|
||||
this.$router.push({ path: '/activity/couponInfo/list' })
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -142,13 +142,13 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/activity/couponInfo/list'})
|
||||
this.$router.push({ path: '/activity/couponInfo/list' })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$router.push({path: '/activity/couponInfo/list'})
|
||||
this.$router.push({ path: '/activity/couponInfo/list' })
|
||||
},
|
||||
|
||||
// 根据id查询记录
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||
</el-card>
|
||||
@ -28,8 +28,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="couponName" label="购物券名称"/>
|
||||
<el-table-column prop="couponTypeString" label="购物券类型"/>
|
||||
<el-table-column prop="couponName" label="购物券名称" />
|
||||
<el-table-column prop="couponTypeString" label="购物券类型" />
|
||||
<el-table-column label="规则">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
@ -37,10 +37,10 @@
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rangeTypeString" label="范围类型 "/>
|
||||
<el-table-column prop="publishCount" label="发行数量"/>
|
||||
<el-table-column prop="expireTime" label="过期时间"/>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="rangeTypeString" label="范围类型 " />
|
||||
<el-table-column prop="publishCount" label="发行数量" />
|
||||
<el-table-column prop="expireTime" label="过期时间" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="'/activity/couponInfo/edit/'+scope.row.id">
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
},
|
||||
|
||||
add() {
|
||||
this.$router.push({path: '/activity/couponInfo/add'})
|
||||
this.$router.push({ path: '/activity/couponInfo/add' })
|
||||
},
|
||||
|
||||
// 加载banner列表数据
|
||||
|
@ -4,41 +4,41 @@
|
||||
<h4>优惠券信息</h4>
|
||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="15%">优惠券名称</th>
|
||||
<td width="35%"><b style="font-size: 14px">{{ couponInfo.couponName }}</b></td>
|
||||
<th width="15%">优惠券类型</th>
|
||||
<td width="35%">
|
||||
{{ couponInfo.couponTypeString }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>发行数量</th>
|
||||
<td>{{ couponInfo.publishCount }}</td>
|
||||
<th>每人限领次数</th>
|
||||
<td>{{ couponInfo.perLimit }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>领取时间</th>
|
||||
<td>{{ couponInfo.startTime }}至{{ couponInfo.endTime }}</td>
|
||||
<th>过期时间</th>
|
||||
<td>{{ couponInfo.expireTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="15%">优惠券名称</th>
|
||||
<td width="35%"><b style="font-size: 14px">{{ couponInfo.couponName }}</b></td>
|
||||
<th width="15%">优惠券类型</th>
|
||||
<td width="35%">
|
||||
{{ couponInfo.couponTypeString }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>发行数量</th>
|
||||
<td>{{ couponInfo.publishCount }}</td>
|
||||
<th>每人限领次数</th>
|
||||
<td>{{ couponInfo.perLimit }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>领取时间</th>
|
||||
<td>{{ couponInfo.startTime }}至{{ couponInfo.endTime }}</td>
|
||||
<th>过期时间</th>
|
||||
<td>{{ couponInfo.expireTime }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h4>添加规则</h4>
|
||||
<el-form label-width="140px" style="background: #f9f9f9;padding-top: 15px; padding-bottom: 1px;">
|
||||
<el-form-item v-if="couponInfo.couponType == 'CASH'" label="现金券金额(元)" style="width: 50%;">
|
||||
<el-input v-model="couponInfo.amount"/>
|
||||
<el-input v-model="couponInfo.amount" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="couponInfo.couponType == 'FULL_REDUCTION'" label="满减金额(元)" style="width: 50%;">
|
||||
<el-input v-model="couponInfo.conditionAmount"/>
|
||||
<el-input v-model="couponInfo.conditionAmount" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="couponInfo.couponType == 'FULL_REDUCTION'" label="优惠金额(元)" style="width: 50%;">
|
||||
<el-input v-model="couponInfo.amount"/>
|
||||
<el-input v-model="couponInfo.amount" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -98,9 +98,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="id" label="sku ID" width="100"/>
|
||||
<el-table-column prop="skuName" label="sku名称" width="120"/>
|
||||
<el-table-column prop="skuCode" label="sku编号"/>
|
||||
<el-table-column prop="id" label="sku ID" width="100" />
|
||||
<el-table-column prop="skuName" label="sku名称" width="120" />
|
||||
<el-table-column prop="skuCode" label="sku编号" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -151,8 +151,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="id" label="分类ID" width="100"/>
|
||||
<el-table-column prop="name" label="名称"/>
|
||||
<el-table-column prop="id" label="分类ID" width="100" />
|
||||
<el-table-column prop="name" label="名称" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -244,7 +244,7 @@ export default {
|
||||
let rangeDesc = '可购买'
|
||||
const couponRangeList = []
|
||||
if (this.couponInfo.rangeType === 'SKU') {
|
||||
this.skuInfoList.forEach(function (item) {
|
||||
this.skuInfoList.forEach(function(item) {
|
||||
rangeDesc += ':'
|
||||
couponRangeList.push({
|
||||
rangeType: 'SKU',
|
||||
@ -255,7 +255,7 @@ export default {
|
||||
}
|
||||
if (this.couponInfo.rangeType === 'CATEGORY') {
|
||||
rangeDesc += '分类:'
|
||||
this.categoryList.forEach(function (item) {
|
||||
this.categoryList.forEach(function(item) {
|
||||
couponRangeList.push({
|
||||
rangeType: 'CATEGORY',
|
||||
rangeId: item.id
|
||||
@ -282,7 +282,7 @@ export default {
|
||||
|
||||
api.saveCouponRule(ruleData).then(response => {
|
||||
this.$message.success(response.message)
|
||||
this.$router.push({path: '/activity/couponInfo/list'})
|
||||
this.$router.push({ path: '/activity/couponInfo/list' })
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" :disabled="$hasBP('btn.all') === false" @click="add()">添加</el-button>
|
||||
<el-button size="mini" class="btn-add" style="margin: 0 10px;" @click="addTimeList()">秒杀时间段列表</el-button>
|
||||
@ -28,9 +28,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="title" label="活动标题"/>
|
||||
<el-table-column prop="startTime" label="开始日期"/>
|
||||
<el-table-column prop="endTime" label="结束日期"/>
|
||||
<el-table-column prop="title" label="活动标题" />
|
||||
<el-table-column prop="startTime" label="开始日期" />
|
||||
<el-table-column prop="endTime" label="结束日期" />
|
||||
<el-table-column label="上线/下线" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@ -41,15 +41,19 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="selectTime(scope.row)">设置商品</el-button>
|
||||
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false" @click="edit(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false"
|
||||
@click="removeDataById(scope.row.id)">删除
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
:disabled="$hasBP('btn.all') === false"
|
||||
@click="removeDataById(scope.row.id)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -70,7 +74,7 @@
|
||||
<el-dialog title="添加活动" :visible.sync="dialogVisible" width="40%">
|
||||
<el-form ref="flashPromotionForm" label-width="150px" size="small">
|
||||
<el-form-item label="活动标题:">
|
||||
<el-input v-model="seckill.title" style="width: 250px"/>
|
||||
<el-input v-model="seckill.title" style="width: 250px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间:">
|
||||
<el-date-picker
|
||||
@ -153,11 +157,11 @@ export default {
|
||||
},
|
||||
|
||||
addTimeList() {
|
||||
this.$router.push({path: '/activity/seckill/timeList'})
|
||||
this.$router.push({ path: '/activity/seckill/timeList' })
|
||||
},
|
||||
|
||||
selectTime(row) {
|
||||
this.$router.push({path: '/activity/seckill/selectTimeList', query: {seckillId: row.id}})
|
||||
this.$router.push({ path: '/activity/seckill/selectTimeList', query: { seckillId: row.id }})
|
||||
},
|
||||
|
||||
add() {
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button size="mini" class="btn-add" :disabled="$hasBP('btn.all') === false" @click="addSku()">添加</el-button>
|
||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="$router.back()">返回</el-button>
|
||||
@ -28,15 +28,15 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="skuInfo.skuName" label="商品名称"/>
|
||||
<el-table-column prop="skuInfo.skuCode" label="商品编号"/>
|
||||
<el-table-column prop="skuInfo.price" label="商品价格"/>
|
||||
<el-table-column prop="skuInfo.stock" label="剩余数量"/>
|
||||
<el-table-column prop="seckillPrice" label="秒杀价格"/>
|
||||
<el-table-column prop="seckillStock" label="秒杀数量"/>
|
||||
<el-table-column prop="seckillLimit" label="每人限购数量"/>
|
||||
<el-table-column prop="seckillSort" label="排序"/>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="skuInfo.skuName" label="商品名称" />
|
||||
<el-table-column prop="skuInfo.skuCode" label="商品编号" />
|
||||
<el-table-column prop="skuInfo.price" label="商品价格" />
|
||||
<el-table-column prop="skuInfo.stock" label="剩余数量" />
|
||||
<el-table-column prop="seckillPrice" label="秒杀价格" />
|
||||
<el-table-column prop="seckillStock" label="秒杀数量" />
|
||||
<el-table-column prop="seckillLimit" label="每人限购数量" />
|
||||
<el-table-column prop="seckillSort" label="排序" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -65,7 +65,7 @@
|
||||
<!-- <el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button>-->
|
||||
<!-- </el-input>-->
|
||||
<el-table :data="dialogData.list" border @selection-change="handleDialogSelectionChange">
|
||||
<el-table-column type="selection" width="60" align="center"/>
|
||||
<el-table-column type="selection" width="60" align="center" />
|
||||
<el-table-column label="商品名称" align="center">
|
||||
<template slot-scope="scope">{{ scope.row.skuName }}</template>
|
||||
</el-table-column>
|
||||
@ -88,7 +88,7 @@
|
||||
@current-change="handleDialogCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
<div style="clear: both;"/>
|
||||
<div style="clear: both;" />
|
||||
<div slot="footer">
|
||||
<el-button size="small" @click="selectDialogVisible = false">取 消</el-button>
|
||||
<el-button size="small" type="primary" @click="handleSelectDialogConfirm()">确 定</el-button>
|
||||
@ -115,13 +115,13 @@
|
||||
<span>{{ seckillSku.skuInfo.stock }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="秒杀数量:">
|
||||
<el-input v-model="seckillSku.seckillStock" class="input-width"/>
|
||||
<el-input v-model="seckillSku.seckillStock" class="input-width" />
|
||||
</el-form-item>
|
||||
<el-form-item label="限购数量:">
|
||||
<el-input v-model="seckillSku.seckillLimit" class="input-width"/>
|
||||
<el-input v-model="seckillSku.seckillLimit" class="input-width" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序:">
|
||||
<el-input v-model="seckillSku.seckillSort" class="input-width"/>
|
||||
<el-input v-model="seckillSku.seckillSort" class="input-width" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" @click="$router.back()">返回</el-button>
|
||||
</el-card>
|
||||
@ -27,9 +27,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" label="场次名称"/>
|
||||
<el-table-column prop="startTime" label="每日开始时间"/>
|
||||
<el-table-column prop="endTime" label="每日结束时间"/>
|
||||
<el-table-column prop="name" label="场次名称" />
|
||||
<el-table-column prop="startTime" label="每日开始时间" />
|
||||
<el-table-column prop="endTime" label="每日结束时间" />
|
||||
<el-table-column label="启用状态" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@ -40,7 +40,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" :disabled="$hasBP('btn.all') === false" @click="add()">添加</el-button>
|
||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="$router.back()">返回</el-button>
|
||||
@ -28,9 +28,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" label="场次名称"/>
|
||||
<el-table-column prop="startTime" label="每日开始时间"/>
|
||||
<el-table-column prop="endTime" label="每日结束时间"/>
|
||||
<el-table-column prop="name" label="场次名称" />
|
||||
<el-table-column prop="startTime" label="每日开始时间" />
|
||||
<el-table-column prop="endTime" label="每日结束时间" />
|
||||
<el-table-column label="启用状态" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@ -41,14 +41,18 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false" @click="edit(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false"
|
||||
@click="removeDataById(scope.row.id)">删除
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
:disabled="$hasBP('btn.all') === false"
|
||||
@click="removeDataById(scope.row.id)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -57,7 +61,7 @@
|
||||
<el-dialog title="添加活动" :visible.sync="dialogVisible" width="40%">
|
||||
<el-form ref="flashPromotionForm" label-width="150px" size="small">
|
||||
<el-form-item label="秒杀时间段名称:">
|
||||
<el-input v-model="seckillTime.name" style="width: 250px"/>
|
||||
<el-input v-model="seckillTime.name" style="width: 250px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="每日开始时间:">
|
||||
<el-time-picker
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
|
@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div class="login-container">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on"
|
||||
label-position="left">
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
:model="loginForm"
|
||||
:rules="loginRules"
|
||||
class="login-form"
|
||||
auto-complete="on"
|
||||
label-position="left"
|
||||
>
|
||||
|
||||
<div class="title-container">
|
||||
<h3 class="title">尚上优选平台管理端</h3>
|
||||
@ -9,7 +15,7 @@
|
||||
|
||||
<el-form-item prop="username">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon-class="user"/>
|
||||
<svg-icon icon-class="user" />
|
||||
</span>
|
||||
<el-input
|
||||
ref="username"
|
||||
@ -24,7 +30,7 @@
|
||||
|
||||
<el-form-item prop="password">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon-class="password"/>
|
||||
<svg-icon icon-class="password" />
|
||||
</span>
|
||||
<el-input
|
||||
:key="passwordType"
|
||||
@ -38,12 +44,16 @@
|
||||
@keyup.enter.native="handleLogin"
|
||||
/>
|
||||
<span class="show-pwd" @click="showPwd">
|
||||
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"/>
|
||||
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;"
|
||||
@click.native.prevent="handleLogin">Login
|
||||
<el-button
|
||||
:loading="loading"
|
||||
type="primary"
|
||||
style="width:100%;margin-bottom:30px;"
|
||||
@click.native.prevent="handleLogin"
|
||||
>Login
|
||||
</el-button>
|
||||
|
||||
<div class="tips">
|
||||
@ -56,7 +66,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {validUsername} from '@/utils/validate'
|
||||
import { validUsername } from '@/utils/validate'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
@ -81,8 +91,8 @@ export default {
|
||||
password: '111111'
|
||||
},
|
||||
loginRules: {
|
||||
username: [{required: true, trigger: 'blur', validator: validateUsername}],
|
||||
password: [{required: true, trigger: 'blur', validator: validatePassword}]
|
||||
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
||||
password: [{ required: true, trigger: 'blur', validator: validatePassword }]
|
||||
},
|
||||
loading: false,
|
||||
passwordType: 'password',
|
||||
@ -91,7 +101,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function (route) {
|
||||
handler: function(route) {
|
||||
this.redirect = route.query && route.query.redirect
|
||||
},
|
||||
immediate: true
|
||||
@ -113,7 +123,7 @@ export default {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.$store.dispatch('user/login', this.loginForm).then(() => {
|
||||
this.$router.push({path: this.redirect || '/'})
|
||||
this.$router.push({ path: this.redirect || '/' })
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;">打印</el-button>
|
||||
</el-card>
|
||||
@ -52,14 +52,14 @@
|
||||
align="center"
|
||||
/>
|
||||
|
||||
<el-table-column prop="leaderName" label="团长" width="90"/>
|
||||
<el-table-column prop="leaderPhone" label="团长电话" width="100"/>
|
||||
<el-table-column prop="takeName" label="提货点" width="130"/>
|
||||
<el-table-column prop="skuNum" label="商品数量" width="80"/>
|
||||
<el-table-column prop="driverName" label="司机" width="90"/>
|
||||
<el-table-column prop="driverPhone" label="司机电话" width="100"/>
|
||||
<el-table-column prop="deliverDate" label="配送日期" width="100"/>
|
||||
<el-table-column prop="createTime" label="配送时间"/>
|
||||
<el-table-column prop="leaderName" label="团长" width="90" />
|
||||
<el-table-column prop="leaderPhone" label="团长电话" width="100" />
|
||||
<el-table-column prop="takeName" label="提货点" width="130" />
|
||||
<el-table-column prop="skuNum" label="商品数量" width="80" />
|
||||
<el-table-column prop="driverName" label="司机" width="90" />
|
||||
<el-table-column prop="driverPhone" label="司机电话" width="100" />
|
||||
<el-table-column prop="deliverDate" label="配送日期" width="100" />
|
||||
<el-table-column prop="createTime" label="配送时间" />
|
||||
<el-table-column label="状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
<p>{{ scope.row.deliverStatus == 0 ? '未发货' : scope.row.deliverStatus == 1 ? '已发货' : '已收货' }}</p>
|
||||
@ -92,8 +92,8 @@
|
||||
align="center"
|
||||
/>
|
||||
|
||||
<el-table-column prop="skuName" label="商品"/>
|
||||
<el-table-column prop="skuNum" label="商品数量" width="130"/>
|
||||
<el-table-column prop="skuName" label="商品" />
|
||||
<el-table-column prop="skuNum" label="商品数量" width="130" />
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="receiveDialogVisible = false">取 消</el-button>
|
||||
|
@ -4,17 +4,17 @@
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<el-form inline>
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="searchObj.outTradeNo" type="text" width="100" placeholder="订单号" clearable/>
|
||||
<el-input v-model="searchObj.outTradeNo" type="text" width="100" placeholder="订单号" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单状态">
|
||||
<el-select v-model="searchObj.orderStatus" clearable placeholder="订单状态">
|
||||
<el-option value="UNPAID" label="未支付"/>
|
||||
<el-option value="WAITING_DELEVER" label="已支付,待发货"/>
|
||||
<el-option value="DELEVERED" label="已发货"/>
|
||||
<el-option value="WAITING_SIGN" label="待签收"/>
|
||||
<el-option value="FINISHED" label="已完结"/>
|
||||
<el-option value="CANCEL" label="已取消"/>
|
||||
<el-option value="UNPAID" label="未支付" />
|
||||
<el-option value="WAITING_DELEVER" label="已支付,待发货" />
|
||||
<el-option value="DELEVERED" label="已发货" />
|
||||
<el-option value="WAITING_SIGN" label="待签收" />
|
||||
<el-option value="FINISHED" label="已完结" />
|
||||
<el-option value="CANCEL" label="已取消" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="收货人">
|
||||
<el-input v-model="searchObj.receiver" type="text" width="100" placeholder="收货人姓名/手机" clearable/>
|
||||
<el-input v-model="searchObj.receiver" type="text" width="100" placeholder="收货人姓名/手机" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||
@ -75,7 +75,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="orderNo" label="订单号" width="130"/>
|
||||
<el-table-column prop="orderNo" label="订单号" width="130" />
|
||||
<el-table-column label="订单金额" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<p>总额:¥{{ scope.row.totalAmount }}</p>
|
||||
@ -101,7 +101,7 @@
|
||||
<p>支付:{{ scope.row.paymentTime }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="param.orderStatusName" label="订单状态" width="100"/>
|
||||
<el-table-column prop="param.orderStatusName" label="订单状态" width="100" />
|
||||
|
||||
<el-table-column label="操作" width="130" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
@ -3,46 +3,46 @@
|
||||
<h4>订单信息</h4>
|
||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="15%">订单单号</th>
|
||||
<td width="35%"><b style="font-size: 14px">{{ orderInfo.orderNo }}</b></td>
|
||||
<th width="15%">下单时间</th>
|
||||
<td width="35%">{{ orderInfo.createTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>支付时间</th>
|
||||
<td>{{ orderInfo.paymentTime }}</td>
|
||||
<th>支付方式</th>
|
||||
<td>微信</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>订单状态</th>
|
||||
<td>{{ orderInfo.param.orderStatusName }}</td>
|
||||
<th/>
|
||||
<td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="15%">订单单号</th>
|
||||
<td width="35%"><b style="font-size: 14px">{{ orderInfo.orderNo }}</b></td>
|
||||
<th width="15%">下单时间</th>
|
||||
<td width="35%">{{ orderInfo.createTime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>支付时间</th>
|
||||
<td>{{ orderInfo.paymentTime }}</td>
|
||||
<th>支付方式</th>
|
||||
<td>微信</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>订单状态</th>
|
||||
<td>{{ orderInfo.param.orderStatusName }}</td>
|
||||
<th />
|
||||
<td />
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h4>收货人信息</h4>
|
||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="15%">姓名</th>
|
||||
<td width="35%">{{ orderInfo.receiverName }}</td>
|
||||
<th width="15%">电话</th>
|
||||
<td width="35%">{{ orderInfo.receiverPhone }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>团长名称</th>
|
||||
<td>{{ orderInfo.leaderName }}</td>
|
||||
<th>提货点</th>
|
||||
<td>{{ orderInfo.takeName }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>收货地址</th>
|
||||
<td colspan="3">{{ orderInfo.receiverAddress }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="15%">姓名</th>
|
||||
<td width="35%">{{ orderInfo.receiverName }}</td>
|
||||
<th width="15%">电话</th>
|
||||
<td width="35%">{{ orderInfo.receiverPhone }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>团长名称</th>
|
||||
<td>{{ orderInfo.leaderName }}</td>
|
||||
<th>提货点</th>
|
||||
<td>{{ orderInfo.takeName }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>收货地址</th>
|
||||
<td colspan="3">{{ orderInfo.receiverAddress }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -71,26 +71,26 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="skuName" label="商品名称"/>
|
||||
<el-table-column prop="skuPrice" label="价格" width="150"/>
|
||||
<el-table-column prop="skuNum" label="数量" width="100"/>
|
||||
<el-table-column prop="skuName" label="商品名称" />
|
||||
<el-table-column prop="skuPrice" label="价格" width="150" />
|
||||
<el-table-column prop="skuNum" label="数量" width="100" />
|
||||
</el-table>
|
||||
|
||||
<h4>支付信息</h4>
|
||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="15%">商品总金额</th>
|
||||
<td width="35%">{{ orderInfo.originalTotalAmount }}</td>
|
||||
<th width="15%">返现</th>
|
||||
<td width="35%">{{ orderInfo.activityAmount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用优惠券</th>
|
||||
<td>{{ orderInfo.couponAmount }}</td>
|
||||
<th>实际支付</th>
|
||||
<td>{{ orderInfo.totalAmount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="15%">商品总金额</th>
|
||||
<td width="35%">{{ orderInfo.originalTotalAmount }}</td>
|
||||
<th width="15%">返现</th>
|
||||
<td width="35%">{{ orderInfo.activityAmount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>使用优惠券</th>
|
||||
<td>{{ orderInfo.couponAmount }}</td>
|
||||
<th>实际支付</th>
|
||||
<td>{{ orderInfo.totalAmount }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-form label-width="120px">
|
||||
|
||||
<el-form-item label="属性名称">
|
||||
<el-input v-model="attr.name"/>
|
||||
<el-input v-model="attr.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="属性录入方式:">
|
||||
<el-radio-group v-model="attr.inputType">
|
||||
@ -12,7 +12,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="属性值可选值:">
|
||||
<el-input v-model="attr.selectList" :autosize="true" type="textarea"/>
|
||||
<el-input v-model="attr.selectList" :autosize="true" type="textarea" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -69,7 +69,7 @@ export default {
|
||||
this.fetchDataById(id)
|
||||
} else {
|
||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||
this.attr = {...defaultForm}
|
||||
this.attr = { ...defaultForm }
|
||||
this.attr.attrGroupId = this.$route.query.attrGroupId
|
||||
}
|
||||
},
|
||||
@ -92,7 +92,7 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/product/attr/list/' + this.attr.attrGroupId})
|
||||
this.$router.push({ path: '/product/attr/list/' + this.attr.attrGroupId })
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -106,13 +106,13 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/product/attr/list/' + this.attr.attrGroupId})
|
||||
this.$router.push({ path: '/product/attr/list/' + this.attr.attrGroupId })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$router.push({path: '/product/attr/list/' + this.attr.attrGroupId})
|
||||
this.$router.push({ path: '/product/attr/list/' + this.attr.attrGroupId })
|
||||
},
|
||||
|
||||
// 根据id查询记录
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
||||
@ -35,15 +35,15 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" label="属性名"/>
|
||||
<el-table-column prop="name" label="属性名" />
|
||||
<el-table-column prop="inputType" label="属性录入方式">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.inputType === 0 ? '手动录入' : '选择' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="selectList" label="可选值列表"/>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="updateTime" label="更新时间"/>
|
||||
<el-table-column prop="selectList" label="可选值列表" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column prop="updateTime" label="更新时间" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -84,7 +84,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
add() {
|
||||
this.$router.push({path: '/product/attr/add', query: {attrGroupId: this.attrGroupId}})
|
||||
this.$router.push({ path: '/product/attr/add', query: { attrGroupId: this.attrGroupId }})
|
||||
},
|
||||
|
||||
// 加载banner列表数据
|
||||
@ -179,7 +179,7 @@ export default {
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$router.push({path: '/product/attrGroup/list'})
|
||||
this.$router.push({ path: '/product/attrGroup/list' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,13 @@
|
||||
<el-form label-width="120px">
|
||||
|
||||
<el-form-item label="组名">
|
||||
<el-input v-model="attrGroup.name"/>
|
||||
<el-input v-model="attrGroup.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序">
|
||||
<el-input v-model="attrGroup.sort"/>
|
||||
<el-input v-model="attrGroup.sort" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="attrGroup.remark"/>
|
||||
<el-input v-model="attrGroup.remark" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -65,7 +65,7 @@ export default {
|
||||
this.fetchDataById(id)
|
||||
} else {
|
||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||
this.attrGroup = {...defaultForm}
|
||||
this.attrGroup = { ...defaultForm }
|
||||
}
|
||||
},
|
||||
|
||||
@ -87,7 +87,7 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/product/attrGroup/list'})
|
||||
this.$router.push({ path: '/product/attrGroup/list' })
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -101,13 +101,13 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/product/attrGroup/list'})
|
||||
this.$router.push({ path: '/product/attrGroup/list' })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$router.push({path: '/product/attrGroup/list'})
|
||||
this.$router.push({ path: '/product/attrGroup/list' })
|
||||
},
|
||||
|
||||
// 根据id查询记录
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="输入搜索:">
|
||||
<el-input v-model="searchObj.name" style="width: 203px" placeholder="关键字"/>
|
||||
<el-input v-model="searchObj.name" style="width: 203px" placeholder="关键字" />
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
||||
@ -45,11 +45,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" label="组名"/>
|
||||
<el-table-column prop="sort" label="排序"/>
|
||||
<el-table-column prop="remark" label="备注"/>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="updateTime" label="更新时间"/>
|
||||
<el-table-column prop="name" label="组名" />
|
||||
<el-table-column prop="sort" label="排序" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column prop="updateTime" label="更新时间" />
|
||||
|
||||
<el-table-column label="设置" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -120,7 +120,7 @@ export default {
|
||||
},
|
||||
|
||||
add() {
|
||||
this.$router.push({path: '/product/attrGroup/add'})
|
||||
this.$router.push({ path: '/product/attrGroup/add' })
|
||||
},
|
||||
|
||||
// 加载banner列表数据
|
||||
|
@ -3,10 +3,10 @@
|
||||
<el-form ref="categoryForm" :model="category" :rules="validateRules" label-width="120px">
|
||||
|
||||
<el-form-item label="分类名称" prop="name">
|
||||
<el-input v-model="category.name"/>
|
||||
<el-input v-model="category.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="category.sort"/>
|
||||
<el-input v-model="category.sort" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -44,10 +44,10 @@ export default {
|
||||
saveBtnDisabled: false,
|
||||
|
||||
validateRules: {
|
||||
name: [{required: true, trigger: 'blur', message: '必须输入'}],
|
||||
name: [{ required: true, trigger: 'blur', message: '必须输入' }],
|
||||
sort: [
|
||||
{required: true, decimal: 2, trigger: 'blur', message: '必须输入'},
|
||||
{validator: isNum, trigger: 'blur'}
|
||||
{ required: true, decimal: 2, trigger: 'blur', message: '必须输入' },
|
||||
{ validator: isNum, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -79,7 +79,7 @@ export default {
|
||||
this.fetchDataById(id)
|
||||
} else {
|
||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||
this.category = {...defaultForm}
|
||||
this.category = { ...defaultForm }
|
||||
}
|
||||
},
|
||||
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/product/category/list'})
|
||||
this.$router.push({ path: '/product/category/list' })
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -119,13 +119,13 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/product/category/list'})
|
||||
this.$router.push({ path: '/product/category/list' })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$router.push({path: '/product/category/list'})
|
||||
this.$router.push({ path: '/product/category/list' })
|
||||
},
|
||||
|
||||
// 根据id查询记录
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="输入搜索:">
|
||||
<el-input v-model="searchObj.name" style="width: 203px" placeholder="关键字"/>
|
||||
<el-input v-model="searchObj.name" style="width: 203px" placeholder="关键字" />
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
||||
@ -45,10 +45,10 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" label="分类名称"/>
|
||||
<el-table-column prop="sort" label="排序"/>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="updateTime" label="更新时间"/>
|
||||
<el-table-column prop="name" label="分类名称" />
|
||||
<el-table-column prop="sort" label="排序" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column prop="updateTime" label="更新时间" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -111,7 +111,7 @@ export default {
|
||||
},
|
||||
|
||||
add() {
|
||||
this.$router.push({path: '/product/category/add'})
|
||||
this.$router.push({ path: '/product/category/add' })
|
||||
},
|
||||
|
||||
// 加载banner列表数据
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>基本信息</h3></div>
|
||||
<el-form-item label="sku名称">
|
||||
<el-input v-model="skuInfo.skuName"/>
|
||||
<el-input v-model="skuInfo.skuName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类" prop="tmId">
|
||||
<el-select v-model="skuInfo.categoryId" placeholder="请选择">
|
||||
@ -17,13 +17,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="SKU编号:">
|
||||
<el-input v-model="skuInfo.skuCode"/>
|
||||
<el-input v-model="skuInfo.skuCode" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品售价:">
|
||||
<el-input v-model="skuInfo.price"/>
|
||||
<el-input v-model="skuInfo.price" />
|
||||
</el-form-item>
|
||||
<el-form-item label="市场价:">
|
||||
<el-input v-model="skuInfo.marketPrice"/>
|
||||
<el-input v-model="skuInfo.marketPrice" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否新人专享:">
|
||||
<el-radio-group v-model="skuInfo.isNewPerson">
|
||||
@ -32,7 +32,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序">
|
||||
<el-input v-model="skuInfo.sort"/>
|
||||
<el-input v-model="skuInfo.sort" />
|
||||
</el-form-item>
|
||||
|
||||
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>平台属性</h3></div>
|
||||
@ -50,8 +50,12 @@
|
||||
<el-card shadow="never" class="cardBg">
|
||||
<div v-for="(item,index) in attrList" :key="item.id" :class="{littleMarginTop:index!==0}">
|
||||
<div class="paramInputLabel">{{ item.name }}:</div>
|
||||
<el-select v-if="item.inputType===1" v-model="attrList[index].value" class="paramInput"
|
||||
style="width: 300px">
|
||||
<el-select
|
||||
v-if="item.inputType===1"
|
||||
v-model="attrList[index].value"
|
||||
class="paramInput"
|
||||
style="width: 300px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in getParamSelectList(item.selectList)"
|
||||
:key="item"
|
||||
@ -59,7 +63,7 @@
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-else v-model="attrList[index].value" class="paramInput" style="width: 300px"/>
|
||||
<el-input v-else v-model="attrList[index].value" class="paramInput" style="width: 300px" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
@ -77,20 +81,20 @@
|
||||
list-type="picture-card"
|
||||
:file-list="fileList"
|
||||
>
|
||||
<i class="el-icon-plus"/>
|
||||
<i class="el-icon-plus" />
|
||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png/gif文件,且不超过2MB</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>商品库存</h3></div>
|
||||
<el-form-item label="商品库存:">
|
||||
<el-input v-model="skuInfo.stock"/>
|
||||
<el-input v-model="skuInfo.stock" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品预警库存:">
|
||||
<el-input v-model="skuInfo.lowStock"/>
|
||||
<el-input v-model="skuInfo.lowStock" />
|
||||
</el-form-item>
|
||||
<el-form-item label="限购个数:">
|
||||
<el-input v-model="skuInfo.perLimit"/>
|
||||
<el-input v-model="skuInfo.perLimit" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>商品详情</h3></div>-->
|
||||
@ -110,7 +114,7 @@
|
||||
list-type="picture-card"
|
||||
:file-list="filePosterList"
|
||||
>
|
||||
<i class="el-icon-plus"/>
|
||||
<i class="el-icon-plus" />
|
||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png/gif文件,且不超过2MB</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@ -203,7 +207,7 @@ export default {
|
||||
this.fetchDataById(id)
|
||||
} else {
|
||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||
this.skuInfo = {...defaultForm}
|
||||
this.skuInfo = { ...defaultForm }
|
||||
}
|
||||
|
||||
this.fetchCategoryList()
|
||||
@ -277,7 +281,7 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/product/skuInfo/list'})
|
||||
this.$router.push({ path: '/product/skuInfo/list' })
|
||||
this.saveBtnDisabled = false
|
||||
}
|
||||
})
|
||||
@ -304,13 +308,13 @@ export default {
|
||||
type: 'success',
|
||||
message: response.message
|
||||
})
|
||||
this.$router.push({path: '/product/skuInfo/list'})
|
||||
this.$router.push({ path: '/product/skuInfo/list' })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$router.push({path: '/product/skuInfo/list'})
|
||||
this.$router.push({ path: '/product/skuInfo/list' })
|
||||
},
|
||||
|
||||
// 根据id查询记录
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<el-form inline>
|
||||
<el-form-item label="关键字">
|
||||
<el-input v-model="searchObj.keyword" type="text" width="100" placeholder="关键字" clearable/>
|
||||
<el-input v-model="searchObj.keyword" type="text" width="100" placeholder="关键字" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品分类" prop="tmId">
|
||||
@ -20,8 +20,8 @@
|
||||
|
||||
<el-form-item label="商品类型">
|
||||
<el-select v-model="searchObj.skuType" clearable placeholder="请选择">
|
||||
<el-option value="0" label="普通商品"/>
|
||||
<el-option value="1" label="秒杀商品"/>
|
||||
<el-option value="0" label="普通商品" />
|
||||
<el-option value="1" label="秒杀商品" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
||||
@ -59,7 +59,7 @@
|
||||
<p>编号:{{ scope.row.skuCode }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="skuName" label="sku名称"/>
|
||||
<el-table-column prop="skuName" label="sku名称" />
|
||||
<el-table-column label="商品图片" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<img style="height: 80px" :src="scope.row.imgUrl">
|
||||
@ -80,8 +80,8 @@
|
||||
<p>市场价:{{ scope.row.marketPrice }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sale" label="销量"/>
|
||||
<el-table-column prop="sort" label="排序"/>
|
||||
<el-table-column prop="sale" label="销量" />
|
||||
<el-table-column prop="sort" label="排序" />
|
||||
<el-table-column label="标签" width="160px">
|
||||
<template slot-scope="scope">
|
||||
<p>上架/下架:
|
||||
@ -176,7 +176,7 @@ export default {
|
||||
},
|
||||
|
||||
add() {
|
||||
this.$router.push({path: '/product/skuInfo/add'})
|
||||
this.$router.push({ path: '/product/skuInfo/add' })
|
||||
},
|
||||
|
||||
// 加载banner列表数据
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="输入搜索:">
|
||||
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字"/>
|
||||
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字" />
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
<!-- 工具条 -->
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
||||
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||
<span style="margin-top: 5px">数据列表</span>
|
||||
<el-button class="btn-add" size="mini" @click="openShow()">开通区域</el-button>
|
||||
</el-card>
|
||||
@ -38,9 +38,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="regionName" label="区域名称"/>
|
||||
<el-table-column prop="wareName" label="仓库名称"/>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="regionName" label="区域名称" />
|
||||
<el-table-column prop="wareName" label="仓库名称" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="状态" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<p>{{ scope.row.status == 0 ? '未开通' : '已开通' }}</p>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="输入搜索:">
|
||||
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字"/>
|
||||
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字" />
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||
@ -33,13 +33,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" label="姓名" width="100px"/>
|
||||
<el-table-column prop="phone" label="手机号码" width="100px"/>
|
||||
<el-table-column prop="takeName" label="提货点名称"/>
|
||||
<el-table-column prop="param.provinceName" label="省" width="70px"/>
|
||||
<el-table-column prop="param.cityName" label="城市" width="70px"/>
|
||||
<el-table-column prop="param.districtName" label="区/县" width="70px"/>
|
||||
<el-table-column prop="createTime" label="申请时间" width="155px"/>
|
||||
<el-table-column prop="name" label="姓名" width="100px" />
|
||||
<el-table-column prop="phone" label="手机号码" width="100px" />
|
||||
<el-table-column prop="takeName" label="提货点名称" />
|
||||
<el-table-column prop="param.provinceName" label="省" width="70px" />
|
||||
<el-table-column prop="param.cityName" label="城市" width="70px" />
|
||||
<el-table-column prop="param.districtName" label="区/县" width="70px" />
|
||||
<el-table-column prop="createTime" label="申请时间" width="155px" />
|
||||
|
||||
<el-table-column label="操作" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -69,16 +69,16 @@
|
||||
<el-dialog title="添加/修改" :visible.sync="dialogVisible" width="60%">
|
||||
<el-form ref="flashPromotionForm" label-width="150px" size="small" style="padding-right: 40px;">
|
||||
<el-form-item label="团长名称">
|
||||
<el-input v-model="leader.name"/>
|
||||
<el-input v-model="leader.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码">
|
||||
<el-input v-model="leader.phone"/>
|
||||
<el-input v-model="leader.phone" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证">
|
||||
<el-input v-model="leader.idNo"/>
|
||||
<el-input v-model="leader.idNo" />
|
||||
</el-form-item>
|
||||
<el-form-item label="提货点名称">
|
||||
<el-input v-model="leader.takeName"/>
|
||||
<el-input v-model="leader.takeName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="选择地址">
|
||||
<el-select
|
||||
@ -120,13 +120,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址">
|
||||
<el-input v-model="leader.detailAddress"/>
|
||||
<el-input v-model="leader.detailAddress" />
|
||||
</el-form-item>
|
||||
<el-form-item label="经度">
|
||||
<el-input v-model="leader.longitude"/>
|
||||
<el-input v-model="leader.longitude" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纬度">
|
||||
<el-input v-model="leader.latitude"/>
|
||||
<el-input v-model="leader.latitude" />
|
||||
</el-form-item>
|
||||
<el-form-item label="门店照片">
|
||||
<el-upload
|
||||
@ -140,7 +140,7 @@
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="营业时间">
|
||||
<el-input v-model="leader.workTime"/>
|
||||
<el-input v-model="leader.workTime" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -5,7 +5,7 @@
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="输入搜索:">
|
||||
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字"/>
|
||||
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字" />
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||
@ -32,17 +32,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" label="姓名" width="100px"/>
|
||||
<el-table-column prop="phone" label="手机号码" width="120px"/>
|
||||
<el-table-column prop="takeName" label="提货点名称"/>
|
||||
<el-table-column prop="param.regionName" label="所属区域" width="80px"/>
|
||||
<el-table-column prop="name" label="姓名" width="100px" />
|
||||
<el-table-column prop="phone" label="手机号码" width="120px" />
|
||||
<el-table-column prop="takeName" label="提货点名称" />
|
||||
<el-table-column prop="param.regionName" label="所属区域" width="80px" />
|
||||
<el-table-column label="状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
<p>{{ scope.row.checkStatus === 0 ? '待审核' : scope.row.checkStatus === 1 ? '通过' : '未通过' }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="checkTime" label="审核时间" width="150px"/>
|
||||
<el-table-column prop="createTime" label="申请时间" width="150px"/>
|
||||
<el-table-column prop="checkTime" label="审核时间" width="150px" />
|
||||
<el-table-column prop="createTime" label="申请时间" width="150px" />
|
||||
|
||||
<el-table-column label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {mount, createLocalVue} from '@vue/test-utils'
|
||||
import { mount, createLocalVue } from '@vue/test-utils'
|
||||
import VueRouter from 'vue-router'
|
||||
import ElementUI from 'element-ui'
|
||||
import Breadcrumb from '@/components/Breadcrumb/index.vue'
|
||||
@ -22,27 +22,27 @@ const routes = [
|
||||
children: [{
|
||||
path: 'menu1',
|
||||
name: 'menu1',
|
||||
meta: {title: 'menu1'},
|
||||
meta: { title: 'menu1' },
|
||||
children: [{
|
||||
path: 'menu1-1',
|
||||
name: 'menu1-1',
|
||||
meta: {title: 'menu1-1'}
|
||||
meta: { title: 'menu1-1' }
|
||||
},
|
||||
{
|
||||
path: 'menu1-2',
|
||||
name: 'menu1-2',
|
||||
redirect: 'noredirect',
|
||||
meta: { title: 'menu1-2' },
|
||||
children: [{
|
||||
path: 'menu1-2-1',
|
||||
name: 'menu1-2-1',
|
||||
meta: { title: 'menu1-2-1' }
|
||||
},
|
||||
{
|
||||
path: 'menu1-2',
|
||||
name: 'menu1-2',
|
||||
redirect: 'noredirect',
|
||||
meta: {title: 'menu1-2'},
|
||||
children: [{
|
||||
path: 'menu1-2-1',
|
||||
name: 'menu1-2-1',
|
||||
meta: {title: 'menu1-2-1'}
|
||||
},
|
||||
{
|
||||
path: 'menu1-2-2',
|
||||
name: 'menu1-2-2'
|
||||
}]
|
||||
path: 'menu1-2-2',
|
||||
name: 'menu1-2-2'
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {shallowMount} from '@vue/test-utils'
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import Hamburger from '@/components/Hamburger/index.vue'
|
||||
|
||||
describe('Hamburger.vue', () => {
|
||||
@ -11,9 +11,9 @@ describe('Hamburger.vue', () => {
|
||||
})
|
||||
it('prop isActive', () => {
|
||||
const wrapper = shallowMount(Hamburger)
|
||||
wrapper.setProps({isActive: true})
|
||||
wrapper.setProps({ isActive: true })
|
||||
expect(wrapper.contains('.is-active')).toBe(true)
|
||||
wrapper.setProps({isActive: false})
|
||||
wrapper.setProps({ isActive: false })
|
||||
expect(wrapper.contains('.is-active')).toBe(false)
|
||||
})
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {shallowMount} from '@vue/test-utils'
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue'
|
||||
|
||||
describe('SvgIcon.vue', () => {
|
||||
@ -17,7 +17,7 @@ describe('SvgIcon.vue', () => {
|
||||
}
|
||||
})
|
||||
expect(wrapper.classes().length).toBe(1)
|
||||
wrapper.setProps({className: 'test'})
|
||||
wrapper.setProps({ className: 'test' })
|
||||
expect(wrapper.classes().includes('test')).toBe(true)
|
||||
})
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {formatTime} from '@/utils/index.js'
|
||||
import { formatTime } from '@/utils/index.js'
|
||||
|
||||
describe('Utils:formatTime', () => {
|
||||
const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {param2Obj} from '@/utils/index.js'
|
||||
import { param2Obj } from '@/utils/index.js'
|
||||
|
||||
describe('Utils:param2Obj', () => {
|
||||
const url = 'https://github.com/PanJiaChen/vue-element-admin?name=bill&age=29&sex=1&field=dGVzdA==&key=%E6%B5%8B%E8%AF%95'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {parseTime} from '@/utils/index.js'
|
||||
import { parseTime } from '@/utils/index.js'
|
||||
|
||||
describe('Utils:parseTime', () => {
|
||||
const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {validUsername, isExternal} from '@/utils/validate.js'
|
||||
import { validUsername, isExternal } from '@/utils/validate.js'
|
||||
|
||||
describe('Utils:validate', () => {
|
||||
it('validUsername', () => {
|
||||
|
@ -93,28 +93,28 @@ module.exports = {
|
||||
.end()
|
||||
config
|
||||
.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial' // only package third parties that are initially dependent
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI', // split elementUI into a single package
|
||||
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'), // can customize your rules
|
||||
minChunks: 3, // minimum common number
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial' // only package third parties that are initially dependent
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI', // split elementUI into a single package
|
||||
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'), // can customize your rules
|
||||
minChunks: 3, // minimum common number
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
|
||||
config.optimization.runtimeChunk('single')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user