| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | centered |
| | | :mask-closable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="关闭"> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered |
| | | :mask-closable="false" @ok="handleOk" @cancel="handleCancel" cancelText="关闭"> |
| | | |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardCode" label="工单号"> |
| | | <a-input placeholder="工单号自动生成" v-model="model.orderNum" readOnly/> |
| | | <a-input placeholder="工单号自动生成" v-model="model.orderNum" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentId" label="设备编号"> |
| | | <MaintenanceEquipmentSelect placeholder="请输入设备编号或名称搜索" v-model="model.equipmentId" |
| | | <a-form-model-item prop="equipmentId" label="统一编码"> |
| | | <MaintenanceEquipmentSelect placeholder="请输入统一编码或名称搜索" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" :disabled="disabled" |
| | | @autocompleteForm="autocompleteForm"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardName" label="标准名称"> |
| | | <a-form-model-item prop="standardName" label="规范名称"> |
| | | <a-input placeholder="选择设备后自动带出" readOnly v-model="model.standardName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardCode" label="标准编码"> |
| | | <a-form-model-item prop="standardCode" label="规范编码"> |
| | | <a-input placeholder="选择设备后自动带出" readOnly v-model="model.standardCode"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="true" |
| | | keep-source |
| | | :height="300" |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;"/> |
| | | <j-vxe-table ref="editableDetailTable" :rowNumber="true" :rowSelection="true" :bordered="true" |
| | | :alwaysEdit="true" :toolbar="true" keep-source :height="300" :loading="detail.loading" |
| | | :dataSource="detail.dataSource" :columns="detail.columns" style="margin-top: 8px;"/> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | |
| | | disabled: false, |
| | | validatorRules: { |
| | | // standardName: [ |
| | | // { required: true, message: '请输入标准名称!' } |
| | | // { required: true, message: '请输入规范名称!' } |
| | | // ], |
| | | inspectionDate: [ |
| | | { required: true, message: '请选择点检日期!' } |
| | | { required: true, message: '请选择点检日期', trigger: 'change' } |
| | | ], |
| | | // maintenancePeriod: [ |
| | | // { required: true, message: '请输入保养周期,单位:天!' } |
| | | // ], |
| | | equipmentId: [ |
| | | { required: true, message: '请选择设备!' } |
| | | { required: true, message: '请选择设备', trigger: 'change' } |
| | | ] |
| | | }, |
| | | url: { |
| | |
| | | width: '10%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, unique: true, message: '序号不能重复' } |
| | | { required: true, message: '请输入${title}' }, |
| | | { unique: true, message: '序号不能重复' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: '保养项不能为空!' } |
| | | { required: true, message: '请输入${title}' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | width: '30%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: '保养要求不能为空!' } |
| | | { required: true, message: '请输入${title}' } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |