汪总电商平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

172 lines
7.6 KiB

<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="alert alert-warning-light"> 温馨提示:商品详情会自动加载店铺所有优惠券,客户端用户中心仅推荐 [可用范围] 为 [全部商品] 详情 </div>
<div id="app" v-cloak>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]" v-model="type">
{foreach name="typeList" item="vo"}
<option value="{$key}" {in name="key" value="reduction"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="">
</div>
</div>
<block v-if="type == 'vip'">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Userlevel')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-userlevel" class="form-control" name="row[userlevel]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Usertype')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-usertype" class="form-control selectpicker" name="row[usertype]" v-model="usertype">
{foreach name="usertypeList" item="vo"}
<option value="{$key}" {in name="key" value="reduction"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
</block>
<block v-if="type != 'vip'">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Grant')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-grant" data-rule="required" class="form-control" name="row[grant]" type="number" value="-1">
<p class="text-gray" style="margin-top: 5px;">温馨提示:设置为-1则不限数量</p>
</div>
</div>
</block>
<block v-if="type == 'reduction' || (type == 'vip' && usertype == 'reduction')">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
</div>
</div>
</block>
<block v-if="type == 'discount' || (type == 'vip' && usertype == 'discount')">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Discount')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-discount" class="form-control" step="0.1" name="row[discount]" type="number" value="0.0">
<p class="text-gray" style="margin-top: 5px;">温馨提示:9.8代表9.8折,0代表不折扣</p>
</div>
</div>
</block>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Limit')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-limit" data-rule="required" class="form-control" step="0.01" name="row[limit]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Rangetype')}:</label>
<div class="col-xs-12 col-sm-8">
<select @change="rangeChange" id="c-rangetype" data-rule="required" class="form-control selectpicker" name="row[rangetype]" v-model="rangetype">
{foreach name="rangetypeList" item="vo"}
<option value="{$key}" {in name="key" value="all"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<block v-if="rangetype == 'goods' || rangetype == 'category'">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{{rangename[rangetype]}}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group" v-if="rangetype == 'goods'" @click="goodsLink">
<input id="c-range" data-rule="required" class="form-control" type="text" v-model="range" placeholder="请选择商品" disabled="disabled">
<input name="row[range]" type="hidden" v-model="range">
<div class="input-group-addon no-border" style="padding: 0; padding-left: 6px;">
<span>
<div type="button" class="btn btn-primary"><i class="fa fa-list"></i> 选择商品</div>
</span>
</div>
</div>
<div class="input-group" v-else @click="categoryLink">
<input id="c-range" data-rule="required" class="form-control" type="text" v-model="range" placeholder="请选择商家类目" disabled="disabled">
<input name="row[range]" type="hidden" v-model="range">
<div class="input-group-addon no-border" style="padding: 0; padding-left: 6px;">
<span>
<div type="button" class="btn btn-primary"><i class="fa fa-list"></i> 选择商家类目</div>
</span>
</div>
</div>
</div>
</div>
</block>
<block v-if="type != 'vip'">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pretype')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-pretype" data-rule="required" class="form-control selectpicker" name="row[pretype]" v-model="pretype">
{foreach name="pretypeList" item="vo"}
<option value="{$key}" {in name="key" value="appoint"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
</block>
<block v-if="type == 'vip' || pretype == 'appoint'">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Validity')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-validity" class="form-control" name="row[validity]" type="number" value="0">
<p class="text-gray" style="margin-top: 5px;">温馨提示:设置为0标识不会过期</p>
</div>
</div>
</block>
<block v-show="type != 'vip' && pretype == 'fixed'">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Startdate')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-startdate" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[startdate]" type="text" value="{:date('Y-m-d')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Enddate')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-enddate" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[enddate]" type="text" value="{:date('Y-m-d')}">
</div>
</div>
</block>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Drawlimit')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-drawlimit" data-rule="required" class="form-control" name="row[drawlimit]" type="number" value="0">
<p class="text-gray" style="margin-top: 5px;">温馨提示:设置为0则不限领取数量</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</div>
</form>