Browse Source

Merge remote-tracking branch 'origin/feature-201823-wangcz' into feature-201823-wangcz

wangcz 7 years ago
parent
commit
1bf44256c8

+ 6 - 0
assets/scss/mobilePayCenter.scss

@@ -94,6 +94,12 @@ $base-color: #3f84f6;
           &:first-child {
             border-right: 1px solid #d9d9d9;
           }
+          &.default-icon {
+            color: #15b262;
+            i {
+              color: #15b262;
+            }
+          }
         }
       }
     }

+ 10 - 2
components/mobile/MobileHeader.vue

@@ -212,13 +212,21 @@
           title = '购物车'
         } else if (this.startWith(val, '/mobile/center/user/payCenter')) {
           this.showSearchIcon = false
-          title = '应付对账'
+          if (this.$route.query.type) {
+            title = '付款账户'
+          } else {
+            title = '应付对账'
+          }
         } else if (this.startWith(val, '/mobile/center/user/invoice')) {
           this.showSearchIcon = false
           title = '发票管理'
         } else if (this.startWith(val, '/mobile/center/vendor/payCenter')) {
           this.showSearchIcon = false
-          title = '应收对账'
+          if (this.$route.query.type) {
+            title = '收款账户'
+          } else {
+            title = '应收对账'
+          }
         } else if (this.startWith(val, '/mobile/center/user/pay')) {
           this.showSearchIcon = false
           title = '确认订单'

+ 3 - 3
components/mobile/applyPurchase/SeekList.vue

@@ -36,7 +36,7 @@
               截止日期:
               <span class="date">{{item.endDate | date}}</span>
             </div>
-            <template v-if="item.quotation">
+            <!--<template v-if="item.quotation">
               <p class="remain-time" v-if="item.remainingTime > 0">剩余&nbsp;:
                 <span v-if="getDay(item.remainingTime) > 0" v-text="getDay(item.remainingTime)"></span>
                 <i v-if="getDay(item.remainingTime) > 0">&nbsp;天&nbsp;</i>
@@ -44,7 +44,7 @@
                 <i v-if="getDay(item.remainingTime) <= 0">&nbsp;小时</i>
               </p>
               <p class="remain-time" v-else><span>已截止</span></p>
-            </template>
+            </template>-->
           </div>
           <div class="fr" :class="{'no-btn': !isSelfSeek(item) && !canSayPrice(item) && !canSeeInfo(item), 'is-qutation': item.quotation, 'is-simple': userType !== 'buyer' && item.quotation}">
             <template v-if="item.quotation">
@@ -63,7 +63,7 @@
                 交期(天):
                 <span class="date">{{item.quotation.leadtime || '-'}}</span>
               </div>
-              <table class="com-price-list">
+              <table class="com-price-list" v-if="item.quotation.replies && item.quotation.replies.length">
                 <thead>
                 <tr>
                   <th>分段数量</th>

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

@@ -10,7 +10,7 @@
         <span class="mobile-switch-btn" :class="{'active': activeType=='all'}" @click="switchActiveType('all')">公司商机</span>
         <span class="mobile-switch-btn" :class="{'active': activeType=='self'}" @click="switchActiveType('self')">我的商机</span>
       </div>
-      <div class="product-switch-item" v-if="userType == 'buyer'">
+      <div class="product-switch-item" v-if="userType == 'buyer' && seekType !== 'done'">
         <span :class="overdue==='attention'?'mobile-switch-btn active':'mobile-switch-btn'" @click="ChangeTab('attention')">未截止</span>
         <span :class="overdue==='isattention'?'mobile-switch-btn active':'mobile-switch-btn'" @click="ChangeTab('isattention')">已截止</span>
       </div>

+ 7 - 2
components/mobile/staffManagement/StaffAdd.vue

@@ -108,14 +108,12 @@
     },
     computed: {
       userInfo () {
-        console.log(this.$store.state.option.user.data)
         return this.$store.state.option.user.data
       }
     },
     mounted () {
       this.$nextTick(() => {
         window.addEventListener('click', () => {
-          console.log(1)
           this.showChooseSex = false
         }, false)
       })
@@ -242,6 +240,13 @@
               this.reBindError = false
               this.illegalError = false
             }
+          }).catch (err =>{
+            if (err) {
+              this.showSearchUser = false
+              this.bindUser = false
+              this.reBindError = false
+              this.illegalError = false
+            }
           })
         }
       },

+ 26 - 20
components/mobile/staffManagement/StaffList.vue

@@ -44,13 +44,13 @@
             </div>
           </div>
           <empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
-          <pull-up :fixId="'mobile-staff-center'" :isValid="isValid" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+          <pull-up :fixId="'mobile-staff-center'" :isValid="activeTab == 0 && switchType === 'info'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
           <nuxt-link class="staff-add" :to="'/mobile/user/staff/add'"><i class="iconfont icon-add"></i>新增用户</nuxt-link>
         </div>
         <div class="staff-record" v-if="switchType === 'Audit'">
           <div class="search-content">
