yshop2.1
This commit is contained in:
@ -41,7 +41,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="storeName" label="商品名称" />
|
||||
<el-table-column prop="cateName" label="分类名称" />
|
||||
<el-table-column prop="storeCategory.cateName" label="分类名称" />
|
||||
<el-table-column prop="price" label="商品价格" />
|
||||
<el-table-column prop="sales" label="销量" />
|
||||
<el-table-column prop="stock" label="库存" />
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="storeName" label="商品名称" />
|
||||
<el-table-column prop="cateName" label="分类名称" />
|
||||
<el-table-column prop="storeCategory.cateName" label="分类名称" />
|
||||
<el-table-column prop="price" label="商品价格" />
|
||||
<el-table-column prop="sales" label="销量" />
|
||||
<el-table-column prop="stock" label="库存" />
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="storeName" label="商品名称" />
|
||||
<el-table-column prop="cateName" label="分类名称" />
|
||||
<el-table-column prop="storeCategory.cateName" label="分类名称" />
|
||||
<el-table-column prop="price" label="商品价格" />
|
||||
<el-table-column prop="sales" label="销量" />
|
||||
<el-table-column prop="stock" label="库存" />
|
||||
|
||||
@ -34,6 +34,9 @@
|
||||
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
|
||||
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" />
|
||||
</el-select>
|
||||
<el-select v-model="storeId" clearable placeholder="选择门店" class="filter-item" style="width: 130px">
|
||||
<el-option v-for="item in storeList" :key="item.key" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
@ -53,7 +56,8 @@
|
||||
<eRemark ref="form4" :is-add="isAdd" />
|
||||
<!--表格渲染-->
|
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
||||
<el-table-column prop="orderId" width="140" label="订单号">
|
||||
<el-table-column prop="storeName" label="所属门店" />
|
||||
<el-table-column prop="orderId" width="150" label="订单号">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.orderId }}</span>
|
||||
<p>{{ scope.row.pinkName }}</p>
|
||||
@ -181,6 +185,7 @@
|
||||
import checkPermission from '@/utils/permission'
|
||||
import initData from '@/mixins/crud'
|
||||
import { del } from '@/api/yxStoreOrder'
|
||||
import { getAll } from '@/api/yxSystemStore'
|
||||
import eForm from './formC'
|
||||
import eDetail from './detail'
|
||||
import eRefund from './refund'
|
||||
@ -192,7 +197,7 @@ export default {
|
||||
mixins: [initData],
|
||||
data() {
|
||||
return {
|
||||
delLoading: false, status: '-9', orderType: '0',
|
||||
delLoading: false, status: '-9', orderType: '0', storeList: [] , storeId: null,
|
||||
queryTypeOptions: [
|
||||
{ key: 'orderId', display_name: '订单号' },
|
||||
{ key: 'realName', display_name: '用户姓名' },
|
||||
@ -215,8 +220,14 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.init()
|
||||
})
|
||||
this.getStoreAll()
|
||||
},
|
||||
methods: {
|
||||
getStoreAll() {
|
||||
getAll().then(res => {
|
||||
this.storeList = res
|
||||
})
|
||||
},
|
||||
formatTime,
|
||||
checkPermission,
|
||||
handleOrder(tab, event) {
|
||||
@ -226,7 +237,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxStoreOrder'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, orderStatus: this.status, orderType: 5 }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, orderStatus: this.status, orderType: 5, storeId: this.storeId }
|
||||
const query = this.query
|
||||
const type = query.type
|
||||
const value = query.value
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
<!--表格渲染-->
|
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table-column prop="username" label="用户" />
|
||||
<el-table-column prop="productName" label="商品信息" />
|
||||
<el-table-column prop="user.nickname" label="用户" />
|
||||
<el-table-column prop="storeProduct.storeName" label="商品信息" />
|
||||
<el-table-column prop="productScore" label="商品分数" />
|
||||
<el-table-column prop="serviceScore" label="服务分数" />
|
||||
<el-table-column prop="comment" label="评论内容" />
|
||||
|
||||
@ -81,7 +81,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'routine_home_activity' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_home_activity' }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
groupName: 'routine_home_activity',
|
||||
groupName: 'yshop_home_activity',
|
||||
title: '',
|
||||
info: '',
|
||||
url: '',
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
groupName: 'routine_home_activity',
|
||||
groupName: 'yshop_home_activity',
|
||||
value: '',
|
||||
addTime: '',
|
||||
sort: '',
|
||||
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
groupName: 'routine_home_banner',
|
||||
groupName: 'yshop_home_banner',
|
||||
name: '',
|
||||
url: '',
|
||||
wxapp_url: '',
|
||||
@ -115,7 +115,7 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
groupName: 'routine_home_banner',
|
||||
groupName: 'yshop_home_banner',
|
||||
name: '',
|
||||
url: '',
|
||||
wxapp_url: '',
|
||||
|
||||
@ -83,7 +83,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'routine_hot_search' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_hot_search' }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@ -36,7 +36,7 @@ export default {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
groupName: 'routine_hot_search',
|
||||
groupName: 'yshop_hot_search',
|
||||
title: '',
|
||||
sort: 0,
|
||||
status: 1
|
||||
@ -90,7 +90,7 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
groupName: 'routine_hot_search',
|
||||
groupName: 'yshop_hot_search',
|
||||
title: '',
|
||||
sort: 0,
|
||||
status: 1
|
||||
|
||||
@ -91,7 +91,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'routine_home_banner' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_home_banner' }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@ -91,7 +91,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'routine_home_menus' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_home_menus' }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
groupName: 'routine_home_menus',
|
||||
groupName: 'yshop_home_menus',
|
||||
name: '',
|
||||
url: '',
|
||||
wxapp_url: '',
|
||||
@ -115,7 +115,7 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
groupName: 'routine_home_menus',
|
||||
groupName: 'yshop_home_menus',
|
||||
name: '',
|
||||
url: '',
|
||||
wxapp_url: '',
|
||||
|
||||
@ -84,7 +84,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'recharge_price_ways' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_recharge_price_ways' }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
@ -115,8 +115,8 @@ export default {
|
||||
_this.form = {
|
||||
id: data.id,
|
||||
groupName: data.groupName,
|
||||
day: data.map.day,
|
||||
sign_num: data.map.sign_num,
|
||||
give_price: data.map.give_price,
|
||||
price: data.map.price,
|
||||
sort: data.sort,
|
||||
status: data.status
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ export default {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
groupName: 'recharge_price_ways',
|
||||
groupName: 'yshop_recharge_price_ways',
|
||||
price: 1,
|
||||
give_price: 0,
|
||||
sort: 0,
|
||||
@ -94,7 +94,7 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
groupName: 'recharge_price_ways',
|
||||
groupName: 'yshop_recharge_price_ways',
|
||||
price: 1,
|
||||
give_price: 0,
|
||||
sort: 0,
|
||||
|
||||
@ -86,7 +86,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'routine_home_roll_news' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_home_roll_news' }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@ -45,7 +45,7 @@ export default {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
groupName: 'routine_home_roll_news',
|
||||
groupName: 'yshop_home_roll_news',
|
||||
info: '',
|
||||
wxapp_url: '',
|
||||
uniapp_url: '',
|
||||
@ -102,7 +102,7 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
groupName: 'routine_home_roll_news',
|
||||
groupName: 'yshop_home_roll_news',
|
||||
info: '',
|
||||
wxapp_url: '',
|
||||
uniapp_url: '',
|
||||
|
||||
@ -75,7 +75,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'routine_seckill_time' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_seckill_time' }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
groupName: 'routine_seckill_time',
|
||||
groupName: 'yshop_seckill_time',
|
||||
time: 5,
|
||||
continued: 2
|
||||
},
|
||||
@ -85,7 +85,7 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
groupName: 'routine_seckill_time',
|
||||
groupName: 'yshop_seckill_time',
|
||||
time: 5,
|
||||
continued: 2
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'sign_day_num' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_sign_day_num' }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@ -39,7 +39,7 @@ export default {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
groupName: 'sign_day_num',
|
||||
groupName: 'yshop_sign_day_num',
|
||||
day: 1,
|
||||
sign_num: 0,
|
||||
sort: 0,
|
||||
@ -94,7 +94,7 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
groupName: 'sign_day_num',
|
||||
groupName: 'yshop_sign_day_num',
|
||||
day: 1,
|
||||
sign_num: 0,
|
||||
sort: 0,
|
||||
|
||||
@ -93,7 +93,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'routine_my_menus' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_my_menus' }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
groupName: 'routine_my_menus',
|
||||
groupName: 'yshop_my_menus',
|
||||
name: '',
|
||||
url: '',
|
||||
wxapp_url: '',
|
||||
@ -115,7 +115,7 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
groupName: 'routine_my_menus',
|
||||
groupName: 'yshop_my_menus',
|
||||
name: '',
|
||||
url: '',
|
||||
wxapp_url: '',
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
// crud交由presenter持有
|
||||
const defaultCrud = CRUD({ title: '门店', url: 'api/yxSystemStore', sort: 'id,desc', crudMethod: { ...crudYxSystemStore }})
|
||||
const defaultForm = { id: null, name: null, introduction: null, phone: null, address: null, detailedAddress: null, image: null, latitude:
|
||||
null, longitude: null, validTime: null, dayTime: null, addTime: null, isShow: 1, imageArr: [], validTimeArr: [], dayTimeArr: [] }
|
||||
null, longitude: null, validTime: null, dayTime: null, addTime: null, isShow: 1, imageArr: [], validTimeArr: [], dayTimeArr: [new Date(),new Date()] }
|
||||
export default {
|
||||
name: 'YxSystemStore',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterialList },
|
||||
|
||||
@ -93,7 +93,7 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import cuser from './user'
|
||||
import cuser from '@/views/components/user'
|
||||
import crudYxSystemStore from '@/api/yxSystemStore'
|
||||
|
||||
// crud交由presenter持有
|
||||
|
||||
@ -1,156 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="value.uid">
|
||||
<!--<img :src="value.avatar" alt="" class="el-upload-list__item-thumbnail">-->
|
||||
<!--<span class="el-upload-list__item-delete" @click="deleteMaterial(index)">-->
|
||||
<!--<i class="el-icon-delete" />-->
|
||||
<!--</span>-->
|
||||
<ul class="el-upload-list el-upload-list--picture-card">
|
||||
<li tabindex="0" class="el-upload-list__item is-ready">
|
||||
<div>
|
||||
<img :src="value.avatar" alt="" class="el-upload-list__item-thumbnail">
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span class="el-upload-list__item-delete" @click="deleteUser">
|
||||
<i class="el-icon-delete" />
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-else tabindex="0" class="el-upload el-upload--picture-card" @click="toSelete">
|
||||
<i class="el-icon-plus" />
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialog" append-to-body width="60%" title="商城会员">
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery" />
|
||||
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
|
||||
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" />
|
||||
</el-select>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
<!-- 新增 -->
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-refresh"
|
||||
@click="toQuery"
|
||||
>刷新</el-button>
|
||||
</div>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table :data="data" size="small" style="width: 100%;">
|
||||
<el-table-column prop="uid" label="用户id" />
|
||||
<el-table-column prop="nickname" label="用户昵称" />
|
||||
<el-table-column ref="table" prop="avatar" label="用户头像">
|
||||
<template slot-scope="scope">
|
||||
<a :href="scope.row.avatar" style="color: #42b983" target="_blank"><img :src="scope.row.avatar" alt="点击打开" class="el-avatar"></a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phone" label="手机号码" />
|
||||
<el-table-column v-if="checkPermission(['admin','YXUSER_ALL','YXUSER_EDIT','YXUSER_DELETE'])" label="操作" width="185" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-permission="['admin','YXUSER_ALL','YXUSER_EDIT']"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="doSelect(scope.row)"
|
||||
>选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<el-pagination
|
||||
:total="total"
|
||||
:current-page="page + 1"
|
||||
style="margin-top: 8px;"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
@size-change="sizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import checkPermission from '@/utils/permission'
|
||||
import initData from '@/mixins/crud'
|
||||
export default {
|
||||
components: {},
|
||||
mixins: [initData],
|
||||
props: {
|
||||
value: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
myValue: this.value,
|
||||
delLoading: false, dialog: false,
|
||||
userType: '',
|
||||
queryTypeOptions: [
|
||||
{ key: 'nickname', display_name: '用户昵称' },
|
||||
{ key: 'phone', display_name: '手机号码' }
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(() => {
|
||||
this.init()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
beforeInit() {
|
||||
this.url = 'api/yxUser'
|
||||
const sort = 'uid,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
const query = this.query
|
||||
const type = query.type
|
||||
const value = query.value
|
||||
if (type && value) { this.params[type] = value }
|
||||
return true
|
||||
},
|
||||
deleteUser() {
|
||||
const that = this
|
||||
this.$confirm('是否确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function() {
|
||||
//that.myValue = {uid: null,nickname: null,avatar: null}
|
||||
that.$set(that.value,"uid", null)
|
||||
that.$set(that.value,"nickname", null)
|
||||
that.$set(that.value,"avatar", null)
|
||||
})
|
||||
},
|
||||
toSelete() {
|
||||
this.dialog = true
|
||||
},
|
||||
doSelect(data) {
|
||||
this.$set(this.value,"uid", data.uid)
|
||||
this.$set(this.value,"nickname", data.nickname)
|
||||
this.$set(this.value,"avatar", data.avatar)
|
||||
|
||||
this.dialog = false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user