Browse Source

Merge remote-tracking branch 'origin/feature-201817-yc' into feature-201817-yc

yangc 7 years ago
parent
commit
387eb1173d

+ 9 - 0
components/mobile/MobileHeader.vue

@@ -165,6 +165,12 @@
 //          this.rightIcon = 'phone'
 //          this.rightIcon = 'phone'
         } else if (this.startWith(val, '/mobile/shop')) {
         } else if (this.startWith(val, '/mobile/shop')) {
           title = '店铺列表'
           title = '店铺列表'
+//          this.rightIcon = 'phone'
+        } else if (this.startWith(val, '/mobile/center/vendor/productList')) {
+          title = '产品信息'
+//          this.rightIcon = 'phone'
+        } else if (this.startWith(val, '/mobile/center/vendor/productdetails')) {
+          title = '产品信息'
 //          this.rightIcon = 'phone'
 //          this.rightIcon = 'phone'
         } else if (this.startWith(val, '/mobile/center/vendor/product')) {
         } else if (this.startWith(val, '/mobile/center/vendor/product')) {
           if (this.$route.query.providerType === 'enterprise') {
           if (this.$route.query.providerType === 'enterprise') {
@@ -214,6 +220,9 @@
         } else if (this.startWith(val, '/mobile/order/details')) {
         } else if (this.startWith(val, '/mobile/order/details')) {
           this.showSearchIcon = false
           this.showSearchIcon = false
           title = '订单详情'
           title = '订单详情'
+        } else if (this.startWith(val, '/mobile/order/logistics')) {
+          this.showSearchIcon = false
+          title = '物流信息'
         } else if (this.startWith(val, '/mobile/order')) {
         } else if (this.startWith(val, '/mobile/order')) {
           this.showSearchIcon = false
           this.showSearchIcon = false
           if (query.type === 'buyer') {
           if (query.type === 'buyer') {

+ 51 - 24
pages/mobile/center/vendor/product.vue

@@ -21,10 +21,10 @@
             <div class="text">
             <div class="text">
               {{item.pcmpcode}}
               {{item.pcmpcode}}
             </div>
             </div>
-            <img v-if="item.addProductPerson" class="person-flag" src="/images/mobile/product/personalMaterial.png" alt="">
+            <img v-if="item.addProductPerson" class="person-flag" src="/images/mobile/product/mine_icon.png" alt="">
           </div>
           </div>
           <div class="content">
           <div class="content">
-            <div class="fl">
+            <div class="fl" :class="providerType === 'enterprise' ? 'fullWidth': ''">
               <div class="linetext">品牌:{{item.pbranden}}</div>
               <div class="linetext">品牌:{{item.pbranden}}</div>
               <div class="linetext">物料名称(类目):
               <div class="linetext">物料名称(类目):
                 <template v-if="!item.kind">
                 <template v-if="!item.kind">
@@ -37,12 +37,18 @@
               <div class="linetext">规格:{{item.spec}}</div>
               <div class="linetext">规格:{{item.spec}}</div>
               <div class="linetext">单位:PCS</div>
               <div class="linetext">单位:PCS</div>
             </div>
             </div>
-            <div class="fr" :class="providerType == 'enterprise' && item.batchCount > 0 ? '' : 'addtop'" >
-              <div class="look" v-if="item.batchCount && providerType == 'enterprise'" @click="lookProductitem(item.id, item)" >查看产品</div>
-              <div class="add" v-if="providerType == 'enterprise'" @click="addProtoperson(item)" :class="{noadd: item.addProductPerson}">加入个人产品</div>
+            <div class="fr" v-if="providerType !== 'enterprise'"  :class="providerType == 'enterprise' && item.batchCount > 0 ? '' : 'addtop'" >
+              <!--<div class="look"  >查看产品</div>-->
+              <!--<div class="add" >加入个人产品</div>-->
               <div class="delete" v-if="providerType == 'person'" @click="deleteProvider(item.id, index)">删除</div>
               <div class="delete" v-if="providerType == 'person'" @click="deleteProvider(item.id, index)">删除</div>
             </div>
             </div>
           </div>
           </div>
+          <!--v-if="item.batchCount && providerType == 'enterprise'"-->
+          <!--v-if="providerType == 'enterprise'"-->
+          <div class="clearfix" v-if="providerType === 'enterprise'">
+            <div class="pull-right add" v-if="providerType === 'enterprise'" @click="addProtoperson(item)" :class="{noadd: item.addProductPerson}">加入个人产品</div>
+            <div class="pull-right look" @click="lookProductitem(item.id, item)">查看产品</div>
+          </div>
         </div>
         </div>
         <div v-else>
         <div v-else>
           <div class="top top2">
           <div class="top top2">
@@ -451,11 +457,13 @@
       // 查看企业产品库更多信息
       // 查看企业产品库更多信息
       lookProductitem: function(id, item) {
       lookProductitem: function(id, item) {
         this.chooseItem = item
         this.chooseItem = item
-        this.$http.get(`/trade/products/goods/productid/${id}`).then(res => {
-          this._initscroll()
-          this.showMoreinfn = true
-          this.vendorlist = res.data
-        })
+        this.$store.commit('product/component/REQUEST_NOWPRODUCTINFO_SUCCESS', item)
+        this.$router.push(`/mobile/center/vendor/productList?uuid=${id}`)
+        // this.$http.get(`/trade/products/goods/productid/${id}`).then(res => {
+        //   this._initscroll()
+        //   this.showMoreinfn = true
+        //   this.vendorlist = res.data
+        // })
       },
       },
       closeMoreinfo: function() {
       closeMoreinfo: function() {
         this.showMoreinfn = false
         this.showMoreinfn = false
@@ -978,6 +986,11 @@
         float: left;
         float: left;
         border-right: 1px dashed #e0e0e4;
         border-right: 1px dashed #e0e0e4;
         width: 4.68rem;
         width: 4.68rem;
+        &.fullWidth {
+          width: 100%;
+          border: 0;
+          float: left
+        }
       }
       }
       .fr {
       .fr {
         float: right;
         float: right;
@@ -1002,25 +1015,12 @@
           text-align: center;
           text-align: center;
           line-height: 0.6rem;
           line-height: 0.6rem;
           border-radius: 3px;
           border-radius: 3px;
-          &.look{
-            background: #0067e7;
-            color: #fff;
-          }
-          &.add{
-            background: #fff;
-            color: #0067e7;
-            border: 1px solid #0067e7;
-          }
           &.delete{
           &.delete{
             background: #fff;
             background: #fff;
             color: #f70415;
             color: #f70415;
             border: 1px solid #f70415;
             border: 1px solid #f70415;
           }
           }
-          &.noadd{
-            background: #cccbcb;
-            color: #fff;
-            border:1px solid #cccbcb;
-          }
+
         }
         }
         div:nth-child(1){
         div:nth-child(1){
           margin-bottom: 0.26rem
           margin-bottom: 0.26rem
@@ -1034,6 +1034,33 @@
         zoom: 1;
         zoom: 1;
       }
       }
     }
     }
+    div.clearfix {
+      padding: 0.2rem 0;
+      margin: 0 0.2rem;
+      border-top: 1px solid #d3d3d3;
+      div {
+        width: 2.1rem;
+        height: 0.6rem;
+        text-align: center;
+        line-height: 0.6rem;
+        border-radius: 3px;
+        margin-right: 0.2rem;
+        &.look {
+          color: #008bf7;
+          border: 1px solid #008bf7;
+        }
+        &.add {
+          background: #fff;
+          color: #f57710;
+          border: 1px solid #f57710;
+        }
+        &.noadd{
+          background: #cccbcb;
+          color: #fff;
+          border:1px solid #cccbcb;
+        }
+      }
+    }
   }
   }
   .middle {
   .middle {
     padding: 0.24rem 0.24rem 0px;
     padding: 0.24rem 0.24rem 0px;

+ 299 - 84
pages/mobile/center/vendor/productList/index.vue

@@ -1,101 +1,132 @@
 <template>
 <template>
   <div class="product-list-wrapper">
   <div class="product-list-wrapper">
     <div class="Kuang">
     <div class="Kuang">
-      <div class="overflow-hidden fixedOver" ref="mobileModalBox">
+      <div class="overflow-hidden fixedOver">
         <div class="content">
         <div class="content">
           <div class="infob">
           <div class="infob">
             <div class="info"><div class="name">品牌:</div><div>{{cnmpBand}}</div></div>
             <div class="info"><div class="name">品牌:</div><div>{{cnmpBand}}</div></div>
             <div class="info"><div class="name">物料名称(类目):</div><div>{{cnmpType || '-'}}</div></div>
             <div class="info"><div class="name">物料名称(类目):</div><div>{{cnmpType || '-'}}</div></div>
             <div class="info"><div class="name">型号:</div><div>{{cnmpCode}}</div></div>
             <div class="info"><div class="name">型号:</div><div>{{cnmpCode}}</div></div>
             <div class="info"><div class="name">规格:</div><div>{{cnmpSpec}}</div></div>
             <div class="info"><div class="name">规格:</div><div>{{cnmpSpec}}</div></div>
+            <div class="info"><div class="name">单位:</div><div>{{cnmpUnit}}</div></div>
+            <img v-if="ItemInfo.addProductPerson" class="person-flag" src="/images/mobile/product/personalMaterial.png" alt="">
           </div>
           </div>
-          <div class="content_sq" v-bind:key="item.id" v-for="(item, index) in vendorlist" >
-            <div class="labelBg">
-              <div class="labelinfo" style="margin-left: -0.1rem">
-                <div class="labelicon" style="vertical-align:top;margin-top: 0.09rem">标签</div>
-                <div class="labeltext">{{item.tag}}</div>
-              </div>
-              <div class="middle">
-                <div class="list clearfix" style="height: auto">
-                  <div class="fl">
-                    <div class="name">
-                      <div class="pms">
-                        {{item.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}
-                      </div>
+          <div ref="mobileModalBox" class="scrollWrapper">
+            <div>
+              <div class="content_sq" v-bind:key="item.id" v-if="vendorlist.length > 0" v-for="(item, index) in vendorlist" >
+                <div class="labelBg">
+                  <img class="store-type" v-if="item.storeid === '33069557578d44e69bd91ad12d28a8d4'" src="/images/mobile/product/consignment.png" alt="">
+                  <img class="store-type" src="/images/mobile/product/self.png" alt="" v-else >
+                  <div class="clearfix">
+                    <div class="pull-left labelinfo" style="margin-left: -0.1rem">
+                      <div class="labelicon" style="vertical-align:top;margin-top: 0.09rem">标签</div>
+                      <div class="labeltext">{{item.tag}}</div>
+                    </div>
+                    <div class="pull-right pullbtn">
+                      <span class="update" @click="update(item)">编辑</span>
+                      <span class="offbtn" @click="offFn(item)" v-if="item.status != 601 && item.status != 602">上架</span>
+                      <span class="offbtn" @click="deleteItem(item, index)">删除</span>
                     </div>
                     </div>
-                    <span @click="update(item)">编辑</span>
-                  </div>
-                  <div class="fr">
-                    <div class="textinfo" v-if="item.breakUp">可拆卖</div>
-                  </div>
-                </div>
-                <div class="list list-long clearfix" style="height: auto">
-                  <div class="fl">
-                    <div class="name">规格:</div>
-                    <div class="text">{{item.spec || '-'}}</div>
-                  </div>
-                </div>
-                <div class="list clearfix" style="height: auto">
-                  <div class="fl">
-                    <div class="name">最小包装数:</div>
-                    <div class="text">{{item.minPackQty}}</div>
-                  </div>
-                  <div class="fr">
-                    <div class="name">交期(天):</div>
-                    <div class="text" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
-                    <div class="text" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
                   </div>
                   </div>
-                </div>
+                  <div class="middle">
+                    <div class="list clearfix" style="height: auto">
+                      <!--<div class="fl">-->
+                        <!--<div class="name">-->
+                          <!--<div class="pms">-->
+                            <!--{{item.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}-->
+                          <!--</div>-->
+                        <!--</div>-->
+                        <!--<span @click="update(item)">编辑</span>-->
+                      <!--</div>-->
+                      <div class="fl clearfix">
+                        <div class="textinfo pull-left" v-if="item.status != 601 && item.status != 602" style="background: #ffcccc;color: #db0303;margin-right:0.2rem;">未上架</div>
+                        <div class="textinfo pull-left" v-else style="background: #cff6e0;color: #037c03;margin-right:0.2rem;">已上架</div>
+                        <div class="textinfo pull-left" v-if="item.breakUp" style="">可拆卖</div>
+                      </div>
+                    </div>
+                    <div class="list clearfix" style="height: auto">
+                      <div class="fl">
+                        <div class="name">最小包装数:</div>
+                        <div class="text">{{item.minPackQty}}</div>
+                      </div>
+                      <div class="fr">
+                        <div class="name">交期(天):</div>
+                        <div class="text" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
+                        <div class="text" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
+                      </div>
+                    </div>
 
 
-                <div class="list clearfix" style="height: auto">
-                  <div class="fl">
-                    <div class="name">包装方式:</div>
-                    <div class="text">{{item.packaging || '无包装信息'}}</div>
-                  </div>
-                  <div class="fr">
-                    <div class="name">库存:</div>
-                    <div class="text">{{item.reserve}}</div>
-                  </div>
-                </div>
+                    <div class="list clearfix" style="height: auto">
+                      <div class="fl">
+                        <div class="name">包装方式:</div>
+                        <div class="text">{{item.packaging || '无包装信息'}}</div>
+                      </div>
+                      <div class="fr">
+                        <div class="name">库存:</div>
+                        <div class="text">{{item.reserve}}</div>
+                      </div>
+                    </div>
 
 
-                <div class="list clearfix" style="height: auto">
-                  <div class="fl">
-                    <div class="name">生产日期:</div>
-                    <div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>
-                  </div>
-                  <div class="fr">
-                    <div class="name">最小起订量:</div>
-                    <div class="text" style="color: #f31919">{{item.minBuyQty}}</div>
-                  </div>
-                </div>
+                    <div class="list clearfix" style="height: auto">
+                      <div class="fl">
+                        <div class="name">生产日期:</div>
+                        <div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>
+                      </div>
+                      <div class="fr">
+                        <div class="name">最小起订量:</div>
+                        <div class="text" style="color: #f31919">{{item.minBuyQty}}</div>
+                      </div>
+                    </div>
 
 
-                <div class="list clearfix" style="height: auto">
-                  <div class="name left">价格梯度:</div>
-                  <div class="table left">
-                    <ul>
-                      <li class="title">
-                        <div>分段数量/PCS</div>
-                        <div>分段单价</div>
-                      </li>
-                      <li v-for="price in item.prices">
-                        <div>{{price.start}}+</div>
-                        <div v-if="item.currencyName == 'RMB'">¥{{price.rMBPrice}}</div>
-                        <div v-else>${{price.rMBPrice}}</div>
-                      </li>
-                    </ul>
+                    <div class="list clearfix" style="height: auto">
+                      <div class="name left">价格梯度:</div>
+                      <div class="table left">
+                        <ul>
+                          <li class="title">
+                            <div>分段数量/PCS</div>
+                            <div>分段单价</div>
+                          </li>
+                          <li v-for="price in item.prices">
+                            <div>{{price.start}}+</div>
+                            <div v-if="item.currencyName == 'RMB'">¥{{price.rMBPrice}}</div>
+                            <div v-else>${{price.rMBPrice}}</div>
+                          </li>
+                        </ul>
+                      </div>
+                    </div>
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>
+              <div v-if="vendorlist.length === 0"  class="com-none-state">
+            <img src="/images/mobile/@2x/empty-collect.png">
+            <p>抱歉,暂无产品信息</p>
+            <nuxt-link to="/">返回首页</nuxt-link>
+          </div>
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
+      <div class="deleteKuang" v-if="showLogout">
+        <div class="kuangContent">
+          <div class="title">系统提示</div>
+          <div class="titleinfo">是否删除此信息</div>
+          <div class="info" v-if="isUploadpro">*存在已上架信息</div>
+          <div class="K_btn">
+            <div class="cancelBtn" @click="showLogout = false">取消</div>
+            <div class="answerBtn" @click="ReadyDelete()">确定</div>
+          </div>
+        </div>
+      </div>
+      <div class="addPro" @click="toAddpro()">
+        <img src="/images/mobile/@2x/addPro_icon.png"/>
+      </div>
+      <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 
 
 <script type="text/javascript">
 <script type="text/javascript">
-  import { PullUp } from '~components/mobile/common'
+  import { RemindBox } from '~components/mobile/common'
   import axios from '~plugins/axios'
   import axios from '~plugins/axios'
   export default {
   export default {
     name: 'productList',
     name: 'productList',
@@ -106,6 +137,61 @@
       update(item) {
       update(item) {
         this.$store.commit('product/brand/GET_ONSALE_DETAILS_SUCCESS', item)
         this.$store.commit('product/brand/GET_ONSALE_DETAILS_SUCCESS', item)
         this.$router.push('/mobile/center/vendor/productdetails')
         this.$router.push('/mobile/center/vendor/productdetails')
+      },
+      offFn(item) {
+        this.$http.put(`/trade/goods/putOn/${item.id}`).then(res => {
+          if (res.data.success) {
+            this.collectResult = '上架成功'
+            this.timeoutCount++
+            item.status = 601
+          }
+        })
+      },
+      toAddpro() {
+        console.log(this.vendorlist)
+        let item = {
+          brandNameEn: this.cnmpBand,
+          kindNameCn: this.cnmpType,
+          code: this.cnmpCode,
+          spec: this.cnmpSpec,
+          prices: [{
+            end: '',
+            rMBNTPrice: '',
+            rMBPrice: '',
+            start: '1'
+          }],
+          minBuyQty: 1,
+          productid: this.$route.query.uuid,
+          prodNum: this.ItemInfo.prodNum,
+          currencyName: this.$store.state.option.storeStatus.data.enType === 'MAINLAND' ? 'RMB' : 'USD',
+          breakUp: false
+        }
+        this.$store.commit('product/brand/GET_ONSALE_DETAILS_SUCCESS', item)
+        this.$router.push(`/mobile/center/vendor/productdetails?formurl=productlist`)
+      },
+      deleteItem(item, index) {
+        this.deleteItemId = item.id
+        this.deleteItemIndex = index
+        this.$http.get(`/trade/goods/isRecommend/${item.id}`).then(res => {
+          this.showLogout = true
+          if (res.data.code === 1) {
+            if (item.status === 601 || item.status === 602) {
+              this.isUploadpro = true
+            }
+          }
+        })
+      },
+      ReadyDelete() {
+        let params = {
+          isPerson: 1
+        }
+        this.$http.delete(`/trade/goods/delete/${this.deleteItemId}`, params).then(res => {
+          this.collectResult = '删除成功'
+          this.timeoutCount++
+          this.vendorlist.splice(this.deleteItemIndex, 1)
+          this.showLogout = false
+          this.isUploadpro = false
+        })
       }
       }
     },
     },
     async asyncData({route}) {
     async asyncData({route}) {
@@ -119,24 +205,34 @@
     },
     },
     data() {
     data() {
       return {
       return {
-        vendorlist: {}
+        vendorlist: {},
+        showLogout: false,
+        isUploadpro: false,
+        collectResult: '',
+        timeoutCount: 0
       }
       }
     },
     },
     components: {
     components: {
-      PullUp
+      RemindBox
     },
     },
     computed: {
     computed: {
+      ItemInfo() {
+        return this.$store.state.product.component.nowProductInfo.data
+      },
       cnmpCode() { // 型号
       cnmpCode() { // 型号
-        return this.vendorlist[0].code || '-'
+        return this.ItemInfo.pcmpcode || '-'
       },
       },
       cnmpType() { // 类目
       cnmpType() { // 类目
-        return this.vendorlist[0].kindNameCn || '-'
+        return this.ItemInfo.kind || this.ItemInfo.kinden || '-'
       },
       },
       cnmpBand() { // 品牌
       cnmpBand() { // 品牌
-        return this.vendorlist[0].brandNameEn || '-'
+        return this.ItemInfo.pbranden || '-'
       },
       },
       cnmpSpec () {
       cnmpSpec () {
-        return this.vendorlist[0].spec
+        return this.ItemInfo.spec
+      },
+      cnmpUnit() {
+        return this.ItemInfo.unit || 'PCS'
       }
       }
     }
     }
   }
   }
@@ -166,6 +262,8 @@
       bottom: 0.98rem;
       bottom: 0.98rem;
       overflow: hidden;
       overflow: hidden;
       background: #f1f3f6;
       background: #f1f3f6;
+      padding: 0 0.2rem;
+      width: 100%;
     }
     }
     i {
     i {
       font-size: .6rem;
       font-size: .6rem;
@@ -193,8 +291,9 @@
     }
     }
     .content {
     .content {
       .infob {
       .infob {
-        background: #e3edfd;
+        background: #fff;
         padding: 0.2rem;
         padding: 0.2rem;
+        margin: 0.18rem 0;
         .info {
         .info {
           color: #333;
           color: #333;
           font-size: 0.3rem;
           font-size: 0.3rem;
@@ -211,9 +310,10 @@
         }
         }
       }
       }
       .content_sq {
       .content_sq {
-        margin: 0.1rem auto;
         background: #fff;
         background: #fff;
         padding: 0.2rem 0;
         padding: 0.2rem 0;
+        position: relative;
+        margin-bottom: 0.2rem;
         .list {
         .list {
           margin-bottom: 0.18rem;
           margin-bottom: 0.18rem;
         }
         }
@@ -225,9 +325,9 @@
           margin-top: -0.1rem;
           margin-top: -0.1rem;
         }
         }
         .labelinfo {
         .labelinfo {
-          background-image: url('/images/mobile/@2x/labelTop.png');
+          background-image: url('/images/mobile/@2x/labelTop2.png');
           background-repeat: no-repeat;
           background-repeat: no-repeat;
-          width: 6.29rem;
+          width: 3.25rem;
           height: 0.64rem;
           height: 0.64rem;
           line-height: 0.64rem;
           line-height: 0.64rem;
           background-size: 100%;
           background-size: 100%;
@@ -236,6 +336,21 @@
           background-color: rgba(0, 0, 0, 0);
           background-color: rgba(0, 0, 0, 0);
           color: #666;
           color: #666;
         }
         }
+        .pullbtn {
+          margin-right: 0.4rem;
+          span {
+            display: inline-block;
+            width: 0.92rem;
+            @include lineHeight(0.43rem);
+            background: #008bf7;
+            color: #fff;
+            font-size: 0.26rem;
+            border-radius: 3px;
+            text-align: center;
+            margin-top: 0.1rem;
+            margin-right: 0.15rem;
+          }
+        }
       }
       }
     }
     }
     .labelinfo {
     .labelinfo {
@@ -302,7 +417,12 @@
         }
         }
         .textinfo {
         .textinfo {
           color: #0067e7;
           color: #0067e7;
-          font-size: 0.3rem;
+          font-size: 0.28rem;
+          width: 0.98rem;
+          background: #d7e4fd;
+          border-radius: 3px;
+          @include lineHeight(0.42rem);
+          text-align: center;
         }
         }
         .button {
         .button {
           font-size: 0.26rem;
           font-size: 0.26rem;
@@ -326,7 +446,7 @@
           zoom: 1;
           zoom: 1;
         }
         }
         .fl {
         .fl {
-          width: 4.3rem;
+          width: 4rem;
           float: left;
           float: left;
           overflow: hidden;
           overflow: hidden;
           text-overflow: ellipsis;
           text-overflow: ellipsis;
@@ -355,7 +475,7 @@
           font-size: 0.3rem
           font-size: 0.3rem
         }
         }
         .table {
         .table {
-          width: 5.5rem;
+          width: 5rem;
           margin-bottom: 0;
           margin-bottom: 0;
           margin-top: 0;
           margin-top: 0;
           li {
           li {
@@ -398,5 +518,100 @@
         }
         }
       }
       }
     }
     }
