| | |
| | | <template> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen |
| | | :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> |
| | |
| | | <a-row> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="maintenanceDate" label="保养日期"> |
| | | <a-date-picker v-model="model.maintenanceDate" value-format="YYYY-MM-DD" style="width: 100%"/> |
| | | <a-date-picker v-model="model.maintenanceDate" value-format="YYYY-MM-DD" :allowClear="false" |
| | | style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="保养周期"> |
| | | <a-input placeholder="选择设备后自动带出" v-model="model.maintenancePeriod" disabled/> |
| | | <a-input v-model="model.maintenancePeriod" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | return { |
| | | title: '操作', |
| | | visible: false, |
| | | editable: false, |
| | | editable: true, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | detail: { |
| | | operatorMaintenanceList: [], |
| | | repairerMaintenanceList: [], |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | |
| | | }, |
| | | |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.model = Object.assign({ maintenancePeriod: 6 }, record) |
| | | this.visible = true |
| | | this.editable = false |
| | | this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] |
| | |
| | | * @param standardId 规范Id |
| | | */ |
| | | loadStandardDetail(standardId) { |
| | | if (standardId) { |
| | | this.spinning = true |
| | | getAction(this.url.standardDetail, { standardId }) |
| | | .then(res => { |
| | |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @param orderId 工单Id |
| | | */ |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | this.spinning = true |
| | | getAction(this.url.detail, { orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | this.detail.operatorMaintenanceList = res.result.filter(item => item.itemCategory == 'OPERATOR_MAINTENANCE') |
| | | this.detail.repairerMaintenanceList = res.result.filter(item => item.itemCategory == 'REPAIRER_MAINTENANCE') |
| | | } |
| | | }) |
| | | } |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | }, |
| | | |
| | | async handleOk() { |