|
|
@@ -0,0 +1,754 @@
|
|
|
+<!--
|
|
|
+ 分销规则设置页
|
|
|
+ 用途:hdApp 应用-门店设置-分销规则,读写 xhDistributionRule / Tier / Scope
|
|
|
+ 说明:本期分红时长固定不限、参与商品固定全部,对应界面隐藏
|
|
|
+-->
|
|
|
+<template>
|
|
|
+ <view class="dist-rule-page app-content">
|
|
|
+ <scroll-view scroll-y class="rule-scroll">
|
|
|
+ <!-- 分销开关 + 发放时间 -->
|
|
|
+ <view class="section-card">
|
|
|
+ <view class="switch-row">
|
|
|
+ <view class="switch-main">
|
|
|
+ <text class="switch-title">分销功能</text>
|
|
|
+ <text class="switch-desc">开启后,订单可按设置规则计算分销佣金</text>
|
|
|
+ </view>
|
|
|
+ <switch :checked="form.status == 1" color="#09C567" @change="onStatusChange" />
|
|
|
+ </view>
|
|
|
+ <view class="settle-row">
|
|
|
+ <text class="settle-label">佣金发放时间</text>
|
|
|
+ <view class="settle-input-wrap">
|
|
|
+ <text class="settle-text">订单完成后第</text>
|
|
|
+ <input
|
|
|
+ v-model="form.settleDays"
|
|
|
+ type="number"
|
|
|
+ class="settle-input"
|
|
|
+ placeholder="0"
|
|
|
+ @focus="clearInputOnFocus('settleDays')"
|
|
|
+ />
|
|
|
+ <text class="settle-text">天</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 分红方式 -->
|
|
|
+ <view class="section-card">
|
|
|
+ <view class="bonus-header">
|
|
|
+ <text class="bonus-header-title">分红方式</text>
|
|
|
+ <view class="tab-switch">
|
|
|
+ <view
|
|
|
+ class="tab-item"
|
|
|
+ :class="{ 'tab-item--active': form.bonusType == 1 }"
|
|
|
+ @click="switchBonusType(1)"
|
|
|
+ >
|
|
|
+ 固定比例
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ class="tab-item"
|
|
|
+ :class="{ 'tab-item--active': form.bonusType == 2 }"
|
|
|
+ @click="switchBonusType(2)"
|
|
|
+ >
|
|
|
+ 按时间递减
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 固定比例 -->
|
|
|
+ <block v-if="form.bonusType == 1">
|
|
|
+ <view class="form-line">
|
|
|
+ <text class="form-line-label">佣金比例</text>
|
|
|
+ <view class="form-line-input">
|
|
|
+ <input
|
|
|
+ v-model="form.bonusRate"
|
|
|
+ type="digit"
|
|
|
+ class="form-input"
|
|
|
+ placeholder="请输入佣金比例"
|
|
|
+ @focus="clearInputOnFocus('bonusRate')"
|
|
|
+ />
|
|
|
+ <text class="form-input-suffix">%</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+
|
|
|
+ <!-- 按时间递减 -->
|
|
|
+ <block v-else>
|
|
|
+ <view class="form-line form-line--readonly">
|
|
|
+ <text class="form-line-label">计时起点</text>
|
|
|
+ <view class="form-line-value">
|
|
|
+ <text>{{ timeStartLabel }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="tier-section-head">
|
|
|
+ <text class="tier-section-title">佣金阶梯</text>
|
|
|
+ <text class="tier-tip">按绑定后的下单时间匹配佣金比例</text>
|
|
|
+ </view>
|
|
|
+ <view class="tier-list">
|
|
|
+ <view v-for="(tier, index) in form.tiers" :key="index" class="tier-item">
|
|
|
+ <text class="tier-name">第{{ index + 1 }}阶梯</text>
|
|
|
+ <view class="tier-content">
|
|
|
+ <view class="tier-row">
|
|
|
+ <text class="tier-text">绑定后</text>
|
|
|
+ <input
|
|
|
+ v-model="tier.minDays"
|
|
|
+ type="number"
|
|
|
+ class="tier-input"
|
|
|
+ :disabled="index === 0"
|
|
|
+ @focus="clearTierInputOnFocus(tier, 'minDays')"
|
|
|
+ />
|
|
|
+ <!-- 最后一阶:X 天以上 -->
|
|
|
+ <block v-if="index === form.tiers.length - 1">
|
|
|
+ <text class="tier-text">天以上,佣金比例</text>
|
|
|
+ </block>
|
|
|
+ <!-- 中间阶梯:X 至 Y 天 -->
|
|
|
+ <block v-else>
|
|
|
+ <text class="tier-text">至</text>
|
|
|
+ <input
|
|
|
+ v-model="tier.maxDays"
|
|
|
+ type="number"
|
|
|
+ class="tier-input"
|
|
|
+ placeholder="天数"
|
|
|
+ @focus="clearTierInputOnFocus(tier, 'maxDays')"
|
|
|
+ @blur="onTierMaxDaysBlur(index)"
|
|
|
+ />
|
|
|
+ <text class="tier-text">天,佣金比例</text>
|
|
|
+ </block>
|
|
|
+ <input
|
|
|
+ v-model="tier.bonusRate"
|
|
|
+ type="digit"
|
|
|
+ class="tier-input tier-input--rate"
|
|
|
+ @focus="clearTierInputOnFocus(tier, 'bonusRate')"
|
|
|
+ />
|
|
|
+ <text class="tier-text">%</text>
|
|
|
+ </view>
|
|
|
+ <text
|
|
|
+ v-if="canRemoveTier(index)"
|
|
|
+ class="tier-del iconfont iconshanchu"
|
|
|
+ @click="removeTier(index)"
|
|
|
+ ></text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="tier-add" @click="addTier">
|
|
|
+ <text class="tier-add-icon">+</text>
|
|
|
+ <text class="tier-add-text">添加时间阶梯</text>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 规则说明 -->
|
|
|
+ <view class="rule-tip-box">
|
|
|
+ <view class="rule-tip-head">
|
|
|
+ <text class="rule-tip-icon">💡</text>
|
|
|
+ <text class="rule-tip-title">规则说明</text>
|
|
|
+ </view>
|
|
|
+ <text class="rule-tip-line">1. 佣金比例为顾客实际支付金额(不含运费)的百分比,如购买商品实际支付金额100元,设置佣金比例为5%,发放佣金为5元。</text>
|
|
|
+ <text class="rule-tip-line">2. 时间区间不可重叠或留空。</text>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+
|
|
|
+ <view class="footer-btn-wrap">
|
|
|
+ <button class="admin-button-com big blue footer-save-btn" @click="submitSave">保存提交</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getDistributionRule, saveDistributionRule } from '@/api/distribution'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'distributionRule',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ loading: false,
|
|
|
+ form: {
|
|
|
+ id: 0,
|
|
|
+ status: 0,
|
|
|
+ settleDays: 5,
|
|
|
+ bonusType: 1,
|
|
|
+ bonusRate: '',
|
|
|
+ durationType: 1,
|
|
|
+ durationDays: '',
|
|
|
+ timeStartType: 1,
|
|
|
+ tiers: []
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ timeStartLabel() {
|
|
|
+ return this.form.timeStartType == 1 ? '客户绑定分销员时间' : '计时起点'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this.loadRule()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 拉取规则配置 */
|
|
|
+ loadRule() {
|
|
|
+ this.loading = true
|
|
|
+ getDistributionRule().then((res) => {
|
|
|
+ if (res.code == 1 && res.data) {
|
|
|
+ this.applyRuleData(res.data)
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ applyRuleData(data) {
|
|
|
+ this.form = {
|
|
|
+ id: data.id || 0,
|
|
|
+ status: Number(data.status) || 0,
|
|
|
+ settleDays: data.settleDays != null ? String(data.settleDays) : '5',
|
|
|
+ bonusType: Number(data.bonusType) || 1,
|
|
|
+ bonusRate: data.bonusRate != null && Number(data.bonusRate) > 0 ? String(data.bonusRate) : '',
|
|
|
+ // 本期隐藏分红时长,固定不限
|
|
|
+ durationType: 1,
|
|
|
+ durationDays: '',
|
|
|
+ timeStartType: Number(data.timeStartType) || 1,
|
|
|
+ tiers: this.normalizeTiers(data.tiers)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ normalizeTiers(tiers) {
|
|
|
+ let list = []
|
|
|
+ if (Array.isArray(tiers) && tiers.length) {
|
|
|
+ list = tiers.map((item) => ({
|
|
|
+ minDays: item.minDays != null ? String(item.minDays) : '0',
|
|
|
+ maxDays: item.maxDays != null ? String(item.maxDays) : '0',
|
|
|
+ bonusRate: item.bonusRate != null ? String(item.bonusRate) : ''
|
|
|
+ }))
|
|
|
+ } else {
|
|
|
+ list = [
|
|
|
+ { minDays: '0', maxDays: '30', bonusRate: '10' },
|
|
|
+ { minDays: '31', maxDays: '60', bonusRate: '5' },
|
|
|
+ { minDays: '61', maxDays: '0', bonusRate: '2' }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ // 最后一阶固定为「及以上」
|
|
|
+ if (list.length) {
|
|
|
+ list[list.length - 1].maxDays = '0'
|
|
|
+ }
|
|
|
+ return list
|
|
|
+ },
|
|
|
+ onStatusChange(e) {
|
|
|
+ this.form.status = e.detail.value ? 1 : 0
|
|
|
+ },
|
|
|
+ switchBonusType(type) {
|
|
|
+ this.form.bonusType = type
|
|
|
+ if (type == 2 && (!this.form.tiers || !this.form.tiers.length)) {
|
|
|
+ this.form.tiers = this.normalizeTiers([])
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 中间阶梯可删,首尾不可删 */
|
|
|
+ canRemoveTier(index) {
|
|
|
+ const len = this.form.tiers.length
|
|
|
+ return len > 2 && index > 0 && index < len - 1
|
|
|
+ },
|
|
|
+ /** 新阶梯插入最后一阶之前 */
|
|
|
+ addTier() {
|
|
|
+ const errMsg = this.validateTiersRequired()
|
|
|
+ if (errMsg) {
|
|
|
+ this.$msg(errMsg)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const tiers = this.form.tiers
|
|
|
+ if (!tiers.length) {
|
|
|
+ this.form.tiers = this.normalizeTiers([])
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (tiers.length < 2) {
|
|
|
+ this.form.tiers = this.normalizeTiers([])
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const insertIndex = tiers.length - 1
|
|
|
+ const prevTier = tiers[insertIndex - 1]
|
|
|
+ let nextMin = 0
|
|
|
+ if (prevTier.maxDays !== '' && Number(prevTier.maxDays) >= 0) {
|
|
|
+ nextMin = Number(prevTier.maxDays) + 1
|
|
|
+ }
|
|
|
+ tiers.splice(insertIndex, 0, {
|
|
|
+ minDays: String(nextMin),
|
|
|
+ maxDays: '',
|
|
|
+ bonusRate: ''
|
|
|
+ })
|
|
|
+ this.syncLastTierMinDays()
|
|
|
+ },
|
|
|
+ removeTier(index) {
|
|
|
+ if (!this.canRemoveTier(index)) return
|
|
|
+ this.form.tiers.splice(index, 1)
|
|
|
+ this.syncLastTierMinDays()
|
|
|
+ },
|
|
|
+ /** 倒数第二阶结束天数变更后,同步最后一阶起始天 */
|
|
|
+ onTierMaxDaysBlur(index) {
|
|
|
+ if (index === this.form.tiers.length - 2) {
|
|
|
+ this.syncLastTierMinDays()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ syncLastTierMinDays() {
|
|
|
+ const tiers = this.form.tiers
|
|
|
+ if (tiers.length < 2) return
|
|
|
+ const lastTier = tiers[tiers.length - 1]
|
|
|
+ const prevTier = tiers[tiers.length - 2]
|
|
|
+ lastTier.maxDays = '0'
|
|
|
+ if (prevTier.maxDays !== '' && Number(prevTier.maxDays) > 0) {
|
|
|
+ lastTier.minDays = String(Number(prevTier.maxDays) + 1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ clearInputOnFocus(field) {
|
|
|
+ if (this.form[field] === '0' || this.form[field] === 0) {
|
|
|
+ this.form[field] = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ clearTierInputOnFocus(tier, field) {
|
|
|
+ if (tier[field] === '0' || tier[field] === 0) {
|
|
|
+ tier[field] = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ buildPayload() {
|
|
|
+ return {
|
|
|
+ id: this.form.id,
|
|
|
+ status: Number(this.form.status) || 0,
|
|
|
+ settleDays: Number(this.form.settleDays) || 0,
|
|
|
+ bonusType: Number(this.form.bonusType) || 1,
|
|
|
+ bonusRate: Number(this.form.bonusRate) || 0,
|
|
|
+ // 本期隐藏分红时长,固定不限
|
|
|
+ durationType: 1,
|
|
|
+ durationDays: 0,
|
|
|
+ timeStartType: Number(this.form.timeStartType) || 1,
|
|
|
+ // 本期固定全部商品
|
|
|
+ productScope: 1,
|
|
|
+ goodsIds: [],
|
|
|
+ categoryIds: [],
|
|
|
+ tiers: (this.form.tiers || []).map((item, index) => ({
|
|
|
+ minDays: Number(item.minDays) || 0,
|
|
|
+ maxDays: item.maxDays === '' ? 0 : Number(item.maxDays),
|
|
|
+ bonusRate: Number(item.bonusRate) || 0,
|
|
|
+ sort: index
|
|
|
+ }))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 校验佣金阶梯:天数、比例必填 */
|
|
|
+ validateTiersRequired() {
|
|
|
+ const tiers = this.form.tiers || []
|
|
|
+ if (!tiers.length) {
|
|
|
+ return '请至少添加一个佣金阶梯'
|
|
|
+ }
|
|
|
+ for (let i = 0; i < tiers.length; i++) {
|
|
|
+ const tier = tiers[i]
|
|
|
+ const tierNo = i + 1
|
|
|
+ const isLast = i === tiers.length - 1
|
|
|
+ if (tier.minDays === '' || tier.minDays == null) {
|
|
|
+ return `请填写第${tierNo}阶梯的天数`
|
|
|
+ }
|
|
|
+ if (!isLast) {
|
|
|
+ if (tier.maxDays === '' || tier.maxDays == null) {
|
|
|
+ return `请填写第${tierNo}阶梯的结束天数`
|
|
|
+ }
|
|
|
+ if (Number(tier.maxDays) < Number(tier.minDays)) {
|
|
|
+ return `第${tierNo}阶梯结束天数不能小于起始天数`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (tier.bonusRate === '' || tier.bonusRate == null) {
|
|
|
+ return `请填写第${tierNo}阶梯的佣金比例`
|
|
|
+ }
|
|
|
+ const rate = Number(tier.bonusRate)
|
|
|
+ if (rate <= 0 || rate > 100) {
|
|
|
+ return `请填写第${tierNo}阶梯正确的佣金比例(0-100)`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ },
|
|
|
+ /** 提交前校验 */
|
|
|
+ validateForm() {
|
|
|
+ if (Number(this.form.bonusType) === 1) {
|
|
|
+ if (this.form.bonusRate === '' || this.form.bonusRate == null) {
|
|
|
+ return '请填写佣金比例'
|
|
|
+ }
|
|
|
+ const rate = Number(this.form.bonusRate)
|
|
|
+ if (rate <= 0 || rate > 100) {
|
|
|
+ return '请填写正确的佣金比例(0-100)'
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ return this.validateTiersRequired()
|
|
|
+ },
|
|
|
+ submitSave() {
|
|
|
+ if (this.loading) return
|
|
|
+ const errMsg = this.validateForm()
|
|
|
+ if (errMsg) {
|
|
|
+ this.$msg(errMsg)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$util.confirmModal({ content: '确认保存分销规则?' }, () => {
|
|
|
+ saveDistributionRule(this.buildPayload()).then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.$msg(res.msg || '保存成功')
|
|
|
+ this.loadRule()
|
|
|
+ } else if (res.msg) {
|
|
|
+ this.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.dist-rule-page {
|
|
|
+ min-height: 100vh;
|
|
|
+ background: #f5f6f7;
|
|
|
+ padding-bottom: 160upx;
|
|
|
+}
|
|
|
+
|
|
|
+.rule-scroll {
|
|
|
+ height: calc(100vh - 140upx);
|
|
|
+ padding: 20upx 24upx 24upx;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.section-card {
|
|
|
+ background: #ffffff;
|
|
|
+ border-radius: 16upx;
|
|
|
+ padding: 28upx 24upx;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+}
|
|
|
+
|
|
|
+.switch-row {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: flex-start;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.switch-main {
|
|
|
+ flex: 1;
|
|
|
+ padding-right: 24upx;
|
|
|
+}
|
|
|
+
|
|
|
+.switch-title {
|
|
|
+ display: block;
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #1a1a1a;
|
|
|
+ line-height: 1.4;
|
|
|
+}
|
|
|
+
|
|
|
+.switch-desc {
|
|
|
+ display: block;
|
|
|
+ margin-top: 10upx;
|
|
|
+ font-size: 24upx;
|
|
|
+ color: #999999;
|
|
|
+ line-height: 1.5;
|
|
|
+}
|
|
|
+
|
|
|
+.settle-row {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-top: 28upx;
|
|
|
+ padding-top: 24upx;
|
|
|
+ border-top: 1upx solid #f0f2f1;
|
|
|
+}
|
|
|
+
|
|
|
+.settle-label {
|
|
|
+ flex-shrink: 0;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #333333;
|
|
|
+}
|
|
|
+
|
|
|
+.settle-input-wrap {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 16upx;
|
|
|
+}
|
|
|
+
|
|
|
+.settle-text {
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #333333;
|
|
|
+}
|
|
|
+
|
|
|
+.settle-input {
|
|
|
+ width: 88upx;
|
|
|
+ height: 56upx;
|
|
|
+ margin: 0 12upx;
|
|
|
+ padding: 0 8upx;
|
|
|
+ text-align: center;
|
|
|
+ background: #f5f7f6;
|
|
|
+ border-radius: 8upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #333333;
|
|
|
+}
|
|
|
+
|
|
|
+/* 分红方式:标题与 Tab 同行 */
|
|
|
+.bonus-header {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-bottom: 28upx;
|
|
|
+}
|
|
|
+
|
|
|
+.bonus-header-title {
|
|
|
+ font-size: 30upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #1a1a1a;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-right: 16upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tab-switch {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ background: #f5f7f6;
|
|
|
+ border-radius: 10upx;
|
|
|
+ padding: 6upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tab-item {
|
|
|
+ min-width: 168upx;
|
|
|
+ padding: 16upx 28upx;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #666666;
|
|
|
+ border-radius: 8upx;
|
|
|
+ line-height: 1.2;
|
|
|
+
|
|
|
+ &--active {
|
|
|
+ background: #09c567;
|
|
|
+ color: #ffffff;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.form-line {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 24upx;
|
|
|
+
|
|
|
+ &--top {
|
|
|
+ align-items: flex-start;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:first-of-type {
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.form-line-label {
|
|
|
+ width: 160upx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #333333;
|
|
|
+ line-height: 72upx;
|
|
|
+}
|
|
|
+
|
|
|
+.form-line-input {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.form-input {
|
|
|
+ flex: 1;
|
|
|
+ height: 72upx;
|
|
|
+ padding: 0 20upx;
|
|
|
+ background: #f5f7f6;
|
|
|
+ border-radius: 8upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #333333;
|
|
|
+}
|
|
|
+
|
|
|
+.form-input-suffix {
|
|
|
+ margin-left: 12upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #333333;
|
|
|
+}
|
|
|
+
|
|
|
+.form-line-value {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #666666;
|
|
|
+}
|
|
|
+
|
|
|
+.form-line--readonly .form-line-value {
|
|
|
+ color: #333333;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-section-head {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-top: 24upx;
|
|
|
+ padding-top: 24upx;
|
|
|
+ margin-bottom: 16upx;
|
|
|
+ border-top: 1upx solid #f0f2f1;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-section-title {
|
|
|
+ flex-shrink: 0;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333333;
|
|
|
+ line-height: 1.4;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-tip {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 24upx;
|
|
|
+ color: #999999;
|
|
|
+ line-height: 1.5;
|
|
|
+ text-align: right;
|
|
|
+ margin-left: 16upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-list {
|
|
|
+ margin-top: 8upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-item {
|
|
|
+ padding: 20upx 0;
|
|
|
+ border-bottom: 1upx solid #f0f2f1;
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.tier-name {
|
|
|
+ display: block;
|
|
|
+ font-size: 26upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333333;
|
|
|
+ margin-bottom: 12upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-content {
|
|
|
+ position: relative;
|
|
|
+ padding-right: 56upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-row {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-text {
|
|
|
+ font-size: 26upx;
|
|
|
+ color: #333333;
|
|
|
+ margin: 6upx 4upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-input {
|
|
|
+ width: 88upx;
|
|
|
+ height: 56upx;
|
|
|
+ margin: 6upx 4upx;
|
|
|
+ padding: 0 8upx;
|
|
|
+ text-align: center;
|
|
|
+ background: #f5f7f6;
|
|
|
+ border-radius: 8upx;
|
|
|
+ font-size: 26upx;
|
|
|
+
|
|
|
+ &--rate {
|
|
|
+ width: 96upx;
|
|
|
+ }
|
|
|
+
|
|
|
+ &[disabled] {
|
|
|
+ color: #999999;
|
|
|
+ background: #fafafa;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.tier-del {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ font-size: 36upx;
|
|
|
+ color: #ff4d6d;
|
|
|
+ padding: 8upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-add {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin-top: 20upx;
|
|
|
+ padding: 20upx 0;
|
|
|
+ border: 2upx dashed #09c567;
|
|
|
+ border-radius: 12upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-add-icon {
|
|
|
+ font-size: 36upx;
|
|
|
+ color: #09c567;
|
|
|
+ margin-right: 8upx;
|
|
|
+}
|
|
|
+
|
|
|
+.tier-add-text {
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #09c567;
|
|
|
+}
|
|
|
+
|
|
|
+.rule-tip-box {
|
|
|
+ background: #fff5f5;
|
|
|
+ border-radius: 16upx;
|
|
|
+ padding: 24upx;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+}
|
|
|
+
|
|
|
+.rule-tip-head {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 12upx;
|
|
|
+}
|
|
|
+
|
|
|
+.rule-tip-icon {
|
|
|
+ font-size: 28upx;
|
|
|
+ margin-right: 8upx;
|
|
|
+}
|
|
|
+
|
|
|
+.rule-tip-title {
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #ff4d6d;
|
|
|
+}
|
|
|
+
|
|
|
+.rule-tip-line {
|
|
|
+ display: block;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: $fontPinkColor;
|
|
|
+ line-height: 1.7;
|
|
|
+ margin-top: 8upx;
|
|
|
+}
|
|
|
+
|
|
|
+.footer-btn-wrap {
|
|
|
+ position: fixed;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ padding: 20upx 24upx;
|
|
|
+ padding-bottom: calc(20upx + constant(safe-area-inset-bottom));
|
|
|
+ padding-bottom: calc(20upx + env(safe-area-inset-bottom));
|
|
|
+ background: #ffffff;
|
|
|
+ box-shadow: 0 -2upx 12upx rgba(0, 0, 0, 0.06);
|
|
|
+}
|
|
|
+
|
|
|
+.footer-save-btn {
|
|
|
+ width: 100%;
|
|
|
+ border: none;
|
|
|
+}
|
|
|
+</style>
|