|
@@ -1,5 +1,13 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="app-main app-content">
|
|
|
|
|
|
|
+<view>
|
|
|
|
|
+ <block v-if="loginStyle == 0">
|
|
|
|
|
+ <view style="width:100vw;height:500upx;display:flex;align-items:center;justify-content:center;">
|
|
|
|
|
+ <button class="admin-button-com big blue" @click="pageTo({url:'/admin/home/login'})">点我登录</button>
|
|
|
|
|
+ <view style="position:absolute;top:330upx;font-size:35upx;">请选择<text style="color:red;margin-left:8upx;font-weight:bold;">微信手机号一键登录</text></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <block v-else>
|
|
|
|
|
+ <div class="app-main app-content" v-if="loginStyle == 2">
|
|
|
<div class="user-wrap" :style="{ backgroundImage: `url(${constant.imgUrl}/home/bg_hd_home.png)` }">
|
|
<div class="user-wrap" :style="{ backgroundImage: `url(${constant.imgUrl}/home/bg_hd_home.png)` }">
|
|
|
<div class="user-top">
|
|
<div class="user-top">
|
|
|
<div class="app-size-28">今日概况</div>
|
|
<div class="app-size-28">今日概况</div>
|
|
@@ -66,8 +74,40 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <NotLogin></NotLogin>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <view class="order-page" v-else>
|
|
|
|
|
+ <view class="order_list">
|
|
|
|
|
+ <block>
|
|
|
|
|
+ <block v-if="!$util.isEmpty(supplierList)">
|
|
|
|
|
+ <view class="list_item" v-for="(ghsInfo, index) in supplierList" :key="index">
|
|
|
|
|
+ <view class="store_name">
|
|
|
|
|
+ <image :src="ghsInfo.avatar"></image>
|
|
|
|
|
+ <view class="store_title">{{ghsInfo.name}}</view>
|
|
|
|
|
+ <view class="accumulative"></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view :class="[ghsInfo.isOpen == 0 ? 'cg-button-rest' : 'cg-button']" @click="enterShop(ghsInfo)">买花</view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="store_btn">
|
|
|
|
|
+ <view class="btn_entrance" @click="pageTo({url:'/pagesPurchase/shopping'})" > 买花记录 </view>
|
|
|
|
|
+ <view class="btn_entrance" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})">结账记录</view>
|
|
|
|
|
+ <view class="btn_entrance" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})">欠款变动明细</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text v-if="ghsInfo.isOpen == 0"
|
|
|
|
|
+ style="position:absolute;top:0upx;left:0upx;color:white;background-color:#CCCCCC;padding:3upx 18upx;font-size:24upx;">已休店</text>
|
|
|
|
|
+ <view style="position:absolute;top:275upx;font-size:36upx;text-align:center;width:100vw;color:red;font-weight:bold;" @click="settleAccounts(ghsInfo)" v-if="Number(ghsInfo.debtAmount)>0"
|
|
|
|
|
+ >待结 {{ghsInfo.debtNum}}笔 {{ghsInfo.debtAmount?parseFloat(ghsInfo.debtAmount):0}}元 <text style="text-decoration:underline;margin-left:18upx;">查看明细</text></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <block v-else>
|
|
|
|
|
+ <AppWrapperEmpty title="暂无供应商" :is-empty="$util.isEmpty(supplierList)" />
|
|
|
|
|
+ </block>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ </block>
|
|
|
|
|
+</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import { mapGetters, mapState } from "vuex";
|
|
import { mapGetters, mapState } from "vuex";
|
|
@@ -77,9 +117,11 @@ import { getShopInfo } from "@/utils/auth";
|
|
|
import { consoleIndex } from "@/api/workbench";
|
|
import { consoleIndex } from "@/api/workbench";
|
|
|
import NotLogin from "@/components/not-login";
|
|
import NotLogin from "@/components/not-login";
|
|
|
import autoUpdateMixins from "@/mixins/autoUpdate";
|
|
import autoUpdateMixins from "@/mixins/autoUpdate";
|
|
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
|
|
+import { ghsList } from "@/api/purchase/index";
|
|
|
export default {
|
|
export default {
|
|
|
name: "workbench",
|
|
name: "workbench",
|
|
|
- components: { NotLogin },
|
|
|
|
|
|
|
+ components: { NotLogin,AppWrapperEmpty },
|
|
|
mixins: [autoUpdateMixins],
|
|
mixins: [autoUpdateMixins],
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
@@ -116,17 +158,47 @@ export default {
|
|
|
{ name: "总采购(元)", value: 0 }
|
|
{ name: "总采购(元)", value: 0 }
|
|
|
],
|
|
],
|
|
|
cgSrc: `${this.$constant.imgUrl}/ghs/home/cg.png`,
|
|
cgSrc: `${this.$constant.imgUrl}/ghs/home/cg.png`,
|
|
|
- kdSrc: `${this.$constant.imgUrl}/ghs/home/kd.png`
|
|
|
|
|
|
|
+ kdSrc: `${this.$constant.imgUrl}/ghs/home/kd.png`,
|
|
|
|
|
+ supplierList: [],
|
|
|
|
|
+ //登录状态 0未登录 1登录仅用到了采购 2登录用到完整功能
|
|
|
|
|
+ loginStyle :0
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
|
|
...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
|
|
|
},
|
|
},
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ //只需要采购花材的花店不显示底部菜单
|
|
|
|
|
+ loginInfo(newVal) {
|
|
|
|
|
+ if(!this.$util.isEmpty(newVal.admin) && newVal.admin.currentShopId > 0){
|
|
|
|
|
+ if(!this.$util.isEmpty(newVal.onlyCg)){
|
|
|
|
|
+ if(Number(newVal.onlyCg) == 1){
|
|
|
|
|
+ this.loginStyle = 1
|
|
|
|
|
+ uni.hideTabBar()
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.loginStyle = 2
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
onPullDownRefresh () {
|
|
onPullDownRefresh () {
|
|
|
this.init();
|
|
this.init();
|
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
|
},
|
|
},
|
|
|
onShow () {
|
|
onShow () {
|
|
|
|
|
+
|
|
|
|
|
+ if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0){
|
|
|
|
|
+ if(!this.$util.isEmpty(this.loginInfo.onlyCg)){
|
|
|
|
|
+ if(Number(this.loginInfo.onlyCg) == 1){
|
|
|
|
|
+ this.loginStyle = 1
|
|
|
|
|
+ uni.hideTabBar()
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.loginStyle = 2
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
getShopInfo().then(res => {
|
|
getShopInfo().then(res => {
|
|
|
if(res.name){
|
|
if(res.name){
|
|
|
uni.setNavigationBarTitle({ title: res.name })
|
|
uni.setNavigationBarTitle({ title: res.name })
|
|
@@ -136,6 +208,25 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ enterShop(item) {
|
|
|
|
|
+ if(item.isOpen == 0){
|
|
|
|
|
+ this.$msg('休息了')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ const { id } = item
|
|
|
|
|
+ this.pageTo({url: '/pagesPurchase/ghsProduct?id='+id,type:2})
|
|
|
|
|
+ },
|
|
|
|
|
+ settleAccounts (item) {
|
|
|
|
|
+ this.pageTo({ url: '/pagesPurchase/gathering?id='+item.id})
|
|
|
|
|
+ },
|
|
|
|
|
+ gotoDetails (val) {
|
|
|
|
|
+ this.pageTo({ url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id, type:2 })
|
|
|
|
|
+ },
|
|
|
|
|
+ getGHSList () {
|
|
|
|
|
+ return ghsList().then(res => {
|
|
|
|
|
+ this.supplierList = res.data.list
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
goGd(){
|
|
goGd(){
|
|
|
//选择花材生成制作单和订单
|
|
//选择花材生成制作单和订单
|
|
|
this.$util.pageTo({url:'/admin/order/workOrder'})
|
|
this.$util.pageTo({url:'/admin/order/workOrder'})
|
|
@@ -192,6 +283,9 @@ export default {
|
|
|
this.$util.pageTo(item)
|
|
this.$util.pageTo(item)
|
|
|
},
|
|
},
|
|
|
init () {
|
|
init () {
|
|
|
|
|
+
|
|
|
|
|
+ this.getGHSList()
|
|
|
|
|
+
|
|
|
getWeixinId().then(res => {
|
|
getWeixinId().then(res => {
|
|
|
this.getappIdList = res.data
|
|
this.getappIdList = res.data
|
|
|
});
|
|
});
|
|
@@ -199,7 +293,7 @@ export default {
|
|
|
this.isMini = 1
|
|
this.isMini = 1
|
|
|
// #endif
|
|
// #endif
|
|
|
let that = this
|
|
let that = this
|
|
|
- consoleIndex({isMini:this.isMini}).then(res => {
|
|
|
|
|
|
|
+ consoleIndex({isMini:this.isMini}).then(res => {
|
|
|
this.data = res.data;
|
|
this.data = res.data;
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -413,4 +507,159 @@ export default {
|
|
|
font-size: 34upx;
|
|
font-size: 34upx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.order-page {
|
|
|
|
|
+ .order_list {
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ background: #f0f2f6;
|
|
|
|
|
+ padding: 0 0 20upx;
|
|
|
|
|
+ margin-bottom:100upx;
|
|
|
|
|
+ padding-top:4upx;
|
|
|
|
|
+ .list_item {
|
|
|
|
|
+ margin: 20upx 0 0;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ height: 380upx;
|
|
|
|
|
+ width: 100vw;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ .dist{
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:0upx;
|
|
|
|
|
+ left: 0upx;
|
|
|
|
|
+ width:110upx;
|
|
|
|
|
+ text-align:center;
|
|
|
|
|
+ height:30upx;
|
|
|
|
|
+ background:#ecebeb;
|
|
|
|
|
+ font-size:22upx;
|
|
|
|
|
+ color:white;
|
|
|
|
|
+ }
|
|
|
|
|
+ .debt-amount{
|
|
|
|
|
+ color:red;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:75upx;
|
|
|
|
|
+ font-size:26upx;
|
|
|
|
|
+ right:260upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .cg-button{
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ font-size: 33upx;
|
|
|
|
|
+ font-weight:bold;
|
|
|
|
|
+ color: white;
|
|
|
|
|
+ border: 1px solid #3385FF;
|
|
|
|
|
+ border-radius: 45upx;
|
|
|
|
|
+ padding: 20upx 40upx;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:56upx;
|
|
|
|
|
+ right:60upx;
|
|
|
|
|
+ background: #3385FF;
|
|
|
|
|
+ }
|
|
|
|
|
+ .cg-button-rest{
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ font-size: 33upx;
|
|
|
|
|
+ font-weight:bold;
|
|
|
|
|
+ color: white;
|
|
|
|
|
+ border: 1px solid #CCCCCC;
|
|
|
|
|
+ border-radius: 45upx;
|
|
|
|
|
+ padding: 20upx 40upx;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:56upx;
|
|
|
|
|
+ right:60upx;
|
|
|
|
|
+ background: #CCCCCC;
|
|
|
|
|
+ }
|
|
|
|
|
+ .book-button{
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ font-size: 25upx;
|
|
|
|
|
+ border-radius: 120upx;
|
|
|
|
|
+ padding: 15upx 30upx;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:250upx;
|
|
|
|
|
+ right:300upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .could-book{
|
|
|
|
|
+ color: white;
|
|
|
|
|
+ border: 1px solid #657cac;
|
|
|
|
|
+ background: #657cac;
|
|
|
|
|
+ }
|
|
|
|
|
+ .not-book{
|
|
|
|
|
+ color: white;
|
|
|
|
|
+ border: 1px solid #CCCCCC;
|
|
|
|
|
+ background: #CCCCCC;
|
|
|
|
|
+ }
|
|
|
|
|
+ .book-button-text{
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:330upx;
|
|
|
|
|
+ right:210upx;
|
|
|
|
|
+ .explain{
|
|
|
|
|
+ text-decoration: underline;
|
|
|
|
|
+ font-size:25upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .could-book-text{
|
|
|
|
|
+ color:#666666;
|
|
|
|
|
+ }
|
|
|
|
|
+ .not-book-text{
|
|
|
|
|
+ color:#CCCCCC;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .store_name {
|
|
|
|
|
+ margin-left: 30upx;
|
|
|
|
|
+ width: 700upx;
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:70upx;
|
|
|
|
|
+ left: 0upx;
|
|
|
|
|
+ image{
|
|
|
|
|
+ width:50upx;
|
|
|
|
|
+ height:50upx;
|
|
|
|
|
+ border-radius:60upx;
|
|
|
|
|
+ float:left;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .store_title {
|
|
|
|
|
+ margin-bottom: 58upx;
|
|
|
|
|
+ margin-left:10upx;
|
|
|
|
|
+ width: 486upx;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ word-break: break-all;
|
|
|
|
|
+ font-size: 36upx;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ display:inline-block;
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .accumulative {
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ color: #999;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ & > .store_btn {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:180upx;
|
|
|
|
|
+ left: 0upx;
|
|
|
|
|
+ & > .btn_entrance {
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ font-size: 35upx;
|
|
|
|
|
+ color: #BBBBBB;
|
|
|
|
|
+ padding: 10upx 10upx;
|
|
|
|
|
+ margin-left: 45upx;
|
|
|
|
|
+ text-decoration: underline;
|
|
|
|
|
+ color:#666666;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .fl_line {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:120upx;
|
|
|
|
|
+ left: 40upx;
|
|
|
|
|
+ font-size:23upx;
|
|
|
|
|
+ color:red;
|
|
|
|
|
+ text{
|
|
|
|
|
+ margin-right:40upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .pay_list {
|
|
|
|
|
+ padding-top: 20upx;
|
|
|
|
|
+ background-color: #f0f2f6;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|