|
@@ -118,8 +118,8 @@
|
|
|
<el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8) && row.statue !== 0 && isComplete && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleCompleteMaintenance(row)">完成保养</el-button>
|
|
|
<el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleCompleteMaintenance(row)">完成保养</el-button>
|
|
|
<!-- 保养审核 -->
|
|
|
- <el-button v-if="(row.SHStatue == 2 ) && isCharge && row.useEmpId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine(row)">保养审核</el-button>
|
|
|
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine(row)">保养审核</el-button>
|
|
|
+ <el-button v-if="(row.SHStatue == 2 ) && isCharge && row.useEmpId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine(row)">保养审核2</el-button>
|
|
|
+ <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine(row)">保养审核2</el-button>
|
|
|
<!-- 保养审核3 -->
|
|
|
<el-button v-if="(row.SHStatue == 3) && isLeaderCharge" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine2(row)">保养审核3</el-button>
|
|
|
<el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine2(row)">保养审核3</el-button>
|
|
@@ -447,7 +447,7 @@
|
|
|
:auto-upload="true"
|
|
|
:on-preview="handlePicPreview"
|
|
|
:class="{ hide: showUpload }"
|
|
|
- :disabled="seeTemp.SHStatue != 3"
|
|
|
+ :disabled="seeTemp.SHStatue != 2"
|
|
|
:on-change="
|
|
|
(file, fileList) => {
|
|
|
return handlePicChange(file, fileList)
|
|
@@ -507,7 +507,7 @@
|
|
|
<el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
|
|
|
<el-button v-else type="success" style="width:70px;display:none" @click="handleExamine()">保养审核</el-button>
|
|
|
<!-- 保养审核3 -->
|
|
|
- <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核33</el-button>
|
|
|
+ <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
|
|
|
<el-button v-else type="success" style="width:70px;display:none" @click="handleExamine2()">保养审核3</el-button>
|
|
|
<!-- 保养审核2 -->
|
|
|
<!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine3()">保养审核2</el-button>
|
|
@@ -1254,8 +1254,11 @@ export default {
|
|
|
this.$notify({ title: '提示', message: '请上传保养图片', type: 'warning', duration: 3000 })
|
|
|
return false
|
|
|
}
|
|
|
- const obj = { name: "upkeepImage", parammaps: { id: this.seeTemp.id, "picId1": this.seeTemp.scenePhoto1, "picId2": this.seeTemp.scenePhoto2, "picId3": this.seeTemp.scenePhoto3 }}
|
|
|
- const { data } = await saveImgIds(obj)
|
|
|
+ const obj = { name: "upkeepImage", parammaps: { id: this.seeTemp.id, picId1: this.seeTemp.scenePhoto1.toString() , picId2: this.seeTemp.scenePhoto2.toString(), picId3: this.seeTemp.scenePhoto3.toString() }}
|
|
|
+ const { data, code } = await saveImgIds(obj)
|
|
|
+ if(code == 200){
|
|
|
+ this.$notify({ title: '提示', message: '保养图片上传成功', type: 'success', duration: 3000 })
|
|
|
+ }
|
|
|
console.log(data, '图片确认发布到保养中')
|
|
|
},
|
|
|
|
|
@@ -1315,7 +1318,9 @@ export default {
|
|
|
} else if (fileList.length == 1) {
|
|
|
this.seeTemp.scenePhoto1 = fileList[0].response.execresult.LastInsertId || fileList[0].picId1
|
|
|
}
|
|
|
- console.log(this.seeTemp)
|
|
|
+ console.log(this.fileList,'图片的fileList',this.seeTemp)
|
|
|
+ // 删除后更新图数量
|
|
|
+ this.handleSaveImg()
|
|
|
},
|
|
|
handlePicPreview(file) {
|
|
|
console.log(file,'放大查看')
|
|
@@ -1554,7 +1559,7 @@ export default {
|
|
|
},
|
|
|
form_see(row) {
|
|
|
this.seeTemp = Object.assign({}, row)
|
|
|
- console.log('查看--图片', this.seeTemp)
|
|
|
+ console.log('查看--图片1',this.seeTemp.SHStatue, this.seeTemp)
|
|
|
// 流程图
|
|
|
var reason = '未通过原因:' + this.seeTemp.workflowNote
|
|
|
var scores = '评分:' + this.seeTemp.scores + '分'
|
|
@@ -1567,21 +1572,7 @@ export default {
|
|
|
|
|
|
} else if (this.seeTemp.SHStatue === 3) {
|
|
|
this.active = 2
|
|
|
- if( row.picId1 !== '-1' && row.picId1 !== '') {
|
|
|
- this.seeTemp.scenePhoto1 = row.picId1
|
|
|
- // "uploads/thumbnail/insertcustompic/8e22df6c34c89686212997255c1ae5fe.jpeg"
|
|
|
- this.fileList[0] = { name: "picImg1", url: process.env.VUE_APP_BASE_API + row.picpath1 , picId1 : row.picId1 }
|
|
|
- }
|
|
|
- if( row.picId2 !== '-1' && row.picId2 !== '') {
|
|
|
- this.seeTemp.scenePhoto2 = row.picId2
|
|
|
- this.fileList[1] = { name: "picImg2", url: process.env.VUE_APP_BASE_API + row.picpath2, picId2 : row.picId2 }
|
|
|
- }
|
|
|
- if( row.picId3 !== '-1' && row.picId3 !== '') {
|
|
|
- this.seeTemp.scenePhoto3 = row.picId3
|
|
|
- this.fileList[2] = { name: "picImg3", url: process.env.VUE_APP_BASE_API + row.picpath3, picId3 : row.picId3 }
|
|
|
- }
|
|
|
this.activeList = [{ title: '保养人提交', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '设备主管审核' }]
|
|
|
-
|
|
|
} else if (this.seeTemp.SHStatue === 4) {
|
|
|
this.active = 2
|
|
|
this.activeList = [{ title: '保养人提交', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
|
|
@@ -1617,8 +1608,26 @@ export default {
|
|
|
this.listCollarUse = []
|
|
|
this.getCollarUse()
|
|
|
this.getOldProductsList()
|
|
|
+
|
|
|
+ // 只要有图片就全部展示出来
|
|
|
+ // row.picId1 = "21018"
|
|
|
+ // row.picpath1 = "uploads/thumbnail/insertcustompic/f3c5fa6b459ca3b2c29de8c33ea30ad6.jpg"
|
|
|
+ if( row.picId1 !== '-1' && row.picId1 !== '') {
|
|
|
+ this.seeTemp.scenePhoto1 = row.picId1
|
|
|
+ // "uploads/thumbnail/insertcustompic/8e22df6c34c89686212997255c1ae5fe.jpeg"
|
|
|
+ this.fileList[0] = { name: "picImg1", url: process.env.VUE_APP_BASE_API + row.picpath1 , picId1 : row.picId1 }
|
|
|
+ }
|
|
|
+ if( row.picId2 !== '-1' && row.picId2 !== '') {
|
|
|
+ this.seeTemp.scenePhoto2 = row.picId2
|
|
|
+ this.fileList[1] = { name: "picImg2", url: process.env.VUE_APP_BASE_API + row.picpath2, picId2 : row.picId2 }
|
|
|
+ }
|
|
|
+ if( row.picId3 !== '-1' && row.picId3 !== '') {
|
|
|
+ this.seeTemp.scenePhoto3 = row.picId3
|
|
|
+ this.fileList[2] = { name: "picImg3", url: process.env.VUE_APP_BASE_API + row.picpath3, picId3 : row.picId3 }
|
|
|
+ }
|
|
|
+ console.log('查看--图片2', this.fileList)
|
|
|
this.$nextTick(()=>{
|
|
|
- if(this.seeTemp.SHStatue !== 3){
|
|
|
+ if(this.seeTemp.SHStatue !== 2){
|
|
|
document.getElementById('uploadPic').lastChild.style.display = "none"
|
|
|
}else{
|
|
|
document.getElementById('uploadPic').lastChild.style.display = "inline-block"
|
|
@@ -2119,6 +2128,12 @@ export default {
|
|
|
// 保养审核
|
|
|
handleExamine(row) {
|
|
|
console.log('点击了保养审核')
|
|
|
+ const obj = row != undefined ? row : this.seeTemp
|
|
|
+ if((obj.picId1 == '' || obj.picId1 == '-1' ) && (obj.picId2 == '' || obj.picId2 == '-1' ) && (obj.picId3 == '' || obj.picId3 == '-1' ) && obj.SHStatue == 2){
|
|
|
+ this.$notify({ title: '提示', message: '请上传保养图片', type: 'warning', duration: 3000 })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if (row == undefined) {
|
|
|
this.examineTemp = this.seeTemp
|
|
|
this.$set(this.seeTemp, 'isStatue', 3)
|
|
@@ -2186,22 +2201,13 @@ export default {
|
|
|
},
|
|
|
// 保养审核2
|
|
|
handleExamine2(row) {
|
|
|
- console.log('点击了保养审核------99', row,this.seeTemp)
|
|
|
-
|
|
|
+ console.log('点击了保养审核------99')
|
|
|
|
|
|
if (row == undefined) {
|
|
|
- if((this.seeTemp.picId1 == '' || this.seeTemp.picId1 == '-1' ) && (this.seeTemp.picId2 == '' || this.seeTemp.picId2 == '-1' ) && (this.seeTemp.picId3 == '' || this.seeTemp.picId3 == '-1' )){
|
|
|
- this.$notify({ title: '提示', message: '请确认上传保养图片', type: 'warning', duration: 3000 })
|
|
|
- return
|
|
|
- }
|
|
|
this.examineTemp = this.seeTemp
|
|
|
this.$set(this.seeTemp, 'isStatue', 3)
|
|
|
this.$set(this.seeTemp, 'workflowNote', '')
|
|
|
} else {
|
|
|
- if((row.picId1 == '' || row.picId1 == '-1' ) && (row.picId2 == '' || row.picId2 == '-1' ) && (row.picId3 == '' || row.picId3 == '-1' )){
|
|
|
- this.$notify({ title: '提示', message: '当前无法审核,请确认上传保养图片', type: 'warning', duration: 3000 })
|
|
|
- return
|
|
|
- }
|
|
|
this.examineTemp = Object.assign({}, row)
|
|
|
this.$set(this.examineTemp, 'isStatue', 3)
|
|
|
this.$set(this.examineTemp, 'workflowNote', '')
|