+    .person-flag {
+      width: .75rem;
+      position: absolute;
+      right: 0;
+      top: 0.4rem;
+    }
+    .store-type {
+      width: .77rem;
+      height: .77rem;
+      position: absolute;
+      right: 0;
+      top: 0;
+    }
+    .scrollWrapper {
+      position: fixed;
+      top: 4.69rem;
+      bottom: 0.96rem;
+      overflow-y: hidden;
+      right: 0.2rem;
+      left: 0.2rem;
+    }
+    .deleteKuang {
+      position: fixed;
+      background: rgba(0,0,0,0.5);
+      top: 0;
+      left: 0;
+      right: 0;
+      bottom: 0;
+      z-index: 9999;
+      .kuangContent {
+        border-radius: 5px;
+        background: #fff;
+        width: 5rem;
+        position: absolute;
+        left: 50%;
+        top: 50%;
+        transform: translate3d(-50%, -50%, 0);
+        overflow: hidden;
+        .titleinfo {
+          font-size: .3rem;
+          color: #666;
+          text-align: center;
+          margin-top: 0.5rem;
+          margin-bottom: 0.1rem;
+        }
+        .title {
+          background: #5078cb;
+          height: .7rem;
+          line-height: .7rem;
+          font-size: .3rem;
+          color: #fff;
+          text-align: center;
+        }
+        .info {
+          color: #f00;
+          text-align: center;
+        }
+        .K_btn {
+          margin-top: 0.4rem;
+          line-height: 0.7rem;
+          height: 0.7rem;
+          &::after{
+            clear: both;
+            display: block;
+            content: ' ';
+            visibility: hidden;
+            zoom: 1;
+          }
+          div {
+            float: left;
+            width: 50%;
+            font-size: 0.3rem;
+            text-align: center;
+            &.cancelBtn {
+              background: #b4b5b9;
+              color: #333;
+            }
+            &.answerBtn {
+              background: #5078cb;
+              color: #fff;
+            }
+          }
+        }
+      }
+    }
+    .addPro {
+      position: fixed;
+      bottom: 1.2rem;
+      right: 0.4rem;
+      z-index: 11;
+      img {
+        width: 1.12rem;
+        height: 1.12rem;
+      }
+    }
   }
   }
 </style>
 </style>

