|  |  |  | 
|---|
|  |  |  | th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script> | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .el-aside { | 
|---|
|  |  |  | background-color: #D3DCE6; | 
|---|
|  |  |  | color: #333; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .el-main { | 
|---|
|  |  |  | background-color: #E9EEF3; | 
|---|
|  |  |  | color: #333; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | body > .el-container { | 
|---|
|  |  |  | margin-bottom: 1000px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .button { | 
|---|
|  |  |  | padding: 5px; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .paginationStyle{ | 
|---|
|  |  |  | background: #ffffff; | 
|---|
|  |  |  | padding: 10px 10px; | 
|---|
|  |  |  | margin: 0px 0px 10px 0px; | 
|---|
|  |  |  | text-align: right; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .imageOne { | 
|---|
|  |  |  | display: block; | 
|---|
|  |  |  | height: 50px; | 
|---|
|  |  |  | padding: 5px 5px; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .imageTwo { | 
|---|
|  |  |  | display: block; | 
|---|
|  |  |  | height: 50px; | 
|---|
|  |  |  | padding: 5px 5px; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .imageThree { | 
|---|
|  |  |  | display: block; | 
|---|
|  |  |  | height: 50px; | 
|---|
|  |  |  | padding: 5px 5px; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .el-aside { | 
|---|
|  |  |  | background-color: #D3DCE6; | 
|---|
|  |  |  | color: #333; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .el-main { | 
|---|
|  |  |  | background-color: #E9EEF3; | 
|---|
|  |  |  | color: #333; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | body > .el-container { | 
|---|
|  |  |  | margin-bottom: 1000px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .button { | 
|---|
|  |  |  | padding: 5px; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .box-card { | 
|---|
|  |  |  | padding: 5px 5px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .imageOne { | 
|---|
|  |  |  | display: block; | 
|---|
|  |  |  | height: 50px; | 
|---|
|  |  |  | padding: 5px 5px; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .imageTwo { | 
|---|
|  |  |  | display: block; | 
|---|
|  |  |  | height: 280px; | 
|---|
|  |  |  | padding: 5px 5px; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .imageThree { | 
|---|
|  |  |  | display: block; | 
|---|
|  |  |  | padding: 5px 5px; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .box-card { | 
|---|
|  |  |  | padding: 5px 5px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  | </head> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-container> | 
|---|
|  |  |  | <el-aside width="30%"> | 
|---|
|  |  |  | <el-card class="box-card" :body-style="{ padding: '10px 10px'}"> | 
|---|
|  |  |  | <div @click="uploadImg()" class="imageOne"> | 
|---|
|  |  |  | <!--<div @click="uploadImg()" class="imageOne"> | 
|---|
|  |  |  | <img v-if="imageUrlTitle" :src="imageUrlTitle" style="width: 100%;"> | 
|---|
|  |  |  | <el-button type="primary" v-show="imageUrlTitle == ''" round><span style="font-size: 20px;">标题</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div @click="uploadImg()" class="imageTwo" > | 
|---|
|  |  |  | <img v-if="imageUrlHead" :src="imageUrlHead" style="width: 100%;"> | 
|---|
|  |  |  | <el-button type="primary" v-show="imageUrlHead == ''" round><span style="font-size: 20px;">头部</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div>--> | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <div @click="uploadImg()" class="imageTwo" > | 
|---|
|  |  |  | <img v-if="imageUrlHead" :src="imageUrlHead" style="width: 100%;height: 100%"> | 
|---|
|  |  |  | <el-button type="primary" v-show="imageUrlHead == ''" round><span style="font-size: 20px;">头部</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row style="display:flex;"> | 
|---|
|  |  |  | <el-col> | 
|---|
|  |  |  | <div style="padding:5px;font-size: 15px;text-align: left;"><span>您已累计签到<span style="color: red;">3</span>天</span></div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div style="padding:5px;font-size: 15px;text-align: right;"><span>签到提醒</span></div> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <div @click="uploadImg()"> | 
|---|
|  |  |  | <el-calendar :range="['2019-03-04', '2019-03-24']"></el-calendar> | 
|---|
|  |  |  | <img v-if="imageUrlState" :src="imageUrlState" style="width: 100%;"> | 
|---|
|  |  |  | <el-button type="primary" v-show="imageUrlState == ''" round><span style="font-size: 20px;">日历签到背景</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button> | 
|---|
|  |  |  | <!--<el-button type="primary" v-show="imageUrlState == ''" round><span style="font-size: 20px;">日历签到背景</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button>--> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <div @click="uploadImg()" class="imageThree" > | 
|---|
|  |  |  | <el-button type="primary" v-show="imageUrlButton == ''" round><span style="font-size: 20px;">签到按钮</span><span style="padding:5px;font-size: 15px;color: red;">(上传图片)</span></span></el-button> | 
|---|
|  |  |  | <img v-if="imageUrlButton" :src="imageUrlButton" style="width: 100%;"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <div style="text-align: center;padding: 5px;" @click="gzsmSet()"> | 
|---|
|  |  |  | <div class="col-sm-8 col-sm-offset-2" style="text-align: left;"> | 
|---|
|  |  |  | <span style="padding:5px;font-size: 30px;">-- 规则说明--</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | <span style="padding:5px;font-size: 15px;">3、每7天重新开始计算</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | </el-card> | 
|---|
|  |  |  | </el-aside> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-main width="70%"> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <el-tabs v-model="activeName" > | 
|---|
|  |  |  | <el-tabs v-model="activeName" @tab-click="clickSecondTab"> | 
|---|
|  |  |  | <el-tab-pane label="活动设置" name="first"> | 
|---|
|  |  |  | <div class="col-sm-8 col-sm-offset-1" style="padding: 10px"> | 
|---|
|  |  |  | <el-form-item label="活动名称" prop="actName"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="col-sm-8 col-sm-offset-1" style="padding: 10px"> | 
|---|
|  |  |  | <el-form-item label="活动编码" prop="actCode"> | 
|---|
|  |  |  | <el-input v-model.number="ruleForm.actCode" placeholder="请输入最大开团数量"></el-input> | 
|---|
|  |  |  | <el-input v-model.number="ruleForm.actCode" placeholder="请输入活动编码"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="col-sm-4 col-sm-offset-1" style="padding: 10px"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-tab-pane label="奖品设置" name="second"> | 
|---|
|  |  |  | <el-row style="display:flex;"> | 
|---|
|  |  |  | <el-col :span="20"> | 
|---|
|  |  |  | <el-tabs v-model="editableTabsValue" type="card" closable @tab-remove="removeTab"> | 
|---|
|  |  |  | <el-tabs v-model="editableTabsValue" type="card" closable @tab-click="clickTab" @tab-remove="removeTab"> | 
|---|
|  |  |  | <el-tab-pane v-for="(item, index) in editableTabs" :key="item.name" :label="item.title" :name="item.name"> | 
|---|
|  |  |  | <el-row v-show="editableTabsValue !== '1'"> | 
|---|
|  |  |  | <el-form-item label="签到累计天数"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div v-show="[1,3].includes(item.content.awardWay)"> | 
|---|
|  |  |  | <el-row > | 
|---|
|  |  |  | <el-col> | 
|---|
|  |  |  | <el-form-item label="客服电话"> | 
|---|
|  |  |  | <el-input v-model="item.content.customerPhone"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div v-show="item.content.awardWay !== '2'"> | 
|---|
|  |  |  | <el-row > | 
|---|
|  |  |  | <el-col> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div v-show="item.content.awardType === '3'"> | 
|---|
|  |  |  | <el-row style="display:flex;"> | 
|---|
|  |  |  | <el-col> | 
|---|
|  |  |  | <el-form-item label="优惠券名称"> | 
|---|
|  |  |  | <el-input v-model="item.content.couponName"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col> | 
|---|
|  |  |  | <el-form-item label="优惠券"> | 
|---|
|  |  |  | <el-input v-model="item.content.couponId"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col> | 
|---|
|  |  |  | <el-button type="primary"> | 
|---|
|  |  |  | <el-button type="primary" @click="chooseCoupon(item.content.couponName,item.name)"> | 
|---|
|  |  |  | 选择优惠券 | 
|---|
|  |  |  | </el-button> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-drawer | 
|---|
|  |  |  | title="选择商城优惠券" | 
|---|
|  |  |  | :visible.sync="drawerCoupon" | 
|---|
|  |  |  | :direction="directionCoupon" | 
|---|
|  |  |  | size="90%"> | 
|---|
|  |  |  | <el-row style="margin-left: 50px;"> | 
|---|
|  |  |  | <el-col :span="24"> | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <el-form ref="formCoupon" :model="formCoupon" inline > | 
|---|
|  |  |  | <el-form-item prop="yhjmc"> | 
|---|
|  |  |  | <el-input v-model="formCoupon.yhjmc" placeholder="请输入优惠券名称"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-button type="primary" @click="searchFormCoupon" >搜索</el-button> | 
|---|
|  |  |  | <el-button @click="resetFormCoupon('formCoupon')">重置</el-button> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-row class="table-style" > | 
|---|
|  |  |  | <el-table ref="multipleTable" | 
|---|
|  |  |  | :data="couponList.rows" | 
|---|
|  |  |  | :height="tableHeightCoupon" | 
|---|
|  |  |  | stripe:true | 
|---|
|  |  |  | style="width: 100%"> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="cname" | 
|---|
|  |  |  | label="优惠券名称" | 
|---|
|  |  |  | show-overflow-tooltip> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="endTime" | 
|---|
|  |  |  | label="截止日期" | 
|---|
|  |  |  | show-overflow-tooltip> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="address" | 
|---|
|  |  |  | label="操作"> | 
|---|
|  |  |  | <template slot-scope="scope"> | 
|---|
|  |  |  | <el-button type="primary" | 
|---|
|  |  |  | size="mini" | 
|---|
|  |  |  | @click="chooseOneCoupon(scope.row)">选择 | 
|---|
|  |  |  | </el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row class="paginationStyle"  > | 
|---|
|  |  |  | <el-pagination background | 
|---|
|  |  |  | @size-change="changePageSizeCoupon" | 
|---|
|  |  |  | @current-change="changeCurrentPageCoupon" | 
|---|
|  |  |  | :current-page="couponList.currentPage" | 
|---|
|  |  |  | :page-sizes="[10, 20, 30, 50]" | 
|---|
|  |  |  | :page-size="couponList.pageSize" | 
|---|
|  |  |  | layout="total, sizes, prev, pager, next, jumper" | 
|---|
|  |  |  | :total="couponList.total"> | 
|---|
|  |  |  | </el-pagination> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | </el-drawer> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div v-show="item.content.awardType === '4'"> | 
|---|
|  |  |  | <el-row style="display:flex;"> | 
|---|
|  |  |  | <el-col> | 
|---|
|  |  |  | <el-form-item label="品项名称"> | 
|---|
|  |  |  | <el-input v-model="item.content.goodsName"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col> | 
|---|
|  |  |  | <el-form-item label="品项"> | 
|---|
|  |  |  | <el-input v-model="item.content.goodsId"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col> | 
|---|
|  |  |  | <el-button type="primary"> | 
|---|
|  |  |  | <el-button type="primary" @click="chooseGoods(item.content.goodsName,item.name)"> | 
|---|
|  |  |  | 选择品项 | 
|---|
|  |  |  | </el-button> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-drawer | 
|---|
|  |  |  | title="选择ERP产品" | 
|---|
|  |  |  | :visible.sync="drawerGoods" | 
|---|
|  |  |  | :direction="directionGoods" | 
|---|
|  |  |  | size="90%"> | 
|---|
|  |  |  | <el-row style="margin-left: 50px;"> | 
|---|
|  |  |  | <el-col :span="24"> | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <el-form ref="formGoods" :model="formGoods" inline > | 
|---|
|  |  |  | <el-form-item prop="cpmc"> | 
|---|
|  |  |  | <el-input v-model="formGoods.cpmc" placeholder="请输入产品名称"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-button type="primary" @click="searchFormGoods" >搜索</el-button> | 
|---|
|  |  |  | <el-button @click="resetFormGoods('formGoods')">重置</el-button> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-row class="table-style" > | 
|---|
|  |  |  | <el-table ref="multipleTable" | 
|---|
|  |  |  | :data="goodsList.rows" | 
|---|
|  |  |  | :height="tableHeightGoods" | 
|---|
|  |  |  | stripe:true | 
|---|
|  |  |  | style="width: 100%"> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="name" | 
|---|
|  |  |  | label="名称" | 
|---|
|  |  |  | show-overflow-tooltip> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="address" | 
|---|
|  |  |  | label="操作"> | 
|---|
|  |  |  | <template slot-scope="scope"> | 
|---|
|  |  |  | <el-button type="primary" | 
|---|
|  |  |  | size="mini" | 
|---|
|  |  |  | @click="chooseOneGoods(scope.row)">选择 | 
|---|
|  |  |  | </el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row class="paginationStyle"  > | 
|---|
|  |  |  | <el-pagination background | 
|---|
|  |  |  | @size-change="changePageSizeGoods" | 
|---|
|  |  |  | @current-change="changeCurrentPageGoods" | 
|---|
|  |  |  | :current-page="goodsList.currentPage" | 
|---|
|  |  |  | :page-sizes="[10, 20, 30, 50]" | 
|---|
|  |  |  | :page-size="goodsList.pageSize" | 
|---|
|  |  |  | layout="total, sizes, prev, pager, next, jumper" | 
|---|
|  |  |  | :total="goodsList.total"> | 
|---|
|  |  |  | </el-pagination> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | </el-drawer> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-tab-pane> | 
|---|
|  |  |  | </el-tabs> | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-tab-pane> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-tab-pane label="背景图片上传" name="third"> | 
|---|
|  |  |  | <div class="col-sm-8 col-sm-offset-1" style="padding: 10px"> | 
|---|
|  |  |  | <!--<div class="col-sm-8 col-sm-offset-1" style="padding: 10px"> | 
|---|
|  |  |  | <el-form-item label="标题"> | 
|---|
|  |  |  | <el-upload | 
|---|
|  |  |  | action="/admin/multipleUploadFile/doUpload" | 
|---|
|  |  |  | 
|---|
|  |  |  | <img v-if="imageUrlTitle" :src="imageUrlTitle" style="max-width: 300px;"> | 
|---|
|  |  |  | </el-upload> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div>--> | 
|---|
|  |  |  | <div class="col-sm-8 col-sm-offset-1" style="padding: 10px"> | 
|---|
|  |  |  | <el-form-item label="头部"> | 
|---|
|  |  |  | <el-upload | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-upload> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="col-sm-8 col-sm-offset-1" style="padding: 10px"> | 
|---|
|  |  |  | <!--<div class="col-sm-8 col-sm-offset-1" style="padding: 10px"> | 
|---|
|  |  |  | <el-form-item label="日历签到背景"> | 
|---|
|  |  |  | <el-upload | 
|---|
|  |  |  | action="/admin/multipleUploadFile/doUpload" | 
|---|
|  |  |  | 
|---|
|  |  |  | <img v-if="imageUrlState" :src="imageUrlState" style="max-width: 300px;"> | 
|---|
|  |  |  | </el-upload> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div>--> | 
|---|
|  |  |  | <div class="col-sm-8 col-sm-offset-1" style="padding: 10px"> | 
|---|
|  |  |  | <el-form-item label="签到按钮"> | 
|---|
|  |  |  | <el-upload | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-color-picker v-model="typographyColor"></el-color-picker> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="字体大小" style="padding: 10px"> | 
|---|
|  |  |  | <el-input-number v-model="typographyNum" :min="10" :max="20" label="描述文字"></el-input-number> | 
|---|
|  |  |  | <el-input-number v-model="typographyNum" :min="10" :max="50" label="描述文字"></el-input-number> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="字体透明度" style="padding: 10px"> | 
|---|
|  |  |  | <!--<el-form-item label="字体透明度" style="padding: 10px"> | 
|---|
|  |  |  | <el-input-number v-model="typographyLight" :min="1" :max="100" label="描述文字">%</el-input-number> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-form-item>--> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-tab-pane> | 
|---|
|  |  |  | </el-tabs> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="form-group "> | 
|---|
|  |  |  | <div class="col-sm-12 text-center"> | 
|---|
|  |  |  | <el-button type="primary" @click="dataSubmit('ruleForm')">保存</el-button> | 
|---|
|  |  |  | <el-button type="danger" >关闭</el-button> | 
|---|
|  |  |  | <el-button type="danger" @click="cancelSubmit">关闭</el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-main> | 
|---|
|  |  |  | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | //获取传输的活动对象 | 
|---|
|  |  |  | var actId = $.query.get("actId"); | 
|---|
|  |  |  | const prize = { | 
|---|
|  |  |  | //奖品基本信息 | 
|---|
|  |  |  | cumulativeDay:'', | 
|---|
|  |  |  | 
|---|
|  |  |  | awardInventoryCnt:'', | 
|---|
|  |  |  | awardDistributeCnt:'', | 
|---|
|  |  |  | awardWay:'1', | 
|---|
|  |  |  | awardWayoperationTip:'', | 
|---|
|  |  |  | operationTip:'', | 
|---|
|  |  |  | prizeAddress:'', | 
|---|
|  |  |  | prizeTime: '', | 
|---|
|  |  |  | wechatImg:'', | 
|---|
|  |  |  | scoreCnt:'', | 
|---|
|  |  |  | couponId:'', | 
|---|
|  |  |  | goodsId:'', | 
|---|
|  |  |  | couponName:'', | 
|---|
|  |  |  | customerPhone:'', | 
|---|
|  |  |  | goodsName:'', | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var app = new Vue({ | 
|---|
|  |  |  | el: '#app', | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | activeName: 'first', | 
|---|
|  |  |  | formLabelWidth: '120px', | 
|---|
|  |  |  |  | 
|---|
|  |  |  | activeClickTab:0, | 
|---|
|  |  |  | //优惠券搜索弹出 | 
|---|
|  |  |  | drawerCoupon: false, | 
|---|
|  |  |  | directionCoupon: 'rtl', | 
|---|
|  |  |  | tableHeightCoupon: 500, | 
|---|
|  |  |  | //--优惠券 | 
|---|
|  |  |  | formCoupon:{ | 
|---|
|  |  |  | yhjmc:'', | 
|---|
|  |  |  | order:'', | 
|---|
|  |  |  | sort:'' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | couponList:{ | 
|---|
|  |  |  | rows:[], | 
|---|
|  |  |  | total:0, | 
|---|
|  |  |  | pageSize:10, | 
|---|
|  |  |  | currentPage:1, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //品项搜索弹出 | 
|---|
|  |  |  | drawerGoods: false, | 
|---|
|  |  |  | directionGoods: 'rtl', | 
|---|
|  |  |  | tableHeightGoods: 500, | 
|---|
|  |  |  | //--品项 | 
|---|
|  |  |  | formGoods:{ | 
|---|
|  |  |  | cpmc:'', | 
|---|
|  |  |  | order:'', | 
|---|
|  |  |  | sort:'' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | goodsList:{ | 
|---|
|  |  |  | rows:[], | 
|---|
|  |  |  | total:0, | 
|---|
|  |  |  | pageSize:10, | 
|---|
|  |  |  | currentPage:1, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //标题图片 | 
|---|
|  |  |  | imageUrlTitle: '', | 
|---|
|  |  |  | imageUrlHead: '', | 
|---|
|  |  |  | imageUrlButton: '', | 
|---|
|  |  |  | imageUrlHead: "../../../images/sign/signHead.png", | 
|---|
|  |  |  | imageUrlButton: "../../../images/sign/signButton.png", | 
|---|
|  |  |  | imageUrlState: '', | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //字体颜色 | 
|---|
|  |  |  | 
|---|
|  |  |  | created: function () { | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | //选择优惠券 | 
|---|
|  |  |  | chooseCoupon(val,name){ | 
|---|
|  |  |  | let _this = this; | 
|---|
|  |  |  | _this.drawerCoupon = true; | 
|---|
|  |  |  | _this.activeClickTab = parseInt(name); | 
|---|
|  |  |  | _this.formCoupon.yhjmc = val; | 
|---|
|  |  |  | _this.loadCouponList(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //--优惠券 | 
|---|
|  |  |  | loadCouponList() { | 
|---|
|  |  |  | let _this = this; | 
|---|
|  |  |  | let data=_this.getRequestParamCoupon(); | 
|---|
|  |  |  | data.pageSize=_this.couponList.pageSize; | 
|---|
|  |  |  | data.pageNum=_this.couponList.currentPage; | 
|---|
|  |  |  | AjaxProxy.requst({ | 
|---|
|  |  |  | app: _this, | 
|---|
|  |  |  | data:data, | 
|---|
|  |  |  | url: basePath + '/admin/activitySignAwardSet/selectCouponList', | 
|---|
|  |  |  | callback: function (data) { | 
|---|
|  |  |  | _this.couponList.rows = data.rows; | 
|---|
|  |  |  | _this.couponList.total = data.total; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //查询参数 | 
|---|
|  |  |  | getRequestParamCoupon(){ | 
|---|
|  |  |  | let _this = this; | 
|---|
|  |  |  | return   { | 
|---|
|  |  |  | yhjmc:_this.formCoupon.yhjmc, | 
|---|
|  |  |  | order:_this.formCoupon.order, | 
|---|
|  |  |  | sort:_this.formCoupon.sort, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //查询 | 
|---|
|  |  |  | searchFormCoupon:function(){ | 
|---|
|  |  |  | this.couponList.currentPage=1; | 
|---|
|  |  |  | this.loadCouponList(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //重置 | 
|---|
|  |  |  | resetFormCoupon(formName) { | 
|---|
|  |  |  | // this.formCoupon.yhjmc = '' | 
|---|
|  |  |  | // console.log(this.$refs[formName].resetFields) | 
|---|
|  |  |  | (this.$refs[formName])[0].resetFields(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changePageSizeCoupon(val) { | 
|---|
|  |  |  | this.couponList.pageSize = val; | 
|---|
|  |  |  | this.loadCouponList(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changeCurrentPageCoupon(val) { | 
|---|
|  |  |  | this.couponList.currentPage = val; | 
|---|
|  |  |  | this.loadCouponList(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //选择 | 
|---|
|  |  |  | chooseOneCoupon(row) { | 
|---|
|  |  |  | let _this = this; | 
|---|
|  |  |  | _this.editableTabs[_this.activeClickTab-1].content.couponId = row.id; | 
|---|
|  |  |  | _this.editableTabs[_this.activeClickTab-1].content.couponName = row.cname; | 
|---|
|  |  |  | _this.drawerCoupon = false; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //选择品项 | 
|---|
|  |  |  | chooseGoods(val,name){ | 
|---|
|  |  |  | let _this = this; | 
|---|
|  |  |  | _this.drawerGoods = true; | 
|---|
|  |  |  | _this.activeClickTab = parseInt(name); | 
|---|
|  |  |  | _this.formGoods.cpmc = val; | 
|---|
|  |  |  | _this.loadGoodsList(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //--品项 | 
|---|
|  |  |  | loadGoodsList() { | 
|---|
|  |  |  | let _this = this; | 
|---|
|  |  |  | let data=_this.getRequestParamGoods(); | 
|---|
|  |  |  | data.pageSize=_this.goodsList.pageSize; | 
|---|
|  |  |  | data.pageNum=_this.goodsList.currentPage; | 
|---|
|  |  |  | AjaxProxy.requst({ | 
|---|
|  |  |  | app: _this, | 
|---|
|  |  |  | data:data, | 
|---|
|  |  |  | url: basePath + '/admin/activitySignAwardSet/selectGoodsList', | 
|---|
|  |  |  | callback: function (data) { | 
|---|
|  |  |  | _this.goodsList.rows = data.rows; | 
|---|
|  |  |  | _this.goodsList.total = data.total; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //查询参数 | 
|---|
|  |  |  | getRequestParamGoods(){ | 
|---|
|  |  |  | let _this = this; | 
|---|
|  |  |  | return   { | 
|---|
|  |  |  | cpmc:_this.formCoupon.cpmc, | 
|---|
|  |  |  | order:_this.formCoupon.order, | 
|---|
|  |  |  | sort:_this.formCoupon.sort, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //查询 | 
|---|
|  |  |  | searchFormGoods:function(){ | 
|---|
|  |  |  | this.goodsList.currentPage=1; | 
|---|
|  |  |  | this.loadGoodsList(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //重置 | 
|---|
|  |  |  | resetFormGoods(formName) { | 
|---|
|  |  |  | (this.$refs[formName])[0].resetFields(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changePageSizeGoods(val) { | 
|---|
|  |  |  | this.goodsList.pageSize = val; | 
|---|
|  |  |  | this.loadGoodsList(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changeCurrentPageGoods(val) { | 
|---|
|  |  |  | this.goodsList.currentPage = val; | 
|---|
|  |  |  | this.loadGoodsList(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //选择 | 
|---|
|  |  |  | chooseOneGoods(row) { | 
|---|
|  |  |  | let _this = this; | 
|---|
|  |  |  | _this.editableTabs[_this.activeClickTab-1].content.goodsId = row.id; | 
|---|
|  |  |  | _this.editableTabs[_this.activeClickTab-1].content.goodsName = row.name; | 
|---|
|  |  |  | _this.drawerGoods = false; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //保存 | 
|---|
|  |  |  | dataSubmit : function(formName) { | 
|---|
|  |  |  | const _this = this; | 
|---|
|  |  |  | let flag = false; | 
|---|
|  |  |  | 
|---|
|  |  |  | let activitySignAwardSets = []; | 
|---|
|  |  |  | for (let i = 0; i < _this.editableTabs.length; i++) { | 
|---|
|  |  |  | let prize = _this.editableTabs[i].content; | 
|---|
|  |  |  | let name = _this.editableTabs[i].title; | 
|---|
|  |  |  | let awardRule = 2; | 
|---|
|  |  |  | if(name == "签到日常奖励"){ | 
|---|
|  |  |  | awardRule = 1; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | let activitySignAwardSet = { | 
|---|
|  |  |  | cumulativeDay: prize.cumulativeDay, | 
|---|
|  |  |  | awardRule: awardRule, | 
|---|
|  |  |  | awardType: prize.awardType, | 
|---|
|  |  |  | awardName: prize.awardName, | 
|---|
|  |  |  | introduceImg: prize.introduceImg, | 
|---|
|  |  |  | 
|---|
|  |  |  | awardInventoryCnt: prize.awardInventoryCnt, | 
|---|
|  |  |  | awardDistributeCnt: prize.awardDistributeCnt, | 
|---|
|  |  |  | awardWay: prize.awardWay, | 
|---|
|  |  |  | awardWayoperationTip: prize.awardWayoperationTip, | 
|---|
|  |  |  | operationTip: prize.operationTip, | 
|---|
|  |  |  | prizeAddress: prize.prizeAddress, | 
|---|
|  |  |  | wechatImg: prize.wechatImg, | 
|---|
|  |  |  | customerPhone: prize.customerPhone, | 
|---|
|  |  |  | scoreCnt: prize.scoreCnt, | 
|---|
|  |  |  | couponId: prize.couponId, | 
|---|
|  |  |  | goodsId: prize.goodsId, | 
|---|
|  |  |  | couponName: prize.couponName, | 
|---|
|  |  |  | goodsName: prize.goodsName, | 
|---|
|  |  |  | prizeStartTime: prize.prizeTime[0], | 
|---|
|  |  |  | prizeEndTime: prize.prizeTime[1], | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | message: data.info, | 
|---|
|  |  |  | type: 'success', | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | parent.layer.close(parent.layer.getFrameIndex(window.name)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | content: JSON.parse(JSON.stringify(prize)), | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | this.editableTabsValue = newTabName; | 
|---|
|  |  |  | this.activeClickTab = parseInt(newTabName); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | clickSecondTab(targetName) { | 
|---|
|  |  |  | this.activeClickTab = 1; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | clickTab(targetName) { | 
|---|
|  |  |  | console.log(targetName.name); | 
|---|
|  |  |  | this.activeClickTab = parseInt(targetName.name); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | removeTab(targetName) { | 
|---|
|  |  |  | let tabs = this.editableTabs; | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //奖品设置的图片介绍 | 
|---|
|  |  |  | introduceImgSuccess(res, file) { | 
|---|
|  |  |  | this.editableTabs[this.tabIndex-1].content.introduceImg = res.path; | 
|---|
|  |  |  | // this.prize.introduceImg = URL.createObjectURL(file.raw); | 
|---|
|  |  |  | this.editableTabs[this.activeClickTab-1].content.introduceImg = res.path; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //奖品设置的客服微信 | 
|---|
|  |  |  | wechatImgSuccess(res, file) { | 
|---|
|  |  |  | this.editableTabs[this.tabIndex-1].content.wechatImg = res.path; | 
|---|
|  |  |  | this.editableTabs[this.activeClickTab-1].content.wechatImg = res.path; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | cancelSubmit() { | 
|---|
|  |  |  | this.closeFrame(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | closeFrame() { | 
|---|
|  |  |  | parent.layer.close(parent.layer.getFrameIndex(window.name)); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|