ソースを参照

Merge branch 'release-201843-wangcz'

wangcz 7 年 前
コミット
190cd172e1

+ 3 - 1
app.html

@@ -8,6 +8,7 @@
   <!--<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css"/>-->
   <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_6koxroe1k5l.css">
   <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css" />
+  <link rel="stylesheet" href="https://unpkg.com/mint-ui@1/lib/style.css">
   <!--<script src="https://wechatfe.github.io/vconsole/lib/vconsole.min.js?v=3.2.0"></script>-->
   {{ HEAD }}
   <script>
@@ -49,6 +50,7 @@
       var s = document.getElementsByTagName("script")[0];
       s.parentNode.insertBefore(bp, s);
 
+/**
       // 用户浏览统计
       <!-- Piwik -->
         var u="//piwik.ubtob.com/";
@@ -75,7 +77,7 @@
         w.addEventListener(resizeEvt, recalc, false)
         d.addEventListener('DOMContentLoaded', recalc, false)
       }
-*/
+**/
     })(window, document)
   </script>
 </head>

+ 1 - 1
components/applyPurchase/ApplyInfo.vue

@@ -34,7 +34,7 @@
       <ul v-if="purchaseManList.content && purchaseManList.content.length">
         <li v-for="(purchaseMan, index) in purchaseManList.content" :class="{'active': purchaseMan.active}" :key="index" ref="purchaseManList">
           <div class="il-item il-left">
-            <div class="item" v-if="purchaseMan.inquiry.enterprise && purchaseMan.inquiry.enterprise.enName" :title="user.logged ? purchaseMan.inquiry.enterprise.enName : null">{{[purchaseMan.inquiry.enterprise.enName, user] | enterpriseFilter}}</div>
+            <div class="item" v-if="purchaseMan.inquiry.enName" :title="user.logged ? purchaseMan.inquiry.enName : null">{{[purchaseMan.inquiry.enName, user] | enterpriseFilter}}</div>
             <div class="item" v-else :title="user.logged ? purchaseMan.userName : null">{{[purchaseMan.userName, user] | userNameFilter}}</div>
             <div>{{purchaseMan.date| date}}</div>
           </div>

+ 26 - 5
components/applyPurchase/SayPrice.vue

@@ -64,6 +64,10 @@
               <span><i>*</i>交期:</span>
               <input type="number" class="form-control" placeholder="天数" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime">
             </div>
+            <div class="form-item form-right">
+              <span><i>*</i>税率:</span>
+              <input type="number" class="form-control" placeholder="税率" @input="onTaxrateInput" @blur="onTaxrateBlur" v-model="sayPriceObj.taxrate">%
+            </div>
             <!--<div class="form-item form-upload">
               <label>
                 <span><i>+</i>添加附件</span>
@@ -118,6 +122,7 @@
         sayPriceObj: {
           currency: 'RMB',
           leadtime: '',
+          taxrate: '',
           replies: [
             {
               lapQty: '',
@@ -130,6 +135,7 @@
         },
         validSayPrice: {
           leadtime: false,
+          taxrate: false,
           repliesPrice: false,
           repliesLapQty: false,
           replaceBrand: false,
@@ -186,6 +192,7 @@
           let purchaseMan = JSON.parse(JSON.stringify(this.purchaseManList.content[this.currentSayPriceIndex]))
           this.showLoading = true
           purchaseMan.leadtime = this.sayPriceObj.leadtime
+          purchaseMan.taxrate = this.sayPriceObj.taxrate
           purchaseMan.replies = this.sayPriceObj.replies
           purchaseMan.vendUU = this.user.data.enterprise.uu
           purchaseMan.vendUserUU = this.user.data.userUU
@@ -224,6 +231,7 @@
         this.sayPriceObj = {
           currency: 'RMB',
           leadtime: '',
+          taxrate: '',
           replies: [
             {
               lapQty: '',
@@ -236,6 +244,7 @@
         }
       },
       onLeadtimeInput: function () {
+        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\-?\d.]/g, '')
         if (this.sayPriceObj.leadtime.length > 3) {
           this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
         }
@@ -248,6 +257,20 @@
           this.validSayPrice.leadtime = true
         }
       },
+      onTaxrateInput () {
+        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\-?\d.]/g, '')
+        if (this.sayPriceObj.taxrate.length > 2) {
+          this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
+        }
+      },
+      onTaxrateBlur () {
+        if (!this.sayPriceObj.taxrate || this.sayPriceObj.taxrate < 0 || this.sayPriceObj.taxrate >= 100 || this.sayPriceObj.taxrate.toString().indexOf('.') !== -1) {
+          this.validSayPrice.taxrate = false
+          this.$message.error('税率请填写0-99之间的正整数')
+        } else {
+          this.validSayPrice.taxrate = true
+        }
+      },
       onReplyPriceInput: function (index) {
         let price = this.sayPriceObj.replies[index].price
         if (price >= 10000) {
@@ -318,7 +341,7 @@
             return false
           }
         }
