You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
163 lines
4.9 KiB
163 lines
4.9 KiB
<view class="xqbox">
|
|
|
|
<!-- 表单内容 -->
|
|
<scroll-view class="page-content" scroll-y>
|
|
<form bindsubmit="submitForm">
|
|
|
|
<!-- 宠物类型 -->
|
|
<view class="form-section">
|
|
<view class="section-header">
|
|
<view class="section-title">
|
|
<text>牲畜类型</text>
|
|
</view>
|
|
<text class="section-required">必填</text>
|
|
</view>
|
|
<input
|
|
class="form-input"
|
|
name="petType"
|
|
placeholder="请输入牲畜品种(如:山羊、奶牛)"
|
|
value="{{formData.petType}}"
|
|
bindinput="onPetTypeInput"
|
|
maxlength="20"
|
|
/>
|
|
</view>
|
|
|
|
<!-- 宠物信息 -->
|
|
<view class="form-section">
|
|
<view class="section-header">
|
|
<view class="section-title">
|
|
<text>宠物信息</text>
|
|
</view>
|
|
<text class="section-required">必填</text>
|
|
</view>
|
|
|
|
<view class="info-grid">
|
|
<!-- 年龄 -->
|
|
<view class="info-item">
|
|
<view class="item-label">
|
|
<text>年龄</text>
|
|
</view>
|
|
<view class="item-input-wrapper">
|
|
<input
|
|
class="item-input"
|
|
name="petAge"
|
|
type="digit"
|
|
placeholder="0"
|
|
value="{{formData.petAge}}"
|
|
bindinput="onPetAgeInput"
|
|
/>
|
|
<text class="input-unit">岁</text>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 性别 -->
|
|
<view class="info-item">
|
|
<view class="item-label">
|
|
<text>性别</text>
|
|
</view>
|
|
<view class="gender-buttons">
|
|
<view
|
|
class="gender-btn {{formData.petGender === '公' ? 'active' : ''}}"
|
|
data-value="公"
|
|
bindtap="selectGender"
|
|
>
|
|
<text>公</text>
|
|
</view>
|
|
<view
|
|
class="gender-btn {{formData.petGender === '母' ? 'active' : ''}}"
|
|
data-value="母"
|
|
bindtap="selectGender"
|
|
>
|
|
<text>母</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 症状描述 -->
|
|
<view class="form-section">
|
|
<view class="section-header">
|
|
<view class="section-title">
|
|
<text>症状描述</text>
|
|
</view>
|
|
<text class="section-required">必填</text>
|
|
</view>
|
|
<view class="symptom-box">
|
|
<textarea
|
|
class="symptom-textarea"
|
|
name="symptoms"
|
|
placeholder="请详细描述宠物的症状,包括持续时间、频率、具体表现等..."
|
|
value="{{formData.symptoms}}"
|
|
bindinput="onSymptomsInput"
|
|
maxlength="500"
|
|
auto-height
|
|
/>
|
|
<view class="textarea-counter">
|
|
<text>{{symptomsLength}}/500</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 图片上传 -->
|
|
<view class="form-section">
|
|
<view class="section-header">
|
|
<view class="section-title">
|
|
|
|
<text>上传图片</text>
|
|
</view>
|
|
<text class="section-optional">可选</text>
|
|
</view>
|
|
|
|
<view class="upload-tips">
|
|
<text>最多可上传3张图片,用于帮助医生更直观了解病情</text>
|
|
</view>
|
|
|
|
<view class="image-upload-grid">
|
|
<!-- 已上传图片 -->
|
|
<block wx:for="{{formData.images}}" wx:key="*this">
|
|
<view class="image-preview">
|
|
<image
|
|
class="preview-image"
|
|
src="{{item}}"
|
|
mode="aspectFill"
|
|
bindtap="previewImage"
|
|
data-url="{{item}}"
|
|
data-urls="{{formData.images}}"
|
|
></image>
|
|
<view class="remove-overlay" data-index="{{index}}" bindtap="removeImage">
|
|
<image class="remove-icon" src="/pagesA/images/ch.png"></image>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
|
|
<!-- 上传按钮 -->
|
|
<view
|
|
class="upload-btn"
|
|
wx:if="{{formData.images.length < 3}}"
|
|
bindtap="chooseImage"
|
|
>
|
|
<view class="upload-icon-wrapper">
|
|
<image class="upload-icon" src="/pagesA/images/jh.png"></image>
|
|
</view>
|
|
<text class="upload-text">上传图片</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 提交按钮 -->
|
|
<view class="submit-section">
|
|
<button
|
|
class="submit-btn"
|
|
type="primary"
|
|
formType="submit"
|
|
loading="{{isSubmitting}}"
|
|
disabled="{{isSubmitting || !isFormValid}}"
|
|
>
|
|
{{isSubmitting ? '提交中...' : '提交问诊单'}}
|
|
</button>
|
|
</view>
|
|
|
|
</form>
|
|
</scroll-view>
|
|
</view>
|