-            <input type="text" placeholder="人员姓名、电话号码、邮箱" v-model="auditSearch" @keyup.13="auditRecord()">
-            <span @click="auditRecord()"><i class="iconfont icon-sousuo"></i></span>
+            <input type="text" placeholder="人员姓名、电话号码、邮箱" v-model="auditSearch" @keyup.13="searchAudit()">
+            <span @click="searchAudit()"><i class="iconfont icon-sousuo"></i></span>
           </div>
           <div class="list-content" v-if="AuditList && AuditList.length">
             <div class="bg" v-for="item in AuditList">
@@ -67,7 +67,7 @@
             </div>
           </div>
           <empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
-          <pull-up :fixId="'mobile-staff-center'" :searchMore="fetch" :allPage="allPageAudit" :page="page" @pullUpAction="onPullUpAudit"></pull-up>
+          <pull-up :fixId="'mobile-staff-center'" :isValid="switchType === 'Audit'" :searchMore="fetch" :allPage="allPageAudit" :page="page" @pullUpAction="onPullUpAudit"></pull-up>
         </div>
       </div>
       <!--编辑角色-->
@@ -89,8 +89,6 @@
           <div class="agree handle" @click="sureEdit">确定</div>
         </div>
       </div>
-      <pull-up :fixId="'mobile-staff-center'" :isValid="isValid" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
-      <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
     </div>
     <!--删除员工弹框-->
     <div class="deleteKuang" v-if="showDelete">
@@ -130,7 +128,6 @@
         checked: false,
         rolesList: [],
         currentStaff: [],
-        isValid: true,
         role: '全部角色',
         showRole: false
       }
@@ -163,7 +160,9 @@
             this.staffDataList = []
             this.isChange = false
           }
-          this.staffDataList = [...this.staffDataList, ...val.content]
+          if (val && val.content) {
+            this.staffDataList = [...this.staffDataList, ...val.content]
+          }
         },
         immediate: true
       },
@@ -173,22 +172,25 @@
             this.AuditList = []
             this.hasChange = false
           }
-          this.AuditList = [...this.AuditList, ...val.content]
-        }
+          if (val && val.content) {
+            this.AuditList = [...this.AuditList, ...val.content]
+          }
+        },
+        immediate: true
       }
     },
     computed: {
       staffData () {
-        return this.$store.state.staff.infoList.info.data.content ? this.$store.state.staff.infoList.info.data : {content:[]}
+        return this.$store.state.staff.infoList.info.data
       },
       fetching () {
-        return this.staffData.fetching
+        return this.$store.state.staff.infoList.info.fetching
       },
       allPage () {
         return Math.floor(this.staffData.totalElements / this.staffData.size) + Math.floor(this.staffData.totalElements % this.staffData.size > 0 ? 1 : 0)
       },
       auditBind () {
-        return this.$store.state.staff.infoList.audit.data.content ? this.$store.state.staff.infoList.audit.data : {content:[]}
+        return this.$store.state.staff.infoList.audit.data
       },
       fetch () {
         return this.$store.state.staff.infoList.audit.fetching
@@ -211,8 +213,10 @@
         this.switchType = type
         this.page = 1
         if ( type === 'info') {
+          this.isChange = true
           this.staffRecord()
         } else {
+          this.hasChange = true
           this.auditRecord()
         }
       },
@@ -223,7 +227,6 @@
       onPullUpAction: function () {
         this.page++
         this.staffList()
-        this.isValid = true
       },
       // 员工列表搜索
       staffRecord () {
@@ -254,9 +257,9 @@
             this.isChange = true
             this.staffList()
           }).catch(data => {
-          this.showDelete = false
-          this.onRemind(data.response.data)
-        })
+            this.showDelete = false
+            this.onRemind(data.response.data)
+          })
       },
       // 打开选择
       showRoleEvent (e) {
@@ -293,7 +296,6 @@
       },
       // 获取角色
       getRoles () {
-        this.isValid = false
         this.$http.get('/account/role')
           .then(response => {
             if (response.data) {
@@ -353,9 +355,13 @@
       },
       // 申请绑定搜索
       auditRecord () {
-        this.hasChange = true
         this.$store.dispatch('staff/loadBindAudit', {count: this.count, page: this.page, speaceUU: this.user.data.enterprise.uu, status: 311, keyword: this.auditSearch})
       },
+      searchAudit () {
+        this.hasChange = true
+        this.page = 1
+        this.auditRecord()
+      },
       // 绑定下拉
       onPullUpAudit () {
         this.page++
@@ -368,7 +374,7 @@
             this.onRemind('操作成功!')
             this.auditSearch = ''
             this.page = 1
-            this.auditRecord()
+            this.searchAudit()
           })
       }
     }

+ 1 - 1
pages/mobile/center/user/invoice/index.vue

@@ -3,7 +3,7 @@
     <div class="mobile-nav">
       <div class="mobile-header mobile-center-header">
         <a @click="goLastPage()"><i class="iconfont icon-fanhui"></i></a>
