<!DOCTYPE html>
<html>
<head>
    <title>门店优惠券活动</title>
    #parse("sys/header.html")
</head>
<script src="//unpkg.com/iview/dist/locale/en-US.js"></script>
<style>
    .col-sm-3 {
        width: 25%;
        float: left;
    }
    .goods-item {
        position: relative;
        width: 200px;
        height: 76px;
        border-radius: 4px;
        border: 1px solid #e0e0e0;
        padding: 10px;
        margin-bottom: 10px;
        cursor: pointer;
        margin-right: 10px;
    }
    .clearfix {
        zoom: 1;
    }
    .goods-img {
        position: relative;
        width: 30%;
        height: 100%;
        border-radius: 4px;
        overflow: hidden;
        margin-right: 10px;
    }
    .fl {
        float: left;
    }
    .goods-info {
        width: 55%;
    }
    .goods-mask {
        position: absolute;
        background-color: #000;
        opacity: .5;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        border-radius: 4px;
        display: none;
    }
    .goods-img>.goods-img-wrapper {
        width: 100%;
        height: 100%;
    }
    .goods-img>.bg-model {
        position: absolute;
        display: none;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    .goods-img>.bg-model>.bg-model-model {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #000;
        opacity: .5;
    }
    .goods-info>div.goods-intro {
        display: inline-block;
        width: 90px;
        max-height: 40px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-height: 18px;
    }
    .goods-info>.goods-price {
        position: absolute;
        bottom: 12px;
    }
    .goods-item.select {
        border: 1px solid #2589ff;
    }
    .goods-img>.bg-model>img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 10;
    }
    .tick-color-g{
        border:3px #206602 solid;
        border-radius: 5px;
    }
    .tick-color-r{
        border:3px #990033 solid;
        border-radius: 5px;
    }
