Browse Source

1、修改寄售企业不允许选择自营

shenjj 7 years ago
parent
commit
26fbe10482

+ 10 - 0
components/mobile/center/upoff-material.vue

@@ -151,6 +151,10 @@
         firstPrice: {
           type: String,
           default: ''
+        },
+        isFromME: {
+          type: Boolean,
+          default: true
         }
       },
       computed: {
@@ -309,6 +313,12 @@
         },
         // 选择销售方式
         chooseStore(item) {
+          if (!this.isFromME && item === '自营') {
+            this.timeoutCount++
+            this.collectResult = `您还未开店铺,不能选择自营`
+            this.showDrop = false
+            return
+          }
           this.chooseItem.storeInfoOms = item
           this.showdropmenu()
         },

+ 8 - 4
pages/mobile/center/vendor/material.vue

@@ -272,7 +272,7 @@
 
     <!-- 物料上下架 -->
     <div>
-      <upoff-material ref="upoffMaterial" :chooseItem="MaterielItem" @upoffMaterial="upoffMaterial" :firstPrice="firstPrice">
+      <upoff-material ref="upoffMaterial" :chooseItem="MaterielItem" @upoffMaterial="upoffMaterial" :firstPrice="firstPrice" :isFromME="isFromME">
 
       </upoff-material>
     </div>
@@ -318,10 +318,14 @@
       }
     },
     created() {
-      this.$http.get('/store-service/stores', { params: { op: 'check' } }).then(response => {
-        this.$store.commit('option/REQUEST_STORE_STATUS_SUCCESS', response.data)
+      this.isFromME = true // 自营
+      this.$http.get('/store-service/stores', { params: { filter: 'enUU', enUU: this.$store.state.option.user.data.enterprise.uu } }).then(response => {
+        if (!response.data.uuid || response.data.uuid === '33069557578d44e69bd91ad12d28a8d4') {
+          this.isFromME = false
+        }
+        // this.$store.commit('option/REQUEST_STORE_STATUS_SUCCESS', response.data)
       }, err => {
-        this.$store.commit('option/REQUEST_STORE_STATUS_FAILURE', err)
+        // this.$store.commit('option/REQUEST_STORE_STATUS_FAILURE', err)
       })
       this.getResourceProvidor()
       // this.MaterielItem.packaging = this.packObj[0]