| | |
| | | <div class="box" style="max-height:calc(100% - 60px);margin-bottom:50px;overflow-y: auto" > |
| | | <el-form :model="form" ref="form"> |
| | | <div class="header"> |
| | | <span style="font-size: 15px; font-weight: bold">【1】注册奖励</span> |
| | | <span style="font-size: 15px; font-weight: bold">【1】积分抵扣现金规则</span> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="积分奖励" label-width="150px" prop="regIntegralRewardStatus"> |
| | | <el-switch v-model="form.regIntegralRewardStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="新人注册送" label-width="250px" prop="regIntegralReward"> |
| | | <el-input style="width: 200px;margin: 0px 20px" type="number" v-model="form.regIntegralReward" placeholder="请输入" v-trim> |
| | | <template slot="append">积分</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="优惠券奖励" label-width="150px" prop="regCouponRewardStatus"> |
| | | <el-switch v-model="form.regCouponRewardStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <div > |
| | | <el-form-item label="新人注册送优惠券" label-width="250px" prop="regCouponRewardList"> |
| | | </el-form-item> |
| | | <div style="margin-left: 150px;border: 1px solid #f2f2f2"> |
| | | <el-table style="width: 600px;" :data="form.regCouponRewardList"> |
| | | <el-table-column prop="shopPrice" label="优惠券" min-width="300px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <el-select v-model="row.couponId" style="width: 200px;margin: 0px 20px" clearable filterable placeholder="请选择优惠券" > |
| | | <el-option v-for="item in couponList" :label="item.name" :value="item.id"> </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="数量" min-width="200px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <el-input style="width: 100px;margin: 0px 20px" type="number" v-model="row.num" placeholder="请输入数量" v-trim/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="100px" align="center"> |
| | | <template slot-scope="scope" > |
| | | <el-button style="color: red;border: none;" @click="delCoupon(0,scope.$index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-button s type="primary" icon="el-icon-plus" @click="addCoupon(0)" style="height: 30px;margin: 10px;">添加</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="header"> |
| | | <span style="font-size: 15px; font-weight: bold">【2】邀请好友奖励</span> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="积分奖励" label-width="150px" prop="shareIntegralRewardStatus"> |
| | | <el-switch v-model="form.shareIntegralRewardStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="好友成功注册送邀请人" label-width="250px" prop="shareIntegralReward"> |
| | | <el-input style="width: 200px;margin: 0px 20px" type="number" v-model="form.shareIntegralReward" placeholder="请输入" v-trim> |
| | | <template slot="append">积分</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="优惠券奖励" label-width="150px" prop="shareCouponRewardStatus"> |
| | | <el-switch v-model="form.shareCouponRewardStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <div > |
| | | <el-form-item label="好友完成首单送邀请人优惠券" label-width="250px" prop="shareCouponRewardList"> |
| | | </el-form-item> |
| | | <div style="margin-left: 150px;border: 1px solid #f2f2f2"> |
| | | <el-table style="width: 600px;" :data="form.shareCouponRewardList"> |
| | | <el-table-column prop="couponId" label="优惠券" min-width="300px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <el-select v-model="row.couponId" style="width: 200px;margin: 0px 20px" clearable filterable placeholder="请选择优惠券" > |
| | | <el-option v-for="item in couponList" :label="item.name" :value="item.id"> </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="数量" min-width="200px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <el-input style="width: 100px;margin: 0px 20px" type="number" v-model="row.num" placeholder="请输入数量" v-trim/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="100px" align="center"> |
| | | <template slot-scope="scope" > |
| | | <el-button style="color: red;border: none;" @click="delCoupon(1,scope.$index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-button s type="primary" icon="el-icon-plus" @click="addCoupon(1)" style="height: 30px;margin: 10px;">添加</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="header"> |
| | | <span style="font-size: 15px; font-weight: bold">【3】消费返积分</span> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="返用户积分" label-width="150px" prop="returnMemberIntegralStatus"> |
| | | <el-switch v-model="form.returnMemberIntegralStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="订单实付金额每满" label-width="250px" prop="returnMemberIntegral"> |
| | | <el-input style="width: 250px;margin: 0px 20px" type="number" v-model="form.returnMemberIntegral" placeholder="请输入" v-trim> |
| | | <template slot="append">元返用户1积分</template> |
| | | </el-input> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>提醒:实付金额去除运费</p> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="返经销商积分" label-width="150px" prop="returnShopIntegralStatus"> |
| | | <el-switch v-model="form.returnShopIntegralStatus" :active-value="0" :inactive-value="1" active-color="#13ce66" inactive-color="#ff4949" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="订单实付金额每满" label-width="250px" prop="returnShopIntegral"> |
| | | <el-input style="width: 250px;margin: 0px 20px" type="number" v-model="form.returnShopIntegral" placeholder="请输入" v-trim> |
| | | <template slot="append">元返经销商1积分</template> |
| | | </el-input> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>提醒:实付金额去除运费</p> |
| | | <el-form-item label="" label-width="1px" prop="deductIntegralLimit"> |
| | | <el-input style="width: 200px;margin: 0px 20px" type="number" v-model="form.deductIntegralLimit" placeholder="请输入" v-trim> |
| | | </el-input>积分抵扣1元 |
| | | </el-form-item> |
| | | </div> |
| | | <div class="header"> |
| | | <span style="font-size: 15px; font-weight: bold">【4】合计优惠承担比例</span> |
| | | <span style="font-size: 15px; font-weight: bold">【2】积分使用门槛</span> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="总部承担" label-width="150px" prop="totalRate"> |
| | | <el-input style="width: 200px;margin: 0px 20px" type="number" v-model="form.totalRate" placeholder="请输入" v-trim> |
| | | <template slot="append">%</template> |
| | | </el-input> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>提醒:设置总部和经销商在订单合计优惠金额中(优惠券+积分抵扣)各自承担的比例</p> |
| | | <el-form-item label="积分满" label-width="150px" prop="minIntegralPriceLimit"> |
| | | <el-input style="width: 150px;margin: 0px 20px" type="number" v-model="form.minIntegralPriceLimit" placeholder="请输入" v-trim> |
| | | <template slot="append">元</template> |
| | | </el-input>可用 |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="积分失效规则" label-width="150px" prop="integralInvalidType"> |
| | | <el-radio-group v-model="form.integralInvalidType"> |
| | | <el-radio :label="0">长期有效</el-radio> |
| | | <el-radio :label="1">按积分产生时间失效</el-radio> |
| | | </el-radio-group> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>说明:积分按月销毁,根据积分生成时间,设置销毁周期(单位:年),如销毁周期设置1年,去年9月份产生的积分,到今年10月1号00:00时全部统一销毁;</p> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="积分失效规则" label-width="150px" prop="integralInvalidCircle"> |
| | | <el-input style="width: 200px;margin: 0px 20px" type="number" v-model="form.integralInvalidCircle" placeholder="请输入" v-trim> |
| | | <template slot="append">年</template> </el-input> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>说明:配置后根据会员积分生成时间的周期清空,单位:年</p> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="header"> |
| | | <span style="font-size: 15px; font-weight: bold">【3】积分规则说明</span> |
| | | </div> |
| | | <div class="item-content"> |
| | | <el-form-item label="" label-width="1px" prop="integralRuleInfo"> |
| | | <RichEditor :richData="form.integralRuleInfo" :styleEditor="styleEditor" @getWangedditor="getWangedditor" :readonly="false"/> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item style="margin-top: 100px;width: 100%;text-align: center"> |
| | |
| | | |
| | | <script> |
| | | import { getPlatformConfig, updPlatformConfig } from '@/api/system/dictData' |
| | | import {allList} from '@/api/business/coupon' |
| | | import RichEditor from '@/components/common/RichEditor' |
| | | export default { |
| | | name: '', |
| | | components: { RichEditor }, |
| | | data () { |
| | | return { |
| | | uploadData: { |
| | | folder: '' |
| | | }, |
| | | styleEditor: 'border: 1px solid #ccc;display: inline-block;height:400px;', |
| | | isUploading: false, |
| | | working: false, |
| | | couponList: [], |
| | | form: { |
| | | regIntegralRewardStatus: 0, |
| | | shareIntegralRewardStatus: 0, |
| | | regCouponRewardStatus: 0, |
| | | shareCouponRewardStatus: 0, |
| | | regIntegralReward: 0, |
| | | shareIntegralReward: 0, |
| | | regCouponRewardList: [], |
| | | shareCouponRewardList: [], |
| | | returnMemberIntegralStatus: 0, |
| | | returnShopIntegralStatus: 0, |
| | | returnMemberIntegral: 0, |
| | | returnShopIntegral: 0, |
| | | totalRate: 0 |
| | | dictCode:'INTEGRAL_SET', |
| | | integralRuleInfo: null, |
| | | integralInvalidCircle: 0, |
| | | integralInvalidType: 0, |
| | | minIntegralPriceLimit: 0, |
| | | deductIntegralLimit: 0 |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | this.getCouponList() |
| | | this.getData() |
| | | }, |
| | | |
| | | methods: { |
| | | getCouponList () { |
| | | allList({}) |
| | | .then(res => { |
| | | if (res) { |
| | | this.couponList = res || [] |
| | | } |
| | | }) |
| | | }, |
| | | delCoupon(type,index){ |
| | | if(type ===0){ |
| | | this.form.regCouponRewardList.splice(index,1) |
| | | }else if(type ===1){ |
| | | this.form.shareCouponRewardList.splice(index,1) |
| | | } |
| | | }, |
| | | addCoupon(type){ |
| | | if(type ===0){ |
| | | this.form.regCouponRewardList.push({couponId:null,num:null}) |
| | | }else if(type ===1){ |
| | | this.form.shareCouponRewardList.push({couponId:null,num:null}) |
| | | } |
| | | |
| | | }, |
| | | getData () { |
| | | getPlatformConfig({}) |
| | | .then(res => { |
| | | if (res) { |
| | | this.form = { |
| | | regIntegralRewardStatus: res.regIntegralRewardStatus || 0, |
| | | shareIntegralRewardStatus: res.shareIntegralRewardStatus || 0, |
| | | regCouponRewardStatus: res.regCouponRewardStatus || 0, |
| | | shareCouponRewardStatus: res.shareCouponRewardStatus || 0, |
| | | regIntegralReward: res.regIntegralReward || 0, |
| | | shareIntegralReward: res.shareIntegralReward || 0, |
| | | regCouponRewardList: res.regCouponRewardList || [], |
| | | shareCouponRewardList: res.shareCouponRewardList || [], |
| | | returnMemberIntegralStatus: res.returnMemberIntegralStatus || 0, |
| | | returnShopIntegralStatus: res.returnShopIntegralStatus || 0, |
| | | returnMemberIntegral: res.returnMemberIntegral || 0, |
| | | returnShopIntegral: res.returnShopIntegral || 0, |
| | | totalRate: res.totalRate || 0 |
| | | dictCode: 'INTEGRAL_SET', |
| | | integralRuleInfo: res.integralRuleInfo || null, |
| | | integralInvalidCircle: res.integralInvalidCircle || 0, |
| | | integralInvalidType: res.integralInvalidType || 0, |
| | | minIntegralPriceLimit: res.minIntegralPriceLimit || 0, |
| | | deductIntegralLimit: res.deductIntegralLimit || 0 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | getWangedditor (val) { |
| | | this.form.integralRuleInfo = val |
| | | }, |
| | | submit () { |
| | | console.log(this.form) |
| | |
| | | width: 100%; |
| | | } |
| | | .header{ |
| | | margin: 20px 0 20px 0;padding:10px;background-color: rgba(140,147,157,0.61); |
| | | margin: 20px 0 20px 0;padding:10px;background-color: #E0DEDE; |
| | | } |
| | | /deep/ .el-main{ |
| | | width: 100%; |
| | |
| | | } |
| | | .box { |
| | | width: 100%; |
| | | padding: 30px; |
| | | padding: 0 30px; |
| | | box-sizing: border-box; |
| | | background: #ffffff; |
| | | } |