-        <p>票信息</p>
+        <p>票信息</p>
         <p class="en-name">
           <img :src="`/images/mobile/center/${user.data.enterprise && user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}
         </p>

+ 10 - 1
pages/mobile/center/user/invoice/invoiceRecord.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="mobile-invoice invoice-wrapper invoice-record" @click="showFilterInvoiceType = false">
     <div class="order-nav">
-      <nuxt-link to="/mobile/center/user/invoice/waitinvoice" tag="div"><span>申请</span></nuxt-link>
+      <nuxt-link to="/mobile/center/user/invoice/waitinvoice" tag="div"><span>申请开票</span></nuxt-link>
       <nuxt-link to="/mobile/center/user/invoice/invoiceRecord?status=101" tag="div" :class="status === '101' ? 'active' :''"><span>待卖家开票</span></nuxt-link>
       <nuxt-link to="/mobile/center/user/invoice/invoiceRecord?status=102" tag="div" :class="status === '102' ? 'active' :''"><span>已开票</span></nuxt-link>
       <!--<div class="active"><span>已开票</span></div>-->
@@ -105,6 +105,15 @@
                 </div>
               </div>
 
+              <div class="list ">
+                <div class="clearfix">
+                  <div class="pull-left">卖家:</div>
+                  <div class="pull-left" style="width: 5rem;">
+                    {{inv.sellername}}
+                  </div>
+                </div>
+              </div>
+
               <div class="list ">
                 <div class="clearfix">
                   <div class="pull-left">订单号:</div>

+ 1 - 1
pages/mobile/center/user/invoice/waitinvoice.vue

@@ -10,7 +10,7 @@
       </div>
     </div>
     <div class="order-nav">
-      <div class="active"><span>申请</span></div>
+      <div class="active"><span>申请开票</span></div>
       <nuxt-link to="/mobile/center/user/invoice/invoiceRecord?status=101" tag="div"><span>待卖家开票</span></nuxt-link>
       <!--<div class="active"><span>待开票订单</span></div>-->
       <nuxt-link to="/mobile/center/user/invoice/invoiceRecord?status=102" tag=div><span>已开票</span></nuxt-link>

+ 2 - 2
pages/mobile/center/user/payCenter.vue

@@ -31,8 +31,8 @@
             <a class="fr inline-block" @click="deleteAccount(account)">删除</a>
           </div>-->
           <div class="btn-wrap">
-            <a class="inline-block default-icon" v-if="account.num == 1"><i class="iconfont icon-gouxuan1"></i>默认账户</a>
-            <a class="inline-block set-default-icon" v-if="account.num != 1" @click="setDefaultAccount(account)"><i class="iconfont icon-gouxuan1"></i>设为默认</a>
+            <a class="inline-block default-icon" v-if="account.num == 1" @click="setRemindText('该账户是默认账户')"><i class="iconfont icon-gouxuan1"></i>默认账户</a>
+            <a class="inline-block" v-if="account.num != 1" @click="setDefaultAccount(account)"><i class="iconfont icon-gouxuan1"></i>设为默认</a>
             <a class="inline-block" @click="deleteAccount(account)"><i class="iconfont icon-lajitong"></i>删除</a>
           </div>
         </li>

+ 3 - 3
pages/mobile/center/user/seek.vue

@@ -10,8 +10,7 @@
       let user = store.state.option.user.data
       let params = {
         pageNumber: 1,
-        pageSize: 10,
-        overdue: '0'
+        pageSize: 10
       }
       if (user.enterprise.uu) {
         params.enUU = user.enterprise.uu
@@ -20,6 +19,7 @@
       }
       if (query.seekType === 'wait') {
         params.state = 'todo'
+        params.overdue = 0
         return Promise.all([
           store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
         ])
@@ -44,7 +44,7 @@
           pageNumber: page,
           pageSize: count,
           keyword: keyword,
-          overdue: otherParamas[2]
+          overdue: otherParamas[2] || null
         }
         if (this.user.data.enterprise.uu) {
           params.enUU = this.user.data.enterprise.uu

+ 3 - 3
pages/mobile/user/index.vue

@@ -40,15 +40,15 @@
           </li>
           <li @click="go('/mobile/center/user/invoice?type=frompage')">
             <img src="/images/mobile/user/fapiao.png" alt="">
-            <p>票信息</p>
+            <p>票信息</p>
           </li>
           <li @click="go('/mobile/center/vendor/payCenter?switchType=account&type=frompage')">
             <img src="/images/mobile/user/shoukuan.png" alt="">
-            <p>应收对账</p>
+            <p>收款账户</p>
           </li>
           <li @click="go('/mobile/center/user/payCenter?switchType=account&type=frompage')">
             <img src="/images/mobile/user/fukuang.png" alt="">
-            <p>应付对账</p>
+            <p>付款账户</p>
           </li>
           <li @click="go('/mobile/user/address')">
             <img src="/images/mobile/user/icon_06.png" alt="">