107 lines
3.9 KiB
Plaintext
107 lines
3.9 KiB
Plaintext
<!--pages/device/add/add.wxml-->
|
|
<view class="container">
|
|
<view class="form-section">
|
|
<view class="section-title">基本信息</view>
|
|
<t-cell-group>
|
|
<t-cell title="设备名称" arrow hover bindtap="showPicker" data-field="deviceName">
|
|
<text slot="note" class="{{form.deviceName ? '' : 'placeholder'}}">
|
|
{{form.deviceName || '请选择设备名称'}}
|
|
</text>
|
|
</t-cell>
|
|
<t-cell title="设备编号">
|
|
<t-input slot="note" placeholder="请输入设备编号" model:value="{{form.deviceCode}}" />
|
|
</t-cell>
|
|
<t-cell title="规格型号">
|
|
<t-input slot="note" placeholder="请输入规格型号" model:value="{{form.specification}}" />
|
|
</t-cell>
|
|
<t-cell title="生产厂家">
|
|
<t-input slot="note" placeholder="请输入生产厂家" model:value="{{form.manufacturer}}" />
|
|
</t-cell>
|
|
</t-cell-group>
|
|
</view>
|
|
|
|
<view class="form-section">
|
|
<view class="section-title">单位信息</view>
|
|
<t-cell-group>
|
|
<t-cell title="使用单位" arrow hover bindtap="showPicker" data-field="useUnit">
|
|
<text slot="note" class="{{form.useUnit ? '' : 'placeholder'}}">
|
|
{{form.useUnit || '请选择使用单位'}}
|
|
</text>
|
|
</t-cell>
|
|
<t-cell title="所属单位">
|
|
<t-input slot="note" placeholder="请输入所属单位" model:value="{{form.belongUnit}}" />
|
|
</t-cell>
|
|
<t-cell title="存放位置">
|
|
<t-input slot="note" placeholder="请输入存放位置" model:value="{{form.location}}" />
|
|
</t-cell>
|
|
<t-cell title="责任人">
|
|
<t-input slot="note" placeholder="请输入责任人" model:value="{{form.responsible}}" />
|
|
</t-cell>
|
|
</t-cell-group>
|
|
</view>
|
|
|
|
<view class="form-section">
|
|
<view class="section-title">检验信息</view>
|
|
<t-cell-group>
|
|
<t-cell title="购置日期" arrow hover bindtap="showDatePicker" data-field="purchaseDate">
|
|
<text slot="note" class="{{form.purchaseDate ? '' : 'placeholder'}}">
|
|
{{form.purchaseDate || '请选择购置日期'}}
|
|
</text>
|
|
</t-cell>
|
|
<t-cell title="上次检验日期" arrow hover bindtap="showDatePicker" data-field="lastInspectionDate">
|
|
<text slot="note" class="{{form.lastInspectionDate ? '' : 'placeholder'}}">
|
|
{{form.lastInspectionDate || '请选择上次检验日期'}}
|
|
</text>
|
|
</t-cell>
|
|
<t-cell title="检验周期(月)">
|
|
<t-input slot="note" type="number" placeholder="请输入检验周期" model:value="{{form.inspectionCycle}}" />
|
|
</t-cell>
|
|
<t-cell title="下次检验日期" arrow hover bindtap="showDatePicker" data-field="nextInspectionDate">
|
|
<text slot="note" class="{{form.nextInspectionDate ? '' : 'placeholder'}}">
|
|
{{form.nextInspectionDate || '请选择下次检验日期'}}
|
|
</text>
|
|
</t-cell>
|
|
</t-cell-group>
|
|
</view>
|
|
|
|
<view class="form-section">
|
|
<view class="section-title">备注信息</view>
|
|
<view class="textarea-wrapper">
|
|
<textarea
|
|
class="remark-textarea"
|
|
placeholder="请输入备注信息(选填)"
|
|
model:value="{{form.remark}}"
|
|
maxlength="200"
|
|
/>
|
|
<view class="textarea-counter">{{form.remark.length}}/200</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="action-buttons">
|
|
<t-button theme="primary" size="large" block bindtap="submitForm">{{mode === 'edit' ? '保存' : '添加'}}</t-button>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 选择器 -->
|
|
<t-picker
|
|
visible="{{showPicker}}"
|
|
value="{{pickerValue}}"
|
|
data-source="{{pickerData}}"
|
|
title="{{pickerTitle}}"
|
|
bindconfirm="onPickerConfirm"
|
|
bindcancel="onPickerCancel"
|
|
>
|
|
<t-picker-item options="{{pickerData}}" />
|
|
</t-picker>
|
|
|
|
<!-- 日期选择器 -->
|
|
<t-date-time-picker
|
|
visible="{{showDatePicker}}"
|
|
mode="date"
|
|
title="选择日期"
|
|
value="{{dateValue}}"
|
|
bindconfirm="onDateConfirm"
|
|
bindcancel="onDateCancel"
|
|
/>
|
|
|