|
|
@@ -95,21 +95,21 @@
|
|
|
<div v-if="item.thisMonthCount && item.thisMonthCount.length > 0">
|
|
|
<span class="inline-block">本月应收:</span>
|
|
|
<div class="inline-block" style="vertical-align: top" >
|
|
|
- <div v-for="count in item.thisMonthCount">
|
|
|
- <span>{{count.currency}}:{{count.amount}}{{count.currency === 'RMB' ? '¥': '$'}}</span>
|
|
|
+ <div v-for="count in item.thisMonthCount" v-if="count.amount > 0">
|
|
|
+ <span>{{count.currency}}{{count.amount | computeNum(2)}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-else><span>本月应收:-</span></div>
|
|
|
+ <div v-else><span>本月应收:0</span></div>
|
|
|
<div v-if="item.totalCount && item.totalCount.length > 0">
|
|
|
<span class="inline-block">应收总额:</span>
|
|
|
<div class="inline-block" style="vertical-align: top" >
|
|
|
- <div v-for="count in item.totalCount">
|
|
|
- <span>{{count.currency}}:{{count.amount}}</span>
|
|
|
+ <div v-for="count in item.totalCount" v-if="count.amount > 0">
|
|
|
+ <span>{{count.currency}}:{{count.amount | computeNum(2)}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-else><span>应收总额:-</span></div>
|
|
|
+ <div v-else><span>应收总额:0</span></div>
|
|
|
</div>
|
|
|
<div class="invoice-btob-wrapper-middle" @click="showApcheckList(item)">
|
|
|
<div class="middle_btn">立即对账</div>
|
|
|
@@ -180,9 +180,11 @@
|
|
|
<label class="mobile-cart-check" :class="{active: item.check}"></label>
|
|
|
</span>
|
|
|
<div class="inline-block" style="margin-left: 0.15rem">
|
|
|
+ <div class="OverHidden">采购单:<span>{{item.ordercode}}</span></div>
|
|
|
+ <div class="OverHidden">物料名称:<span>{{item.prodtitle}}</span></div>
|
|
|
+ <div class="OverHidden">规格型号:<span>{{item.prodspec}}</span></div>
|
|
|
+ <div class="OverHidden">发货单:<span>{{item.sendcode}}</span></div>
|
|
|
<!--<div class="OverHidden">序号:<span>{{index + 1}}</span></div>-->
|
|
|
- <div class="OverHidden">验收数量:<span>{{item.thischeckqty}}</span></div>
|
|
|
- <div class="OverHidden">验收单:<span>{{item.inoutno}}</span></div>
|
|
|
<!--<div class="OverHidden">类型:<span>{{item.piclass}}</span></div>-->
|
|
|
<!--<div class="OverHidden">单据日期:<span>{{item.pidate | time}}</span></div>-->
|
|
|
</div>
|
|
|
@@ -192,14 +194,13 @@
|
|
|
<label class="mobile-cart-check"></label>
|
|
|
</span>
|
|
|
<div class="inline-block" style="margin-left: 0.15rem">
|
|
|
- <div class="OverHidden">采购单:<span>{{item.ordercode}}</span></div>
|
|
|
- <div class="OverHidden">发货单:<span>{{item.sendcode}}</span></div>
|
|
|
- <div class="OverHidden">客户料号:<span>{{item.prodcode}}</span></div>
|
|
|
- <div class="OverHidden">物料名称:<span>{{item.prodtitle}}</span></div>
|
|
|
- <div class="OverHidden">规格型号:<span>{{item.prodspec}}</span></div>
|
|
|
- <div class="OverHidden">税率:<span>{{item.taxrate}}%</span></div>
|
|
|
<div class="OverHidden">发货数量:<span>{{item.qty}}</span></div>
|
|
|
+ <div class="OverHidden">验收单:<span>{{item.inoutno}}</span></div>
|
|
|
+ <div class="OverHidden">验收数量:<span>{{item.thischeckqty}}</span></div>
|
|
|
<div class="OverHidden">单价:<span>{{item.currency}}:{{item.orderprice}}</span></div>
|
|
|
+ <!--<div class="OverHidden">发货单:<span>{{item.sendcode}}</span></div>-->
|
|
|
+ <div class="OverHidden">税率:<span>{{item.taxrate}}%</span></div>
|
|
|
+ <!--<div class="OverHidden">客户料号:<span>{{item.prodcode}}</span></div>-->
|
|
|
<!--<div class="OverHidden">金额:<span>{{}}</span></div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -581,11 +582,11 @@
|
|
|
}
|
|
|
}
|
|
|
this.$http.get('/sale/apCheck/getAllByKeywords', _params).then(res => {
|
|
|
- res.data.forEach(item => {
|
|
|
+ res.data.details.forEach(item => {
|
|
|
item.check = true
|
|
|
})
|
|
|
this.$monthClick = false
|
|
|
- this.isShowApcheckList.list = res.data
|
|
|
+ this.isShowApcheckList.list = res.data.details
|
|
|
this.$nextTick(() => {
|
|
|
this._initscroll()
|
|
|
})
|
|
|
@@ -718,12 +719,25 @@
|
|
|
this.setRemindText('本次对账数量,填写有误!')
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // 获取筛选时间的开始时间为对账的开始时间
|
|
|
- apCheck.beginDate = this.$selectObj.value.fromDate
|
|
|
-
|
|
|
- // 获取筛选的截止时间为对账的截止时间
|
|
|
- apCheck.endDate = this.$selectObj.value.toDate
|
|
|
+ if (this.ShowApcheckChooseTime) {
|
|
|
+ let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
|
|
|
+ let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
|
|
|
+ // 获取筛选时间的开始时间为对账的开始时间
|
|
|
+ apCheck.beginDate = _start.getTime()
|
|
|
+ // 获取筛选的截止时间为对账的截止时间
|
|
|
+ apCheck.endDate = _end.getTime()
|
|
|
+ } else {
|
|
|
+ this.isShowApcheckList.startTime = this.outTimeMonth + '-01'
|
|
|
+ let _d = new Date(this.isShowApcheckList.startTime)
|
|
|
+ let _start = _d
|
|
|
+ _d.setDate(1)
|
|
|
+ _d.setMonth(_d.getMonth() + 1)
|
|
|
+ _d.setDate(_d.getDate() - 1)
|
|
|
+ // 获取筛选时间的开始时间为对账的开始时间
|
|
|
+ apCheck.beginDate = _start.getTime()
|
|
|
+ // 获取筛选的截止时间为对账的截止时间
|
|
|
+ apCheck.endDate = _d.getTime()
|
|
|
+ }
|
|
|
|
|
|
// 应收对账单明细行数据
|
|
|
item.orderCode = check.ordercode
|
|
|
@@ -881,6 +895,24 @@
|
|
|
item.getTotalProd += im.checkQty
|
|
|
})
|
|
|
})
|
|
|
+ } else {
|
|
|
+ data.content.forEach((item) => {
|
|
|
+ let _mouthArr = []
|
|
|
+ let _totalArr = []
|
|
|
+ item.thisMonthCount && item.thisMonthCount.forEach(count => {
|
|
|
+ if (count.amount > 0) {
|
|
|
+ _mouthArr.push(count)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ item.totalCount && item.totalCount.forEach(count => {
|
|
|
+ if (count.amount > 0) {
|
|
|
+ _totalArr.push(count)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ item.totalCount = _totalArr
|
|
|
+ item.thisMonthCount = _mouthArr
|
|
|
+ })
|
|
|
+ console.log(data.content)
|
|
|
}
|
|
|
if (!val[2]) {
|
|
|
this.resourceList.content.push(...data.content)
|
|
|
@@ -914,7 +946,7 @@
|
|
|
let sum = 0
|
|
|
this.isShowApcheckList.list.forEach(obj => {
|
|
|
if (obj.check) {
|
|
|
- sum += obj.qty * obj.orderprice
|
|
|
+ sum += obj.qty * (obj.orderprice || 0)
|
|
|
}
|
|
|
})
|
|
|
return sum
|