|
|
|
@ -78,7 +78,8 @@ |
|
|
|
fixed="right" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" v-if="scope.row.status=='未开工'" @click="reportModal(scope.row)">执行</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.status=='未开工'" @click="reach(scope.row)">到达</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.status=='已到达'" @click="reportModal(scope.row)">执行</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -133,38 +134,40 @@ |
|
|
|
<span slot="label" style="" @click="getOperatorList()"><a>选择机修人员</a></span> |
|
|
|
<el-input v-model="saveData.operatorName" style="width: 220px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'工作起始时间:'"> |
|
|
|
<el-form-item :label="'到达时间:'"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 150px" |
|
|
|
v-model="saveData.startDate" |
|
|
|
v-model="saveData.reachDate" |
|
|
|
:picker-options="pickerOptions" |
|
|
|
type="datetime" |
|
|
|
value-format='yyyy-MM-dd HH:mm:ss' |
|
|
|
format='yyyy-MM-dd HH:mm:ss' |
|
|
|
placeholder="开始时间" |
|
|
|
:editable="false" |
|
|
|
@focus='elDatePickerOnFocus' |
|
|
|
@change="handleChangeTime" |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
- |
|
|
|
<el-date-picker |
|
|
|
style="width: 150px" |
|
|
|
v-model="saveData.endDate" |
|
|
|
:picker-options="pickerOptions" |
|
|
|
type="datetime" |
|
|
|
value-format='yyyy-MM-dd HH:mm:ss' |
|
|
|
format='yyyy-MM-dd HH:mm:ss' |
|
|
|
placeholder="结束时间" |
|
|
|
placeholder="到达时间" |
|
|
|
:editable="false" |
|
|
|
@focus='elDatePickerOnFocus' |
|
|
|
@change="handleChangeTime" |
|
|
|
disabled |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
<!-- - --> |
|
|
|
<!-- <el-date-picker--> |
|
|
|
<!-- style="width: 150px"--> |
|
|
|
<!-- v-model="saveData.finishDate"--> |
|
|
|
<!-- :picker-options="pickerOptions"--> |
|
|
|
<!-- type="datetime"--> |
|
|
|
<!-- value-format='yyyy-MM-dd HH:mm:ss'--> |
|
|
|
<!-- format='yyyy-MM-dd HH:mm:ss'--> |
|
|
|
<!-- placeholder="结束时间"--> |
|
|
|
<!-- :editable="false"--> |
|
|
|
<!-- @focus='elDatePickerOnFocus'--> |
|
|
|
<!-- @change="handleChangeTime"--> |
|
|
|
<!-- disabled--> |
|
|
|
<!-- >--> |
|
|
|
<!-- </el-date-picker>--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'工作时长(m)'"> |
|
|
|
<el-input v-model="saveData.workTime" type="number" disabled :min="0" style="width: 60px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item :label="'工作时长(m)'">--> |
|
|
|
<!-- <el-input v-model="saveData.workTime" type="number" disabled :min="0" style="width: 60px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()"> |
|
|
|
<el-form-item :label="'维修结果'"> |
|
|
|
@ -309,6 +312,7 @@ |
|
|
|
getOperatorList, // 获取机修人员列表 |
|
|
|
queryHistoryRecord, |
|
|
|
searchFileUrl, // 查询文件路径 |
|
|
|
reach // 到达 |
|
|
|
} from "@/api/eam/eam.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
|
@ -554,23 +558,23 @@ |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101020, |
|
|
|
serialNumber: '101020TableActualOperatorName', |
|
|
|
tableId: "101020Table", |
|
|
|
tableName: "common", |
|
|
|
columnProp: 'actualOperatorName', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '实际机修人员', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
// { |
|
|
|
// userId: this.$store.state.user.name, |
|
|
|
// functionId: 101020, |
|
|
|
// serialNumber: '101020TableActualOperatorName', |
|
|
|
// tableId: "101020Table", |
|
|
|
// tableName: "common", |
|
|
|
// columnProp: 'actualOperatorName', |
|
|
|
// headerAlign: "center", |
|
|
|
// align: "center", |
|
|
|
// columnLabel: '实际机修人员', |
|
|
|
// columnHidden: false, |
|
|
|
// columnImage: false, |
|
|
|
// columnSortable: false, |
|
|
|
// sortLv: 0, |
|
|
|
// status: true, |
|
|
|
// fixed: '', |
|
|
|
// }, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101020, |
|
|
|
@ -588,40 +592,40 @@ |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101020, |
|
|
|
serialNumber: '101020TableActualActualDate', |
|
|
|
tableId: "101020Table", |
|
|
|
tableName: "common", |
|
|
|
columnProp: 'actualDate', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '实际执行时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101020, |
|
|
|
serialNumber: '101020TableWorkTime', |
|
|
|
tableId: "101020Table", |
|
|
|
tableName: "common", |
|
|
|
columnProp: 'workTime', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '工作时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
// { |
|
|
|
// userId: this.$store.state.user.name, |
|
|
|
// functionId: 101020, |
|
|
|
// serialNumber: '101020TableActualActualDate', |
|
|
|
// tableId: "101020Table", |
|
|
|
// tableName: "common", |
|
|
|
// columnProp: 'actualDate', |
|
|
|
// headerAlign: "center", |
|
|
|
// align: "center", |
|
|
|
// columnLabel: '实际执行时间', |
|
|
|
// columnHidden: false, |
|
|
|
// columnImage: false, |
|
|
|
// columnSortable: false, |
|
|
|
// sortLv: 0, |
|
|
|
// status: true, |
|
|
|
// fixed: '', |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// userId: this.$store.state.user.name, |
|
|
|
// functionId: 101020, |
|
|
|
// serialNumber: '101020TableWorkTime', |
|
|
|
// tableId: "101020Table", |
|
|
|
// tableName: "common", |
|
|
|
// columnProp: 'workTime', |
|
|
|
// headerAlign: "center", |
|
|
|
// align: "center", |
|
|
|
// columnLabel: '工作时间', |
|
|
|
// columnHidden: false, |
|
|
|
// columnImage: false, |
|
|
|
// columnSortable: false, |
|
|
|
// sortLv: 0, |
|
|
|
// status: true, |
|
|
|
// fixed: '', |
|
|
|
// }, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101020, |
|
|
|
@ -663,7 +667,9 @@ |
|
|
|
objectID: '', |
|
|
|
objectDesc: '', |
|
|
|
checkWorkPlanId: '', |
|
|
|
checkItemNo: '' |
|
|
|
checkItemNo: '', |
|
|
|
reachDate: '', |
|
|
|
finishDate: '' |
|
|
|
}, |
|
|
|
operatorData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
@ -1116,6 +1122,38 @@ |
|
|
|
selectionChangeHandle (val) { |
|
|
|
this.dataListSelections = val |
|
|
|
}, |
|
|
|
// 到达 |
|
|
|
reach (row){ |
|
|
|
let tempData = { |
|
|
|
site: row.site, |
|
|
|
functionType: 'C', |
|
|
|
orderNo: row.orderNo, |
|
|
|
status: '已到达' |
|
|
|
} |
|
|
|
this.$confirm(`是否确认到达?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
reach(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList(); |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
reportModal(row){ |
|
|
|
this.saveData = { |
|
|
|
site: row.site, |
|
|
|
@ -1133,7 +1171,8 @@ |
|
|
|
objectID: row.objectID, |
|
|
|
objectDesc: row.objectDesc, |
|
|
|
checkWorkPlanId: row.checkWorkPlanId, |
|
|
|
checkItemNo: row.checkItemNo |
|
|
|
checkItemNo: row.checkItemNo, |
|
|
|
reachDate: row.reachDate |
|
|
|
} |
|
|
|
this.queryHistoryRecord(); |
|
|
|
this.detailModelFlag = true; |
|
|
|
@ -1145,30 +1184,30 @@ |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(this.saveData.startDate === '' || this.saveData.startDate == null){ |
|
|
|
this.$alert('请输入开始时间!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(this.saveData.endDate === '' || this.saveData.endDate == null){ |
|
|
|
this.$alert('请输入结束时间!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(this.saveData.workTime === 0){ |
|
|
|
this.$alert('工作时长不能为0!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(this.saveData.workTime < 0){ |
|
|
|
this.$alert('工作时长不能小于0', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
// if(this.saveData.startDate === '' || this.saveData.startDate == null){ |
|
|
|
// this.$alert('请输入开始时间!', '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// return false |
|
|
|
// } |
|
|
|
// if(this.saveData.endDate === '' || this.saveData.endDate == null){ |
|
|
|
// this.$alert('请输入结束时间!', '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// return false |
|
|
|
// } |
|
|
|
// if(this.saveData.workTime === 0){ |
|
|
|
// this.$alert('工作时长不能为0!', '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// return false |
|
|
|
// } |
|
|
|
// if(this.saveData.workTime < 0){ |
|
|
|
// this.$alert('工作时长不能小于0', '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// return false |
|
|
|
// } |
|
|
|
if(this.saveData.result === '' || this.saveData.result == null){ |
|
|
|
this.$alert('请选择维修结果!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
|