Commit fa802d6e by chenwq

编辑商品-优惠券展示

1 parent 3d9b9c11
......@@ -84,7 +84,7 @@
<div class="associationRow">
<span class="associationLists">名称</span>
<span class="associationLists">优惠卷类型</span>
<span class="associationLists">使用途径</span>
<span class="associationLists">库存</span>
<span class="associationLists" v-if="routeInfo.addOrEdit !== 3">操作</span>
</div>
<div class="associationRow" style="background:white;">
......@@ -92,7 +92,7 @@
<span class="associationLists-X">{{ editForm.relatedCouponName }}</span>
</el-tooltip>
<span class="associationLists-X">{{ editForm.relatedDiscountType }}</span>
<span class="associationLists-X">{{ editForm.relatedUseChannel || '-' }}</span>
<span class="associationLists-X">{{ editForm.residueAmount || '-' }}</span>
<span class="associationLists" v-if="routeInfo.addOrEdit !== 3">
<el-button type="text" @click="del()">删除</el-button>
</span>
......@@ -363,15 +363,15 @@ export default {
}
},
{
label: '使用途径',
prop: 'useChannel',
formatter: cellValue => {
var useChannel = '-'
if (cellValue.useChannel) {
useChannel = this.associationBaseData.useChannelList.find(item => item.confId == cellValue.useChannel).confName
}
return useChannel
}
label: '库存',
prop: 'residueAmount'
// formatter: cellValue => {
// var useChannel = '-'
// if (cellValue.useChannel) {
// useChannel = this.associationBaseData.useChannelList.find(item => item.confId == cellValue.useChannel).confName
// }
// return useChannel
// }
}
]
},
......@@ -938,12 +938,14 @@ export default {
this.editForm.relatedCouponName = ''
this.editForm.relatedDiscountType = ''
this.editForm.relatedUseChannel = ''
this.editForm.residueAmount = ''
},
associationConfirm() {
this.dialogTableVisible = false
this.editForm.relatedUseChannel = ''
this.editForm.relatedCouponId = this.associationList[0].id
this.editForm.relatedCouponName = this.associationList[0].couponName
this.editForm.residueAmount = this.associationList[0].residueAmount
this.editForm.relatedDiscountType = this.associationBaseData.discountTypeList.find(item => item.confId == this.associationList[0].discountType).confName
if (this.associationBaseData.useChannelList.find(item => item.confId == this.associationList[0].useChannel)) {
this.editForm.relatedUseChannel = this.associationBaseData.useChannelList.find(item => item.confId == this.associationList[0].useChannel).confName
......@@ -1318,6 +1320,7 @@ export default {
if (res.relatedCoupon) {
this.editForm.relatedCouponId = res.relatedCoupon.id
this.editForm.relatedCouponName = res.relatedCoupon.couponName
this.editForm.residueAmount = res.relatedCoupon.stock
this.editForm.relatedDiscountType = this.associationBaseData.discountTypeList.find(item => item.confId == res.relatedCoupon.discountType).confName
if (this.associationBaseData.useChannelList.find(item => item.confId == res.relatedCoupon.useChannel)) {
this.editForm.relatedUseChannel = this.associationBaseData.useChannelList.find(item => item.confId == res.relatedCoupon.useChannel).confName
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!