Browse Source

2023-07-13 设备和质量修改

java8
杨奉源 3 years ago
parent
commit
dfbfaae2ec
  1. 148
      src/views/modules/eam/eamWorkOrderForCheck.vue
  2. 179
      src/views/modules/eam/eamWorkOrderForMaintenance.vue
  3. 216
      src/views/modules/eam/eamWorkPlanForCheck.vue
  4. 106
      src/views/modules/eam/eamWorkPlanForMaintenance.vue
  5. 23
      src/views/modules/reportWorkOrder/reportDefectOrder.vue
  6. 2
      src/views/modules/reportWorkOrder/report_image_upload.vue

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

@ -5,7 +5,7 @@
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg> <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span> </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="'计划编码'">
<el-input v-model="searchData.planID" style="width: 120px"></el-input> <el-input v-model="searchData.planID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
@ -35,7 +35,7 @@
<el-form-item style="margin-top: 23px;"> <el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber> <laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item> </el-form-item>
<el-form-item :label="' '">
<el-form-item :label="' '">
<el-date-picker <el-date-picker
style="width: 120px" style="width: 120px"
v-model="searchData.endDate" v-model="searchData.endDate"
@ -44,7 +44,7 @@
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="' '">
<el-form-item :label="' '">
<el-button type="primary" @click="searchClick()">查询</el-button> <el-button type="primary" @click="searchClick()">查询</el-button>
<el-button type="primary" @click="changeModel()">更改机修人员</el-button> <el-button type="primary" @click="changeModel()">更改机修人员</el-button>
<download-excel <download-excel
@ -119,7 +119,7 @@
: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>
@ -130,9 +130,9 @@
width="100" width="100"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='待审核'" @click="checkModal(scope.row)">审核</a>
<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="cancelOrder(scope.row)">取消工单</a>
<!-- <a type="text" size="small" v-if="scope.row.status=='待审核'" @click="checkModal(scope.row)">审核</a>-->
<a type="text" size="small" v-if="scope.row.status==='待审核' || scope.row.status==='已完工'" @click="reportModal(scope.row)">详情</a>
<a type="text" size="small" v-if="scope.row.status==='未开工'" @click="cancelOrder(scope.row)">取消工单</a>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -146,23 +146,33 @@
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper">
</el-pagination> </el-pagination>
<el-dialog title="执行结果" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="830px"> <el-dialog title="执行结果" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="830px">
<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.site" disabled style="width: 120px"></el-input>
<el-input v-model="saveData.site" 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.orderNo" disabled style="width: 120px"></el-input>
<el-input v-model="saveData.orderNo" 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.planOperatorName" disabled style="width: 120px"></el-input>
<el-input v-model="saveData.planOperatorName" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'实际执行人员'">
<el-input v-model="saveData.actualOperatorName" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'维保结论'">
<el-input v-model="saveData.checkResult" disabled 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-model="saveData.workTime" type="number" 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: 600px"></el-input>
<el-input v-model="saveData.remark" disabled style="width: 523px"></el-input>
</el-form-item>
<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>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="rq "> <div class="rq ">
@ -183,7 +193,7 @@
: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>
@ -255,7 +265,7 @@
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div> </div>
</template> </template>
@ -551,6 +561,13 @@
planOperatorName:'', planOperatorName:'',
workTime:'', workTime:'',
remark:'', remark:'',
actualOperatorName: '',
checkResult: '',
planID: '',
objectID: '',
checker: '',
checkerName: '',
status: ''
}, },
columnDetailList: [ columnDetailList: [
{ {
@ -691,7 +708,8 @@
checker: '', checker: '',
checkerName: '', checkerName: '',
difficultyLevel: '', difficultyLevel: '',
difficultyRemark: ''
difficultyRemark: '',
status: ''
}, },
submitModelFlag: false submitModelFlag: false
} }
@ -715,10 +733,8 @@
console.log(this.$route.meta.menuId) console.log(this.$route.meta.menuId)
userFavoriteList(userFavorite).then(({data}) => { userFavoriteList(userFavorite).then(({data}) => {
for (let i = 0; i < data.list.length; i++) { for (let i = 0; i < data.list.length; i++) {
// let flag=false;
if(this.$route.meta.menuId==data.list[i].menuId){ if(this.$route.meta.menuId==data.list[i].menuId){
this.favorite = true this.favorite = true
// flag=true;
} }
} }
}) })
@ -730,17 +746,10 @@
functionId: this.$route.meta.menuId, functionId: this.$route.meta.menuId,
} }
if (this.favorite) { if (this.favorite) {
//
// this.$confirm(``, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
// })
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
} else { } else {
// //
saveUserFavorite(userFavorite).then(({data}) => { saveUserFavorite(userFavorite).then(({data}) => {
@ -767,7 +776,6 @@
this.planOperator = val.AdminID this.planOperator = val.AdminID
this.planOperatorName = val.AdminName this.planOperatorName = val.AdminName
} }
}, },
//excel //excel
async createExportData() { async createExportData() {
@ -779,7 +787,7 @@
return this.exportList; return this.exportList;
}, },
startDownload() { startDownload() {
// this.exportData = this.dataList
}, },
finishDownload() { finishDownload() {
@ -832,33 +840,28 @@
this.dataListSelections = val this.dataListSelections = val
}, },
// //
checkModal(row){
this.submitData.site = row.site
this.submitData.orderNo = row.orderNo
this.submitData.planID = row.planID
this.submitData.objectID = row.objectID
this.submitData.checker = row.checker
this.submitData.checkerName = row.checkerName
checkModal(){
this.submitData.site = this.saveData.site
this.submitData.orderNo = this.saveData.orderNo
this.submitData.planID = this.saveData.planID
this.submitData.objectID = this.saveData.objectID
this.submitData.checker = this.saveData.checker
this.submitData.checkerName = this.saveData.checkerName
this.submitData.status = this.saveData.status
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
} }
selectNameByMes(tempData).then(({data}) => {
if (data.rows[0].adminName != this.submitData.checkerName){
this.$alert('审核人员与计划不符!', '错误', {
confirmButtonText: '确定',
type: 'warning'
})
return false
}
this.$confirm(`是否确认审核?`, '提示', {
if (this.submitData.status === '已完工'){
this.$confirm(`是否取消审核?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
checkWorkOrder(this.submitData).then(({data}) => { checkWorkOrder(this.submitData).then(({data}) => {
if (data && data.code == 0) {
this.getDataList()
if (data && data.code === 0) {
this.getDataList();
this.detailModelFlag = false;
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -874,8 +877,41 @@
}) })
}).catch(() => { }).catch(() => {
}) })
})
// this.submitModelFlag = true
}else if (this.submitData.status === '待审核'){
selectNameByMes(tempData).then(({data}) => {
if (data.rows[0].adminName != this.submitData.checkerName){
this.$alert('审核人员与计划不符!', '错误', {
confirmButtonText: '确定',
type: 'warning'
})
return false
}
this.$confirm(`是否确认审核?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
checkWorkOrder(this.submitData).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: '确定'
})
}
})
}).catch(() => {
})
})
}
}, },
// //
submitModel(){ submitModel(){
@ -904,7 +940,7 @@
}) })
}, },
//
//
reportModal(row){ reportModal(row){
let indata = { let indata = {
site: row.site, site: row.site,
@ -923,7 +959,13 @@
planOperatorName: row.planOperatorName, planOperatorName: row.planOperatorName,
workTime: row.workTime, workTime: row.workTime,
remark: row.remark, remark: row.remark,
},
actualOperatorName: row.actualOperatorName,
checkResult: row.checkResult,
objectID: row.objectID,
checker: row.checker,
checkerName: row.checkerName,
status: row.status
}
this.detailModelFlag = true; this.detailModelFlag = true;
}, },
cancelOrder(row){ cancelOrder(row){

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

@ -7,13 +7,13 @@
</span> </span>
</div> </div>
<el-form-item :label="'计划编码'"> <el-form-item :label="'计划编码'">
<el-input v-model="searchData.planID" style="width: 120px"></el-input>
<el-input v-model="searchData.planID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'设备编码'"> <el-form-item :label="'设备编码'">
<el-input v-model="searchData.objectID" style="width: 120px"></el-input>
<el-input v-model="searchData.objectID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'计划执行人员'"> <el-form-item :label="'计划执行人员'">
<el-input v-model="searchData.planOperator" style="width: 120px"></el-input>
<el-input v-model="searchData.planOperator" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'状态'"> <el-form-item :label="'状态'">
<el-select filterable v-model="searchData.status" style="width: 130px"> <el-select filterable v-model="searchData.status" style="width: 130px">
@ -35,7 +35,7 @@
<el-form-item style="margin-top: 23px;"> <el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber> <laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item> </el-form-item>
<el-form-item :label="' '">
<el-form-item :label="' '">
<el-date-picker <el-date-picker
style="width: 120px" style="width: 120px"
v-model="searchData.endDate" v-model="searchData.endDate"
@ -44,7 +44,7 @@
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="' '">
<el-form-item :label="' '">
<el-button @click="searchClick()">查询</el-button> <el-button @click="searchClick()">查询</el-button>
<el-button type="primary" @click="changeModel()">更改机修人员</el-button> <el-button type="primary" @click="changeModel()">更改机修人员</el-button>
<download-excel <download-excel
@ -100,7 +100,7 @@
: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>
@ -111,9 +111,9 @@
width="100" width="100"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status=='待审核'" @click="checkModal(scope.row)">审核</a>
<a type="text" size="small" v-if="scope.row.status=='未开工'" @click="cancelOrder(scope.row)">取消工单</a>
<a type="text" size="small" v-if="scope.row.status=='已完工' || scope.row.status=='待审核'" @click="reportModal(scope.row)">详情</a>
<!-- <a type="text" size="small" v-if="scope.row.status=='待审核'" @click="checkModal(scope.row)">审核</a>-->
<a type="text" size="small" v-if="scope.row.status==='未开工'" @click="cancelOrder(scope.row)">取消工单</a>
<a type="text" size="small" v-if="scope.row.status==='已完工' || scope.row.status==='待审核'" @click="reportModal(scope.row)">详情</a>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -144,16 +144,20 @@
<el-form-item :label="'维保结论'"> <el-form-item :label="'维保结论'">
<el-input v-model="saveData.checkResult" disabled style="width: 120px"></el-input> <el-input v-model="saveData.checkResult" disabled style="width: 120px"></el-input>
</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-input v-model="saveData.disposalMeasures" disabled 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-model="saveData.workTime" type="number" 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: 525px"></el-input>
<el-input v-model="saveData.remark" disabled style="width: 523px"></el-input>
</el-form-item>
<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>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="rq "> <div class="rq ">
@ -212,10 +216,10 @@
<el-form :inline="true" label-position="top" > <el-form :inline="true" label-position="top" >
<el-form-item style="margin-left: 10px" > <el-form-item style="margin-left: 10px" >
<span slot="label" style="" @click="getBaseList(201)"><a herf="#">计划执行人员</a></span> <span slot="label" style="" @click="getBaseList(201)"><a herf="#">计划执行人员</a></span>
<el-input v-model="planOperator" style="width: 120px"></el-input>
<el-input v-model="planOperator" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'人员名称'"> <el-form-item :label="'人员名称'">
<el-input v-model="planOperatorName" disabled style="width: 120px"></el-input>
<el-input v-model="planOperatorName" disabled style="width: 120px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
@ -224,7 +228,7 @@
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div> </div>
</template> </template>
@ -261,9 +265,9 @@
} }
}, },
data () { data () {
return { //
return {
//
favorite: false, favorite: false,
// start // start
exportData: [], exportData: [],
exportName: "维保工单" + this.dayjs().format('YYYYMMDDHHmmss'), exportName: "维保工单" + this.dayjs().format('YYYYMMDDHHmmss'),
@ -290,7 +294,6 @@
pageIndex: 1, pageIndex: 1,
pageSize: 100, pageSize: 100,
totalPage: 0, totalPage: 0,
dataList: [], dataList: [],
dataListLoading: false, dataListLoading: false,
dataListSelections: [], dataListSelections: [],
@ -593,7 +596,12 @@
remark:'', remark:'',
actualOperatorName: '', actualOperatorName: '',
checkResult: '', checkResult: '',
disposalMeasures: ''
disposalMeasures: '',
planID: '',
objectID: '',
checker: '',
checkerName: '',
status: ''
}, },
columnDetailList: [ columnDetailList: [
{ {
@ -752,13 +760,10 @@
userId: this.$store.state.user.id, userId: this.$store.state.user.id,
languageCode: this.$i18n.locale languageCode: this.$i18n.locale
} }
console.log(this.$route.meta.menuId)
userFavoriteList(userFavorite).then(({data}) => { userFavoriteList(userFavorite).then(({data}) => {
for (let i = 0; i < data.list.length; i++) { for (let i = 0; i < data.list.length; i++) {
// let flag=false;
if(this.$route.meta.menuId==data.list[i].menuId){ if(this.$route.meta.menuId==data.list[i].menuId){
this.favorite = true this.favorite = true
// flag=true;
} }
} }
}) })
@ -770,17 +775,10 @@
functionId: this.$route.meta.menuId, functionId: this.$route.meta.menuId,
} }
if (this.favorite) { if (this.favorite) {
//
// this.$confirm(``, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
// })
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
} else { } else {
// //
saveUserFavorite(userFavorite).then(({data}) => { saveUserFavorite(userFavorite).then(({data}) => {
@ -818,7 +816,7 @@
return this.exportList; return this.exportList;
}, },
startDownload() { startDownload() {
// this.exportData = this.dataList
}, },
finishDownload() { finishDownload() {
@ -938,6 +936,7 @@
} }
}) })
}, },
//
reportModal(row){ reportModal(row){
let indata = { let indata = {
site: row.site, site: row.site,
@ -958,56 +957,88 @@
remark: row.remark, remark: row.remark,
actualOperatorName: row.actualOperatorName, actualOperatorName: row.actualOperatorName,
checkResult: row.checkResult, checkResult: row.checkResult,
disposalMeasures: row.disposalMeasures
disposalMeasures: row.disposalMeasures,
objectID: row.objectID,
checker: row.checker,
checkerName: row.checkerName,
status: row.status
}, },
this.detailModelFlag = true; this.detailModelFlag = true;
}, },
// //
checkModal(row){
this.submitData.site = row.site
this.submitData.orderNo = row.orderNo
this.submitData.planID = row.planID
this.submitData.objectID = row.objectID
this.submitData.checker = row.checker
this.submitData.checkerName = row.checkerName
checkModal(){
this.submitData.site = this.saveData.site
this.submitData.orderNo = this.saveData.orderNo
this.submitData.planID = this.saveData.planID
this.submitData.objectID = this.saveData.objectID
this.submitData.checker = this.saveData.checker
this.submitData.checkerName = this.saveData.checkerName
this.submitData.status = this.saveData.status
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
} }
selectNameByMes(tempData).then(({data}) => {
if (data.rows[0].adminName != this.submitData.checkerName){
this.$alert('审核人员与计划不符!', '错误', {
confirmButtonText: '确定',
type: 'warning'
if (this.submitData.status === '已完工'){
this.$confirm(`是否取消审核?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
checkWorkOrder(this.submitData).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: '确定'
})
}
}) })
return false
}else {
this.$confirm(`是否确认审核?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
checkWorkOrder(this.submitData).then(({data}) => {
if (data && data.code == 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch(() => {
})
}else if (this.submitData.status === '待审核'){
selectNameByMes(tempData).then(({data}) => {
if (data.rows[0].adminName != this.submitData.checkerName){
this.$alert('审核人员与计划不符!', '错误', {
confirmButtonText: '确定',
type: 'warning'
}) })
}).catch(() => {
})
}
})
return false
}else {
this.$confirm(`是否确认审核?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
checkWorkOrder(this.submitData).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: '确定'
})
}
})
}).catch(() => {
})
}
})
}
}, },
} }

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

@ -5,7 +5,7 @@
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg> <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span> </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="'计划编码'">
<el-input v-model="searchData.planID" style="width: 120px"></el-input> <el-input v-model="searchData.planID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
@ -27,7 +27,7 @@
<el-form-item style="margin-top: 23px;"> <el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber> <laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item> </el-form-item>
<el-form-item :label="' '">
<el-form-item :label="' '">
<el-date-picker <el-date-picker
style="width: 120px" style="width: 120px"
v-model="searchData.endDate" v-model="searchData.endDate"
@ -45,9 +45,9 @@
<el-option label="已取消" value="已取消"></el-option> <el-option label="已取消" value="已取消"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="' '">
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button> <el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增计划</el-button>
<el-button type="primary" @click="addModal()">新增计划</el-button>
<download-excel <download-excel
:fields="fields()" :fields="fields()"
:data="exportData" :data="exportData"
@ -95,7 +95,7 @@
: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>
@ -106,10 +106,10 @@
width="200" width="200"
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>
@ -146,18 +146,24 @@
<el-date-picker <el-date-picker
style="width: 120px" style="width: 120px"
v-model="modalData.planStartDate" v-model="modalData.planStartDate"
type="date"
type="datetime"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="必选">
format='yyyy-MM-dd'
placeholder="必选"
:editable=false
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="计划结束日期:" prop="planEndDate" :rules="rules.planEndDateType"> <el-form-item label="计划结束日期:" prop="planEndDate" :rules="rules.planEndDateType">
<el-date-picker <el-date-picker
style="width: 120px" style="width: 120px"
v-model="modalData.planEndDate" v-model="modalData.planEndDate"
type="date"
type="datetime"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="必选">
format='yyyy-MM-dd'
placeholder="必选"
:editable=false
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="点检周期(天):" prop="planPeriod" :rules="rules.planPeriodType"> <el-form-item label="点检周期(天):" prop="planPeriod" :rules="rules.planPeriodType">
@ -166,6 +172,10 @@
<el-form-item label="备注:"> <el-form-item label="备注:">
<el-input v-model="modalData.remark" style="width: 120px"></el-input> <el-input v-model="modalData.remark" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="' '">-->
<!--&lt;!&ndash; <el-input v-model="modalData.remark" style="width: 120px">周末</el-input>&ndash;&gt;-->
<!-- <input type="radio" value="0" v-model="sex">周末-->
<!-- </el-form-item>-->
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: 0px;"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: 0px;">
<el-form-item prop="operatorName" :rules="rules.operatorNameType"> <el-form-item prop="operatorName" :rules="rules.operatorNameType">
@ -177,6 +187,11 @@
<el-input v-model="modalData.checkerName" style="width: 255px"></el-input> <el-input v-model="modalData.checkerName" style="width: 255px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: 0px;">-->
<!-- <el-form-item label="备注:">-->
<!-- <el-input v-model="modalData.remark" style="width: 525px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<div style="text-align: center ;font-size: 11px"> <div style="text-align: center ;font-size: 11px">
<span> ----------------------------------------------------选择设备----------------------------------------------------</span> <span> ----------------------------------------------------选择设备----------------------------------------------------</span>
</div> </div>
@ -332,16 +347,6 @@
min-width="30" min-width="30"
label="设备区域"> label="设备区域">
</el-table-column> </el-table-column>
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="100"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="delPlanDetail(scope.row)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table> </el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveData()">保存</el-button> <el-button type="primary" @click="saveData()">保存</el-button>
@ -368,9 +373,6 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="' '">
<!-- <el-button type="primary" @click="addDetailModal()">新增</el-button>-->
</el-form-item>
</el-form> </el-form>
<el-table <el-table
:height="300" :height="300"
@ -426,7 +428,7 @@
</el-form> </el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="点检方法说明:"> <el-form-item label="点检方法说明:">
<el-input v-model="itemModalData.itemRemark" style="width: 254px"></el-input>
<el-input v-model="itemModalData.itemRemark" style="width: 254px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'是否值可选'"> <el-form-item :label="'是否值可选'">
<el-select filterable v-model="itemModalData.valueChooseFlag" style="width: 120px"> <el-select filterable v-model="itemModalData.valueChooseFlag" style="width: 120px">
@ -437,13 +439,13 @@
</el-form> </el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="参照值:"> <el-form-item label="参照值:">
<el-input v-model="itemModalData.defaultValue" style="width: 120px"></el-input>
<el-input v-model="itemModalData.defaultValue" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最大值:"> <el-form-item label="最大值:">
<el-input v-model="itemModalData.maxValue" type="number" style="width: 120px"></el-input> <el-input v-model="itemModalData.maxValue" type="number" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最小值:"> <el-form-item label="最小值:">
<el-input v-model="itemModalData.minValue" type="number" style="width: 120px"></el-input>
<el-input v-model="itemModalData.minValue" type="number" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
@ -454,7 +456,7 @@
<el-dialog title="可选值" :close-on-click-modal="false" v-drag :visible.sync="chooseModalFlag" width="430px"> <el-dialog title="可选值" :close-on-click-modal="false" v-drag :visible.sync="chooseModalFlag" width="430px">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="点检项目名称:"> <el-form-item label="点检项目名称:">
<el-input v-model="chooseModalData.itemDesc" disabled style="width: 120px"></el-input>
<el-input v-model="chooseModalData.itemDesc" disabled style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'检测值类型'"> <el-form-item :label="'检测值类型'">
<el-select filterable v-model="chooseModalData.valueTypeDb" disabled style="width: 120px"> <el-select filterable v-model="chooseModalData.valueTypeDb" disabled style="width: 120px">
@ -463,7 +465,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button type="primary" @click="addChooseModal()">新增</el-button>
<el-button type="primary" @click="addChooseModal()">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -497,7 +499,7 @@
<el-dialog title="可选值维护" :close-on-click-modal="false" v-drag :visible.sync="itemAddModalFlag" width="215px" > <el-dialog title="可选值维护" :close-on-click-modal="false" v-drag :visible.sync="itemAddModalFlag" width="215px" >
<el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent> <el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>
<el-form-item :label="'可选值:'"> <el-form-item :label="'可选值:'">
<el-input v-model="itemData.availableValue" :type="itemFlag" style="width: 130px;"></el-input>
<el-input v-model="itemData.availableValue" :type="itemFlag" style="width: 130px;"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
@ -510,12 +512,12 @@
<!-- 机修人员清单 --> <!-- 机修人员清单 -->
<el-dialog title="机修人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px"> <el-dialog title="机修人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
<div class="rq"> <div class="rq">
<el-form :inline="true" label-position="top" :model="operatorData">
<el-form :inline="true" label-position="top" :model="operatorData">
<el-form-item :label="'人员编码'"> <el-form-item :label="'人员编码'">
<el-input v-model="operatorData.adminID" style="width: 120px"></el-input>
<el-input v-model="operatorData.adminID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'人员姓名'"> <el-form-item :label="'人员姓名'">
<el-input v-model="operatorData.adminName" style="width: 120px"></el-input>
<el-input v-model="operatorData.adminName" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button type="primary" @click="getOperatorList()">查询</el-button> <el-button type="primary" @click="getOperatorList()">查询</el-button>
@ -548,7 +550,7 @@
: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>
@ -563,12 +565,12 @@
<!-- 审核人员清单 --> <!-- 审核人员清单 -->
<el-dialog title="审核人员清单" :close-on-click-modal="false" v-drag :visible.sync="checkerModelFlag" width="820px"> <el-dialog title="审核人员清单" :close-on-click-modal="false" v-drag :visible.sync="checkerModelFlag" width="820px">
<div class="rq"> <div class="rq">
<el-form :inline="true" label-position="top" :model="checkerData">
<el-form :inline="true" label-position="top" :model="checkerData">
<el-form-item :label="'人员编码'"> <el-form-item :label="'人员编码'">
<el-input v-model="checkerData.adminID" style="width: 120px"></el-input>
<el-input v-model="checkerData.adminID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'人员姓名'"> <el-form-item :label="'人员姓名'">
<el-input v-model="checkerData.adminName" style="width: 120px"></el-input>
<el-input v-model="checkerData.adminName" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button type="primary" @click="getCheckerList()">查询</el-button> <el-button type="primary" @click="getCheckerList()">查询</el-button>
@ -601,7 +603,7 @@
: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>
@ -738,30 +740,7 @@
Chooselist Chooselist
}, },
watch: { watch: {
// searchData: {
// deep: true,
// handler: function (newV, oldV) {
// this.searchData.planID = this.searchData.planID.toUpperCase()
// this.searchData.objectID = this.searchData.objectID.toUpperCase()
// }
// },
// modalData: {
// deep: true,
// handler: function (newV, oldV) {
// this.modalData.planID = this.modalData.planID.toUpperCase()
// this.modalData.objectID = this.modalData.objectID.toUpperCase()
// this.modalData.propertiesCode = this.modalData.propertiesCode.toUpperCase()
// this.modalData.operator = this.modalData.operator.toUpperCase()
// }
// },
// detailData: {
// deep: true,
// handler: function (newV, oldV) {
// this.modalData.planID = this.modalData.planID.toUpperCase()
// this.modalData.itemNo = this.modalData.itemNo.toUpperCase()
// this.modalData.codeNo = this.modalData.codeNo.toUpperCase()
// }
// }
}, },
data () { data () {
return { return {
@ -1539,7 +1518,13 @@
trigger: 'change' trigger: 'change'
} }
], ],
}
},
//
pickerOptions: {
disabledDate(time) {
return time < this.dayjs().format("yyyy-MM-dd");
},
},
} }
}, },
mounted () { mounted () {
@ -1552,6 +1537,60 @@
this.getDataList() this.getDataList()
}, },
methods: { methods: {
//
getStandTime(data) {
let value =
data.getFullYear() +
"-" +
this.checkTime(data.getMonth() + 1) +
"-" +
this.checkTime(data.getDate()) +
" " +
this.checkTime(data.getHours()) +
":" +
this.checkTime(data.getMinutes()) +
":" +
this.checkTime(data.getSeconds());
return value;
},
// ,10 '0'
checkTime(i) {
if (i < 10) {
i = "0" + i;
}
return i;
},
//
handleChangeTime() {
//
//
let start = (new Date(this.modalData.planStartDate) * 1000) / 1000;
if (start < Date.now()) {
this.modalData.planStartDate = this.getStandTime(new Date());
this.$message({
message: "时间超出范围!",
type: "warning",
});
}
//
let end = (new Date(this.modalData.planEndDate) * 1000) / 1000;
if (end < Date.now()) {
this.modalData.planEndDate = this.getStandTime(new Date());
this.$message({
message: "时间超出范围!",
type: "warning",
});
}
//
if (start > end) {
this.modalData.planEndDate = this.modalData.planStartDate;
this.$message({
message: "结束时间小于开始时间!",
type: "warning",
});
}
},
// //
// //
operatorClickRow(row){ operatorClickRow(row){
@ -1589,12 +1628,6 @@
}) })
this.fastAddFlag = true; this.fastAddFlag = true;
}, },
// clickObject1(row){
// this.objectListRow1 = JSON.parse(JSON.stringify(row));
// },
// clickObject2(row){
// this.objectListRow2 = JSON.parse(JSON.stringify(row));
// },
// //
addObject(){ addObject(){
if(this.objectSelections1.length == 0){ if(this.objectSelections1.length == 0){
@ -1795,7 +1828,7 @@
return this.exportList; return this.exportList;
}, },
startDownload() { startDownload() {
// this.exportData = this.dataList
}, },
finishDownload() { finishDownload() {
@ -1819,7 +1852,7 @@
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
eamWorkPlanOverviewSearch(this.searchData).then(({data}) => { eamWorkPlanOverviewSearch(this.searchData).then(({data}) => {
if (data.code == 0) {
if (data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
@ -1921,7 +1954,7 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
eamWorkPlanDelete(row).then(({data}) => { eamWorkPlanDelete(row).then(({data}) => {
if (data && data.code ==0) {
if (data && data.code === 0) {
this.getDataList() this.getDataList()
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
@ -1940,37 +1973,37 @@
}) })
}, },
saveData(){ saveData(){
if (this.modalData.planDesc == '' || this.modalData.planDesc == null) {
if (this.modalData.planDesc === '' || this.modalData.planDesc == null) {
this.$alert('请输入计划描述 !', '错误', { this.$alert('请输入计划描述 !', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.operator == '' || this.modalData.operator == null) {
if (this.modalData.operator === '' || this.modalData.operator == null) {
this.$alert('请选择机修人员 !', '错误', { this.$alert('请选择机修人员 !', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.checker == '' || this.modalData.checker == null) {
if (this.modalData.checker === '' || this.modalData.checker == null) {
this.$alert('请选择审核人员 !', '错误', { this.$alert('请选择审核人员 !', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.propertiesCode == '' || this.modalData.propertiesCode == null) {
if (this.modalData.propertiesCode === '' || this.modalData.propertiesCode == null) {
this.$alert('请选择点检模板!', '错误', { this.$alert('请选择点检模板!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.planPeriod == '' || this.modalData.planPeriod == null) {
if (this.modalData.planPeriod === '' || this.modalData.planPeriod == null) {
this.$alert('选择点检周期!', '错误', { this.$alert('选择点检周期!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.planStartDate == '' || this.modalData.planStartDate == null) {
if (this.modalData.planStartDate === '' || this.modalData.planStartDate == null) {
this.$alert('请选择开始日期!', '错误', { this.$alert('请选择开始日期!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
@ -1982,7 +2015,7 @@
}) })
return return
} }
if (this.modalData.planEndDate == '' || this.modalData.planEndDate == null) {
if (this.modalData.planEndDate === '' || this.modalData.planEndDate == null) {
this.$alert('请选择结束日期!', '错误', { this.$alert('请选择结束日期!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
@ -2000,8 +2033,8 @@
}) })
return return
} }
if(this.modalData.flag=='1'){
if(this.dataListSelections.length == 0){
if(this.modalData.flag === '1'){
if(this.dataListSelections.length === 0){
this.$alert('请勾选设备!', '错误', { this.$alert('请勾选设备!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
@ -2295,6 +2328,7 @@
}).catch(() => { }).catch(() => {
}) })
}, },
objectIDBlur(){ objectIDBlur(){
let inData={ let inData={
site:this.$store.state.user.site, site:this.$store.state.user.site,
@ -2332,7 +2366,6 @@
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
planOrder(row).then(({data}) => { planOrder(row).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -2389,10 +2422,8 @@
console.log(this.$route.meta.menuId) console.log(this.$route.meta.menuId)
userFavoriteList(userFavorite).then(({data}) => { userFavoriteList(userFavorite).then(({data}) => {
for (let i = 0; i < data.list.length; i++) { for (let i = 0; i < data.list.length; i++) {
// let flag=false;
if(this.$route.meta.menuId==data.list[i].menuId){ if(this.$route.meta.menuId==data.list[i].menuId){
this.favorite = true this.favorite = true
// flag=true;
} }
} }
}) })
@ -2404,17 +2435,10 @@
functionId: this.$route.meta.menuId, functionId: this.$route.meta.menuId,
} }
if (this.favorite) { if (this.favorite) {
//
// this.$confirm(``, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
// })
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
} else { } else {
// //
saveUserFavorite(userFavorite).then(({data}) => { saveUserFavorite(userFavorite).then(({data}) => {

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

@ -5,15 +5,15 @@
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg> <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span> </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="'计划编码'">
<el-input v-model="searchData.planID" style="width: 120px"></el-input>
<el-input v-model="searchData.planID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'计划描述'"> <el-form-item :label="'计划描述'">
<el-input v-model="searchData.planDesc" style="width: 120px"></el-input>
<el-input v-model="searchData.planDesc" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'设备编码'"> <el-form-item :label="'设备编码'">
<el-input v-model="searchData.objectID" style="width: 120px"></el-input>
<el-input v-model="searchData.objectID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'计划开始日期:'"> <el-form-item :label="'计划开始日期:'">
<el-date-picker <el-date-picker
@ -45,9 +45,9 @@
<el-option label="已取消" value="已取消"></el-option> <el-option label="已取消" value="已取消"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="' '">
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button> <el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增计划</el-button>
<el-button type="primary" @click="addModal()">新增计划</el-button>
<download-excel <download-excel
:fields="fields()" :fields="fields()"
:data="exportData" :data="exportData"
@ -81,7 +81,7 @@
: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>
@ -118,7 +118,7 @@
<el-input v-model="modalData.planID" disabled style="width: 120px"></el-input> <el-input v-model="modalData.planID" disabled style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="计划描述:" prop="planDesc" :rules="rules.planDescType"> <el-form-item label="计划描述:" prop="planDesc" :rules="rules.planDescType">
<el-input v-model="modalData.planDesc" style="width: 120px"></el-input>
<el-input v-model="modalData.planDesc" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="propertiesCode" :rules="rules.propertiesCodeType"> <el-form-item prop="propertiesCode" :rules="rules.propertiesCodeType">
<span slot="label" style="" @click="getBaseList(1032)"><a herf="#">维保模板</a></span> <span slot="label" style="" @click="getBaseList(1032)"><a herf="#">维保模板</a></span>
@ -169,10 +169,10 @@
</div> </div>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -8px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -8px;">
<el-form-item label="设备编码"> <el-form-item label="设备编码">
<el-input v-model="objectData.objectID" style="width: 120px"></el-input>
<el-input v-model="objectData.objectID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备名称"> <el-form-item label="设备名称">
<el-input v-model="objectData.objectDesc" style="width: 120px"></el-input>
<el-input v-model="objectData.objectDesc" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label=" "> <el-form-item label=" ">
<el-button @click="getObjectList()">查询</el-button> <el-button @click="getObjectList()">查询</el-button>
@ -265,10 +265,10 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="点检周期(天):" prop="planPeriod" :rules="rules.planPeriodType"> <el-form-item label="点检周期(天):" prop="planPeriod" :rules="rules.planPeriodType">
<el-input v-model="modalData.planPeriod" type="number" onkeyup="value=value.replace(/^[^\d]+/g,'')" style="width: 120px"></el-input>
<el-input v-model="modalData.planPeriod" type="number" onkeyup="value=value.replace(/^[^\d]+/g,'')" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注:"> <el-form-item label="备注:">
<el-input v-model="modalData.remark" style="width: 120px"></el-input>
<el-input v-model="modalData.remark" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: 0px;"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: 0px;">
@ -327,12 +327,12 @@
</el-dialog> </el-dialog>
<el-dialog title="维保项目清单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="830px"> <el-dialog title="维保项目清单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="830px">
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'维保模板编码'"> <el-form-item :label="'维保模板编码'">
<el-input v-model="detailData.codeNo" readonly style="width: 120px"></el-input>
<el-input v-model="detailData.codeNo" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'维保模板名称'"> <el-form-item :label="'维保模板名称'">
<el-input v-model="detailData.codeDesc" readonly style="width: 120px"></el-input>
<el-input v-model="detailData.codeDesc" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="计划设备"> <el-form-item label="计划设备">
<el-select v-model="detailData.objectID" @change="objectChange()" placeholder="请选择"> <el-select v-model="detailData.objectID" @change="objectChange()" placeholder="请选择">
@ -345,7 +345,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="' '">
<el-form-item :label="' '">
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -365,7 +365,7 @@
: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>
@ -377,7 +377,7 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.valueChooseFlag=='Y'" @click="chooseModal(scope.row)">可选值</a> <a type="text" size="small" v-if="scope.row.valueChooseFlag=='Y'" @click="chooseModal(scope.row)">可选值</a>
<a type="text" size="small" @click="updateItemModal(scope.row)">编辑</a>
<a type="text" size="small" @click="updateItemModal(scope.row)">编辑</a>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -402,7 +402,7 @@
</el-form> </el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="维保方法说明:"> <el-form-item label="维保方法说明:">
<el-input v-model="itemModalData.itemRemark" style="width: 254px"></el-input>
<el-input v-model="itemModalData.itemRemark" style="width: 254px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'是否值可选'"> <el-form-item :label="'是否值可选'">
<el-select filterable v-model="itemModalData.valueChooseFlag" style="width: 120px"> <el-select filterable v-model="itemModalData.valueChooseFlag" style="width: 120px">
@ -413,13 +413,13 @@
</el-form> </el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="参照值:"> <el-form-item label="参照值:">
<el-input v-model="itemModalData.defaultValue" style="width: 120px"></el-input>
<el-input v-model="itemModalData.defaultValue" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最大值:"> <el-form-item label="最大值:">
<el-input v-model="itemModalData.maxValue" type="number" style="width: 120px"></el-input> <el-input v-model="itemModalData.maxValue" type="number" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最小值:"> <el-form-item label="最小值:">
<el-input v-model="itemModalData.minValue" type="number" style="width: 120px"></el-input>
<el-input v-model="itemModalData.minValue" type="number" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
@ -430,7 +430,7 @@
<el-dialog title="可选值" :close-on-click-modal="false" v-drag :visible.sync="chooseModalFlag" width="430px"> <el-dialog title="可选值" :close-on-click-modal="false" v-drag :visible.sync="chooseModalFlag" width="430px">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="维保项目名称:"> <el-form-item label="维保项目名称:">
<el-input v-model="chooseModalData.itemDesc" disabled style="width: 120px"></el-input>
<el-input v-model="chooseModalData.itemDesc" disabled style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'检测值类型'"> <el-form-item :label="'检测值类型'">
<el-select filterable v-model="chooseModalData.valueTypeDb" disabled style="width: 120px"> <el-select filterable v-model="chooseModalData.valueTypeDb" disabled style="width: 120px">
@ -439,7 +439,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button type="primary" @click="addChooseModal()">新增</el-button>
<el-button type="primary" @click="addChooseModal()">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -473,7 +473,7 @@
<el-dialog title="可选值维护" :close-on-click-modal="false" v-drag :visible.sync="itemAddModalFlag" width="215px" > <el-dialog title="可选值维护" :close-on-click-modal="false" v-drag :visible.sync="itemAddModalFlag" width="215px" >
<el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent> <el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>
<el-form-item :label="'可选值:'"> <el-form-item :label="'可选值:'">
<el-input v-model="itemData.availableValue" :type="itemFlag" style="width: 130px;"></el-input>
<el-input v-model="itemData.availableValue" :type="itemFlag" style="width: 130px;"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
@ -485,12 +485,12 @@
<!-- 机修人员清单 --> <!-- 机修人员清单 -->
<el-dialog title="机修人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px"> <el-dialog title="机修人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
<div class="rq"> <div class="rq">
<el-form :inline="true" label-position="top" :model="operatorData">
<el-form :inline="true" label-position="top" :model="operatorData">
<el-form-item :label="'人员编码'"> <el-form-item :label="'人员编码'">
<el-input v-model="operatorData.adminID" style="width: 120px"></el-input>
<el-input v-model="operatorData.adminID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'人员姓名'"> <el-form-item :label="'人员姓名'">
<el-input v-model="operatorData.adminName" style="width: 120px"></el-input>
<el-input v-model="operatorData.adminName" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button type="primary" @click="getOperatorList()">查询</el-button> <el-button type="primary" @click="getOperatorList()">查询</el-button>
@ -523,7 +523,7 @@
: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>
@ -538,12 +538,12 @@
<!-- 审核人员清单 --> <!-- 审核人员清单 -->
<el-dialog title="审核人员清单" :close-on-click-modal="false" v-drag :visible.sync="checkerModelFlag" width="820px"> <el-dialog title="审核人员清单" :close-on-click-modal="false" v-drag :visible.sync="checkerModelFlag" width="820px">
<div class="rq"> <div class="rq">
<el-form :inline="true" label-position="top" :model="checkerData">
<el-form :inline="true" label-position="top" :model="checkerData">
<el-form-item :label="'人员编码'"> <el-form-item :label="'人员编码'">
<el-input v-model="checkerData.adminID" style="width: 120px"></el-input>
<el-input v-model="checkerData.adminID" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'人员姓名'"> <el-form-item :label="'人员姓名'">
<el-input v-model="checkerData.adminName" style="width: 120px"></el-input>
<el-input v-model="checkerData.adminName" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button type="primary" @click="getCheckerList()">查询</el-button> <el-button type="primary" @click="getCheckerList()">查询</el-button>
@ -576,7 +576,7 @@
: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>
@ -673,7 +673,7 @@
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div> </div>
</template> </template>
@ -1685,7 +1685,6 @@
}) })
}, },
// //
favoriteIsOk() { favoriteIsOk() {
let userFavorite = { let userFavorite = {
@ -1695,10 +1694,8 @@
console.log(this.$route.meta.menuId) console.log(this.$route.meta.menuId)
userFavoriteList(userFavorite).then(({data}) => { userFavoriteList(userFavorite).then(({data}) => {
for (let i = 0; i < data.list.length; i++) { for (let i = 0; i < data.list.length; i++) {
// let flag=false;
if(this.$route.meta.menuId==data.list[i].menuId){ if(this.$route.meta.menuId==data.list[i].menuId){
this.favorite = true this.favorite = true
// flag=true;
} }
} }
}) })
@ -1710,17 +1707,10 @@
functionId: this.$route.meta.menuId, functionId: this.$route.meta.menuId,
} }
if (this.favorite) { if (this.favorite) {
//
// this.$confirm(``, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
// })
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
} else { } else {
// //
saveUserFavorite(userFavorite).then(({data}) => { saveUserFavorite(userFavorite).then(({data}) => {
@ -1728,7 +1718,6 @@
this.favorite = true this.favorite = true
}) })
} }
}, },
// S // S
@ -1781,7 +1770,7 @@
return this.exportList; return this.exportList;
}, },
startDownload() { startDownload() {
// this.exportData = this.dataList
}, },
finishDownload() { finishDownload() {
@ -1797,7 +1786,6 @@
}) })
json += "}" json += "}"
let s = eval("(" + json + ")") let s = eval("(" + json + ")")
return s return s
}, },
// end // end
@ -1926,37 +1914,37 @@
}) })
}, },
saveData(){ saveData(){
if (this.modalData.planDesc == '' || this.modalData.planDesc == null) {
if (this.modalData.planDesc === '' || this.modalData.planDesc == null) {
this.$alert('请输入计划描述 !', '错误', { this.$alert('请输入计划描述 !', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.operator == '' || this.modalData.operator == null) {
if (this.modalData.operator === '' || this.modalData.operator == null) {
this.$alert('请选择机修人员 !', '错误', { this.$alert('请选择机修人员 !', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.checker == '' || this.modalData.checker == null) {
if (this.modalData.checker === '' || this.modalData.checker == null) {
this.$alert('请选择审核人员 !', '错误', { this.$alert('请选择审核人员 !', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.propertiesCode == '' || this.modalData.propertiesCode == null) {
if (this.modalData.propertiesCode === '' || this.modalData.propertiesCode == null) {
this.$alert('请选择维保模板!', '错误', { this.$alert('请选择维保模板!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.planPeriod == '' || this.modalData.planPeriod == null) {
if (this.modalData.planPeriod === '' || this.modalData.planPeriod == null) {
this.$alert('选择维保周期!', '错误', { this.$alert('选择维保周期!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if (this.modalData.planStartDate == '' || this.modalData.planStartDate == null) {
if (this.modalData.planStartDate === '' || this.modalData.planStartDate == null) {
this.$alert('请选择开始日期!', '错误', { this.$alert('请选择开始日期!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
@ -1968,7 +1956,7 @@
}) })
return return
} }
if (this.modalData.planEndDate == '' || this.modalData.planEndDate == null) {
if (this.modalData.planEndDate === '' || this.modalData.planEndDate == null) {
this.$alert('请选择结束日期!', '错误', { this.$alert('请选择结束日期!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
@ -1986,8 +1974,8 @@
}) })
return return
} }
if(this.modalData.flag=='1'){
if(this.dataListSelections.length==0){
if(this.modalData.flag === '1'){
if(this.dataListSelections.length === 0){
this.$alert('请勾选设备!', '错误', { this.$alert('请勾选设备!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })

23
src/views/modules/reportWorkOrder/reportDefectOrder.vue

@ -131,7 +131,7 @@
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm:ss' value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss'
placeholder="开始日期"
placeholder="开始时间"
@change="handleChangeTime" @change="handleChangeTime"
> >
</el-date-picker> </el-date-picker>
@ -143,7 +143,7 @@
type="datetime" type="datetime"
value-format='yyyy-MM-dd HH:mm:ss' value-format='yyyy-MM-dd HH:mm:ss'
format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss'
placeholder="结束日期"
placeholder="结束时间"
@change="handleChangeTime" @change="handleChangeTime"
> >
</el-date-picker> </el-date-picker>
@ -776,6 +776,7 @@
} }
}, },
// //
operatorClickRow(row){ operatorClickRow(row){
this.$refs.operatorTable.toggleRowSelection(row); this.$refs.operatorTable.toggleRowSelection(row);
@ -804,7 +805,7 @@
}, },
// //
confirmOperator(){ confirmOperator(){
if(this.dataListSelections2.length == 0){
if(this.dataListSelections2.length === 0){
this.$alert('请勾选人员!', '错误', { this.$alert('请勾选人员!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
@ -955,25 +956,25 @@
this.detailModelFlag = true; this.detailModelFlag = true;
}, },
saveCheckReport(){ saveCheckReport(){
if(this.saveData.defectID == '' || this.saveData.defectID == null){
if(this.saveData.defectID === '' || this.saveData.defectID == null){
this.$alert('请选择故障编码!', '错误', { this.$alert('请选择故障编码!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if(this.saveData.startDate == '' || this.saveData.startDate == null){
if(this.saveData.startDate === '' || this.saveData.startDate == null){
this.$alert('请输入开始时间!', '错误', { this.$alert('请输入开始时间!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if(this.saveData.endDate == '' || this.saveData.endDate == null){
if(this.saveData.endDate === '' || this.saveData.endDate == null){
this.$alert('请输入结束时间!', '错误', { this.$alert('请输入结束时间!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if(this.saveData.workTime == 0){
if(this.saveData.workTime === 0){
this.$alert('工作时长不能为0!', '错误', { this.$alert('工作时长不能为0!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
@ -985,19 +986,19 @@
}) })
return false return false
} }
if(this.saveData.result==''||this.saveData.result==null){
if(this.saveData.result === '' || this.saveData.result == null){
this.$alert('请选择维修结果!', '错误', { this.$alert('请选择维修结果!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if(this.saveData.result == '维修失败' && (this.saveData.disposalMeasures == null || this.saveData.disposalMeasures == '')){
if(this.saveData.result === '维修失败' && (this.saveData.disposalMeasures == null || this.saveData.disposalMeasures === '')){
this.$alert('请选择处置措施!', '错误', { this.$alert('请选择处置措施!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
return false return false
} }
if(this.saveData.operator == null || this.saveData.operator == ''){
if(this.saveData.operator == null || this.saveData.operator === ''){
this.$alert('请选择维修人员!', '错误', { this.$alert('请选择维修人员!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
@ -1011,7 +1012,7 @@
// return false // return false
// }else { // }else {
saveOrderReportForDefect(this.saveData).then(({data}) => { saveOrderReportForDefect(this.saveData).then(({data}) => {
if (data && data.code == '0') {
if (data && data.code === 0) {
this.getDataList() this.getDataList()
this.detailModelFlag = false this.detailModelFlag = false
this.$message({ this.$message({

2
src/views/modules/reportWorkOrder/report_image_upload.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="customer-css"> <div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 520px;" class="customer-dialog">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 550px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px"> <el-form :inline="true" label-position="top" label-width="80px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">

Loading…
Cancel
Save