Browse Source

Merge branch 'feature-201845-wangcz' into dev

wangcz 7 years ago
parent
commit
e6c9847451

+ 4 - 4
components/applyPurchase/SayPrice.vue

@@ -61,8 +61,8 @@
           </template>
           </template>
           <div class="content-line">
           <div class="content-line">
             <div class="form-item form-left">
             <div class="form-item form-left">
-              <span><i>*</i>交期:</span>
-              <input type="number" class="form-control" placeholder="天数" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime">
+              <span><i>*</i>交期(天):</span>
+              <input type="number" class="form-control" placeholder="最长交期" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime">
             </div>
             </div>
             <div class="form-item form-right">
             <div class="form-item form-right">
               <span><i>*</i>税率:</span>
               <span><i>*</i>税率:</span>
@@ -244,7 +244,7 @@
         }
         }
       },
       },
       onLeadtimeInput: function () {
       onLeadtimeInput: function () {
-        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\-?\d.]/g, '')
+        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\d]/g, '')
         if (this.sayPriceObj.leadtime.length > 3) {
         if (this.sayPriceObj.leadtime.length > 3) {
           this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
           this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
         }
         }
@@ -258,7 +258,7 @@
         }
         }
       },
       },
       onTaxrateInput () {
       onTaxrateInput () {
-        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\-?\d.]/g, '')
+        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\d]/g, '')
         if (this.sayPriceObj.taxrate.length > 2) {
         if (this.sayPriceObj.taxrate.length > 2) {
           this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
           this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
         }
         }

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

@@ -77,7 +77,7 @@
             </div>
             </div>
             <div class="date">
             <div class="date">
               <span>交期(天)</span>
               <span>交期(天)</span>
-              <input type="text" placeholder="最大值" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime" class="fr">
+              <input type="text" placeholder="最长交期" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime" class="fr">
             </div>
             </div>
             <div class="date">
             <div class="date">
               <span>税率</span>
               <span>税率</span>
@@ -253,7 +253,7 @@
         }
         }
       },
       },
       onLeadtimeInput: function () {
       onLeadtimeInput: function () {
-        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\-?\d.]/g, '')
+        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\d]/g, '')
         if (this.sayPriceObj.leadtime.length > 3) {
         if (this.sayPriceObj.leadtime.length > 3) {
           this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
           this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
         }
         }
@@ -267,7 +267,7 @@
         }
         }
       },
       },
       onTaxrateInput () {
       onTaxrateInput () {
-        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\-?\d.]/g, '')
+        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\d]/g, '')
         if (this.sayPriceObj.taxrate.length > 2) {
         if (this.sayPriceObj.taxrate.length > 2) {
           this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
           this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
         }
         }

+ 3 - 3
components/mobile/center/upoff-material.vue

@@ -71,10 +71,10 @@
                   </div>
                   </div>
                 </div>
                 </div>
                 <div class="pull-left" style="margin-left: 0.2rem">
                 <div class="pull-left" style="margin-left: 0.2rem">
-                  <span class="name">交期:</span>
-                  <input type="tel" placeholder="天数" v-model="chooseItem.goods.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.minDelivery)" />
+                  <span class="name">交期(天):</span>
+                  <input type="tel" placeholder="最长交期" v-model="chooseItem.goods.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.minDelivery)" />
                   -
                   -
-                  <input type="tel" placeholder="天数" v-model="chooseItem.goods.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.maxDelivery)"/>
+                  <input type="tel" placeholder="最长交期" v-model="chooseItem.goods.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.maxDelivery)"/>
                 </div>
                 </div>
               </div>
               </div>
               <div class="off-info clearfix">
               <div class="off-info clearfix">

+ 2 - 1
nuxt.config.js

