Browse Source

2023-08-28 设备和质量修改

java8
杨奉源 2 years ago
parent
commit
864d89523b
  1. 1
      src/api/eam/eam.js
  2. 117
      src/views/modules/eam/eamWorkOrderForCheck.vue
  3. 255
      src/views/modules/eam/eamWorkOrderForMaintenance.vue
  4. 67
      src/views/modules/eam/eamWorkPlanForCheck.vue
  5. 78
      src/views/modules/eam/eamWorkPlanForMaintenance.vue
  6. 6
      src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue

1
src/api/eam/eam.js

@ -119,6 +119,7 @@ export const cancelOrder= data => createAPI(`/pms/eam/cancelOrder`,'post',data)
export const eamWorkOrderReportSearch= data => createAPI(`/pms/eam/eamWorkOrderReportSearch`,'post',data) export const eamWorkOrderReportSearch= data => createAPI(`/pms/eam/eamWorkOrderReportSearch`,'post',data)
export const eamWorkOrderSearchForDefect= data => createAPI(`/pms/eam/eamWorkOrderSearchForDefect`,'post',data) export const eamWorkOrderSearchForDefect= data => createAPI(`/pms/eam/eamWorkOrderSearchForDefect`,'post',data)
export const updateWorkOrder= data => createAPI(`/pms/eam/updateWorkOrder`,'post',data)
//---------------故障------------------- //---------------故障-------------------
export const eamDefectSearch = data => createAPI(`/pms/eam/eamDefectSearch`,'post',data) export const eamDefectSearch = data => createAPI(`/pms/eam/eamDefectSearch`,'post',data)

117
src/views/modules/eam/eamWorkOrderForCheck.vue

