Browse Source

Merge branch 'release-201904-wangcz'

wangcz 6 years ago
parent
commit
b27e3bcb11

+ 6 - 0
components/mobile/MobileHeader.vue

@@ -253,6 +253,12 @@
         } else if (this.startWith(val, '/mobile/center/vendor/invoice')) {
           this.showSearchIcon = false
           title = '开票管理'
+        } else if (this.startWith(val, '/mobile/center/vendor/accept')) {
+          this.showSearchIcon = false
+          title = '客户验收单'
+        } else if (this.startWith(val, '/mobile/center/vendor/returns')) {
+          this.showSearchIcon = false
+          title = '客户验退单'
         } else if (this.startWith(val, '/mobile/center/vendor/sample')) {
           this.showSearchIcon = false
           title = '打样管理'

+ 3 - 0
components/mobile/common/StatisticsMobile.vue

@@ -50,6 +50,9 @@
       }
     },
     mounted () {
+      let yearDate = new Date().getFullYear()
+      this.nameRight[2] = (yearDate - 1) + '年交易'
+      this.nameRight[3] = yearDate + '年交易'
       this.$nextTick(() => {
         this.changeIntervalL(true)
         this.changeIntervalR(true)

+ 14 - 12
components/pcb/product/Detail.vue

@@ -47,18 +47,20 @@
         <div class="shop-info">
           <p class="shop-name">{{storeInfo.storeName}}</p>
           <img class="identify" src="/images/pcb/identified.png">
-          <div class="info-line">
-            <span class="inline-block">电话:</span>
-            <span class="inline-block">{{storeInfo.enterprise.enTel || '暂无信息'}}</span>
-          </div>
-          <div class="info-line">
-            <span class="inline-block">传真:</span>
-            <span class="inline-block">{{storeInfo.enterprise.enFax || '暂无信息'}}</span>
-          </div>
-          <div class="info-line">
-            <span class="inline-block">地址:</span>
-            <span class="inline-block">{{storeInfo.enterprise.enAddress || '暂无信息'}}</span>
-          </div>
+          <template v-if="storeInfo.enterprise">
+            <div class="info-line">
+              <span class="inline-block">电话:</span>
+              <span class="inline-block">{{storeInfo.enterprise.enTel || '暂无信息'}}</span>
+            </div>
+            <div class="info-line">
+              <span class="inline-block">传真:</span>
+              <span class="inline-block">{{storeInfo.enterprise.enFax || '暂无信息'}}</span>
+            </div>
+            <div class="info-line">
+              <span class="inline-block">地址:</span>
+              <span class="inline-block">{{storeInfo.enterprise.enAddress || '暂无信息'}}</span>
+            </div>
+          </template>
           <div class="link">
             <span class="link-btn" @click="goLink()"><img src="/images/pcb/link.png" alt="">联系卖家</span>
           </div>

+ 1 - 1
components/store/common/StoreHeader.vue

@@ -40,7 +40,7 @@
               </div>
               <div class="clearfix"></div>
             </div>
-            <div style="background: #FFFFFF;" v-if="isOpen">
+            <div style="background: #FFFFFF;" v-if="isOpen && storeInfo.enterprise">
               <ul class = "shop-contact list-unstyled" style="padding: 15px 0; margin-bottom: 0; border-top: #e8e8e8 1px solid; margin-top: 20px;">
                 <li v-if="storeInfo.enterprise.enTel">
                   <span class="public">电话:</span><span v-text="storeInfo.enterprise.enTel"></span>

+ 318 - 0
pages/mobile/center/vendor/accept/index.vue

@@ -0,0 +1,318 @@
+<template>
+  <div class="order-wrapper">
+    <div class="search-content search-content2">
+      <input type="text" placeholder="验收单/买家名称" v-model="filterParams.keyword" @keyup.13="searchOrderlist">
+      <span @click="searchOrderlist">
+          <i class="iconfont icon-sousuo"></i>
+      </span>
+    </div>
+    <div class="filters-wrap">
+      <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>
+    <ul class="order-list-wrap" id="b2border-wrapper" v-show="orderList.length > 0">
+      <li v-for="item in orderList" @click="lookItem(item)">
+        <div class="list-title">
+          <span>买家:</span>
+          <label v-html="item.enterprise.enName" style="color: #3F84F6;font-weight: 500"></label>
+        </div>
+        <div class="list-content">
+          <div class="item">
+            <span>验收单号:</span>
+            <label v-html="item.code || '-'" style="color: #333;font-weight: 500"></label>
+          </div>
+          <div class="item">
+            <span>送货单号:</span>
+            <label v-html="item.sendCode || '-'" style="color: #333;font-weight: 500"></label>
+          </div>
+          <div class="item">
+            <span>金额:</span>
+            <label v-html="item.currency" style="color: #333;font-weight: 500"></label>&nbsp;
+            <label v-html="item.totalPrice " style="color: #333;font-weight: 500"></label>
+          </div>
+          <div class="item">
+            <span>付款方式:</span>
+            <label v-html="item.payments" style="color: #333;font-weight: 500"></label>
+          </div>
+          <div class="item">
+            <span>验收日期:</span>
+            <label style="color: #333;font-weight: 500">{{item.date | timeDay}}</label>
+          </div>
+        </div>
+        <div class="list-bottom">
+          <span>明细</span>
+        </div>
+      </li>
+    </ul>
+    <div v-if="orderList.length === 0" class="com-none-state">
+      <img src="/images/mobile/@2x/search-empty.png">
+      <p>抱歉,暂无订单消息</p>
+      <nuxt-link to="/">返回首页</nuxt-link>
+    </div>
+    <pull-up :fixId="'b2border-wrapper'"
+             :allPage="allPage"
+             :page="page"
+             :FixedEl="true"
+             @pullUpAction="getMoreSearch"></pull-up>
+  </div>
+</template>
+
+<script>
+  import { RemindBox, PullUp } from '~components/mobile/common'
+  import { BaseFilter } from '~components/mobile/base'
+  export default {
+    name: 'returns',
+    layout: 'mobile',
+    middleware: 'authenticated',
+    data() {
+      return {
+        filterOptions: [
+          {
+            title: '交易时间',
+            selectOption: 'date',
+            selectItems: [{
+              key: '30天',
+              val: 1
+            }, {
+              key: '90天',
+              val: 2
+            }, {
+              key: '180天',
+              val: 3
+            }, {
+              key: '自定义',
+              val: 4
+            }],
+            defaultVal: 1
+          }
+        ],
+        filterParams: {
+          keyword: ''
+        },
+        page: 1,
+        orderList: [],
+        allPage: 0
+      }
+    },
+    created() {
+      this.getResource()
+    },
+    methods: {
+      lookItem(bill) {
+        this.$router.push('/mobile/center/vendor/accept_returns_details?type=accept' + '&id=' + bill.id)
+      },
+      setSelect (type, val, isReload) {
+        if (type === 'date') {
+          if (val) {
+            this.filterParams.fromDate = val.fromDate
+            this.filterParams.toDate = val.toDate
+          } else {
+            this.filterParams.fromDate = null
+            this.filterParams.toDate = null
+          }
+        } else {
+          this.filterParams[type] = val
+        }
+        isReload && this.filterRecord()
+      },
+      initFilterParams () {
+        this.filterParams = {
+          keyword: '',
+          fromDate: '',
+          toDate: ''
+        }
+      },
+      filterRecord () {
+        this.page = 1
+        this.getResource(true)
+      },
+      onSelectAction (selectObj) {
+        this.setSelect(selectObj.key, selectObj.value, true)
+      },
+      onValueAction (selectObj) {
+        this.setSelect(selectObj.key, selectObj.value, false)
+      },
+      getResource(Reset) {
+        this.$http.get('/btob/sale/accept', {params: {
+            count: 10,
+            page: this.page,
+            searchFilter: this.filterParams,
+            sorting: {'date': 'desc'}
+          }}).then(res => {
+          if (Reset) {
+            this.orderList = []
+          }
+          this.orderList.push(...res.data.content)
+          this.allPage = Math.floor(res.data.totalElement / 10)
+          this.orderList.forEach(data => {
+            let sum = 0
+            data.acceptItems.forEach((item) => {
+              if (item.orderPrice == null) {
+                item.orderPrice = 0
+              }
+              sum += item.orderPrice * item.qty
+            })
+            data.totalPrice = sum.toFixed(2)
+          })
+        })
+      },
+      getMoreSearch() {
+        this.page++
+        this.getResource()
+      },
+      searchOrderlist() {
+        this.page = 1
+        this.getResource(true)
+      }
+    },
+    components: {
+      RemindBox, PullUp, BaseFilter
+    },
+    filters: {
+      timeDay: 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 scoped lang="scss">
+  @mixin overFlowHidden {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  @mixin lineHeight($value) {
+    height: $value;
+    line-height: $value;
+  }
+
+  .order-wrapper {
+    background: #f1f3f6;
+    margin: 1.26rem 0 0.98rem 0;
+    height: calc(100vh - 1.26rem - 0.98rem);
+    /*padding-bottom: 0.96rem;*/
+    .filters-wrap{
+      background: #fff;
+      margin: 0 auto .13rem;
+      width: 7.1rem;
+      overflow: hidden;
+      padding: .1rem;
+    }
+    .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;
+        }
+      }
+    }
+    .search-content2 {
+      text-align: center;
+      padding: .25rem 0 0 0;
+      margin-top: 0 !important;
+      margin-bottom:.25rem;
+      input {
+        width: 7.1rem;
+        border: 1px solid #376ff3;
+      }
+    }
+    .order-list-wrap {
+      height: calc(100vh - 1.26rem - 0.96rem - 0.84rem - 1rem - 0.92rem);
+      overflow-y: scroll;
+      li {
+        background: #fff;
+        width: 7.1rem;
+        margin: 0 auto 0.2rem;
+        border-radius: 0.04rem;
+        border: 1px solid #e4e4e4;
+        padding: 0 0.24rem;
+        .list-title {
+          @include lineHeight(0.91rem);
+          @include overFlowHidden();
+          font-size: 0.28rem;
+          color: #3a3a3a;
+        }
+        .list-bottom{
+          @include lineHeight(1rem);
+          text-align: center;
+          font-size: 0.26rem;
+          color: #333;
+        }
+        .list-content {
+          padding-top: 0.23rem;
+          border-top: 1px solid #d3d3d3;
+          border-bottom: 1px solid #d3d3d3;
+          .item {
+            font-size: 0.28rem;
+            color: #333;
+            @include overFlowHidden();
+            margin-bottom: 0.15rem;
+            span {
+              color: #666;
+            }
+            &.pric {
+              color: #e6353d;
+            }
+          }
+        }
+      }
+    }
+    .com-none-state{
+      background: #f1f3f6
+    }
+  }
+</style>

+ 276 - 0
pages/mobile/center/vendor/accept_returns_details.vue

@@ -0,0 +1,276 @@
+<template>
+  <div class="orderbtob_details_wrapper">
+    <div class="mobile-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>{{active === 'accept' ? '客户采购验收明细' : '客户采购验退明细'}}</p>
+    </div>
+    <div class="orderbtob_details_content">
+      <div class="orderbtob_details_top">
+        <div class="item clearfix">
+          <span class="name fl">买家:</span>
+          <span class="fl" style="width: 5.2rem">{{listInfo.enterprise.enName || listInfo.custEnterprise.enName || '-'}}</span>
+        </div>
+        <div class="item clearfix">
+          <span class="name fl">验收单号:</span>
+          <span class="fl" style="width: 5.2rem">{{listInfo.code || '-'}}</span>
+        </div>
+        <div class="item clearfix">
+          <span class="name fl">送货单号:</span>
+          <span class="fl" style="width: 5.2rem">{{listInfo.sendCode || '-'}}</span>
+        </div>
+        <div class="item">
+          <span class="name">总金额:</span>
+          {{listInfo.currency}}&nbsp;{{listInfo.totalPrice | computeNum(2)}}
+        </div>
+        <div class="item">
+          <span class="name">付款方式:</span>
+          {{listInfo.payments || '-'}}
+        </div>
+        <div class="item">
+          <span class="name">验收日期:</span>
+          {{listInfo.date | time}}
+        </div>
+      </div>
+      <div class="orderbtob_details_middle">
+        <div class="list" v-for="item in listInfo.keyItems">
+          <div class="item clearfix">
+            <span class="name fl">物料编号:</span>
+            <span class="fl">{{item.product.code || '-'}}</span>
+          </div>
+          <hr>
+          <div class="item clearfix">
+            <span class="name fl">品牌:</span>
+            <span class="fl" style="width: 5rem">{{item.product.brand || '-'}}</span>
+          </div>
+          <div class="item clearfix">
+            <span class="name fl">物料名称:</span>
+            <span class="fl" style="width: 5rem">{{item.product.title || '-'}}</span>
+          </div>
+          <div class="item clearfix">
+            <span class="name fl">型号规格:</span>
+            <span class="fl" style="width: 5rem">{{item.product.spec || '-'}}</span>
+          </div>
+          <div class="item clearfix">
+            <span class="name fl">订单:</span>
+            <span class="fl" v-if="item.orderItem">{{item.orderItem.order.code || '-'}}</span>
+            <span class="fl" v-else>-</span>
+          </div>
+          <div class="item clearfix">
+            <span class="name fl">批号:</span>
+            <span class="fl">{{item.batchCode || '-'}}</span>
+          </div>
+          <div class="item clearfix">
+            <span class="name fl">单位:</span>
+            <span class="fl">{{item.product.unit || '-'}}</span>
+          </div>
+          <div class="item clearfix">
+            <span class="name fl">数量:</span>
+            <span class="fl">{{item.qty || '-'}}</span>
+          </div>
+          <div class="item clearfix">
+            <span class="name fl">单价:</span>
+            <span class="fl">{{listInfo.currency}} {{item.orderPrice | computeNum(2) || '-'}}</span>
+          </div>
+          <div class="clearfix" style="border-top:1px solid #D9D9D9;padding-right: 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.itemTotalPrice | computeNum(2)}}</div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
+  </div>
+</template>
+
+<script>
+  import { RemindBox } from '~components/mobile/common'
+  export default {
+    name: 'accept_returns_details',
+    layout: 'mobileActivity',
+    middleware: 'authenticated',
+    data() {
+      return {
+        active: this.$route.query.type,
+        detailsId: this.$route.query.id,
+        isUser: '',
+        listInfo: {
+          enterprise: {},
+          custEnterprise: {},
+          keyItems: []
+        },
+        collectResult: '',
+        timeoutCount: 0
+      }
+    },
+    created() {
+      this.$nextTick(() => {
+        this.getInitInfo()
+        this._getToken()
+      })
+    },
+    methods: {
+      _iniFo(str) {
+        this.collectResult = str
+        this.timeoutCount++
+      },
+      getInitInfo() {
+        this.$http.get(`/btob/sale/${this.active}/${this.detailsId}/info`).then(res => {
+          this.listInfo = res.data
+          let sum = 0
+          let key = this.active === 'accept' ? 'acceptItems' : 'returnItems'
+          this.listInfo[key].forEach(data => {
+            if (data.orderPrice == null) {
+              data.orderPrice = 0
+            }
+            data.itemTotalPrice = data.orderPrice * data.qty
+            sum += data.orderPrice * data.qty
+          })
+          this.listInfo.totalPrice = sum
+          this.listInfo.keyItems = this.baseUtils.deepCopy(this.listInfo[key])
+          this.listInfo.enterprise = this.listInfo.enterprise ? this.baseUtils.deepCopy(this.listInfo.enterprise) : {}
+          this.listInfo.custEnterprise = this.listInfo.custEnterprise ? this.baseUtils.deepCopy(this.listInfo.custEnterprise) : {}
+          console.log(this.listInfo)
+        })
+      },
+      _getToken() {
+        this.$http.get('/btob/account/role/isUser').then(res => {
+          this.isUser = res.data.isUser
+        })
+      }
+    },
+    components: {
+      RemindBox
+    },
+    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 < 10 ? '0' + (d.getMonth() + 1) : '' + (d.getMonth() + 1)
+            let day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
+            return year + '-' + month + '-' + day
+          }
+        }
+      },
+      computeNum: function(price, num) {
+        return Math.floor(price * 100) / 100
+        // price.toString().toFixed(num)
+      }
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .orderbtob_details_wrapper {
+    background: #f5f5f5;
+    position: absolute;
+    height: 100%;
+    width: 100%;
+    overflow-y: scroll;
+    .mobile-header{
+      position: fixed;
+      top: 0;
+      z-index: 10;
+      width:100%;
+      height:.88rem;
+      line-height: .88rem;
+      /*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;
+      margin: 0;
+      width: 6rem;
+      padding-left: 1rem;
+    }
+    .mobile-header a{
+      font-size:.28rem;
+      color:#fff;
+      position: absolute;
+    }
+    .mobile-header a i{
+      font-size: .48rem;
+      margin-right: -.1rem;
+    }
+    .orderbtob_details_content {
+      margin-top: 0.9rem;
+      padding: 0.2rem;
+      .orderbtob_details_top {
+        background: #3f84f6;
+        border-radius: 0.07rem;
+        border: solid 0.01rem #e3e5e8;
+        padding: 0.24rem 0.2rem 0.14rem;
+        .item {
+          color: #fff;
+          font-size: 0.28rem;
+          margin-bottom: 0.1rem;
+        }
+      }
+      .orderbtob_details_middle {
+        margin-top: 0.2rem;
+        .list {
+          border: solid 1px #e3e5e8;
+          border-radius: 0.07rem;
+          overflow: hidden;
+          color: #333;
+          font-size: 0.28rem;
+          padding: 0.24rem 0.2rem;
+          margin-bottom: 0.2rem;
+          background: #fff;
+          .item {
+            margin-bottom: 0.1rem;
+            line-height: 0.5rem;
+            word-break: break-all;
+            word-wrap:break-word;
+          }
+          .ovrflow {
+            width: 5.2rem;
+            line-height: 0.5rem
+          }
+          .name {
+            color: #666;
+            display: inline-block;
+          }
+          .dateinput {
+            width: 3.49rem;
+            height: .5rem;
+            line-height: .5rem;
+            border: 1px solid #aeaeae;
+            font-size: .26rem;
+            vertical-align: middle;
+            background: #fff;
+            border-radius: 0;
+            margin-right: 0.05rem;
+          }
+        }
+      }
+      .noborder{
+        border: 0
+      }
+    }
+    .icon-add {
+      color: #00d300;
+      font-size: 0.4rem
+    }
+    .icon-minus {
+      color: #cacaca;
+      font-size: 0.4rem;
+      display: block;
+    }
+    .posixicon {
+      position: absolute;
+      right: 0.3rem;
+      width: 0.4rem;
+      top: 0;
+    }
+  }
+</style>

+ 12 - 4
pages/mobile/center/vendor/index.vue

@@ -66,10 +66,6 @@
             <img src="/images/mobile/center/vendor/material-person.png" alt="">
             <p>出库</p>
           </nuxt-link>
-          <nuxt-link tag="li" to="/mobile/center/vendor/message"  v-if="user.data.enterprise.uu">
-            <img src="/images/mobile/center/user/message.png" alt="">
-            <p>消息中心<span class="text" v-if="messageCount.count > 0">{{messageCount.count && messageCount.count >= 99 ? 99 : messageCount.count || 0}}</span></p>
-          </nuxt-link>
           <nuxt-link tag="li" to="/mobile/center/vendor/customer">
             <img src="/images/mobile/center/vendor/customer.png" alt="">
             <p>客户资料</p>
@@ -78,6 +74,18 @@
             <img src="/images/mobile/center/vendor/sample.png" alt="">
             <p>打样管理</p>
           </nuxt-link>
+          <nuxt-link tag="li" to="/mobile/center/vendor/accept">
+            <img src="/images/mobile/center/vendor/accept.png" alt="">
+            <p>客户验收单</p>
+          </nuxt-link>
+          <nuxt-link tag="li" to="/mobile/center/vendor/returns">
+            <img src="/images/mobile/center/vendor/returns.png" alt="">
+            <p>客户验退单</p>
+          </nuxt-link>
+          <nuxt-link tag="li" to="/mobile/center/vendor/message"  v-if="user.data.enterprise.uu">
+            <img src="/images/mobile/center/user/message.png" alt="">
+            <p>消息中心<span class="text" v-if="messageCount.count > 0">{{messageCount.count && messageCount.count >= 99 ? 99 : messageCount.count || 0}}</span></p>
+          </nuxt-link>
         </ul>
       </div>
 

+ 318 - 0
pages/mobile/center/vendor/returns/index.vue

@@ -0,0 +1,318 @@
+<template>
+  <div class="order-wrapper">
+    <div class="search-content search-content2">
+      <input type="text" placeholder="验退单/买家名称" v-model="filterParams.keyword" @keyup.13="searchOrderlist">
+      <span @click="searchOrderlist">
+          <i class="iconfont icon-sousuo"></i>
+      </span>
+    </div>
+    <div class="filters-wrap">
+      <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>
+    <ul class="order-list-wrap" id="b2border-wrapper" v-show="orderList.length > 0">
+      <li v-for="item in orderList" @click="lookItem(item)">
+        <div class="list-title">
+          <span>买家:</span>
+          <label v-html="item.custEnterprise.enName" style="color: #3F84F6;font-weight: 500"></label>
+        </div>
+        <div class="list-content">
+          <div class="item">
+            <span>验退单号:</span>
+            <label v-html="item.code || '-'" style="color: #333;font-weight: 500"></label>
+          </div>
+          <div class="item">
+            <span>送货单号:</span>
+            <label v-html="item.sendCode || '-'" style="color: #333;font-weight: 500"></label>
+          </div>
+          <div class="item">
+            <span>金额:</span>
+            <label v-html="item.currency" style="color: #333;font-weight: 500"></label>&nbsp;
+            <label v-html="item.totalPrice " style="color: #333;font-weight: 500"></label>
+          </div>
+          <div class="item">
+            <span>付款方式:</span>
+            <label v-html="item.payments" style="color: #333;font-weight: 500"></label>
+          </div>
+          <div class="item">
+            <span>验退日期:</span>
+            <label style="color: #333;font-weight: 500">{{item.date | timeDay}}</label>
+          </div>
+        </div>
+        <div class="list-bottom">
+          <span>明细</span>
+        </div>
+      </li>
+    </ul>
+    <div v-if="orderList.length === 0" class="com-none-state">
+      <img src="/images/mobile/@2x/search-empty.png">
+      <p>抱歉,暂无订单消息</p>
+      <nuxt-link to="/">返回首页</nuxt-link>
+    </div>
+    <pull-up :fixId="'b2border-wrapper'"
+             :allPage="allPage"
+             :page="page"
+             :FixedEl="true"
+             @pullUpAction="getMoreSearch"></pull-up>
+  </div>
+</template>
+
+<script>
+  import { RemindBox, PullUp } from '~components/mobile/common'
+  import { BaseFilter } from '~components/mobile/base'
+  export default {
+    name: 'returns',
+    layout: 'mobile',
+    middleware: 'authenticated',
+    data() {
+      return {
+        filterOptions: [
+          {
+            title: '交易时间',
+            selectOption: 'date',
+            selectItems: [{
+              key: '30天',
+              val: 1
+            }, {
+              key: '90天',
+              val: 2
+            }, {
+              key: '180天',
+              val: 3
+            }, {
+              key: '自定义',
+              val: 4
+            }],
+            defaultVal: 1
+          }
+        ],
+        filterParams: {
+          keyword: ''
+        },
+        page: 1,
+        orderList: [],
+        allPage: 0
+      }
+    },
+    created() {
+      this.getResource()
+    },
+    methods: {
+      lookItem(bill) {
+        this.$router.push('/mobile/center/vendor/accept_returns_details?type=return' + '&id=' + bill.id)
+      },
+      setSelect (type, val, isReload) {
+        if (type === 'date') {
+          if (val) {
+            this.filterParams.fromDate = val.fromDate
+            this.filterParams.toDate = val.toDate
+          } else {
+            this.filterParams.fromDate = null
+            this.filterParams.toDate = null
+          }
+        } else {
+          this.filterParams[type] = val
+        }
+        isReload && this.filterRecord()
+      },
+      initFilterParams () {
+        this.filterParams = {
+          keyword: '',
+          fromDate: '',
+          toDate: ''
+        }
+      },
+      filterRecord () {
+        this.page = 1
+        this.getResource(true)
+      },
+      onSelectAction (selectObj) {
+        this.setSelect(selectObj.key, selectObj.value, true)
+      },
+      onValueAction (selectObj) {
+        this.setSelect(selectObj.key, selectObj.value, false)
+      },
+      getResource(Reset) {
+        this.$http.get('/btob/sale/return', {params: {
+            count: 10,
+            page: this.page,
+            searchFilter: this.filterParams,
+            sorting: {'date': 'desc'}
+          }}).then(res => {
+          if (Reset) {
+            this.orderList = []
+          }
+          this.orderList.push(...res.data.content)
+          this.allPage = Math.floor(res.data.totalElement / 10)
+          this.orderList.forEach(data => {
+            let sum = 0
+            data.returnItems.forEach((item) => {
+              if (item.orderPrice == null) {
+                item.orderPrice = 0
+              }
+              sum += item.orderPrice * item.qty
+            })
+            data.totalPrice = sum.toFixed(2)
+          })
+        })
+      },
+      getMoreSearch() {
+        this.page++
+        this.getResource()
+      },
+      searchOrderlist() {
+        this.page = 1
+        this.getResource(true)
+      }
+    },
+    components: {
+      RemindBox, PullUp, BaseFilter
+    },
+    filters: {
+      timeDay: 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 scoped lang="scss">
+  @mixin overFlowHidden {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  @mixin lineHeight($value) {
+    height: $value;
+    line-height: $value;
+  }
+
+  .order-wrapper {
+    background: #f1f3f6;
+    margin: 1.26rem 0 0.98rem 0;
+    height: calc(100vh - 1.26rem - 0.98rem);
+    /*padding-bottom: 0.96rem;*/
+    .filters-wrap{
+      background: #fff;
+      margin: 0 auto .13rem;
+      width: 7.1rem;
+      overflow: hidden;
+      padding: .1rem;
+    }
+    .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;
+        }
+      }
+    }
+    .search-content2 {
+      text-align: center;
+      padding: .25rem 0 0 0;
+      margin-top: 0 !important;
+      margin-bottom:.25rem;
+      input {
+        width: 7.1rem;
+        border: 1px solid #376ff3;
+      }
+    }
+    .order-list-wrap {
+      height: calc(100vh - 1.26rem - 0.96rem - 0.84rem - 1rem - 0.92rem);
+      overflow-y: scroll;
+      li {
+        background: #fff;
+        width: 7.1rem;
+        margin: 0 auto 0.2rem;
+        border-radius: 0.04rem;
+        border: 1px solid #e4e4e4;
+        padding: 0 0.24rem;
+        .list-title {
+          @include lineHeight(0.91rem);
+          @include overFlowHidden();
+          font-size: 0.28rem;
+          color: #3a3a3a;
+        }
+        .list-bottom{
+          @include lineHeight(1rem);
+          text-align: center;
+          font-size: 0.26rem;
+          color: #333;
+        }
+        .list-content {
+          padding-top: 0.23rem;
+          border-top: 1px solid #d3d3d3;
+          border-bottom: 1px solid #d3d3d3;
+          .item {
+            font-size: 0.28rem;
+            color: #333;
+            @include overFlowHidden();
+            margin-bottom: 0.15rem;
+            span {
+              color: #666;
+            }
+            &.pric {
+              color: #e6353d;
+            }
+          }
+        }
+      }
+    }
+    .com-none-state{
+      background: #f1f3f6
+    }
+  }
+</style>

BIN
static/images/mobile/center/vendor/accept.png


BIN
static/images/mobile/center/vendor/returns.png