You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
568 lines
16 KiB
568 lines
16 KiB
<template>
|
|
<view>
|
|
<cmd-nav-bar iconOne="menu" @iconOne="goToInfo" :title="shopName" background-color="#fff"></cmd-nav-bar>
|
|
<view class="IndexContent">
|
|
<view class="contentPadding"
|
|
style="color:#000;background: #FBFBFF !important;padding: 28rpx 20rpx 0 !important;">
|
|
<view class="title-btn-d">
|
|
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/returnList')">
|
|
<text>待退货</text>
|
|
<text v-if="waitCount.waitReturnCount > 0"
|
|
class="red-circle">{{waitCount.waitReturnCount > 99 ? '99+' :waitCount.waitReturnCount}}</text>
|
|
</view>
|
|
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/order?listStatus=6')">
|
|
<text>待配货</text>
|
|
<text v-if="waitCount.waitAddProductCount > 0"
|
|
class="red-circle">{{waitCount.waitAddProductCount > 99 ? '99+' :waitCount.waitAddProductCount}}</text>
|
|
</view>
|
|
<view class="title-btn-sbtn" @tap="goSonPage('/package1/AI/AIHangOrderList')">
|
|
<text>挂单</text>
|
|
<text v-if="waitCount.registrationCount > 0"
|
|
class="red-circle">{{waitCount.registrationCount > 99 ? '99+' :waitCount.registrationCount}}</text>
|
|
</view>
|
|
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/shareStyle')">
|
|
<text>推款</text>
|
|
</view>
|
|
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/waitStorage?inStorageStatus=0')">
|
|
<text>待入库</text>
|
|
<text v-if="waitCount.waitPurchaseCount > 0"
|
|
class="red-circle">{{waitCount.waitPurchaseCount > 99 ? '99+' :waitCount.waitPurchaseCount}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="contentPadding">
|
|
<view class="title">
|
|
<i class="iconfont icon-xiaoshouyuce"> 今日营收详情</i>
|
|
</view>
|
|
<u-grid :col="3">
|
|
<u-grid-item>
|
|
<u-count-to :start-val="0" :end-val="shopInfo.totalAmount" :decimals="2"></u-count-to>
|
|
<text class="grid-text">销售总金额</text>
|
|
</u-grid-item>
|
|
<u-grid-item>
|
|
<u-count-to :start-val="0"
|
|
:end-val="shopInfo.totalAlreadyEarn + shopInfo.totalPayAmount"></u-count-to>
|
|
<text class="grid-text">今日实收</text>
|
|
</u-grid-item>
|
|
<u-grid-item>
|
|
<u-count-to :start-val="0" :end-val="type==0?shopInfo.totalProfit:0" :decimals="2"></u-count-to>
|
|
<view class="grid-text">今日利润</view>
|
|
</u-grid-item>
|
|
<u-grid-item>
|
|
<u-count-to :start-val="0" :end-val="shopInfo.totalCCount"></u-count-to>
|
|
<view class="grid-text">下单客户数</view>
|
|
</u-grid-item>
|
|
<u-grid-item>
|
|
<u-count-to :start-val="0" :end-val="shopInfo.returnTotalAmount"></u-count-to>
|
|
<view class="grid-text">退货金额</view>
|
|
</u-grid-item>
|
|
<u-grid-item>
|
|
<u-count-to :start-val="0" :end-val="shopInfo.returnTotalCount"></u-count-to>
|
|
<view class="grid-text">退货笔数</view>
|
|
</u-grid-item>
|
|
</u-grid>
|
|
</view>
|
|
<view class="contentPadding">
|
|
<view class="title">
|
|
<i class="iconfont icon-huaban"> 本周营收统计
|
|
<view class="btn" @tap="gotoSearchData">
|
|
数据统计 >
|
|
</view>
|
|
</i>
|
|
</view>
|
|
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" canvas2d="true"
|
|
canvasId="canvsaId1" />
|
|
</view>
|
|
<view class="contentPadding">
|
|
<view class="title">
|
|
<i class="iconfont icon-wenjianliebiao"> 近期订单列表</i>
|
|
</view>
|
|
<ul class="inventoryList" v-if="inventoryList.length > 0">
|
|
<li v-for="item in inventoryList" :key="item.id">
|
|
<uni-card :title="item.userName == null ?'暂无':item.userName"
|
|
:sub-title="'¥'+(item.totalAmount == null ?'暂无':item.totalAmount)" :thumbnail="item.img"
|
|
@tap="gotoDetail(item.id)">
|
|
<view class="uni-body">{{ item.createByName == null ?'暂无':item.createByName}} -
|
|
{{ item.createTime }}
|
|
</view>
|
|
<view class="uni-body"> <text class="cardText">
|
|
订单状态:</text>{{item.status == '0' ?'待抢单' :item.status == '2' ?'作废' :item.status == '1' ?'待取货' :item.status == '3' ?'待送达' :item.status == '4' ?'已完成' :item.status == '5' ?'下游客户待退货' :item.status == '00' ?'退货待抢单' :item.status == '01' ?'退货待取货' :item.status == '03' ?'退货待送达' :item.status == '04' ?'待确认退货' :item.status == '6' ?'待配货' :'挂单'}}
|
|
</view>
|
|
</uni-card>
|
|
</li>
|
|
</ul>
|
|
<u-empty v-else mode="order" text="暂无订单,快去开单吧!"></u-empty>
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<u-popup :show="settingShow" @close="settingShow = false" closeOnClickOverlay mode="left" safeAreaInsetTop
|
|
safeAreaInsetTop>
|
|
<view class="popup-content">
|
|
<!-- <view class="content-avatar">
|
|
<u-avatar :src="avatar"></u-avatar>
|
|
<view class="shop-name">{{ shopName }}</view>
|
|
</view> -->
|
|
<view style="z-index:999">
|
|
<u-cell-group>
|
|
<u-cell icon="grid-fill" url="/pages/index/checkShop" title="切换当前店铺" clickable isLink
|
|
arrow-direction="left"></u-cell>
|
|
<view class="border-line"></view>
|
|
<u-cell icon="man-add-fill" url="/pages/index/peopleList?popleType=gysName&noClick=1"
|
|
title="供货商管理" clickable isLink arrow-direction="left"></u-cell>
|
|
<u-cell icon="man-add-fill" url="/pages/index/upstream" v-if="type==0" title="供货商欠款"
|
|
clickable isLink arrow-direction="left"></u-cell>
|
|
<u-cell icon="man-add-fill" url="/pages/index/waitStorage?inStorageStatus=1" title="采购单历史"
|
|
clickable isLink arrow-direction="left"></u-cell>
|
|
<u-cell icon="man-add-fill" url="/package1/stock/goodsStock" title="盘点管理" clickable isLink
|
|
arrow-direction="left"></u-cell>
|
|
<view class="border-line"></view>
|
|
<u-cell icon="account-fill" url="/pages/index/peopleList?popleType=khName&noClick=1"
|
|
title="客户管理" clickable isLink arrow-direction="left"></u-cell>
|
|
<u-cell icon="account-fill" url="/pages/index/downstream" v-if="type==0" title="客户欠款"
|
|
clickable isLink arrow-direction="left"></u-cell>
|
|
<u-cell icon="account-fill" url="/pages/index/order?type=dingdan" title="销售单历史" clickable
|
|
isLink arrow-direction="left"></u-cell>
|
|
<view class="border-line"></view>
|
|
<!-- <u-cell icon="integral-fill" url="/package1/AI/addAiList" title="管理员登录" clickable isLink
|
|
arrow-direction="left"></u-cell> -->
|
|
<!-- <u-cell icon="integral-fill" url="" title="电费缴纳" clickable isLink
|
|
arrow-direction="left"></u-cell>
|
|
<u-cell icon="integral-fill" url="" title="租金缴纳" clickable isLink
|
|
arrow-direction="left"></u-cell> -->
|
|
<u-cell icon="rewind-right-fill" url="/pages/rebate/rebateShare" title="邀请返佣" clickable
|
|
isLink arrow-direction="left"></u-cell>
|
|
<!-- <u-cell icon="heart-fill" url="/pages/index/publicWelfare" title="公益公示" clickable isLink
|
|
arrow-direction="left"></u-cell> -->
|
|
<u-cell icon="server-man" url="/pages/index/feedBack" title="问题反馈" clickable isLink
|
|
arrow-direction="left"></u-cell>
|
|
<u-cell icon="setting-fill" url="/pages/index/shopInfo" title="修改个人信息" clickable isLink
|
|
arrow-direction="left"></u-cell>
|
|
<u-cell icon="home-fill" @click="outLogin" title="退出登录" clickable isLink
|
|
arrow-direction="left"></u-cell>
|
|
</u-cell-group>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</view>
|
|
<!-- 宣传页 -->
|
|
<uni-popup ref="publicizepopup" background-color="#fff">
|
|
<view class="publicize-content">
|
|
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/35bbea7341334aca9f27c33b78bd2961.jpg"
|
|
alt="宣传图">
|
|
<view class="pop-close" @tap="popClose">X</view>
|
|
</view>
|
|
</uni-popup>
|
|
</view>
|
|
</template>
|
|
<!-- cmd-nav-bar.vue index.vue pages.json -->
|
|
<script>
|
|
import cmdNavBar from "@/components/cmd-nav-bar/cmd-nav-bar.vue";
|
|
import {
|
|
mapState
|
|
} from 'vuex';
|
|
|
|
export default {
|
|
computed: mapState(['userId', 'shopIndex', 'avatar']),
|
|
data() {
|
|
return {
|
|
type: '',
|
|
src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
|
|
inventoryList: [],
|
|
settingShow: false,
|
|
chartData: {},
|
|
shopName: '',
|
|
opts: {
|
|
padding: [15, 10, 0, 15],
|
|
dataLabel: true,
|
|
dataPointShape: false,
|
|
enableScroll: false,
|
|
legend: {},
|
|
xAxis: {
|
|
disableGrid: true
|
|
},
|
|
yAxis: {
|
|
gridType: "dash",
|
|
dashLength: 2,
|
|
data: [{
|
|
min: 0
|
|
}]
|
|
},
|
|
extra: {
|
|
column: {
|
|
type: "group",
|
|
width: 30,
|
|
customColor: ["#44fd6d", "#91CB74"],
|
|
activeBgColor: "#000000",
|
|
activeBgOpacity: 0.08,
|
|
seriesGap: 10,
|
|
barBorderCircle: true,
|
|
barBorderRadius: [
|
|
20,
|
|
20,
|
|
0,
|
|
0
|
|
],
|
|
linearType: "custom"
|
|
}
|
|
},
|
|
},
|
|
shopInfo: {},
|
|
waitCount: {}
|
|
}
|
|
},
|
|
components: {
|
|
cmdNavBar
|
|
},
|
|
filters: {
|
|
spliceMsg(val) {
|
|
val == null || undefined ? '暂无' : val
|
|
return val;
|
|
}
|
|
},
|
|
onShow() {
|
|
this.shopName = uni.getStorageSync('shopName')
|
|
this.type = uni.getStorageSync('type')
|
|
this.getSaleInfo()
|
|
wx.getLocation({
|
|
type: 'gcj02',
|
|
success(res) {
|
|
console.log(res)
|
|
}
|
|
})
|
|
},
|
|
onLoad() {
|
|
//宣传页
|
|
// if(uni.getStorageSync('publicize')){
|
|
|
|
// }else{
|
|
// uni.setStorageSync("publicize", true)
|
|
// this.$refs.publicizepopup.open('center')
|
|
// }
|
|
|
|
},
|
|
onTabItemTap(e) {
|
|
this.getSaleInfo()
|
|
},
|
|
methods: {
|
|
popClose() {
|
|
this.$refs.publicizepopup.close()
|
|
},
|
|
getSaleInfo() {
|
|
this.tui.request("/app/sale/getShopAll", "POST", {
|
|
pageVo: {
|
|
pageSize: 5,
|
|
pageNumber: 1
|
|
},
|
|
}, false, false).then((res) => {
|
|
if (res.code == 200) {
|
|
this.shopInfo = {
|
|
totalAmount: res.result.totalAmount,
|
|
totalAlreadyEarn: res.result.totalAlreadyEarn,
|
|
totalPayAmount: res.result.totalPayAmount,
|
|
totalCCount: res.result.totalCCount,
|
|
totalCount: res.result.totalCount,
|
|
totalJCount: res.result.totalJCount,
|
|
totalProfit: res.result.totalProfit,
|
|
returnTotalAmount: res.result.returnTotalAmount,
|
|
returnTotalCount: res.result.returnTotalCount,
|
|
}
|
|
let dataList = {
|
|
categories: this.getWeek(),
|
|
series: [{
|
|
name: "七天营收统计",
|
|
linearColor: [
|
|
[0, "#1890FF"],
|
|
[0.33, "#00B5FF"],
|
|
[0.66, "#00D1ED"],
|
|
[1, "#00E6BB"],
|
|
[1, "#90F489"]
|
|
],
|
|
setShadow: [3, 8, 10, "#00E6BB"],
|
|
data: res.result.weekSale
|
|
}]
|
|
};
|
|
this.chartData = JSON.parse(JSON.stringify(dataList));
|
|
this.waitCount = res.result.countMap
|
|
for (var i = 0; i < res.result.salePage.records.length; i++) {
|
|
res.result.salePage.records[i].img = '/static/images/dingdan/dd' + i + '.png'
|
|
this.inventoryList = res.result.salePage.records
|
|
}
|
|
} else {
|
|
this.tui.toast(res.message)
|
|
}
|
|
|
|
})
|
|
},
|
|
goToInfo() {
|
|
this.settingShow = true
|
|
},
|
|
gotoSearchData() {
|
|
uni.navigateTo({
|
|
url: '/pages/index/dataStatistics'
|
|
})
|
|
},
|
|
outLogin(e) {
|
|
let that = this;
|
|
uni.showModal({
|
|
title: "提示",
|
|
content: "确定退出登录吗?",
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
that.tui.request("/oauth2/logout", "POST", {}, false, false).then((res) => {
|
|
if (res.code == 200) {
|
|
that.tui.toast("退出登录成功")
|
|
// uni.clearStorage();
|
|
uni.removeStorage({
|
|
key: 'hiver_token'
|
|
});
|
|
uni.navigateTo({
|
|
url: '/pages/login/login'
|
|
})
|
|
} else {
|
|
that.tui.toast(res.message)
|
|
}
|
|
|
|
})
|
|
}
|
|
}
|
|
})
|
|
},
|
|
gotoOrder() {
|
|
uni.navigateTo({
|
|
url: '/pages/index/order?userId=' + this.userId
|
|
})
|
|
},
|
|
getWeek() {
|
|
let days = 7
|
|
let week = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
|
|
let dateList = Array.from({
|
|
length: days
|
|
}, (v, i) => i).map(day => {
|
|
let date = new Date();
|
|
date.setDate(date.getDate() - day);
|
|
return week[date.getDay()]
|
|
})
|
|
return dateList.reverse()
|
|
},
|
|
//跳转订单详情
|
|
gotoDetail(id) {
|
|
uni.navigateTo({
|
|
url: '/pages/index/orderDetail?id=' + id
|
|
})
|
|
},
|
|
//首页头部四个按钮的菜单
|
|
goSonPage(url) {
|
|
if (url == '/pages/index/waitStorage?inStorageStatus=0') {
|
|
if (this.type != 0) {
|
|
this.tui.toast('暂无查看权限!')
|
|
return;
|
|
}
|
|
}
|
|
uni.navigateTo({
|
|
url: url
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.IndexContent {
|
|
/*距离顶部范围应该在88-95范围内*/
|
|
padding-top: 160upx;
|
|
top: var(--status-bar-height);
|
|
|
|
.contentPadding {
|
|
padding: 28upx 20upx;
|
|
background-color: #fff;
|
|
color: #909399;
|
|
|
|
.title {
|
|
padding-left: 20rpx;
|
|
font-size: 32rpx;
|
|
color: #303133;
|
|
margin-bottom: 26rpx;
|
|
line-height: 66rpx;
|
|
|
|
image {
|
|
display: inline-block;
|
|
width: 40rpx;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.btn {
|
|
text-align: right;
|
|
width: 24%;
|
|
float: right;
|
|
font-size: 26rpx;
|
|
color: $u-primary;
|
|
}
|
|
}
|
|
|
|
.grid-text {
|
|
font-size: 28rpx;
|
|
margin-bottom: 26rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.popup-content {
|
|
width: 450upx;
|
|
}
|
|
|
|
.content-avatar {
|
|
display: flex;
|
|
align-items: center;
|
|
margin: 25rpx 15rpx;
|
|
}
|
|
|
|
.shop-name {
|
|
margin-left: 15upx;
|
|
}
|
|
|
|
.title-dianpu {
|
|
margin-top: 14upx;
|
|
border-bottom: 1px solid #fff;
|
|
padding-bottom: 20upx;
|
|
}
|
|
|
|
.title-btn-d {
|
|
height: 40px;
|
|
display: flex;
|
|
}
|
|
|
|
.dianpu-img {
|
|
width: 60upx;
|
|
height: 60upx;
|
|
float: left;
|
|
margin-left: 20upx;
|
|
}
|
|
|
|
.dianpu-text {
|
|
font-size: 40upx;
|
|
height: 60upx;
|
|
line-height: 65upx;
|
|
padding-left: 20upx;
|
|
}
|
|
|
|
.title-btn-sbtn {
|
|
flex: 1;
|
|
line-height: 80upx;
|
|
text-align: center;
|
|
position: relative;
|
|
}
|
|
|
|
.title-btn-sbtn:hover {
|
|
color: #B22222;
|
|
}
|
|
|
|
.title-btn-sbtn:nth-child(1),
|
|
.title-btn-sbtn:nth-child(2) {
|
|
border-right: 1px solid #fff;
|
|
}
|
|
|
|
.red-circle {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
line-height: 40rpx;
|
|
font-size: 22rpx;
|
|
border-radius: 50%;
|
|
background: red;
|
|
color: #fff;
|
|
text-align: center;
|
|
}
|
|
|
|
.u-cell__body {
|
|
padding-left: 0 !important;
|
|
}
|
|
|
|
.u-cell__body__content {
|
|
padding-left: 10rpx;
|
|
}
|
|
|
|
.u-grid-item {
|
|
width: 30% !important;
|
|
height: 160rpx;
|
|
background-image: linear-gradient(#84C1FF, #C4E1FF) !important;
|
|
margin-left: 3%;
|
|
border-radius: 30rpx;
|
|
margin-top: 20rpx !important;
|
|
color: #fff !important;
|
|
|
|
}
|
|
|
|
.u-grid-item:nth-child(2) {
|
|
background-image: linear-gradient(#FFBB77, #FFDCB9) !important;
|
|
}
|
|
|
|
.u-grid-item:nth-child(3) {
|
|
background-image: linear-gradient(#1AFD9C, #7AFEC6) !important;
|
|
}
|
|
|
|
.u-grid-item:nth-child(4) {
|
|
background-image: linear-gradient(#1AFD9C, #7AFEC6) !important;
|
|
}
|
|
|
|
.u-grid-item:nth-child(5) {
|
|
background-image: linear-gradient(#FFBB77, #FFDCB9) !important;
|
|
}
|
|
|
|
.u-grid-item:nth-child(6) {
|
|
background-image: linear-gradient(#84C1FF, #C4E1FF) !important;
|
|
}
|
|
|
|
.u-count-num {
|
|
color: #FFF !important
|
|
}
|
|
|
|
.status-bar {
|
|
height: 42px !important;
|
|
}
|
|
|
|
.u-icon {
|
|
padding: 0 0 0 8px !important;
|
|
}
|
|
|
|
.cmd-nav-bar {
|
|
height: 90rpx !important;
|
|
}
|
|
|
|
.uni-popup__wrapper {
|
|
background: rgba(255, 255, 255, 0) !important;
|
|
}
|
|
|
|
.publicize-content {
|
|
width: 460rpx;
|
|
height: 600rpx;
|
|
|
|
}
|
|
|
|
.publicize-content img {
|
|
width: 460rpx;
|
|
height: 460rpx;
|
|
}
|
|
|
|
.pop-close {
|
|
border: 1px solid #eee;
|
|
color: #eee;
|
|
border-radius: 50%;
|
|
width: 50rpx;
|
|
height: 50rpx;
|
|
line-height: 50rpx;
|
|
text-align: center;
|
|
margin: 40rpx auto;
|
|
}
|
|
|
|
.border-line {
|
|
width: 100%;
|
|
height: 15rpx;
|
|
background: #eee;
|
|
}
|
|
|
|
.uni-tooltip-popup {
|
|
width: 180rpx;
|
|
}
|
|
</style>
|