Browse Source

1、修改应收对账页面展示问题
2、修改应付对账页面展示问题
3、修改月份选择问题
4、修改 “立即对账”,修改为“对账详情”

shenjunjie 7 years ago
parent
commit
b31ef8001e

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

@@ -36,10 +36,10 @@
         <div v-if="resourceList.content && resourceList.content.length > 0">
         <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" :key="item.id">
             <div class="invoice-btob-wrapper-top">
             <div class="invoice-btob-wrapper-top">
-              日期:<span  style="margin-right: 0.3rem">{{item.apDate | time}}</span>
+              日期:<span  style="margin-right: 0.3rem">{{item.recordDate | time}}</span>
             </div>
             </div>
             <div class="invoice-btob-wrapper-middle">
             <div class="invoice-btob-wrapper-middle">
-              <div class="invoice-btob-wrapper-middle-title">{{item.custName}}</div>
+              <div class="invoice-btob-wrapper-middle-title">{{item.vendorName}}</div>
               <div><span>单据编号:</span><a>{{item.code}}</a></div>
               <div><span>单据编号:</span><a>{{item.code}}</a></div>
             </div>
             </div>
             <div class="invoice-btob-wrapper-content">
             <div class="invoice-btob-wrapper-content">
@@ -47,7 +47,10 @@
               <div><span>对账总额:</span>{{item.checkAmount | toFixedNum}}</div>
               <div><span>对账总额:</span>{{item.checkAmount | toFixedNum}}</div>
               <div><span>明细条目:</span>{{item.items.length}}条</div>
               <div><span>明细条目:</span>{{item.items.length}}条</div>
               <div><span>商品总数:</span>{{item.getTotalProd}}</div>
               <div><span>商品总数:</span>{{item.getTotalProd}}</div>
-              <div><span>对账结果:</span><span v-text="item.checkStatus"></span></div>
+              <div><span>对账结果:</span>
+                <span v-if="item.checkStatus === '未对账'">-</span>
+                <span v-else v-text="item.checkStatus"></span>
+              </div>
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>

+ 48 - 13
pages/mobile/center/vendor/btobapCheck.vue

@@ -81,7 +81,7 @@
             <i class="iconfont icon-xiangzuo" style="font-size: 0.3rem"></i>
             <i class="iconfont icon-xiangzuo" style="font-size: 0.3rem"></i>
           </div>
           </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 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)">
+          <div class="inline-block right" @click="addMonth('out', 'outTimeMonth', 1)" v-show="MouthOutShow">
             <i class="iconfont icon-xiangyou" style="font-size: 0.3rem"></i>
             <i class="iconfont icon-xiangyou" style="font-size: 0.3rem"></i>
           </div>
           </div>
         </div>
         </div>
@@ -93,16 +93,16 @@
               </div>
               </div>
               <div class="invoice-btob-wrapper-middle">
               <div class="invoice-btob-wrapper-middle">
                 <div v-if="item.thisMonthCount && item.thisMonthCount.length > 0">
                 <div v-if="item.thisMonthCount && item.thisMonthCount.length > 0">
-                  <span class="inline-block">本月应收:</span>
+                  <span class="inline-block"  style="vertical-align: top">本月应收:</span>
                   <div class="inline-block" style="vertical-align: top" >
                   <div class="inline-block" style="vertical-align: top" >
                     <div v-for="count in item.thisMonthCount" v-if="count.amount > 0">
                     <div v-for="count in item.thisMonthCount" v-if="count.amount > 0">
-                      <span>{{count.currency}}{{count.amount | computeNum(2)}}</span>
+                      <span>{{count.currency}}{{count.amount | computeNum(2)}}</span>
                     </div>
                     </div>
                   </div>
                   </div>
                 </div>
                 </div>
                 <div v-else><span>本月应收:0</span></div>
                 <div v-else><span>本月应收:0</span></div>
                 <div v-if="item.totalCount && item.totalCount.length > 0">
                 <div v-if="item.totalCount && item.totalCount.length > 0">
