|
|
@ -42,7 +42,7 @@ |
|
|
|
:apiUpdate="DeviceInspectionMainApi.updateDeviceInspectionMain" |
|
|
|
:apiCreate="DeviceInspectionMainApi.createDeviceInspectionMain" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
:isBusiness="false" |
|
|
|
:isBusiness="true" |
|
|
|
@onChange="onChange" |
|
|
|
:tableAllSchemas="DeviceInspectionDetail.allSchemas" |
|
|
|
:tableFormRules="DeviceInspectionDetailRules" |
|
|
@ -51,6 +51,7 @@ |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@submitForm="submitForm" |
|
|
|
:isSearchTableItem="true" |
|
|
|
@formSelectChange="formSelectChange" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
@ -386,6 +387,15 @@ const importSuccess = () => { |
|
|
|
|
|
|
|
// 筛选提交 |
|
|
|
const searchFormClick = (searchData) => { |
|
|
|
searchData.filters = searchData.filters.filter(item=>item.column != 'type') |
|
|
|
const fixedField = [ |
|
|
|
{ |
|
|
|
action:"==", |
|
|
|
column:"type", |
|
|
|
value:"DEVICE", |
|
|
|
}, |
|
|
|
] |
|
|
|
searchData.filters.push(...fixedField) |
|
|
|
tableObject.params = { |
|
|
|
isSearch: true, |
|
|
|
filters: searchData.filters |
|
|
@ -441,6 +451,24 @@ const onChange = (field, cur, item) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const formSelectChange = (field, cur, item) =>{ |
|
|
|
if (field == 'status') { |
|
|
|
if (cur == '1') { |
|
|
|
DeviceInspectionDetail.allSchemas.tableFormColumns.find(item => item.field == 'uncompleted').disabled = false |
|
|
|
DeviceInspectionDetail.allSchemas.tableFormColumns.find(item => item.field == 'completionTime').disabled = true |
|
|
|
item['completionTime']='' |
|
|
|
DeviceInspectionDetailRules.uncompleted = [{ required: true, message: '该项为必填项' }] |
|
|
|
DeviceInspectionDetailRules.completionTime = [{ required: false }] |
|
|
|
} else { |
|
|
|
DeviceInspectionDetail.allSchemas.tableFormColumns.find(item => item.field == 'uncompleted').disabled = true |
|
|
|
DeviceInspectionDetail.allSchemas.tableFormColumns.find(item => item.field == 'completionTime').disabled = false |
|
|
|
item['uncompleted']='' |
|
|
|
DeviceInspectionDetailRules.uncompleted = [{ required: false }] |
|
|
|
DeviceInspectionDetailRules.completionTime = [{ required: true , message: '该项为必填项'}] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|