浏览代码

处理供应商链接问题

wangcz 7 年之前
父节点
当前提交
4e8d066a25

+ 14 - 2
components/register-saler/register/StepThird.vue

@@ -104,8 +104,17 @@
               <div class="add-brand row">
                 <a href="javascript:void(0)" title="增加品牌" @click="addBrand"><em><i class="fa fa-plus-circle"></i>增加品牌</em></a>
               </div>
-              <div class="unpass-reason row" style="display: none">
-                原因:<span style="color: #d32526;">原因</span>
+              <!--主营产品-->
+              <div class="row brand-type">
+                <div class="col-md-1" style="padding:0;">主营产品<em>*</em></div>
+                <div class="col-md-10">
+                  <textarea v-model="description"
+                            style="line-height: 20px;font-size: 14px;margin-top:25px;"
+                            rows="8"
+                            @blur.stop.prevent="onDescription()"
+                            class="form-control"
+                            placeholder="例:本店主营Panasonic、IT、三星等知名品牌的触控IC、显示驱动IC、液晶屏、功率模块类、电源芯片、高压熔断、被动器件等产品。"></textarea>
+                </div>
               </div>
             </div>
             <!--原厂end-->
@@ -386,6 +395,9 @@
               this.showSimilarKey.index = index
             }
           })
+      },
+      onDescription () {
+
       },
       changedName: function (brand, index, keyIndex) {
         brand.name = this.similarKeys[index][keyIndex].nameCn

+ 2 - 2
components/supplier/articleOne.vue

@@ -47,10 +47,10 @@
       },
       // 判断是否有有效物料信息
       isVaildSupplier (id) {
-        this.$http.get('vendor/introduction/product/count', {params: {vendUU: id}})
+        this.$http.get('/vendor/introduction/product/count', {params: {vendUU: id}})
           .then(res => {
             if (res.data.count !== 0) {
-              this.$router.push('supplier/' + id)
+              this.$router.push('/supplier/' + id)
             } else {
               this.hasDialog = true
             }

+ 2 - 2
components/supplier/articleTwo.vue

@@ -65,10 +65,10 @@
       },
       // 判断是否有有效物料信息
       isVaildSupplier (id) {
-        this.$http.get('vendor/introduction/product/count', {params: {vendUU: id}})
+        this.$http.get('/vendor/introduction/product/count', {params: {vendUU: id}})
           .then(res => {
             if (res.data.count !== 0) {
-              this.$router.push('supplier/' + id)
+              this.$router.push('/supplier/' + id)
             } else {
               this.hasDialog = true
             }

+ 12 - 10
store/shop.js

@@ -44,16 +44,18 @@ export const actions = {
       .then(response => {
         commit('storeInfo/GET_COMMODITY_SUCCESS', response.data)
         let commodity = response.data || {}
-        commit('storeInfo/REQUEST_COMPONENT')
-        return axios.get(`/api/commodity/component/${commodity.uuid}`)
-          .then(response => {
-            commit('storeInfo/GET_COMPONENT_SUCCESS', response.data)
-            return Promise.all([
-              findStoreInfoFromUuid({ commit }, {uuid: commodity.storeid})
-            ])
-          }, err => {
-            commit('storeInfo/GET_COMPONENT_FAILURE', err)
-          })
+        if(commodity.uuid) {
+          commit('storeInfo/REQUEST_COMPONENT')
+          return axios.get(`/api/commodity/component/${commodity.uuid}`)
+            .then(response => {
+              commit('storeInfo/GET_COMPONENT_SUCCESS', response.data)
+              return Promise.all([
+                findStoreInfoFromUuid({ commit }, {uuid: commodity.storeid})
+              ])
+            }, err => {
+              commit('storeInfo/GET_COMPONENT_FAILURE', err)
+            })
+        }
       }, err => {
         commit('storeInfo/GET_COMMODITY_FAILURE', err)
       })