card-mini/pages/mine/product/coupon/editcoupon.wxml

227 lines
12 KiB
Plaintext

<cu-custom isBack="{{true}}">
<view slot="content">新增优惠券</view>
</cu-custom>
<view class="padding-bottom-xxl" style="width:95%;margin-left:20rpx;margin-right:20rpx;">
<form>
<!-- 店铺名称 -->
<view class="cu-form-group margin-top-xs text-left item-padding">
<view class="title">
<text class="text-gray2">卷名称</text><text class="iconfont icon-star-red margin-left-xs"></text>
</view>
<input placeholder="请输入优惠券名称" bindinput="inputWatch" data-model="couponName" value="{{couponName}}"></input>
</view>
<!-- 优惠金额 -->
<view class="cu-form-group text-left item-padding">
<view class="title">
<text class="text-gray2">优惠金额</text><text class="iconfont icon-star-red margin-left-xs"></text>
</view>
<input placeholder="请输入优惠金额" bindinput="inputWatch" data-model="price" value="{{price}}"
type="digit"></input>
</view>
<!-- 使用条件 -->
<view class="cu-form-group text-left item-padding">
<view class="title">
<text class="text-gray2">使用门槛</text><text class="iconfont icon-star-red margin-left-xs"></text>
</view>
<view class="cu-capsule radius" wx:for="{{typeList}}" wx:key="index" bindtap="doSelType"
data-item="{{item}}">
<view class="cu-tag {{item.isSel ? 'bg-red':'bg-grey'}}">
<text class="{{item.isSel ? 'cuIcon-squarecheck':'cuIcon-square'}}"></text>
</view>
<view class="cu-tag bg-white" style="color: black;" data-item=" {{item}}" data-index="{{index}}">
{{item.name}}
</view>
<view wx:if="{{item.isInput}}" style="display: flex;width:140rpx;align-items: center;">
<input placeholder="0" bindinput="inputWatch" data-model="{{item.key}}"
value="{{item.value}}"></input>
<text>元</text>
</view>
</view>
</view>
<!-- 可用商品 -->
<view class="cu-form-group text-left item-padding">
<view class="title">
<text class="text-gray2">可用商品</text><text class="iconfont icon-star-red margin-left-xs"></text>
</view>
<view class="cu-capsule radius align-center" wx:for="{{scopeList}}" wx:key="index" bindtap="doSelScope"
data-item="{{item}}">
<view class="cu-tag {{item.isSel ? 'bg-red':'bg-grey'}}">
<text class="{{item.isSel ? 'cuIcon-squarecheck':'cuIcon-square'}}"></text>
</view>
<view class="cu-tag bg-white" style="color: black;" data-item="{{item}}" data-index="{{index}}">
{{item.name}}
</view>
<view wx:if="{{item.isShowBtn}}" style="padding: 5rpx 5rpx;color:#FF5722" catchtap="addGoods">
添加商品
</view>
</view>
</view>
<scroll-view wx:if="{{isShowGoods}}" style="height: 400rpx;width: 100%;" scroll-y>
<view class="cu-list menu-avatar"
style="text-align: right;font-size: 32rpx;padding:0rpx;margin:0rpx;background-color: #ffffff;color: #FF5722;">
当前选中:{{goodsList.length}}种商品
</view>
<view class="cu-list menu-avatar" wx:for="{{goodsList}}" wx:key="index">
<view class="cu-item">
<view class="cu-avatar radius xl" style="background-image:url({{baseImageUrl+item.goodsIcon}});">
</view>
<view class="content" style="width:85%;">
<view class="text-depblack" style="width:80%;">
<text class="text-cut">{{item.goodsName}}</text>
</view>
<view style="padding: 10rpx;">
</view>
<view class="bottom-action margin-top-ls" style="width: 85%;">
<view class="text-lg text-red">¥:{{item.goodsUnitPrice}}</view>
<view class="text-grey text-sm">
库存:{{item.goodsTotal > 1000 ? '999+' : item.goodsTotal}}</view>
</view>
</view>
</view>
<view catchtap="delGoods" data-item="{{item}}" data-index="{{index}}"
style="width: 100%;display: flex;justify-content: flex-end;">
<view class="btn bg-red radius" style="width: 100rpx;text-align: center;">
删除</view>
</view>
</view>
</scroll-view>
<!-- 总发放量 -->
<view class="cu-form-group margin-top-xs text-left item-padding">
<view class="title">
<text class="text-gray2">总发放量</text><text class="iconfont icon-star-red margin-left-xs"></text>
</view>
<view style="display: flex;align-items: center;">
<input placeholder="请输入发放量" bindinput="inputWatch" data-model="couponCount"
value="{{couponCount}}"></input>
<text>张</text>
</view>
</view>
<!-- 有效期 -->
<view class="cu-bar bg-white margin-top-xs item-padding">
<view class="action" style="margin-left:0rpx;">
<text class="text-gray2" style="font-size: 32rpx;">有效期</text><text
class="iconfont icon-star-red margin-left-xs"></text>
</view>
<view class="action">
</view>
</view>
<view class="cu-form-group item-padding" style="flex-direction: column;">
<view class="cu-capsule radius item-padding" wx:for="{{dueTimeList}}" wx:key="index" bindtap="doSelDueTime"
style="width:95%;margin-top: 10rpx;align-items: center;" data-item="{{item}}">
<view class="cu-tag {{item.isSel ? 'bg-red':'bg-grey'}}">
<text class="{{item.isSel ? 'cuIcon-squarecheck':'cuIcon-square'}}"></text>
</view>
<view class="cu-tag bg-white" style="color: black;" data-item="{{item}}" data-index="{{index}}">
{{item.name}}
</view>
<view wx:if="{{item.type == 'picker'}}" class="row-item">
<picker mode="date" value="{{startDate}}" bindchange="dateChange" data-model="startDate"
style="margin-right:20rpx;">
<view class="picker" style="text-align: center;font-size: 28rpx;">
{{startDate}}
</view>
</picker>
<text style="color:#000;">至</text>
<picker mode="date" value="{{endDate}}" bindchange="dateChange" data-model="endDate">
<view class="picker" style="text-align: center;font-size: 28rpx;">
{{endDate}}
</view>
</picker>
</view>
<view wx:else class="row-item-width">
<input placeholder="0" bindinput="inputWatch" data-model="{{item.key}}"
value="{{item.endDate}}"></input>
<text>天内有效</text>
</view>
</view>
</view>
<view class="hint-title margin-top-sm">
<image src="/images/title-bg.png" mode="scaleToFill"></image>
<text>领取和使用规则</text>
</view>
<!-- 身份限制 -->
<view class="cu-bar bg-white margin-top-xs item-padding">
<view class="action" style="margin-left:0rpx;">
<text class="text-gray2">身份限制</text><text class="iconfont icon-star-red margin-left-xs"></text>
</view>
<view class="action">
</view>
</view>
<view class="cu-form-group item-padding" style="flex-direction: column;">
<view class="cu-capsule radius item-padding" wx:for="{{rankList}}" wx:key="index" bindtap="doSelRank"
style="width:95%;margin-top: 10rpx;align-items: center;" data-item="{{item}}">
<view class="cu-tag {{item.isSel ? 'bg-red':'bg-grey'}}">
<text class="{{item.isSel ? 'cuIcon-squarecheck':'cuIcon-square'}}"></text>
</view>
<view class="cu-tag bg-white" style="color: black;" data-item="{{item}}" data-index="{{index}}">
{{item.name}}
</view>
<view style="font-size: 20rpx;color: #ff0000;">{{item.hint}}</view>
</view>
</view>
<!-- 使用条件 -->
<view class="cu-form-group text-left item-padding">
<view class="title">
<text class="text-gray2">每人限领</text><text class="iconfont icon-star-red margin-left-xs"></text>
</view>
<view class="cu-capsule radius item-padding" wx:for="{{astrictList}}" wx:key="index" bindtap="doSelCon"
data-item="{{item}}">
<view class="cu-tag {{item.isSel ? 'bg-red':'bg-grey'}}">
<text class="{{item.isSel ? 'cuIcon-squarecheck':'cuIcon-square'}}"></text>
</view>
<view class="cu-tag bg-white" style="color: black;" data-item=" {{item}}" data-index="{{index}}">
{{item.name}}
</view>
<view wx:if="{{item.isInput}}" style="display: flex;width:140rpx;align-items: center;">
<input placeholder="0" bindinput="inputWatch" data-model="{{item.key}}"
value="{{item.value}}"></input>
<text>次</text>
</view>
</view>
</view>
<!-- 领取展示 -->
<view class="cu-form-group text-left item-padding">
<view class="title">
<text class="text-gray2">领取展示</text>
</view>
<view class="cu-capsule radius" bindtap="doSelShow" style="align-items: center;width: 72%;">
<view class="cu-tag {{showTemplete.isSel ? 'bg-red':'bg-grey'}}">
<text class="{{showTemplete.isSel ? 'cuIcon-squarecheck':'cuIcon-square'}}"></text>
</view>
<view class="cu-tag bg-white" style="color: black;">
{{showTemplete.name}}
</view>
<view style="color: #ff0000;">查看示例</view>
</view>
</view>
<!-- 分享设置 -->
<view class="cu-form-group text-left item-padding">
<view class="title">
<text class="text-gray2">分享设置</text>
</view>
<view class="cu-capsule radius" bindtap="doShare" style="width: 72%;">
<view class="cu-tag {{shareBean.isSel ? 'bg-red':'bg-grey'}}">
<text class="{{shareBean.isSel ? 'cuIcon-squarecheck':'cuIcon-square'}}"></text>
</view>
<view class="cu-tag bg-white" style="color: black;">
{{shareBean.name}}
</view>
</view>
</view>
<!-- 使用说明 -->
<view class="cu-bar bg-white margin-top-xs item-padding">
<view class="action" style="margin-left:0rpx;">
<text class="text-gray2">使用说明</text>
</view>
</view>
<view class="bg-white">
<view class="cu-form-group">
<textarea class="border-line padding-left-xs padding-right-xs margin-left-xs margin-right-xs"
maxlength="-1" bindinput="textareaBInput" placeholder="请输入现金券的使用说明" value="{{summary}}"></textarea>
</view>
</view>
</form>
</view>
<view class="padding-xs foot bg-white">
<button class="cu-btn bg-blue" style="width:100%" bindtap="doSave">保存修改</button>
</view>