<template>
<view class="coupon">
<u-navbar :is-back="true" :title="$t('pages.coupon.title')" :background="backgroundStyle" title-color="#222222"
back-icon-color="#2F394E">
<view class="slot-wrap" slot="right">
<!--<u-icon name="moments" size="28" @click="addCoupon"> </u-icon>-->
<image src="../../static/me/close-icon.png" style="width: 10pt;height: 10pt;" mode=""
@click="addCoupon"></image>
</view>
</u-navbar>
<view class="children">
<view :class="item.status === '0'? 'body red':(item.status === '1'? 'body grey':'body bode')"
v-for="(item, index) in list" :checked="item.checked">
<view class="item">
<view class="header">
{
{$t("pages.coupon.header")}}
</view>
<u-checkbox-group class="xuanze" @change="checkboxGroupChange">
<view>
<u-checkbox @change="checkboxChange" v-model="item.checked" :name="item.id" :key="index"
style="background-color: #FFFFFF;width: 60%;transform: scale(0.7);"></u-checkbox>
</view>
</u-checkbox-group>
<view class="price">
{
{item.cuttingAmount}}
<text style="font-weight: 100;font-size: 13px;">{
{$t("pages.about.about.to")}}</text>
</view>
<view class="valuel">
{
{$t("pages.transaction.effectiveEndDate")}}{
{getTime(item.effectiveEndDate)}}
</view>
<u-row style="margin-top: 2px;">
<u-col span="9" style="padding-left: 5px;padding-right: 0;">
<view style="cursor:pointer;color: #222222;margin-top: 19px; margin-left: 6px;" class="xia">
{
{$t("pages.coupon.code")}}{
{item.couponNumber}}
</view>
</u-col>
<u-col v-if="item.status === '0'" span="3" style="padding: 0;margin-top: 20px ;">
<image src="../../static/me/Frame_copy.png"
style="width: 12pt;height: 12pt;float: left;margin-top: 2px;margin-left: 5px;"></image>
<view @click="toCopy(item)" style="cursor:pointer;color: #222222;margin-left: 25px;" class="xia">
{
{$t('common.btn.copy')}}
</view>
</u-col>
</u-row>
</view>
</view>
</view>
<view class="foot_btn">
<view style="width: 50%;float:left;margin: 10px;">
<view style="top: auto;text-align: center;margin-left: 20%;">
<u-icon name="shanchu" custom-prefix="custom-icon" size="46" :disabled="deleteBtn"
style="margin-top: -3px;" @tap="()=>toDelete()"> </u-icon>
<br&g