|
@@ -65,7 +65,7 @@
|
|
|
</a-descriptions>
|
|
|
</div>
|
|
|
</a-card>
|
|
|
- <a-card size="small" :bordered="false" class="pages-wrap">
|
|
|
+ <a-card size="small" :bordered="false" class="pages-wrap" style="margin-bottom: 6px;" >
|
|
|
<!-- 统计信息 -->
|
|
|
<a-alert type="info" style="margin-bottom: 10px;">
|
|
|
<div slot="message">
|
|
@@ -143,6 +143,7 @@
|
|
|
<div>
|
|
|
<detailProductList
|
|
|
ref="productList"
|
|
|
+ :maxHeight="pageHeight"
|
|
|
:detailData="detailData"
|
|
|
:warehouseSn="warehouseSn"
|
|
|
:promoFlag="promoFlag"
|
|
@@ -158,6 +159,7 @@
|
|
|
:bordered="false"
|
|
|
title="活动产品"
|
|
|
class="salesEdit-cont"
|
|
|
+ v-if="activeList.length"
|
|
|
>
|
|
|
<activeStatisticsList
|
|
|
ref="activeTjList"
|
|
@@ -336,7 +338,7 @@ export default {
|
|
|
return shippingAddrProvinceName + shippingAddrCityName + shippingAddrCountyName + shippingAddr
|
|
|
}
|
|
|
},
|
|
|
- // 是否因此底部栏按钮
|
|
|
+ // 是否隐藏底部栏按钮
|
|
|
hideFooter () {
|
|
|
const detailData = this.detailData
|
|
|
return detailData && (detailData.billStatus == 'HQ_CHANGE' || (detailData.salesBillSource != 'SALES' && detailData.billStatus == 'AUDIT_REJECT') || detailData.billStatus == 'FINISH' || detailData.billStatus == 'OUTING_WAREHOUSE')
|
|
@@ -345,9 +347,13 @@ export default {
|
|
|
hasPrompActive () {
|
|
|
return this.detailData && this.detailData.promoFlag == 1
|
|
|
},
|
|
|
+ // 是否有可转采购额
|
|
|
+ hasConvertPromoGifts () {
|
|
|
+ return this.detailData && this.detailData.totalConvertPromoGiftsQty
|
|
|
+ },
|
|
|
// 是否有促销产品(转采购额)
|
|
|
showConvertPromoGifts () {
|
|
|
- return this.$refs.productList && this.$refs.productList.showConvertPromoGifts
|
|
|
+ return this.activeList && this.activeList.filter(item => item.enabledFlag == 1).find(item => item.promotionRule && item.promotionRule.convertExpenseFlag == 1 && item.promotionRule.promotionRuleType == 'BUY_PROD_GIVE_PROD')
|
|
|
},
|
|
|
// 是否显示库存列
|
|
|
showStock () {
|
|
@@ -355,7 +361,7 @@ export default {
|
|
|
},
|
|
|
// 表格高度计算
|
|
|
pageHeight () {
|
|
|
- return window.innerHeight - 305 + (this.hideFooter ? 45 : 0)
|
|
|
+ return this.activeList.length == 0 ? window.innerHeight - 315 + (this.hideFooter ? 45 : 0) : 302
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -458,7 +464,7 @@ export default {
|
|
|
// 查询数据
|
|
|
searchTable () {
|
|
|
this.$refs.productList.searchTable()
|
|
|
- this.$refs.productActiveList.searchTable()
|
|
|
+ if (this.activeList.length) this.$refs.productActiveList.searchTable()
|
|
|
},
|
|
|
// 详情
|
|
|
getDetail () {
|
|
@@ -477,9 +483,9 @@ export default {
|
|
|
this.activeList = list.filter(item => item.promotion && item.promotionRule)
|
|
|
// 触发活动统计查询变量
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.activeTjList.hasInit = false
|
|
|
- // 刷新活动统计
|
|
|
- this.$refs.activeTjList.getDataList()
|
|
|
+ if (this.activeList.length) {
|
|
|
+ this.$refs.activeTjList.hasInit = false
|
|
|
+ }
|
|
|
})
|
|
|
setTimeout(() => {
|
|
|
this.resetSearchForm()
|