+ 61 - 12
pages/mobile/center/vendor/productdetails.vue

@@ -27,7 +27,7 @@
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
-      <div class="list clearfix">
+      <div class="over list clearfix">
         <div class="pull-left">
         <div class="pull-left">
           <span class="name">规格:</span>
           <span class="name">规格:</span>
           <span>{{chooseItem.spec}}</span>
           <span>{{chooseItem.spec}}</span>
@@ -60,11 +60,11 @@
       <div class="list clearfix">
       <div class="list clearfix">
         <div class="pull-left">
         <div class="pull-left">
           <span class="name">最小包装数:</span>
           <span class="name">最小包装数:</span>
-          <input type="tel" placeholder="请输入最小包装数" v-model="chooseItem.minPackQty" class="input minPackQtyInput" maxlength="6" @blur="minBuyQtyBlur()"/>
+          <input type="tel" placeholder="请输入最小包装数" v-model.lazy="chooseItem.minPackQty" class="input minPackQtyInput" maxlength="6" @blur="minBuyQtyBlur()"/>
         </div>
         </div>
         <div class="pull-right">
         <div class="pull-right">
           <span class="name">最小起订量:</span>
           <span class="name">最小起订量:</span>
-          <input type="tel" placeholder="请输入最小起订量" v-model="chooseItem.minBuyQty" class="input minBuyQtyInput" maxlength="6" @blur="minBuyQtyBlur()" />
+          <input type="tel" placeholder="请输入最小起订量"  v-model.lazy="chooseItem.minBuyQty" class="input minBuyQtyInput" maxlength="6" @blur="minBuyQtyBlur()" />
         </div>
         </div>
       </div>
       </div>
       <div class="list clearfix">
       <div class="list clearfix">
