Commit 975cc7e5 by 岑成威

fix:样式调整

1 parent 1456080e
......@@ -220,18 +220,6 @@ Page({
type: 'input',
maxlength: 36
},
{
key: 'returnSummary',
label: '回单摘要',
required: false,
fullWidth: false,
switchKey: 'returnSummarySwitch',
remarkKey: 'returnSummaryRemark',
targetKey: 'returnSummarySwitch',
placeholder: '请输入回单摘要',
type: 'switchInput',
maxlength: 35
}
],
formFields3: [
{
......@@ -1121,13 +1109,11 @@ Page({
return
}
}
for (const field of formFields2) {
if (field.type === 'switchInput' && Number(formData[field.switchKey]) === 1) {
const remark = (formData[field.remarkKey] || '').trim()
if (!remark) {
wx.$util.showToast(`请填写${field.label}`)
return
}
if (Number(formData.returnSummarySwitch) === 1) {
const remark = (formData.returnSummaryRemark || '').trim()
if (!remark) {
wx.$util.showToast('请填写回单摘要')
return
}
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/
......
......@@ -201,13 +201,8 @@ page {
margin-right: 8rpx;
}
}
&.switch-input-row {
&.switch-only-row {
flex-shrink: 0;
gap: 24rpx;
.switch-input-field {
width: 320rpx;
text-align: right;
}
}
}
.form-textarea {
......@@ -223,6 +218,36 @@ page {
}
}
}
.return-summary {
padding: 28rpx 32rpx;
.return-summary-row {
width: 100%;
}
.return-summary-label {
color: #292D33;
.requiredLabel {
margin-left: 8rpx;
color: #F24724;
font-weight: 400;
}
}
.return-summary-input-wrap {
margin-top: 16rpx;
}
.return-summary-input-box {
width: 100%;
background: #f4f5f7;
border-radius: 16rpx;
padding: 24rpx;
box-sizing: border-box;
}
.return-summary-input {
width: 100%;
text-align: left;
height: 40rpx;
line-height: 40rpx;
}
}
.upload-container {
.form-item {
background: #ffffff;
......@@ -382,6 +407,10 @@ page {
box-sizing: border-box;
font-size: 28rpx;
color: #292D33;
.break-word {
word-break: break-all;
white-space: normal;
}
.mb-24 {
margin-bottom: 24rpx;
}
......
......@@ -197,31 +197,9 @@
<view class="form-item flex align-center justify-between">
<view class="form-label">
{{item.label}}
<text wx:if="{{item.type === 'switchInput' ? formData[item.switchKey] == 1 : item.required}}" class="requiredLabel">*</text>
</view>
<view wx:if="{{item.type === 'switchInput'}}" class="form-value switch-input-row flex align-center">
<van-switch
checked="{{formData[item.switchKey]}}"
active-value="{{1}}"
inactive-value="{{0}}"
active-color="#347BFF"
inactive-color="#D0D2D6"
size="24px"
bind:change="handleReturnSummarySwitchChange"
data-switch-key="{{item.switchKey}}"
/>
<input
wx:if="{{formData[item.switchKey] == 1}}"
value="{{formData[item.remarkKey]}}"
placeholder="{{item.placeholder || '请输入'}}"
placeholder-class="placeholder"
maxlength="{{item.maxlength}}"
bindinput="handleInput"
data-field="{{item.remarkKey}}"
class="form-input switch-input-field"
/>
<text wx:if="{{item.required}}" class="requiredLabel">*</text>
</view>
<view wx:else class="form-value">
<view class="form-value">
<input value="{{formData[item.key]}}"
placeholder="{{item.placeholder || '请输入'}}"
placeholder-class="placeholder"
......@@ -288,6 +266,40 @@
</view>
</view>
</view>
<view class="box-radio" style="padding: 32rpx 0;">
<!-- 回单摘要 -->
<view class="return-summary">
<view class="return-summary-row flex align-center justify-between">
<view class="return-summary-label">
回单摘要
<text wx:if="{{formData.returnSummarySwitch == 1}}" class="requiredLabel">*</text>
</view>
<van-switch
checked="{{formData.returnSummarySwitch}}"
active-value="{{1}}"
inactive-value="{{0}}"
active-color="#347BFF"
inactive-color="#D0D2D6"
size="24px"
bind:change="handleReturnSummarySwitchChange"
data-switch-key="returnSummarySwitch"
/>
</view>
<view wx:if="{{formData.returnSummarySwitch == 1}}" class="return-summary-input-wrap">
<view class="return-summary-input-box">
<input
value="{{formData.returnSummaryRemark}}"
placeholder="请输入回单摘要"
placeholder-class="placeholder"
maxlength="35"
bindinput="handleInput"
data-field="returnSummaryRemark"
class="return-summary-input"
/>
</view>
</view>
</view>
</view>
<view class="box-radio" style="padding: 0;">
<!-- 随车材料 -->
<view class="upload-container">
......@@ -491,7 +503,7 @@
</view>
<view class="flex align-center mb-24">
<view class="title-label-see">回单摘要</view>
<view>{{ formData.returnSummaryRemark || '-' }}</view>
<view class="flex-1 break-word">{{ formData.returnSummaryRemark || '-' }}</view>
</view>
<view class="flex {{formData.payerBankCardUrl ? 'mb-24' : ''}}" wx:if="{{formData.payerIdCardFrontUrl || formData.payerIdCardBackUrl}}">
<view class="title-label-see">身份证</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!