|
@@ -148,35 +148,38 @@
|
|
<template slot="provinceDiscount" slot-scope="text, record">
|
|
<template slot="provinceDiscount" slot-scope="text, record">
|
|
<a-input-number
|
|
<a-input-number
|
|
size="small"
|
|
size="small"
|
|
|
|
+ style="width:70px;"
|
|
:id="'promotionList-provinceDiscount'+record.id"
|
|
:id="'promotionList-provinceDiscount'+record.id"
|
|
v-model="record.provinceValue"
|
|
v-model="record.provinceValue"
|
|
:min="0"
|
|
:min="0"
|
|
:step="1"
|
|
:step="1"
|
|
:precision="2"
|
|
:precision="2"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
- placeholder="请输入"/>%
|
|
|
|
|
|
+ placeholder="请输入"/> %
|
|
</template>
|
|
</template>
|
|
<template slot="cityDiscount" slot-scope="text, record">
|
|
<template slot="cityDiscount" slot-scope="text, record">
|
|
<a-input-number
|
|
<a-input-number
|
|
size="small"
|
|
size="small"
|
|
|
|
+ style="width:70px;"
|
|
:id="'promotionList-cityValue'+record.id"
|
|
:id="'promotionList-cityValue'+record.id"
|
|
v-model="record.cityValue"
|
|
v-model="record.cityValue"
|
|
:min="record.provinceValue||0"
|
|
:min="record.provinceValue||0"
|
|
:step="1"
|
|
:step="1"
|
|
:precision="2"
|
|
:precision="2"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
- placeholder="请输入"/>%
|
|
|
|
|
|
+ placeholder="请输入"/> %
|
|
</template>
|
|
</template>
|
|
<template slot="specialDiscount" slot-scope="text, record">
|
|
<template slot="specialDiscount" slot-scope="text, record">
|
|
<a-input-number
|
|
<a-input-number
|
|
size="small"
|
|
size="small"
|
|
|
|
+ style="width:70px;"
|
|
:id="'promotionList-specialValue'+record.id"
|
|
:id="'promotionList-specialValue'+record.id"
|
|
v-model="record.specialValue"
|
|
v-model="record.specialValue"
|
|
:min="record.cityValue ||0"
|
|
:min="record.cityValue ||0"
|
|
:step="1"
|
|
:step="1"
|
|
:precision="2"
|
|
:precision="2"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
- placeholder="请输入"/>%
|
|
|
|
|
|
+ placeholder="请输入"/> %
|
|
</template>
|
|
</template>
|
|
<template slot="provincePrice" slot-scope="text, record">
|
|
<template slot="provincePrice" slot-scope="text, record">
|
|
<a-input-number
|
|
<a-input-number
|
|
@@ -216,16 +219,18 @@
|
|
</template>
|
|
</template>
|
|
<template slot="orginAmount" slot-scope="text, record, index">
|
|
<template slot="orginAmount" slot-scope="text, record, index">
|
|
<div style="display:flex;align-items: center;">
|
|
<div style="display:flex;align-items: center;">
|
|
|
|
+ <span>购买满</span>
|
|
<a-input-number
|
|
<a-input-number
|
|
size="small"
|
|
size="small"
|
|
|
|
+ style="width:100px;margin:0 5px;"
|
|
:id="'promotionList-orginAmountValue'+record.id"
|
|
:id="'promotionList-orginAmountValue'+record.id"
|
|
v-model="record.orginAmountValue"
|
|
v-model="record.orginAmountValue"
|
|
- :min="0"
|
|
|
|
- :precision="2"
|
|
|
|
|
|
+ :min="index>0?setTableData[index-1].orginAmountValue:0"
|
|
|
|
+ :precision="record.unitType=='YUAN'?2:0"
|
|
:max="99999999"
|
|
:max="99999999"
|
|
placeholder="请输入"/>
|
|
placeholder="请输入"/>
|
|
- <a-select size="small" style="width:50px;" v-model="record.unitType" @change="changeUnitType(index)" :disabled="index>0">
|
|
|
|
- <a-select-option value="YUAN">元</a-select-option>
|
|
|
|
|
|
+ <a-select size="small" style="width:80px;" v-model="record.unitType" @change="changeUnitType(index)" :disabled="index>0">
|
|
|
|
+ <a-select-option value="YUAN">元(原价)</a-select-option>
|
|
<a-select-option value="GE">个</a-select-option>
|
|
<a-select-option value="GE">个</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</div>
|
|
</div>
|
|
@@ -379,10 +384,10 @@ export default {
|
|
var arr = []
|
|
var arr = []
|
|
if (_this.form.discountType === '1') {
|
|
if (_this.form.discountType === '1') {
|
|
arr = [
|
|
arr = [
|
|
- { title: '特价产品原价金额', scopedSlots: { customRender: 'orginAmount' }, width: '30%', align: 'left' },
|
|
|
|
- { title: '省价折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '20%', align: 'left' },
|
|
|
|
- { title: '市价折扣', scopedSlots: { customRender: 'cityDiscount' }, width: '20%', align: 'left' },
|
|
|
|
- { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '20%', align: 'left' },
|
|
|
|
|
|
+ { title: '特价产品合计', scopedSlots: { customRender: 'orginAmount' }, width: '42%', align: 'left' },
|
|
|
|
+ { title: '省价折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '16%', align: 'left' },
|
|
|
|
+ { title: '市价折扣', scopedSlots: { customRender: 'cityDiscount' }, width: '16%', align: 'left' },
|
|
|
|
+ { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '16%', align: 'left' },
|
|
{ title: '', scopedSlots: { customRender: 'actions' }, width: '10%', align: 'center' }
|
|
{ title: '', scopedSlots: { customRender: 'actions' }, width: '10%', align: 'center' }
|
|
]
|
|
]
|
|
} else if (_this.form.discountType === '2') {
|
|
} else if (_this.form.discountType === '2') {
|
|
@@ -417,6 +422,9 @@ export default {
|
|
const ut = this.setTableData[0].unitType
|
|
const ut = this.setTableData[0].unitType
|
|
this.setTableData = this.setTableData.map(item => {
|
|
this.setTableData = this.setTableData.map(item => {
|
|
item.unitType = ut
|
|
item.unitType = ut
|
|
|
|
+ if (ut == 'GE') {
|
|
|
|
+ item.orginAmountValue = Math.floor(item.orginAmountValue)
|
|
|
|
+ }
|
|
return item
|
|
return item
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -425,7 +433,7 @@ export default {
|
|
this.form.discountType = val
|
|
this.form.discountType = val
|
|
this.$refs.specialProduct.reSetTableData()
|
|
this.$refs.specialProduct.reSetTableData()
|
|
this.setTableData = [{
|
|
this.setTableData = [{
|
|
- orginAmountValue: 0,
|
|
|
|
|
|
+ orginAmountValue: undefined,
|
|
unitType: 'YUAN',
|
|
unitType: 'YUAN',
|
|
provinceValue: undefined,
|
|
provinceValue: undefined,
|
|
cityValue: undefined,
|
|
cityValue: undefined,
|
|
@@ -473,7 +481,7 @@ export default {
|
|
}
|
|
}
|
|
const ut = this.setTableData[0].unitType
|
|
const ut = this.setTableData[0].unitType
|
|
this.setTableData.push({
|
|
this.setTableData.push({
|
|
- orginAmountValue: 0,
|
|
|
|
|
|
+ orginAmountValue: undefined,
|
|
unitType: ut,
|
|
unitType: ut,
|
|
provinceValue: undefined,
|
|
provinceValue: undefined,
|
|
cityValue: undefined,
|
|
cityValue: undefined,
|
|
@@ -586,8 +594,9 @@ export default {
|
|
} else if (form.discountType == '1') {
|
|
} else if (form.discountType == '1') {
|
|
infoDetail += '各级别价打折;'
|
|
infoDetail += '各级别价打折;'
|
|
form.specialDiscountList.forEach(item => {
|
|
form.specialDiscountList.forEach(item => {
|
|
- const utd = { 'YUAN': '元', 'GE': '个' }
|
|
|
|
- infoDetail += '阶梯' + item.scopeLevel + ':' + '原价:' + item.discountScopeValue + utd[item.unitType] + ',省级折扣' + item.provinceDiscountRate + '%,市级折扣' + item.cityDiscountRate + '%,特约折扣' + item.specialDiscountRate + '%;'
|
|
|
|
|
|
+ const utd = { 'YUAN': '元(原价)', 'GE': '个' }
|
|
|
|
+ infoDetail += form.specialDiscountList.length > 1 ? '<div>' + item.scopeLevel + '、' : '<div>'
|
|
|
|
+ infoDetail += '购买满' + item.discountScopeValue + utd[item.unitType] + '特价产品,省级折扣' + item.provinceDiscountRate + '%,市级折扣' + item.cityDiscountRate + '%,特约折扣' + item.specialDiscountRate + '%;</div>'
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
infoDetail += '各级别价直降;省级直降' + form.provinceValue.toFixed(2) + ',市级直降' + form.cityValue.toFixed(2) + ',特约直降' + form.specialValue.toFixed(2)
|
|
infoDetail += '各级别价直降;省级直降' + form.provinceValue.toFixed(2) + ',市级直降' + form.cityValue.toFixed(2) + ',特约直降' + form.specialValue.toFixed(2)
|