@@ -101,7 +101,20 @@
         <li v-for="(item, index) in chooseItem.prices" v-bind:key="index">
         <li v-for="(item, index) in chooseItem.prices" v-bind:key="index">
           <div class="clearfix">
           <div class="clearfix">
             <div class="pull-left">
             <div class="pull-left">
-              <input oninput="if(value.length>5)value=value.slice(0,9)" type="number" placeholder="数量" class="otherNumber" :class="{firstNumber: index === 0}" v-model.lazy.trim="item.start" :disabled="index === 0" :readonly="index === 0" @blur="startpriceBlur(item, index)" maxlength="9"/>
+              <input v-if="index > 0" oninput="if(value.length>5)value=value.slice(0,9)"
+                     type="number" placeholder="数量" class="otherNumber"
+                     :class="{firstNumber: index === 0}"
+                     v-model.lazy.trim="item.start"
+                     :disabled="index === 0" :readonly="index === 0"
+                     @blur="startpriceBlur(item, index)" maxlength="9"
+              />
+              <input v-else oninput="if(value.length>5)value=value.slice(0,9)"
+                     type="number" placeholder="数量" class="otherNumber"
+                     :class="{firstNumber: index === 0}"
+                     v-model.lazy.trim="chooseItem.minBuyQty"
+                     :disabled="index === 0" :readonly="index === 0"
+                     @blur="startpriceBlur(item, index)" maxlength="9"
+              />
               <label v-if="index !== chooseItem.prices.length - 1">-</label>
               <label v-if="index !== chooseItem.prices.length - 1">-</label>
               <label v-if="index === chooseItem.prices.length - 1">以上</label>
               <label v-if="index === chooseItem.prices.length - 1">以上</label>
               <input oninput="if(value.length>5)value=value.slice(0,9)" type="number" placeholder="数量" class="otherNumber" v-model.lazy.trim="item.end" v-if="index !== chooseItem.prices.length - 1" @blur="endpriceBlur(item, index)" maxlength="9"/>
               <input oninput="if(value.length>5)value=value.slice(0,9)" type="number" placeholder="数量" class="otherNumber" v-model.lazy.trim="item.end" v-if="index !== chooseItem.prices.length - 1" @blur="endpriceBlur(item, index)" maxlength="9"/>
