| | |
| | | <h3 class="section-title">优惠券发放规则</h3> |
| | | <div class="form-item"> |
| | | <span class="label">下单数量每满</span> |
| | | <el-input-number v-model="form.orderCouponOrderCount" :min="0" controls-position="right"></el-input-number> |
| | | <el-input-number v-model="form.orderCouponOrderCount" :min="1" controls-position="right"></el-input-number> |
| | | <span class="label">单,至多</span> |
| | | <el-input-number v-model="form.orderCouponGiftCount" :min="0" controls-position="right"></el-input-number> |
| | | <el-input-number v-model="form.orderCouponGiftCount" :min="1" controls-position="right"></el-input-number> |
| | | <span class="label">次,平台赠送优惠券 </span> |
| | | <el-select v-model="form.orderCouponId" multiple style="width: 130px;" placeholder="优惠券"> |
| | | <el-select v-model="form.orderCouponId" style="width: 130px;" placeholder="优惠券"> |
| | | <el-option v-for="item in couponList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | <span class="label"><span class="red">(以行李已寄存门店为准,即便退单亦不收回,默认每次发放1张)</span></span> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span class="label">会员注册每满</span> |
| | | <el-input-number v-model="form.registerCouponYears" :min="0" controls-position="right"></el-input-number> |
| | | <el-input-number v-model="form.registerCouponYears" :min="1" controls-position="right"></el-input-number> |
| | | <span class="label">年,至多</span> |
| | | <el-input-number v-model="form.registerCouponGiftCount" :min="0" controls-position="right"></el-input-number> |
| | | <el-input-number v-model="form.registerCouponGiftCount" :min="1" controls-position="right"></el-input-number> |
| | | <span class="label">次,平台赠送优惠券 </span> |
| | | <el-select v-model="form.registerCouponId" multiple style="width: 130px;" placeholder="优惠券"> |
| | | <el-select v-model="form.registerCouponId" style="width: 130px;" placeholder="优惠券"> |
| | | <el-option v-for="item in couponList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | <span class="label"><span class="red">(按注册时间,无论会员是否下单;默认每次发放1张)</span></span> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span class="label">新注册会员送平台赠送优惠券</span> |
| | | <el-select v-model="form.registerGiftCouponIds" multiple style="width: 130px;" placeholder="优惠券"> |
| | | <el-select v-model="form.registerGiftCouponId" style="width: 130px;" placeholder="优惠券"> |
| | | <el-option v-for="item in couponList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="section"> |
| | | <h3 class="section-title">开票规则</h3> |
| | | <div class="form-item"> |
| | | <span class="label">超时</span> |
| | | <el-input-number v-model="form.invoiceMonthLimit" :min="1" controls-position="right"></el-input-number> |
| | | <span class="label">个月的订单不允许开发票</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="section"> |
| | | <h3 class="section-title">司机奖励规则</h3> |
| | | <div class="table-container"> |
| | | <el-table :data="driverRewardList" border style="width: 100%"> |
| | | <el-table-column prop="registerRewardAmount" label="注册奖励(元/单)"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.registerRewardAmount" :min="1" controls-position="right"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="registerRewardOrderCount" label="注册奖励单数"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.registerRewardOrderCount" :min="1" controls-position="right"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="platformRewardAmount" label="平台奖励(元/单)"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.platformRewardAmount" :min="1" controls-position="right"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="platformRewardOrderCount" label="平台奖励单数"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.platformRewardOrderCount" :min="1" controls-position="right"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | data () { |
| | | return { |
| | | contentHeight: 600, |
| | | driverRewardList: [], |
| | | form: { |
| | | autoCancelTime: '', |
| | | autoConfirmReceipt: '', |
| | | driverDailyCancelLimit: '', |
| | | autoCancelTime: '', |
| | | autoConfirmReceipt: '', |
| | | registerRewardAmount: 0, |
| | | registerRewardOrderCount: 0, |
| | | platformRewardAmount: 0, |
| | | platformRewardOrderCount: 0, |
| | | driverDailyCancelLimit: '', |
| | | insuranceRate: '', |
| | | orderAcceptLimit: '', |
| | | noGrabNotifyUsers: '', |
| | |
| | | orderCouponGiftCount: '', |
| | | registerCouponYears: '', |
| | | registerCouponGiftCount: '', |
| | | orderCouponId: [], |
| | | registerCouponId: [], |
| | | registerGiftCouponIds: [] |
| | | orderCouponId: null, |
| | | registerCouponId: null, |
| | | registerGiftCouponIds: null, |
| | | invoiceMonthLimit: '' |
| | | }, |
| | | couponList: [], |
| | | userIds: [], |
| | |
| | | orderCouponGiftCount: res.orderCouponGiftCount || '', |
| | | registerCouponYears: res.registerCouponYears || '', |
| | | registerCouponGiftCount: res.registerCouponGiftCount || '', |
| | | orderCouponId: res.orderCouponId ? res.orderCouponId.split(',').map(item => Number(item)) : [], |
| | | registerCouponId: res.registerCouponId ? res.registerCouponId.split(',').map(item => Number(item)) : [], |
| | | registerGiftCouponIds: res.registerGiftCouponIds ? res.registerGiftCouponIds.split(',').map(item => Number(item)) : [] |
| | | orderCouponId: res.orderCouponId ? Number(res.orderCouponId) : null, |
| | | registerCouponId: res.registerCouponId ? Number(res.registerCouponId) : null, |
| | | registerGiftCouponIds: res.registerGiftCouponIds ? Number(res.registerGiftCouponIds) : '', |
| | | registerRewardAmount: res.registerRewardAmount || 0, |
| | | registerRewardOrderCount: res.registerRewardOrderCount || 0, |
| | | platformRewardAmount: res.platformRewardAmount || 0, |
| | | platformRewardOrderCount: res.platformRewardOrderCount || 0, |
| | | invoiceMonthLimit: res.invoiceMonthLimit || '' |
| | | } |
| | | // 初始化司机奖励规则表格数据 |
| | | this.driverRewardList = [{ |
| | | registerRewardAmount: this.form.registerRewardAmount || 0, |
| | | registerRewardOrderCount: this.form.registerRewardOrderCount || 0, |
| | | platformRewardAmount: this.form.platformRewardAmount || 0, |
| | | platformRewardOrderCount: this.form.platformRewardOrderCount || 0 |
| | | }] |
| | | if (this.form.noGrabNotifyUsers) { |
| | | this.userIds = this.form.noGrabNotifyUsers.split(',') |
| | | } |
| | |
| | | submitForm.noGrabNotifyUsers = '' |
| | | if (this.userIds) { |
| | | submitForm.noGrabNotifyUsers = this.userIds.join(',') |
| | | } |
| | | submitForm.orderCouponId = submitForm.orderCouponId.join(',') |
| | | submitForm.registerCouponId = submitForm.registerCouponId.join(',') |
| | | submitForm.registerGiftCouponIds = submitForm.registerGiftCouponIds.join(',') |
| | | } |
| | | // 同步司机奖励表格数据到表单 |
| | | if (this.driverRewardList.length > 0) { |
| | | const rewardData = this.driverRewardList[0] |
| | | submitForm.registerRewardAmount = rewardData.registerRewardAmount |
| | | submitForm.registerRewardOrderCount = rewardData.registerRewardOrderCount |
| | | submitForm.platformRewardAmount = rewardData.platformRewardAmount |
| | | submitForm.platformRewardOrderCount = rewardData.platformRewardOrderCount |
| | | } |
| | | if (submitForm.orderCouponId) { |
| | | submitForm.orderCouponId = String(submitForm.orderCouponId) |
| | | } |
| | | if (submitForm.registerCouponId) { |
| | | submitForm.registerCouponId = String(submitForm.registerCouponId) |
| | | } |
| | | // if (submitForm.registerGiftCouponIds) { |
| | | // submitForm.registerGiftCouponIds = submitForm.registerGiftCouponIds |
| | | // } |
| | | saveParams(submitForm).then(res => { |
| | | this.$tip.apiSuccess(res || '保存成功') |
| | | }).catch(e => { |