</style>
<body>
<div id="rrapp" v-cloak>
	<Card v-show="!showViewList">
        <p slot="title">优惠券</p>
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("mkstoreticketdiscount:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                <!--#if($shiro.hasPermission("mkstoreticketdiscount:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end-->
                #if($shiro.hasPermission("mkstoreticketdiscount:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
                <a href="${rc.contextPath}/mk/mkcenter.html">
                    <i-button type="warning" ><i class="fa"></i>&nbsp;返回营销中心页</i-button>
                </a>
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </Card>

    <Card v-show="!showList">
        <!--<p slot="title">{{title}}</p>-->
		<i-form ref="formValidate" :model="mkStoreTicketDiscount" :rules="ruleValidate" :label-width="140">
            <Tabs value="name1" @on-click="tabsClick">
                <!--@on-click="tabsClick"-->
                <Tab-Pane label="基本属性" name="name1">
                    <!--<Form-item label="活动id" prop="storeTopicId">-->
                        <!--<i-input v-model="mkStoreTicketDiscount.storeTopicId" placeholder="活动id"/>-->
                    <!--</Form-item>-->
                    <Form-item label="优惠券标题" prop="name">
                        <i-input v-model="mkStoreTicketDiscount.name" placeholder="优惠券标题" style="width: 400px" v-show="!isOperatorShow"></i-input>
                        <i-input v-model="mkStoreTicketDiscount.name" placeholder="优惠券标题" style="width: 400px" v-show="isOperatorShow" disabled></i-input>
                    </Form-item>
                    <Form-item label="优惠券副标题" prop="tickDiscSubTitle">
                        <i-input v-model="mkStoreTicketDiscount.tickDiscSubTitle" placeholder="优惠券副标题" style="width: 400px" v-show="!isOperatorShow"></i-input>
                        <i-input v-model="mkStoreTicketDiscount.tickDiscSubTitle" placeholder="优惠券副标题" style="width: 400px" v-show="isOperatorShow" disabled></i-input>
                    </Form-item>
                    <Form-item label="生效时间" prop="effectTimeType" >
                        <Radio-group v-model="mkStoreTicketDiscount.effectTimeType" @on-change="changeEffectTimeType" v-show="!isOperatorShow">
                            <Radio label="00">
                                <span>固定时间</span>
                            </Radio>
                            <Radio label="01">
                                <span>领取后生效</span>
                            </Radio>
                        </Radio-group>
                        <Radio-group v-model="mkStoreTicketDiscount.effectTimeType" @on-change="changeEffectTimeType" v-show="isOperatorShow">
                            <Radio label="00" disabled>
                                <span>固定时间</span>
                            </Radio>
                            <Radio label="01" disabled>
                                <span>领取后生效</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="固定开始时间" prop="fixBegTime" v-show="isEffectTimeType00">
                        <!--<i-input v-model="mkStoreTicketDiscount.fixBegTime" placeholder="固定开始时间，yyyy-MM-dd" style="width: 400px;"/>-->
                        <Date-picker format="yyyy-MM-dd" v-model="mkStoreTicketDiscount.fixBegTime" placeholder="固定开始时间"
                                     style="width: 400px;" v-show="!isOperatorShow"></Date-picker>
                        <Date-picker format="yyyy-MM-dd" v-model="mkStoreTicketDiscount.fixBegTime" placeholder="固定开始时间"
                                     style="width: 400px;" v-show="isOperatorShow" disabled></Date-picker>
                    </Form-item>
                    <Form-item label="固定结束时间" prop="fixEndTime" v-show="isEffectTimeType00">
                        <!--<i-input v-model="mkStoreTicketDiscount.fixEndTime" placeholder="固定结束时间，yyyy-MM-dd" style="width: 400px;"/>-->
                        <Date-picker format="yyyy-MM-dd" v-model="mkStoreTicketDiscount.fixEndTime" placeholder="固定结束时间"
                                     style="width: 400px;"/>
                    </Form-item>
                    <Form-item label="领券以后" prop="postponeNum" v-show="isEffectTimeType01">
                        <i-input v-model="mkStoreTicketDiscount.postponeNum" placeholder="领券延期生效天数(天)" style="width: 400px;" v-show="!isOperatorShow"><span slot="append">天</span></i-input>
                        <i-input v-model="mkStoreTicketDiscount.postponeNum" placeholder="领券延期生效天数(天)" style="width: 400px;" v-show="isOperatorShow" disabled><span slot="append">天</span></i-input>
                    </Form-item>
                    <Form-item label="有效天数" prop="validDayNum" v-show="isEffectTimeType01">
                        <i-input v-model="mkStoreTicketDiscount.validDayNum" placeholder="领券使用有效天数(天)" style="width: 400px;" v-show="!isOperatorShow"><span slot="append">天</span></i-input>
                        <i-input v-model="mkStoreTicketDiscount.validDayNum" placeholder="领券使用有效天数(天)" style="width: 400px;" v-show="isOperatorShow" disabled><span slot="append">天</span></i-input>
                    </Form-item>
                    <Form-item label="优惠类型" prop="tickDiscType">
                        <Radio-group v-model="mkStoreTicketDiscount.tickDiscType" @on-change="chanTick" v-show="!isOperatorShow">
                            <Radio label="00">
                                <span>代金券</span>
                            </Radio>
                            <Radio label="01">
                                <span>折扣券</span>
                            </Radio>
                            <!--<Radio label="02">-->
                                <!--<span>兑换券</span>-->
                            <!--</Radio>-->
                        </Radio-group>
                        <Radio-group v-model="mkStoreTicketDiscount.tickDiscType" @on-change="chanTick" v-show="isOperatorShow">
                            <Radio label="00" disabled>
                                <span>代金券</span>
                            </Radio>
                            <Radio label="01" disabled>
                                <span>折扣券</span>
                            </Radio>
                            <!--<Radio label="02" disabled>-->
                                <!--<span>兑换券</span>-->
                            <!--</Radio>-->
                        </Radio-group>
                    </Form-item>
                    <Form-item label="代金券减免金额" prop="voucherMoney" v-show="isVoucher">
                        <i-input v-model="mkStoreTicketDiscount.voucherMoney" placeholder="代金券减免金额(元)" style="width: 400px;" v-show="!isOperatorShow"><span slot="append">元</span></i-input>
                        <i-input v-model="mkStoreTicketDiscount.voucherMoney" placeholder="代金券减免金额(元)" style="width: 400px;" v-show="isOperatorShow" disabled><span slot="append">元</span></i-input>
                    </Form-item>
                    <Form-item label="代金券使用条件" prop="voucherCond" v-show="isVoucher">
                        <i-input v-model="mkStoreTicketDiscount.voucherCond" placeholder="代金券使用条件(元)，消费金额满多少使用" style="width: 400px;" v-show="!isOperatorShow"><span slot="append">元</span></i-input>
                        <i-input v-model="mkStoreTicketDiscount.voucherCond" placeholder="代金券使用条件(元)，消费金额满多少使用" style="width: 400px;" v-show="isOperatorShow" disabled><span slot="append">元</span></i-input>
                    </Form-item>
                    <Form-item label="折扣券折扣" prop="discRatio" v-show="isDisc">
                        <i-input v-model="mkStoreTicketDiscount.discRatio" placeholder="折扣券折扣(折)，1-9.9之间的数字，精确到小数点后1位" style="width: 400px;" v-show="!isOperatorShow"><span slot="append">折</span></i-input>
                        <i-input v-model="mkStoreTicketDiscount.discRatio" placeholder="折扣券折扣(折)，1-9.9之间的数字，精确到小数点后1位" style="width: 400px;" v-show="isOperatorShow" disabled><span slot="append">折</span></i-input>
                    </Form-item>
                    <Form-item label="折扣券使用条件" prop="discCond" v-show="isDisc">
                        <i-input v-model="mkStoreTicketDiscount.discCond" placeholder="折扣券使用条件(元)，消费金额满多少使用" style="width: 400px;" v-show="!isOperatorShow"><span slot="append">元</span></i-input>
                        <i-input v-model="mkStoreTicketDiscount.discCond" placeholder="折扣券使用条件(元)，消费金额满多少使用" style="width: 400px;" v-show="isOperatorShow" disabled><span slot="append">元</span></i-input>
                    </Form-item>
                    <Form-item label="兑换券使用条件" prop="exchCond" v-show="isExch">
                        <i-input v-model="mkStoreTicketDiscount.exchCond" placeholder="兑换券使用条件(元)，消费金额满多少使用" style="width: 400px;" v-show="!isOperatorShow"><span slot="append">元</span></i-input>
                        <i-input v-model="mkStoreTicketDiscount.exchCond" placeholder="兑换券使用条件(元)，消费金额满多少使用" style="width: 400px;" v-show="isOperatorShow" disabled><span slot="append">元</span></i-input>
                    </Form-item>
                    <Form-item label="库存" prop="ticketNum">
                        <i-input v-model="mkStoreTicketDiscount.ticketNum" placeholder="库存" style="width: 400px" v-show="!isOperatorShow"></i-input>
                        <i-input v-model="mkStoreTicketDiscount.ticketNum" placeholder="库存" style="width: 400px" v-show="isOperatorShow" disabled></i-input>
                    </Form-item>
                </Tab-Pane>
                <Tab-Pane label="发放使用" name="name2">
                    <Form-item label="所属三方商户" prop="thirdMerchSn">
                        <i-select v-model="mkStoreTicketDiscount.thirdMerchSn" placeholder="所属三方商户" style="width: 268px;" @on-change="changeStore" v-show="!isOperatorShow" label-in-value>
                            <i-option v-for="thirdMerchant in thirdMerchantBizList" :value="thirdMerchant.thirdMerchSn" :key="thirdMerchant.thirdMerchSn">{{thirdMerchant.thirdPartyMerchName}}</i-option>
                        </i-select>
                        <i-select v-model="mkStoreTicketDiscount.thirdMerchSn" placeholder="所属三方商户" style="width: 268px;" @on-change="changeStore" v-show="isOperatorShow" disabled label-in-value>
                            <i-option v-for="thirdMerchant in thirdMerchantBizList" :value="thirdMerchant.thirdMerchSn" :key="thirdMerchant.thirdMerchSn">{{thirdMerchant.thirdPartyMerchName}}</i-option>
                        </i-select>
                    </Form-item>
                    <Form-item label="所属门店" prop="storeId">
                        <i-select v-model="mkStoreTicketDiscount.storeId" placeholder="所属门店" style="width: 268px;" label-in-value @on-change="changeGoods" v-show="!isOperatorShow">
                            <i-option v-for="store in storeList" :value="store.id" :key="store.id">{{store.storeName}}
                            </i-option>
                        </i-select>
                        <i-select v-model="mkStoreTicketDiscount.storeId" placeholder="所属门店" style="width: 268px;" label-in-value @on-change="changeGoods" v-show="isOperatorShow" disabled>
                            <i-option v-for="store in storeList" :value="store.id" :key="store.id">{{store.storeName}}
                            </i-option>
                        </i-select>
                    </Form-item>
                    <Form-item label="货品业务类型" prop="goodsBizType" >
                        <i-select v-model="mkStoreTicketDiscount.goodsBizType"  placeholder="货品业务类型"
                                  label-in-value style="width: 268px;" @on-change="changeGoodsBizType" v-show="!isOperatorShow">
                            <i-option v-for="macro in macros" :value="macro.value" :key="macro.id">{{macro.name}}
                            </i-option>
                        </i-select>
                        <i-select v-model="mkStoreTicketDiscount.goodsBizType"  placeholder="货品业务类型"
                                  label-in-value style="width: 268px;" @on-change="changeGoodsBizType" v-show="isOperatorShow" disabled>
                            <i-option v-for="macro in macros" :value="macro.value" :key="macro.id">{{macro.name}}
                            </i-option>
                        </i-select>
                        <div style="float: right;margin-right: 730px;">
                            <span style="margin-left: 25px;color: red;font-size: 12px;">* 货品业务类型必填，不同业务类型会生成不同订单，订单不能同时使用一个优惠券，会影响清关</span>
                        </div>
                    </Form-item>
                    <Form-item label="适用商品" prop="applyType">
                        <Radio-group v-model="mkStoreTicketDiscount.applyType" id="applyType" @on-change="changeApplyType">
                            <Radio label="00">
                                <span>全部商品参与</span>
                            </Radio>
                            <Radio label="01">
                                <span>指定商品参与</span>
                            </Radio>
                            <Radio label="02">
                                <span>指定商品不参与</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="" v-show="isApplyType">
                        <div style="width: 980px;border: 1px solid rgb(243, 243, 243);height: 170px;background: rgb(243, 243, 243);border-radius: 10px;" v-show="checkGoodsTotalCount>0">
                            <div style="margin-top: 12px;margin-left: 10px;height: 120px;">
                                <div v-for="item in checkGoodsDataList" :item="item" style=" width: 300px; float: left;border: 1px silver solid; margin: 8px;border-radius: 6px;">
                                <span style="margin-top: 7px;width: 150px;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;
                                    -webkit-line-clamp: 2;line-height: 20px;max-height: 20px;float: left;margin-left: 4px;">{{item.goodsName}}</span><span>￥{{item.retailPrice}}</span>
                                    <span style="float: right;margin-right: 10px;"><a @click="delCheckGoods(item.discGoodTempId,item.goodsId)">删除</a></span>
                                </div>
                            </div>

                            <div style="text-align: right;">
                                <Page :total="checkGoodsTotalCount" :current="checkGoodsCurrentPage" :page-size="checkGoodsLimit" @on-change="loadCheckGoodsDataByPage" @on-page-size-change='handleCheckGoodsPageSize'>
                                </Page>
                            </div>
                        </div>
                        <div style="width: 100%">
                            <i-button @click="checkGoods" type="primary">选择商品</i-button>
                        </div>
                        <Modal title="选择商品" v-model="value3" @on-ok="ok" @on-cancel="cancel" :mask-closable="false" width="900px" :styles="{top: '20px'}">
                            <div class="search-group">
                                <i-col span="4">
                                    <i-input v-model="g.goodsName" @on-enter="query" placeholder="名称"/>
                                </i-col>
                                <i-button @click="reloadGoodsByStore">查询</i-button>
                                <i-button @click="reloadGoodsSearch">重置</i-button>
                            </div>
                            <div style="margin-top: 10px; height: 400px">
                                <div v-for="item in goodsList" :item="item" style="padding-left:5px;padding-right:5px;width: 100%" v-show="goodsList.length>0">
                                    <div v-show="item.isCheck==0" class="col-sm-3 goods-item clearfix" name="noCheck" @click="selectThisGoods(item)" :id="item.goodsId">
                                        <div class="goods-img fl">
                                            <img :src="item.listPicUrl" style="background-repeat: no-repeat;
                                                background-position: center center; background-size: cover;" class="goods-img-wrapper">
                                            <div class="bg-model" :id="item.id" style="display: none;">
                                                <div class="bg-model-model"></div>
                                                <img src="${rc.contextPath}/statics/img/selected.png" alt="" style="width: 30px;height: 30px;
                                                margin-left: 10px;margin-top: 10px;">
                                            </div>
                                        </div>
                                        <div class="goods-info fl">
                                            <div class="goods-intro ng-binding" :title="item.goodsName">
                                                <span package-logic="app-goods-management-addGoods#div-selectGoodsType">
                                                    <!--<div ng-show="item.goodsActivityList.length>3" class="actSign ng-hide" popover="该商品参加了以下活动："
                                                         popover-placement="right-bottom" popover-trigger="mouseenter"
                                                         popover-append-to-body="true" style="border-radius:4px;">
                                                    </div>-->
                                                </span> {{item.goodsName}}
                                            </div>
                                            <p class="goods-price ng-binding">¥ {{item.retailPrice==null?0:item.retailPrice}}</p>
                                        </div>
                                        <div class="goods-mask">
                                            <p style="text-align:center;color: #FFFFFF;">不支持参加此活动</p>
                                        </div>
                                    </div>

                                    <div v-show="item.isCheck==1" class="col-sm-3 goods-item clearfix select" name="noCheck" @click="selectThisGoods(item)" :id="item.goodsId">
                                        <div class="goods-img fl">
                                            <img :src="item.listPicUrl" style="background-repeat: no-repeat;
                                                background-position: center center; background-size: cover;" class="goods-img-wrapper">
                                            <div class="bg-model" :id="item.id" style="display: block;">
                                                <div class="bg-model-model"></div>
                                                <img src="${rc.contextPath}/statics/img/selected.png" alt="" style="width: 30px;height: 30px;
                                                margin-left: 10px;margin-top: 10px;">
                                            </div>
                                        </div>
                                        <div class="goods-info fl">
                                            <div class="goods-intro ng-binding" :title="item.goodsName">
                                                <span package-logic="app-goods-management-addGoods#div-selectGoodsType">
                                                    <!--<div ng-show="item.goodsActivityList.length>3" class="actSign ng-hide" popover="该商品参加了以下活动："
                                                         popover-placement="right-bottom" popover-trigger="mouseenter"
                                                         popover-append-to-body="true" style="border-radius:4px;">
                                                    </div>-->
                                                </span> {{item.goodsName}}
                                            </div>
                                            <p class="goods-price ng-binding">¥ {{item.retailPrice==null?0:item.retailPrice}}</p>
                                        </div>
                                        <div class="goods-mask">
                                            <p style="text-align:center;color: #FFFFFF;">不支持参加此活动</p>
                                        </div>
                                    </div>
                                </div>
                                <!--<table id="jqGoodsGrid"></table>-->
                                <!--<div id="jqGoodsGridPager"></div>-->
                            </div>
                            <div style="text-align: right;">
                                <Page :total="totalCount" :current="currentPage" :page-size="limit"  class="page" show-total
                                      placement="top" @on-change="loadGoodsDataByPage" @on-page-size-change='handlePageSize'>
                                </Page>
                            </div>
                        </Modal>
                    </Form-item>
                    <Form-item label="领取入口" prop="getEnter">
                        <Checkbox-group v-model="mkStoreTicketDiscount.getEnter">
                            <Checkbox label="1"><span>商品详情页/购物车等商城页面</span></Checkbox>
                        </Checkbox-group>
                        <!--<i-input v-model="mkStoreTicketDiscount.getEnter" placeholder="领取入口，格式：1,2,...,n，【get_enter，1:商品详情页/购物车等商城页面】"/>-->
                    </Form-item>
                    <Form-item label="能否分享领取" prop="canShareGet">
                        <Checkbox-group v-model="mkStoreTicketDiscount.canShareGet">
                            <Checkbox label="0"><span>用户可以分享链接领取（小程序暂不支持分享）</span></Checkbox>
                        </Checkbox-group>
                        <!--<i-input v-model="mkStoreTicketDiscount.canShareGet" placeholder="能否分享领取，【can_share_get，0:能，1:否】"/>-->
                    </Form-item>
                    <Form-item label="每人限领数(张)" prop="limitNum">
                        <i-input v-model="mkStoreTicketDiscount.limitNum" placeholder="每人限领数(张)，每个用户领券上限，如不填则默认为1" style="width: 400px"/>
                    </Form-item>
                </Tab-Pane>
                <Tab-Pane label="券面信息" name="name3" >
                    <Row>
                        <i-col span="16">
                            <Form-item label="活动图片url(小图)" prop="advImgUrl">
                                <i-input v-model="mkStoreTicketDiscount.advImgUrl" placeholder="活动图片url(小图)" readonly/>
                            </Form-item>
                        </i-col>
                        <i-col span="3">
                            <Form-item :label-width="1">
                                <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
                                        max-size="100"
                                        :on-success="handleSuccessAdvImgUrl" :on-format-error="handleFormatError"
                                        :show-upload-list="false"
                                        :on-exceeded-size="handleMaxSize">
                                    <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                                </Upload>
                            </Form-item>
                        </i-col>
                        <i-col span="4">
                            <Form-item :label-width="1">
                                <i-button icon="eye" @click="eyeImageAdvImgUrl">预览图片</i-button>
                            </Form-item>
                        </i-col>
                    </Row>
                    <Row>
                        <i-col span="16" style="margin-top: -30px;">
                            <span style="margin-left: 100px;color: red;font-size: 12px;">* 尺寸建议410*110像素以内，大小100K以下</span>
                        </i-col>
                    </Row>
                    <Row>
                        <i-col span="16">
                            <Form-item label="门店logo图url" prop="storeLogoUrl">
                                <i-input v-model="mkStoreTicketDiscount.storeLogoUrl" placeholder="门店logo图url" readonly/>
                            </Form-item>
                        </i-col>
                        <i-col span="3">
                            <Form-item :label-width="1">
                                <Upload style="width: 300px;" action="../sys/oss/upload" :format="['jpg','jpeg','png']"
                                        max-size="100"
                                        :on-success="handleSuccessStoreLogoUrl" :on-format-error="handleFormatError"
                                        :show-upload-list="false"
                                        :on-exceeded-size="handleMaxSize">
                                    <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                                </Upload>
                            </Form-item>
                        </i-col>
                        <i-col span="4">
                            <Form-item :label-width="1">
                                <i-button icon="eye" @click="eyeImageStoreLogoUrl">预览图片</i-button>
                            </Form-item>
                        </i-col>
                    </Row>
                    <Row>
                        <i-col span="16" style="margin-top: -30px;">
                            <span style="margin-left: 140px;color: red;font-size: 12px;">* 尺寸建议410*110像素以内，大小100K以下</span>
                        </i-col>
                    </Row>
                    <Form-item label="图片是否展示在广告栏" prop="isStoreShow">
                        <Radio-group v-model="mkStoreTicketDiscount.isStoreShow">
                            <Radio label="0">
                                <span>否</span>
                            </Radio>
                            <Radio label="1">
                                <span>是</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <!--<Form-item label="门店名称，默认填写商户门店名称" prop="storeName">-->
                        <!--<i-input v-model="mkStoreTicketDiscount.storeName" placeholder="门店名称，默认填写商户门店名称"/>-->
                    <!--</Form-item>-->
                    <Form-item label="券面颜色" prop="ticketColor">
                        <!--<i-input v-model="mkStoreTicketDiscount.ticketColor" placeholder="券面颜色，如:#ababab"  @on-change="changeStore" label-in-value/>-->
                        <div>
                            <div style="width: 30px;height: 30px;background-color: #00CC00;float: left;margin-right: 10px;cursor: pointer;" name="noCheck" id="00CC00" @click="getColor('00CC00','g')"></div>
                            <div style="width: 30px;height: 30px;background-color: #009900;float: left;margin-right: 10px;cursor: pointer;" name="noCheck" id="009900" @click="getColor('009900','g')"></div>
                            <div style="width: 30px;height: 30px;background-color: #66CCCC;float: left;margin-right: 10px;cursor: pointer;" name="noCheck" id="66CCCC" @click="getColor('66CCCC','g')"></div>
                            <div style="width: 30px;height: 30px;background-color: #009999;float: left;margin-right: 10px;cursor: pointer;" name="noCheck" id="009999" @click="getColor('009999','g')"></div>
                            <div style="width: 30px;height: 30px;background-color: #FF9966;float: left;margin-right: 10px;cursor: pointer;" name="noCheck" id="FF9966" @click="getColor('FF9966','r')"></div>
                            <div style="width: 30px;height: 30px;background-color: #FF0066;float: left;margin-right: 10px;cursor: pointer;" name="noCheck" id="FF0066" @click="getColor('FF0066','r')"></div>
                            <div style="width: 30px;height: 30px;background-color: #CC00FF;float: left;margin-right: 10px;cursor: pointer;" name="noCheck" id="CC00FF" @click="getColor('CC00FF','r')"></div>
                            <div style="width: 30px;height: 30px;background-color: #CC0000;float: left;margin-right: 10px;cursor: pointer;" name="noCheck" id="CC0000" @click="getColor('CC0000','r')"></div>
                        </div>
                    </Form-item>
                    <Form-item label="操作说明" prop="optDecl">
                        <i-input v-model="mkStoreTicketDiscount.optDecl" placeholder="操作说明" style="width: 400px"/>
                    </Form-item>
                    <Form-item label="优惠说明" prop="discDecl">
                        <i-input type="textarea" :rows="3" v-model="mkStoreTicketDiscount.discDecl" placeholder="满*元，减*元，全部商品可用" style="width: 400px" v-show="!isOperatorShow"></i-input>
                        <i-input type="textarea" :rows="3" v-model="mkStoreTicketDiscount.discDecl" placeholder="满*元，减*元，全部商品可用" style="width: 400px" v-show="isOperatorShow" disabled></i-input>
                    </Form-item>
                    <Form-item label="使用须知" prop="useNoti">
                        <i-input type="textarea" :rows="3" v-model="mkStoreTicketDiscount.useNoti" placeholder="每人限领*张，不可转赠好友，仅限商城下单使用" style="width: 400px" v-show="!isOperatorShow"></i-input>
                        <i-input type="textarea" :rows="3" v-model="mkStoreTicketDiscount.useNoti" placeholder="每人限领*张，不可转赠好友，仅限商城下单使用" style="width: 400px" v-show="isOperatorShow" disabled></i-input>
                    </Form-item>
                    <Form-item label="客服电话" prop="svrTel">
                        <i-input v-model="mkStoreTicketDiscount.svrTel" placeholder="客服电话" style="width: 400px" v-show="!isOperatorShow"><span slot="append">手机或固话</span></i-input>
                        <i-input v-model="mkStoreTicketDiscount.svrTel" placeholder="客服电话" style="width: 400px" v-show="isOperatorShow" disabled><span slot="append">手机或固话</span></i-input>
                    </Form-item>
                    <Form-item label="是否有效" prop="isValid">
                        <Radio-group v-model="mkStoreTicketDiscount.isValid">
                            <Radio label="0">
                                <span>有效</span>
                            </Radio>
                            <Radio label="1">
                                <span>无效</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <!--<Form-item label="备注" prop="note">-->
                        <!--<i-input v-model="mkStoreTicketDiscount.note" placeholder="备注"/>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="创建人编号" prop="createrSn">
                        <i-input v-model="mkStoreTicketDiscount.createrSn" placeholder="创建人编号"/>
                    </Form-item>
                    <Form-item label="创建时间" prop="createTime">
                        <i-input v-model="mkStoreTicketDiscount.createTime" placeholder="创建时间"/>
                    </Form-item>
                    <Form-item label="修改人编号" prop="moderSn">
                        <i-input v-model="mkStoreTicketDiscount.moderSn" placeholder="修改人编号"/>
                    </Form-item>
                    <Form-item label="修改时间" prop="modTime">
                        <i-input v-model="mkStoreTicketDiscount.modTime" placeholder="修改时间"/>
                    </Form-item>
                    <Form-item label="时间戳" prop="tstm">
                        <i-input v-model="mkStoreTicketDiscount.tstm" placeholder="时间戳"/>
                    </Form-item>
                    <Form-item label="发放方式 0：按订单发放 1：按用户发放(通用优惠券，用户点击领取) 2:商品转发送券 3：按商品发放 4:新用户注册 5：线下发放 6评价好评红包（固定或随机红包） 7包邮（不入会员优惠券表）" prop="sendType">
                        <i-input v-model="mkStoreTicketDiscount.sendType" placeholder="发放方式 0：按订单发放 1：按用户发放(通用优惠券，用户点击领取) 2:商品转发送券 3：按商品发放 4:新用户注册 5：线下发放 6评价好评红包（固定或随机红包） 7包邮（不入会员优惠券表）"/>
                    </Form-item>-->
                </Tab-Pane>
            </Tabs>
        </i-form>
        <div style="padding-left: 20px">
            <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
            <i-button type="warning" @click="reloadBack" style="margin-left: 8px"/>返回</i-button>
            <!--<i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>-->
        </div>
	</Card>

    <Card v-show="!showInfoList">
        <p slot="title">{{title}}</p>
        <i-form :model="mkStoreTicketDiscount" :label-width="120">
            <Tabs value="name1">
                <Tab-Pane label="基本属性" name="name1">
                    <Form-item label="所属门店">
                        {{mkStoreTicketDiscount.storeName==null?'未设置': mkStoreTicketDiscount.storeName}}
                    </Form-item>
                    <Form-item label="业务类型">
                        {{mkStoreTicketDiscount.goodsBizType==null?'未设置': ''}}{{mkStoreTicketDiscount.goodsBizType=='00'?'保税备货': ''}}{{mkStoreTicketDiscount.goodsBizType=='02'?'保税展示补货': ''}}{{mkStoreTicketDiscount.goodsBizType=='10'?'保税展示跨境': ''}}{{mkStoreTicketDiscount.goodsBizType=='11'?'普通商品': ''}}
                    </Form-item>
                    <Form-item label="优惠券标题">
                        {{mkStoreTicketDiscount.name==null?'未设置': mkStoreTicketDiscount.name}}
                    </Form-item>
                    <Form-item label="优惠券副标题">
                        {{mkStoreTicketDiscount.tickDiscSubTitle==null?'未设置': mkStoreTicketDiscount.tickDiscSubTitle}}
                    </Form-item>
                    <Form-item label="生效时间">
                        {{mkStoreTicketDiscount.inValidTime==null?'未设置': mkStoreTicketDiscount.inValidTime}}
                    </Form-item>
                    <Form-item label="优惠类型">
                        {{mkStoreTicketDiscount.tickDiscType==null?'未设置': ''}}{{mkStoreTicketDiscount.tickDiscType=='00'?'代金券': ''}}{{mkStoreTicketDiscount.tickDiscType=='01'?'折扣券': ''}}{{mkStoreTicketDiscount.tickDiscType=='02'?'兑换券': ''}}
                    </Form-item>
                    <Form-item label="代金券减免金额" v-show="isVoucher">
                        {{mkStoreTicketDiscount.voucherMoney==null?'未设置': mkStoreTicketDiscount.voucherMoney}}
                    </Form-item>
                    <Form-item label="代金券使用条件" v-show="isVoucher">
                        {{mkStoreTicketDiscount.voucherCond==null?'未设置': mkStoreTicketDiscount.voucherCond}}
                    </Form-item>
                    <Form-item label="折扣券折扣" v-show="isDisc">
                        {{mkStoreTicketDiscount.discRatio==null?'未设置': mkStoreTicketDiscount.discRatio}}
                    </Form-item>
                    <Form-item label="折扣券使用条件" v-show="isDisc">
                        {{mkStoreTicketDiscount.discCond==null?'未设置': mkStoreTicketDiscount.discCond}}
                    </Form-item>
                    <Form-item label="兑换券使用条件" v-show="isExch">
                        {{mkStoreTicketDiscount.exchCond==null?'未设置': mkStoreTicketDiscount.exchCond}}
                    </Form-item>
                    <Form-item label="库存">
                        {{mkStoreTicketDiscount.ticketNum==null?'未设置': mkStoreTicketDiscount.ticketNum}}
                    </Form-item>
                </Tab-Pane>
                <Tab-Pane label="发放使用" name="name2">
                    <Form-item label="适用商品">
                        {{mkStoreTicketDiscount.applyType==null?'未设置': ''}}{{mkStoreTicketDiscount.applyType=='00'?'全部商品参与': ''}}{{mkStoreTicketDiscount.applyType=='01'?'指定商品参与': ''}}{{mkStoreTicketDiscount.applyType=='02'?'指定商品不参与': ''}}
                    </Form-item>
                    <Form-item label="" v-show="isApplyType">
                        <div style="width: 980px;border: 1px solid rgb(243, 243, 243);height: 210px;background: rgb(243, 243, 243);border-radius: 10px;" v-show="checkGoodsDataList.length>0">
                            <div style="margin-top: 12px;margin-left: 10px;height: 150px;">
                                <div v-for="item in checkGoodsDataList" :item="item" style=" width: 300px; float: left;border: 1px silver solid; margin: 8px;border-radius: 6px;">
                                <span style="margin-top: 7px;width: 150px;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;
                                    -webkit-line-clamp: 2;line-height: 20px;max-height: 20px;float: left;margin-left: 4px;">{{item.goodsName}}</span><span>￥{{item.retailPrice}}</span>
                                    <span style="float: right;margin-right: 10px;"><a @click="delCheckGoods(item.discGoodTempId,item.goodsId)" v-show="showInfoList">删除</a></span>
                                </div>
                            </div>
                            <div style="text-align: right;">
                                <Page :total="checkGoodsTotalCount" :current="checkGoodsCurrentPage" :page-size="checkGoodsLimit" @on-change="loadCheckGoodsDataByPage" @on-page-size-change='handleCheckGoodsPageSize'>
                                </Page>
                            </div>
                        </div>
                    </Form-item>
                    <Form-item label="领取入口">
                        {{mkStoreTicketDiscount.getEnter==null?'未设置':''}}{{mkStoreTicketDiscount.getEnter=='1'?'商品详情页/购物车等商城页面':''}}
                    </Form-item>
                    <Form-item label="能否分享领取">
                        {{mkStoreTicketDiscount.canShareGet==null?'未设置':''}}{{mkStoreTicketDiscount.canShareGet=='0'?'用户可以分享链接领取（小程序暂不支持分享）':''}}
                    </Form-item>
                    <Form-item label="每人限领数(张)">
                        {{mkStoreTicketDiscount.limitNum==null?'未设置': mkStoreTicketDiscount.limitNum}}
                    </Form-item>
                </Tab-Pane>
                <Tab-Pane label="券面信息" name="name3">
                    <Form-item label="活动图片url(小图)">
                        <img :src="mkStoreTicketDiscount.advImgUrl" style="width: 60px;height: 60px;"/>
                    </Form-item>
                    <Form-item label="门店logo图url">
                        <img :src="mkStoreTicketDiscount.storeLogoUrl" style="width: 60px;height: 60px;"/>
                    </Form-item>
                    <Form-item label="券面颜色">
                        <div>
                            <div style="width: 30px;height: 30px;background-color: #00CC00;float: left;margin-right: 10px;cursor: pointer;" name="check" id="ticketColorId"></div>
                        </div>
                    </Form-item>
                    <Form-item label="操作说明">
                        {{mkStoreTicketDiscount.optDecl}}
                    </Form-item>
                    <Form-item label="优惠说明">
                        {{mkStoreTicketDiscount.discDecl}}
                    </Form-item>
                    <Form-item label="使用须知">
                        {{mkStoreTicketDiscount.useNoti}}
                    </Form-item>
                    <Form-item label="客服电话">
                        {{mkStoreTicketDiscount.svrTel==null?'未设置':mkStoreTicketDiscount.svrTel}}
                    </Form-item>
                    <Form-item label="是否有效">
                        {{mkStoreTicketDiscount.isValid=='0'?'有效':'无效'}}
                    </Form-item>
                </Tab-Pane>
            </Tabs>
        </i-form>
        <div style="padding-left: 20px">
            <i-button type="warning" @click="reloadInfoBack" style="margin-left: 8px"/>返回</i-button>
        </div>
    </Card>

    <Card v-show="!showOrderList" style="width: 1680px;">
        <p slot="title">{{title}}</p>
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-select v-model="c.isUsed" placeholder="使用状态">
                        <i-option value="0">未使用</i-option>
                        <i-option value="1">已使用</i-option>
                    </i-select>
                </i-col>
                <i-button @click="queryOrder">查询</i-button>
                <i-button @click="reloadOrderSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("usercoupon:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;批量作废</i-button>
                #end
            </div>
        </Row>
        <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>

        <table id="jqGridOrder"></table>
        <div id="jqGridPagerOrder"></div>
    </Card>
</div>
<div id="qrcode" style="display: none;padding: 10px;">
    <div id="qrcodeCanvas" style="margin: 20px 0 0 55px"></div>
</div>
<div id="qrcImg" style="display:none">
    <img class="qrcImg align-center" height="300px" width="300px" src="">
</div>
<script src="${rc.contextPath}/js/mk/mkstoreticketdiscount.js?_${date.systemTime}"></script>
</body>
</html>