chuangte_bike_newxcx/page_shanghu/gongzuotai/ChargingDetail.vue

1121 lines
27 KiB
Vue
Raw Permalink Normal View History

2025-04-01 21:35:30 +08:00
<template>
<view class="page">
2025-12-20 14:29:10 +08:00
<u-navbar title="收费模版编辑" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' back-icon-color="#000"
height='44'></u-navbar>
<view class="content">
<!-- 基本信息卡片 -->
<view class="form-card">
<view class="card-title">基本信息</view>
<view class="form-item">
<view class="label">套餐名称</view>
<input type="text" v-model="data.name" placeholder="请输入套餐名称" class="input" placeholder-style="color:#C7CDD3">
2025-04-01 21:35:30 +08:00
</view>
2025-12-20 14:29:10 +08:00
<view class="form-item">
<view class="label">说明内容</view>
<input type="text" v-model="data.instructions" placeholder="请输入说明内容" class="input" placeholder-style="color:#C7CDD3">
2025-04-01 21:35:30 +08:00
</view>
2025-12-20 14:29:10 +08:00
<view class="form-item">
<view class="label">显示顺序</view>
<input type="number" v-model="data.orderNum" placeholder="请输入显示顺序" class="input" placeholder-style="color:#C7CDD3">
2025-04-01 21:35:30 +08:00
</view>
2025-12-20 14:29:10 +08:00
<view class="tips">数字越小越靠前</view>
</view>
2025-04-01 21:35:30 +08:00
2025-12-20 14:29:10 +08:00
<!-- 收费设置卡片 -->
<view class="form-card">
<view class="card-title">收费设置</view>
<view class="form-item">
<view class="label">租赁单位</view>
<view class="radio-group">
<view class="radio-tag"
v-for="(item, index) in timeList"
:key="index"
:class="{active: timevalue === item.name}"
@click="radioGroupChange(item.name)">
{{item.name}}
</view>
2025-04-27 17:37:23 +08:00
</view>
2025-04-01 21:35:30 +08:00
</view>
2025-12-20 14:29:10 +08:00
<view class="form-item">
<view class="label">计费方式</view>
<view class="radio-group">
<view class="radio-tag"
:class="{active: data.ridingRule == 1}"
@click="chargeTypeChange(1)">
普通计费
2025-04-27 17:37:23 +08:00
</view>
2025-12-20 14:29:10 +08:00
<view class="radio-tag"
:class="{active: data.ridingRule == 2}"
@click="chargeTypeChange(2)">
区间计费
2025-04-27 17:37:23 +08:00
</view>
</view>
2025-04-01 21:35:30 +08:00
</view>
2025-12-20 14:29:10 +08:00
<!-- 普通计费模式 -->
<template v-if="data.ridingRule == 1">
<view class="rule-box normal-rule">
<view class="rule-row">
<text class="rule-label">起步价</text>
<view class="input-wrap">
<input type="digit" inputmode="decimal" v-model="startingPrice" class="input-mini">
<text class="unit"></text>
2025-04-27 17:37:23 +08:00
</view>
2025-12-20 14:29:10 +08:00
<text class="connect"></text>
<view class="input-wrap">
<input type="number" v-model="startingTime" class="input-mini">
<text class="unit">{{timevalue}}</text>
</view>
</view>
<view class="divider"></view>
<view class="rule-row">
<text class="rule-label">超出价</text>
<view class="input-wrap">
<input type="digit" inputmode="decimal" v-model="timeoutPrice" class="input-mini">
<text class="unit"></text>
2025-04-27 17:37:23 +08:00
</view>
2025-12-20 14:29:10 +08:00
<text class="connect">/</text>
<view class="input-wrap">
<input type="number" v-model="timeoutTime" class="input-mini">
<text class="unit">{{timevalue}}</text>
2025-04-27 17:37:23 +08:00
</view>
</view>
2025-04-10 08:57:21 +08:00
</view>
2025-12-20 14:29:10 +08:00
</template>
<!-- 区间计费模式 -->
<template v-if="data.ridingRule == 2">
<view class="interval-list">
<view class="interval-item" v-for="(item, index) in intervalRule" :key="index">
<view class="interval-header">
<text class="interval-name">区间 {{index + 1}}</text>
<view class="delete-btn" v-if="index > 0 && index < intervalRule.length - 1" @click="deleteRule(index)">
<u-icon name="trash" color="#FF4D4F" size="28"></u-icon>
</view>
</view>
<view class="interval-body">
<view class="rule-row">
<text class="rule-label">时长范围</text>
<view class="range-inputs">
<text class="static-val">{{index === 0 ? 0 : intervalRule[index-1].end}}</text>
<text class="separator">-</text>
<block v-if="index === intervalRule.length - 1">
<text class="static-val">不限</text>
</block>
<block v-else>
<input type="number" v-model="item.end" class="input-mini" placeholder="结束时长" @blur="handleEndChange(index)">
</block>
<text class="unit">{{timevalue}}</text>
</view>
</view>
<view class="rule-row">
<text class="rule-label">收费标准</text>
<view class="price-inputs">
<text></text>
<input type="number" v-model="item.eachUnit" class="input-mini">
<text>{{timevalue}}</text>
<input type="digit" inputmode="decimal" v-model="item.fee" class="input-mini">
<text></text>
</view>
</view>
</view>
2025-04-10 08:57:21 +08:00
</view>
2025-12-20 14:29:10 +08:00
<view class="add-btn" v-if="intervalRule.length < 5" @click="addRule">
<u-icon name="plus" color="#4C97E7" size="28"></u-icon>
<text>添加区间</text>
</view>
2025-04-01 21:35:30 +08:00
</view>
2025-12-20 14:29:10 +08:00
</template>
<view class="form-item mt-20">
<view class="label">押金金额</view>
<view class="input-group">
<input type="digit" inputmode="decimal" v-model="data.depositAmount" placeholder="0.00" class="input text-right">
<text class="suffix"></text>
</view>
</view>
2025-04-01 21:35:30 +08:00
</view>
2025-12-20 14:29:10 +08:00
<!-- 其他设置卡片 -->
<view class="form-card">
<view class="card-title">其他设置</view>
<view class="form-item">
<view class="label">免费骑行</view>
<view class="input-group">
<input type="number" v-model="data.freeRideTime" placeholder="0" class="input text-right">
<text class="suffix">分钟</text>
2025-04-01 21:35:30 +08:00
</view>
2025-12-20 14:29:10 +08:00
</view>
<view class="tips">前xx分钟内归还车辆不收取费用</view>
<view class="divider margin-tb"></view>
<view class="switch-item">
<view class="switch-info">
<view class="label">用户押金抵扣</view>
<view class="desc">允许用户在订单结束后使用押金抵扣费用</view>
</view>
<u-switch v-model="data.depositDeduction" @change="toggleUseLimits" active-color="#4C97E7" size="40"></u-switch>
</view>
2025-12-26 16:56:36 +08:00
<template>
2025-12-20 14:29:10 +08:00
<view class="divider margin-tb"></view>
<view class="switch-item">
<view class="switch-info">
<view class="label">自动押金抵扣</view>
<view class="desc">订单结束后自动使用押金抵扣欠款</view>
</view>
<u-switch v-model="data.autoDeduct" @change="toggleUseLimitss" active-color="#4C97E7" size="40"></u-switch>
2025-04-01 21:35:30 +08:00
</view>
2025-12-20 14:29:10 +08:00
<view class="form-item bg-gray" v-if="data.autoDeduct">
<view class="label">自动抵扣延迟</view>
<view class="input-group">
<input type="number" v-model="data.deductDelay" placeholder="0" class="input text-right">
<text class="suffix">小时</text>
2025-04-01 21:35:30 +08:00
</view>
</view>
2025-12-20 14:29:10 +08:00
<view class="tips" v-if="data.autoDeduct">设置0将立即抵扣</view>
</template>
<view class="divider margin-tb"></view>
<view class="switch-item">
<view class="switch-info">
<view class="label">超时结束订单</view>
2025-12-26 16:56:36 +08:00
<view class="desc">超出可用时长后自动结束订单</view>
2025-12-20 14:29:10 +08:00
</view>
<u-switch v-model="data.timeoutFinish" @change="toggleUseLimitsss" active-color="#4C97E7" size="40"></u-switch>
2025-04-28 15:40:26 +08:00
</view>
2026-03-13 13:59:36 +08:00
<view class="divider margin-tb"></view>
<view class="switch-item">
<view class="switch-info">
<view class="label">信用免押</view>
<view class="desc">开启后支持芝麻信用免押骑行将收取相应手续费</view>
</view>
<u-switch v-model="data.undepositEnabled" active-color="#4C97E7" size="40"></u-switch>
</view>
2025-04-28 15:40:26 +08:00
</view>
2025-12-20 14:29:10 +08:00
<!-- 车型选择卡片 -->
<view class="form-card">
2026-01-28 18:00:39 +08:00
<view class="card-title" @click="showpart = true" style="display: flex;justify-content: space-between;">
<text>应用车型</text>
<u-icon name="arrow-right" color="#999" size="28"></u-icon>
</view>
<!-- <view class="car-select">
2025-12-20 14:29:10 +08:00
<view class="select-value">
<text v-if="!lists.suitIds || !lists.suitIds.length" class="placeholder">请选择</text>
</view>
2026-01-28 18:00:39 +08:00
</view> -->
2025-12-20 14:29:10 +08:00
<view class="tag-container" v-if="lists.suitIds && lists.suitIds.length">
<view class="car-tag" v-for="id in lists.suitIds" :key="id">
2025-10-25 15:52:11 +08:00
{{ getAccessoryNameById(id) }}
2025-12-20 14:29:10 +08:00
<view class="close-icon" @click.stop="removeSuitId(id)">×</view>
2025-04-28 15:40:26 +08:00
</view>
</view>
</view>
2025-12-20 14:29:10 +08:00
<view style="height: 180rpx;"></view>
2025-04-28 15:40:26 +08:00
</view>
2025-12-20 14:29:10 +08:00
<!-- 底部按钮 -->
<view class="footer-btns">
<view class="btn cancel" @click="backpage()">取消</view>
<view class="btn confirm" @click="sub">保存</view>
2025-04-28 15:40:26 +08:00
</view>
2025-12-20 14:29:10 +08:00
<!-- 车型选择弹窗 -->
<u-popup v-model="showpart" mode="bottom" border-radius="24">
<view class="popup-container">
<view class="popup-header">
<text class="popup-title">选择车型</text>
<u-icon name="close" color="#999" size="28" @click="closepart"></u-icon>
2025-04-28 15:40:26 +08:00
</view>
2025-12-20 14:29:10 +08:00
<scroll-view class="popup-content" scroll-y>
<view class="model-list">
<view class="model-item"
v-for="(item, index) in Accessorylist"
:key="index"
:class="{active: lists.suitIds.includes(item.id)}"
2025-04-28 15:40:26 +08:00
@click="chooseAcc(item.id)">
2025-12-20 14:29:10 +08:00
<text>{{ item.name }}</text>
<u-icon v-if="lists.suitIds.includes(item.id)" name="checkmark-circle-fill" color="#4C97E7" size="36"></u-icon>
2025-04-28 15:40:26 +08:00
</view>
</view>
</scroll-view>
2025-12-20 14:29:10 +08:00
<view class="popup-footer">
<view class="full-btn" @click="subacc">确定</view>
2025-04-01 21:35:30 +08:00
</view>
</view>
2025-12-20 14:29:10 +08:00
</u-popup>
2025-04-01 21:35:30 +08:00
</view>
</template>
<script>
export default {
data() {
return {
2025-04-28 15:40:26 +08:00
lists: {
model: "",
fullVoltage: "",
lowVoltage: "",
fullEndurance: "",
suitIds: [],
lowBatteryReminder: '20',
lowBatteryReminderSwitch: false
},
showpart: false,
2025-04-01 21:35:30 +08:00
bgc: {
2025-12-20 14:29:10 +08:00
backgroundColor: "#F7F7F7",
2025-04-01 21:35:30 +08:00
},
showpart: false,
list: [],
Accessorylist: [],
chooseIdxArr: [], // 存储选中的索引
2025-04-27 17:37:23 +08:00
timevalue: '分钟',
2025-04-01 21:35:30 +08:00
timeList: [{
2025-04-27 17:37:23 +08:00
name: '分钟',
2025-04-01 21:35:30 +08:00
disabled: false
},
{
2025-04-27 17:37:23 +08:00
name: '小时',
2025-04-01 21:35:30 +08:00
disabled: false
},
2025-04-23 17:50:42 +08:00
{
2025-04-27 17:37:23 +08:00
name: '天',
2025-04-23 17:50:42 +08:00
disabled: false
},
2025-04-01 21:35:30 +08:00
],
startingPrice: "",
startingTime: '',
timeoutPrice: '',
timeoutTime: '',
data: {
name: '',
instructions: '',
2025-04-28 15:40:26 +08:00
orderNum:'',
2025-04-01 21:35:30 +08:00
status: "0",
autoRefundDeposit: '0',
orderExceedMinutes: '',
orderExceedWarn: '',
freeRideTime: '5',
rentalUnit: 'minutes',
ridingRule: '1',
chargingCycle: '1',
chargingCycleValue: '24',
depositAmount: '200',
timeoutTime: '',
startingTime: '',
orderNum:0,
userId:'',
2025-04-28 15:40:26 +08:00
startRule:{},
2025-06-06 11:32:12 +08:00
modellds:[],
2026-03-13 13:59:36 +08:00
depositDeduction:false,
autoDeduct:false,
depositAmount:'',
undepositEnabled:false,
areaId:''
},
2025-04-01 21:35:30 +08:00
ruleId: '',
2025-04-27 17:37:23 +08:00
userinfo: {},
intervalRule: [
{
start: 0,
end: '',
fee: '',
eachUnit: '10'
},
{
start: '',
end: '',
2025-12-20 14:29:10 +08:00
fee: '',
2025-04-27 17:37:23 +08:00
eachUnit: '10'
},
{
start: '',
end: null,
fee: '',
eachUnit: '10'
}
]
2025-04-01 21:35:30 +08:00
}
},
onLoad(e) {
2025-12-20 14:29:10 +08:00
this.data.areaId = uni.getStorageSync('adminAreaid')
2025-04-01 21:35:30 +08:00
if (e.ruleId) {
this.ruleId = e.ruleId
this.getFeeInfo()
}
2025-12-20 14:29:10 +08:00
this.getinfo()
this.getAccessorylist()
2025-04-01 21:35:30 +08:00
},
onShow() {
2025-12-20 14:29:10 +08:00
2025-04-01 21:35:30 +08:00
},
methods: {
2025-10-25 15:52:11 +08:00
getAccessoryNameById(id) {
const item = this.Accessorylist.find(accessory => accessory.id == id)
return item ? item.name : ''
},
removeSuitId(id) {
const index = this.lists.suitIds.indexOf(id)
if (index > -1) {
this.lists.suitIds.splice(index, 1)
}
},
2025-06-06 11:32:12 +08:00
toggleUseLimits(e) {
2025-12-20 14:29:10 +08:00
this.data.depositDeduction = e;
},
toggleUseLimitss(e) {
this.data.autoDeduct = e;
},
toggleUseLimitsss(e) {
if(e == true){
let that = this
uni.showModal({
title: '安全警告!',
content: '开启后,订单超时将自动结束订单并锁车存在安全隐患,是否继续开启!',
showCancel: true,
success: function (res) {
if (res.confirm) {
that.data.timeoutFinish = e
} else if (res.cancel) {
that.data.timeoutFinish = false
}
}
})
}else{
this.data.timeoutFinish = e
}
2025-06-06 11:32:12 +08:00
},
2025-04-28 15:40:26 +08:00
closepart() {
this.showpart = false
},
subacc() {
this.showpart = false
console.log(this.chooseIdxArr)
},
chooseAcc(id) {
const index = this.lists.suitIds.indexOf(id)
if (index > -1) {
// 如果 id 已经存在于 suitIds 中,则从数组中删除
this.lists.suitIds.splice(index, 1)
} else {
// 如果 id 不存在,则添加到 suitIds 中
this.lists.suitIds.push(id)
}
},
getAccessoryNames(accessoryIds) {
const accessoryNames = this.lists.suitIds.map(id => {
const item = this.Accessorylist.find(accessory => accessory.id == id)
return item ? item.name : ''
})
// 过滤掉空值并返回数组
return accessoryNames.filter(name => name)
},
getAccessorylist() {
2025-12-20 14:29:10 +08:00
this.$u.get(`/bst/model/list?pageNum=1&pageSize=999&areaId=${this.data.areaId}`).then((res) => {
2025-04-28 15:40:26 +08:00
if (res.code == 200) {
this.Accessorylist = res.rows
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1000
})
}
})
},
2025-12-20 14:29:10 +08:00
// 查询个人信息
2025-04-01 21:35:30 +08:00
getinfo() {
this.$u.get("/getInfo").then((res) => {
if (res.code == 200) {
this.userinfo = res.user
this.data.userId = this.userinfo.userId
}
})
},
getFeeInfo() {
this.$u.get(`/bst/suit/${this.ruleId}`).then((res) => {
if (res.code == 200) {
this.data = res.data;
2025-04-28 15:40:26 +08:00
this.lists.suitIds = res.data.modelIds
console.log(this.lists);
2025-04-01 21:35:30 +08:00
if (this.data.rentalUnit == 'minutes') {
2025-04-27 17:37:23 +08:00
this.timevalue='分钟'
2025-04-01 21:35:30 +08:00
} else if (this.data.rentalUnit == 'hours') {
2025-04-27 17:37:23 +08:00
this.timevalue='小时'
2025-04-01 21:35:30 +08:00
} else if (this.data.rentalUnit == 'day') {
2025-04-27 17:37:23 +08:00
this.timevalue='天'
2025-04-01 21:35:30 +08:00
}
if (this.data.area) {
this.returnVerify = this.data.area.returnVerify;
}
2025-04-27 17:37:23 +08:00
2025-04-01 21:35:30 +08:00
if (this.data.ridingRule == 1) {
2025-04-27 17:37:23 +08:00
if (this.data.startRule) {
this.timeoutTime = this.data.startRule.timeoutTime || '';
this.startingPrice = this.data.startRule.startingPrice || '';
this.startingTime = this.data.startRule.startingTime || '';
this.timeoutPrice = this.data.startRule.timeoutPrice || '';
}
} else if (this.data.ridingRule == 2) {
if (this.data.intervalRule && Array.isArray(this.data.intervalRule)) {
this.intervalRule = JSON.parse(JSON.stringify(this.data.intervalRule));
this.more = this.data.intervalRule[this.data.intervalRule.length - 1];
} else {
this.intervalRule = [
{
start: 0,
end: '',
fee: '',
eachUnit: '10'
},
{
start: '',
end: '',
fee: '',
eachUnit: '10'
},
{
start: '',
end: null,
fee: '',
eachUnit: '10'
}
];
}
2025-04-01 21:35:30 +08:00
}
2025-04-27 17:37:23 +08:00
console.log('处理后的数据:', {
data: this.data,
intervalRule: this.intervalRule,
more: this.more
});
2025-04-01 21:35:30 +08:00
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1000
})
}
})
},
backpage() {
uni.navigateBack()
},
// 选中任一radio时由radio-group触发
radioGroupChange(e) {
2025-12-20 14:29:10 +08:00
this.timevalue = e;
2025-04-27 17:37:23 +08:00
if (e == '分钟') {
2025-04-01 21:35:30 +08:00
this.data.rentalUnit = 'minutes'
2025-04-27 17:37:23 +08:00
} else if(e == '小时'){
2025-04-01 21:35:30 +08:00
this.data.rentalUnit = 'hours'
2025-04-23 17:50:42 +08:00
}else {
this.data.rentalUnit = 'day'
2025-04-01 21:35:30 +08:00
}
},
2025-04-27 17:37:23 +08:00
chargeTypeChange(value) {
this.data.ridingRule = value;
if(value === 2) {
this.intervalRule = [
{
start: 0,
end: '',
fee: '',
eachUnit: '10'
},
{
start: '',
end: '',
fee: '',
eachUnit: '10'
},
{
start: '',
end: null,
fee: '',
eachUnit: '10'
}
];
}
},
handleEndChange(index) {
if(index < this.intervalRule.length - 1) {
this.intervalRule[index + 1].start = this.intervalRule[index].end;
}
},
addRule() {
// 移除最后一个元素
const lastRule = this.intervalRule.pop();
// 添加新规则
this.intervalRule.push({
start: this.intervalRule[this.intervalRule.length - 1].end,
end: '',
fee: '',
eachUnit: '10'
});
// 添加回最后一个不限的规则
this.intervalRule.push(lastRule);
},
deleteRule(index) {
if(index === 0 || index === this.intervalRule.length - 1) return;
this.intervalRule.splice(index, 1);
// 更新后续区间的起始值
for(let i = index; i < this.intervalRule.length - 1; i++) {
this.intervalRule[i].start = this.intervalRule[i-1].end;
}
},
2025-04-01 21:35:30 +08:00
sub() {
2025-04-28 15:40:26 +08:00
console.log(this.lists.suitIds,'000');
2025-04-01 21:35:30 +08:00
let data = {
...this.data,
2025-04-28 15:40:26 +08:00
type: 1,
modelIds:this.lists.suitIds
2025-04-01 21:35:30 +08:00
}
2025-04-28 15:40:26 +08:00
console.log(data,'111');
2025-04-01 21:35:30 +08:00
if (this.data.ridingRule == 2) {
2025-04-27 17:37:23 +08:00
// 区间计费时直接使用intervalRule字段
data.intervalRule = this.intervalRule.map((item, index) => ({
start: index === 0 ? 0 : Number(item.start),
end: index === this.intervalRule.length - 1 ? null : Number(item.end),
fee: Number(item.fee),
eachUnit: Number(item.eachUnit)
2025-12-20 14:29:10 +08:00
}))
2025-04-27 17:37:23 +08:00
// 删除startRule字段
delete data.startRule;
2025-04-01 21:35:30 +08:00
} else {
2025-04-27 17:37:23 +08:00
// 普通计费使用startRule
2026-01-17 17:33:26 +08:00
if(this.timeoutPrice == '' || this.timeoutPrice == 0){
uni.showToast({
title: '超出价不能为空或者0元',
icon: 'none',
duration: 5000
})
return
}
2025-04-27 17:37:23 +08:00
data.startRule = {
timeoutTime: this.timeoutTime,
startingPrice: this.startingPrice,
startingTime: this.startingTime,
timeoutPrice: this.timeoutPrice
}
2025-04-01 21:35:30 +08:00
}
console.log(data, 'mmmmmmmmmmmmm')
if (this.ruleId != '') {
this.$u.put(`/bst/suit`, data).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '修改成功',
icon: 'success',
duration: 1000
})
setTimeout(() => {
uni.navigateBack()
}, 1100)
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
} else {
this.$u.post(`/bst/suit`, data).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '添加成功',
icon: 'success',
duration: 1000
})
setTimeout(() => {
uni.navigateBack()
}, 1100)
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
}
}
}
}
</script>
2025-12-20 14:29:10 +08:00
<style lang="scss" scoped>
2025-04-10 08:57:21 +08:00
page {
2025-12-20 14:29:10 +08:00
background-color: #F7F7F7;
2025-04-10 08:57:21 +08:00
}
2025-12-20 14:29:10 +08:00
.page {
min-height: 100vh;
2025-04-28 15:40:26 +08:00
}
2025-12-20 14:29:10 +08:00
.content {
padding: 20rpx 30rpx;
2025-04-28 15:40:26 +08:00
}
2025-12-20 14:29:10 +08:00
.form-card {
background: #FFFFFF;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03);
.card-title {
font-size: 32rpx;
2025-04-28 15:40:26 +08:00
font-weight: 600;
2025-12-20 14:29:10 +08:00
color: #333;
margin-bottom: 30rpx;
padding-left: 16rpx;
border-left: 8rpx solid #4C97E7;
line-height: 1;
2025-04-28 15:40:26 +08:00
}
2025-12-20 14:29:10 +08:00
.form-item {
2025-04-28 15:40:26 +08:00
display: flex;
2025-12-20 14:29:10 +08:00
justify-content: space-between;
2025-04-28 15:40:26 +08:00
align-items: center;
2025-12-20 14:29:10 +08:00
margin-bottom: 24rpx;
.label {
font-size: 28rpx;
color: #333;
font-weight: 500;
2025-04-28 15:40:26 +08:00
}
2025-12-20 14:29:10 +08:00
.input {
flex: 1;
text-align: right;
font-size: 28rpx;
color: #333;
// 新增样式
height: 72rpx;
background-color: #F5F7FA;
border: 1rpx solid #E4E7ED;
border-radius: 8rpx;
padding: 0 24rpx;
margin-left: 20rpx;
&.text-right {
text-align: right;
}
&:focus {
background-color: #fff;
border-color: #4C97E7;
}
}
.radio-group {
2025-04-28 15:40:26 +08:00
display: flex;
2025-12-20 14:29:10 +08:00
gap: 20rpx;
.radio-tag {
padding: 10rpx 24rpx;
background: #F5F7FA;
border-radius: 30rpx;
2025-04-28 15:40:26 +08:00
font-size: 26rpx;
2025-12-20 14:29:10 +08:00
color: #666;
border: 1rpx solid transparent;
&.active {
background: #EBF4FF;
color: #4C97E7;
border-color: #4C97E7;
font-weight: 500;
2025-10-25 15:52:11 +08:00
}
2025-04-28 15:40:26 +08:00
}
}
2025-12-20 14:29:10 +08:00
.input-group {
2025-04-28 15:40:26 +08:00
display: flex;
align-items: center;
2025-12-20 14:29:10 +08:00
height: 72rpx;
background-color: #F5F7FA;
border: 1rpx solid #E4E7ED;
border-radius: 8rpx;
padding: 0 24rpx;
margin-left: 20rpx;
flex: 1;
max-width: 300rpx;
justify-content: flex-end;
&:focus-within {
background-color: #fff;
border-color: #4C97E7;
2025-04-28 15:40:26 +08:00
}
2025-12-20 14:29:10 +08:00
2025-04-28 15:40:26 +08:00
.input {
2025-12-20 14:29:10 +08:00
background-color: transparent;
border: none;
padding: 0;
margin-left: 0;
height: 100%;
2025-04-28 15:40:26 +08:00
}
2025-12-20 14:29:10 +08:00
.suffix {
margin-left: 10rpx;
font-size: 28rpx;
color: #333;
2025-04-28 15:40:26 +08:00
}
}
2025-12-20 14:29:10 +08:00
&.mt-20 {
margin-top: 20rpx;
}
&.bg-gray {
background: #F8F9FB;
padding: 20rpx;
border-radius: 12rpx;
margin-top: 20rpx;
.input-group {
background-color: #fff;
}
}
2025-04-28 15:40:26 +08:00
}
2025-12-20 14:29:10 +08:00
.tips {
font-size: 24rpx;
color: #999;
line-height: 1.4;
margin-top: -10rpx;
margin-bottom: 20rpx;
2025-04-10 08:57:21 +08:00
}
2025-12-20 14:29:10 +08:00
.rule-box {
background: #F8F9FB;
border-radius: 12rpx;
padding: 24rpx;
2025-04-10 08:57:21 +08:00
2025-12-20 14:29:10 +08:00
&.normal-rule {
.rule-row {
2025-04-10 08:57:21 +08:00
display: flex;
align-items: center;
2025-12-20 14:29:10 +08:00
justify-content: space-between;
.rule-label {
font-size: 28rpx;
2025-04-10 08:57:21 +08:00
color: #333;
font-weight: 500;
2025-12-20 14:29:10 +08:00
}
2025-04-10 08:57:21 +08:00
2025-12-20 14:29:10 +08:00
.input-wrap {
display: flex;
align-items: center;
background: #fff;
border-radius: 8rpx;
padding: 6rpx 12rpx;
border: 1rpx solid #e0e0e0;
.input-mini {
width: 100rpx;
text-align: center;
font-size: 28rpx;
}
.unit {
font-size: 24rpx;
color: #999;
margin-left: 6rpx;
}
}
.connect {
color: #999;
font-size: 24rpx;
margin: 0 10rpx;
}
}
.divider {
height: 1rpx;
background: #e0e0e0;
margin: 20rpx 0;
}
2025-04-10 08:57:21 +08:00
}
}
2025-12-20 14:29:10 +08:00
.interval-list {
.interval-item {
background: #F8F9FB;
border-radius: 12rpx;
padding: 20rpx;
margin-bottom: 20rpx;
.interval-header {
2025-04-10 08:57:21 +08:00
display: flex;
2025-12-20 14:29:10 +08:00
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
2025-04-10 08:57:21 +08:00
2025-12-20 14:29:10 +08:00
.interval-name {
2025-04-10 08:57:21 +08:00
font-size: 28rpx;
2025-12-20 14:29:10 +08:00
font-weight: 600;
color: #333;
}
}
.interval-body {
.rule-row {
display: flex;
align-items: center;
margin-bottom: 16rpx;
2025-04-10 08:57:21 +08:00
2025-12-20 14:29:10 +08:00
&:last-child {
margin-bottom: 0;
}
.rule-label {
width: 120rpx;
font-size: 26rpx;
color: #666;
2025-04-10 08:57:21 +08:00
}
2025-12-20 14:29:10 +08:00
.range-inputs, .price-inputs {
flex: 1;
2025-04-10 08:57:21 +08:00
display: flex;
align-items: center;
2025-12-20 14:29:10 +08:00
font-size: 26rpx;
2025-04-10 08:57:21 +08:00
color: #333;
2025-12-20 14:29:10 +08:00
.input-mini {
background: #fff;
width: 100rpx;
height: 50rpx;
2025-04-10 08:57:21 +08:00
border-radius: 8rpx;
text-align: center;
2025-12-20 14:29:10 +08:00
border: 1rpx solid #e0e0e0;
2025-10-25 15:52:11 +08:00
margin: 0 10rpx;
2025-12-20 14:29:10 +08:00
font-size: 26rpx;
2025-04-10 08:57:21 +08:00
}
2025-12-20 14:29:10 +08:00
.separator {
margin: 0 10rpx;
2025-04-10 08:57:21 +08:00
color: #999;
2025-12-20 14:29:10 +08:00
}
.unit {
margin-left: 10rpx;
color: #666;
}
.static-val {
padding: 0 10rpx;
font-weight: 500;
}
2025-04-10 08:57:21 +08:00
}
}
}
}
2025-12-20 14:29:10 +08:00
.add-btn {
2025-04-10 08:57:21 +08:00
display: flex;
justify-content: center;
2025-12-20 14:29:10 +08:00
align-items: center;
padding: 20rpx;
border: 1rpx dashed #4C97E7;
border-radius: 12rpx;
background: #EBF4FF;
text {
color: #4C97E7;
font-size: 28rpx;
margin-left: 10rpx;
}
}
2025-04-10 08:57:21 +08:00
}
2025-12-20 14:29:10 +08:00
.switch-item {
display: flex;
justify-content: space-between;
align-items: center;
.switch-info {
.label {
font-size: 30rpx;
color: #333;
font-weight: 500;
margin-bottom: 6rpx;
2025-04-10 08:57:21 +08:00
}
2025-12-20 14:29:10 +08:00
.desc {
font-size: 24rpx;
color: #999;
}
}
}
2025-04-27 17:37:23 +08:00
2025-12-20 14:29:10 +08:00
.car-select {
2025-04-27 17:37:23 +08:00
display: flex;
justify-content: space-between;
align-items: center;
2025-12-20 14:29:10 +08:00
padding: 20rpx 0;
2025-04-27 17:37:23 +08:00
2025-12-20 14:29:10 +08:00
.select-label {
2025-04-27 17:37:23 +08:00
font-size: 28rpx;
2025-12-20 14:29:10 +08:00
color: #333;
2025-04-27 17:37:23 +08:00
}
2025-12-20 14:29:10 +08:00
.select-value {
2025-04-27 17:37:23 +08:00
display: flex;
align-items: center;
2025-12-20 14:29:10 +08:00
.placeholder {
color: #999;
font-size: 28rpx;
margin-right: 10rpx;
2025-04-27 17:37:23 +08:00
}
}
2025-12-20 14:29:10 +08:00
}
.tag-container {
display: flex;
flex-wrap: wrap;
gap: 16rpx;
margin-top: 10rpx;
2025-04-27 17:37:23 +08:00
2025-12-20 14:29:10 +08:00
.car-tag {
background: #EBF4FF;
color: #4C97E7;
font-size: 24rpx;
padding: 8rpx 20rpx;
border-radius: 30rpx;
display: flex;
align-items: center;
.close-icon {
margin-left: 10rpx;
font-size: 28rpx;
line-height: 1;
2025-04-27 17:37:23 +08:00
}
}
}
2025-12-20 14:29:10 +08:00
.divider {
height: 1rpx;
background: #F0F0F0;
width: 100%;
&.margin-tb {
margin: 24rpx 0;
}
}
2025-04-27 17:37:23 +08:00
}
2025-12-20 14:29:10 +08:00
.footer-btns {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #fff;
padding: 20rpx 30rpx;
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.05);
2025-04-27 17:37:23 +08:00
display: flex;
2025-12-20 14:29:10 +08:00
justify-content: space-between;
z-index: 100;
2025-04-27 17:37:23 +08:00
2025-12-20 14:29:10 +08:00
.btn {
width: 48%;
height: 88rpx;
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: 500;
&.cancel {
background: #F5F7FA;
color: #666;
}
&.confirm {
background: #4C97E7;
color: #fff;
box-shadow: 0 4rpx 12rpx rgba(76, 151, 231, 0.3);
}
&:active {
opacity: 0.9;
}
2025-04-27 17:37:23 +08:00
}
2025-12-20 14:29:10 +08:00
}
.popup-container {
background: #fff;
.popup-header {
padding: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #F0F0F0;
.popup-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
}
.popup-content {
height: 600rpx;
.model-list {
padding: 20rpx;
.model-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx 30rpx;
border-radius: 12rpx;
margin-bottom: 16rpx;
background: #F8F9FB;
&.active {
background: #EBF4FF;
color: #4C97E7;
font-weight: 500;
}
}
}
}
.popup-footer {
padding: 20rpx 30rpx;
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
border-top: 1rpx solid #F0F0F0;
.full-btn {
width: 100%;
height: 88rpx;
background: #4C97E7;
color: #fff;
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: 600;
}
}
}
</style>