-                  <span class="inline-block">应收总额:</span>
+                  <span class="inline-block"  style="vertical-align: top">应收总额:</span>
                   <div class="inline-block" style="vertical-align: top" >
                   <div class="inline-block" style="vertical-align: top" >
                     <div v-for="count in item.totalCount"  v-if="count.amount > 0">
                     <div v-for="count in item.totalCount"  v-if="count.amount > 0">
                       <span>{{count.currency}}:{{count.amount | computeNum(2)}}</span>
                       <span>{{count.currency}}:{{count.amount | computeNum(2)}}</span>
@@ -112,7 +112,7 @@
                 <div v-else><span>应收总额:0</span></div>
                 <div v-else><span>应收总额:0</span></div>
               </div>
               </div>
               <div class="invoice-btob-wrapper-middle" @click="showApcheckList(item)">
               <div class="invoice-btob-wrapper-middle" @click="showApcheckList(item)">
-                <div class="middle_btn">立即对账</div>
+                <div class="middle_btn">对账详情</div>
               </div>
               </div>
             </div>
             </div>
           </div>
           </div>
@@ -143,7 +143,7 @@
                 <i class="iconfont icon-xiangzuo" style="font-size: 0.3rem"></i>
                 <i class="iconfont icon-xiangzuo" style="font-size: 0.3rem"></i>
               </div>
               </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 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)">
+              <div class="inline-block right" @click="addMonth('inside', '', 1)" v-show="MouthinShow">
                 <i class="iconfont icon-xiangyou" style="font-size: 0.3rem"></i>
                 <i class="iconfont icon-xiangyou" style="font-size: 0.3rem"></i>
               </div>
               </div>
             </div>
             </div>
