总订单和轮播图
This commit is contained in:
parent
715957e854
commit
3706f9d02c
|
@ -89,6 +89,7 @@ export default {
|
||||||
orderNum: 0,
|
orderNum: 0,
|
||||||
open: null,
|
open: null,
|
||||||
list: [],
|
list: [],
|
||||||
|
hideInMenu: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
menuId: getUUID(),
|
menuId: getUUID(),
|
||||||
|
|
|
@ -86,7 +86,7 @@ const router = new Router({
|
||||||
});
|
});
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
console.log("beforeEach");
|
console.log("beforeEach", to);
|
||||||
// 添加动态(菜单)路由
|
// 添加动态(菜单)路由
|
||||||
// 1. 已经添加 or 全局路由, 直接访问
|
// 1. 已经添加 or 全局路由, 直接访问
|
||||||
// 2. 获取菜单列表, 添加并保存本地存储
|
// 2. 获取菜单列表, 添加并保存本地存储
|
||||||
|
|
|
@ -5,8 +5,15 @@
|
||||||
:default-active="menuActiveName || 'home'"
|
:default-active="menuActiveName || 'home'"
|
||||||
:collapse="sidebarFold"
|
:collapse="sidebarFold"
|
||||||
:collapseTransition="false"
|
:collapseTransition="false"
|
||||||
class="site-sidebar__menu">
|
class="site-sidebar__menu"
|
||||||
<el-input v-show="showSearchInput" class="search-input" v-model="keyWord" style="width" placeholder="快速搜索菜单"></el-input>
|
>
|
||||||
|
<el-input
|
||||||
|
v-show="showSearchInput"
|
||||||
|
class="search-input"
|
||||||
|
v-model="keyWord"
|
||||||
|
style="width"
|
||||||
|
placeholder="快速搜索菜单"
|
||||||
|
></el-input>
|
||||||
<el-menu-item index="home" @click="$router.push({ name: 'home' })">
|
<el-menu-item index="home" @click="$router.push({ name: 'home' })">
|
||||||
<icon-svg name="shouye" class="site-sidebar__menu-icon"></icon-svg>
|
<icon-svg name="shouye" class="site-sidebar__menu-icon"></icon-svg>
|
||||||
<span slot="title">首页</span>
|
<span slot="title">首页</span>
|
||||||
|
@ -29,7 +36,8 @@
|
||||||
v-for="menu in filterMenu"
|
v-for="menu in filterMenu"
|
||||||
:key="menu.menuId"
|
:key="menu.menuId"
|
||||||
:menu="menu"
|
:menu="menu"
|
||||||
:dynamicMenuRoutes="dynamicMenuRoutes">
|
:dynamicMenuRoutes="dynamicMenuRoutes"
|
||||||
|
>
|
||||||
</sub-menu>
|
</sub-menu>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,104 +45,138 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SubMenu from './main-sidebar-sub-menu'
|
import SubMenu from "./main-sidebar-sub-menu";
|
||||||
import { isURL } from '@/utils/validate'
|
import { isURL } from "@/utils/validate";
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
dynamicMenuRoutes: [],
|
dynamicMenuRoutes: [],
|
||||||
//菜单搜索关键词
|
//菜单搜索关键词
|
||||||
keyWord:""
|
keyWord: "",
|
||||||
}
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
SubMenu,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
sidebarLayoutSkin: {
|
||||||
|
get() {
|
||||||
|
return this.$store.state.common.sidebarLayoutSkin;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
sidebarFold: {
|
||||||
SubMenu
|
get() {
|
||||||
|
return this.$store.state.common.sidebarFold;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
menuList: {
|
||||||
sidebarLayoutSkin: {
|
get() {
|
||||||
get () { return this.$store.state.common.sidebarLayoutSkin }
|
return this.$store.state.common.menuList;
|
||||||
},
|
},
|
||||||
sidebarFold: {
|
set(val) {
|
||||||
get () { return this.$store.state.common.sidebarFold }
|
this.$store.commit("common/updateMenuList", val);
|
||||||
},
|
},
|
||||||
menuList: {
|
|
||||||
get () { return this.$store.state.common.menuList },
|
|
||||||
set (val) { this.$store.commit('common/updateMenuList', val) }
|
|
||||||
},
|
|
||||||
menuActiveName: {
|
|
||||||
get () { return this.$store.state.common.menuActiveName },
|
|
||||||
set (val) { this.$store.commit('common/updateMenuActiveName', val) }
|
|
||||||
},
|
|
||||||
mainTabs: {
|
|
||||||
get () { return this.$store.state.common.mainTabs },
|
|
||||||
set (val) { this.$store.commit('common/updateMainTabs', val) }
|
|
||||||
},
|
|
||||||
mainTabsActiveName: {
|
|
||||||
get () { return this.$store.state.common.mainTabsActiveName },
|
|
||||||
set (val) { this.$store.commit('common/updateMainTabsActiveName', val) }
|
|
||||||
},
|
|
||||||
//过滤后的菜单
|
|
||||||
filterMenu(){
|
|
||||||
//过滤的方法
|
|
||||||
const filterMethod=(list,keyWord)=>{
|
|
||||||
return list.filter(function f(item){
|
|
||||||
if(item.name.includes(keyWord)) return true;
|
|
||||||
if(item.list&&item.list.length>0){
|
|
||||||
//此处的目的是至展示有的菜单
|
|
||||||
return (item.list=item.list.filter(f)).length
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
let filterMenu=filterMethod(JSON.parse(JSON.stringify(this.menuList)),this.keyWord);
|
|
||||||
console.log(filterMenu);
|
|
||||||
return filterMenu.filter(item=>item.hideInMenu!=true);
|
|
||||||
},
|
|
||||||
//是否展示菜单搜索界面
|
|
||||||
showSearchInput(){
|
|
||||||
return this.$store.state.common.sidebarFold==false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
watch: {
|
menuActiveName: {
|
||||||
$route: 'routeHandle'
|
get() {
|
||||||
|
return this.$store.state.common.menuActiveName;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$store.commit("common/updateMenuActiveName", val);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created () {
|
mainTabs: {
|
||||||
this.menuList = JSON.parse(sessionStorage.getItem('menuList') || '[]')
|
get() {
|
||||||
this.dynamicMenuRoutes = JSON.parse(sessionStorage.getItem('dynamicMenuRoutes') || '[]')
|
return this.$store.state.common.mainTabs;
|
||||||
this.routeHandle(this.$route)
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$store.commit("common/updateMainTabs", val);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
mainTabsActiveName: {
|
||||||
// 路由操作
|
get() {
|
||||||
routeHandle (route) {
|
return this.$store.state.common.mainTabsActiveName;
|
||||||
if (route.meta.isTab) {
|
},
|
||||||
// tab选中, 不存在先添加
|
set(val) {
|
||||||
var tab = this.mainTabs.filter(item => item.name === route.name)[0]
|
this.$store.commit("common/updateMainTabsActiveName", val);
|
||||||
if (!tab) {
|
},
|
||||||
if (route.meta.isDynamic) {
|
},
|
||||||
route = this.dynamicMenuRoutes.filter(item => item.name === route.name)[0]
|
//过滤后的菜单
|
||||||
if (!route) {
|
filterMenu() {
|
||||||
return console.error('未能找到可用标签页!')
|
//过滤的方法
|
||||||
}
|
const filterMethod = (list, keyWord) => {
|
||||||
}
|
return list.filter(function f(item) {
|
||||||
tab = {
|
if (item.name.includes(keyWord)) return true;
|
||||||
menuId: route.meta.menuId || route.name,
|
if (item.list && item.list.length > 0) {
|
||||||
name: route.name,
|
//此处的目的是至展示有的菜单
|
||||||
title: route.meta.title,
|
return (item.list = item.list.filter(f)).length;
|
||||||
type: route.meta.isMicroApp?'microApp' : (isURL(route.meta.iframeUrl) ? 'iframe' : 'module'),
|
|
||||||
iframeUrl: route.meta.iframeUrl || '',
|
|
||||||
params: route.params,
|
|
||||||
query: route.query
|
|
||||||
}
|
|
||||||
this.mainTabs = this.mainTabs.concat(tab)
|
|
||||||
}
|
}
|
||||||
this.menuActiveName = tab.menuId + ''
|
});
|
||||||
this.mainTabsActiveName = tab.name
|
};
|
||||||
|
let filterMenu = filterMethod(
|
||||||
|
JSON.parse(JSON.stringify(this.menuList)),
|
||||||
|
this.keyWord
|
||||||
|
);
|
||||||
|
console.log(filterMenu, "filterMenu");
|
||||||
|
return filterMenu.filter((item) => {
|
||||||
|
item.list = item.list.filter((prop) => prop.hideInMenu != true);
|
||||||
|
return item.hideInMenu != true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//是否展示菜单搜索界面
|
||||||
|
showSearchInput() {
|
||||||
|
return this.$store.state.common.sidebarFold == false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route: "routeHandle",
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.menuList = JSON.parse(sessionStorage.getItem("menuList") || "[]");
|
||||||
|
this.dynamicMenuRoutes = JSON.parse(
|
||||||
|
sessionStorage.getItem("dynamicMenuRoutes") || "[]"
|
||||||
|
);
|
||||||
|
this.routeHandle(this.$route);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 路由操作
|
||||||
|
routeHandle(route) {
|
||||||
|
if (route.meta.isTab) {
|
||||||
|
// tab选中, 不存在先添加
|
||||||
|
var tab = this.mainTabs.filter((item) => item.name === route.name)[0];
|
||||||
|
if (!tab) {
|
||||||
|
if (route.meta.isDynamic) {
|
||||||
|
route = this.dynamicMenuRoutes.filter(
|
||||||
|
(item) => item.name === route.name
|
||||||
|
)[0];
|
||||||
|
if (!route) {
|
||||||
|
return console.error("未能找到可用标签页!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tab = {
|
||||||
|
menuId: route.meta.menuId || route.name,
|
||||||
|
name: route.name,
|
||||||
|
title: route.meta.title,
|
||||||
|
type: route.meta.isMicroApp
|
||||||
|
? "microApp"
|
||||||
|
: isURL(route.meta.iframeUrl)
|
||||||
|
? "iframe"
|
||||||
|
: "module",
|
||||||
|
iframeUrl: route.meta.iframeUrl || "",
|
||||||
|
params: route.params,
|
||||||
|
query: route.query,
|
||||||
|
};
|
||||||
|
this.mainTabs = this.mainTabs.concat(tab);
|
||||||
}
|
}
|
||||||
|
this.menuActiveName = tab.menuId + "";
|
||||||
|
this.mainTabsActiveName = tab.name;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search-input{
|
.search-input {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
>
|
>
|
||||||
<template slot="tableTop">
|
<template slot="tableTop">
|
||||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
<el-form-item label="模块">
|
<!-- <el-form-item label="模块">
|
||||||
<el-select
|
<el-select
|
||||||
@change="changeModule"
|
@change="changeModule"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="应用">
|
<el-form-item label="应用">
|
||||||
<el-select
|
<el-select
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
@ -142,7 +142,7 @@ export default {
|
||||||
formInline: {
|
formInline: {
|
||||||
type: 0,
|
type: 0,
|
||||||
ownerId: "",
|
ownerId: "",
|
||||||
module: "shop",
|
module: "",
|
||||||
},
|
},
|
||||||
tableProp: {
|
tableProp: {
|
||||||
"auto-resize": true,
|
"auto-resize": true,
|
||||||
|
@ -176,12 +176,24 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.formInline = {
|
if (
|
||||||
type: 0,
|
JSON.parse(sessionStorage.getItem("userInfo")).role === "ROLE_MANAGER"
|
||||||
ownerId: this.shopId,
|
) {
|
||||||
module: "shop",
|
this.formInline = {
|
||||||
app: 1,
|
type: 0,
|
||||||
};
|
ownerId: this.marketId,
|
||||||
|
module: "market",
|
||||||
|
app: 1,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
this.formInline = {
|
||||||
|
type: 0,
|
||||||
|
ownerId: this.shopId,
|
||||||
|
module: "shop",
|
||||||
|
app: 1,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.oTable.reload();
|
this.$refs.oTable.reload();
|
||||||
});
|
});
|
||||||
|
|
|
@ -78,12 +78,12 @@ export default {
|
||||||
},
|
},
|
||||||
init(row) {
|
init(row) {
|
||||||
this.modalData = row;
|
this.modalData = row;
|
||||||
this.fileList = row.img.split(",").map(item => {
|
this.fileList = row.img.split(",").map((item) => {
|
||||||
return {
|
return {
|
||||||
name: "轮播图",
|
name: "轮播图",
|
||||||
url: item,
|
url: item,
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -101,40 +101,40 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: "分类",
|
// label: "分类",
|
||||||
prop: "type",
|
// prop: "type",
|
||||||
maxlength: "30",
|
// maxlength: "30",
|
||||||
rules: {
|
// rules: {
|
||||||
required: true,
|
// required: true,
|
||||||
message: "请输入轮播图名称",
|
// message: "请输入轮播图名称",
|
||||||
trigger: "blur",
|
// trigger: "blur",
|
||||||
},
|
// },
|
||||||
type: "jsx",
|
// type: "jsx",
|
||||||
render: () => {
|
// render: () => {
|
||||||
return (
|
// return (
|
||||||
<el-select
|
// <el-select
|
||||||
v-model={this.modalData.type}
|
// v-model={this.modalData.type}
|
||||||
placeholder="请选择销售单位"
|
// placeholder="请选择销售单位"
|
||||||
>
|
// >
|
||||||
{[
|
// {[
|
||||||
{ label: "菜市场", value: 0 },
|
// { label: "菜市场", value: 0 },
|
||||||
{
|
// {
|
||||||
label: "云店",
|
// label: "云店",
|
||||||
value: 1,
|
// value: 1,
|
||||||
},
|
// },
|
||||||
].map((item) => {
|
// ].map((item) => {
|
||||||
return (
|
// return (
|
||||||
<el-option
|
// <el-option
|
||||||
label={item.label}
|
// label={item.label}
|
||||||
value={item.value}
|
// value={item.value}
|
||||||
></el-option>
|
// ></el-option>
|
||||||
);
|
// );
|
||||||
})}
|
// })}
|
||||||
</el-select>
|
// </el-select>
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: "状态",
|
label: "状态",
|
||||||
prop: "status",
|
prop: "status",
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
>
|
>
|
||||||
<template slot="tableTop">
|
<template slot="tableTop">
|
||||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
<el-form-item label="模块">
|
<!-- <el-form-item label="模块">
|
||||||
<el-select
|
<el-select
|
||||||
@change="changePosition"
|
@change="changePosition"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="storeList.length > 1 && formInline.position === '1'"
|
v-if="storeList.length > 1 && formInline.position === '3'"
|
||||||
label="摊铺"
|
label="摊铺"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="应用">
|
<el-form-item label="应用">
|
||||||
<el-select
|
<el-select
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
@ -176,12 +176,23 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.formInline = {
|
if (
|
||||||
type: 0,
|
JSON.parse(sessionStorage.getItem("userInfo")).role === "ROLE_MANAGER"
|
||||||
targetId: this.shopId,
|
) {
|
||||||
position: "3",
|
this.formInline = {
|
||||||
app: 1,
|
type: 0,
|
||||||
};
|
targetId: this.marketId,
|
||||||
|
position: "2",
|
||||||
|
app: 1,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
this.formInline = {
|
||||||
|
type: 0,
|
||||||
|
ownerId: this.shopId,
|
||||||
|
position: "3",
|
||||||
|
app: 1,
|
||||||
|
};
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.oTable.reload();
|
this.$refs.oTable.reload();
|
||||||
});
|
});
|
||||||
|
@ -202,7 +213,9 @@ export default {
|
||||||
this.$refs.addOrUpdate.toggle().add(this.formInline);
|
this.$refs.addOrUpdate.toggle().add(this.formInline);
|
||||||
},
|
},
|
||||||
changePosition(e) {
|
changePosition(e) {
|
||||||
if (e === "shop") {
|
console.log(e, this.shopId, this.marketId);
|
||||||
|
|
||||||
|
if (e == 3) {
|
||||||
this.formInline.targetId = this.shopId;
|
this.formInline.targetId = this.shopId;
|
||||||
} else {
|
} else {
|
||||||
this.formInline.targetId = this.marketId;
|
this.formInline.targetId = this.marketId;
|
||||||
|
|
|
@ -1,66 +1,108 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="height: calc(100vh - 200px)">
|
<div style="height: calc(100vh - 200px)">
|
||||||
<obj-table-plus
|
<el-form
|
||||||
ref="oTable"
|
v-if="storeList.length > 1"
|
||||||
style="height: 100%"
|
:inline="true"
|
||||||
:tableCols="tableCols"
|
:model="formInline"
|
||||||
:tableProp="tableProp"
|
class="demo-form-inline"
|
||||||
@query="queryList"
|
|
||||||
v-model="dataList"
|
|
||||||
:tableEvent="tableEvent"
|
|
||||||
:enableAutoQuery="false"
|
|
||||||
>
|
>
|
||||||
<template slot="tableTop">
|
<el-form-item label="摊铺">
|
||||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
<el-select
|
||||||
<!-- <el-form-item label="订单号">
|
class="filter-item"
|
||||||
<el-select v-model="formInline.group" placeholder="请选择">
|
style="width: 200px"
|
||||||
<el-option
|
v-model="formInline.shopId"
|
||||||
v-for="item in statusList"
|
placeholder="请选择摊铺"
|
||||||
:key="item.value"
|
>
|
||||||
:label="item.label"
|
<el-option
|
||||||
:value="item.value"
|
v-for="item in storeList"
|
||||||
>
|
:key="item.shopId"
|
||||||
</el-option>
|
:label="item.shopName"
|
||||||
</el-select>
|
:value="item.shopId"
|
||||||
</el-form-item> -->
|
>
|
||||||
<el-form-item v-if="storeList.length > 1" label="摊铺">
|
</el-option>
|
||||||
<el-select
|
</el-select>
|
||||||
class="filter-item"
|
</el-form-item>
|
||||||
style="width: 200px"
|
<el-form-item>
|
||||||
v-model="formInline.shopId"
|
<el-button type="primary" @click="getList">查询</el-button>
|
||||||
placeholder="请选择摊铺"
|
<el-button type="primary" @click="Reset">重置</el-button>
|
||||||
>
|
<el-button
|
||||||
<el-option
|
type="success"
|
||||||
v-for="item in storeList"
|
@click="
|
||||||
:key="item.shopId"
|
$router.push({ name: 'operation-management-total-order/index' })
|
||||||
:label="item.shopName"
|
"
|
||||||
:value="item.shopId"
|
>菜市场总订单</el-button
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-form-item>
|
||||||
</el-select>
|
</el-form>
|
||||||
</el-form-item>
|
<el-tabs v-model="formInline.group" @tab-click="handleClick">
|
||||||
<el-form-item>
|
<el-tab-pane
|
||||||
<el-button type="primary" @click="$refs.oTable.reload()"
|
v-for="item in statusList"
|
||||||
>查询</el-button
|
:key="item.value"
|
||||||
>
|
:label="item.label"
|
||||||
<el-button type="primary" @click="Reset">重置</el-button>
|
:name="item.value"
|
||||||
</el-form-item>
|
></el-tab-pane>
|
||||||
</el-form>
|
</el-tabs>
|
||||||
<el-tabs v-model="formInline.group" @tab-click="handleClick">
|
<el-table :data="tableData" height="70vh" border style="width: 100%">
|
||||||
<el-tab-pane
|
<el-table-column type="expand">
|
||||||
v-for="item in statusList"
|
<template slot-scope="props">
|
||||||
:key="item.value"
|
<div style="padding-left: 20px" m="4">
|
||||||
:label="item.label"
|
<el-table :data="props.row.productOrders" :border="true">
|
||||||
:name="item.value"
|
<el-table-column type="index" width="50" label="序号">
|
||||||
></el-tab-pane>
|
</el-table-column>
|
||||||
</el-tabs>
|
<el-table-column label="商品订单号" prop="productOrderNo" />
|
||||||
<!-- <div class="mb-2">
|
<el-table-column label="商品名称" prop="productName" />
|
||||||
<el-button type="primary" size="small" @click="addProduct"
|
<el-table-column label="商品原价" prop="originPrice" />
|
||||||
>批量导出</el-button
|
<el-table-column label="商品终价" prop="finalPrice" />
|
||||||
>
|
<el-table-column label="商品订单金额" prop="productOrderMoney" />
|
||||||
</div> -->
|
<el-table-column label="商品数量" prop="productCount" />
|
||||||
</template>
|
<el-table-column label="商品单价" prop="productFinalPrice" />
|
||||||
</obj-table-plus>
|
<el-table-column label="商品图片" prop="productImg">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px"
|
||||||
|
:src="scope.row.productImg"
|
||||||
|
:preview-src-list="[scope.row.productImg]"
|
||||||
|
>
|
||||||
|
</el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总订单号" prop="orderNo" />
|
||||||
|
<el-table-column label="结算单位订单号" prop="unitOrderNo" />
|
||||||
|
<el-table-column label="总商品数量" prop="productCount" />
|
||||||
|
<el-table-column label="顾客实际支付" prop="totalMoney" />
|
||||||
|
<el-table-column label="商品总价" prop="productMoney" />
|
||||||
|
<el-table-column label="配送费" prop="deliveryMoney" />
|
||||||
|
<el-table-column label="优惠券减免" prop="couponMoney" />
|
||||||
|
<el-table-column label="支付时间" prop="payTime" />
|
||||||
|
<el-table-column label="预计送达时间" prop="predictDeliveryTime" />
|
||||||
|
<el-table-column label="预计收入" prop="predictIncome" />
|
||||||
|
<el-table-column label="距离" prop="distance" />
|
||||||
|
<el-table-column label="备注" prop="remark" />
|
||||||
|
<el-table-column fixed="right" width="100px" label="操作" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="primary" size="mini" @click="view(scope.row)">
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<div class="pagination-container">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="formInline.pageNumber"
|
||||||
|
:page-sizes="[10, 20, 30, 50]"
|
||||||
|
:page-size="formInline.pageSize"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<!-- 订单详情 -->
|
<!-- 订单详情 -->
|
||||||
<viewDetails ref="viewDetails"></viewDetails>
|
<viewDetails ref="viewDetails"></viewDetails>
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,26 +110,16 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import viewDetails from "./popup/view-details.vue";
|
import viewDetails from "./popup/view-details.vue";
|
||||||
import content from "./popup/content.vue";
|
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
components: { content, viewDetails },
|
components: { viewDetails },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeName: "0",
|
|
||||||
value1: "1",
|
|
||||||
advanceSellStatus: "",
|
|
||||||
dataList: [],
|
|
||||||
formInline: {
|
formInline: {
|
||||||
group: "",
|
group: "",
|
||||||
shopId: "",
|
shopId: "",
|
||||||
},
|
pageNumber: 1,
|
||||||
tableProp: {
|
pageSize: 10,
|
||||||
"auto-resize": true,
|
|
||||||
border: true,
|
|
||||||
height: "auto",
|
|
||||||
"row-id": "id",
|
|
||||||
"show-overflow": false,
|
|
||||||
},
|
},
|
||||||
statusList: [
|
statusList: [
|
||||||
{
|
{
|
||||||
|
@ -111,8 +143,8 @@ export default {
|
||||||
value: "4",
|
value: "4",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
productFilterType: "SALE",
|
tableData: [],
|
||||||
selectList: [],
|
total: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -121,79 +153,19 @@ export default {
|
||||||
// marketId: this.marketId,
|
// marketId: this.marketId,
|
||||||
shopId: this.shopId,
|
shopId: this.shopId,
|
||||||
};
|
};
|
||||||
this.$nextTick(() => {
|
this.getList();
|
||||||
this.$refs.oTable.reload();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// getData() {
|
getList() {
|
||||||
// this.$api.mer_admin
|
|
||||||
// .storeList({ marketId: this.formInline.marketId })
|
|
||||||
// .then((res) => {
|
|
||||||
// this.storeList = res.data.data;
|
|
||||||
// this.formInline.shopId = res.data.data[0].shopId;
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// this.$refs.oTable.reload();
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
addProduct() {
|
|
||||||
this.$refs.addOrUpdate.toggle().add();
|
|
||||||
},
|
|
||||||
deleteProduct() {
|
|
||||||
console.log(this.selectList);
|
|
||||||
let integers = this.selectList.map((item) => {
|
|
||||||
return item.id;
|
|
||||||
});
|
|
||||||
this.$confirm("此操作将删除该商品, 是否继续?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning",
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
console.log("111");
|
|
||||||
this.$api.mer_admin.BatchDeleteProducts(integers).then((res) => {
|
|
||||||
this.$refs.oTable.reload();
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: "info",
|
|
||||||
message: "已取消删除",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
queryList(pageNo, pageSize) {
|
|
||||||
//全部订单
|
|
||||||
// this.$api.mer_admin
|
|
||||||
// .orderPage({
|
|
||||||
// pageNumber: pageNo,
|
|
||||||
// pageSize: pageSize,
|
|
||||||
// ...this.formInline,
|
|
||||||
// })
|
|
||||||
// .then((res) => {
|
|
||||||
// console.log(res);
|
|
||||||
// this.$refs.oTable.complete(
|
|
||||||
// res.data.data.data,
|
|
||||||
// Number(res.data.data.total)
|
|
||||||
// );
|
|
||||||
// })
|
|
||||||
// .catch((err) => {
|
|
||||||
// this.$refs.oTable.complete(false);
|
|
||||||
// });
|
|
||||||
//根据店铺查询
|
//根据店铺查询
|
||||||
this.$api.mer_admin
|
this.$api.mer_admin
|
||||||
.shopOrderPage({
|
.shopOrderPage({
|
||||||
pageNumber: pageNo,
|
|
||||||
pageSize: pageSize,
|
|
||||||
...this.formInline,
|
...this.formInline,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.$refs.oTable.complete(
|
this.tableData = res.data.data.data;
|
||||||
res.data.data.data,
|
this.total = Number(res.data.data.total);
|
||||||
Number(res.data.data.total)
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
Reset() {
|
Reset() {
|
||||||
|
@ -201,194 +173,25 @@ export default {
|
||||||
group: "0",
|
group: "0",
|
||||||
shopId: this.shopId,
|
shopId: this.shopId,
|
||||||
};
|
};
|
||||||
this.$refs.oTable.reload();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleClick(e) {
|
handleClick(e) {
|
||||||
console.log(e.name);
|
this.advanceSellStatus = e.name;
|
||||||
if (e.name == "5") {
|
this.getList();
|
||||||
this.advanceSellStatus = "";
|
|
||||||
} else {
|
|
||||||
this.advanceSellStatus = e.name;
|
|
||||||
}
|
|
||||||
this.$refs.oTable.reload();
|
|
||||||
},
|
},
|
||||||
addEarlyWarning() {
|
view(row) {
|
||||||
this.$refs.earlyWarning.toggle().add();
|
this.$refs.viewDetails.toggle(row).update();
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.formInline.pageSize = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.formInline.pageNumber = val;
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tableCols() {
|
|
||||||
return [
|
|
||||||
// { type: "checkbox", width: "60px", fixed: "left" },
|
|
||||||
{
|
|
||||||
type: "seq",
|
|
||||||
width: "60px",
|
|
||||||
fixed: "left",
|
|
||||||
align: "center",
|
|
||||||
title: "序号",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "商品详情",
|
|
||||||
// align: "center",
|
|
||||||
// width: "120px",
|
|
||||||
// field: "unitOrderStatus",
|
|
||||||
type: "jsx-out",
|
|
||||||
render: (col) => {
|
|
||||||
console.log(col);
|
|
||||||
return <content />;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "总订单号",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "orderNo",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "结算单位订单号",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "unitOrderNo",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "总商品数量",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "productCount",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "顾客支付",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "totalMoney",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "配送费",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "deliveryMoney",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "优惠券减免",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "couponMoney",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "下单时间",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "payTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "预计送达时间",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "predictDeliveryTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "预计收入",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "predictIncome",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "距离",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "distance",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "预计自动取消时间",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "predictAutoCancelTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "备注",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "remark",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "包装费",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "packageMoney",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "平台服务费",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "platformMoney",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "备餐完成时间",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "completePrepareTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "开始配送时间",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "startDeliveryTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "配送完成时间",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "completeDeliveryTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "下单时间",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "createTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "完成取货时间",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "pickTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "订单完成时间",
|
|
||||||
align: "center",
|
|
||||||
width: "120px",
|
|
||||||
field: "completeTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
fixed: "right",
|
|
||||||
type: "jsx",
|
|
||||||
align: "center",
|
|
||||||
width: "100px",
|
|
||||||
render: ({ row }) => {
|
|
||||||
let view = () => {
|
|
||||||
this.$refs.viewDetails.toggle(row).update();
|
|
||||||
};
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<el-button size="mini" type="primary" onClick={view}>
|
|
||||||
查看
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
tableEvent() {
|
|
||||||
return {
|
|
||||||
"checkbox-all": ({ records, reserves }) => {
|
|
||||||
this.selectList = [...records, ...reserves];
|
|
||||||
},
|
|
||||||
"checkbox-change": ({ records, reserves }) => {
|
|
||||||
this.selectList = [...records, ...reserves];
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
...mapState("userData", [
|
...mapState("userData", [
|
||||||
"isMerchant",
|
"isMerchant",
|
||||||
"marketList",
|
"marketList",
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
:name="item.value"
|
:name="item.value"
|
||||||
></el-tab-pane>
|
></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<el-table :data="tableData" border style="width: 100%">
|
<el-table :data="tableData" height="70vh" border style="width: 100%">
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand">
|
||||||
<template slot-scope="props">
|
<template slot-scope="props">
|
||||||
<div style="padding-left: 20px" m="4">
|
<div style="padding-left: 20px" m="4">
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<el-table-column label="商品图片" prop="productImg">
|
<el-table-column label="商品图片" prop="productImg">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 100px; height: 100px"
|
style="width: 60px; height: 60px"
|
||||||
:src="scope.row.productImg"
|
:src="scope.row.productImg"
|
||||||
:zoom-rate="1.2"
|
:zoom-rate="1.2"
|
||||||
:max-scale="7"
|
:max-scale="7"
|
||||||
|
@ -146,12 +146,7 @@ export default {
|
||||||
.catch((err) => {});
|
.catch((err) => {});
|
||||||
},
|
},
|
||||||
handleClick(e) {
|
handleClick(e) {
|
||||||
console.log(e, "11111111111111111111");
|
this.formInline.group = e.name;
|
||||||
if (e.label == "全部订单") {
|
|
||||||
this.formInline.group = "";
|
|
||||||
} else {
|
|
||||||
this.formInline.group = e.name;
|
|
||||||
}
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button
|
||||||
@click="$router.push({ path: 'bank-card-index' })"
|
@click="$router.push({ name: 'bank-card-index' })"
|
||||||
type="primary"
|
type="primary"
|
||||||
round
|
round
|
||||||
>绑定银行卡</el-button
|
>绑定银行卡</el-button
|
||||||
|
|
Loading…
Reference in New Issue