|
|
|
@ -198,6 +198,33 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="实测值"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input> |
|
|
|
<el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.numberValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input> |
|
|
|
<el-select v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create> |
|
|
|
<el-option |
|
|
|
v-for="item in scope.row.availableList" |
|
|
|
:key="index" |
|
|
|
:label="item.availableValue" |
|
|
|
:value="item.availableValue"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-select v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numberValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create> |
|
|
|
<el-option |
|
|
|
v-for="item in scope.row.availableList" |
|
|
|
:key="index" |
|
|
|
:label="item.availableValue" |
|
|
|
:value="item.availableValue"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
@ -289,6 +316,17 @@ |
|
|
|
{{scope.row.finishFlag=='Y'?"是":"否"}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="实测值"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-if="scope.row.valueTypeDb === 'T'" disabled v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input> |
|
|
|
<el-input v-if="scope.row.valueTypeDb === 'N'" disabled v-model="scope.row.numberValue" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
@ -1135,6 +1173,19 @@ |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 回车选中下一行 |
|
|
|
focusNextInput(index, type) { |
|
|
|
let aaa = '' |
|
|
|
if (this.detailList.length - 1 === index) { |
|
|
|
aaa = `${type}0` |
|
|
|
} else { |
|
|
|
aaa = `${type}${index + 1}` |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[aaa].focus() |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 刷新项目 |
|
|
|
*/ |
|
|
|
@ -1226,6 +1277,7 @@ |
|
|
|
this.queryHistoryRecord(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 检验单 |
|
|
|
getInspectionFormData(){ |
|
|
|
let tempData = { |
|
|
|
@ -1246,6 +1298,7 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 点检记录 |
|
|
|
queryHistoryRecord(){ |
|
|
|
let tempData = { |
|
|
|
@ -1261,6 +1314,7 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 详情 |
|
|
|
detailModal(row){ |
|
|
|
let tempData = { |
|
|
|
@ -1273,7 +1327,6 @@ |
|
|
|
this.historyDetailModelFlag = true; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 校验用户是否收藏 |
|
|
|
favoriteIsOk() { |
|
|
|
let userFavorite = { |
|
|
|
@ -1355,12 +1408,8 @@ |
|
|
|
}) |
|
|
|
return this.exportList; |
|
|
|
}, |
|
|
|
startDownload() { |
|
|
|
|
|
|
|
}, |
|
|
|
finishDownload() { |
|
|
|
|
|
|
|
}, |
|
|
|
startDownload() {}, |
|
|
|
finishDownload() {}, |
|
|
|
fields() { |
|
|
|
let json = "{" |
|
|
|
this.columnList.forEach((item, index) => { |
|
|
|
@ -1447,23 +1496,8 @@ |
|
|
|
this.detailModelFlag = true |
|
|
|
}, |
|
|
|
|
|
|
|
saveCheckReport(){ |
|
|
|
// if(this.saveData.startDate === ''||this.saveData.startDate == null){ |
|
|
|
// this.$message.warning('请输入开始时间!') |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if(this.saveData.endDate === ''||this.saveData.endDate == null){ |
|
|
|
// this.$message.warning('请输入结束时间!') |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if(this.saveData.workTime === 0){ |
|
|
|
// this.$message.warning('工作时长不能为0!') |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if(this.saveData.workTime < 0){ |
|
|
|
// this.$message.warning('工作时长不能小于0!') |
|
|
|
// return |
|
|
|
// } |
|
|
|
async saveCheckReport(){ |
|
|
|
let tempFlag = 'N' |
|
|
|
if(this.saveData.checkResult === ''||this.saveData.checkResult == null){ |
|
|
|
this.$message.warning('请选择维保结论!') |
|
|
|
return |
|
|
|
@ -1472,13 +1506,30 @@ |
|
|
|
this.$message.warning('请选择异常原因!') |
|
|
|
return |
|
|
|
} |
|
|
|
for (let i = 0; i < this.detailList.length; i++) { |
|
|
|
if(this.detailList[i].valueTypeDb === 'N' && (this.detailList[i].numberValue === '' || this.detailList[i].numberValue == null)){ |
|
|
|
this.$message.warning(this.detailList[i].itemDesc+'实测值未填写!') |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.detailList[i].valueTypeDb === 'N' && this.detailList[i].numberValue != '' && this.detailList[i].numberValue != null){ |
|
|
|
if((this.detailList[i].minValue != "" && this.detailList[i].minValue != null && this.detailList[i].minValue > this.detailList[i].numberValue) || (this.detailList[i].minValue != ""&& this.detailList[i].minValue != null && this.detailList[i].maxValue < this.detailList[i].numberValue)){ |
|
|
|
this.detailList[i].itemResult = '不合格' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.saveData.checkResult == '不合格') { |
|
|
|
this.detailList.forEach(val => { |
|
|
|
if (val.itemResult == '不合格') { |
|
|
|
tempFlag = 'Y' |
|
|
|
} |
|
|
|
}) |
|
|
|
if (tempFlag != 'Y') { |
|
|
|
this.$message.warning('请选择不合格项目!') |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.saveData.itemList = JSON.parse(JSON.stringify(this.detailList)) |
|
|
|
// for (let j = 0; j < this.saveData.itemList.length ; j++) { |
|
|
|
// if(this.saveData.itemList[j].itemResult === '' || this.saveData.itemList[j].itemResult == null){ |
|
|
|
// this.saveData.itemList[j].itemResult = '合格' |
|
|
|
// } |
|
|
|
// } |
|
|
|
saveCheckOrderReport(this.saveData).then(({data}) => { |
|
|
|
await saveCheckOrderReport(this.saveData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.detailModelFlag = false |
|
|
|
@ -1486,8 +1537,7 @@ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|