@@ -341,6 +341,8 @@
     middleware: 'authenticated',
     middleware: 'authenticated',
     data() {
     data() {
       return {
       return {
+        MouthinShow: true,
+        MouthOutShow: true,
         ShowTitle: false,
         ShowTitle: false,
         collectResult: '',
         collectResult: '',
         timeoutCount: 0,
         timeoutCount: 0,
@@ -454,10 +456,22 @@
       resultMonth() {
       resultMonth() {
         this.isShowMonthChoose = false
         this.isShowMonthChoose = false
         if (this.$monthType === 'out') {
         if (this.$monthType === 'out') {
+          let _time2 = new Date(this.$value)
+          let _d = new Date()
+          if (_time2.getTime() > _d.getTime()) {
+            this.setRemindText('所选对账日期不能超过当前时间')
+            return
+          }
           this.outTimeMonth = this.$value
           this.outTimeMonth = this.$value
           this.filterParams.page = 1
           this.filterParams.page = 1
           this.setSelect('', '', true)
           this.setSelect('', '', true)
         } else {
         } else {
+          let _time2 = new Date(this.$value)
+          let _d = new Date()
+          if (_time2.getTime() > _d.getTime()) {
+            this.setRemindText('所选对账日期不能超过当前时间')
+            return
+          }
           this.isShowApcheckList.thisMonth = this.$value
           this.isShowApcheckList.thisMonth = this.$value
           this.ShowApcheckChooseTime = false
           this.ShowApcheckChooseTime = false
           this.$refs.baseFilter[0].setSelect(1)
           this.$refs.baseFilter[0].setSelect(1)
@@ -834,17 +848,31 @@
       // 月份+1
       // 月份+1
       addMonth(tp, key, val) {
       addMonth(tp, key, val) {
         if (tp === 'inside') {
         if (tp === 'inside') {
+          let _sp = new Date().getMonth() + 1
           let _time = new Date(this.isShowApcheckList.thisMonth)
           let _time = new Date(this.isShowApcheckList.thisMonth)
           _time.setMonth(_time.getMonth() + val)
           _time.setMonth(_time.getMonth() + val)
-          this.isShowApcheckList.thisMonth = _time.getFullYear() + '-' + (_time.getMonth() + 1)
+          let _m = Number(_time.getMonth() + 1) < 10 ? '0' + _time.getMonth() + 1 : _time.getMonth() + 1
+          this.isShowApcheckList.thisMonth = _time.getFullYear() + '-' + _m
           this.ShowApcheckChooseTime = false
           this.ShowApcheckChooseTime = false
           this.$monthClick = true
           this.$monthClick = true
+          if (_time.getMonth() + 1 >= Number(_sp)) {
+            this.MouthinShow = false
+          } else {
+            this.MouthinShow = true
+          }
           this.$refs.baseFilter[0].setSelect(1)
           this.$refs.baseFilter[0].setSelect(1)
           this.showApcheckList()
           this.showApcheckList()
         } else {
         } else {
+          let _sp = new Date().getMonth() + 1
           let _time = new Date(this[key])
           let _time = new Date(this[key])
           _time.setMonth(_time.getMonth() + val)
           _time.setMonth(_time.getMonth() + val)
-          this[key] = _time.getFullYear() + '-' + (_time.getMonth() + 1)
+          let _m = Number(_time.getMonth() + 1) < 10 ? '0' + _time.getMonth() + 1 : _time.getMonth() + 1
+          this[key] = _time.getFullYear() + '-' + _m
+          if (_time.getMonth() + 1 >= Number(_sp)) {
+            this.MouthOutShow = false
+          } else {
+            this.MouthOutShow = true
+          }
           this.filterParams.page = 1
           this.filterParams.page = 1
           this.setSelect('', '', true)
           this.setSelect('', '', true)
         }
         }
@@ -926,11 +954,13 @@
       ShowMonthChoose(tp, key) {
       ShowMonthChoose(tp, key) {
         this.$monthType = tp
         this.$monthType = tp
         if (tp === 'inside') {
         if (tp === 'inside') {
+          let _m = Number(this.isShowApcheckList.thisMonth.split('-')[1]) < 10 ? '0' + this.isShowApcheckList.thisMonth.split('-')[1] : this.isShowApcheckList.thisMonth.split('-')[1]
           this.$picker.setSlotValue(0, this.isShowApcheckList.thisMonth.split('-')[0] + '年')
           this.$picker.setSlotValue(0, this.isShowApcheckList.thisMonth.split('-')[0] + '年')
-          this.$picker.setSlotValue(1, this.isShowApcheckList.thisMonth.split('-')[1] + '月')
+          this.$picker.setSlotValue(1, _m + '月')
         } else {
         } else {
+          let _m = Number(this[key].split('-')[1]) < 10 ? '0' + this[key].split('-')[1] : this[key].split('-')[1]
           this.$picker.setSlotValue(0, this[key].split('-')[0] + '年')
           this.$picker.setSlotValue(0, this[key].split('-')[0] + '年')
-          this.$picker.setSlotValue(1, this[key].split('-')[1] + '月')
+          this.$picker.setSlotValue(1, _m + '月')
         }
         }
         this.isShowMonthChoose = true
         this.isShowMonthChoose = true
       }
       }
@@ -1330,18 +1360,22 @@
     .left {
     .left {
       background: #fff;
       background: #fff;
       color: #333;
       color: #333;
-      padding: 0.05rem 0.1rem;
+      padding: 0rem 0.1rem;
       box-shadow: 0 0 2px #a0a0a0;
       box-shadow: 0 0 2px #a0a0a0;
       text-align: center;
       text-align: center;
       margin-right: 0.2rem;
       margin-right: 0.2rem;
+      height: 0.5rem;
+      line-height: 0.5rem
     }
     }
     .right {
     .right {
       text-align: center;
       text-align: center;
       background: #fff;
       background: #fff;
       color: #333;
       color: #333;
-      padding: 0.05rem 0.1rem;
+      padding: 0rem 0.1rem;
       box-shadow: 0 0 2px #a0a0a0;
       box-shadow: 0 0 2px #a0a0a0;
       margin-left: 0.2rem;
       margin-left: 0.2rem;
+      height: 0.5rem;
+      line-height: 0.5rem
     }
     }
     .rightBtn {
     .rightBtn {
       margin: 0.1rem 0.2rem 0 0;
       margin: 0.1rem 0.2rem 0 0;
@@ -1374,7 +1408,8 @@
     color: #3E81F6;
     color: #3E81F6;
     width: 1.7rem;
     width: 1.7rem;
     display: inline-block;
     display: inline-block;
-    height: 0.4rem;
+    height: 0.5rem;
+    line-height: 0.5rem
   }
   }
   .footerBtn {
   .footerBtn {
     padding: 0 0 0 0.15rem;
     padding: 0 0 0 0.15rem;