@@ -129,7 +129,8 @@ module.exports = {
       ssr: false
       ssr: false
     }, {
     }, {
       src: '~plugins/element-ui'
       src: '~plugins/element-ui'
-    }, {
+    },
+    {
       src: '~plugins/filters.js',
       src: '~plugins/filters.js',
       ssr: false
       ssr: false
     }, {
     }, {

+ 71 - 103
pages/mobile/center/user/btobarCheck.vue

@@ -16,12 +16,12 @@
           </nuxt-link>
           </nuxt-link>
         </div>
         </div>
       </div>
       </div>
-      <div class="order-nav">
-        <div :class="activeType === 'all' ? 'active': ''" @click="ChangeList('all')"><span>未对账</span></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 === 'todo' ? 'active' : ''" @click="ChangeList('todo')"><span>待确认</span></div>-->
-        <div :class="activeType === 'done' ? 'active': ''" @click="ChangeList('done')"><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 :class="activeType === 'end' ? 'active' : ''" @click="ChangeList('end')"><span>已作废</span></div>-->
-      </div>
+      <!--</div>-->
       <div v-show="activeType !== 'all'">
       <div v-show="activeType !== 'all'">
         <div class="search-content mi-search-content">
         <div class="search-content mi-search-content">
           <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="单据编号/客户名称/物料名称">
           <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="单据编号/客户名称/物料名称">
@@ -102,6 +102,28 @@
                   </div>
                   </div>
                 </div>
                 </div>
                 <div v-else><span>本月应付:0</span></div>
                 <div v-else><span>本月应付:0</span></div>
+
+                <div v-if="item.thisMonthDoneCount && item.thisMonthDoneCount.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.thisMonthDoneCount" 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.thisMonthTodoCount && item.thisMonthTodoCount.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.thisMonthTodoCount" 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">
                 <div v-if="item.totalCount && item.totalCount.length > 0">
                   <span class="inline-block"  style="vertical-align: top">应付总额:</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" >
@@ -113,7 +135,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>
@@ -182,25 +204,27 @@
                   <!--</span>-->
                   <!--</span>-->
                   <div class="inline-block" style="margin-left: 0.15rem">
                   <div class="inline-block" style="margin-left: 0.15rem">
                     <div class="OverHidden">采购单:<span>{{item.ordercode}}</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>{{item.sendcode}}</span></div>
+                    <div class="OverHidden">验收单:<span>{{item.inoutno}}</span></div>
+
                     <!--<div class="OverHidden">序号:<span>{{index + 1}}</span></div>-->
                     <!--<div class="OverHidden">序号:<span>{{index + 1}}</span></div>-->
                     <!--<div class="OverHidden">类型:<span>{{item.piclass}}</span></div>-->
                     <!--<div class="OverHidden">类型:<span>{{item.piclass}}</span></div>-->
                     <!--<div class="OverHidden">单据日期:<span>{{item.pidate | time}}</span></div>-->
                     <!--<div class="OverHidden">单据日期:<span>{{item.pidate | time}}</span></div>-->
                   </div>
                   </div>
                 </div>
                 </div>
                 <div style="padding-top: 0.2rem">
                 <div style="padding-top: 0.2rem">
-                  <span class="item inline-block" style="opacity: 0"  v-show="!isShowApcheckList.showApcheck">
-                    <label class="mobile-cart-check"></label>
-                  </span>
+                  <!--<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="inline-block" style="margin-left: 0.15rem">
+                    <div class="OverHidden">物料名称:<span>{{item.prodtitle}}</span></div>
+                    <div class="OverHidden">规格型号:<span>{{item.prodspec}}</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.thischeckqty}}</span></div>
                     <div class="OverHidden">单价:<span>{{item.currency}}:{{item.orderprice}}</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.sendcode}}</span></div>-->
                     <div class="OverHidden">税率:<span>{{item.taxrate}}%</span></div>
                     <div class="OverHidden">税率:<span>{{item.taxrate}}%</span></div>
+                    <div class="OverHidden">对账人:<span>{{item.recorder}}</span></div>
                     <!--<div class="OverHidden">客户料号:<span>{{item.prodcode}}</span></div>-->
                     <!--<div class="OverHidden">客户料号:<span>{{item.prodcode}}</span></div>-->
                     <!--<div class="OverHidden">金额:<span>{{}}</span></div>-->
                     <!--<div class="OverHidden">金额:<span>{{}}</span></div>-->
                   </div>
                   </div>
@@ -231,68 +255,6 @@
         <!--<div class="fr bbgoresult cancel" v-show="isShowApcheckList.showApcheck" @click="deleteCheck">取消</div>-->
         <!--<div class="fr bbgoresult cancel" v-show="isShowApcheckList.showApcheck" @click="deleteCheck">取消</div>-->
       </div>
       </div>
     </modal-wrapper>
     </modal-wrapper>
-    <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>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     <div class="fixedPicker" v-show="isShowMonthChoose">
     <div class="fixedPicker" v-show="isShowMonthChoose">
       <picker :slots="slots" @change="onValuesChange" :showToolbar="true" ref="picker">
       <picker :slots="slots" @change="onValuesChange" :showToolbar="true" ref="picker">