@@ -200,17 +213,20 @@
           this.chooseItem.tag = ''
           this.chooseItem.tag = ''
         }
         }
       },
       },
+      changeBuyQtyBlur() {
+        this.chooseItem.prices[0].start = this.chooseItem.minBuyQty
+      },
       // 最低起订量失去焦点操作
       // 最低起订量失去焦点操作
       minBuyQtyBlur() {
       minBuyQtyBlur() {
-        if (this.chooseItem.minPackQty <= 0) {
+        if (Math.abs(this.chooseItem.minPackQty) <= 0) {
           this.timeoutCount++
           this.timeoutCount++
           this.collectResult = '包装数必须是大于0的整数'
           this.collectResult = '包装数必须是大于0的整数'
           this.chooseItem.minPackQty = 1
           this.chooseItem.minPackQty = 1
-        } else if (this.chooseItem.minBuyQty <= 0) {
+        } else if (Math.abs(this.chooseItem.minBuyQty) <= 0) {
           this.timeoutCount++
           this.timeoutCount++
           this.collectResult = '起订量必须是大于0的整数'
           this.collectResult = '起订量必须是大于0的整数'
           this.chooseItem.minBuyQty = 1
           this.chooseItem.minBuyQty = 1
-        } else if (!this.chooseItem.breakUp && this.chooseItem.minBuyQty % this.chooseItem.minPackQty !== 0) {
+        } else if ((!this.chooseItem.breakUp && this.chooseItem.minBuyQty) && this.chooseItem.minBuyQty % this.chooseItem.minPackQty !== 0) {
           this.timeoutCount++
           this.timeoutCount++
           this.collectResult = '不可拆卖时,起订量必须是包装数量的倍数'
           this.collectResult = '不可拆卖时,起订量必须是包装数量的倍数'
           if (this.chooseItem.minPackQty > this.chooseItem.minBuyQty) {
           if (this.chooseItem.minPackQty > this.chooseItem.minBuyQty) {
@@ -256,6 +272,7 @@
             this.chooseItem.prices.splice(2, 1)
             this.chooseItem.prices.splice(2, 1)
           } else {
           } else {
             index++
             index++
+            if (this.chooseItem.prices.length === 1) return
             this.chooseItem.prices[0].rMBPrice = this.chooseItem.prices[1].rMBPrice
             this.chooseItem.prices[0].rMBPrice = this.chooseItem.prices[1].rMBPrice
             this.chooseItem.prices[0].end = '9999999999'
             this.chooseItem.prices[0].end = '9999999999'
             this.chooseItem.prices.splice(index, 1)
             this.chooseItem.prices.splice(index, 1)
@@ -302,11 +319,8 @@
       },
       },
       // 结束价格阶段失去焦点
       // 结束价格阶段失去焦点
       endpriceBlur(item, index) {
       endpriceBlur(item, index) {
-        console.log(index === 1)
-        console.log(Math.abs(item.end) + 1 <= Math.abs(item.start))
         if (item.end === '') {
         if (item.end === '') {
           return false
           return false
-        } else if (index === 1 && Math.abs(item.end) + 1 >= Math.abs(item.start)) {
         } else if (Math.abs(item.end) + 1 <= Math.abs(item.start)) {
         } else if (Math.abs(item.end) + 1 <= Math.abs(item.start)) {
           this.timeoutCount++
           this.timeoutCount++
           this.collectResult = `输入值不能小于${item.start}`
           this.collectResult = `输入值不能小于${item.start}`
@@ -328,7 +342,7 @@
       },
       },
       // 交期失去焦点
       // 交期失去焦点
       minDeliveryBlur() {
       minDeliveryBlur() {
-        if (this.chooseItem.minDelivery > this.chooseItem.maxDelivery) {
+        if (Math.abs(this.chooseItem.minDelivery) > Math.abs(this.chooseItem.maxDelivery)) {
           this.timeoutCount++
           this.timeoutCount++
           this.collectResult = `最短交期应小于等于最长交期`
           this.collectResult = `最短交期应小于等于最长交期`
           this.chooseItem.maxDelivery = ''
           this.chooseItem.maxDelivery = ''
@@ -459,6 +473,42 @@
           }
           }
         }
         }
         this.chooseItem.prices[this.chooseItem.prices.length - 1].end = '9999999999'
         this.chooseItem.prices[this.chooseItem.prices.length - 1].end = '9999999999'
+        if (this.$route.query.formurl === 'productlist') {
+          let is = {
+            currencyName: 'RMB',
+            maxDelivery: this.chooseItem.maxDelivery,
+            minBuyQty: this.chooseItem.minBuyQty,
+            minDelivery: this.chooseItem.minDelivery,
+            minPackQty: this.chooseItem.minPackQty,
+            packaging: this.chooseItem.packaging,
+            prices: this.chooseItem.prices,
+            produceDate: this.chooseItem.produceDate,
+            reserve: this.chooseItem.reserve,
+            selfSale: this.chooseItem.selfSale,
+            spec: this.chooseItem.spec,
+            storeInfoOms: this.chooseItem.storeInfoOms,
+            prodNum: this.chooseItem.prodNum,
+            productid: this.chooseItem.productid,
+            tag: this.chooseItem.tag,
+            breakUp: this.chooseItem.breakUp
+          }
+          this.$http.post('/trade/goods/addGoods', is).then(res => {
+            if (res.data.success) {
+              this.timeoutCount++
+              this.collectResult = '保存成功'
+              setTimeout(() => {
+                this.goLastPage()
+              }, 300)
+            } else {
+              this.timeoutCount++
+              this.collectResult = res.data.message
+            }
+          }, err => {
+            this.timeoutCount++
+            this.collectResult = err.response.data
+          })
+          return
+        }
         this.$http.put('/trade/goods', this.chooseItem).then(res => {
         this.$http.put('/trade/goods', this.chooseItem).then(res => {
           if (res.data.success) {
           if (res.data.success) {
             this.timeoutCount++
             this.timeoutCount++
@@ -540,7 +590,6 @@
         }
         }
         .pull-left {
         .pull-left {
           width: 50%;
           width: 50%;
-          @include overFlowHidden()
         }
         }
         .progress-wrapper {
         .progress-wrapper {
           width: .68rem;
           width: .68rem;

+ 40 - 20
pages/mobile/order/details.vue

@@ -429,12 +429,14 @@
           data[0].purchaseDetails = data[0].orderDetails
           data[0].purchaseDetails = data[0].orderDetails
           data[0].purchaseRemark = data[0].orderRemark ? JSON.parse(data[0].orderRemark)[data[0].storeid] : ''
           data[0].purchaseRemark = data[0].orderRemark ? JSON.parse(data[0].orderRemark)[data[0].storeid] : ''
           data[0].sendType = data[0].rule.method
           data[0].sendType = data[0].rule.method
+          let invoiceAddress = data[0].invoiceAddress ? JSON.parse(data[0].invoiceAddress) : ''
           if (route.query.type === 'buyer') {
           if (route.query.type === 'buyer') {
             sellsendGoodsTime = await axios.get(`/trade/tradebasicproperties/get/1054`)
             sellsendGoodsTime = await axios.get(`/trade/tradebasicproperties/get/1054`)
           }
           }
           return {
           return {
             orderList: data[0],
             orderList: data[0],
-            sellsendGoodsTime: parseInt(sellsendGoodsTime.data.info)
+            sellsendGoodsTime: parseInt(sellsendGoodsTime.data.info),
+            invoiceAddress: invoiceAddress
           }
           }
         }
         }
         let { data } = await axios.get(`/trade/purchase/purchaseId/${route.query.uuid}`)
         let { data } = await axios.get(`/trade/purchase/purchaseId/${route.query.uuid}`)
@@ -548,26 +550,37 @@
         },
         },
         // 发货
         // 发货
         sendGoods(item) {
         sendGoods(item) {
-          this.sendGoodstype = 'add'
-          if (item.inid) {
-            this._id = EncryptionFilter(item.inid)
-            this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-              this.sendGoodsInfo = res.data[0]
-              this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-              this.showSend = true
-            })
-          } else {
-            this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
-              this._id = EncryptionFilter(res.data.inId)
-              this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-                this.sendGoodsInfo = res.data[0]
-                this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-                this.showSend = true
-              })
-            }, err => {
-              this.onMind('转出货单失败' + err.data)
-            })
+          if (!(this.user.data.pwdEnable && this.user.data.haveUserQuestion && this.user.data.emailValidCode === 2)) {
+            // 等级不够
+            this.onMind('您的账户安全等级较低,请先在pc端进行信息完善')
+            return
           }
           }
+          this.$http.get(`/trade/bankInfo/vender/enterprise?status=104&type=sup`).then(res => {
+            if (res.data && res.data.length > 0) {
+              this.onMind('您还未填写收款账户信息 ,请进行完善')
+            } else {
+              this.sendGoodstype = 'add'
+              if (item.inid) {
+                this._id = EncryptionFilter(item.inid)
+                this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                  this.sendGoodsInfo = res.data[0]
+                  this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                  this.showSend = true
+                })
+              } else {
+                this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
+                  this._id = EncryptionFilter(res.data.inId)
+                  this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                    this.sendGoodsInfo = res.data[0]
+                    this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                    this.showSend = true
+                  })
+                }, err => {
+                  this.onMind('转出货单失败' + err.response.data)
+                })
+              }
+            }
+          })
         },
         },
         // 选择配送商
         // 选择配送商
         choosePeisong() {
         choosePeisong() {
@@ -1559,6 +1572,13 @@
         color: #999;
         color: #999;
         height: 0.5rem;
         height: 0.5rem;
         line-height: 0.5rem;
         line-height: 0.5rem;
+        .pull-right {
+          max-width: 4.5rem;
+          @include overFlowHidden();
+        }
+        .pull-left {
+          width: 2.2rem;
+        }
       }
       }
     }
     }
   }
   }

