twt 9 月之前
父節點
當前提交
413de3dec0
共有 1 個文件被更改,包括 17 次插入3 次删除
  1. 17 3
      pages/addjk/eadit.vue

+ 17 - 3
pages/addjk/eadit.vue

@@ -47,6 +47,7 @@
 			  </view>
 			  <view class="lineRight" style="display: flex;">
 				  {{couponPackageData?couponPackageData.name:'请选择'}}
+			   <image src="../../static/img/chahao.png" mode="" v-if="couponPackageData" class="delcoupon" @click.stop="delcoupon"></image>
 			   <image src="../../static/img/jt2.png" mode="widthFix" style="width: 16rpx;margin-top: 4rpx;margin-left: 10rpx;"></image>
 			  </view>
 		  </view>
@@ -317,6 +318,10 @@
 			
 		},
 		methods: {
+			delcoupon(){
+				this.couponPackageData=''
+				this.packageDetailList=[]
+			},
 		  ckcoupon(item){
 			  this.couponPackageData=item
 			   this.couponShow=false
@@ -462,9 +467,14 @@
 					this.groupOutState=jkdata.groupOutState;
 					this.groupRestrictions=jkdata.groupRestrictions;
 					this.packageDetailList=res.data.couponList
-					this.couponPackageData={
-						name:jkdata.couponPackageName,
-						id:jkdata.couponPackageId||''
+					
+					if(jkdata.couponPackageId){
+						this.couponPackageData={
+							name:jkdata.couponPackageName,
+							id:jkdata.couponPackageId||''
+						}
+					}else{
+						this.couponPackageData=''
 					}
 					//console.log(this.imgListArr)
 					uni.setStorage({
@@ -819,6 +829,10 @@
 	padding-left: 30rpx;
 	
 }
+.delcoupon{
+	width: 40rpx;height: 40rpx;
+	padding-left: 10rpx;padding-right: 10rpx;
+}
 .couponLineBOx{
 	height: calc(70vh - 200rpx);
 	overflow-y: auto;