@@ -457,11 +419,7 @@
       resultMonth() {
       resultMonth() {
         this.isShowMonthChoose = false
         this.isShowMonthChoose = false
         if (this.$monthType === 'out') {
         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 _time2 = this.computedTime(this.$value + '-01')
           let _d = this.computedTime(new Date())
           let _d = this.computedTime(new Date())
           if (_time2.getTime() > _d.getTime()) {
           if (_time2.getTime() > _d.getTime()) {
             this.setRemindText('所选对账日期不能超过当前时间')
             this.setRemindText('所选对账日期不能超过当前时间')
@@ -477,11 +435,7 @@
           this.filterParams.page = 1
           this.filterParams.page = 1
           this.setSelect('', '', true)
           this.setSelect('', '', true)
         } else {
         } 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 _time2 = this.computedTime(this.$value + '-01')
           let _d = this.computedTime(new Date())
           let _d = this.computedTime(new Date())
           if (_time2.getTime() > _d.getTime()) {
           if (_time2.getTime() > _d.getTime()) {
             this.setRemindText('所选对账日期不能超过当前时间')
             this.setRemindText('所选对账日期不能超过当前时间')
@@ -513,6 +467,7 @@
         if (this.dateObj[type]) {
         if (this.dateObj[type]) {
           // 初始化为00:00:00
           // 初始化为00:00:00
           this.dateObj[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
           this.dateObj[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
+          // TODO
           if (this.dateObj.fromDate && this.dateObj.toDate && this.dateObj.fromDate > this.dateObj.toDate) {
           if (this.dateObj.fromDate && this.dateObj.toDate && this.dateObj.fromDate > this.dateObj.toDate) {
             if (type === 'fromDate') {
             if (type === 'fromDate') {
               this.setRemindText('起始时间不能大于结束时间')
               this.setRemindText('起始时间不能大于结束时间')
@@ -717,7 +672,7 @@
           }
           }
 
 
           // 此次对账后新的已转数
           // 此次对账后新的已转数
-          if (check.check === true) {
+          if (check.check === true && !check.haveChecked) {
             _list.push(check)
             _list.push(check)
             apCheck.custName = check.custname
             apCheck.custName = check.custname
             apCheck.enUu = check.enuu
             apCheck.enUu = check.enuu
@@ -766,23 +721,31 @@
                 this.setRemindText('本次对账数量,填写有误!')
                 this.setRemindText('本次对账数量,填写有误!')
               }
               }
             }
             }
+            // todo
             if (this.ShowApcheckChooseTime) {
             if (this.ShowApcheckChooseTime) {
-              let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
-              let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
+              let _time1 = this.isShowApcheckList.objTime.value.fromDate
+              _time1 = _time1.replace(/-/g, '/')
+              let _start = new Date(_time1)
+              let _time2 = this.isShowApcheckList.objTime.value.fromDate
+              _time2 = _time2.replace(/-/g, '/')
+              let _end = new Date(_time2)
               // 获取筛选时间的开始时间为对账的开始时间
               // 获取筛选时间的开始时间为对账的开始时间
               apCheck.beginDate = _start.getTime()
               apCheck.beginDate = _start.getTime()
               // 获取筛选的截止时间为对账的截止时间
               // 获取筛选的截止时间为对账的截止时间
               apCheck.endDate = _end.getTime()
               apCheck.endDate = _end.getTime()
             } else {
             } else {
-              this.isShowApcheckList.startTime = this.outTimeMonth + '-01'
-              let _d = new Date(this.isShowApcheckList.startTime)
-              let _start = _d
+              this.isShowApcheckList.startTime = this.isShowApcheckList.thisMonth + '-01'
+              let _time1 = this.isShowApcheckList.startTime
+              _time1 = _time1.replace(/-/g, '/')
+              let _d = new Date(_time1)
               _d.setDate(1)
               _d.setDate(1)
               _d.setMonth(_d.getMonth() + 1)
               _d.setMonth(_d.getMonth() + 1)
               _d.setDate(_d.getDate() - 1)
               _d.setDate(_d.getDate() - 1)
 
 
               // 获取筛选时间的开始时间为对账的开始时间
               // 获取筛选时间的开始时间为对账的开始时间
-              apCheck.beginDate = _start.getTime()
+              let _time2 = this.isShowApcheckList.startTime
+              _time2 = _time2.replace(/-/g, '/')
+              apCheck.beginDate = new Date(_time2).getTime()
               // 获取筛选的截止时间为对账的截止时间
               // 获取筛选的截止时间为对账的截止时间
               apCheck.endDate = _d.getTime()
               apCheck.endDate = _d.getTime()
             }
             }
@@ -836,8 +799,12 @@
             this.isShowApcheckList.id = res.data.id
             this.isShowApcheckList.id = res.data.id
             this.isShowApcheckList.showApcheck = true
             this.isShowApcheckList.showApcheck = true
             if (this.ShowApcheckChooseTime) {
             if (this.ShowApcheckChooseTime) {
-              let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
-              let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
+              let _time1 = this.isShowApcheckList.objTime.value.fromDate
+              _time1 = _time1.replace(/-/g, '/')
+              let _start = new Date(_time1)
+              let _time2 = this.isShowApcheckList.objTime.value.toDate
+              _time2 = _time1.replace(/-/g, '/')
+              let _end = new Date(_time2)
               this.isShowApcheckList.startTime = _start.getFullYear() + '-' + (_start.getMonth() + 1) + '-' + _start.getDate()
               this.isShowApcheckList.startTime = _start.getFullYear() + '-' + (_start.getMonth() + 1) + '-' + _start.getDate()
               this.isShowApcheckList.endTime = _end.getFullYear() + '-' + (_end.getMonth() + 1) + '-' + _end.getDate()
               this.isShowApcheckList.endTime = _end.getFullYear() + '-' + (_end.getMonth() + 1) + '-' + _end.getDate()
             } else {
             } else {
@@ -896,7 +863,7 @@
           let _sp = new Date()
           let _sp = new Date()
           this.ShowApcheckChooseTime = false
           this.ShowApcheckChooseTime = false
           this.$monthClick = true
           this.$monthClick = true
-          let _d = this.computedTime(this.isShowApcheckList.thisMonth, val)
+          let _d = this.computedTime(this.isShowApcheckList.thisMonth + '-01', val)
           let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
           let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
           this.isShowApcheckList.thisMonth = _d.getFullYear() + '-' + _m
           this.isShowApcheckList.thisMonth = _d.getFullYear() + '-' + _m
           if (_d.getTime() >= _sp.getTime()) {
           if (_d.getTime() >= _sp.getTime()) {
@@ -909,7 +876,7 @@
           this.getApcheckDetailsinfo()
           this.getApcheckDetailsinfo()
         } else {
         } else {
           let _sp = new Date()
           let _sp = new Date()
-          let _d = this.computedTime(this[key], val)
+          let _d = this.computedTime(this[key] + '-01', val)
           let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
           let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
           this[key] = _d.getFullYear() + '-' + _m
           this[key] = _d.getFullYear() + '-' + _m
           if (_d.getTime() >= _sp.getTime()) {
           if (_d.getTime() >= _sp.getTime()) {
@@ -922,6 +889,9 @@
         }
         }
       },
       },
       computedTime(num, val) {
       computedTime(num, val) {
+        if ((typeof num === 'object') && num.constructor === Date) {} else {
+          num = num.replace(/-/g, '/')
+        }
         let _d = new Date(num)
         let _d = new Date(num)
         if (val !== undefined) {
         if (val !== undefined) {
           _d.setMonth(_d.getMonth() + val)
           _d.setMonth(_d.getMonth() + val)
@@ -936,13 +906,11 @@
         let itemL = {}
         let itemL = {}
         if (this.activeType === 'all') {
         if (this.activeType === 'all') {
           let _fromDate = this.outTimeMonth + '-01 00:00:00'
           let _fromDate = this.outTimeMonth + '-01 00:00:00'
-          // let _d = new Date(_fromDate)
           let _d = this.computedTime(_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'
           let _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
+          _endDate = _endDate.replace(/-/g, '/')
           _endDate = new Date(_endDate).getTime()
           _endDate = new Date(_endDate).getTime()
+          _fromDate = _fromDate.replace(/-/g, '/')
           _fromDate = new Date(_fromDate).getTime()
           _fromDate = new Date(_fromDate).getTime()
            _url = '/sale/arCheck/vendor'
            _url = '/sale/arCheck/vendor'
           itemL = {
           itemL = {
@@ -1033,9 +1001,9 @@
       allMoney() {
       allMoney() {
         let sum = 0
         let sum = 0
         this.isShowApcheckList.list.forEach(obj => {
         this.isShowApcheckList.list.forEach(obj => {
-          if (obj.check) {
+          // if (obj.check) {
             sum += obj.qty * (obj.orderprice || 0)
             sum += obj.qty * (obj.orderprice || 0)
-          }
+          // }
         })
         })
         return sum
         return sum
       },
       },
@@ -1071,7 +1039,7 @@
         }
         }
       },
       },
       computeNum: function(price, num) {
       computeNum: function(price, num) {
-        return price.toFixed(num)
+        return Math.floor(price * 100) / 100
       }
       }
     }
     }
   }
   }
@@ -1218,10 +1186,10 @@
       }
       }
     }
     }
     .btobapCheck-wrapper-scroll {
     .btobapCheck-wrapper-scroll {
-      height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem);
+      height: calc(100vh - 1.26rem - 0.98rem - 1.06rem - 0.92rem);
       overflow-y: auto;
       overflow-y: auto;
       &.btobapCheck-wrapper-scroll2 {
       &.btobapCheck-wrapper-scroll2 {
-        height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem - 1.3rem);
+        height: calc(100vh - 1.26rem - 0.98rem - 1.06rem - 0.92rem - 1.3rem);
       }
       }
     }
     }
     .filter-wrapper{
     .filter-wrapper{

+ 78 - 104
pages/mobile/center/vendor/btobapCheck.vue

@@ -16,12 +16,12 @@
           </nuxt-link>
           </nuxt-link>
         </div>
         </div>
       </div>
       </div>
-      <div class="order-nav">
-        <div :class="activeType === 'all' ? 'active': ''" @click="ChangeList('all')"><span>未对账</span></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 === '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 :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'">
       <div v-show="activeType !== 'all'">
         <div class="search-content mi-search-content">
         <div class="search-content mi-search-content">
           <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="单据编号/客户名称/物料名称">
           <input type="text" v-model="filterParams.keyword" @keyup.13="onFilter" placeholder="单据编号/客户名称/物料名称">
@@ -102,6 +102,29 @@
                   </div>
                   </div>
                 </div>
                 </div>
                 <div v-else><span>本月应收:0</span></div>
                 <div v-else><span>本月应收:0</span></div>
+
+                <div v-if="item.thisMonthDoneCount && item.thisMonthDoneCount.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.thisMonthDoneCount" 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.thisMonthTodoCount && item.thisMonthTodoCount.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.thisMonthTodoCount" 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">
                 <div v-if="item.totalCount && item.totalCount.length > 0">
                   <span class="inline-block"  style="vertical-align: top">应收总额:</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" >
@@ -113,7 +136,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>
@@ -177,14 +200,14 @@
             <div>
             <div>
               <div class="choosescreen-result-list-content">
               <div class="choosescreen-result-list-content">
                 <div style="border-bottom: 1px solid #D3D3D3;padding-bottom: 0.2rem">
                 <div style="border-bottom: 1px solid #D3D3D3;padding-bottom: 0.2rem">
-                  <span class="item inline-block" @click="checkItem(item, index)" v-show="!isShowApcheckList.showApcheck">
+                  <span class="item inline-block" @click="checkItem(item, index)" v-show="!isShowApcheckList.showApcheck && !item.haveChecked">
                     <label class="mobile-cart-check" :class="{active: item.check}"></label>
                     <label class="mobile-cart-check" :class="{active: item.check}"></label>
                   </span>
                   </span>
                   <div class="inline-block" style="margin-left: 0.15rem">
                   <div class="inline-block" style="margin-left: 0.15rem">
                     <div class="OverHidden">采购单:<span>{{item.ordercode}}</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>{{item.sendcode}}</span></div>
+                    <div class="OverHidden">验收单:<span>{{item.inoutno}}</span></div>
+
                     <!--<div class="OverHidden">序号:<span>{{index + 1}}</span></div>-->
                     <!--<div class="OverHidden">序号:<span>{{index + 1}}</span></div>-->
                     <!--<div class="OverHidden">类型:<span>{{item.piclass}}</span></div>-->
                     <!--<div class="OverHidden">类型:<span>{{item.piclass}}</span></div>-->
                     <!--<div class="OverHidden">单据日期:<span>{{item.pidate | time}}</span></div>-->
                     <!--<div class="OverHidden">单据日期:<span>{{item.pidate | time}}</span></div>-->
@@ -195,12 +218,14 @@
                     <label class="mobile-cart-check"></label>
                     <label class="mobile-cart-check"></label>
                   </span>
                   </span>
                   <div class="inline-block" style="margin-left: 0.15rem">
                   <div class="inline-block" style="margin-left: 0.15rem">
+                    <div class="OverHidden">物料名称:<span>{{item.prodtitle}}</span></div>
+                    <div class="OverHidden">规格型号:<span>{{item.prodspec}}</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.thischeckqty}}</span></div>
                     <div class="OverHidden">单价:<span>{{item.currency}}:{{item.orderprice}}</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.sendcode}}</span></div>-->
                     <div class="OverHidden">税率:<span>{{item.taxrate}}%</span></div>
                     <div class="OverHidden">税率:<span>{{item.taxrate}}%</span></div>
+                    <div class="OverHidden" v-if="item.haveChecked === 1">对账人:<span>{{item.recorder}}</span></div>
                     <!--<div class="OverHidden">客户料号:<span>{{item.prodcode}}</span></div>-->
                     <!--<div class="OverHidden">客户料号:<span>{{item.prodcode}}</span></div>-->
                     <!--<div class="OverHidden">金额:<span>{{}}</span></div>-->
                     <!--<div class="OverHidden">金额:<span>{{}}</span></div>-->
                   </div>
                   </div>
@@ -231,68 +256,6 @@
         <!--<div class="fr bbgoresult cancel" v-show="isShowApcheckList.showApcheck" @click="deleteCheck">取消</div>-->
         <!--<div class="fr bbgoresult cancel" v-show="isShowApcheckList.showApcheck" @click="deleteCheck">取消</div>-->
       </div>
       </div>
     </modal-wrapper>
     </modal-wrapper>
-    <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>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     <div class="fixedPicker" v-show="isShowMonthChoose">
     <div class="fixedPicker" v-show="isShowMonthChoose">
       <picker :slots="slots" @change="onValuesChange" :showToolbar="true" ref="picker">
       <picker :slots="slots" @change="onValuesChange" :showToolbar="true" ref="picker">
@@ -411,7 +374,8 @@
           id: '',
           id: '',
           startTime: '',
           startTime: '',
           endTime: '',
           endTime: '',
-          objTime: {}
+          objTime: {},
+          customerUU: ''
         },
         },
         ApcheckfilterOptions: [
         ApcheckfilterOptions: [
           {
           {
@@ -457,11 +421,7 @@
       resultMonth() {
       resultMonth() {
         this.isShowMonthChoose = false
         this.isShowMonthChoose = false
         if (this.$monthType === 'out') {
         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 _time2 = this.computedTime(this.$value + '-01')
           let _d = this.computedTime(new Date())
           let _d = this.computedTime(new Date())
           if (_time2.getTime() > _d.getTime()) {
           if (_time2.getTime() > _d.getTime()) {
             this.setRemindText('所选对账日期不能超过当前时间')
             this.setRemindText('所选对账日期不能超过当前时间')
@@ -477,11 +437,7 @@
           this.filterParams.page = 1
           this.filterParams.page = 1
           this.setSelect('', '', true)
           this.setSelect('', '', true)
         } else {
         } 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 _time2 = this.computedTime(this.$value + '-01')
           let _d = this.computedTime(new Date())
           let _d = this.computedTime(new Date())
           if (_time2.getTime() > _d.getTime()) {
           if (_time2.getTime() > _d.getTime()) {
             this.setRemindText('所选对账日期不能超过当前时间')
             this.setRemindText('所选对账日期不能超过当前时间')
@@ -512,6 +468,7 @@
       setDate (type) {
       setDate (type) {
         if (this.dateObj[type]) {
         if (this.dateObj[type]) {
           // 初始化为00:00:00
           // 初始化为00:00:00
+          // alert(this.dateObj[type])
           this.dateObj[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
           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 (this.dateObj.fromDate && this.dateObj.toDate && this.dateObj.fromDate > this.dateObj.toDate) {
             if (type === 'fromDate') {
             if (type === 'fromDate') {
@@ -601,6 +558,7 @@
         this.isShowApcheckList.show = true
         this.isShowApcheckList.show = true
         this.isShowApcheckList.enName = item ? item.myEnterprise.enName : this.isShowApcheckList.enName
         this.isShowApcheckList.enName = item ? item.myEnterprise.enName : this.isShowApcheckList.enName
         this.isShowApcheckList.thisMonth = this.outTimeMonth
         this.isShowApcheckList.thisMonth = this.outTimeMonth
+        this.isShowApcheckList.customerUU = item.myEnterprise.uu
         this.getApcheckDetailsinfo()
         this.getApcheckDetailsinfo()
       },
       },
       // 未对账详情获取数据
       // 未对账详情获取数据
@@ -609,7 +567,8 @@
         let _params = {
         let _params = {
           params: {
           params: {
             checkDate: this.isShowApcheckList.thisMonth,
             checkDate: this.isShowApcheckList.thisMonth,
-            suuorname: this.isShowApcheckList.enName
+            suuorname: this.isShowApcheckList.enName,
+            customerUU: this.isShowApcheckList.customerUU
           }
           }
         }
         }
         // 是否打开自定义时间选项 且
         // 是否打开自定义时间选项 且
@@ -620,7 +579,8 @@
             params: {
             params: {
               fromDate: objTime[1].fromDate,
               fromDate: objTime[1].fromDate,
               endDate: objTime[1].toDate,
               endDate: objTime[1].toDate,
-              suuorname: this.isShowApcheckList.enName
+              suuorname: this.isShowApcheckList.enName,
+              customerUU: this.isShowApcheckList.customerUU
             }
             }
           }
           }
         }
         }
@@ -653,7 +613,7 @@
         }
         }
       },
       },
       // 对账按钮
       // 对账按钮
-        goTopayfor() {
+      goTopayfor() {
         let apCheck = {
         let apCheck = {
           custUu: '',
           custUu: '',
           custName: '',
           custName: '',
@@ -713,7 +673,7 @@
           }
           }
 
 
           // 此次对账后新的已转数
           // 此次对账后新的已转数
-          if (check.check === true) {
+          if (check.check === true && !check.haveChecked) {
             _list.push(check)
             _list.push(check)
             apCheck.custName = check.custname
             apCheck.custName = check.custname
             apCheck.enUu = check.enuu
             apCheck.enUu = check.enuu
@@ -763,21 +723,29 @@
               }
               }
             }
             }
             if (this.ShowApcheckChooseTime) {
             if (this.ShowApcheckChooseTime) {
-              let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
-              let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
+              let _time1 = this.isShowApcheckList.objTime.value.fromDate
+              _time1 = _time1.replace(/-/g, '/')
+              let _start = new Date(_time1)
+              let _time2 = this.isShowApcheckList.objTime.value.fromDate
+              _time2 = _time2.replace(/-/g, '/')
+              let _end = new Date(_time2)
               // 获取筛选时间的开始时间为对账的开始时间
               // 获取筛选时间的开始时间为对账的开始时间
               apCheck.beginDate = _start.getTime()
               apCheck.beginDate = _start.getTime()
               // 获取筛选的截止时间为对账的截止时间
               // 获取筛选的截止时间为对账的截止时间
               apCheck.endDate = _end.getTime()
               apCheck.endDate = _end.getTime()
             } else {
             } else {
               this.isShowApcheckList.startTime = this.isShowApcheckList.thisMonth + '-01'
               this.isShowApcheckList.startTime = this.isShowApcheckList.thisMonth + '-01'
-              let _d = new Date(this.isShowApcheckList.startTime)
+              let _time1 = this.isShowApcheckList.startTime
+              _time1 = _time1.replace(/-/g, '/')
+              let _d = new Date(_time1)
               _d.setDate(1)
               _d.setDate(1)
               _d.setMonth(_d.getMonth() + 1)
               _d.setMonth(_d.getMonth() + 1)
               _d.setDate(_d.getDate() - 1)
               _d.setDate(_d.getDate() - 1)
 
 
               // 获取筛选时间的开始时间为对账的开始时间
               // 获取筛选时间的开始时间为对账的开始时间
-              apCheck.beginDate = new Date(this.isShowApcheckList.startTime).getTime()
+              let _time2 = this.isShowApcheckList.startTime
+              _time2 = _time2.replace(/-/g, '/')
+              apCheck.beginDate = new Date(_time2).getTime()
               // 获取筛选的截止时间为对账的截止时间
               // 获取筛选的截止时间为对账的截止时间
               apCheck.endDate = _d.getTime()
               apCheck.endDate = _d.getTime()
             }
             }
@@ -831,8 +799,12 @@
             this.isShowApcheckList.id = res.data.id
             this.isShowApcheckList.id = res.data.id
             this.isShowApcheckList.showApcheck = true
             this.isShowApcheckList.showApcheck = true
             if (this.ShowApcheckChooseTime) {
             if (this.ShowApcheckChooseTime) {
-              let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
-              let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
+              let _time1 = this.isShowApcheckList.objTime.value.fromDate
+              _time1 = _time1.replace(/-/g, '/')
+              let _start = new Date(_time1)
+              let _time2 = this.isShowApcheckList.objTime.value.toDate
+              _time2 = _time1.replace(/-/g, '/')
+              let _end = new Date(_time2)
               this.isShowApcheckList.startTime = _start.getFullYear() + '-' + (_start.getMonth() + 1) + '-' + _start.getDate()
               this.isShowApcheckList.startTime = _start.getFullYear() + '-' + (_start.getMonth() + 1) + '-' + _start.getDate()
               this.isShowApcheckList.endTime = _end.getFullYear() + '-' + (_end.getMonth() + 1) + '-' + _end.getDate()
               this.isShowApcheckList.endTime = _end.getFullYear() + '-' + (_end.getMonth() + 1) + '-' + _end.getDate()
             } else {
             } else {
@@ -891,7 +863,7 @@
           let _sp = new Date()
           let _sp = new Date()
           this.ShowApcheckChooseTime = false
           this.ShowApcheckChooseTime = false
           this.$monthClick = true
           this.$monthClick = true
-          let _d = this.computedTime(this.isShowApcheckList.thisMonth, val)
+          let _d = this.computedTime(this.isShowApcheckList.thisMonth + '-01', val)
           let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
           let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
           this.isShowApcheckList.thisMonth = _d.getFullYear() + '-' + _m
           this.isShowApcheckList.thisMonth = _d.getFullYear() + '-' + _m
           if (_d.getTime() >= _sp.getTime()) {
           if (_d.getTime() >= _sp.getTime()) {
@@ -904,7 +876,7 @@
           this.getApcheckDetailsinfo()
           this.getApcheckDetailsinfo()
         } else {
         } else {
           let _sp = new Date()
           let _sp = new Date()
-          let _d = this.computedTime(this[key], val)
+          let _d = this.computedTime(this[key] + '-01', val)
           let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
           let _m = Number(_d.getMonth() + 1) < 10 ? '0' + (_d.getMonth() + 1) : (_d.getMonth() + 1)
           this[key] = _d.getFullYear() + '-' + _m
           this[key] = _d.getFullYear() + '-' + _m
           if (_d.getTime() >= _sp.getTime()) {
           if (_d.getTime() >= _sp.getTime()) {
@@ -917,6 +889,9 @@
         }
         }
       },
       },
       computedTime(num, val) {
       computedTime(num, val) {
+        if ((typeof num === 'object') && num.constructor === Date) {} else {
+          num = num.replace(/-/g, '/')
+        }
         let _d = new Date(num)
         let _d = new Date(num)
         if (val !== undefined) {
         if (val !== undefined) {
           _d.setMonth(_d.getMonth() + val)
           _d.setMonth(_d.getMonth() + val)
@@ -931,13 +906,11 @@
         let itemL = {}
         let itemL = {}
         if (this.activeType === 'all') {
         if (this.activeType === 'all') {
           let _fromDate = this.outTimeMonth + '-01 00:00:00'
           let _fromDate = this.outTimeMonth + '-01 00:00:00'
-          // let _d = new Date(_fromDate)
           let _d = this.computedTime(_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'
           let _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
+          _endDate = _endDate.replace(/-/g, '/')
           _endDate = new Date(_endDate).getTime()
           _endDate = new Date(_endDate).getTime()
+          _fromDate = _fromDate.replace(/-/g, '/')
           _fromDate = new Date(_fromDate).getTime()
           _fromDate = new Date(_fromDate).getTime()
            _url = '/sale/apCheck/customer'
            _url = '/sale/apCheck/customer'
           itemL = {
           itemL = {
@@ -1028,9 +1001,9 @@
       allMoney() {
       allMoney() {
         let sum = 0
         let sum = 0
         this.isShowApcheckList.list.forEach(obj => {
         this.isShowApcheckList.list.forEach(obj => {
-          if (obj.check) {
+          // if (obj.check) {
             sum += obj.qty * (obj.orderprice || 0)
             sum += obj.qty * (obj.orderprice || 0)
-          }
+          // }
         })
         })
         return sum
         return sum
       },
       },
@@ -1066,7 +1039,8 @@
         }
         }
       },
       },
       computeNum: function(price, num) {
       computeNum: function(price, num) {
-        return price.toFixed(num)
+        return Math.floor(price * 100) / 100
+         // price.toString().toFixed(num)
       }
       }
     }
     }
   }
   }
@@ -1213,10 +1187,10 @@
       }
       }
     }
     }
     .btobapCheck-wrapper-scroll {
     .btobapCheck-wrapper-scroll {
-      height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem);
+      height: calc(100vh - 1.26rem - 0.98rem - 1.06rem - 0.92rem);
       overflow-y: auto;
       overflow-y: auto;
       &.btobapCheck-wrapper-scroll2 {
       &.btobapCheck-wrapper-scroll2 {
-        height: calc(100vh - 1.26rem - 0.98rem - 0.82rem - 1.06rem - 0.92rem - 1.3rem);
+        height: calc(100vh - 1.26rem - 0.98rem - 1.06rem - 0.92rem - 1.3rem);
       }
       }
     }
     }
     .filter-wrapper{
     .filter-wrapper{

+ 3 - 3
pages/mobile/center/vendor/productdetails.vue

@@ -76,10 +76,10 @@
           </div>
           </div>
         </div>
         </div>
         <div class="pull-right">
         <div class="pull-right">
-          <span class="name">交期:</span>
-          <input type="tel" placeholder="天数" v-model="chooseItem.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.minDelivery)" />
+          <span class="name">交期(天):</span>
+          <input type="tel" placeholder="最长交期" v-model="chooseItem.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.minDelivery)" />
           -
           -
-          <input type="tel" placeholder="天数" v-model="chooseItem.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.maxDelivery)"/>
+          <input type="tel" placeholder="最长交期" v-model="chooseItem.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.maxDelivery)"/>
         </div>
         </div>
       </div>
       </div>
       <div class="list" style="border-bottom: 0px">
       <div class="list" style="border-bottom: 0px">

+ 8 - 2
pages/mobile/order/orderbtob.vue

@@ -8,18 +8,24 @@
         </nuxt-link>
         </nuxt-link>
       </div>
       </div>
     </div>
     </div>
-    <div class="order-nav">
+    <div class="order-nav" >
       <div :class="activeType === 'todo' ? 'active': ''" @click="ChangeList('todo')"><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 === 'done' ? 'active' : ''" @click="ChangeList('done')"><span>已回复</span></div>
       <div :class="activeType === 'waiting' ? 'active' : ''" @click="ChangeList('waiting')"><span>待收货</span></div>
       <div :class="activeType === 'waiting' ? 'active' : ''" @click="ChangeList('waiting')"><span>待收货</span></div>
       <div :class="activeType === 'end' ? 'active' : ''" @click="ChangeList('end')"><span>已结案</span></div>
       <div :class="activeType === 'end' ? 'active' : ''" @click="ChangeList('end')"><span>已结案</span></div>
     </div>
     </div>
-    <div class="search-content search-content2">
+    <div class="search-content search-content2" v-if="vendorType === 'saler'">
       <input type="text" placeholder="单据编号/客户名称/物料名称" v-model="keyword" @keyup.13="searchOrderlist">
       <input type="text" placeholder="单据编号/客户名称/物料名称" v-model="keyword" @keyup.13="searchOrderlist">
       <span @click="searchOrderlist">
       <span @click="searchOrderlist">
           <i class="iconfont icon-sousuo"></i>
           <i class="iconfont icon-sousuo"></i>
       </span>
       </span>
     </div>
     </div>
+    <div class="search-content search-content2" v-else>
+      <input type="text" placeholder="单据编号/供应商名称/物料名称" v-model="keyword" @keyup.13="searchOrderlist">
+      <span @click="searchOrderlist">
+          <i class="iconfont icon-sousuo"></i>
+      </span>
+    </div>
     <ul class="order-list-wrap" id="b2border-wrapper" v-show="orderList.length > 0">
     <ul class="order-list-wrap" id="b2border-wrapper" v-show="orderList.length > 0">
       <li v-for="item in orderList" @click="goDetails(item)">
       <li v-for="item in orderList" @click="goDetails(item)">
         <div class="list-title">{{vendorType === 'saler' ? item.enterprise.enName : item.receiveName}}</div>
         <div class="list-title">{{vendorType === 'saler' ? item.enterprise.enName : item.receiveName}}</div>