+ 38 - 20
pages/mobile/order/index.vue

@@ -6,7 +6,7 @@
       <div :class="activeType === 'comfirmed' ? 'active' : ''" @click="ChangeList('comfirmed')"><span>待发货</span></div>
       <div :class="activeType === 'comfirmed' ? 'active' : ''" @click="ChangeList('comfirmed')"><span>待发货</span></div>
       <div :class="activeType === 'inbound' ? 'active' : ''" @click="ChangeList('inbound')"><span>待收货</span></div>
       <div :class="activeType === 'inbound' ? 'active' : ''" @click="ChangeList('inbound')"><span>待收货</span></div>
     </div>
     </div>
-    <ul class="order-list-wrap"  id="order-wrapper">
+    <ul class="order-list-wrap"  id="order-wrapper" v-show="orderList.length > 0">
       <li class="clearfix" v-for="item in orderList">
       <li class="clearfix" v-for="item in orderList">
         <div class="list-wrap-title clearfix">
         <div class="list-wrap-title clearfix">
           <div class="pull-left" v-if="vendorType !== 'buyer'" @click="toShopdetails(item)">
           <div class="pull-left" v-if="vendorType !== 'buyer'" @click="toShopdetails(item)">
@@ -448,26 +448,44 @@
       },
       },
       // 发货
       // 发货
       sendGoods(item) {
       sendGoods(item) {
-        this.sendGoodstype = 'add'
-        if (item.inid) {
-          this._id = EncryptionFilter(item.inid)
-          this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-            this.sendGoodsInfo = res.data[0]
-            this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-            this.showSend = true
-          })
-        } else {
-          this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
-            this._id = EncryptionFilter(res.data.inId)
-            this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-              this.sendGoodsInfo = res.data[0]
-              this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-              this.showSend = true
-            })
-          }, err => {
-            this.onMind('转出货单失败' + err.data)
-          })
+        if (!(this.user.data.pwdEnable && this.user.data.haveUserQuestion && this.user.data.emailValidCode === 2)) {
+          // 等级不够
+          this.onMind('您的账户安全等级较低,请先在pc端进行信息完善')
+          return
         }
         }
