|
@@ -446,9 +446,8 @@
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
import { getWeixinId } from "@/api/invite";
|
|
import { getWeixinId } from "@/api/invite";
|
|
|
import { getShortUrl } from "@/api/main";
|
|
import { getShortUrl } from "@/api/main";
|
|
|
-import { getStat,getStrokeCount } from '@/api/console'
|
|
|
|
|
|
|
+import { getStat } from '@/api/console' //getStrokeCount 已弃用
|
|
|
import { consoleIndex } from "@/api/workbench";
|
|
import { consoleIndex } from "@/api/workbench";
|
|
|
-import NotLogin from "@/components/not-login";
|
|
|
|
|
import autoUpdateMixins from "@/mixins/autoUpdate";
|
|
import autoUpdateMixins from "@/mixins/autoUpdate";
|
|
|
import { ghsList } from "@/api/purchase";
|
|
import { ghsList } from "@/api/purchase";
|
|
|
import { changeDelStatus,hasMoreGhs } from "@/api/ghs";
|
|
import { changeDelStatus,hasMoreGhs } from "@/api/ghs";
|
|
@@ -456,7 +455,6 @@ import {currentShop} from "@/api/shop";
|
|
|
import { clearLogin,hasNotice } from "@/api/admin";
|
|
import { clearLogin,hasNotice } from "@/api/admin";
|
|
|
export default {
|
|
export default {
|
|
|
name: "workbench",
|
|
name: "workbench",
|
|
|
- components: { NotLogin },
|
|
|
|
|
mixins: [autoUpdateMixins],
|
|
mixins: [autoUpdateMixins],
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
@@ -473,14 +471,10 @@ export default {
|
|
|
isMini:0
|
|
isMini:0
|
|
|
},
|
|
},
|
|
|
yesterdayIncome: 0,
|
|
yesterdayIncome: 0,
|
|
|
- lskd1: `${this.$constant.imgUrl}/ghs/home/lskd001.jpg`,
|
|
|
|
|
- lskd2: `${this.$constant.imgUrl}/ghs/home/lskd002.jpg`,
|
|
|
|
|
- lskd3: `${this.$constant.imgUrl}/ghs/home/lskd003.jpg`,
|
|
|
|
|
supplierList: [],
|
|
supplierList: [],
|
|
|
//登录状态 0未登录 1登录仅用到了采购 2登录用到完整功能
|
|
//登录状态 0未登录 1登录仅用到了采购 2登录用到完整功能
|
|
|
loginStyle :0,
|
|
loginStyle :0,
|
|
|
backAction:'',
|
|
backAction:'',
|
|
|
- countStat:{systemIncome:0,systemCount:0,debtCount:0,debtIncome:0,kfWxCount:0,kfWxIncome:0},
|
|
|
|
|
lookMoney:1,
|
|
lookMoney:1,
|
|
|
currentGhs:{},
|
|
currentGhs:{},
|
|
|
displaySupplierList: [],// 用于显示在弹框中的供货商列表
|
|
displaySupplierList: [],// 用于显示在弹框中的供货商列表
|
|
@@ -497,15 +491,7 @@ export default {
|
|
|
loginInfo(newVal) {
|
|
loginInfo(newVal) {
|
|
|
if(!this.$util.isEmpty(newVal.admin) && newVal.admin.currentShopId > 0){
|
|
if(!this.$util.isEmpty(newVal.admin) && newVal.admin.currentShopId > 0){
|
|
|
if(!this.$util.isEmpty(newVal.onlyCg)){
|
|
if(!this.$util.isEmpty(newVal.onlyCg)){
|
|
|
- if(Number(newVal.onlyCg) == 1){
|
|
|
|
|
- this.loginStyle = 1
|
|
|
|
|
- uni.hideTabBar()
|
|
|
|
|
- this.toRemindCustom()
|
|
|
|
|
- }else{
|
|
|
|
|
- this.loginStyle = 2
|
|
|
|
|
- uni.showTabBar()
|
|
|
|
|
- this.getMallData()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.handleLoginStyle(newVal.onlyCg)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -526,15 +512,7 @@ export default {
|
|
|
|
|
|
|
|
if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0){
|
|
if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0){
|
|
|
if(!this.$util.isEmpty(this.loginInfo.onlyCg)){
|
|
if(!this.$util.isEmpty(this.loginInfo.onlyCg)){
|
|
|
- if(Number(this.loginInfo.onlyCg) == 1){
|
|
|
|
|
- this.loginStyle = 1
|
|
|
|
|
- uni.hideTabBar()
|
|
|
|
|
- this.toRemindCustom()
|
|
|
|
|
- }else{
|
|
|
|
|
- this.loginStyle = 2
|
|
|
|
|
- uni.showTabBar()
|
|
|
|
|
- this.getMallData()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.handleLoginStyle(this.loginInfo.onlyCg)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -550,6 +528,17 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ handleLoginStyle(onlyCg){
|
|
|
|
|
+ if(Number(onlyCg) == 1){
|
|
|
|
|
+ this.loginStyle = 1
|
|
|
|
|
+ uni.hideTabBar()
|
|
|
|
|
+ this.toRemindCustom()
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.loginStyle = 2
|
|
|
|
|
+ uni.showTabBar()
|
|
|
|
|
+ this.getMallData()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
getMallData(){
|
|
getMallData(){
|
|
|
getWeixinId().then(res => {
|
|
getWeixinId().then(res => {
|
|
|
this.getappIdList = res.data
|
|
this.getappIdList = res.data
|
|
@@ -648,10 +637,7 @@ export default {
|
|
|
goMore(){
|
|
goMore(){
|
|
|
let that = this
|
|
let that = this
|
|
|
let shopkeeper = this.loginInfo.staff && this.loginInfo.staff.founder == 2 //判断店主(老板)
|
|
let shopkeeper = this.loginInfo.staff && this.loginInfo.staff.founder == 2 //判断店主(老板)
|
|
|
- let items = ['已屏蔽商家', '我已离职', '开关商城', '也要一个此商城', '修改密码', '退出登录'];
|
|
|
|
|
- if(shopkeeper) {
|
|
|
|
|
- items = ['已屏蔽商家', '改进建议', '开关商城', '也要一个此商城', '修改密码', '退出登录'];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ let items = shopkeeper ? ['已屏蔽商家', '改进建议', '开关商城', '也要一个此商城', '修改密码', '退出登录'] : ['已屏蔽商家', '我已离职', '开关商城', '也要一个此商城', '修改密码', '退出登录'];
|
|
|
uni.showActionSheet({
|
|
uni.showActionSheet({
|
|
|
itemList: items,
|
|
itemList: items,
|
|
|
success: function (res) {
|
|
success: function (res) {
|
|
@@ -814,7 +800,6 @@ export default {
|
|
|
this.$util.pageTo(item)
|
|
this.$util.pageTo(item)
|
|
|
},
|
|
},
|
|
|
init () {
|
|
init () {
|
|
|
-
|
|
|
|
|
this.getGHSList()
|
|
this.getGHSList()
|
|
|
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
@@ -827,12 +812,6 @@ export default {
|
|
|
this.lookMoney = res.data.lookMoney
|
|
this.lookMoney = res.data.lookMoney
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- getStrokeCount().then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- this.countStat = res.data
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
getStat().then(res=>{
|
|
getStat().then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
that.overview = res.data.overview
|
|
that.overview = res.data.overview
|