<!DOCTYPE html>
<html>
<head>
    <title>门店满减活动</title>
    #parse("sys/header.html")

    <script src="//unpkg.com/iview/dist/locale/en-US.js"></script>
    <style>
        .col-sm-3 {
            width: 25%;
            float: left;
        }
        .goods-item {
            position: relative;
            width: 300px;
            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: 26%;
            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: 170px;
            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>
</head>
<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.campName" @on-enter="query" placeholder="活动名称"/>
                </i-col>
                <i-col span="3">
                    <i-select v-model="q.isPast" placeholder="过期状态" label-in-value>
                        <i-option value="1">已结束
                        </i-option>
                        <i-option value="0">进行中
                        </i-option>
                    </i-select>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("mkstorecampminus:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                <!--#if($shiro.hasPermission("mkstorecampminus:update"))-->
                <!--<i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>-->
                <!--#end-->
                #if($shiro.hasPermission("mkstorecampminus: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="mkStoreCampMinus" :rules="ruleValidate" :label-width="140">
            <Tabs value="name1">
                <Tab-Pane label="基本信息" name="name1">
                    <Form-item label="活动名称" prop="campName">
                        <i-input v-model="mkStoreCampMinus.campName" placeholder="活动名称" style="width: 400px" v-show="!isOperatorShow"></i-input>
                        <i-input v-model="mkStoreCampMinus.campName" placeholder="活动名称" style="width: 400px" v-show="isOperatorShow" disabled></i-input>
                    </Form-item>
                    <!--<Form-item label="活动id" prop="storeTopicId">-->
                        <!--<i-input v-model="mkStoreCampMinus.storeTopicId" placeholder="活动id"/>-->
                    <!--</Form-item>-->
                    <Form-item label="活动起始时间" prop="campBegTime">
                        <Date-picker type="datetime" format="yyyy-MM-dd HH:mm:ss" v-model="mkStoreCampMinus.campBegTime" placeholder="活动起始时间"
                                     style="width: 240px" v-show="!isOperatorShow"></Date-picker>
                        <Date-picker type="datetime" format="yyyy-MM-dd HH:mm:ss" v-model="mkStoreCampMinus.campBegTime" placeholder="活动起始时间"
                                     style="width: 240px" v-show="isOperatorShow" disabled></Date-picker>
                    </Form-item>
                    <Form-item label="活动结束时间" prop="campEndTime">
                        <Date-picker type="datetime" format="yyyy-MM-dd HH:mm:ss" v-model="mkStoreCampMinus.campEndTime" placeholder="活动结束时间"
                                     style="width: 240px;"/>
                    </Form-item>
                    <Form-item label="减免活动类型" prop="campMinusType">
                        <!--<i-input v-model="mkStoreCampMinus.campMinusType" placeholder="减免活动类型， 00:满x元减，01:满x件减，10:满x元折，
                        11:满x件折，减免活动类型为00，01时，减免方式必选"/>-->
                        <Radio-group v-model="mkStoreCampMinus.campMinusType" id="minusMode" @on-change="chanCampMinusType" v-show="!isOperatorShow">
                            <Radio label="00">
                                <span>满x元减</span>
                            </Radio>
                            <Radio label="01">
                                <span>满x件减</span>
                            </Radio>
                            <Radio label="10">
                                <span>满x元折</span>
                            </Radio>
                            <Radio label="11">
                                <span>满x件折</span>
                            </Radio>
                        </Radio-group>
                        <Radio-group v-model="mkStoreCampMinus.campMinusType" id="minusMode" @on-change="chanCampMinusType" v-show="isOperatorShow">
                            <Radio label="00" disabled>
                                <span>满x元减</span>
                            </Radio>
                            <Radio label="01" disabled>
                                <span>满x件减</span>
                            </Radio>
                            <Radio label="10" disabled>
                                <span>满x元折</span>
                            </Radio>
                            <Radio label="11" disabled>
                                <span>满x件折</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="减免方式" prop="minusMode" v-show="isMinusShow">
                        <!--<i-input v-model="mkStoreCampMinus.minusMode" placeholder="减免方式【minus_mode，00:满足最高层级减一次，10:每满一次减一次】，
                        1、减免方式选择10时，满件、满元每人最多项必填；2、减免方式为00，如设置每满100（2件）减10元，满200（4件）减20元....等； 按最高层级优惠满减，仅减一次。"/>-->
                        <Radio-group v-model="mkStoreCampMinus.minusMode" id="minusMode" @on-change="chanMinusMode" v-show="!isOperatorShow">
                            <Radio label="00">
                                <span>满足最高层级减一次</span>
                            </Radio>
                            <Radio label="10">
                                <span>每满一次减一次</span>
                            </Radio>
                        </Radio-group>
                        <Radio-group v-model="mkStoreCampMinus.minusMode" id="minusMode" @on-change="chanMinusMode" v-show="isOperatorShow">
                            <Radio label="00" disabled>
                                <span>满足最高层级减一次</span>
                            </Radio>
                            <Radio label="10" disabled>
                                <span>每满一次减一次</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Form-item label="优惠内容活动层级">
                        <!--满元满减-->
                        <div v-for="(item,index) in minusTypeUnitAttrList" v-show="isUnitAttrShow && item.isDelete==0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元减条件：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.yuanMinusCond" @on-keyup="checkCoudByUnitAttr(index)"><span slot="append">元</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于等于0的2位小数</span>
                                        <span :id="index+'unit'" style="color: red;"></span>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元减优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.yuanMinusPref" @on-keyup="checkYuanMinusPref(index)"><span slot="append">元</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于0的2位小数</span>
                                        <span :id="index+'unit_pref'" style="color: red;"></span>
                                    </div>
                                </div>
                                <button class="btn red btn-sm" type="button" @click="delAttrRow1(index)" v-show="index>0">
                                    <i class="fa fa-trash-o"></i>
                                </button>
                            </div>
                        </div>
                        <!--满件满减-->
                        <div v-for="(item,index) in minusTypePieceAttrList" v-show="isPieceAttrShow && item.isDelete==0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件减条件：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.pieceMinusConf" @on-keyup="checkCoudByPieceAttr(index)"><span slot="append">件</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于等于0的整数</span>
                                        <span :id="index+'piece_conf'" style="color: red;"></span>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件减优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.pieceMinusPref" @on-keyup="checkPieceMinusPref(index)"><span slot="append">元</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于0的2位小数</span>
                                        <span :id="index+'piece_pref'" style="color: red;"></span>
                                    </div>
                                </div>
                                </button>
                                <button class="btn red btn-sm" type="button" @click="delAttrRow2(index)" v-show="index>0">
                                    <i class="fa fa-trash-o"></i>
                                </button>
                            </div>
                        </div>
                        <!--满元满折-->
                        <div v-for="(item,index) in minusTypeDiscUnitAttrList" v-show="isDiscUnitAttrShow && item.isDelete==0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元折条件：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.yuanDiscCond" @on-keyup="checkYuanDiscCondByDiscUnit(index)"><span slot="append">元</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于等于0的2位小数</span>
                                        <span :id="index+'disc_unit_cond'" style="color: red;"></span>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元折优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.yuanDiscPref" @on-keyup="checkYuanDiscPrefByDiscUnit(index)"><span slot="append">折</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于0且小于10的1位小数</span>
                                        <span :id="index+'disc_unit_pref'" style="color: red;"></span>
                                    </div>
                                </div>
                                <button class="btn red btn-sm" type="button" @click="delAttrRow3(index)" v-show="index>0">
                                    <i class="fa fa-trash-o"></i>
                                </button>
                            </div>
                        </div>
                        <!--满件满折-->
                        <div v-for="(item,index) in minusTypeDiscPieceAttrList" v-show="isDiscPieceAttrShow && item.isDelete==0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件折条件：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.pieceDiscConf" @on-keyup="checkConfByDiscPiece(index)"><span slot="append">件</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于等于0的整数</span>
                                        <span :id="index+'piece_disc_conf'" style="color: red;"></span>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件折优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.pieceDiscPref" @on-keyup="checkPrefByDiscPiece(index)"><span slot="append">折</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于0且小于10的1位小数</span>
                                        <span :id="index+'piece_disc_ref'" style="color: red;"></span>
                                    </div>
                                </div>
                                <button class="btn red btn-sm" type="button" @click="delAttrRow4(index)" v-show="index>0">
                                    <i class="fa fa-trash-o"></i>
                                </button>
                            </div>
                        </div>
                        <!--满元满减，且减免类型为每满一次减一次-->
                        <div v-for="(item,index) in minusTypeUnitMode10List" v-show="isUnitMode10Show">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元减条件：</label>
                                    <div class="col-md-5 input-icon right" style="margin-left: 23px;">
                                        <i-input type="text" v-model="item.yuanMinusCond" @on-keyup="checkYuanCondByMode(index)"><span slot="append">元</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于0的2位小数</span>
                                        <span :id="index+'unit_mode'" style="color: red;"></span>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元减优惠：</label>
                                    <div class="col-md-5 input-icon right" style="margin-left: 23px;">
                                        <i-input type="text" v-model="item.yuanMinusPref" @on-keyup="checkYuanPrefByMode(index)"><span slot="append">元</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于0的2位小数</span>
                                        <span :id="index+'unit_mode_pref'" style="color: red;"></span>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满减件每人优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.pieceMinusEachDisc" placeholder="填0代表不设置上限" @on-keyup="checkEachDiscByUnitMode(index)"><span slot="append">元</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">填0代表不设置上限</span>
                                        <span :id="index+'unit_mode_each'" style="color: red;"></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--满件满减，且减免类型为每满一次减一次-->
                        <div v-for="(item,index) in minusTypePieceMode10List" v-show="isPieceMode10Show">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件减条件：</label>
                                    <div class="col-md-5 input-icon right" style="margin-left: 23px;">
                                        <i-input type="text" v-model="item.pieceMinusConf" @on-keyup="checkPieceConfByMode(index)"><span slot="append">件</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于0的整数</span>
                                        <span :id="index+'piece_mode'" style="color: red;"></span>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件减优惠：</label>
                                    <div class="col-md-5 input-icon right" style="margin-left: 23px;">
                                        <i-input type="text" v-model="item.pieceMinusPref" @on-keyup="checkPiecePrefByMode(index)"><span slot="append">元</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">请输入大于0的2位小数</span>
                                        <span :id="index+'piece_mode_pref'" style="color: red;"></span>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满减件每人优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        <i-input type="text" v-model="item.pieceMinusEachDisc" placeholder="填0代表不设置上限" @on-keyup="checkEachDiscByPieceMode(index)"><span slot="append">元</span></i-input>
                                    </div>
                                    <div class="col-md-5">
                                        <span style="color: #aaa">填0代表不设置上限</span>
                                        <span :id="index+'piece_mode_each'" style="color: red;"></span>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div v-show="isUnitAttrShow" style="margin-top: 10px;">
                            <button class="btn btn-primary btn-sm" type="button" @click="addAttrRow1">
                                <i class="fa fa-plus">添加活动层级</i>
                            </button>最多10级，下单时以满足的最高层级优惠
                        </div>
                        <div v-show="isPieceAttrShow" style="margin-top: 10px;">
                            <button class="btn btn-primary btn-sm" type="button" @click="addAttrRow2">
                                <i class="fa fa-plus">添加活动层级</i>
                            </button>最多10级，下单时以满足的最高层级优惠
                        </div>
                        <div v-show="isDiscUnitAttrShow" style="margin-top: 10px;">
                            <button class="btn btn-primary btn-sm" type="button" @click="addAttrRow3">
                                <i class="fa fa-plus">添加活动层级</i>
                            </button>最多10级，下单时以满足的最高层级优惠
                        </div>
                        <div v-show="isDiscPieceAttrShow" style="margin-top: 10px;">
                            <button class="btn btn-primary btn-sm" type="button" @click="addAttrRow4">
                                <i class="fa fa-plus">添加活动层级</i>
                            </button>最多10级，下单时以满足的最高层级优惠
                        </div>
                    </Form-item>
                    <!--<Form-item label="满元减条件(元)" prop="yuanMinusCond" v-show="isVoucher">
                        <i-input v-model="mkStoreCampMinus.yuanMinusCond" style="width: 400px" placeholder="满元减条件(元)"><span slot="append">元</span></i-input>
                    </Form-item>
                    <Form-item label="满元减优惠(元)" prop="yuanMinusPref" v-show="isVoucher">
                        <i-input v-model="mkStoreCampMinus.yuanMinusPref" style="width: 400px" placeholder="满元减优惠(元)"><span slot="append">元</span></i-input>
                    </Form-item>
                    <Form-item label="满件减条件(件)" prop="pieceMinusConf" v-show="isVoucher">
                        <i-input v-model="mkStoreCampMinus.pieceMinusConf" style="width: 400px" placeholder="满件减条件(件)"><span slot="append">件</span></i-input>
                    </Form-item>
                    <Form-item label="满件减优惠(元)" prop="pieceMinusPref" v-show="isVoucher">
                        <i-input v-model="mkStoreCampMinus.pieceMinusPref" style="width: 400px" placeholder="满件减优惠(元)"><span slot="append">元</span></i-input>
                    </Form-item>
                    <Form-item label="满减件每人优惠(元)" prop="pieceMinusEachDisc" v-show="isVoucher">
                        <i-input v-model="mkStoreCampMinus.pieceMinusEachDisc" style="width: 400px" placeholder="满减件每人优惠(元)，填0代表不设置上限"><span slot="append">元</span></i-input>
                    </Form-item>
                    <Form-item label="满元折条件(元)" prop="yuanDiscCond" v-show="isVoucher">
                        <i-input v-model="mkStoreCampMinus.yuanDiscCond" style="width: 400px" placeholder="满元折条件(元)，大于等于0的2位小数"><span slot="append">元</span></i-input>
                    </Form-item>
                    <Form-item label="满元折优惠(折)" prop="yuanDiscPref" v-show="isVoucher">
                        <i-input v-model="mkStoreCampMinus.yuanDiscPref" style="width: 400px" placeholder="满元折优惠(折)，大于0且小于10的1位小数"><span slot="append">折</span></i-input>
                    </Form-item>
                    <Form-item label="满件折条件(件)" prop="pieceDiscConf" v-show="isVoucher">
                        <i-input v-model="mkStoreCampMinus.pieceDiscConf" style="width: 400px" placeholder="满件折条件(件)，大于等于0的整数"><span slot="append">件</span></i-input>
                    </Form-item>
                    <Form-item label="满件折优惠(折)" prop="pieceDiscPref" v-show="isVoucher">
                        <i-input v-model="mkStoreCampMinus.pieceDiscPref" style="width: 400px" placeholder="满件折优惠(折)，大于0且小于10的数，可带1位小数"><span slot="append">折</span></i-input>
                    </Form-item>-->
                </Tab-Pane>
                <Tab-Pane label="优惠规则" name="name2">
                    <Form-item label="所属三方商户" prop="thirdMerchSn">
                        <i-select v-model="mkStoreCampMinus.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="mkStoreCampMinus.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="mkStoreCampMinus.storeId" placeholder="所属门店" style="width: 268px;" label-in-value 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="mkStoreCampMinus.storeId" placeholder="所属门店" style="width: 268px;" label-in-value 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="mkStoreCampMinus.goodsBizType"  placeholder="货品业务类型"
                                  label-in-value style="width: 268px;" 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="mkStoreCampMinus.goodsBizType"  placeholder="货品业务类型"
                                  label-in-value style="width: 268px;" 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="mkStoreCampMinus.applyType" id="applyType">
                            <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="图片是否展示在广告栏" prop="isStoreShow">
                        <Radio-group v-model="mkStoreCampMinus.isStoreShow">
                            <Radio label="0">
                                <span>否</span>
                            </Radio>
                            <Radio label="1">
                                <span>是</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <Row>
                        <i-col span="16">
                            <Form-item label="活动图片url(小图)" prop="advImgUrl">
                                <i-input v-model="mkStoreCampMinus.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: 140px;color: red;font-size: 12px;">* 尺寸建议410*110像素以内，大小100K以下</span>
                        </i-col>
                    </Row>
                    <Form-item label="活动说明" prop="advDesc">
                        <i-input type="textarea" :rows="3" v-model="mkStoreCampMinus.advDesc" placeholder="活动说明" style="width: 400px"></i-input>
                    </Form-item>
                    <Form-item label="是否有效" prop="isValid">
                        <Radio-group v-model="mkStoreCampMinus.isValid">
                            <Radio label="0">
                                <span>有效</span>
                            </Radio>
                            <Radio label="1">
                                <span>无效</span>
                            </Radio>
                        </Radio-group>
                    </Form-item>
                    <!--<Form-item label="是否过期，0：否，1：是" prop="isPast">-->
                        <!--<i-input v-model="mkStoreCampMinus.isPast" placeholder="是否过期，0：否，1：是"/>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="备注" prop="note">-->
                        <!--<i-input v-model="mkStoreCampMinus.note" placeholder="备注"/>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="创建人编号" prop="createrSn">-->
                        <!--<i-input v-model="mkStoreCampMinus.createrSn" placeholder="创建人编号"/>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="创建时间" prop="createTime">-->
                        <!--<i-input v-model="mkStoreCampMinus.createTime" placeholder="创建时间"/>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="修改人编号" prop="moderSn">-->
                        <!--<i-input v-model="mkStoreCampMinus.moderSn" placeholder="修改人编号"/>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="修改时间" prop="modTime">-->
                        <!--<i-input v-model="mkStoreCampMinus.modTime" placeholder="修改时间"/>-->
                    <!--</Form-item>-->
                    <!--<Form-item label="时间戳" prop="tstm">-->
                        <!--<i-input v-model="mkStoreCampMinus.tstm" placeholder="时间戳"/>-->
                    <!--</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="reload" 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 :label-width="140">
            <Tabs value="name1">
                <Tab-Pane label="基本信息" name="name1">
                    <Form-item label="活动名称">
                        {{mkStoreCampMinus.campName}}
                    </Form-item>
                    <Form-item label="活动时间">
                        {{mkStoreCampMinus.inValidTime}}
                    </Form-item>
                    <Form-item label="减免活动类型">
                        {{mkStoreCampMinus.campMinusType=='00'?'满x元减':''}}
                        {{mkStoreCampMinus.campMinusType=='01'?'满x件减':''}}
                        {{mkStoreCampMinus.campMinusType=='10'?'满x元折':''}}
                        {{mkStoreCampMinus.campMinusType=='11'?'满x件折':''}}
                    </Form-item>
                    <Form-item label="减免方式">
                        {{mkStoreCampMinus.minusMode=='00'?'满足最高层级减一次':''}}
                        {{mkStoreCampMinus.minusMode=='10'?'每满一次减一次':''}}
                    </Form-item>
                    <Form-item label="优惠内容活动层级">
                        <!--满元满减-->
                        <div v-for="(item,index) in minusTypeUnitAttrList" v-if="minusTypeUnitAttrList.length>0" v-show="item.isDelete==0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元减条件：</label>
                                    <div class="col-md-5 input-icon right">
                                        ￥{{item.yuanMinusCond}}元
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元减优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        ￥{{item.yuanMinusPref}}元
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--满件满减-->
                        <div v-for="(item,index) in minusTypePieceAttrList" v-if="minusTypePieceAttrList.length>0" v-show="item.isDelete==0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件减条件：</label>
                                    <div class="col-md-5 input-icon right">
                                        {{item.pieceMinusConf}}件
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件减优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        ￥{{item.pieceMinusPref}}元
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--满元满折-->
                        <div v-for="(item,index) in minusTypeDiscUnitAttrList" v-if="minusTypeDiscUnitAttrList.length>0" v-show="item.isDelete==0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元折条件：</label>
                                    <div class="col-md-5 input-icon right">
                                        ￥{{item.yuanDiscCond}}元
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元折优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        ￥{{item.yuanDiscPref}}折
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--满件满折-->
                        <div v-for="(item,index) in minusTypeDiscPieceAttrList" v-if="minusTypeDiscPieceAttrList.length>0" v-show="item.isDelete==0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件折条件：</label>
                                    <div class="col-md-5 input-icon right">
                                        {{item.pieceDiscConf}}件
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件折优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        ￥{{item.pieceDiscPref}}折
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--满元满减，且减免类型为每满一次减一次-->
                        <div v-for="(item,index) in minusTypeUnitMode10List" v-if="minusTypeUnitMode10List.length>0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元减条件：</label>
                                    <div class="col-md-5 input-icon right" style="margin-left: 23px;">
                                        ￥{{item.yuanMinusCond}}元
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满元减优惠：</label>
                                    <div class="col-md-5 input-icon right" style="margin-left: 23px;">
                                        ￥{{item.yuanMinusPref}}元
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满减件每人优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        ￥{{item.pieceMinusEachDisc}}元
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--满件满减，且减免类型为每满一次减一次-->
                        <div v-for="(item,index) in minusTypePieceMode10List" v-if="minusTypePieceMode10List.length>0" style="margin-top: 10px;">
                            <div class="row">
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件减条件：</label>
                                    <div class="col-md-5 input-icon right" style="margin-left: 23px;">
                                        {{item.pieceMinusConf}}件
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满件减优惠：</label>
                                    <div class="col-md-5 input-icon right" style="margin-left: 23px;">
                                        ￥{{item.pieceMinusPref}}元
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <label class="ivu-form-item-label">满减件每人优惠：</label>
                                    <div class="col-md-5 input-icon right">
                                        ￥{{item.pieceMinusEachDisc}}元
                                    </div>
                                </div>
                            </div>
                        </div>
                    </Form-item>
                </Tab-Pane>
                <Tab-Pane label="优惠规则" name="name2">
                    <!--<Form-item label="所属三方商户">-->
                        <!--{{mkStoreCampMinus.thirdMerchSn}}-->
                    <!--</Form-item>-->
                    <Form-item label="所属门店">
                        {{mkStoreCampMinus.storeName}}
                    </Form-item>
                    <Form-item label="货品业务类型">
                        {{mkStoreCampMinus.goodsBizType=='00'?'保税备货':''}}
                        {{mkStoreCampMinus.goodsBizType=='02'?'保税展示补货':''}}
                        {{mkStoreCampMinus.goodsBizType=='10'?'保税展示跨境':''}}
                        {{mkStoreCampMinus.goodsBizType=='11'?'普通商品':''}}
                    </Form-item>
                    <Form-item label="适用类型">
                        {{mkStoreCampMinus.applyType=='00'?'全部商品参与':''}}
                        {{mkStoreCampMinus.applyType=='01'?'指定商品参与':''}}
                        {{mkStoreCampMinus.applyType=='02'?'指定商品不参与':''}}
                    </Form-item>
                    <Form-item label="图片是否展示在广告栏">
                        {{mkStoreCampMinus.isStoreShow=='0'?'否':'是'}}
                    </Form-item>
                    <Form-item label="活动图片url(小图)">
                        <img :src="mkStoreCampMinus.advImgUrl" style="width: 60px;height: 60px;"/>
                    </Form-item>
                    <Form-item label="活动说明">
                        {{mkStoreCampMinus.advDesc}}
                    </Form-item>
                    <Form-item label="是否有效">
                        {{mkStoreCampMinus.isValid=='0'?'有效':'无效'}}
                    </Form-item>
                    <Form-item label="是否过期">
                        {{mkStoreCampMinus.isPast=='0'?'否':'是'}}
                    </Form-item>
                </Tab-Pane>
            </Tabs>
        </i-form>
        <div style="padding-left: 20px">
            <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
        </div>
    </Card>
    <!--<Card v-show="!showGoodsList">
        <p slot="title">{{title}}</p>
        <div style="padding-left: 20px">
            <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
        </div>
    </Card>-->
    <Card v-show="!updateGoodsList">
        <p slot="title">{{title}}</p>
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="g.goodsName" @on-enter="query" placeholder="商品名称"/>
                </i-col>
                <i-button @click="queryOrder">查询</i-button>
                <i-button @click="reloadOrderSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                <!--#if($shiro.hasPermission("goods:save"))-->
                <i-button type="warning" @click="saveCampMinusGoods" v-show="!isShowGoods">添加商品</i-button>
                <!--#end-->
                <i-button type="warning" @click="reload">返回</i-button>
            </div>
        </Row>

        <table id="jqGridOrder"></table>
        <div id="jqGridPagerOrder"></div>
    </Card>
    <Card v-show="!showStoreGoodsList">
        <p slot="title">{{title}}</p>
        <div class="search-group">
            <i-col span="4">
                <i-input v-model="s.goodsName" @on-enter="query" placeholder="名称"/>
            </i-col>
            <i-button @click="reloadGoodsByStore">查询</i-button>
            <i-button @click="reloadGoodsSearch">重置</i-button>
        </div>
        <div class="buttons-group">
            <i-button type="warning" @click="reloadCampGoods">返回管理商品</i-button>
        </div>
        <div style="margin-top: 10px; height: 550px">
            <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: 20px;margin-top: 10px;">
                        </div>
                    </div>
                    <div class="goods-info fl">
                        <div class="goods-intro ng-binding" :title="item.goodsName">
                            {{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">
                            {{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>
        </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>
        <div style="padding-left: 20px">
            <i-button type="primary" @click="ok">保存</i-button>
            <i-button type="warning" @click="cancel" style="margin-left: 8px"/>取消</i-button>
        </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/mkstorecampminus.js?_${date.systemTime}"></script>
</body>
</html>