确认兑换
This commit is contained in:
		@@ -16,9 +16,12 @@
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="order-item__footer">
 | 
			
		||||
        <span :style="{color: $dict.getColor('integralOrderStatus', item.orderStatus)}">
 | 
			
		||||
          {{$dict.getLabel('integralOrderStatus', item.orderStatus) }}</span>
 | 
			
		||||
        <div class="order-item__footer--btn" v-if="item.orderStatus === '0'" @click.stop="cancel(item.id)">取消订单</div>
 | 
			
		||||
        <div style="display:flex;justify-content: space-between;">
 | 
			
		||||
          <span :style="{color: $dict.getColor('integralOrderStatus', item.orderStatus)}">{{$dict.getLabel('integralOrderStatus', item.orderStatus) }}</span>
 | 
			
		||||
          <div class="order-item__footer--btn" v-if="item.orderStatus === '0'" @click.stop="cancel(item.id)">取消订单</div>
 | 
			
		||||
          <div class="order-item__footer--btn" v-if="item.orderStatus == '3'" @click.stop="confirm(item.id)">确认兑换</div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <p v-if="item.orderStatus == '3'" style="margin-top:8px;color:#f46;font-size:14px;">商品兑换后,如不确认兑换,系统将于72小时后自动确认,如有疑问请联系客服。</p>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <AiEmpty v-if="!list.length"/>
 | 
			
		||||
@@ -71,6 +74,16 @@ export default {
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    confirm(id) {
 | 
			
		||||
      this.$loading()
 | 
			
		||||
      this.$instance.post(`/app/appvillagerintegralshoporder/finishOrder?orderId=${id}`).then(res => {
 | 
			
		||||
        if (res.code === 0) {
 | 
			
		||||
          this.$toast('确认成功')
 | 
			
		||||
          this.reset()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getTotal(arr) {
 | 
			
		||||
      let total = 0
 | 
			
		||||
      arr.forEach(item => {
 | 
			
		||||
@@ -159,11 +172,7 @@ export default {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .order-item__footer {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    justify-content: space-between;
 | 
			
		||||
    height: 112px;
 | 
			
		||||
    padding: 024px;
 | 
			
		||||
    padding: 24px;
 | 
			
		||||
    span {
 | 
			
		||||
      color: #3078E1;
 | 
			
		||||
      font-size: 28px;
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,11 @@
 | 
			
		||||
          <div></div>
 | 
			
		||||
          <span class="cancelBtn" @click="cancel">取消订单</span>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="order-bottom__bottom" v-if="info.orderStatus == '3'">
 | 
			
		||||
          <div></div>
 | 
			
		||||
          <span class="cancelBtn" @click="confirm">确认兑换</span>
 | 
			
		||||
        </div>
 | 
			
		||||
        <p  v-if="info.orderStatus == '3'" style="margin-top:8px;color:#f46;font-size:14px;padding-bottom:32px;">商品兑换后,如不确认兑换,系统将于72小时后自动确认,如有疑问请联系客服。</p>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
@@ -89,7 +94,17 @@ export default {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
    },
 | 
			
		||||
    confirm() {
 | 
			
		||||
      this.$loading()
 | 
			
		||||
      this.$instance.post(`/app/appvillagerintegralshoporder/finishOrder?orderId=${this.id}`).then(res => {
 | 
			
		||||
        if (res.code === 0) {
 | 
			
		||||
          this.$toast('确认成功')
 | 
			
		||||
          uni.$emit('update')
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user