+        this.$http.get(`/trade/bankInfo/vender/enterprise?status=104&type=sup`).then(res => {
+          if (res.data && res.data[0]) {
+            this.$http.get(`/trade/address/enterprise?ship=false`).then(res => {
+              // 选择发货地址
+              if (res.data[0]) {
+                this.sendGoodstype = 'add'
+                if (item.inid) {
+                  this._id = EncryptionFilter(item.inid)
+                  this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                    this.sendGoodsInfo = res.data[0]
+                    this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                    this.showSend = true
+                  })
+                } else {
+                  this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
+                    this._id = EncryptionFilter(res.data.inId)
+                    this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                      this.sendGoodsInfo = res.data[0]
+                      this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                      this.showSend = true
+                    })
+                  }, err => {
+                    this.onMind('转出货单失败' + err.response.data)
+                  })
+                }
+              } else {
+                this.onMind('您还未填写设置发货地址 ,请进行完善')
+              }
+            })
+          } else {
+            this.onMind('您还未填写收款账户信息 ,请进行完善')
+          }
+        })
       },
       },
       // 选择配送商
       // 选择配送商
       choosePeisong() {
       choosePeisong() {

+ 1 - 5
pages/mobile/order/logistics.vue

@@ -1,10 +1,5 @@
 <template>
 <template>
     <div class="order-wrapper">
     <div class="order-wrapper">
-      <div class="com-mobile-header">
-        <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
-        <p>物流信息
-        </p>
-      </div>
       <div class="logistics_top clearfix">
       <div class="logistics_top clearfix">
         <div class="pull-left">
         <div class="pull-left">
           <div class="name">订单编号:<span class="red">{{detailsInfo.orderid}}</span></div>
           <div class="name">订单编号:<span class="red">{{detailsInfo.orderid}}</span></div>
@@ -57,6 +52,7 @@
         let resultInfo
         let resultInfo
         if (route.query.type === 'buyer') {
         if (route.query.type === 'buyer') {
           res = await axios.get(`/trade/order/${route.query.uuid}`)
           res = await axios.get(`/trade/order/${route.query.uuid}`)
+          res.data[0].sendType = JSON.parse(res.data[0].jsonRule).method
           resultInfo = res.data[0]
           resultInfo = res.data[0]
         } else {
         } else {
           res = await axios.get(`/trade/purchase/purchaseId/${route.query.uuid}`)
           res = await axios.get(`/trade/purchase/purchaseId/${route.query.uuid}`)

BIN
static/images/mobile/@2x/addPro_icon.png


BIN
static/images/mobile/@2x/labelTop2.png


BIN
static/images/mobile/product/mine_icon.png


+ 16 - 0
store/product/component.js

@@ -11,6 +11,11 @@ export const state = () => ({
     // 类目关注
     // 类目关注
     fetching: false,
     fetching: false,
     data: []
     data: []
+  },
+  // 当个物料信息
+  nowProductInfo: {
+    fetching: false,
+    data: []
   }
   }
 })
 })
 
 
@@ -44,5 +49,16 @@ export const mutations = {
   },
   },
   REQUEST_COLLECTCODE_FAILURE (state) {
   REQUEST_COLLECTCODE_FAILURE (state) {
     state.collectCode = false
     state.collectCode = false
+  },
+
+  REQUEST_NOWPRODUCTINFO (state) {
+    state.nowProductInfo.fetching = true
+  },
+  REQUEST_NOWPRODUCTINFO_SUCCESS (state, result) {
+    state.nowProductInfo.fetching = false
+    state.nowProductInfo.data = result
+  },
+  REQUEST_NOWPRODUCTINFO_FAILURE (state) {
+    state.nowProductInfo = false
   }
   }
 }
 }