Browse Source

Merge branch 'release-201844-wangcz'

wangcz 7 years ago
parent
commit
691fcd8d4f

+ 13 - 0
assets/scss/mobileCommon.scss

@@ -705,3 +705,16 @@ table.com-price-list {
     }
   }
 }
+
+
+.modal-h {
+  .mobile-base-filter .content {
+    width: 33% !important;
+    position: absolute;
+    right: 0;
+    top: 0;
+    .item  {
+      width: 100% !important;
+    }
+  }
+}

+ 7 - 8
components/default/RightBar.vue

@@ -95,7 +95,6 @@
   </div>
 </template>
 <script>
-  function handler() {}
   function whichTransitionEvent() {
     let t,
       el = document.createElement('surface'),
@@ -402,7 +401,7 @@ i {
 .right-bar ul li .sidebar-menu {
   position: absolute;
   display: block;
-  right: -5px;
+  right: -8px;
   top: 0;
   width: 100px;
   line-height: 38px;
@@ -429,11 +428,11 @@ i {
 }
 .right-bar ul li:hover .sidebar-menu {
   display: block;
-  -webkit-transform: translateX(-72px);
-  -moz-transform: translateX(-72px);
-  -ms-transform: translateX(-72px);
-  -o-transform: translateX(-72px);
-  transform: translateX(-72px);
+  -webkit-transform: translateX(-82px);
+  -moz-transform: translateX(-82px);
+  -ms-transform: translateX(-82px);
+  -o-transform: translateX(-82px);
+  transform: translateX(-82px);
 }
 /*浏览记录*/
 .right-bar ul li .foot-record {
@@ -589,7 +588,7 @@ i {
   height: 180px;
   padding-top: 10px;
   width: 210px;
-  top: -76px;
+  top: 0;
 }
 .right-bar ul li .contact-us p {
   line-height: 33px;

+ 11 - 69
components/main/Search.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="search-box"><!-- :class="{'search-box2': !SelectItem}"-->
+  <div class="search-box">
     <div class="input-group">
       <template v-if="!isPcb">
         <div class="type">
@@ -8,10 +8,6 @@
           <span class="type-item" :class="{active: newSearchType == 'store'}" @click="setNewSearchType('store')">卖家</span>
           <span class="type-item" :class="{active: newSearchType == 'brand'}" @click="setNewSearchType('brand')">品牌</span>
         </div>
-        <!--<select v-model="searchType" class="form-control select-type select-adder" v-if="SelectItem">
-          <option value="product">产品</option>
-          <option value="store">店铺</option>
-        </select>-->
         <input v-model="keyword" type="text" class="search-input form-control input-primary"
                :placeholder="placeholderByType"
                @focus.stop.prevent="onFocus()"
@@ -46,33 +42,12 @@
           :class="{'active': index==associate.activeIndex}"
           @click.stop.prevent="onAssociateClick(v.value)">{{v.value}}
       </li>
-     <!-- <li v-if="similarKeywords.data.brand && similarKeywords.data.brand.length > 0" class="similar-title">品牌:</li>
-      <li v-for="(k, index) in similarKeywords.data.brand" class="item"
-          :class="{'active': index==associate.activeIndex}"
-          @click.stop.prevent="onAssociateClick(isCnStart() ? k.nameCn : k.nameEn)">{{ isCnStart() ? k.nameCn : k.nameEn }}
-      </li>
-      <li v-if="similarKeywords.data.kind && similarKeywords.data.kind.length > 0" class="similar-title">物料名称:</li>
-      <li v-for="(k, index) in similarKeywords.data.kind" class="item"
-          :class="{'active': index==associate.activeIndex}"
-          @click.stop.prevent="onAssociateClick(k.nameCn)">{{ k.nameCn }}
-      </li>
-      <li v-if="similarKeywords.data.component && similarKeywords.data.component.length > 0" class="similar-title">型号:</li>
-      <li v-for="(k, index) in similarKeywords.data.component" class="item"
-          :class="{'active': index==associate.activeIndex}"
-          @click.stop.prevent="onAssociateClick(k.code)">{{ k.code }}
-      </li>-->
     </ul>
     <div class="search-hot" v-if="SelectItem">
       <ul class="list-untyled">
         <li class="item item-first">热门搜索</li>
-        <li class="item" v-for="w in hotBrand" v-if="ifFloorsHotSearchInValid">
-          <nuxt-link :to="`/search?w=${w.nameEn}&type=brand`">{{ w.nameEn }}</nuxt-link>
-        </li>
-        <li class="item" v-for="w in hotDevice" v-if="ifFloorsHotSearchInValid">
-          <nuxt-link :to="`/search?w=${w.code}&type=component`">{{ w.code }}</nuxt-link>
-        </li>
-        <li class="item" v-if="!ifFloorsHotSearchInValid && index > 0" v-for="(w, index) in hotSearchData.items">
-          <a :href="w.hrefUrl" target="_blank">{{w.body}}</a>
+        <li class="item" v-for="w in hotDeviceBrand">
+          <a :href="w.detailsLink">{{ w.title }}</a>
         </li>
       </ul>
     </div>
@@ -107,11 +82,8 @@
       }
     },
     computed: {
-      hotDevice () {
-        return this.$store.state.hotSearchDevice.hot.data
-      },
-      hotBrand () {
-        return this.$store.state.hotSearchBrand.hot.data
+      hotDeviceBrand () {
+        return this.$store.state.hotSearch.hot.data.data ? this.$store.state.hotSearch.hot.data.data : []
       },
       similarKeywords () {
         let list = []
@@ -147,34 +119,6 @@
           this.similarKeywords.result &&
           this.similarKeywords.result.length
       },
-      hotSearchData () {
-        let list = this.$store.state.floor.list_v3.data
-        let obj = {}
-        if (list && list.length) {
-          for (let i = 0; i < list.length; i++) {
-            if (list[i].floorNumber === 2) {
-              obj = list[i]
-            }
-          }
-//          obj = list.find(item => item.floorNumber === 2) || {}
-        }
-        return obj
-      },
-      ifFloorsHotSearchInValid () {
-        let obj = this.hotSearchData
-        let tmp = false
-        if (obj.items && obj.items.length) {
-          for (let i = 0; i < obj.items.length; i++) {
-            if (!obj.items[i].body || obj.items[i].body === '') {
-              tmp = obj.items[i]
-              break
-            }
-          }
-//          let result = obj.items.find(item => !item.body || item.body === '') || true
-          return tmp || true
-        }
-        return true
-      },
       placeholderByType () {
         let type
         switch (this.newSearchType) {
@@ -217,14 +161,6 @@
       }
     },
     methods: {
-//      onSelectTypeChange: function (e) {
-//        let type = e.target[e.target.selectedIndex].innerHTML
-//        if (type === '产品') {
-//          this.searchType = 'product'
-//        } else if (type === '店铺') {
-//          this.searchType = 'store'
-//        }
-//      },
       onFocus () {
         this.associate.show = true
       },
@@ -304,6 +240,7 @@
     },
     created () {
       this.$store.dispatch('resetSearchKeywords')
+      this.$store.dispatch('loadHotSearch')
     }
   }
 </script>
@@ -365,6 +302,8 @@
     }
     .search-hot {
       margin-top:5px;
+      overflow: hidden;
+      height:25px;
       .item {
         display: inline-block;
         max-width:22%;
@@ -377,6 +316,9 @@
           overflow: hidden;
           text-overflow: ellipsis;
           white-space: nowrap;
+          &:hover{
+            color: $red;
+          }
         }
         &.item-first {
           width:12%;

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

@@ -78,6 +78,9 @@
                 <div class="content-line date">
                   交期(天):<span>{{item.leadtime}}</span>
                 </div>
+                <div class="content-line date">
+                  税率%:<span>{{item.taxrate || 0}}</span>
+                </div>
                 <div class="content-line">
                   电话:<span v-if="item.user">{{item.user.userTel}}</span>
                   <span v-else>-</span>
@@ -95,10 +98,10 @@
                 <div class="content-line date">
                   交期(天):<span>{{item.leadtime}}</span>
                 </div>
+                <div class="content-line date">
+                  税率%:<span>{{item.taxrate || 0}}</span>
+                </div>
               </template>
-              <div class="content-line date">
-                税率%:<span>{{item.taxrate | '-'}}</span>
-              </div>
               <div class="content-line date">
                 报价时间:<span>{{item.offerTime | date}}</span>
               </div>
@@ -210,6 +213,9 @@
                 <div class="content-line inline-block date">
                   交期(天):<span>{{purchaseDetail.leadtime}}</span>
                 </div>
+                <div class="content-line inline-block date">
+                  税率%:<span>{{purchaseDetail.taxrate || 0}}</span>
+                </div>
                 <div class="content-line inline-block">
                   电话:<span>{{purchaseDetail.user ? purchaseDetail.user.userTel : '-'}}</span>
                 </div>
@@ -224,6 +230,9 @@
                 <div class="content-line inline-block date">
                   交期(天):<span>{{purchaseDetail.leadtime}}</span>
                 </div>
+                <div class="content-line inline-block date">
+                  税率%:<span>{{purchaseDetail.taxrate || 0}}</span>
+                </div>
               </template>
               <div class="content-line inline-block date">
                 报价时间:<span>{{purchaseDetail.offerTime | date}}</span>

+ 5 - 1
components/mobile/applyPurchase/SeekList.vue

@@ -55,7 +55,7 @@
               </div>
               <div class="content">
                 采购数量(PCS):
-                <span>{{item.needQty || '-'}}</span>
+                <span>{{item.needquantity || item.needQty || '-'}}</span>
               </div>
             </template>
             <div class="content">
@@ -80,6 +80,10 @@
                 交期(天):
                 <span class="date">{{item.quotations.leadtime || '-'}}</span>
               </div>
+              <div class="content">
+                税率%:
+                <span class="date">{{item.quotations.taxrate || 0}}</span>
+              </div>
               <table class="com-price-list" v-if="item.quotations.replies && item.quotations.replies.length">
                 <thead>
                 <tr>

+ 5 - 1
components/mobile/base/BaseFilter.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="mobile-base-filter">
-    <span class="title inline-block">{{title}}:</span>
+    <span class="title inline-block" v-if="ShowTitle">{{title}}:</span>
     <div class="inline-block content">
         <span class="item inline-block" v-for="item in selectItems" @click.stop="setSelect(item)">
           <label class="mobile-cart-check" :class="{active: val === item.val}"></label>
@@ -45,6 +45,10 @@
       selectOption: {
         type: String,
         default: 'defaultKey'
+      },
+      ShowTitle: {
+        type: Boolean,
+        default: true
       }
     },
     data () {

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

@@ -63,7 +63,7 @@
       ComputedStyle() {
         if (this.hasFooter) {
           return {
-            height: '80%',
+            height: '68%',
             background: this.bgColor,
             borderBottomLeftRadius: 0,
             borderBottomRightRadius: 0

+ 1 - 0
components/mobile/center/Seek.vue

@@ -73,6 +73,7 @@
                 replies: val.replies,
                 vendName: val.vendName,
                 leadtime: val.leadtime,
+                taxrate: val.taxrate,
                 user: val.user
               }
             })

+ 2 - 1
nuxt.config.js

@@ -11,7 +11,7 @@ const cmsUrl = process.env.CMS_URL || (isProdMode ? 'https://cms.usoftchina.com'
 // 消息
 const messageUrl = process.env.MESSAGE_URL || (isProdMode ? 'https://api-message.usoftchina.com/' : 'http://test-message.uuzcc.cn/')
 // B2B
-const uasUrl = process.env.uasUrl || (isProdMode ? 'https://b2b.usoftchina.com/' : 'http://test-b2b.uuzcc.cn/')
+const uasUrl = process.env.uasUrl || (isProdMode ? 'https://b2b.usoftchina.com/' : 'http://rel-b2b.uuzcc.cn/')
 // 帐户中心
 const ssoUrl = process.env.ssoUrl || (isProdMode ? 'https://sso.ubtob.com/' : 'http://test-sso-server.uuzcc.cn/')
 // pcb展示ID
@@ -151,6 +151,7 @@ module.exports = {
     '/purc/inquiry/**': uasUrl,
     '/sale/orders/**': uasUrl,
     '/sale/apBill/**': uasUrl,
+    '/sale/arCheck/**': uasUrl,
     '/sale/apCheck/**': uasUrl,
     '/sale/tender/**': uasUrl,
     '/sale/sample/**': uasUrl,

File diff suppressed because it is too large
+ 851 - 66
pages/mobile/center/user/btobarCheck.vue


+ 2 - 1
pages/mobile/center/user/cart/index.vue

@@ -358,7 +358,8 @@
         }
       },
       doDelete (idArr, successStr) {
-        this.$http.delete(`/trade/cart/deleteById?ids=${JSON.stringify(idArr)}`).then(res => {
+        // this.$http.delete(`/trade/cart/deleteById?ids=${encodeURIComponent(JSON.stringify(idArr))}`).then(res => {
+        this.$http.delete(`/trade/cart/deleteById?ids=%5B${idArr}%5D`).then(res => {
           this.isChange = true
           this.page = 1
           this.reloadList()

+ 583 - 0
pages/mobile/center/user/oldBtobarCheck.vue

@@ -0,0 +1,583 @@
+<template>
+  <div>
+    <div class="mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>应付对账
+        <!--<span @click="addApCheck"><i class="icon-sousuo iconfont"></i>新增对账单</span>-->
+      </p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise && user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="btobapCheck-wrapper">
+      <div class="order-tab">
+        <div class="order-tab-wrapper clearfix">
+          <div class="fl active tab">B2B</div>
+          <nuxt-link class="fl tab" to="/mobile/center/user/payCenter" tag="div" >
+            商城
+          </nuxt-link>
+        </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>
+        <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.recordDate | time}}</span>
+            </div>
+            <div class="invoice-btob-wrapper-middle">
+              <div class="invoice-btob-wrapper-middle-title">{{item.vendorName}}</div>
+              <div><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>{{item.checkAmount | toFixedNum}}</div>
+              <div><span>对账人:</span>{{item.recorder}}</div>
+              <!--<div><span>明细条目:</span>{{item.items.length}}条</div>-->
+              <!--<div><span>商品总数:</span>{{item.getTotalProd}}</div>-->
+              <div><span>对账结果:</span>
+                <span v-if="item.checkStatus === '未对账'">-</span>
+                <span v-else v-text="item.checkStatus"></span>
+              </div>
+            </div>
+          </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>
+    <modal-wrapper :title="'新增对账单'" :showModal="showModal" @closeAction="showModal = false">
+      <div class="btobapCheck-modal">
+        <div class="search-content mi-search-content">
+          <input type="text" placeholder="选择对账客户">
+          <span @click="toChooseUser"><i class="iconfont icon-sousuo"></i></span>
+        </div>
+        <div style="padding-left: 0.15rem">
+          <span class="title inline-block" style="font-size: 0.28rem;color: #666666;line-height: 0.5rem;margin-top:0.18rem">单据时间:</span>
+          <div class="date-wrap">
+            <label>
+              <i class="iconfont icon-ico-date"></i>
+              <input type="date" v-model="dateObj.fromDate" @change="setDate('fromDate')">
+              <p v-if="dateObj.fromDate">{{dateObj.fromDate | date}}</p>
+            </label>
+            <span>—</span>
+            <label>
+              <i class="iconfont icon-ico-date"></i>
+              <input type="date" v-model="dateObj.toDate" @change="setDate('toDate')">
+              <p v-if="dateObj.toDate">{{dateObj.toDate | date}}</p>
+            </label>
+          </div>
+        </div>
+        <div class="choosescreen clearfix">
+          <div class="fr">{{'收起'}}筛选条件<i class="iconfont icon-arrow-up"></i></div>
+        </div>
+        <div class="choosescreen-list">
+          <div><span>应付供应商:</span><input type="text" v-model="screenObj.key" placeholder="可用应付供应商名称筛选" /></div>
+          <div><span>物料名称:</span><input type="text" placeholder="请输入物料名称" /></div>
+          <div><span>税率:</span><input type="text" placeholder="请输入税率" /></div>
+          <div><span>送货工厂:</span><input type="text" placeholder="请输入送货工厂名称" /></div>
+          <div><span>规格:</span><input type="text" placeholder="请输入物料规格" /></div>
+        </div>
+        <div class="choosescreen-result">
+          <div class="clearfix choosescreen-result-list">
+            <span class="item inline-block">
+                <label class="mobile-cart-check"></label>
+              </span>
+            <div class="choosescreen-result-list-content">
+              <div>本次对账数:<span>1</span></div>
+              <div>客户名称:<span>1</span></div>
+              <div>单据编号:<span>1</span></div>
+              <div>发货单号:<span>1</span></div>
+              <div>序号:<span>1</span></div>
+              <div>类型:<span>1</span></div>
+              <div>单据日期:<span>1</span></div>
+              <div>应付供应商:<span>1</span></div>
+              <div>客户采购单:<span>1</span></div>
+              <div>客户料号:<span>1</span></div>
+              <div>客户物料名称:<span>1</span></div>
+              <div>客户规格型号:<span>1</span></div>
+              <div>送货工厂:<span>1</span></div>
+              <div>数量:<span>1</span></div>
+              <div>单价:<span>1</span></div>
+              <div>币别:<span>1</span></div>
+              <div>税率:<span>1</span></div>
+              <div>金额:<span>1</span></div>
+              <div>本次对账金额:<span>1</span></div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </modal-wrapper>
+  </div>
+</template>
+
+<script>
+  import { ModalWrapper, BaseFilter } from '~components/mobile/base'
+  import { PullUp, EmptyStatus } from '~components/mobile/common'
+  export default {
+    layout: 'mobileNoHeader',
+    middleware: 'authenticated',
+    data() {
+      return {
+        filterParams: {
+          keyword: '',
+          page: 1,
+          count: 10
+        },
+        filterOptions: [
+          {
+            title: '交易时间',
+            selectOption: 'date',
+            selectItems: [{
+              key: '30天',
+              val: 1
+            }, {
+              key: '90天',
+              val: 2
+            }, {
+              key: '180天',
+              val: 3
+            }, {
+              key: '自定义',
+              val: 4
+            }],
+            defaultVal: 1
+          }
+        ],
+        resourceList: {
+          content: []
+        },
+        showModal: false,
+        dateObj: {},
+        screenObj: {}
+      }
+    },
+    methods: {
+      toChooseUser () {
+        console.log('弹出详情表')
+      },
+      addApCheck() {
+        // this.showModal = true
+      },
+      setDate (type) {
+        if (this.dateObj[type]) {
+          this.dateObj[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
+          if (this.dateObj.fromDate && this.dateObj.toDate && this.dateObj.fromDate > this.dateObj.toDate) {
+            if (type === 'fromDate') {
+              this.setRemindText('起始时间不能大于结束时间')
+            } else {
+              this.setRemindText('结束时间不能小于起始时间')
+            }
+            this.dateObj[type] = null
+          }
+          if (this.dateObj.toDate && type === 'toDate') {
+            this.dateObj.toDate += (23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000)
+          }
+        } else {
+          this.dateObj[type] = null
+        }
+      },
+      onPullUpAction () {
+        this.filterParams.page++
+        this.setSelect(this.$selectObj.key, this.$selectObj.value, false)
+      },
+      lookDetails(id) {
+        console.log('前往详情并且设置为已读')
+        // if (!this.isUnread(id)) { } else {
+        //   let sourceId = []
+        //   sourceId.push(id)
+        //   this.$http.post('/sale/tender/setRead', sourceId).then(res => {
+        //     this.getUnread()
+        //   })
+        // }
+      },
+      onFilter() {
+        this.filterParams.page = 1
+        this.setSelect(this.$selectObj.key, this.$selectObj.value, true)
+      },
+      onSelectAction(selectObj) {
+        this.$selectObj = selectObj
+        this.setSelect(selectObj.key, selectObj.value, true)
+      },
+      onValueAction(selectObj) {
+        this.$selectObj = selectObj
+        this.setSelect(selectObj.key, selectObj.value, true)
+      },
+      checkStatus (check) {
+        let info = ''
+        if (check.status === 200) {
+          info = '还未开始对账!'
+        } else if (check.status === 201 && check.items.length === check.agree) {
+          info = '已全部确认!'
+        } else if (check.status === 201 && check.items.length !== check.agree) {
+          info = '已开始对账,但未全部确认!'
+        } else if (check.status === 201 && check.items.length !== check.agree) {
+          info = `已确认:${check.agree},不同意:${check.disagree},未对帐:${check.items.length - check.agree - check.disagree}`
+        }
+        return info
+      },
+      async setSelect(...val) {
+        let { data } = await this.$http.get('/purchase/arCheck', {
+          params: {
+            count: this.filterParams.count,
+            page: this.filterParams.page,
+            searchFilter: {'keyword': this.filterParams.keyword || '', 'fromDate': val[1].fromDate, 'endDate': val[1].toDate},
+            sorting: {"date":"desc"}
+          }})
+        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 (!val[2]) {
+          this.resourceList.content.push(...data.content)
+          data.content = this.resourceList.content
+        } else {
+          this.resourceList.content = []
+        }
+        this.resourceList = data
+      }
+    },
+    computed: {
+      allPage () {
+        return Math.ceil(this.resourceList.totalElement / 10)
+      },
+      isEmpty () {
+        return this.resourceList.content.length === 0
+      }
+    },
+    components: {
+      ModalWrapper,
+      BaseFilter,
+      PullUp,
+      EmptyStatus
+    },
+    filters: {
+      time: function (time) {
+        if (typeof time === 'number') {
+          if (!time) {
+            return '无'
+          } else {
+            let d = new Date(time)
+            let year = d.getFullYear()
+            let month = d.getMonth() + 1
+            let day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
+            return year + '-' + month + '-' + day
+          }
+        }
+      },
+      toFixedNum: function (num) {
+        return num ? parseFloat(num).toFixed(2) : '-'
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  @mixin overFlowHidden {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  .mobile-header{
+    position: fixed;
+    top: 0;
+    z-index: 100;
+    width:100%;
+    height: 1.26rem;
+    line-height: 1.26rem;
+    /*border-bottom:.01rem solid #ccc;*/
+    background: #3e82f5;
+    padding:0 .2rem 0 .1rem;
+    color:#fff;
+  }
+  .mobile-header p{
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-size:.36rem;
+    text-align: center;
+    width: 6rem;
+    padding-left: 1rem;
+  }
+  .mobile-center-header p.en-name {
+    font-size: .3rem;
+  }
+  .mobile-header a{
+    font-size:.28rem;
+    color:#fff;
+    position: absolute;
+  }
+  .mobile-header a i{
+    font-size: .48rem;
+    margin-right: -.1rem;
+  }
+  .mobile-header p span {
+    position: absolute;
+    right: .4rem;
+    font-size: .28rem;
+  }
+  .mobile-header p span i {
+    font-size: .28rem;
+  }
+  .btobapCheck-wrapper {
+    background: #f1f3f6;
+    margin: 1.26rem 0 0.98rem 0;
+    .search-content {
+      padding: .24rem 0;
+      text-align: center;
+      background: #f1f3f6;
+      input {
+        width: 6.48rem;
+        height: .58rem;
+        line-height: .58rem;
+        border-radius: .14rem;
+        margin: 0 0 0 .11rem;
+        font-size: .26rem;
+        padding: 0 .71rem 0 .21rem;
+        border: 1px solid #3f84f6;
+      }
+    }
+    .order-tab {
+      background: #3f84f6;
+      padding-bottom: 0.2rem;
+      .order-tab-wrapper {
+        border: solid 1px #ffffff;
+        width: 7.06rem;
+        margin: 0 auto;
+        border-radius: 0.04rem;
+        line-height: 0.72rem;
+        height: 0.72rem;
+        overflow: hidden;
+        div {
+          color: #ffffff;
+          font-size: 0.28rem;
+          text-align: center;
+          width: 50%;
+          &.active {
+            background-color: #ffffff;
+            color: #3f84f6;
+          }
+        }
+      }
+    }
+    .order-nav {
+      background: #fff;
+      div {
+        height: 0.82rem;
+        line-height: 0.82rem;
+        display: inline-block;
+        width: 25%;
+        text-align: center;
+        font-size: .28rem;
+        color: #666;
+        &.active span{
+          color: #3f84f6;
+          border-bottom: 0.04rem solid #3f84f6;
+          padding-bottom: 0.2rem;
+        }
+      }
+    }
+    .btobapCheck-wrapper-scroll {
+      height: calc(100vh - 1.26rem - 0.98rem  - 1.06rem - 0.92rem);
+      overflow-y: auto;
+    }
+    .filter-wrapper{
+      width: 7.1rem;
+      margin: 0 auto 0.27rem;
+      background: #fff;
+      padding: 0.27rem 0.2rem;
+      border-radius: 0.05rem;
+    }
+    .invoice-btob-list {
+      width: 7.1rem;
+      margin: 0 auto 0.2rem;
+      background: #FFFFFF;
+      border-radius: 0.05rem;
+      padding: 0 0.24rem;
+    }
+    .invoice-btob-wrapper-top {
+      height: 0.8rem;
+      font-size: 0.28rem;
+      color: #333333;
+      span{
+        margin-top: 0.24rem;
+        display: inline-block;
+        font-size: 0.28rem;
+        color: #333333;
+        height:0.25rem;
+        &.read {
+          color: #15B262;
+        }
+        &.noread {
+          color: #DE4545;
+        }
+        &.isPut {
+          background: #15B262;
+          color: #FFFFFF;
+          font-size: 0.24rem;
+          border-radius: 0.04rem;
+        }
+        &.noPut {
+          font-size: 0.24rem;
+          background: #DE4545;
+          color: #FFFFFF;
+          border-radius: 0.04rem;
+        }
+      }
+    }
+    .invoice-btob-wrapper-middle {
+      border-top: 1px solid #D9D9D9;
+      @include overFlowHidden();
+      padding-top: 0.15rem;
+      font-size: 0.28rem;
+      color: #151515;
+      line-height: 0.5rem;
+      padding-bottom: 0.15rem;
+      span {
+        color: #666666;
+      }
+      .invoice-btob-wrapper-middle .tilte{
+        color: #333333;
+      }
+    }
+    .invoice-btob-wrapper-content {
+      border-top: 1px solid #D9D9D9;
+      @include overFlowHidden();
+      padding-top: 0.15rem;
+      font-size: 0.28rem;
+      color: #151515;
+      line-height: 0.5rem;
+      padding-bottom: 0.15rem;
+      span {
+        color: #666666;
+      }
+    }
+  }
+  .btobapCheck-modal {
+    .search-content input {border: 1px solid #3f84f6;}
+    .date-wrap{
+      text-align: center;
+      display: inline-block;
+      label {
+        width: 2.3rem;
+        height: .5rem;
+        line-height: .5rem;
+        border-radius: .04rem;
+        border: 1px solid #bfbfbf;
+        background: url(/images/mobile/select-arrow.png) no-repeat;
+        background-size: .12rem .06rem;
+        vertical-align: middle;
+        background-color: #fff;
+        background-position: 2.1rem .2rem;
+        position: relative;
+        margin: .2rem 0 0 0;
+        i {
+          font-size: .28rem;
+          color: #3f84f6;
+          margin-left: .1rem;
+          float: left;
+        }
+        input {
+          opacity: 0;
+          width: 2.22rem;
+          height: .5rem;
+          position: absolute;
+          left: 0;
+          z-index: 1;
+        }
+        p {
+          font-weight: normal;
+          font-size: .22rem;
+          color: #3E81F6;
+          text-align: left;
+          text-indent: 10px;
+        }
+      }
+      span {
+        color: #a0a0a0;
+        margin: 0.3rem .05rem 0;
+        width: .3rem;
+        display: inline-block;
+        text-align: center;
+        vertical-align: top;
+      }
+    }
+    .choosescreen {
+      padding: 0 0.15rem;
+      font-size: 0.28rem;
+      color: #418DF6;
+      line-height: 0.52rem;
+      i {
+        font-size: 0.28rem;
+      }
+    }
+    .choosescreen-list {
+      margin: 0 0.15rem;
+      padding-bottom: 0.28rem;;
+      border-bottom: 1px solid #D9D9D9;
+      div {
+        line-height: 0.76rem;
+        span {
+          font-size: 0.28rem;
+          color: #666666;
+          display: inline-block;
+          width: 1.68rem;
+        }
+        input {
+          height: 0.5rem;
+          line-height: 0.5rem;
+          width: 4.44rem;
+          margin-left: 0.18rem;
+          font-size: 0.28rem;
+          color: #333;
+          border: 1px solid #AEAEAE;
+          text-indent: 0.12rem;
+        }
+      }
+    }
+    .choosescreen-result {
+      margin: 0 0.15rem 0.2rem;
+      .choosescreen-result-list-content {
+        display: inline-block;
+        vertical-align: middle;
+        margin-left: 0.15rem;
+        div {
+          @include overFlowHidden();
+          width: 5.5rem;
+        }
+        padding-top: 0.15rem;
+        font-size: 0.28rem;
+        color: #151515;
+        line-height: 0.5rem;
+        padding-bottom: 0.15rem;
+        span {
+          color: #666666;
+        }
+      }
+    }
+  }
+</style>

+ 17 - 10
pages/mobile/center/user/supplier/index.vue

@@ -37,7 +37,7 @@
           <div>
             <div class="customer-modal-wrapper">
               <div class="search-content mi-search-content">
-                <input type="text" v-model="modalObj.keyword" @input="modalObjonFilter" placeholder="输入用户UU">
+                <input type="text" v-model="modalObj.keyword" @input="modalObjonFilter" placeholder="手机号/用户名">
                 <span @click="modalObjonFilter"><i class="iconfont icon-sousuo"></i></span>
               </div>
               <div class="customer-modal-content">
@@ -49,7 +49,7 @@
                   <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: 32%;">手机</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">
@@ -58,7 +58,7 @@
                     <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: 32%;">{{item.userTel}}</span>
                   <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
                 </div>
               </div>
@@ -91,6 +91,10 @@
           count: 10,
           page: 1
         },
+        modalParams: {
+          count: 100000000,
+          page: 1
+        },
         collectResult: '',
         timeoutCount: 0,
         resourceList: {
@@ -195,8 +199,9 @@
       },
       modalObjonFilter() {
         let _arr = []
+        let keys = this.modalObj.keyword
         this.modalObj.originList.forEach(item => {
-          if (item.userUU.toString().indexOf(this.modalObj.keyword) > -1) {
+          if ((String(item.userTel).indexOf(keys) > -1) || (String(item.userName).indexOf(keys) > -1)) {
             _arr.push(item)
           }
         })
@@ -240,13 +245,14 @@
       },
       // 分配
       async addUserInfo(customer) {
+        this.modalObj.keyword = ''
         this.modalObj.type = 'add'
         this.modalObj.customer = customer
-        this.$http.post(`/vendorDistribute/${customer.id}`).then(res => {
+        this.$http.get(`/vendorDistribute/${customer.id}`, {params: this.modalParams}).then(res => {
           if (this.enabled || res.data) {
             this.modalObj.showModal = true
-            this.modalObj.showModalList = res.data
-            this.modalObj.originList = res.data
+            this.modalObj.showModalList = res.data.content
+            this.modalObj.originList = res.data.content
             this.init()
           } else {
             this.onMind('您没有当前客户分配用户的权限!')
@@ -257,16 +263,17 @@
       },
       // 转移
       transferUserInfo(customer) {
+        this.modalObj.keyword = ''
         this.modalObj.type = 'chance'
         this.modalObj.customer = customer
-        this.$http.post(`/vendorDistribute/${customer.id}`).then(res => {
+        this.$http.get(`/vendorDistribute/${customer.id}`, {params: this.modalParams}).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.modalObj.showModalList = res.data.content
+            this.modalObj.originList = res.data.content
             this.init()
           } else {
             this.onMind('您没有当前客户转移用户的权限!')

+ 619 - 85
pages/mobile/center/vendor/btobapCheck.vue

@@ -18,8 +18,8 @@
       </div>
       <div class="order-nav">
         <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 === 'done' ? 'active': ''" @click="ChangeList('done')"><span>已对账</span></div>
         <div :class="activeType === 'end' ? 'active' : ''" @click="ChangeList('end')"><span>已作废</span></div>
       </div>
       <div v-show="activeType !== 'all'">
@@ -41,7 +41,7 @@
             </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-list" v-for="item in resourceList.content">
               <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>
@@ -57,8 +57,9 @@
                 <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><span>对账人:</span>{{item.recorder}}</div>
+                <!--<div><span>商品总数:</span>{{item.getTotalProd}}</div>-->
+                <!--<div><span>对账结果:</span>{{item.checkStatus}}</div>-->
               </div>
             </div>
           </div>
@@ -76,19 +77,43 @@
           <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 class="timeLine-wrapper">
+          <div class="inline-block left" @click="addMonth('out', 'outTimeMonth', -1)">
+            <i class="iconfont icon-xiangzuo" style="font-size: 0.3rem"></i>
+          </div>
+          <div class="inline-block timeLine" style="text-indent: 0.12rem" @click="ShowMonthChoose('out', 'outTimeMonth')">{{outTimeMonth}}<i class="iconfont icon-arrow-down" style="font-size: 0.3rem"></i></div>
+          <div class="inline-block right" @click="addMonth('out', 'outTimeMonth', 1)" v-show="MouthOutShow">
+            <i class="iconfont icon-xiangyou" style="font-size: 0.3rem"></i>
+          </div>
+        </div>
+        <div class="btobapCheck-wrapper-scroll btobapCheck-wrapper-scroll2" 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-list" v-for="item in resourceList.content">
               <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 v-if="item.thisMonthCount && item.thisMonthCount.length > 0">
+                  <span class="inline-block"  style="vertical-align: top">本月应收:</span>
+                  <div class="inline-block" style="vertical-align: top" >
+                    <div v-for="count in item.thisMonthCount" v-if="count.amount > 0">
+                      <span>{{count.currency}}:{{count.amount | computeNum(2)}}</span>
+                    </div>
+                  </div>
+                </div>
+                <div v-else><span>本月应收:0</span></div>
+                <div v-if="item.totalCount && item.totalCount.length > 0">
+                  <span class="inline-block"  style="vertical-align: top">应收总额:</span>
+                  <div class="inline-block" style="vertical-align: top" >
+                    <div v-for="count in item.totalCount"  v-if="count.amount > 0">
+                      <span>{{count.currency}}:{{count.amount | computeNum(2)}}</span>
+                    </div>
+                  </div>
+                </div>
+                <div v-else><span>应收总额:0</span></div>
               </div>
               <div class="invoice-btob-wrapper-middle" @click="showApcheckList(item)">
-                <div class="middle_btn">立即对账</div>
+                <div class="middle_btn">对账详情</div>
               </div>
             </div>
           </div>
@@ -102,15 +127,47 @@
       </div>
     </div>
 
-    <modal-wrapper :title="isShowApcheckList.enName" :showModal="isShowApcheckList.show" @closeAction="isShowApcheckList.show = false" :bgColor="'#f1f3f6'" :hasFooter="true">
+    <modal-wrapper :title="isShowApcheckList.enName" :showModal="isShowApcheckList.show" @closeAction="deleteCheck" :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>
+        <div class="modal-h-top">
+           <span class="item inline-block" @click="checkAll()"  v-show="!isShowApcheckList.showApcheck">
+              <label class="mobile-cart-check" :class="{active: !isCheckAll}"></label>
+           </span>
+          <span class="inline-block overflowhidden">
+            应收客户:{{isShowApcheckList.enName}}
+          </span>
+        </div>
+        <div class="timeLine-wrapper clearfix">
+          <div v-show="!isShowApcheckList.showApcheck">
+            <div style="margin-left: 0.5rem">
+              <div class="inline-block left" @click="addMonth('inside', '', -1)">
+                <i class="iconfont icon-xiangzuo" style="font-size: 0.3rem"></i>
+              </div>
+              <div class="inline-block timeLine" style="text-indent: 0.12rem" @click="ShowMonthChoose('inside')">{{isShowApcheckList.thisMonth}}<i class="iconfont icon-arrow-down" style="font-size: 0.3rem"></i></div>
+              <div class="inline-block right" @click="addMonth('inside', '', 1)" v-show="MouthinShow">
+                <i class="iconfont icon-xiangyou" style="font-size: 0.3rem"></i>
+              </div>
+            </div>
+            <div style="clear:both"></div>
+            <base-filter
+              ref="baseFilter"
+              v-for="filterOption in ApcheckfilterOptions"
+              :ShowTitle="ShowTitle"
+              :key="filterOption.selectOption"
+              :selectItems="filterOption.selectItems"
+              :defaultVal="filterOption.defaultVal"
+              :selectOption="filterOption.selectOption"
+              @selectAction="ApcheckonSelectAction"
+              @valueAction="ApcheckonValueAction"
+              :title="filterOption.title">
+            </base-filter>
+          </div>
+          <div v-show="isShowApcheckList.showApcheck" style="line-height: 1.4rem;text-align: center">
+            {{isShowApcheckList.startTime}} ~ {{isShowApcheckList.endTime}}
+          </div>
+        </div>
+        <div style="height: 0.2rem; width: 100%;"></div>
+        <!--<div class="timeLine" @click="ShowMonthChoose('inside')" 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">
@@ -120,35 +177,36 @@
             <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)">
+                  <span class="item inline-block" @click="checkItem(item, index)" v-show="!isShowApcheckList.showApcheck">
                     <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 class="OverHidden">采购单:<span>{{item.ordercode}}</span></div>
+                    <div class="OverHidden">物料名称:<span>{{item.prodtitle}}</span></div>
+                    <div class="OverHidden">规格型号:<span>{{item.prodspec}}</span></div>
+                    <div class="OverHidden">发货单:<span>{{item.sendcode}}</span></div>
+                    <!--<div class="OverHidden">序号:<span>{{index + 1}}</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">
+                  <span class="item inline-block" style="opacity: 0"  v-show="!isShowApcheckList.showApcheck">
                     <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.qty}}</span></div>
+                    <div class="OverHidden">验收单:<span>{{item.inoutno}}</span></div>
+                    <div class="OverHidden">验收数量:<span>{{item.thischeckqty}}</span></div>
                     <div class="OverHidden">单价:<span>{{item.currency}}:{{item.orderprice}}</span></div>
+                    <!--<div class="OverHidden">发货单:<span>{{item.sendcode}}</span></div>-->
+                    <div class="OverHidden">税率:<span>{{item.taxrate}}%</span></div>
+                    <!--<div class="OverHidden">客户料号:<span>{{item.prodcode}}</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="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>
@@ -163,11 +221,14 @@
         </div>
       </div>
       <div slot="footer" class="footerBtn clearfix">
-         <span class="item inline-block" @click="checkAll()">
+         <span class="item inline-block" @click="checkAll()" v-show="!isShowApcheckList.showApcheck">
             <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 class="fr bbgoresult" @click="goTopayfor" v-show="!isShowApcheckList.showApcheck">对账</div>
+        <div class="fr" style="margin-right: 0.2rem" v-show="!isShowApcheckList.showApcheck">合计:<a style="color: #001408;">{{allMoney | priceFilter}}</a></div>
+        <div class="fl" style="margin-left: 0.2rem" v-show="isShowApcheckList.showApcheck">合计:<a style="color: #001408;">{{allMoney | priceFilter}}</a></div>
+        <!--<div class="fr bbgoresult" v-show="isShowApcheckList.showApcheck" @click="submitCheck">提交</div>-->
+        <!--<div class="fr bbgoresult cancel" v-show="isShowApcheckList.showApcheck" @click="deleteCheck">取消</div>-->
       </div>
     </modal-wrapper>
     <modal-wrapper :title="'新增对账单'" :showModal="showModal" @closeAction="showModal = false">
@@ -232,6 +293,7 @@
         </div>
       </div>
     </modal-wrapper>
+    <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     <div class="fixedPicker" v-show="isShowMonthChoose">
       <picker :slots="slots" @change="onValuesChange" :showToolbar="true" ref="picker">
         <div class="titls">选择当前时间</div>
@@ -245,11 +307,13 @@
 <script>
   import { Picker } from 'mint-ui'
   import { ModalWrapper, BaseFilter } from '~components/mobile/base'
-  import { PullUp, EmptyStatus } from '~components/mobile/common'
+  import { PullUp, EmptyStatus, RemindBox } from '~components/mobile/common'
   function years() {
+    let _d = new Date()
+    let _year = Number(_d.getFullYear())
     let arr = []
-    let num = 1989
-    for (let i = 0; i < 99; i++) {
+    let num = 2000
+    for (let i = 2000; i < _year; i++) {
       num++
       arr.push(num + '年')
     }
@@ -257,11 +321,11 @@
   }
   function getMonth() {
     let sdateTo = new Date()
-    console.log(sdateTo.getMonth() - 1)
+    // console.log(sdateTo.getMonth() - 1)
     return sdateTo.getMonth() - 1
   }
   function getYear() {
-    let num = 1989
+    let num = 2000
     let sdateTo = new Date()
     let _year = sdateTo.getFullYear()
     for (let i = 0; i < 99; i++) {
@@ -278,6 +342,11 @@
     middleware: 'authenticated',
     data() {
       return {
+        MouthinShow: true,
+        MouthOutShow: true,
+        ShowTitle: false,
+        collectResult: '',
+        timeoutCount: 0,
         isShowMonthChoose: false,
         slots: [
           {
@@ -332,18 +401,30 @@
         showModal: false,
         dateObj: {},
         screenObj: {},
+        outTimeMonth: '',
         isShowApcheckList: {
           show: false,
-          enName: '深圳市优软科技有限公司',
+          enName: '',
           thisMonth: '',
-          list: [{
-            qty: 1,
-            orderprice: 20
-          }, {
-            qty: 3,
-            orderprice: 20
-          }]
-        }
+          list: [],
+          showApcheck: false,
+          id: '',
+          startTime: '',
+          endTime: '',
+          objTime: {}
+        },
+        ApcheckfilterOptions: [
+          {
+            title: '',
+            selectOption: 'date',
+            selectItems: [{
+              key: '自定义',
+              val: 4
+            }],
+            defaultVal: 1
+          }
+        ],
+        ShowApcheckChooseTime: false
       }
     },
     created() {
@@ -353,6 +434,7 @@
       this.getUnread()
       let sdateTo = new Date()
       this.isShowApcheckList.thisMonth = sdateTo.getFullYear() + '-' + sdateTo.getMonth()
+      this.outTimeMonth = sdateTo.getFullYear() + '-' + sdateTo.getMonth()
     },
     // mounted() {
     //   this.$nextTick(() => {
@@ -365,19 +447,68 @@
         if (!this.$value) {
           picker.setSlotValue(0, '2018年')
           picker.setSlotValue(1, '11月')
+          this.$picker = picker
         }
         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()
+        if (this.$monthType === 'out') {
+          // let _time2 = new Date(this.$value)
+          // _time2.setDate(1)
+          // _time2.setMonth(_time2.getMonth() + 1)
+          // _time2.setDate(_time2.getDate() - 1)
+          let _time2 = this.computedTime(this.$value)
+          let _d = this.computedTime(new Date())
+          if (_time2.getTime() > _d.getTime()) {
+            this.setRemindText('所选对账日期不能超过当前时间')
+            return
+          }
+          let _sp = new Date()
+          if (_time2.getTime() >= _sp.getTime()) {
+            this.MouthOutShow = false
+          } else {
+            this.MouthOutShow = true
+          }
+          this.outTimeMonth = this.$value
+          this.filterParams.page = 1
+          this.setSelect('', '', true)
+        } else {
+          // let _time2 = new Date(this.$value)
+          // _time2.setDate(1)
+          // _time2.setMonth(_time2.getMonth() + 1)
+          // _time2.setDate(_time2.getDate() - 1)
+          let _time2 = this.computedTime(this.$value)
+          let _d = this.computedTime(new Date())
+          if (_time2.getTime() > _d.getTime()) {
+            this.setRemindText('所选对账日期不能超过当前时间')
+            return
+          }
+          let _sp = new Date()
+          if (_time2.getTime() > _sp.getTime()) {
+            this.MouthinShow = false
+          } else {
+            this.MouthinShow = true
+          }
+          this.$monthClick = true
+          this.isShowApcheckList.thisMonth = this.$value
+          this.ShowApcheckChooseTime = false
+          this.$refs.baseFilter[0].setSelect(1)
+          this.isShowApcheckList.show = true
+          this.getApcheckDetailsinfo()
+        }
       },
+      // 立即对账
       addApCheck() {
         this.showModal = true
       },
+      setRemindText: function (str) {
+        this.collectResult = str
+        this.timeoutCount++
+      },
       setDate (type) {
         if (this.dateObj[type]) {
           // 初始化为00:00:00
@@ -450,6 +581,17 @@
         this.$selectObj = selectObj
         this.setSelect(selectObj.key, selectObj.value, true)
       },
+      ApcheckonSelectAction(selectObj) {
+        if (this.$monthClick) return
+        this.ShowApcheckChooseTime = true
+        this.isShowApcheckList.objTime = selectObj
+        this.getApcheckDetailsinfo(selectObj.key, selectObj.value)
+      },
+      ApcheckonValueAction(selectObj) {
+        // if (this.$monthClick) return
+        // this.isShowApcheckList.objTime = selectObj
+        // this.getApcheckDetailsinfo(selectObj.key, selectObj.value)
+      },
       // B2B未对账
       // NotapCheck () {
       //   console.log('未对账')
@@ -458,21 +600,42 @@
       showApcheckList(item) {
         this.isShowApcheckList.show = true
         this.isShowApcheckList.enName = item ? item.myEnterprise.enName : this.isShowApcheckList.enName
-        this.$http.get('/sale/apCheck/getAllByKeywords', {
+        this.isShowApcheckList.thisMonth = this.outTimeMonth
+        this.getApcheckDetailsinfo()
+      },
+      // 未对账详情获取数据
+      getApcheckDetailsinfo (...objTime) {
+        if (!this.isShowApcheckList.show) return
+        let _params = {
           params: {
             checkDate: this.isShowApcheckList.thisMonth,
-            suuorname: item ? item.myEnterprise.enName : this.isShowApcheckList.enName
+            suuorname: this.isShowApcheckList.enName
+          }
+        }
+        // 是否打开自定义时间选项 且
+        if (this.ShowApcheckChooseTime && !this.$monthClick) {
+          // let _fromDate = new Date(this.outTimeMonth + '-01 00:00:00').getTime()
+          // let _d = this.computedTime(this.isShowApcheckList.thisMonth).getTime()
+          _params = {
+            params: {
+              fromDate: objTime[1].fromDate,
+              endDate: objTime[1].toDate,
+              suuorname: this.isShowApcheckList.enName
+            }
           }
-        }).then(res => {
-          res.data.forEach(item => {
+        }
+        this.$http.get('/sale/apCheck/getAllByKeywords', _params).then(res => {
+          res.data.details.forEach(item => {
             item.check = true
           })
-          this.isShowApcheckList.list = res.data
+          this.$monthClick = false
+          this.isShowApcheckList.list = res.data.details
           this.$nextTick(() => {
             this._initscroll()
           })
         })
       },
+      // 对账全选
       checkAll() {
         let fl = true
         if (this.isCheckAll === 0) {
@@ -489,31 +652,313 @@
           this.$set(this.isShowApcheckList.list[index], 'check', true)
         }
       },
-      goTopayfor() {
-        console.log('结算')
+      // 对账按钮
+        goTopayfor() {
+        let apCheck = {
+          custUu: '',
+          custName: '',
+          enUu: '',
+          apDate: '',
+          beginDate: '',
+          endDate: '',
+          checkStatus: '未对账',
+          checkAmount: 0,
+          currency: '',
+          rate: '',
+          items: [],
+          taxrate: ''
+        }
+        // 保存来源单据相关信息
+        let sourceInfos = []
+
+        // 所允许的本次对账最大最小数量
+        this.isShowApcheckList.list.maxThisCheckQty = 0
+        this.isShowApcheckList.list.minThisCheckQty = 0
+
+        let sameCust = true
+        let validQty = true
+        let _list = []
+        this.isShowApcheckList.list.forEach((check) => {
+          // 保存应收对账单明细行数据
+          let item = {
+            inoutno: '',
+            inoutnodetno: '',
+            orderCode: '',
+            orderClass: '',
+            orderDetno: '',
+            price: '',
+            checkQty: '',
+            amount: '',
+            sourceId: '',
+            sourceTable: '',
+            oldYCheckQty: '',
+            status: 0,
+            receiveCode: '',
+            receiveName: '',
+            prodCode: '',
+            prodTitle: '',
+            prodUnit: '',
+            prodSpec: '',
+            taxrate: '',
+            sendcode: '',
+            whname: '',
+            custUserUU: ''
+          }
+
+          // 应收对账单明细行来源表信息
+          let sourceInfo = {
+            sourceId: '',
+            sourceTable: '',
+            newYCheckQty: ''
+          }
+
+          // 此次对账后新的已转数
+          if (check.check === true) {
+            _list.push(check)
+            apCheck.custName = check.custname
+            apCheck.enUu = check.enuu
+            apCheck.checkAmount += (check.thischeckqty || 0) * (check.orderprice || 0)
+            apCheck.apDate = check.pidate
+            apCheck.rate = check.rate
+
+            // 必须是同一家客户才能生成对账单,否则提示错误
+            if (apCheck.custUu === '') {
+              apCheck.custUu = check.custuu
+            } else if (apCheck.custUu !== check.custuu) {
+              sameCust = false
+              this.setRemindText('请选择同一家客户')
+            }
+
+            // 必须是相同币别才能生成对账单,否则提示错误
+            if (apCheck.currency === '') {
+              apCheck.currency = check.currency
+            } else if (apCheck.currency !== check.currency) {
+              sameCust = false
+              this.setRemindText('请选择同一种币别')
+            }
+            let re = /^[0-9]+.?[0-9]*$/
+            // 必须是相同税率才能生成对账单,否则提示错误
+            if (!re.test(apCheck.taxrate)) {
+            // if (!angular.isNumber(apCheck.taxrate)) {
+              apCheck.taxrate = check.taxrate
+            } else if (apCheck.taxrate !== check.taxrate) {
+              sameCust = false
+              this.setRemindText('请选择相同的税率')
+            }
+
+            // 本次对账数量必须小于总对账数量
+            if (check.qty > 0) {
+              this.isShowApcheckList.list.maxThisCheckQty = check.qty
+              this.isShowApcheckList.list.minThisCheckQty = 0
+              if (check.qty - (check.ycheckqty || 0) < check.thischeckqty || check.thischeckqty < 0 || check.thischeckqty === 0) {
+                validQty = false
+                this.setRemindText('本次对账数量,填写有误!')
+              }
+            } else if (check.qty < 0) {
+              this.isShowApcheckList.list.maxThisCheckQty = 0
+              this.isShowApcheckList.list.minThisCheckQty = check.qty
+              if (((-check.qty) - (-check.ycheckqty) < (-check.thischeckqty)) || check.thischeckqty > 0 || check.thischeckqty === 0) {
+                validQty = false
+                this.setRemindText('本次对账数量,填写有误!')
+              }
+            }
+            if (this.ShowApcheckChooseTime) {
+              let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
+              let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
+              // 获取筛选时间的开始时间为对账的开始时间
+              apCheck.beginDate = _start.getTime()
+              // 获取筛选的截止时间为对账的截止时间
+              apCheck.endDate = _end.getTime()
+            } else {
+              this.isShowApcheckList.startTime = this.isShowApcheckList.thisMonth + '-01'
+              let _d = new Date(this.isShowApcheckList.startTime)
+              _d.setDate(1)
+              _d.setMonth(_d.getMonth() + 1)
+              _d.setDate(_d.getDate() - 1)
+
+              // 获取筛选时间的开始时间为对账的开始时间
+              apCheck.beginDate = new Date(this.isShowApcheckList.startTime).getTime()
+              // 获取筛选的截止时间为对账的截止时间
+              apCheck.endDate = _d.getTime()
+            }
+
+            // 应收对账单明细行数据
+            item.orderCode = check.ordercode
+            item.orderClass = check.piclass
+            item.orderDetno = check.orderdetno
+            item.price = check.orderprice
+            item.checkQty = check.thischeckqty
+            item.amount = (check.thischeckqty || 0) * (check.orderprice || 0)
+            item.sourceId = check.sourceid
+            item.sourceTable = check.sourcetable
+            item.oldYCheckQty = check.ycheckqty
+            item.prodCode = check.prodcode
+            item.prodTitle = check.prodtitle
+            item.prodSpec = check.prodspec
+            item.prodUnit = check.produnit
+            item.inoutno = check.inoutno
+            item.inoutnodetno = check.detno
+            item.taxrate = check.taxrate
+            item.receiveCode = check.receivecode
+            item.receiveName = check.receivename
+            item.sendcode = check.sendcode
+            item.whname = check.whname
+            item.custUserUU = check.custuseruu
+
+            // 来源表相关信息
+            sourceInfo.sourceid = check.sourceid
+            sourceInfo.sourcetable = check.sourcetable
+            sourceInfo.newYCheckQty = ((check.ycheckqty || 0) + check.thischeckqty)
+
+            sourceInfos.push(sourceInfo)
+            apCheck.items.push(item)
+            // haveSelected = true
+            // 如果是同一家客户,生成对账单的同时,关闭模态框
+          }
+        })
+        if (sameCust && validQty) {
+          this.saveApCheck(apCheck, _list)
+        }
       },
-      async setSelect(...val) {
-        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
+      // 对账提交
+      saveApCheck(apCheck, _list) {
+        if (apCheck.items.length === 0) {
+          this.setRemindText('请先选择需要对账的数据')
+        } else {
+          this.$http.post('/sale/apCheck/operation/save', apCheck).then(res => {
+            this.isShowApcheckList.list = _list
+            this.setRemindText('生成应收对账成功')
+            this.isShowApcheckList.id = res.data.id
+            this.isShowApcheckList.showApcheck = true
+            if (this.ShowApcheckChooseTime) {
+              let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
+              let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
+              this.isShowApcheckList.startTime = _start.getFullYear() + '-' + (_start.getMonth() + 1) + '-' + _start.getDate()
+              this.isShowApcheckList.endTime = _end.getFullYear() + '-' + (_end.getMonth() + 1) + '-' + _end.getDate()
+            } else {
+              this.isShowApcheckList.startTime = this.isShowApcheckList.thisMonth + '-01'
+              let _d = this.computedTime(this.isShowApcheckList.startTime)
+              this.isShowApcheckList.endTime = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate()
+            }
+            this.ShowApcheckChooseTime = false
+          }, err => {
+            this.setRemindText(err.response.data || err)
+          })
+        }
+      },
+      // 提交对账单
+      submitCheck() {
+        this.$http.post('/sale/apCheck/operation/updateStatus?id=' + this.isShowApcheckList.id).then(res => {
+          this.setRemindText('新增成功')
+          this.isShowApcheckList.showApcheck = false
+          this.isShowApcheckList.show = false
+          this.isShowApcheckList.id = ''
+        })
+      },
+      // 删除对账单
+      deleteCheck() {
+        // if (this.isShowApcheckList.id === '') {
+        this.isShowApcheckList.showApcheck = false
+        this.isShowApcheckList.show = false
+        this.isShowApcheckList.id = ''
+        // return
+        // }
+        // this.$http.post('/sale/apCheck/operation/deleteApCheck?id=' + this.isShowApcheckList.id, {}).then(res => {
+        //   this.isShowApcheckList.showApcheck = false
+        //   this.isShowApcheckList.show = false
+        //   this.isShowApcheckList.id = ''
+        //
+        //   let sourceInfos = []
+        //   this.isShowApcheckList.list.forEach(item => {
+        //     let sourceInfo = {
+        //       sourceId: '',
+        //       sourceTable: '',
+        //       newYCheckQty: ''
+        //     }
+        //     sourceInfo.sourceId = item.sourceid
+        //     sourceInfo.sourceTable = item.sourcetable
+        //     sourceInfo.newYCheckQty = item.oldYCheckQty
+        //     sourceInfos.push(sourceInfo)
+        //   })
+        //   this.$http.post('/sale/apCheck/update', sourceInfos).then(res => {})
+        // }, err => {
+        //   this.setRemindText(err.response.data)
+        // })
+      },
+      // 月份+1
+      addMonth(tp, key, val) {
+        if (tp === 'inside') {
+          let _sp = new Date()
+          this.ShowApcheckChooseTime = false
+          this.$monthClick = true
+          let _d = this.computedTime(this.isShowApcheckList.thisMonth, val)
+          let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
+          this.isShowApcheckList.thisMonth = _d.getFullYear() + '-' + _m
+          if (_d.getTime() >= _sp.getTime()) {
+            this.MouthinShow = false
+          } else {
+            this.MouthinShow = true
+          }
+          this.$refs.baseFilter[0].setSelect(1)
+          this.isShowApcheckList.show = true
+          this.getApcheckDetailsinfo()
+        } else {
+          let _sp = new Date()
+          let _d = this.computedTime(this[key], val)
+          let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
+          this[key] = _d.getFullYear() + '-' + _m
+          if (_d.getTime() >= _sp.getTime()) {
+            this.MouthOutShow = false
+          } else {
+            this.MouthOutShow = true
           }
+          this.filterParams.page = 1
+          this.setSelect('', '', true)
         }
+      },
+      computedTime(num, val) {
+        let _d = new Date(num)
+        if (val !== undefined) {
+          _d.setMonth(_d.getMonth() + val)
+        }
+        _d.setDate(1)
+        _d.setMonth(_d.getMonth() + 1)
+        _d.setDate(_d.getDate() - 1)
+        return _d
+      },
+      async setSelect(...val) {
+        let _url = '/sale/apCheck/info/search'
+        let itemL = {}
         if (this.activeType === 'all') {
+          let _fromDate = this.outTimeMonth + '-01 00:00:00'
+          // let _d = new Date(_fromDate)
+          let _d = this.computedTime(_fromDate)
+          // _d.setDate(1)
+          // _d.setMonth(_d.getMonth() + 1)
+          // _d.setDate(_d.getDate() - 1)
+          let _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
+          _endDate = new Date(_endDate).getTime()
+          _fromDate = new Date(_fromDate).getTime()
            _url = '/sale/apCheck/customer'
           itemL = {
             params: {
               count: 20,
-              page: 1,
+              page: this.filterParams.page,
               keyword: this.filterParams.keyword,
-              searchFilter: {'fromDate': null, 'endDate': 1543981513949},
+              searchFilter: {'fromDate': _fromDate, 'endDate': _endDate},
               sorting: { 'recordDate': 'desc' }
             }
           }
+        } else {
+          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
+            }
+          }
         }
         let { data } = await this.$http.get(_url, itemL)
         if (!this.resourceList.content) {
@@ -528,6 +973,24 @@
               item.getTotalProd += im.checkQty
             })
           })
+        } else {
+          data.content.forEach((item) => {
+            let _mouthArr = []
+            let _totalArr = []
+            item.thisMonthCount && item.thisMonthCount.forEach(count => {
+              if (count.amount > 0) {
+                _mouthArr.push(count)
+              }
+            })
+            item.totalCount && item.totalCount.forEach(count => {
+              if (count.amount > 0) {
+                _totalArr.push(count)
+              }
+            })
+            item.totalCount = _totalArr
+            item.thisMonthCount = _mouthArr
+          })
+          console.log(data.content)
         }
         if (!val[2]) {
           this.resourceList.content.push(...data.content)
@@ -536,6 +999,23 @@
           this.resourceList.content = []
         }
         this.resourceList = data
+      },
+      // 选择月份
+      ShowMonthChoose(tp, key) {
+        this.$monthType = tp
+        if (tp === 'inside') {
+          this.ShowApcheckChooseTime = false
+          this.$monthClick = true
+          this.$refs.baseFilter[0].setSelect(1)
+          let _m = this.isShowApcheckList.thisMonth.split('-')[1].length < 2 ? '0' + this.isShowApcheckList.thisMonth.split('-')[1] : this.isShowApcheckList.thisMonth.split('-')[1]
+          this.$picker.setSlotValue(0, this.isShowApcheckList.thisMonth.split('-')[0] + '年')
+          this.$picker.setSlotValue(1, _m + '月')
+        } else {
+          let _m = this[key].split('-')[1].length < 2 ? '0' + this[key].split('-')[1] : this[key].split('-')[1]
+          this.$picker.setSlotValue(0, this[key].split('-')[0] + '年')
+          this.$picker.setSlotValue(1, _m + '月')
+        }
+        this.isShowMonthChoose = true
       }
     },
     computed: {
@@ -549,7 +1029,7 @@
         let sum = 0
         this.isShowApcheckList.list.forEach(obj => {
           if (obj.check) {
-            sum += obj.qty * obj.orderprice
+            sum += obj.qty * (obj.orderprice || 0)
           }
         })
         return sum
@@ -568,7 +1048,8 @@
       BaseFilter,
       PullUp,
       EmptyStatus,
-      Picker
+      Picker,
+      RemindBox
     },
     filters: {
       time: function (time) {
@@ -720,7 +1201,7 @@
         height: 0.82rem;
         line-height: 0.82rem;
         display: inline-block;
-        width: 25%;
+        width: 33.3%;
         text-align: center;
         font-size: .28rem;
         color: #666;
@@ -734,6 +1215,9 @@
     .btobapCheck-wrapper-scroll {
       height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem);
       overflow-y: auto;
+      &.btobapCheck-wrapper-scroll2 {
+        height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem - 1.3rem);
+      }
     }
     .filter-wrapper{
       width: 7.1rem;
@@ -917,26 +1401,71 @@
       }
     }
   }
+
+  .timeLine-wrapper {
+    background: #fff;
+    border-radius: 0.05rem;
+    height: 1.1rem;
+    width: 7.1rem;
+    margin: 0 auto 0.2rem;
+    padding: 0.3rem 0 0 2rem;
+    position: relative;
+    .left {
+      background: #fff;
+      color: #333;
+      padding: 0rem 0.1rem;
+      /*box-shadow: 0 0 2px #a0a0a0;*/
+      text-align: center;
+      margin-right: 0.2rem;
+      height: 0.5rem;
+      line-height: 0.5rem;
+      border: 1px solid #BFBFBF;
+    }
+    .right {
+      text-align: center;
+      background: #fff;
+      color: #333;
+      padding: 0rem 0.1rem;
+      /*box-shadow: 0 0 2px #a0a0a0;*/
+      margin-left: 0.2rem;
+      height: 0.5rem;
+      line-height: 0.5rem;
+      border: 1px solid #BFBFBF;
+    }
+    .rightBtn {
+      margin: 0.1rem 0.2rem 0 0;
+    }
+  }
   .modal-h {
     background: #F3F3F3;
-    padding: 0.15rem;
+    .modal-h-top {
+      padding: 0.15rem;
+    }
     .overflowhidden {
       @include overFlowHidden();
-      width: 4.1rem;
+      width: 5.9rem;
       font-size: 0.28rem;
       color: #333333;
-      margin: 0 0.1rem;
+      margin-left: 0.1rem;
     }
-    div {
-      background: #FFFFFF;
-      border: 1px solid #BFBFBF;
-      border-radius: 4px;
-      font-size: 0.28rem;
-      color: #3E81F6;
-      width: 1.7rem;
-      display: inline-block;
+    .timeLine-wrapper {
+      width: 100%;
+      padding: 0.1rem 0 0.1rem 0rem;
+      height: 1.4rem;
+      margin: 0
     }
   }
+  div.timeLine {
+    background: #FFFFFF;
+    border: 1px solid #BFBFBF;
+    border-radius: 4px;
+    font-size: 0.28rem;
+    color: #3E81F6;
+    width: 1.7rem;
+    display: inline-block;
+    height: 0.5rem;
+    line-height: 0.5rem
+  }
   .footerBtn {
     padding: 0 0 0 0.15rem;
     height: 1rem;
@@ -951,5 +1480,10 @@
       width: 1.3rem;
       text-align: center;
     }
+    .cancel {
+      background: #fff;
+      color: #333;
+      height: 0.98rem;
+    }
   }
 </style>

+ 22 - 14
pages/mobile/center/vendor/customer/index.vue

@@ -47,7 +47,7 @@
           <div>
             <div class="customer-modal-wrapper">
               <div class="search-content mi-search-content">
-                <input type="text" v-model="modalObj.keyword" @input="modalObjonFilter" placeholder="输入用户UU">
+                <input type="text" v-model="modalObj.keyword" @input="modalObjonFilter" placeholder="手机号/用户名">
                 <span @click="modalObjonFilter"><i class="iconfont icon-sousuo"></i></span>
               </div>
               <div class="customer-modal-content">
@@ -59,7 +59,7 @@
                   <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: 32%;">手机</span>
                   <span class="item inline-block" style="width: 40%;text-align: center">用户名称</span>
                 </div>
                 <template v-if="modalObj.type === 'add'">
@@ -68,7 +68,7 @@
                   <span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
                     <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: 32%;">{{item.userTel}}</span>
                     <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
                   </div>
                 </template>
@@ -79,7 +79,7 @@
                   <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: 32%;">{{item.userTel}}</span>
                     <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
                   </div>
                   <!-- 客户转移 && 当前用户是被管理员转移权限时 -->
@@ -87,7 +87,7 @@
                   <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: 32%;">{{item.userTel}}</span>
                     <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
                   </div>
                   <!-- 客户转移 && 当前用户是非管理员,但有查看权限时 -->
@@ -95,7 +95,7 @@
                   <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: 32%;">{{item.userTel}}</span>
                     <span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
                   </div>
                 </template>
@@ -129,6 +129,10 @@
           count: 10,
           page: 1
         },
+        modalParams: {
+          count: 100000000,
+          page: 1
+        },
         collectResult: '',
         timeoutCount: 0,
         resourceList: {
@@ -160,7 +164,7 @@
           if (this.modalObj.customer.myEnterprise.uu) {
             // 当前用户是管理员时
             if (this.thisUser.sys) {
-                this.$http.post(`/account/user/transferUserToVendor/${this.modalObj.customer.myEnterprise.uu}`, this.modalObj.originList).then(data => {
+                this.$http.post(`/account/user/transferUserToVendor/${this.modalObj.customer.id}`, this.modalObj.originList).then(data => {
                   this.onMind('转移成功!')
                   this.closeModal()
                   this.setSelect(true)
@@ -198,9 +202,10 @@
             this.closeModal()
           }
         } else {
-          this.$http.post(`/account/user/bindUserToVendor/${this.modalObj.customer.myEnterprise.uu}`, this.modalObj.originList).then(res => {
+          this.$http.post(`/account/user/bindUserToVendor/${this.modalObj.customer.id}`, this.modalObj.originList).then(res => {
             this.onMind('分配成功!')
             this.closeModal()
+            this.setSelect(true)
           }).catch(err => {
             this.onMind('保存失败!')
             this.closeModal()
@@ -269,8 +274,9 @@
       },
       modalObjonFilter() {
         let _arr = []
+        let keys = this.modalObj.keyword
         this.modalObj.originList.forEach(item => {
-          if (item.userUU.toString().indexOf(this.modalObj.keyword) > -1) {
+          if ((String(item.userTel).indexOf(keys) > -1) || (String(item.userName).indexOf(keys) > -1)) {
             _arr.push(item)
           }
         })
@@ -278,13 +284,14 @@
       },
       // 分配
       async addUserInfo(customer) {
+        this.modalObj.keyword = ''
         this.modalObj.type = 'add'
         this.modalObj.customer = customer
         this.$http.get(`/account/user/getEnTransfer/${customer.myEnterprise.uu}`).then(res => {
           customer.enTransfer = res.data.result
           if (this.enabled || customer.enTransfer) {
-            this.$http.post(`/account/user/customer/${customer.myEnterprise.uu}`).then(data => {
-                customer.userinfos = data.data
+            this.$http.get(`/account/user/customer/${customer.id}`, {params: this.modalParams}).then(data => {
+                customer.userinfos = data.data.content
                 this.modalObj.showModal = true
                 this.modalObj.showModalList = customer.userinfos
                 this.modalObj.originList = customer.userinfos
@@ -297,16 +304,17 @@
       },
       // 转移
       transferUserInfo(customer) {
+        this.modalObj.keyword = ''
         this.modalObj.type = 'chance'
         this.modalObj.customer = customer
-        this.$http.get(`/account/user/getDistribute/${customer.myEnterprise.uu}`).then(res => {
+        this.$http.get(`/account/user/getDistribute/${customer.id}`).then(res => {
           customer.enTransfer = res.data.result
           if (this.enabled || customer.enTransfer) {
             this.$http.get('/authentication').then(res => {
               this.thisUser = res.data
             })
-            this.$http.post(`/account/user/customer/${customer.myEnterprise.uu}`).then(data => {
-              customer.userinfos = data.data
+            this.$http.get(`/account/user/customer/${customer.id}`, {params: this.modalParams}).then(data => {
+              customer.userinfos = data.data.content
               customer.userinfos.forEach(user => {
                 if (this.$store.state.option.user.data.userUU === user.userUU && user.transfer) {
                   this.transfer = true

+ 0 - 0
store/hotSearchBrand.js → store/hotSearch.js


+ 0 - 18
store/hotSearchDevice.js

@@ -1,18 +0,0 @@
-export const state = () => ({
-  hot: {
-    fetching: false,
-    data: []
-  }
-})
-export const mutations = {
-  REQUEST_HOT (state) {
-    state.hot.fetching = true
-  },
-  GET_HOT_FAILURE (state) {
-    state.hot.fetching = false
-  },
-  GET_HOT_SUCCESS (state, result) {
-    state.hot.fetching = false
-    state.hot.data = result
-  }
-}

+ 12 - 24
store/index.js

@@ -59,9 +59,7 @@ export const actions = {
     }
     return Promise.all([
       // 全局数据
-      store.dispatch('loadUserInfo'),
-      store.dispatch('loadHotSearchDevice'),
-      store.dispatch('loadHotSearchBrand')
+      store.dispatch('loadUserInfo')
     ])
   },
   // 获取用户信息
@@ -136,6 +134,17 @@ export const actions = {
       })
   },
 
+  // 获取首页加载热门搜索列表
+  loadHotSearch({ commit }) {
+    commit('hotSearch/REQUEST_HOT')
+    return axios.get('/cmsApi?method=queryContentPage&module=index_hotModels&orderBy=order_number%20ASC')
+      .then(response => {
+        commit('hotSearch/GET_HOT_SUCCESS', response.data)
+      }, err => {
+        commit('hotSearch/GET_HOT_FAILURE', err)
+      })
+  },
+
   // 获取楼层配置和特价信息
   loadNewFloors({ commit }, params = {}) {
     commit('floor/REQUEST_NEWLIST')
@@ -422,27 +431,6 @@ export const actions = {
         commit('help/GET_DETAIL_FAILURE', err)
       })
   },
-
-  // 获取最多搜索量的 器件
-  loadHotSearchDevice({ commit }) {
-    commit('hotSearchDevice/REQUEST_HOT')
-    return axios.get('/api/product/component/mostSearchComponent')
-      .then(response => {
-        commit('hotSearchDevice/GET_HOT_SUCCESS', response.data)
-      }, err => {
-        commit('hotSearchDevice/GET_HOT_FAILURE', err)
-      })
-  },
-  // 获取最多搜索量的 品牌
-  loadHotSearchBrand({ commit }) {
-    commit('hotSearchBrand/REQUEST_HOT')
-    return axios.get('/api/product/brand/mostSearchBrands')
-      .then(response => {
-        commit('hotSearchBrand/GET_HOT_SUCCESS', response.data)
-      }, err => {
-        commit('hotSearchBrand/GET_HOT_FAILURE', err)
-      })
-  },
   // 获取用户开店信息
   loadStoreStatus({ commit }, params = {}) {
     commit('option/REQUEST_STORE_STATUS')

Some files were not shown because too many files changed in this diff