|
@@ -18,17 +18,20 @@
|
|
|
:column-width-resize-option="columnWidthResizeOption"
|
|
|
/>
|
|
|
<div v-show="showEmpty" class="empty-data">暂无数据</div>
|
|
|
+ <!-- 活动规则详情 -->
|
|
|
+ <detailModal :openModal="openDetailModal" :itemSn="detailSn" @close="closeDetailModal"></detailModal>
|
|
|
</a-spin>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
+ import detailModal from '@/views/promotionRulesManagement/dealerPromotions/detail.vue'
|
|
|
import { salesPromoQueryList } from '@/api/salesNew'
|
|
|
import { salesDetailAllList, salesPromoDetailCount, salesDetaiCount } from '@/api/salesDetailNew'
|
|
|
export default {
|
|
|
name: 'DetailProductList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { },
|
|
|
+ components: { detailModal },
|
|
|
props: {
|
|
|
newLoading: Boolean,
|
|
|
detailData: {
|
|
@@ -71,6 +74,8 @@
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
+ openDetailModal: false,
|
|
|
+ detailSn: null,
|
|
|
activeList: [], // 活动列表
|
|
|
dataSource: [],
|
|
|
tableHeight: this.maxHeight,
|
|
@@ -150,7 +155,7 @@
|
|
|
{_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total ? (<span>优惠金额:<strong>{record.total.lossAmount||'--'}</strong>;</span>):('')}
|
|
|
{_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total ? (<span>采购额结余:<strong>{_this.toThousands(Number(record.total.totalPromoGiftsAmount) - Number(record.total.totalUsePromoGiftsAmount))}</strong>;</span>):('')}
|
|
|
{_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total ? (<span>采购额超出:<strong>{_this.toThousands(Number(record.total.totalUsePromoGiftsAmount) - Number(record.total.totalPromoGiftsAmount))}</strong>;</span>):('')}
|
|
|
- {record.expenseAccountFlagDictValue||''}
|
|
|
+ {record.expenseAccountFlag!='WAIT' ? record.expenseAccountFlagDictValue : ''}
|
|
|
</div>
|
|
|
</div>
|
|
|
):(<span>{data}</span>)}
|
|
@@ -159,10 +164,14 @@
|
|
|
}
|
|
|
// 显示折扣价
|
|
|
const discountPriceFormat = function(record,data,h) {
|
|
|
- if(record.promotionFlag == 'GIFT' || record.promotionFlag == 'DISCOUNT'){
|
|
|
- return _this.toThousands(record.discountedPrice) + '(' + _this.toThousands(data) + ')'
|
|
|
- }
|
|
|
- return _this.toThousands(data)
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ {_this.toThousands(data)}
|
|
|
+ {record.promotionFlag == 'GIFT' || record.promotionFlag == 'DISCOUNT' ? (
|
|
|
+ <span style="color:#f5222d;" title="原价">({ _this.toThousands(record.origPrice)})</span>
|
|
|
+ ):''}
|
|
|
+ </div>
|
|
|
+ )
|
|
|
}
|
|
|
|
|
|
let arr= [
|
|
@@ -193,12 +202,12 @@
|
|
|
arr.push({ title: '市级价', field: 'cityPrice', width: 80,key: "j", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field])} })
|
|
|
if (this.$hasPermissions(this.authCode + '_salesPrice')) { // 售价权限
|
|
|
this.colspanNums = this.colspanNums + 1
|
|
|
- arr.push({ title: '销售价', field: 'price', width: 80,key: "k", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return discountPriceFormat(row,row[column.field],h)} })
|
|
|
+ arr.push({ title: '销售价', field: 'price', width: 120,key: "k", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return discountPriceFormat(row,row[column.field],h)} })
|
|
|
}
|
|
|
} else {
|
|
|
if (this.$hasPermissions(this.authCode + '_salesPrice')) { // 售价权限
|
|
|
this.colspanNums = this.colspanNums + 1
|
|
|
- arr.push({ title: '销售价', field: 'price', width: 80,key: "l", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return discountPriceFormat(row,row[column.field],h)} })
|
|
|
+ arr.push({ title: '销售价', field: 'price', width: 120,key: "l", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return discountPriceFormat(row,row[column.field],h)} })
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -224,6 +233,11 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 关闭详情弹窗
|
|
|
+ closeDetailModal () {
|
|
|
+ this.detailSn = null
|
|
|
+ this.openDetailModal = false
|
|
|
+ },
|
|
|
// 合并活动分类单元格
|
|
|
bodyCellSpan({ row, column, rowIndex }) {
|
|
|
if (row.id.indexOf('promo-')>=0) {
|
|
@@ -241,8 +255,9 @@
|
|
|
}
|
|
|
},
|
|
|
// 查看活动详情
|
|
|
- showDesc(e,item){
|
|
|
-
|
|
|
+ showDesc(row){
|
|
|
+ this.detailSn = row.promotionRuleSn
|
|
|
+ this.openDetailModal = true
|
|
|
},
|
|
|
// 获取销售单参与的活动列表
|
|
|
pageInit(){
|