-        return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice && validReplace
+        return this.validSayPrice.leadtime && this.validSayPrice.taxrate && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice && validReplace
       },
       setReplies: function (type, index) {
         if (type === 'add' && this.sayPriceObj.replies.length < 5) {
@@ -471,8 +494,9 @@
           &.form-right {
             position: relative;
             input {
-              width: 104px;
+              width: 110px;
               padding: 0 8px;
+              margin-right:5px;
             }
             select {
               position: absolute;
@@ -497,9 +521,6 @@
                 width: 133px;
               }
             }
-            > i {
-              margin-left: 4px;
-            }
           }
           &.form-long {
             width: 100%;

+ 41 - 36
components/default/RightBar.vue

@@ -4,25 +4,29 @@
       <ul class="right-bar-center">
         <li class="right-bar-item" v-show="storeStatus && storeStatus.uuid">
           <a @click="goShop" class="title" target="_blank">
-            <i class="iconfont icon-dianpu icon-xlg"></i>
+            <i class="iconfont icon-dianpu icon-xlg"></i><br/>
+            <span>店铺</span>
           </a>
-          <div class="sidebar-menu"><a @click="goShop" title="我的店铺" target="_blank">我的店铺</a></div>
+          <!--<div class="sidebar-menu"><a @click="goShop" title="我的店铺" target="_blank">我的店铺</a></div>-->
         </li>
         <li class="right-bar-item" @mouseenter="loadCarCount()" id="shopCar">
           <a @click="goCart" class="title" target="_blank">
-            <i class="iconfont icon-shopping-cart icon-xlg"></i>
+            <i class="iconfont icon-shopping-cart icon-xlg"></i><br/>
+            <span>购物车</span>
           </a>
-          <div class="sidebar-menu"><a @click="goCart" title="我的购物车" target="_blank">我的购物车<em><span>(<span v-text="cartCount.count || 0"></span>)</span></em></a></div>
+          <!--<div class="sidebar-menu"><a @click="goCart" title="我的购物车" target="_blank">我的购物车<em><span>(<span v-text="cartCount.count || 0"></span>)</span></em></a></div>-->
         </li>
         <li class="right-bar-item">
           <a @click="dialogVisible = true" class="title">
-            <i class="iconfont icon-liuyan icon-xlg"></i>
-            <div class="sidebar-menu"><a title="留言板" target="_blank">留言板</a></div>
+            <i class="iconfont icon-liuyan icon-xlg"></i><br/>
+            <span>留言板</span>
+            <!--<div class="sidebar-menu"><a title="留言板" target="_blank">留言板</a></div>-->
           </a>
         </li>
         <li class="right-bar-item contact-menu">
           <a href="http://wpa.qq.com/msgrd?v=3&uin=3432892085&site=www.ubtoc.com&menu=yes" target="_blank" class="title">
-            <i class="iconfont icon-kefu icon-xlg"></i>
+            <i class="iconfont icon-kefu icon-xlg"></i><br/>
+            <span>在线客服</span>
           </a>
           <div class="contact-us sidebar-menu">
             <p>在线客服:<img src="/images/all/songguo.png" /><a href="http://wpa.qq.com/msgrd?v=3&uin=3432892085&site=www.ubtoc.com&menu=yes" class="contact-btn" target="_blank">联系客服</a></p>
@@ -44,30 +48,32 @@
       <ul class="right-bar-bottom">
         <li class="right-bar-item" @mouseenter="loadHistorys()">
           <a @click="goHistory" class="title" target="_blank">
-            <i class="iconfont icon-zuji icon-xlg"></i>
+            <i class="iconfont icon-zuji icon-xlg"></i><br/>
+            <span>浏览历史</span>
           </a>
-          <div class="sidebar-menu" v-if="!user.logged"><a @click="goHistory" title="浏览记录">浏览记录</a></div>
-          <div class="sidebar-menu" v-if="user.logged && listMe(history).length == 0"><a href="/user#/browsingHistory" title="浏览记录">浏览记录</a></div>
-          <div class="foot-record sidebar-menu" v-if="user.logged && listMe(history).length > 0">
-            <h3><a href="/user#/browsingHistory">浏览历史</a></h3>
-            <dl>
-              <dd v-for="item in listMe(history)">
-                  <a :href="'/store/productDetail/' + item.batchCode" target="_blank" :title="item.code" v-text="item.code" v-if="item.status== 1"></a>
-                  <a :title="item.code" v-text="item.code" v-if="item.status== 0" disabled="disabled"></a>
-                  <div class="hover-shows">
-                      <em :class="{ 'off' : item.status== 0}"></em>
-                      <span :class="{ 'off' : item.status== 0}">失效</span>
-                      <a @click="deleteHistory(item,item.id)">&times;</a>
-                  </div>
-              </dd>
-            </dl>
-          </div>
+          <!--<div class="sidebar-menu" v-if="!user.logged"><a @click="goHistory" title="浏览记录">浏览记录</a></div>-->
+          <!--<div class="sidebar-menu" v-if="user.logged && listMe(history).length == 0"><a href="/user#/browsingHistory" title="浏览记录">浏览记录</a></div>-->
+          <!--<div class="foot-record sidebar-menu" v-if="user.logged && listMe(history).length > 0">-->
+            <!--<h3><a href="/user#/browsingHistory">浏览历史</a></h3>-->
+            <!--<dl>-->
+              <!--<dd v-for="item in listMe(history)">-->
+                  <!--<a :href="'/store/productDetail/' + item.batchCode" target="_blank" :title="item.code" v-text="item.code" v-if="item.status== 1"></a>-->
+                  <!--<a :title="item.code" v-text="item.code" v-if="item.status== 0" disabled="disabled"></a>-->
+                  <!--<div class="hover-shows">-->
+                      <!--<em :class="{ 'off' : item.status== 0}"></em>-->
+                      <!--<span :class="{ 'off' : item.status== 0}">失效</span>-->
+                      <!--<a @click="deleteHistory(item,item.id)">&times;</a>-->
+                  <!--</div>-->
+              <!--</dd>-->
+            <!--</dl>-->
+          <!--</div>-->
         </li>
         <li class="right-bar-item">
           <a @click="toTop()" class="title">
-            <i class="iconfont icon-arrow-up icon-xlg"></i>
+            <i class="iconfont icon-arrow-up icon-xlg"></i><br/>
+            <span>返回顶部</span>
           </a>
-          <div class="sidebar-menu"><a @click="toTop()" title="返回顶部" target="_blank">返回顶部</a></div>
+          <!--<div class="sidebar-menu"><a @click="toTop()" title="返回顶部" target="_blank">返回顶部</a></div>-->
         </li>
       </ul>
     </div>
@@ -396,9 +402,8 @@ i {
 .right-bar ul li .sidebar-menu {
   position: absolute;
   display: block;
-  right: -100%;
-  top: 0px;
-  bottom: 0;
+  right: -5px;
+  top: 0;
   width: 100px;
   line-height: 38px;
   height: 38px;
@@ -607,22 +612,22 @@ i {
   padding: 0;
 }
 .right-bar-item {
-  width: 36px;
+  width: 75px;
   /* height: 38px;*/
 }
 .right-bar .right-bar-item a.title {
   display: inline-block;
-  width: 36px;
-  height: 38px;
-  line-height: 38px;
-  padding: 0;
+  width: 75px;
+  height: 75px;
+  line-height: 25px;
+  padding: 15px 0;
 }
 .right-bar {
   position: fixed;
   z-index: 1000;
   right: 0;
   top: 0;
-  width: 36px;
+  width: 75px;
   height: 100%;
 
   .right-bar-center {
@@ -638,7 +643,7 @@ i {
     position: absolute;
     right: 0;
     bottom: 0;
-    width: 36px;
+    width: 75px;
   }
 
   .right-bar-item {

+ 5 - 5
components/error/error.vue

@@ -17,23 +17,23 @@
         <div class="infotext" v-if="title==='店铺' || title==='器件' || title==='物料名称'">您可以逛逛:
           <nuxt-link :to="{ path: '/'}">商城首页</nuxt-link>
           <span>|</span>
-          <nuxt-link :to="{ path: '/provider/factories'}">原厂专区</nuxt-link>
+          <nuxt-link :to="{ path: '/eCommerce/home/factory'}">原厂专区</nuxt-link>
           <span>|</span>
-          <nuxt-link :to="{ path: '/provider/home'}">代理经销</nuxt-link>
+          <nuxt-link :to="{ path: '/eCommerce/home/origin'}">代理经销</nuxt-link>
         </div>
 
         <div class="infotext" v-else-if="title==='品牌'">您可以逛逛:
           <nuxt-link :to="{ path: '/'}">商城首页</nuxt-link>
           <span>|</span>
-          <nuxt-link :to="{ path: '/product/brand/brandList/ABC'}">品牌中心</nuxt-link>
+          <nuxt-link :to="{ path: '/eCommerce/home/brand/?initial=A'}">品牌中心</nuxt-link>
           <span>|</span>
-          <nuxt-link :to="{ path: '/provider/factories'}">原厂专区</nuxt-link>
+          <nuxt-link :to="{ path: '/eCommerce/home/factory'}">原厂专区</nuxt-link>
         </div>
 
         <div class="infotext" v-else-if="title==='产品'">您可以逛逛:
           <nuxt-link :to="{ path: '/'}">商城首页</nuxt-link>
           <span>|</span>
-          <nuxt-link :to="{ path: '/provider/home'}">代理经销</nuxt-link>
+          <nuxt-link :to="{ path: '/eCommerce/home/origin'}">代理经销</nuxt-link>
           <span>|</span>
           <nuxt-link :to="{ name: 'store-uuid', params: { uuid: '33069557578d44e69bd91ad12d28a8d4' }}">库存寄售</nuxt-link>
         </div>

+ 2 - 2
components/home/displayCard.vue

@@ -211,9 +211,9 @@
 <style lang="scss" scoped>
   .display-card{
     position: fixed;
-    right: 56px;
+    right: 80px;
     top: 182px;
-    z-index: 100;
+    z-index: 10000;
     .cardClose{
       position: absolute;
       right: -5px;

+ 1 - 1
components/home/floor/FloorList.vue

@@ -26,7 +26,7 @@
                   <li v-for="(purchaseMan, index) in purchaseManListData.content" :style="'top: -' + 32 * timerIndex + 'px'" :class="{'top': isTop}">
                     <div>{{purchaseMan.date | date}}</div>
                     <div>
-                      <span :title="user.logged ? purchaseMan.inquiry.enterprise.enName : null" v-if="purchaseMan.inquiry && purchaseMan.inquiry.enterprise && purchaseMan.inquiry.enterprise.enName">{{[purchaseMan.inquiry.enterprise.enName, user] | enterpriseFilter}}</span>
+                      <span :title="user.logged ? purchaseMan.inquiry.enName : null" v-if="purchaseMan.inquiry && purchaseMan.inquiry.enName">{{[purchaseMan.inquiry.enName, user] | enterpriseFilter}}</span>
                       <span :title="user.logged ? purchaseMan.userName : null" v-else>{{[purchaseMan.userName, user] | userNameFilter}}</span>
                     </div>
                     <div :title="purchaseMan.inbrand">{{purchaseMan.inbrand || '-'}}</div>

+ 22 - 0
components/mobile/applyPurchase/SayPrice.vue

@@ -79,6 +79,10 @@
               <span>交期(天)</span>
               <input type="text" placeholder="最大值" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime" class="fr">
             </div>
+            <div class="date">
+              <span>税率</span>
+              <input type="text" placeholder="税率" @input="onTaxrateInput" @blur="onTaxrateBlur" v-model="sayPriceObj.taxrate" class="fr">%
+            </div>
             <div style="position: relative;height: 1rem;"></div>
           </div>
         </div>
@@ -98,6 +102,7 @@
         sayPriceObj: {
           currency: 'RMB',
           leadtime: '',
+          taxrate: '',
           replies: [
             {
               lapQty: '',
@@ -110,6 +115,7 @@
         },
         validSayPrice: {
           leadtime: false,
+          taxrate: false,
           repliesPrice: false,
           repliesLapQty: false,
           replaceBrand: false,
@@ -188,6 +194,7 @@
         this.sayPriceObj = {
           currency: 'RMB',
           leadtime: '',
+          taxrate: '',
           replies: [
             {
               lapQty: '',
@@ -215,6 +222,7 @@
           let purchaseMan = JSON.parse(JSON.stringify(this.purchaseDetail))
 //          this.showLoading = true
           purchaseMan.leadtime = this.sayPriceObj.leadtime
+          purchaseMan.taxrate = this.sayPriceObj.taxrate
           purchaseMan.replies = this.sayPriceObj.replies
           purchaseMan.vendUU = this.user.data.enterprise.uu
           purchaseMan.vendUserUU = this.user.data.userUU
@@ -258,6 +266,20 @@
           this.validSayPrice.leadtime = true
         }
       },
+      onTaxrateInput () {
+        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\-?\d.]/g, '')
+        if (this.sayPriceObj.taxrate.length > 2) {
+          this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
+        }
+      },
+      onTaxrateBlur () {
+        if (!this.sayPriceObj.taxrate || this.sayPriceObj.taxrate < 0 || this.sayPriceObj.taxrate >= 100 || this.sayPriceObj.taxrate.toString().indexOf('.') !== -1) {
+          this.validSayPrice.taxrate = false
+          this.$message.error('税率请填写0-99之间的正整数')
+        } else {
+          this.validSayPrice.taxrate = true
+        }
+      },
       onReplyPriceInput: function (index) {
         this.sayPriceObj.replies[index].price = this.sayPriceObj.replies[index].price.replace(/[^\-?\d.]/g, '')
         let price = this.sayPriceObj.replies[index].price

+ 3 - 0
components/mobile/applyPurchase/SayPriceInfo.vue

@@ -96,6 +96,9 @@
                   交期(天):<span>{{item.leadtime}}</span>
                 </div>
               </template>
+              <div class="content-line date">
+                税率%:<span>{{item.taxrate | '-'}}</span>
+              </div>
               <div class="content-line date">
                 报价时间:<span>{{item.offerTime | date}}</span>
               </div>

+ 36 - 1
components/mobile/base/ModalWrapper.vue

@@ -2,7 +2,13 @@
   <div class="mobile-modal" v-if="showModal" @click="$emit('closeAction')">
     <div class="mobile-modal-box mobile-modal-wrapper" @click="stopPropagation($event)">
       <div class="mobile-modal-header" v-if="!noHeader">{{title}}<i @click="$emit('closeAction')" class="icon-guanbi iconfont"></i></div>
-      <div ref="mobileModalBox" class="mobile-scroll-wrap"><div><slot></slot></div></div>
+      <slot name="header"></slot>
+      <div ref="mobileModalBox" class="mobile-scroll-wrap" :style="[ComputedStyle]" >
+        <div>
+          <slot></slot>
+        </div>
+      </div>
+      <slot name="footer"></slot>
     </div>
   </div>
 </template>
@@ -20,6 +26,18 @@
       noHeader: {
         type: Boolean,
         default: false
+      },
+      bgColor: {
+        type: String,
+        default: '#fff'
+      },
+      hasFooter: {
+        type: Boolean,
+        default: false
+      },
+      hasHeader: {
+        type: Boolean,
+        default: false
       }
     },
     watch: {
@@ -41,6 +59,23 @@
         })
       }
     },
+    computed: {
+      ComputedStyle() {
+        if (this.hasFooter) {
+          return {
+            height: '80%',
+            background: this.bgColor,
+            borderBottomLeftRadius: 0,
+            borderBottomRightRadius: 0
+          }
+        } else {
+          return {
+            height: '100%',
+            background: this.bgColor
+          }
+        }
+      }
+    },
     mounted() {
       this.init()
     }

+ 2 - 0
components/mobile/common/PullUp.vue

@@ -4,6 +4,7 @@
 </template>
 <script>
 //  import { scrollTo } from '~utils/scroll'
+function hanlder() {}
   export default {
     data () {
       return {
@@ -38,6 +39,7 @@
       _this.$nextTick(function () {
         let obj = this.fixId ? document.getElementById(this.fixId) : window
         if (obj) {
+          obj.removeEventListener('scroll', hanlder(), false)
           obj.addEventListener('scroll', function () {
             if (_this.isValid) {
               _this.scroll()

+ 18 - 20
nuxt.config.js

@@ -1,19 +1,19 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 // b2c后台
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftchina.com/' : 'http://10.1.51.101:8090/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftchina.com/' : 'http://rb2c.usoftchina.com/')
 // 公共询价
-const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftchina.com/' : 'http://218.17.158.219:24000/')
+const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftchina.com/' : 'http://188.131.128.107:24000/')
 // 公共物料
-const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftchina.com/' : 'http://218.17.158.219:24000/')
+const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftchina.com/' : 'http://188.131.128.107:24002/')
 // 公共cms
-const cmsUrl = process.env.CMS_URL || (isProdMode ? 'http://cms.usoftchina.com' : 'http://cms.usoftchina.com')
+const cmsUrl = process.env.CMS_URL || (isProdMode ? 'http://cms.usoftchina.com' : 'http://cms.usoftchina.com/')
 // 消息
-const messageUrl = process.env.MESSAGE_URL || (isProdMode ? 'https://api-message.ubtob.com/' : 'http://192.168.253.6:24000/message')
+const messageUrl = process.env.MESSAGE_URL || (isProdMode ? 'https://api-message.usoftchina.com/' : 'http://188.131.128.107:24001/')
 // B2B
-const uasUrl = process.env.uasUrl || (isProdMode ? 'http://uas.ubtob.com/' : 'http://192.168.253.12:9000/b2b-test/')
+const uasUrl = process.env.uasUrl || (isProdMode ? 'http://b2b.usoftchina.com/' : 'https://rb2b.usoftchina.com/')
 // 帐户中心
-const ssoUrl = process.env.ssoUrl || (isProdMode ? 'https://sso.ubtob.com/' : 'http://192.168.253.6:32323')
+const ssoUrl = process.env.ssoUrl || (isProdMode ? 'https://sso.usoftchina.com/' : 'http://188.131.128.107:24004/')
 // pcb展示ID
 const pcbId = process.env.pcbId || (isProdMode ? '9612c0a894894c1aabbfe9192749bbfa' : 'shengfang')
 
@@ -78,8 +78,8 @@ module.exports = {
     },
     vendor: [
       'axios',
-      'swiper'
-      // 'element-ui'
+      'swiper',
+      'element-ui'
     ],
     babel: {
       presets: ['es2015', 'stage-2'],
@@ -128,14 +128,11 @@ module.exports = {
       src: '~plugins/vue-empty.js',
       ssr: false
     }, {
-      src: '~plugins/element-ui.js',
-      ssr: true
-    }, {
+      src: '~plugins/element-ui'
+    },
+    {
       src: '~plugins/filters.js',
       ssr: false
-    }, {
-      src: '~plugins/jsonp.js',
-      ssr: false
     }],
   // proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/register/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/store**', '/order/proxy**', '/report/**', '/store/**#/**', '/kdn/**', '/product/**Submit', '/admin**', '/product/**Submit/**', '/release/**', '/auth/store/**', '/produce/**', '/file**', '/rate/**', '/log/**', '/help-service/**', '/keyword/**', '/tip/**', '/UASBatchPutOnProperty**', '/UASBatchPutOnProperty/**']
   /**
@@ -156,6 +153,7 @@ module.exports = {
     '/sale/tender/**': uasUrl,
     '/sale/sample/**': uasUrl,
     '/sale/**': uasUrl,
+    '/vendorDistribute/**': uasUrl,
     '/tender/purc/**': uasUrl,
     '/tender/getUnreadIds/**': uasUrl,
     '/token**': uasUrl,
@@ -164,9 +162,6 @@ module.exports = {
     '/vendor/customer/**': uasUrl,
     '/vendor/info/**': uasUrl,
     '/vendorPerformanceAssess/info/**': uasUrl,
-    // 权限管理
-    '/account/user/**': uasUrl,
-    '/account/role/**': uasUrl,
     '/vendor/**': baseUrl,
     '/vendor**': baseUrl,
     // 账户中心统一前缀
@@ -221,7 +216,7 @@ module.exports = {
     '/goods/**': baseUrl,
     // 公共物料匹配物料名称
     '/productuser/**': materialUrl,
-    '/account/**': baseUrl,
+    // '/account/**': baseUrl,
     '/internalmessage-service/**': baseUrl,
     '/wx/**': baseUrl,
     '/messages**': messageUrl,
@@ -233,6 +228,9 @@ module.exports = {
     // 代办事项
     '/adminToDo/**': baseUrl,
     // 账户中心获取申请绑定列表接口
-    '/api/userspace/apply/**': ssoUrl
+    '/api/userspace/apply/**': ssoUrl,
+    // 权限管理
+    '/account/user/**': uasUrl,
+    '/account/role/**': uasUrl
   }
 }

+ 2 - 1
package.json

@@ -27,7 +27,7 @@
     "vue2-filters": "^0.1.9"
   },
   "scripts": {
-    "dev": "nodemon --exec node -max_old_space_size=4096 server.js",
+      "dev": "nodemon --exec node -max_old_space_size=4096 server.js",
     "analyze": "nuxt build --analyze",
     "dev-build": "nuxt build",
     "dev-start": "node server.js",
@@ -54,6 +54,7 @@
     "eslint-plugin-html": "^2.0.0",
     "eslint-plugin-promise": "^3.4.1",
     "eslint-plugin-standard": "^2.0.1",
+    "mint-ui": "^2.2.13",
     "node-sass": "^4.5.3",
     "sass-loader": "^6.0.6",
     "vue-loader": "^13.3.0"

+ 6 - 6
pages/mobile/center/user/btobarCheck.vue

@@ -36,18 +36,18 @@
         <div v-if="resourceList.content && resourceList.content.length > 0">
           <div class="invoice-btob-list" v-for="item in resourceList.content" :key="item.id">
             <div class="invoice-btob-wrapper-top">
-              日期:<span  style="margin-right: 0.3rem">{{item.date | time}}</span>
+              日期:<span  style="margin-right: 0.3rem">{{item.apDate | time}}</span>
             </div>
             <div class="invoice-btob-wrapper-middle">
-              <div class="invoice-btob-wrapper-middle-title">{{item.vendor.enName}}</div>
+              <div class="invoice-btob-wrapper-middle-title">{{item.custName}}</div>
               <div><span>单据编号:</span><a>{{item.code}}</a></div>
             </div>
             <div class="invoice-btob-wrapper-content">
-              <div><span>对账期间:</span>{{item.fromDate | time}} - {{item.toDate | time}}</div>
+              <div><span>对账期间:</span>{{item.beginDate | time}} - {{item.endDate | time}}</div>
               <div><span>对账总额:</span>{{item.checkAmount | toFixedNum}}</div>
               <div><span>明细条目:</span>{{item.items.length}}条</div>
               <div><span>商品总数:</span>{{item.getTotalProd}}</div>
-              <div><span>对账结果:</span><span v-text="checkStatus(item)"></span></div>
+              <div><span>对账结果:</span><span v-text="item.checkStatus"></span></div>
             </div>
           </div>
         </div>
@@ -245,7 +245,7 @@
           item.checkAmount = item.checkAmount.toFixed(2)
           item.getTotalProd = 0
           item.items.forEach(im => {
-            item.getTotalProd += im.qty
+            item.getTotalProd += im.checkQty
           })
         })
         if (!val[2]) {
@@ -398,7 +398,7 @@
       }
     }
     .btobapCheck-wrapper-scroll {
-      height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem);
+      height: calc(100vh - 1.26rem - 0.98rem  - 1.06rem - 0.92rem);
       overflow-y: auto;
     }
     .filter-wrapper{

+ 215 - 9
pages/mobile/center/user/supplier/index.vue

@@ -2,33 +2,77 @@
   <div class="modal-wrapper-bg">
     <div class="mobile-customer-btob"  style="background: #f1f3f6" id="mobile-customer-btob">
       <div class="search-content mi-search-content">
-        <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="输入企业名称、营业执照号、申请人或审核人">
+        <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="企业名称/营业执照号/申请人/审核人">
         <span @click="onFilter"><i class="iconfont icon-sousuo"></i></span>
       </div>
       <div class="customer-btob-wrapper">
         <div v-if="resourceList.content && resourceList.content.length > 0">
           <div class="customer-btob-wrapper-list" v-for="item in resourceList.content">
             <div class="customer-btob-wrapper-content">
-              <div class="list-item"><span>UU:</span>{{item.vendorEnterprise.uu}}</div>
               <div class="list-item"><span>供应商名称:</span><a>{{item.vendorEnterprise.enName}}</a></div>
-              <div class="list-item"><span>简称:</span><a>{{item.vendorEnterprise.enShortname}}</a></div>
               <div class="address clearfix"><span class="fl">地址:</span><div class="fl" style="width:5.6rem">{{item.vendorEnterprise.enAddress}}</div></div>
               <div class="list-item"><span>联系人:</span>{{item.vendorUser.userName}}</div>
-              <div class="list-item"><span>联系人电话:</span>{{item.vendorUser.userTel}}</div>
+              <div class="list-item"><span>供应商电话:</span>{{item.vendorUser.userTel}}</div>
+              <div class="list-item"><span>采购对接人:</span>
+                <span class="wrap-text">{{item.saleContacts && item.saleContacts.length > 0 ? item.saleContacts.toString() : '待分配'}}</span>
+              </div>
+            </div>
+            <div class="customer-btob-wrapper-bottom clearfix">
+              <div @click="addUserInfo(item)"><i class="iconfont icon-allocation"></i>分配</div>
+              <div @click="transferUserInfo(item)"><i class="iconfont icon-zhuanyi"></i>转移</div>
             </div>
-            <!--<div class="customer-btob-wrapper-bottom clearfix">-->
-              <!--<div @click="addUserInfo(item)"><i class="iconfont icon-allocation"></i>分配</div>-->
-              <!--<div @click="transferUserInfo(item)"><i class="iconfont icon-zhuanyi"></i>转移</div>-->
-            <!--</div>-->
           </div>
         </div>
         <empty-status
           v-else
-          :text="'暂无对应的单据'"
+          :text="'暂无对应的供应商信息!'"
           :showLink="false"
         ></empty-status>
       </div>
     </div>
+    <div class="mobile-modal" v-if="modalObj.showModal" @click="closeModal()">
+      <div class="mobile-modal-box mobile-modal-wrapper" @click="stopPropagation($event)">
+        <div class="mobile-modal-header">{{modalObj.type === 'add' ? '客户分配' : '权限转移'}}<i @click="closeModal()" class="icon-guanbi iconfont"></i></div>
+        <div ref="mobileModalBox" class="mobile-scroll-wrap">
+          <div>
+            <div class="customer-modal-wrapper">
+              <div class="search-content mi-search-content">
+                <input type="text" v-model="modalObj.keyword" @input="modalObjonFilter" placeholder="输入用户UU">
+                <span @click="modalObjonFilter"><i class="iconfont icon-sousuo"></i></span>
+              </div>
+              <div class="customer-modal-content">
+                <div class="customer-modal-content-title">
+                  <span class="item inline-block"  style="width: 28%;" @click="chooseAll()"  v-if="modalObj.type === 'add'">
+                    <label class="mobile-cart-check" :class="{'active': !Allcheck}"></label>
+                    全选
+                  </span>
+                  <span class="item inline-block"  style="width: 28%;height:2px" v-else>
+
+                  </span>
+                  <span class="item inline-block" style="width: 32%;">用户UU</span>
+                  <span class="item inline-block" style="width: 40%;text-align: center">用户名称</span>
+                </div>
+                <div class="customer-modal-content-list" v-for="item in modalObj.showModalList">
+                  <span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
+                    <label class="mobile-cart-check" :class="{'active': item.distribute}" v-if="modalObj.type === 'add'"></label>
+                    <label class="mobile-cart-check" :class="{'active': item.transfer}" v-else></label>
+                    <!--<label class="mobile-cart-check" :class="{'active': item.distribute}"></label>-->
+                  </span>
+                  <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
+                  <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="customer-modal-bottom clearfix">
+            <div class="fl" @click="answerModal()">确定</div>
+            <div class="fr" @click="closeModal()">取消</div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     <pull-up :fixId="'mobile-customer-btob'" :allPage="allPage" :page="filterParams.page" @pullUpAction="onPullUpAction"></pull-up>
   </div>
 </template>
@@ -47,21 +91,129 @@
           count: 10,
           page: 1
         },
+        collectResult: '',
+        timeoutCount: 0,
         resourceList: {
           content: []
         },
         enabled: '',
+        modalObj: {
+          customer: {},
+          showModal: false,
+          showModalList: [], // 筛选完的数据
+          type: 'add', // chance
+          originList: [] // 原数据
+        },
+        transfer: false,
         thisUser: {}
       }
     },
     created() {
+      this.$http.get('/account/role/currentRole').then(res => {
+        this.thisUser = this.$store.state.option.user.data
+        this.enabled = res.data.count > 0 || this.thisUser.sys
+      })
       this.setSelect()
     },
 
     methods: {
+      async answerModal() {
+        if (this.modalObj.type !== 'add') {
+          this.$http.post(`/vendorDistribute/bindUserToVendor/${this.modalObj.customer.id}`, this.modalObj.originList).then(data => {
+            this.onMind('转移成功!')
+            this.closeModal()
+            this.setSelect(true)
+          }, err => {
+            this.onMind(err.response.data)
+            this.closeModal()
+          })
+        } else {
+          this.$http.post(`/vendorDistribute/bindVendor/${this.modalObj.customer.id}`, this.modalObj.originList).then(res => {
+            this.onMind('分配成功!')
+            this.closeModal()
+            this.setSelect(true)
+          }).catch(err => {
+            this.onMind('保存失败!')
+            this.closeModal()
+          })
+        }
+      },
+      chooseAll() {
+        let _str = 'distribute'
+        if (this.modalObj.type !== 'add') {
+          _str = 'transfer'
+        }
+        if (!this.Allcheck) {
+          this.modalObj.showModalList.forEach(item => {
+            item[_str] = false
+          })
+          return
+        }
+        this.modalObj.showModalList.forEach(item => {
+          item[_str] = true
+        })
+      },
+      checkItem(item) {
+        if (this.modalObj.type !== 'add') {
+          if (this.$store.state.option.user.data.sys) { // 管理员操作
+            item.transfer = !item.transfer
+            this.modalObj.originList.forEach(userInfo => {
+              if (this.$store.state.option.user.data.userUU === item.userUU && item.transfer) {
+                this.transfer = true
+              }
+              if (item.userUU !== userInfo.userUU) {
+                userInfo.transfer = false
+              }
+            })
+          } else if (this.transfer) { // 被管理员转移权限的非管理员操作
+            item.transfer = !item.transfer
+            this.modalObj.originList.forEach(userInfo => {
+              if (item.userUU !== userInfo.userUU) {
+                userInfo.transfer = false
+              } else {
+                userInfo.transfer = true
+              }
+            })
+          } else { // 被分配客户的用户
+            item.transfer = !item.transfer
+            this.modalObj.originList.forEach(userInfo => {
+              if (item.userUU !== userInfo.userUU) {
+                userInfo.transfer = false
+              } else {
+                userInfo.transfer = true
+              }
+            })
+          }
+        } else {
+          item.distribute = !item.distribute
+        }
+      },
+      closeModal() {
+        this.modalObj.showModal = false
+        this.initScroll.destroy()
+        this.initScroll = null
+      },
+      modalObjonFilter() {
+        let _arr = []
+        this.modalObj.originList.forEach(item => {
+          if (item.userUU.toString().indexOf(this.modalObj.keyword) > -1) {
+            _arr.push(item)
+          }
+        })
+        this.modalObj.showModalList = _arr
+      },
+      init () {
+        this.$nextTick(() => {
+          this._initscroll()
+        })
+      },
       onFilter() {
         this.setSelect(true)
       },
+      onMind(str) {
+        this.collectResult = str
+        this.timeoutCount++
+      },
       onPullUpAction() {
         this.filterParams.page++
         this.setSelect()
@@ -85,11 +237,57 @@
         }
         this.resourceList = data
         data = null
+      },
+      // 分配
+      async addUserInfo(customer) {
+        this.modalObj.type = 'add'
+        this.modalObj.customer = customer
+        this.$http.post(`/vendorDistribute/${customer.id}`).then(res => {
+          if (this.enabled || res.data) {
+            this.modalObj.showModal = true
+            this.modalObj.showModalList = res.data
+            this.modalObj.originList = res.data
+            this.init()
+          } else {
+            this.onMind('您没有当前客户分配用户的权限!')
+          }
+        }, err => {
+          this.onMind(err.response.data)
+        })
+      },
+      // 转移
+      transferUserInfo(customer) {
+        this.modalObj.type = 'chance'
+        this.modalObj.customer = customer
+        this.$http.post(`/vendorDistribute/${customer.id}`).then(res => {
+          if (this.enabled || res.data) {
+            this.$http.get('/authentication').then(res => {
+              this.thisUser = res.data
+            })
+            this.modalObj.showModal = true
+            this.modalObj.showModalList = res.data
+            this.modalObj.originList = res.data
+            this.init()
+          } else {
+            this.onMind('您没有当前客户转移用户的权限!')
+          }
+        }, err => {
+          this.onMind(err.response.data)
+        })
       }
     },
     computed: {
       allPage() {
         return this.resourceList.totalPage
+      },
+      Allcheck() {
+        let _str = 'distribute'
+        if (this.modalObj.type !== 'add') {
+          _str = 'transfer'
+        }
+        return this.modalObj.showModalList.some(item => {
+          return item[_str] === false
+        })
       }
     },
     components: {
@@ -177,6 +375,14 @@
           }
           span {
             color: #666666;
+            &.wrap-text{
+              width: 4.5rem;
+              white-space: normal;
+              display: inline-block;
+              word-wrap: break-word;
+              word-break: break-all;
+              vertical-align: top;
+            }
           }
         }
       }

+ 406 - 57
pages/mobile/center/vendor/btobapCheck.vue

@@ -17,58 +17,159 @@
         </div>
       </div>
       <div class="order-nav">
-        <div :class="activeType === 'all' ? 'active': ''" @click="ChangeList('all')"><span>全部</span></div>
+        <div :class="activeType === 'all' ? 'active': ''" @click="ChangeList('all')"><span>未对账</span></div>
+        <div :class="activeType === 'todo' ? 'active' : ''" @click="ChangeList('todo')"><span>待确认</span></div>
         <div :class="activeType === 'done' ? 'active': ''" @click="ChangeList('done')"><span>已确认</span></div>
-        <div :class="activeType === 'todo' ? 'active' : ''" @click="ChangeList('todo')"><span>未对账</span></div>
         <div :class="activeType === 'end' ? 'active' : ''" @click="ChangeList('end')"><span>已作废</span></div>
       </div>
-      <div class="search-content mi-search-content">
-        <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="单据编号/客户名称/物料名称">
-        <span @click="onFilter"><i class="iconfont icon-sousuo"></i></span>
-      </div>
-      <div class="btobapCheck-wrapper-scroll" id="btobapCheck-wrapper-scroll">
-        <div class="filter-wrapper">
-          <base-filter
-            v-for="filterOption in filterOptions"
-            :key="filterOption.selectOption"
-            :selectItems="filterOption.selectItems"
-            :defaultVal="filterOption.defaultVal"
-            :selectOption="filterOption.selectOption"
-            @selectAction="onSelectAction"
-            @valueAction="onValueAction"
-            :title="filterOption.title">
-          </base-filter>
+      <div v-show="activeType !== 'all'">
+        <div class="search-content mi-search-content">
+          <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="单据编号/客户名称/物料名称">
+          <span @click="onFilter"><i class="iconfont icon-sousuo"></i></span>
         </div>
-        <div v-if="resourceList.content && resourceList.content.length > 0">
-          <div class="invoice-btob-list" v-for="item in resourceList.content" :key="item.id">
-            <div class="invoice-btob-wrapper-top">
-              <span class="read" v-if="!isUnread(item.id)" style="margin-right: 0.3rem">已读</span>
-              <span class="noread" v-if="isUnread(item.id)" style="margin-right: 0.3rem">未读</span>
-              <span  style="margin-right: 0.3rem">{{item.recordDate | time}}</span>
-              <span class="isPut" v-if="item.status">已提交</span>
-              <span class="noPut" v-else>未提交</span>
-            </div>
-            <div class="invoice-btob-wrapper-middle">
-              <div class="invoice-btob-wrapper-middle-title">{{item.custName}}</div>
-              <div @click="lookDetails(item.id)"><span>单据编号:</span><a>{{item.code}}</a></div>
+        <div class="btobapCheck-wrapper-scroll" id="btobapCheck-wrapper-scroll">
+          <div class="filter-wrapper">
+            <base-filter
+              v-for="filterOption in filterOptions"
+              :key="filterOption.selectOption"
+              :selectItems="filterOption.selectItems"
+              :defaultVal="filterOption.defaultVal"
+              :selectOption="filterOption.selectOption"
+              @selectAction="onSelectAction"
+              @valueAction="onValueAction"
+              :title="filterOption.title">
+            </base-filter>
+          </div>
+          <div v-if="resourceList.content && resourceList.content.length > 0">
+            <div class="invoice-btob-list" v-for="item in resourceList.content" :key="item.id">
+              <div class="invoice-btob-wrapper-top">
+                <span class="read" v-if="!isUnread(item.id)" style="margin-right: 0.3rem">已读</span>
+                <span class="noread" v-if="isUnread(item.id)" style="margin-right: 0.3rem">未读</span>
+                <span  style="margin-right: 0.3rem">{{item.recordDate | time}}</span>
+                <span class="isPut" v-if="item.status">已提交</span>
+                <span class="noPut" v-else>未提交</span>
+              </div>
+              <div class="invoice-btob-wrapper-middle">
+                <div class="invoice-btob-wrapper-middle-title">{{item.custName}}</div>
+                <div @click="lookDetails(item.id)"><span>单据编号:</span><a>{{item.code}}</a></div>
+              </div>
+              <div class="invoice-btob-wrapper-content">
+                <div><span>对账期间:</span>{{item.beginDate | time}} - {{item.endDate | time}}</div>
+                <div><span>对账金额:</span>{{isUser ? '-' : item.checkAmount}}</div>
+                <div><span>明细条目:</span>{{item.items && item.items.length}}条</div>
+                <div><span>商品总数:</span>{{item.getTotalProd}}</div>
+                <div><span>对账结果:</span>{{item.checkStatus}}</div>
+              </div>
             </div>
-            <div class="invoice-btob-wrapper-content">
-              <div><span>对账期间:</span>{{item.beginDate | time}} - {{item.endDate | time}}</div>
-              <div><span>对账金额:</span>{{isUser ? '-' : item.checkAmount}}</div>
-              <div><span>明细条目:</span>{{item.items.length}}条</div>
-              <div><span>商品总数:</span>{{item.getTotalProd}}</div>
-              <div><span>对账结果:</span>{{item.checkStatus}}</div>
+          </div>
+          <empty-status
+            v-else
+            :text="'暂无对账信息'"
+            :showLink="false"
+          ></empty-status>
+          <pull-up :fixId="'btobapCheck-wrapper-scroll'" :allPage="allPage" :page="filterParams.page" @pullUpAction="onPullUpAction"></pull-up>
+        </div>
+      </div>
+
+      <div v-show="activeType === 'all'">
+        <div class="search-content mi-search-content">
+          <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="客户名称">
+          <span @click="onFilter"><i class="iconfont icon-sousuo"></i></span>
+        </div>
+        <div class="btobapCheck-wrapper-scroll" id="btobapCheck-wrapper-scroll2">
+          <div v-if="resourceList.content && resourceList.content.length > 0">
+            <div class="invoice-btob-list" v-for="item in resourceList.content" :key="item.id">
+              <div class="invoice-btob-wrapper-middle" style="border-top: 0">
+                <div class="invoice-btob-wrapper-middle-title">{{item.myEnterprise && item.myEnterprise.enName}}</div>
+              </div>
+              <div class="invoice-btob-wrapper-middle">
+                <div v-if="item.lastCheckDate"><span>上次对账日期:{{item.lastCheckDate | time}}</span></div>
+                <div v-else><span>上次对账日期:-</span></div>
+                <div><span>未对账总额:{{item.uncheckedCount || '-'}}</span></div>
+              </div>
+              <div class="invoice-btob-wrapper-middle" @click="showApcheckList(item)">
+                <div class="middle_btn">立即对账</div>
+              </div>
             </div>
           </div>
+          <empty-status
+            v-else
+            :text="'暂无对账信息'"
+            :showLink="false"
+          ></empty-status>
+          <pull-up :fixId="'btobapCheck-wrapper-scroll2'" :allPage="allPage" :page="filterParams.page" @pullUpAction="onPullUpAction"></pull-up>
         </div>
-        <empty-status
-          v-else
-          :text="'暂无对账信息'"
-          :showLink="false"
-        ></empty-status>
-        <pull-up :fixId="'btobapCheck-wrapper-scroll'" :allPage="allPage" :page="filterParams.page" @pullUpAction="onPullUpAction"></pull-up>
       </div>
     </div>
+
+    <modal-wrapper :title="isShowApcheckList.enName" :showModal="isShowApcheckList.show" @closeAction="isShowApcheckList.show = false" :bgColor="'#f1f3f6'" :hasFooter="true">
+      <div slot="header" class="modal-h">
+         <span class="item inline-block" @click="checkAll()">
+            <label class="mobile-cart-check" :class="{active: !isCheckAll}"></label>
+         </span>
+        <span class="inline-block overflowhidden">
+          当前客户:深圳优软商城科技有限公司大公司哦12314
+        </span>
+        <div @click="isShowMonthChoose=true" style="text-indent: 0.12rem">{{isShowApcheckList.thisMonth}}<i class="iconfont icon-arrow-down" style="font-size: 0.3rem"></i></div>
+        <!--<input type="month" v-model="isShowApcheckList.thisMonth" @change="showApcheckList()"/>-->
+      </div>
+      <div class="btobapCheck-modal">
+        <div class="choosescreen-result">
+          <div v-if="isShowApcheckList.list.length > 0">
+          <div class="clearfix choosescreen-result-list" v-for="(item, index) in isShowApcheckList.list">
+            <div>
+              <div class="choosescreen-result-list-content">
+                <div style="border-bottom: 1px solid #D3D3D3;padding-bottom: 0.2rem">
+                  <span class="item inline-block" @click="checkItem(item, index)">
+                    <label class="mobile-cart-check" :class="{active: item.check}"></label>
+                  </span>
+                  <div class="inline-block" style="margin-left: 0.15rem">
+                    <div class="OverHidden">序号:<span>{{index + 1}}</span></div>
+                    <!--<div class="OverHidden">本次对账数:<span>{{item.thischeckqty}}</span></div>-->
+                    <div class="OverHidden">单据编号:<span>{{item.inoutno}}</span></div>
+                    <div class="OverHidden">类型:<span>{{item.piclass}}</span></div>
+                    <div class="OverHidden">单据日期:<span>{{item.pidate | time}}</span></div>
+                  </div>
+                </div>
+                <div style="padding-top: 0.2rem">
+                  <span class="item inline-block" style="opacity: 0">
+                    <label class="mobile-cart-check"></label>
+                  </span>
+                  <div class="inline-block" style="margin-left: 0.15rem">
+                    <div class="OverHidden">客户采购单:<span>{{item.ordercode}}</span></div>
+                    <div class="OverHidden">发货单号:<span>{{item.sendcode}}</span></div>
+                    <div class="OverHidden">客户料号:<span>{{item.prodcode}}</span></div>
+                    <div class="OverHidden">客户物料名称:<span>{{item.prodtitle}}</span></div>
+                    <div class="OverHidden">客户规格型号:<span>{{item.prodspec}}</span></div>
+                    <div class="OverHidden">税率:<span>{{item.taxrate}}%</span></div>
+                    <div class="OverHidden">数量:<span>{{item.qty}}</span></div>
+                    <div class="OverHidden">单价:<span>{{item.currency}}:{{item.orderprice}}</span></div>
+                    <!--<div class="OverHidden">金额:<span>{{}}</span></div>-->
+                  </div>
+                </div>
+              </div>
+              <div class="clearfix" style="border-top:1px solid #D9D9D9;padding: 0 0.15rem;line-height: 0.8rem">
+                <div class="fl" style="font-size: 0.26rem">小计:</div>
+                <div class="fr" style="color: #FF3208;font-size: 0.26rem">{{(item.qty || 0) * (item.orderprice || 0) | computeNum(2)}}</div>
+              </div>
+            </div>
+          </div>
+          </div>
+          <empty-status
+            v-else
+            :text="'暂无对账信息'"
+            :showLink="false"
+          ></empty-status>
+        </div>
+      </div>
+      <div slot="footer" class="footerBtn clearfix">
+         <span class="item inline-block" @click="checkAll()">
+            <label class="mobile-cart-check" :class="{active: !isCheckAll}"></label>全选
+         </span>
+        <!--<div class="fr bbgoresult" @click="goTopayfor">结算</div>-->
+        <div class="fr" style="margin-right: 0.2rem">合计:<a style="color: #001408;">{{allMoney}}</a></div>
+      </div>
+    </modal-wrapper>
     <modal-wrapper :title="'新增对账单'" :showModal="showModal" @closeAction="showModal = false">
       <div class="btobapCheck-modal">
         <div class="search-content mi-search-content">
@@ -131,17 +232,72 @@
         </div>
       </div>
     </modal-wrapper>
+    <div class="fixedPicker" v-show="isShowMonthChoose">
+      <picker :slots="slots" @change="onValuesChange" :showToolbar="true" ref="picker">
+        <div class="titls">选择当前时间</div>
+        <div class="leftBtn" @click="isShowMonthChoose=false">取消</div>
+        <div class="rightBtn" @click="resultMonth">确定</div>
+      </picker>
+    </div>
   </div>
 </template>
 
 <script>
+  import { Picker } from 'mint-ui'
   import { ModalWrapper, BaseFilter } from '~components/mobile/base'
   import { PullUp, EmptyStatus } from '~components/mobile/common'
+  function years() {
+    let arr = []
+    let num = 1989
+    for (let i = 0; i < 99; i++) {
+      num++
+      arr.push(num + '年')
+    }
+    return arr
+  }
+  function getMonth() {
+    let sdateTo = new Date()
+    console.log(sdateTo.getMonth() - 1)
+    return sdateTo.getMonth() - 1
+  }
+  function getYear() {
+    let num = 1989
+    let sdateTo = new Date()
+    let _year = sdateTo.getFullYear()
+    for (let i = 0; i < 99; i++) {
+       num++
+       if (num === Number(_year)) {
+         num = i
+         break
+       }
+    }
+    return num
+  }
   export default {
     layout: 'mobileNoHeader',
     middleware: 'authenticated',
     data() {
       return {
+        isShowMonthChoose: false,
+        slots: [
+          {
+            flex: 1,
+            values: years(),
+            className: 'slot1',
+            textAlign: 'center',
+            defaultIndex: getYear()
+          }, {
+            divider: true,
+            content: '-',
+            className: 'slot2'
+          }, {
+            flex: 1,
+            values: ['01月', '02月', '03月', '04月', '05月', '06月', '07月', '08月', '09月', '10月', '11月', '12月'],
+            className: 'slot3',
+            textAlign: 'center',
+            defaultIndex: getMonth()
+          }
+        ],
         activeType: 'all',
         filterParams: {
           keyword: '',
@@ -175,16 +331,50 @@
         unreadCode: [],
         showModal: false,
         dateObj: {},
-        screenObj: {}
+        screenObj: {},
+        isShowApcheckList: {
+          show: false,
+          enName: '深圳市优软科技有限公司',
+          thisMonth: '',
+          list: [{
+            qty: 1,
+            orderprice: 20
+          }, {
+            qty: 3,
+            orderprice: 20
+          }]
+        }
       }
     },
     created() {
       this.$http.get('/account/role/isUser').then(res => {
         this.isUser = res.data.isUser
       })
-     this.getUnread()
+      this.getUnread()
+      let sdateTo = new Date()
+      this.isShowApcheckList.thisMonth = sdateTo.getFullYear() + '-' + sdateTo.getMonth()
     },
+    // mounted() {
+    //   this.$nextTick(() => {
+    //     this.$refs.picker.change()
+    //   })
+    // },
     methods: {
+      onValuesChange(picker, value) {
+        // console.log(picker.getValues())
+        if (!this.$value) {
+          picker.setSlotValue(0, '2018年')
+          picker.setSlotValue(1, '11月')
+        }
+        let _ns = value[0].replace('年', '')
+        let _my = value[1].replace('月', '')
+        this.$value = _ns + '-' + _my
+      },
+      resultMonth() {
+        this.isShowMonthChoose = false
+        this.isShowApcheckList.thisMonth = this.$value
+          this.showApcheckList()
+      },
       addApCheck() {
         this.showModal = true
       },
@@ -260,26 +450,85 @@
         this.$selectObj = selectObj
         this.setSelect(selectObj.key, selectObj.value, true)
       },
+      // B2B未对账
+      // NotapCheck () {
+      //   console.log('未对账')
+      // },
+      // 未对账详情
+      showApcheckList(item) {
+        this.isShowApcheckList.show = true
+        this.isShowApcheckList.enName = item ? item.myEnterprise.enName : this.isShowApcheckList.enName
+        this.$http.get('/sale/apCheck/getAllByKeywords', {
+          params: {
+            checkDate: this.isShowApcheckList.thisMonth,
+            suuorname: item ? item.myEnterprise.enName : this.isShowApcheckList.enName
+          }
+        }).then(res => {
+          res.data.forEach(item => {
+            item.check = true
+          })
+          this.isShowApcheckList.list = res.data
+          this.$nextTick(() => {
+            this._initscroll()
+          })
+        })
+      },
+      checkAll() {
+        let fl = true
+        if (this.isCheckAll === 0) {
+          fl = false
+        }
+        this.isShowApcheckList.list.forEach(item => {
+          item.check = fl
+        })
+      },
+      checkItem(item, index) {
+        if (item.check) {
+          item.check = false
+        } else {
+          this.$set(this.isShowApcheckList.list[index], 'check', true)
+        }
+      },
+      goTopayfor() {
+        console.log('结算')
+      },
       async setSelect(...val) {
-        let { data } = await this.$http.get('/sale/apCheck/info/search', {
+        let _url = '/sale/apCheck/info/search'
+        let itemL = {
           params: {
             count: this.filterParams.count,
             page: this.filterParams.page,
             searchFilter: {'keyword': this.filterParams.keyword || '', 'fromDate': val[1].fromDate, 'endDate': val[1].toDate},
             sorting: {'recordDate': 'desc'},
             _state: this.activeType
-          }})
+          }
+        }
+        if (this.activeType === 'all') {
+           _url = '/sale/apCheck/customer'
+          itemL = {
+            params: {
+              count: 20,
+              page: 1,
+              keyword: this.filterParams.keyword,
+              searchFilter: {'fromDate': null, 'endDate': 1543981513949},
+              sorting: { 'recordDate': 'desc' }
+            }
+          }
+        }
+        let { data } = await this.$http.get(_url, itemL)
         if (!this.resourceList.content) {
           this.resourceList.content = []
         }
         data.content = data.content || []
-        data.content.forEach(item => {
-          item.checkAmount = item.checkAmount.toFixed(2)
-          item.getTotalProd = 0
-          item.items.forEach(im => {
-            item.getTotalProd += im.checkQty
+        if (this.activeType !== 'all') {
+          data.content.forEach(item => {
+            item.checkAmount = item.checkAmount.toFixed(2)
+            item.getTotalProd = 0
+            item.items.forEach(im => {
+              item.getTotalProd += im.checkQty
+            })
           })
-        })
+        }
         if (!val[2]) {
           this.resourceList.content.push(...data.content)
           data.content = this.resourceList.content
@@ -295,13 +544,31 @@
       },
       isEmpty () {
         return this.resourceList.content.length === 0
+      },
+      allMoney() {
+        let sum = 0
+        this.isShowApcheckList.list.forEach(obj => {
+          if (obj.check) {
+            sum += obj.qty * obj.orderprice
+          }
+        })
+        return sum
+      },
+      isCheckAll() {
+        if (this.isShowApcheckList.list.length === 0) {
+          return true
+        }
+        return this.isShowApcheckList.list.filter(item => {
+          return item.check === false
+        }).length
       }
     },
     components: {
       ModalWrapper,
       BaseFilter,
       PullUp,
-      EmptyStatus
+      EmptyStatus,
+      Picker
     },
     filters: {
       time: function (time) {
@@ -316,6 +583,9 @@
             return year + '-' + month + '-' + day
           }
         }
+      },
+      computeNum: function(price, num) {
+        return price.toFixed(num)
       }
     }
   }
@@ -327,6 +597,41 @@
     text-overflow: ellipsis;
     white-space: nowrap;
   }
+  .fixedPicker {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 9999;
+    background: rgba(0,0,0,0.5);
+    .picker {
+      width: 100%;
+      left: 0;
+      bottom: 0;
+      position: absolute;
+      background: #fff;
+    }
+    .titls {
+      text-align: center;
+      font-size: 0.24rem;
+      line-height: 0.5rem
+    }
+    .leftBtn {
+      color: #666;
+      font-size: 0.24rem;
+      position: absolute;
+      left: 0.2rem;
+      top: 0.1rem
+    }
+    .rightBtn {
+      top: 0.1rem;
+      color: #3e82f5;
+      font-size: 0.24rem;
+      position: absolute;
+      right: 0.2rem;
+    }
+  }
   .mobile-header{
     position: fixed;
     top: 0;
@@ -486,6 +791,11 @@
       .invoice-btob-wrapper-middle .tilte{
         color: #333333;
       }
+      .middle_btn {
+        text-align: center;
+        font-size: 0.26rem;
+        color: #333333;
+      }
     }
     .invoice-btob-wrapper-content {
       border-top: 1px solid #D9D9D9;
@@ -583,12 +893,16 @@
       }
     }
     .choosescreen-result {
-      margin: 0 0.15rem 0.2rem;
+      .choosescreen-result-list {
+        /*padding: 0 0.15rem 0rem;*/
+        background: #fff;
+        margin:0 0 0.2rem;
+      }
       .choosescreen-result-list-content {
-        display: inline-block;
+        /*display: inline-block;*/
         vertical-align: middle;
-        margin-left: 0.15rem;
-        div {
+        margin: 0 0.15rem;
+        div.OverHidden {
           @include overFlowHidden();
           width: 5.5rem;
         }
@@ -603,4 +917,39 @@
       }
     }
   }
+  .modal-h {
+    background: #F3F3F3;
+    padding: 0.15rem;
+    .overflowhidden {
+      @include overFlowHidden();
+      width: 4.1rem;
+      font-size: 0.28rem;
+      color: #333333;
+      margin: 0 0.1rem;
+    }
+    div {
+      background: #FFFFFF;
+      border: 1px solid #BFBFBF;
+      border-radius: 4px;
+      font-size: 0.28rem;
+      color: #3E81F6;
+      width: 1.7rem;
+      display: inline-block;
+    }
+  }
+  .footerBtn {
+    padding: 0 0 0 0.15rem;
+    height: 1rem;
+    line-height: 1rem;
+    background: #fff;
+    font-size: 0.26rem;
+    color: #666666;
+    border-top: 1px solid #D3D3D3;
+    .bbgoresult {
+      background: #008BF7;
+      color: #fff;
+      width: 1.3rem;
+      text-align: center;
+    }
+  }
 </style>

+ 56 - 19
pages/mobile/center/vendor/customer/index.vue

@@ -19,12 +19,13 @@
         <div v-if="resourceList.content && resourceList.content.length > 0">
           <div class="customer-btob-wrapper-list" v-for="(item, index) in resourceList.content">
             <div class="customer-btob-wrapper-content">
-              <div class="list-item"><span>UU:</span>{{item.myEnterprise.uu}}</div>
               <div class="list-item"><span>客户名称:</span><a>{{item.myEnterprise.enName}}</a></div>
               <div class="address clearfix"><span class="fl">地址:</span><div class="fl" style="width:5.6rem">{{item.myEnterprise.enAddress}}</div></div>
               <div class="list-item"><span>客户联系人:</span>{{item.myUser.userName}}</div>
-              <div class="list-item"><span>联系人电话:</span>{{item.myUser.userTel}}</div>
-              <div class="list-item"><span>我方联系人:</span>{{item.vendorUser.userName}}</div>
+              <div class="list-item"><span>客户电话:</span>{{item.myUser.userTel}}</div>
+              <div class="list-item"><span>业务对接人:</span>
+                <span class="wrap-text">{{item.purchaseContacts && item.purchaseContacts.length > 0 ? item.purchaseContacts.toString() : '-'}}</span>
+              </div>
             </div>
             <div class="customer-btob-wrapper-bottom clearfix">
               <div @click="addUserInfo(item)"><i class="iconfont icon-allocation"></i>分配</div>
@@ -34,7 +35,7 @@
         </div>
         <empty-status
           v-else
-          :text="'暂无对应的单据'"
+          :text="'暂无对应的客户信息!'"
           :showLink="false"
         ></empty-status>
       </div>
@@ -61,15 +62,43 @@
                   <span class="item inline-block" style="width: 32%;">用户UU</span>
                   <span class="item inline-block" style="width: 40%;text-align: center">用户名称</span>
                 </div>
-                <div class="customer-modal-content-list" v-for="item in modalObj.showModalList" v-if="item.userUU !== thisUser.userUU">
+                <template v-if="modalObj.type === 'add'">
+                  <!-- 客户分配数据  -->
+                  <div class="customer-modal-content-list" v-for="item in modalObj.showModalList">
                   <span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
-                    <label class="mobile-cart-check" :class="{'active': item.distribute}" v-if="modalObj.type === 'add'"></label>
-                    <label class="mobile-cart-check" :class="{'active': item.transfer}" v-else></label>
-                    <!--<label class="mobile-cart-check" :class="{'active': item.distribute}"></label>-->
+                    <label class="mobile-cart-check" :class="{'active': item.distribute}"></label>
                   </span>
-                  <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
-                  <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
-                </div>
+                    <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
+                    <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
+                  </div>
+                </template>
+
+                <template v-else>
+                  <!-- 客户转移 && 当前用户是管理员时 -->
+                  <div class="customer-modal-content-list" v-for="item in modalObj.showModalList" v-if="thisUser.sys">
+                  <span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
+                    <label class="mobile-cart-check" :class="{'active': item.transfer}"></label>
+                  </span>
+                    <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
+                    <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
+                  </div>
+                  <!-- 客户转移 && 当前用户是被管理员转移权限时 -->
+                  <div class="customer-modal-content-list" v-for="item in modalObj.showModalList" v-if="!thisUser.sys && thisUser.transfer">
+                  <span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
+                    <label class="mobile-cart-check" :class="{'active': item.transfer}"></label>
+                  </span>
+                    <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
+                    <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
+                  </div>
+                  <!-- 客户转移 && 当前用户是非管理员,但有查看权限时 -->
+                  <div class="customer-modal-content-list" v-for="item in modalObj.showModalList" v-if="(!thisUser.sys && !thisUser.transfer) && !item.distribute ">
+                  <span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
+                    <label class="mobile-cart-check" :class="{'active': item.transfer}"></label>
+                  </span>
+                    <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
+                    <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
+                  </div>
+                </template>
               </div>
             </div>
           </div>
@@ -134,8 +163,9 @@
                 this.$http.post(`/account/user/transferUserToVendor/${this.modalObj.customer.myEnterprise.uu}`, this.modalObj.originList).then(data => {
                   this.onMind('转移成功!')
                   this.closeModal()
+                  this.setSelect(true)
                 }, err => {
-                  this.onMind(err.data)
+                  this.onMind(err.response.data)
                   this.closeModal()
                 })
               // } else {
@@ -153,14 +183,13 @@
                 this.onMind('您未选择权限转移对象!')
                 this.closeModal()
               } else {
-                this.$http.post(`/account/user/transferMyDistribute`, {
-                  custUU: this.modalObj.customer.myEnterprise.uu,
-                  userUU: this.target.userUU
-                }).then(data => {
+                this.$http.post(`/account/user/transferMyDistribute?custUU=${this.modalObj.customer.myEnterprise.uu}&userUU=${this.target.userUU}`, {})
+                  .then(data => {
                   this.onMind('转移成功!')
                   this.closeModal()
+                  this.setSelect(true)
                 }, err => {
-                  this.onMind(err.data)
+                  this.onMind(err.response.data)
                   this.closeModal()
                 })
               }
@@ -262,7 +291,7 @@
                 this.init()
             })
           } else {
-            this.onMind('您没有当前客户分配用户的权限!')
+            this.onMind('您没有当前客户分配用户的权限!')
           }
         })
       },
@@ -289,7 +318,7 @@
               this.init()
             })
           } else {
-            this.onMind('您没有为当前客户分配用户的权限!')
+            this.onMind('您没有当前客户转移用户的权限!')
           }
         })
       },
@@ -424,6 +453,14 @@
           }
           span {
             color: #666666;
+            &.wrap-text{
+              width: 4.5rem;
+              white-space: normal;
+              display: inline-block;
+              word-wrap: break-word;
+              word-break: break-all;
+              vertical-align: top;
+            }
           }
         }
       }

+ 2 - 2
pages/mobile/center/vendor/customer/vendorPerformanceAssess.vue

@@ -12,7 +12,7 @@
         </div>
       </div>
       <div class="search-content mi-search-content">
-        <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="请输入企业名称搜索">
+        <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="请输入考核单号搜索">
         <span @click="onFilter"><i class="iconfont icon-sousuo"></i></span>
       </div>
       <div class="customer-btob-wrapper">
@@ -29,7 +29,7 @@
         </div>
         <empty-status
           v-else
-          :text="'暂无对应的单据'"
+          :text="'暂无对应的信息!'"
           :showLink="false"
         ></empty-status>
       </div>

+ 17 - 1
yarn.lock

@@ -194,7 +194,7 @@ array-filter@~0.0.0:
   version "0.0.1"
   resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
 
-array-find-index@^1.0.1:
+array-find-index@^1.0.1, array-find-index@^1.0.2:
   version "1.0.2"
   resolved "http://registry.npm.taobao.org/array-find-index/download/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
 
@@ -4453,6 +4453,14 @@ minizlib@^1.1.0:
   dependencies:
     minipass "^2.2.1"
 
+mint-ui@^2.2.13:
+  version "2.2.13"
+  resolved "https://registry.yarnpkg.com/mint-ui/-/mint-ui-2.2.13.tgz#856a2cba9608c6ecf21f0e521ce89ed8ddfe33d3"
+  dependencies:
+    array-find-index "^1.0.2"
+    raf.js "0.0.4"
+    vue-lazyload "^1.0.1"
+
 mississippi@^2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f"
@@ -5895,6 +5903,10 @@ querystring@0.2.0, querystring@^0.2.0:
   version "0.2.0"
   resolved "http://registry.npm.taobao.org/querystring/download/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
 
+raf.js@0.0.4:
+  version "0.0.4"
+  resolved "https://registry.yarnpkg.com/raf.js/-/raf.js-0.0.4.tgz#f15af445d241b27fa7131a57450b67ef9c402fec"
+
 randomatic@^1.1.3:
   version "1.1.7"
   resolved "http://registry.npm.taobao.org/randomatic/download/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
@@ -7293,6 +7305,10 @@ vue-hot-reload-api@^2.2.0:
   version "2.3.0"
   resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.0.tgz#97976142405d13d8efae154749e88c4e358cf926"
 
+vue-lazyload@^1.0.1:
+  version "1.2.6"
+  resolved "https://registry.yarnpkg.com/vue-lazyload/-/vue-lazyload-1.2.6.tgz#baa04c172d52a812608eb12c7a6bfb14f5c91079"
+
 vue-loader@13.7.0:
   version "13.7.0"
   resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-13.7.0.tgz#4d6a35b169c2a0a488842fb95c85052105fa9729"