|
@@ -78,7 +78,7 @@
|
|
|
</template>
|
|
|
<!-- 价格 -->
|
|
|
<template slot="productPrice" slot-scope="text, record">
|
|
|
- {{ text||text==0 ? toThousands(text) : '--' }} <span title="原价" v-if="promoProductClz == 'GIFT' || promoProductClz == 'DISCOUNT'">({{ record.origPrice||record.origPrice==0 ? toThousands(record.origPrice) : '--' }})</span>
|
|
|
+ {{ text||text==0 ? toThousands(text) : '--' }} <span title="原价" v-if="promoProductClz == 'GIFT' || promoProductClz == 'DISCOUNT'">({{ record.origPrice||record.origPrice==0 ? toThousands(record.origPrice) : '--' }})</span>
|
|
|
</template>
|
|
|
<!-- 产品名称 -->
|
|
|
<template slot="productName" slot-scope="text, record">
|
|
@@ -143,7 +143,7 @@ export default {
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
promoProductClz: 'GATE',
|
|
|
promoRuleData: null,
|
|
|
- tabList:[],
|
|
|
+ tabList: [],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -163,10 +163,10 @@ export default {
|
|
|
const productUnit = data.list[i].productUnit || '--'
|
|
|
const productPackQtyUnit = data.list[i].productPackQtyUnit || '--'
|
|
|
data.list[i].packQtyV = productPackQty + productUnit + '/' + productPackQtyUnit
|
|
|
- if(data.list[i].unitType=='SL'){
|
|
|
+ if (data.list[i].unitType == 'SL') {
|
|
|
data.list[i].unitQtyV = data.list[i].unitQty ? (data.list[i].unitQty + data.list[i].productUnit) : '--'
|
|
|
- }else{
|
|
|
- data.list[i].unitQtyV = data.list[i].productPackQty&&data.list[i].unitQty ? ((data.list[i].productPackQty*data.list[i].unitQty) + data.list[i].productUnit) : '--'
|
|
|
+ } else {
|
|
|
+ data.list[i].unitQtyV = data.list[i].productPackQty && data.list[i].unitQty ? ((data.list[i].productPackQty * data.list[i].unitQty) + data.list[i].productUnit) : '--'
|
|
|
}
|
|
|
}
|
|
|
this.disabled = false
|
|
@@ -195,14 +195,15 @@ export default {
|
|
|
let idx = 7
|
|
|
if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
|
|
|
arr.splice(idx, 0, { title: '售价', dataIndex: 'productPrice', width: '100px', align: 'right', scopedSlots: { customRender: 'productPrice' } })
|
|
|
- idx = idx + 1
|
|
|
+ arr.splice(idx + 1, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
+ idx = idx + 2
|
|
|
}
|
|
|
- arr.splice(idx+1, 0,{ title: '起订量', dataIndex: 'unitQtyV', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(idx + 1, 0, { title: '起订量', dataIndex: 'unitQtyV', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
return arr
|
|
|
}
|
|
|
},
|
|
|
- watch:{
|
|
|
- advanced(a,b){
|
|
|
+ watch: {
|
|
|
+ advanced (a, b) {
|
|
|
this.tableHeight = window.innerHeight - (a ? 375 : 330)
|
|
|
}
|
|
|
},
|
|
@@ -210,12 +211,12 @@ export default {
|
|
|
loadWarehouse (sn) {
|
|
|
this.defaultWarehouseSn = sn
|
|
|
this.queryParam.warehouseSn = sn
|
|
|
- if(this.buyerSn){
|
|
|
+ if (this.buyerSn) {
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
},
|
|
|
// 切换tab
|
|
|
- changeTab(e){
|
|
|
+ changeTab (e) {
|
|
|
this.promoProductClz = e
|
|
|
this.resetSearchForm()
|
|
|
},
|
|
@@ -257,32 +258,32 @@ export default {
|
|
|
this.queryParam.dealerLevel = data.buyerLevel
|
|
|
this.queryParam.promoRuleSn = promo.promoRuleSn
|
|
|
this.queryParam.salesPromoSn = promo.salesPromoSn
|
|
|
-
|
|
|
+
|
|
|
// 是否是买产品送产品
|
|
|
- const isMcpScp = this.promoRuleData&&this.promoRuleData.convertExpenseFlag==1&&this.promoRuleData.promotionRuleType=='BUY_PROD_GIVE_PROD'
|
|
|
+ const isMcpScp = this.promoRuleData && this.promoRuleData.convertExpenseFlag == 1 && this.promoRuleData.promotionRuleType == 'BUY_PROD_GIVE_PROD'
|
|
|
// 是否卖产品送采购额
|
|
|
- const isMcpScge = this.promoRuleData.promotionRuleType=='BUY_PROD_GIVE_MONEY'&&this.promoRuleData.scopeFlag==='1'
|
|
|
-
|
|
|
+ const isMcpScge = this.promoRuleData.promotionRuleType == 'BUY_PROD_GIVE_MONEY' && this.promoRuleData.scopeFlag === '1'
|
|
|
+
|
|
|
const tabList = []
|
|
|
- if(this.promoRuleData){
|
|
|
- if(this.promoRuleData.gateFlag==='1'){
|
|
|
- tabList.push({text:'门槛产品',val:'GATE'})
|
|
|
+ if (this.promoRuleData) {
|
|
|
+ if (this.promoRuleData.gateFlag === '1') {
|
|
|
+ tabList.push({ text: '门槛产品', val: 'GATE' })
|
|
|
}
|
|
|
- if(this.promoRuleData.promotionRuleType!='PROMO_PROD'){
|
|
|
- tabList.push({text:'正价产品',val:'REGULAR'})
|
|
|
+ if (this.promoRuleData.promotionRuleType != 'PROMO_PROD') {
|
|
|
+ tabList.push({ text: '正价产品', val: 'REGULAR' })
|
|
|
}
|
|
|
- if(this.promoRuleData.regularPromotionSameFlag==='0'||this.promoRuleData.scopeFlag==='0'||isMcpScge){
|
|
|
- const levelText = promo.countData.scopeLevelFlag && isMcpScp ? '(阶梯'+promo.countData.scopeLevel+')' : ''
|
|
|
- tabList.push({text:'促销产品'+ levelText ,val:'GIFT'})
|
|
|
+ if (this.promoRuleData.regularPromotionSameFlag === '0' || this.promoRuleData.scopeFlag === '0' || isMcpScge) {
|
|
|
+ const levelText = promo.countData.scopeLevelFlag && isMcpScp ? '(阶梯' + promo.countData.scopeLevel + ')' : ''
|
|
|
+ tabList.push({ text: '促销产品' + levelText, val: 'GIFT' })
|
|
|
}
|
|
|
- if(this.promoRuleData.promotionRuleType=='PROMO_PROD'){
|
|
|
- tabList.push({text:'特价产品',val:'DISCOUNT'})
|
|
|
+ if (this.promoRuleData.promotionRuleType == 'PROMO_PROD') {
|
|
|
+ tabList.push({ text: '特价产品', val: 'DISCOUNT' })
|
|
|
}
|
|
|
}
|
|
|
this.tabList = tabList
|
|
|
this.promoProductClz = tabList[0].val
|
|
|
this.tableHeight = window.innerHeight - 330
|
|
|
-
|
|
|
+
|
|
|
this.queryParam.scopeLevel = promo.countData.scopeLevel
|
|
|
this.resetSearchForm()
|
|
|
},
|