@ -1,9 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<div> <div>
<span @click="favoriteFunction()">
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span>
<span @click="favoriteFunction()">
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span>
</div> </div>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'计划编码'"> <el-form-item :label="'计划编码'">
@ -163,16 +163,25 @@
<el-form-item :label="'实际执行人员'"> <el-form-item :label="'实际执行人员'">
<el-input v-model="saveData.actualOperatorName" disabled style="width: 120px"></el-input> <el-input v-model="saveData.actualOperatorName" disabled style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'维保结论'">
<el-input v-model="saveData.checkResult" disabled style="width: 120px"></el-input>
<el-form-item :label="'点检结论'">
<el-select v-if="saveData.status === '待审核'" v-model="saveData.checkResult" style="width: 120px">
<el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option>
</el-select>
<el-select v-if="saveData.status === '已完工'" v-model="saveData.checkResult" disabled style="width: 120px">
<el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" >
<el-form-item :label="'工作时间'">
<el-input v-model="saveData.workTime" type="number" disabled style="width: 120px"></el-input>
<el-form :inline="true" label-position="top">
<el-form-item :label="'工作时长(m)'">
<el-input v-if="saveData.status === '待审核'" v-model="saveData.workTime" type="number" :min="0" style="width: 120px"></el-input>
<el-input v-if="saveData.status === '已完工'" v-model="saveData.workTime" type="number" :min="0" disabled style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'执行结果备注'"> <el-form-item :label="'执行结果备注'">
<el-input v-model="saveData.remark" disabled style="width: 523px"></el-input>
<el-input v-if="saveData.status === '待审核'" v-model="saveData.remark" style="width: 523px"></el-input>
<el-input v-if="saveData.status === '已完工'" v-model="saveData.remark" disabled style="width: 523px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button v-if="saveData.status === '已完工'" type="primary" @click="checkModal()">取消审核</el-button> <el-button v-if="saveData.status === '已完工'" type="primary" @click="checkModal()">取消审核</el-button>
@ -218,8 +227,10 @@
min-width="80" min-width="80"
label="实测值"> label="实测值">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.valueTypeDb === 'T'" v-model="scope.row.textValue" readonly style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'N'" v-model="scope.row.numberValue" readonly style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'T' && saveData.status === '待审核'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'T' && saveData.status === '已完工'" v-model="scope.row.textValue" readonly style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'N' && saveData.status === '待审核'" v-model="scope.row.numberValue" style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb === 'N' && saveData.status === '已完工'" v-model="scope.row.numberValue" readonly style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -229,7 +240,11 @@
min-width="80" min-width="80"
label="检验结论"> label="检验结论">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px">
<el-select v-if="saveData.status === '待审核'" v-model="scope.row.itemResult" style="height: 11px;padding: 0px">
<el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option>
</el-select>
<el-select v-if="saveData.status === '已完工'" v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option> <el-option label="不合格" value="不合格"></el-option>
</el-select> </el-select>
@ -238,6 +253,7 @@
</el-table> </el-table>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button v-if="saveData.status === '待审核'" type="primary" @click="updateWorkOrder()">确定</el-button>
<el-button type="primary" @click="detailModelFlag = false">关闭</el-button> <el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -313,7 +329,7 @@
cancelOrder, cancelOrder,
changeOrderOperator, changeOrderOperator,
checkWorkOrder, // checkWorkOrder, //
selectNameByMes, //
updateWorkOrder, //
searchFileUrl searchFileUrl
} from "@/api/eam/eam.js" } from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam' import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -601,7 +617,10 @@
objectID: '', objectID: '',
checker: '', checker: '',
checkerName: '', checkerName: '',
status: ''
status: '',
itemList: [],
mesUser: '',
functionType: 'A'
}, },
columnDetailList: [ columnDetailList: [
{ {
@ -920,7 +939,6 @@
this.submitData.checker = this.saveData.checker this.submitData.checker = this.saveData.checker
this.submitData.checkerName = this.saveData.checkerName this.submitData.checkerName = this.saveData.checkerName
this.submitData.status = this.saveData.status this.submitData.status = this.saveData.status
console.log(this.submitData)
let tempData = { let tempData = {
site: this.$store.state.user.site, site: this.$store.state.user.site,
mesUser: this.$store.state.user.name mesUser: this.$store.state.user.name
@ -952,11 +970,8 @@
}) })
}else if (this.submitData.status === '待审核'){ }else if (this.submitData.status === '待审核'){
if (!this.submitData.checker.split(';').includes(tempData.mesUser)){ if (!this.submitData.checker.split(';').includes(tempData.mesUser)){
this.$alert('审核人员与计划不符!', '错误', {
confirmButtonText: '确定',
type: 'warning'
})
return false
this.$message.warning('审核人员与计划不符!')
return
} }
this.$confirm(`是否确认审核?`, '提示', { this.$confirm(`是否确认审核?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -1026,7 +1041,7 @@
return false return false
} }
checkWorkOrder(this.submitData).then(({data}) => { checkWorkOrder(this.submitData).then(({data}) => {
if (data && data.code ==0) {
if (data && data.code === 0) {
this.getDataList() this.getDataList()
this.submitModelFlag = false this.submitModelFlag = false
this.$message({ this.$message({
@ -1067,7 +1082,10 @@
objectID: row.objectID, objectID: row.objectID,
checker: row.checker, checker: row.checker,
checkerName: row.checkerName, checkerName: row.checkerName,
status: row.status
status: row.status,
itemList: [],
mesUser: this.$store.state.user.name,
functionType: 'A'
} }
this.detailModelFlag = true; this.detailModelFlag = true;
}, },
@ -1166,6 +1184,61 @@
} }
}) })
}, },
updateWorkOrder(){
let tempFlag = 'N'
if (this.saveData.checkResult === '' || this.saveData.checkResult == 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
}
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))
updateWorkOrder(this.saveData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.detailModelFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
/** /**
* 自适应 * 自适应
* @param label * @param label

255
src/views/modules/eam/eamWorkOrderForMaintenance.vue

@ -144,19 +144,46 @@
<el-form-item :label="'实际执行人员'"> <el-form-item :label="'实际执行人员'">
<el-input v-model="saveData.actualOperatorName" disabled style="width: 120px"></el-input> <el-input v-model="saveData.actualOperatorName" disabled style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item>
<span v-if="saveData.status === '已完工'" slot="label"><a>协同人员</a></span>
<span v-if="saveData.status === '待审核'" slot="label" @click="getOperatorList()"><a>协同人员</a></span>
<el-input v-model="saveData.operator" readonly style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'维保结论'"> <el-form-item :label="'维保结论'">
<el-input v-model="saveData.checkResult" disabled style="width: 120px"></el-input>
<el-select v-if="saveData.status === '待审核'" v-model="saveData.checkResult" style="width: 120px">
<el-option label="合格" value="合格"></el-option>
<el-option label="异常" value="异常"></el-option>
</el-select>
<el-select v-if="saveData.status === '已完工'" v-model="saveData.checkResult" disabled style="width: 120px">
<el-option label="合格" value="合格"></el-option>
<el-option label="异常" value="异常"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="this.saveData.checkResult === '异常'" :label="'异常原因'"> <el-form-item v-if="this.saveData.checkResult === '异常'" :label="'异常原因'">
<el-input v-model="saveData.disposalMeasures" disabled style="width: 120px"></el-input>
<el-select v-if="saveData.status === '已完工'" disabled v-model="saveData.disposalMeasures" style="width: 120px">
<el-option label="缺少备件" value="缺少备件"></el-option>
<el-option label="等待售后" value="等待售后"></el-option>
<el-option label="远程协助" value="远程协助"></el-option>
<el-option label="换班换人" value="换班换人"></el-option>
</el-select>
<el-select v-if="saveData.status === '待审核'" v-model="saveData.disposalMeasures" style="width: 120px">
<el-option label="缺少备件" value="缺少备件"></el-option>
<el-option label="等待售后" value="等待售后"></el-option>
<el-option label="远程协助" value="远程协助"></el-option>
<el-option label="换班换人" value="换班换人"></el-option>
</el-select>
<!-- <el-input v-if="saveData.status === '已完工'" v-model="saveData.disposalMeasures" disabled style="width: 120px"></el-input>-->
<!-- <el-input v-if="saveData.status === '待审核'" v-model="saveData.disposalMeasures" style="width: 120px"></el-input>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" > <el-form :inline="true" label-position="top" >
<el-form-item :label="'工作时间'"> <el-form-item :label="'工作时间'">
<el-input v-model="saveData.workTime" type="number" disabled style="width: 120px"></el-input>
<el-input v-if="saveData.status === '已完工'" v-model="saveData.workTime" type="number" :min="0" disabled style="width: 120px"></el-input>
<el-input v-if="saveData.status === '待审核'" v-model="saveData.workTime" type="number" :min="0" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'执行结果备注'"> <el-form-item :label="'执行结果备注'">
<el-input v-model="saveData.remark" disabled style="width: 523px"></el-input>
<el-input v-if="saveData.status === '已完工'" v-model="saveData.remark" disabled style="width: 523px"></el-input>
<el-input v-if="saveData.status === '待审核'" v-model="saveData.remark" style="width: 523px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button v-if="saveData.status === '已完工'" type="primary" @click="checkModal()">取消审核</el-button> <el-button v-if="saveData.status === '已完工'" type="primary" @click="checkModal()">取消审核</el-button>
@ -187,11 +214,11 @@
:header-align="item.headerAlign" :header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:fixed="item.fixed === '' ? false : item.fixed"
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </el-table-column>
@ -212,7 +239,11 @@
min-width="80" min-width="80"
label="检验结论"> label="检验结论">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px">
<el-select v-if="saveData.status === '已完工'" v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px">
<el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option>
</el-select>
<el-select v-if="saveData.status === '待审核'" v-model="scope.row.itemResult" style="height: 11px;padding: 0px">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option> <el-option label="不合格" value="不合格"></el-option>
</el-select> </el-select>
@ -221,6 +252,7 @@
</el-table> </el-table>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button v-if="saveData.status === '待审核'" type="primary" @click="updateWorkOrder()">确定</el-button>
<el-button type="primary" @click="detailModelFlag = false">关闭</el-button> <el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -265,6 +297,60 @@
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<!-- 人员 -->
<el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="520px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="operatorData">
<el-form-item :label="'人员编码'">
<el-input v-model="operatorData.adminID" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'人员名称'">
<el-input v-model="operatorData.adminName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getOperatorList()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="operatorList"
ref="operatorTable"
@row-click="operatorClickRow"
@selection-change="selectionOperator"
:row-key="getRowKeys"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
align="center"
:reserve-selection="true"
width="50">
</el-table-column>
<el-table-column
v-for="(item,index) in operatorDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="confirmOperator()">确认</el-button>
<el-button type="primary" @click="operatorModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div> </div>
@ -276,9 +362,10 @@
cancelOrder, cancelOrder,
changeOrderOperator, changeOrderOperator,
eamWorkOrderReportSearch, eamWorkOrderReportSearch,
selectNameByMes,
getOperatorList,
checkWorkOrder, checkWorkOrder,
searchFileUrl
searchFileUrl,
updateWorkOrder
} from "@/api/eam/eam.js" } from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam' import Chooselist from '@/views/modules/common/Chooselist_eam'
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
@ -638,7 +725,12 @@
objectID: '', objectID: '',
checker: '', checker: '',
checkerName: '', checkerName: '',
status: ''
status: '',
operator: '',
adminID: '',
itemList: [],
mesUser: '',
functionType: 'B'
}, },
columnDetailList: [ columnDetailList: [
{ {
@ -796,7 +888,41 @@
status: '' status: ''
}, },
descImages: [], descImages: [],
imageModalFlag: false
imageModalFlag: false,
operatorModelFlag: false,
operatorData: {
site: this.$store.state.user.site,
adminID: '',
adminName: ''
},
operatorList:[],
operatorListSelections: [],
operatorDetailList: [
{
columnProp: 'adminID',
headerAlign: "center",
align: "center",
columnLabel: '人员编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'adminName',
headerAlign: "center",
align: "center",
columnLabel: '人员名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
} }
}, },
mounted () { mounted () {
@ -1066,9 +1192,14 @@
objectID: row.objectID, objectID: row.objectID,
checker: row.checker, checker: row.checker,
checkerName: row.checkerName, checkerName: row.checkerName,
status: row.status
},
this.detailModelFlag = true;
status: row.status,
operator: row.operator,
adminID: row.adminID,
itemList: [],
mesUser: this.$store.state.user.name,
functionType: 'B'
}
this.detailModelFlag = true;
}, },
// //
checkModal(){ checkModal(){
@ -1177,6 +1308,102 @@
} }
}, },
//
getOperatorList(){
//
this.$nextTick(() => this.$refs.operatorTable.clearSelection())
//
let tempDataList = this.saveData.adminID.split(';')
//
getOperatorList(this.operatorData).then(({data}) => {
if (data && data.code === 0) {
this.operatorList = data.rows
this.operatorList.forEach(val => {
//
if (tempDataList.includes(val.adminID)) {
this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
}
})
this.operatorModelFlag = true;
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
operatorClickRow(row){
this.$refs.operatorTable.toggleRowSelection(row);
},
//
selectionOperator (val) {
this.operatorListSelections = val
},
getRowKeys(row) {
//id
return row.adminID;
},
//
confirmOperator(){
this.saveData.adminID = ''
this.saveData.operator = ''
for (let i = 0; i < this.operatorListSelections.length; i++) {
this.saveData.adminID = this.saveData.adminID + ";" + this.operatorListSelections[i].adminID
this.saveData.operator = this.saveData.operator + ";" + this.operatorListSelections[i].adminName
}
this.saveData.adminID = this.saveData.adminID.substring(1)
this.saveData.operator = this.saveData.operator.substring(1)
this.operatorModelFlag = false
},
updateWorkOrder (){
let tempFlag = 'N'
if (this.saveData.checkResult === '' || this.saveData.checkResult == 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
}
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))
updateWorkOrder(this.saveData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.detailModelFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
} }
} }
</script> </script>

67
src/views/modules/eam/eamWorkPlanForCheck.vue

@ -2008,77 +2008,53 @@
}, },
saveData(){ saveData(){
if (this.modalData.planDesc === '' || this.modalData.planDesc == null) { if (this.modalData.planDesc === '' || this.modalData.planDesc == null) {
this.$alert('请输入计划描述 !', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请输入计划描述!')
return
} }
if (this.modalData.operator === '' || this.modalData.operator == null) { if (this.modalData.operator === '' || this.modalData.operator == null) {
this.$alert('请选择机修人员 !', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择机修人员!')
return
} }
if (this.modalData.checker === '' || this.modalData.checker == null) { if (this.modalData.checker === '' || this.modalData.checker == null) {
this.$alert('请选择审核人员 !', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择审核人员!')
return
} }
if (this.modalData.propertiesCode === '' || this.modalData.propertiesCode == null) { if (this.modalData.propertiesCode === '' || this.modalData.propertiesCode == null) {
this.$alert('请选择点检模板!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择点检模板!')
return
} }
if (this.modalData.planPeriod === '' || this.modalData.planPeriod == null) { if (this.modalData.planPeriod === '' || this.modalData.planPeriod == null) {
this.$alert('选择点检周期!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('选择点检周期!')
return
} }
if (this.modalData.planStartDate === '' || this.modalData.planStartDate == null) { if (this.modalData.planStartDate === '' || this.modalData.planStartDate == null) {
this.$alert('请选择开始日期!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择开始日期!')
return
} }
if (this.modalData.planStartDate < this.dayjs().format("YYYY-MM-DD")) { if (this.modalData.planStartDate < this.dayjs().format("YYYY-MM-DD")) {
this.$alert('计划开始日期不能小于今天!', '错误', {
confirmButtonText: '确定'
})
this.$message.warning('计划开始日期不能小于今天!')
return return
} }
if (this.modalData.planEndDate === '' || this.modalData.planEndDate == null) { if (this.modalData.planEndDate === '' || this.modalData.planEndDate == null) {
this.$alert('请选择结束日期!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择结束日期!')
return
} }
if (this.modalData.planEndDate < this.dayjs().format("YYYY-MM-DD")) { if (this.modalData.planEndDate < this.dayjs().format("YYYY-MM-DD")) {
this.$alert('计划结束日期不能小于今天!', '错误', {
confirmButtonText: '确定'
})
this.$message.warning('计划结束日期不能小于今天!')
return return
} }
if (this.modalData.planStartDate > this.modalData.planEndDate) { if (this.modalData.planStartDate > this.modalData.planEndDate) {
this.$alert('计划开始日期不能小于结束日期!', '错误', {
confirmButtonText: '确定'
})
this.$message.warning('计划开始日期不能小于结束日期!')
return return
} }
if (this.modalData.taskStartDate === '' || this.modalData.taskStartDate == null) { if (this.modalData.taskStartDate === '' || this.modalData.taskStartDate == null) {
this.$alert('请选择任务开始时间!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择任务开始时间!')
return
} }
if(this.modalData.flag === '1'){ if(this.modalData.flag === '1'){
if(this.dataListSelections.length === 0){ if(this.dataListSelections.length === 0){
this.$alert('请勾选设备!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请勾选设备!')
return
} }
this.modalData.objectList = this.dataListSelections this.modalData.objectList = this.dataListSelections
let obj = document.getElementsByName('addWorkOrderRule'); let obj = document.getElementsByName('addWorkOrderRule');
@ -2362,7 +2338,6 @@
}) })
return false return false
} }
row.userId = this.$store.state.user.name
this.$confirm(`是否下达点检工单?`, '提示', { this.$confirm(`是否下达点检工单?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

78
src/views/modules/eam/eamWorkPlanForMaintenance.vue

@ -1,9 +1,9 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<div> <div>
<span @click="favoriteFunction()">
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span>
<span @click="favoriteFunction()">
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span>
</div> </div>
<el-form :inline="true" label-position="top" :model="searchData" > <el-form :inline="true" label-position="top" :model="searchData" >
<el-form-item :label="'计划编码'"> <el-form-item :label="'计划编码'">
@ -77,7 +77,7 @@
:header-align="item.headerAlign" :header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
@ -92,10 +92,10 @@
width="160" width="160"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='已计划'" @click="createOrder(scope.row)">下达</a>
<a type="text" size="small" v-if="scope.row.status=='进行中'" @click="planOrder(scope.row)">计划</a>
<a type="text" size="small" v-if="scope.row.status==='已计划'" @click="createOrder(scope.row)">下达</a>
<a type="text" size="small" v-if="scope.row.status==='进行中'" @click="planOrder(scope.row)">计划</a>
<a type="text" size="small" v-if="scope.row.status!='已结束'&&scope.row.status!='已取消'" @click="cancelPlan(scope.row)">取消</a> <a type="text" size="small" v-if="scope.row.status!='已结束'&&scope.row.status!='已取消'" @click="cancelPlan(scope.row)">取消</a>
<a type="text" size="small" v-if="scope.row.status=='已计划'" @click="updateModal(scope.row)">编辑</a>
<a type="text" size="small" v-if="scope.row.status==='已计划'" @click="updateModal(scope.row)">编辑</a>
<a type="text" size="small" v-if="scope.row.status!='进行中'" @click="deletePlan(scope.row)">删除</a> <a type="text" size="small" v-if="scope.row.status!='进行中'" @click="deletePlan(scope.row)">删除</a>
<a type="text" size="small" @click="itemModal(scope.row)">维保项目</a> <a type="text" size="small" @click="itemModal(scope.row)">维保项目</a>
</template> </template>
@ -1907,73 +1907,51 @@
}, },
saveData(){ saveData(){
if (this.modalData.planDesc === '' || this.modalData.planDesc == null) { if (this.modalData.planDesc === '' || this.modalData.planDesc == null) {
this.$alert('请输入计划描述 !', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请输入计划描述!')
return
} }
if (this.modalData.operator === '' || this.modalData.operator == null) { if (this.modalData.operator === '' || this.modalData.operator == null) {
this.$alert('请选择机修人员 !', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择机修人员!')
return
} }
if (this.modalData.checker === '' || this.modalData.checker == null) { if (this.modalData.checker === '' || this.modalData.checker == null) {
this.$alert('请选择审核人员 !', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择审核人员!')
return
} }
if (this.modalData.propertiesCode === '' || this.modalData.propertiesCode == null) { if (this.modalData.propertiesCode === '' || this.modalData.propertiesCode == null) {
this.$alert('请选择维保模板!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择维保模板!')
return
} }
if (this.modalData.planPeriod === '' || this.modalData.planPeriod == null) { if (this.modalData.planPeriod === '' || this.modalData.planPeriod == null) {
this.$alert('选择维保周期!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('选择维保周期!')
return
} }
if (this.modalData.planStartDate === '' || this.modalData.planStartDate == null) { if (this.modalData.planStartDate === '' || this.modalData.planStartDate == null) {
this.$alert('请选择开始日期!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择开始日期!')
return
} }
if (this.modalData.planStartDate < this.dayjs().format("YYYY-MM-DD")) { if (this.modalData.planStartDate < this.dayjs().format("YYYY-MM-DD")) {
this.$alert('计划开始日期不能小于今天!', '错误', {
confirmButtonText: '确定'
})
this.$message.warning('计划开始日期不能小于今天!')
return return
} }
if (this.modalData.planEndDate === '' || this.modalData.planEndDate == null) { if (this.modalData.planEndDate === '' || this.modalData.planEndDate == null) {
this.$alert('请选择结束日期!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请选择结束日期!')
return
} }
if (this.modalData.planEndDate < this.dayjs().format("YYYY-MM-DD")) { if (this.modalData.planEndDate < this.dayjs().format("YYYY-MM-DD")) {
this.$alert('计划结束日期不能小于今天!', '错误', {
confirmButtonText: '确定'
})
this.$message.warning('计划结束日期不能小于今天!')
return return
} }
if (this.modalData.planStartDate > this.modalData.planEndDate) { if (this.modalData.planStartDate > this.modalData.planEndDate) {
this.$alert('计划开始日期不能小于结束日期!', '错误', {
confirmButtonText: '确定'
})
this.$message.warning('计划开始日期不能小于结束日期!')
return return
} }
if(this.modalData.flag === '1'){ if(this.modalData.flag === '1'){
if(this.dataListSelections.length === 0){ if(this.dataListSelections.length === 0){
this.$alert('请勾选设备!', '错误', {
confirmButtonText: '确定'
})
return false
this.$message.warning('请勾选设备!')
return
} }
this.modalData.objectList=this.dataListSelections
this.modalData.objectList = this.dataListSelections
let obj = document.getElementsByName('addWorkOrderRule'); let obj = document.getElementsByName('addWorkOrderRule');
let s = ''; let s = '';
for (let i = 0; i < obj.length; i++) { for (let i = 0; i < obj.length; i++) {
@ -1986,7 +1964,7 @@
eamWorkPlanSave(this.modalData).then(({data}) => { eamWorkPlanSave(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
this.modalFlag=false
this.modalFlag = false
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

6
src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue

@ -136,7 +136,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="this.saveData.checkResult === '异常'" :label="'异常原因'"> <el-form-item v-if="this.saveData.checkResult === '异常'" :label="'异常原因'">
<el-select filterable v-model="saveData.disposalMeasures" style="width: 120px">
<el-select v-model="saveData.disposalMeasures" style="width: 120px">
<el-option label="缺少备件" value="缺少备件"></el-option> <el-option label="缺少备件" value="缺少备件"></el-option>
<el-option label="等待售后" value="等待售后"></el-option> <el-option label="等待售后" value="等待售后"></el-option>
<el-option label="远程协助" value="远程协助"></el-option> <el-option label="远程协助" value="远程协助"></el-option>
@ -216,11 +216,11 @@
:header-align="item.headerAlign" :header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </el-table-column>

Loading…
Cancel
Save