新增批发订单模拟待处理数量标点
This commit is contained in:
parent
16fa02aadf
commit
fb1e4567fc
|
@ -1,25 +1,34 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { ref, onMounted, onUnmounted } from 'vue'
|
import { ref, onMounted, onUnmounted } from "vue";
|
||||||
import mitt from "@/utils/mitt.js";
|
import mitt from "@/utils/mitt.js";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter();
|
||||||
const route = useRoute()
|
const route = useRoute();
|
||||||
|
|
||||||
const navTo = (name) => {
|
const navTo = (name) => {
|
||||||
router.push({ name })
|
router.push({ name });
|
||||||
}
|
};
|
||||||
const list = ref(['home', 'order', 'orderSystem', 'saleHome', 'saleOrder', 'convert', 'shop', 'orderCount']);
|
const list = ref([
|
||||||
|
{ name: "home", title: "收银", ico: "Sell", count: 0 },
|
||||||
|
{ name: "order", title: "收银订单", ico: "DataLine", count: 0 },
|
||||||
|
{ name: "orderSystem", title: "平台订单", ico: "DataAnalysis", count: 0 },
|
||||||
|
{ name: "saleHome", title: "批发", ico: "Van", count: 0 },
|
||||||
|
{ name: "saleOrder", title: "批发订单", ico: "Tickets", count: 1 },
|
||||||
|
{ name: "convert", title: "核销", ico: "FullScreen", count: 0 },
|
||||||
|
{ name: "shop", title: "商品", ico: "ShoppingBag", count: 0 },
|
||||||
|
{ name: "orderCount", title: "订单统计", ico: "PieChart", count: 0 },
|
||||||
|
]);
|
||||||
const aup = () => {
|
const aup = () => {
|
||||||
let index = list.value.indexOf(route.name);
|
let index = list.value.findIndex((item) => item.name == route.name);
|
||||||
if (index == 0) index = list.value.length;
|
if (index == 0) index = list.value.length;
|
||||||
if(index>0) navTo(list.value[index-1]);
|
if (index > 0) navTo(list.value[index - 1].name);
|
||||||
}
|
};
|
||||||
const adown = () => {
|
const adown = () => {
|
||||||
let index = list.value.indexOf(route.name);
|
let index = list.value.findIndex((item) => item.name == route.name);
|
||||||
if (index == list.value.length - 1) index = -1;
|
if (index == list.value.length - 1) index = -1;
|
||||||
if(index<list.value.length-1) navTo(list.value[index+1]);
|
if (index < list.value.length - 1) navTo(list.value[index + 1].name);
|
||||||
}
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
mitt.on("up", aup);
|
mitt.on("up", aup);
|
||||||
mitt.on("down", adown);
|
mitt.on("down", adown);
|
||||||
|
@ -29,43 +38,22 @@ onUnmounted(() => {
|
||||||
mitt.off("aup", aup);
|
mitt.off("aup", aup);
|
||||||
mitt.off("adown", adown);
|
mitt.off("adown", adown);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="my-card">
|
<div class="my-card">
|
||||||
<div class="list-item" :class="{'active': route.name=='home'}" @click="navTo('home')">
|
<div
|
||||||
<el-icon size="2rem"><Sell /></el-icon>
|
v-for="item in list"
|
||||||
<div>收银</div>
|
:key="item.name"
|
||||||
</div>
|
class="list-item"
|
||||||
<div class="list-item" :class="{'active': route.name=='order'}" @click="navTo('order')">
|
:class="{ active: route.name == item.name }"
|
||||||
<el-icon size="2rem"><DataLine /></el-icon>
|
@click="navTo(item.name)"
|
||||||
<div>收银订单</div>
|
>
|
||||||
</div>
|
<el-icon size="2rem">
|
||||||
<div class="list-item" :class="{'active': route.name=='orderSystem'}" @click="navTo('orderSystem')">
|
<component :is="item.ico" />
|
||||||
<el-icon size="2rem"><DataAnalysis /></el-icon>
|
</el-icon>
|
||||||
<div>平台订单</div>
|
<div>{{ item.title }}</div>
|
||||||
</div>
|
<div v-if="item.count" class="badge">{{ item.count }}</div>
|
||||||
<div class="list-item" :class="{'active': route.name=='saleHome'}" @click="navTo('saleHome')">
|
|
||||||
<el-icon size="2rem"><Van /></el-icon>
|
|
||||||
<div>批发</div>
|
|
||||||
</div>
|
|
||||||
<div class="list-item" :class="{'active': route.name=='saleOrder'}" @click="navTo('saleOrder')">
|
|
||||||
<el-icon size="2rem"><Tickets /></el-icon>
|
|
||||||
<div>批发订单</div>
|
|
||||||
</div>
|
|
||||||
<div class="list-item" :class="{'active': route.name=='convert'}" @click="navTo('convert')">
|
|
||||||
<el-icon size="2rem"><FullScreen /></el-icon>
|
|
||||||
<div>核销</div>
|
|
||||||
</div>
|
|
||||||
<div class="list-item" :class="{'active': route.name=='shop'}" @click="navTo('shop')">
|
|
||||||
<el-icon size="2rem"><ShoppingBag /></el-icon>
|
|
||||||
<div>商品</div>
|
|
||||||
</div>
|
|
||||||
<div class="list-item" :class="{'active': route.name=='orderCount'}" @click="navTo('orderCount')">
|
|
||||||
<el-icon size="2rem"><Coin /></el-icon>
|
|
||||||
<div>统计</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -89,11 +77,21 @@ onUnmounted(() => {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 1.2rem;
|
margin-bottom: 1.2rem;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background-color: #1890ff;
|
background-color: #1890ff;
|
||||||
transition: 300ms;
|
transition: 300ms;
|
||||||
}
|
}
|
||||||
|
.badge{
|
||||||
|
position: absolute;
|
||||||
|
top: -0.5rem;
|
||||||
|
right: -0.5rem;
|
||||||
|
background-color: #ff4a00;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
padding: 0.2rem 0.5rem;
|
||||||
|
border-radius: 2rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* 修改滚动条的样式 */
|
/* 修改滚动条的样式 */
|
||||||
|
|
|
@ -200,6 +200,7 @@ onMounted(()=>{
|
||||||
<span v-if="item.pay_type == 1">(微信支付)</span>
|
<span v-if="item.pay_type == 1">(微信支付)</span>
|
||||||
<span v-if="item.pay_type == 9">(商户余额支付)</span>
|
<span v-if="item.pay_type == 9">(商户余额支付)</span>
|
||||||
<span v-if="item.pay_type == 10">(对公转账)</span>
|
<span v-if="item.pay_type == 10">(对公转账)</span>
|
||||||
|
<span class="manage-btn">待处理</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else style="color: #ff4a00">未支付</div>
|
<div v-else style="color: #ff4a00">未支付</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -335,6 +336,13 @@ onMounted(()=>{
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: #777;
|
color: #777;
|
||||||
|
.manage-btn{
|
||||||
|
color: #fff;
|
||||||
|
background-color: #e6a23c;
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
padding: 0 0.2rem;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item-active {
|
.item-active {
|
||||||
|
|
Loading…
Reference in New Issue