|
|
@@ -130,6 +130,16 @@ export default {
|
|
|
computed: {
|
|
|
...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ //纯花店打开直接跳转到采购页
|
|
|
+ loginInfo(newVal) {
|
|
|
+ if(!this.$util.isEmpty(newVal.pfShopId)){
|
|
|
+ if(Number(newVal.pfShopId) == 0){
|
|
|
+ uni.reLaunch({ url: '/pagesPurchase/order' })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
onLoad () {
|
|
|
|
|
|
},
|
|
|
@@ -138,6 +148,16 @@ export default {
|
|
|
uni.stopPullDownRefresh();
|
|
|
},
|
|
|
onShow () {
|
|
|
+
|
|
|
+ //纯花店打开直接跳转到采购页
|
|
|
+ if(!this.$util.isEmpty(this.loginInfo)){
|
|
|
+ if(!this.$util.isEmpty(this.loginInfo.pfShopId)){
|
|
|
+ if(Number(this.loginInfo.pfShopId) == 0){
|
|
|
+ uni.reLaunch({ url: '/pagesPurchase/order' })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
getShopInfo().then(res => {
|
|
|
if(res.name){
|
|
|
uni.setNavigationBarTitle({ title: res.name })
|
|
|
@@ -155,11 +175,7 @@ export default {
|
|
|
goCg(){
|
|
|
// #ifdef MP-WEIXIN
|
|
|
//只有一个供应商,点采购直接去这个供应商的采购页
|
|
|
- if(this.dictInfo.shop && this.dictInfo.shop.hasManyGhs == 0 && Number(this.dictInfo.shop.uniGhsId) > 0){
|
|
|
- this.$util.pageTo({url:'/pagesPurchase/ghsProduct?id='+this.dictInfo.shop.uniGhsId})
|
|
|
- }else{
|
|
|
- this.$util.pageTo({url:'/pagesPurchase/order'})
|
|
|
- }
|
|
|
+ this.$util.pageTo({url:'/pagesPurchase/order'})
|
|
|
// #endif
|
|
|
// #ifdef APP-PLUS
|
|
|
let that = this
|