|
@@ -119,28 +119,19 @@ export default {
|
|
|
name: ""
|
|
name: ""
|
|
|
},
|
|
},
|
|
|
detailInfo: {},
|
|
detailInfo: {},
|
|
|
- loading: false,
|
|
|
|
|
- notLogin:true
|
|
|
|
|
|
|
+ loading: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters(["getLoginInfo"])
|
|
...mapGetters(["getLoginInfo"])
|
|
|
},
|
|
},
|
|
|
- watch: {
|
|
|
|
|
- getLoginInfo: {
|
|
|
|
|
- handler(newValue) {
|
|
|
|
|
- if(!this.$util.isEmpty(newValue.admin) && newValue.admin.currentShopId > 0){
|
|
|
|
|
- this.notLogin = false
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- onLoad() {
|
|
|
|
|
- if(this.$util.isEmpty(this.getLoginInfo.admin) || this.getLoginInfo.admin.currentShopId == 0){
|
|
|
|
|
- this.notLogin = true
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ notLogin(){
|
|
|
|
|
+ if(!this.$util.isEmpty(this.getLoginInfo.admin) && this.getLoginInfo.admin.currentShopId > 0){
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ return true
|
|
|
|
|
+ },
|
|
|
remindLogin(){
|
|
remindLogin(){
|
|
|
let that = this
|
|
let that = this
|
|
|
this.$util.confirmModal({content:'您还没有登录,请先登录',okText:'去登录'},() => {
|
|
this.$util.confirmModal({content:'您还没有登录,请先登录',okText:'去登录'},() => {
|
|
@@ -148,14 +139,14 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
getDetail(s){
|
|
getDetail(s){
|
|
|
- if(this.notLogin){
|
|
|
|
|
|
|
+ if(this.notLogin()){
|
|
|
this.remindLogin()
|
|
this.remindLogin()
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
this.pageTo({url: '/pagesPurchase/purDetails',query: {id: s.id,}})
|
|
this.pageTo({url: '/pagesPurchase/purDetails',query: {id: s.id,}})
|
|
|
},
|
|
},
|
|
|
cancelFn(info){
|
|
cancelFn(info){
|
|
|
- if(this.notLogin){
|
|
|
|
|
|
|
+ if(this.notLogin()){
|
|
|
this.remindLogin()
|
|
this.remindLogin()
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
@@ -170,7 +161,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
toClear(info){
|
|
toClear(info){
|
|
|
- if(this.notLogin){
|
|
|
|
|
|
|
+ if(this.notLogin()){
|
|
|
this.remindLogin()
|
|
this.remindLogin()
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|