Commit fa802d6e by chenwq

编辑商品-优惠券展示

1 parent 3d9b9c11
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<div class="associationRow"> <div class="associationRow">
<span class="associationLists">名称</span> <span class="associationLists">名称</span>
<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> <span class="associationLists" v-if="routeInfo.addOrEdit !== 3">操作</span>
</div> </div>
<div class="associationRow" style="background:white;"> <div class="associationRow" style="background:white;">
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<span class="associationLists-X">{{ editForm.relatedCouponName }}</span> <span class="associationLists-X">{{ editForm.relatedCouponName }}</span>
</el-tooltip> </el-tooltip>
<span class="associationLists-X">{{ editForm.relatedDiscountType }}</span> <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"> <span class="associationLists" v-if="routeInfo.addOrEdit !== 3">
<el-button type="text" @click="del()">删除</el-button> <el-button type="text" @click="del()">删除</el-button>
</span> </span>
...@@ -363,15 +363,15 @@ export default { ...@@ -363,15 +363,15 @@ export default {
} }
}, },
{ {
label: '使用途径', label: '库存',
prop: 'useChannel', prop: 'residueAmount'
formatter: cellValue => { // formatter: cellValue => {
var useChannel = '-' // var useChannel = '-'
if (cellValue.useChannel) { // if (cellValue.useChannel) {
useChannel = this.associationBaseData.useChannelList.find(item => item.confId == cellValue.useChannel).confName // useChannel = this.associationBaseData.useChannelList.find(item => item.confId == cellValue.useChannel).confName
} // }
return useChannel // return useChannel
} // }
} }
] ]
}, },
...@@ -938,12 +938,14 @@ export default { ...@@ -938,12 +938,14 @@ export default {
this.editForm.relatedCouponName = '' this.editForm.relatedCouponName = ''
this.editForm.relatedDiscountType = '' this.editForm.relatedDiscountType = ''
this.editForm.relatedUseChannel = '' this.editForm.relatedUseChannel = ''
this.editForm.residueAmount = ''
}, },
associationConfirm() { associationConfirm() {
this.dialogTableVisible = false this.dialogTableVisible = false
this.editForm.relatedUseChannel = '' this.editForm.relatedUseChannel = ''
this.editForm.relatedCouponId = this.associationList[0].id this.editForm.relatedCouponId = this.associationList[0].id
this.editForm.relatedCouponName = this.associationList[0].couponName 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 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)) { 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 this.editForm.relatedUseChannel = this.associationBaseData.useChannelList.find(item => item.confId == this.associationList[0].useChannel).confName
...@@ -1318,6 +1320,7 @@ export default { ...@@ -1318,6 +1320,7 @@ export default {
if (res.relatedCoupon) { if (res.relatedCoupon) {
this.editForm.relatedCouponId = res.relatedCoupon.id this.editForm.relatedCouponId = res.relatedCoupon.id
this.editForm.relatedCouponName = res.relatedCoupon.couponName 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 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)) { 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 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!