|
@@ -1263,14 +1263,14 @@ export default {
|
|
|
},
|
|
|
|
|
|
handlePicChange(file, fileList) {
|
|
|
-
|
|
|
+ this.handlePicSuccess()
|
|
|
// console.log(this.seeTemp)
|
|
|
},
|
|
|
handlePicSuccess(response, file, fileList) {
|
|
|
console.log('文件上传成功时的钩子response', response, )
|
|
|
console.log('文件上传成功时的钩子file', file)
|
|
|
console.log('fileList', fileList)
|
|
|
-
|
|
|
+
|
|
|
//3张图片时,关闭新增的按钮
|
|
|
if (fileList.length == 3) {
|
|
|
document.getElementById('uploadPic').lastChild.style.display = "none"
|
|
@@ -1288,8 +1288,8 @@ export default {
|
|
|
console.log("333")
|
|
|
this.seeTemp.scenePhoto3 = response.execresult.LastInsertId.toString()
|
|
|
}
|
|
|
- console.log('this.picArr1', this.picArr1)
|
|
|
- console.log('this.seeTemp', this.seeTemp)
|
|
|
+ this.fileList = fileList;
|
|
|
+ console.log(this.fileList,'上传成功后的数组')
|
|
|
// 上传成功后 在调用图片保定合同的接口
|
|
|
this.handleSaveImg(1)
|
|
|
},
|
|
@@ -1905,16 +1905,14 @@ export default {
|
|
|
this.No2 = false
|
|
|
this.dialogFormVisible_maintainComplete = true
|
|
|
this.listAdd = []
|
|
|
-
|
|
|
- // this.handleDelALlImg(row);
|
|
|
},
|
|
|
// 如果有历史记录则删除所图图片
|
|
|
- async handleDelALlImg(row){
|
|
|
- const obj = row != undefined ? row : this.seeTemp
|
|
|
- if((obj.picId1 != '' || obj.picId1 != '-1' ) || (obj.picId2 != '' || obj.picId2 != '-1' ) || (obj.picId3 != '' || obj.picId3 != '-1' ) ){
|
|
|
- const obj = { name: "upkeepImage", parammaps: { id: this.seeTemp.id, picId1: '-1' , picId2: '-1', picId3: '-1' }}
|
|
|
+ async handleDelALlImg(){
|
|
|
+ console.log('完成保养确认---删除图片',this.maintainCompleteTemp)
|
|
|
+ if((this.maintainCompleteTemp.picId1 != '' || this.maintainCompleteTemp.picId1 != '-1' ) ){
|
|
|
+ const obj = { name: "upkeepImage", parammaps: { id: this.maintainCompleteTemp.id, picId1: '-1' , picId2: '-1', picId3: '-1' }}
|
|
|
const { data, code } = await saveImgIds(obj)
|
|
|
- console.log(data,code,'完成保养删除历史了')
|
|
|
+ console.log(data,code,'删除历史了')
|
|
|
}
|
|
|
},
|
|
|
changeIsOldProducts(val) {
|
|
@@ -2003,13 +2001,12 @@ export default {
|
|
|
if (this.maintainCompleteTemp.laidcou == 0) {
|
|
|
if (this.maintainCompleteTemp.isOldProducts == 0) {
|
|
|
console.log('否')
|
|
|
+ this.handleDelALlImg()
|
|
|
this.requestParam.name = 'completeUpkeep'
|
|
|
this.requestParam.parammaps = {}
|
|
|
this.requestParam.parammaps.id = this.maintainCompleteTemp.id
|
|
|
PostDataByName(this.requestParam).then((response) => {
|
|
|
if (response.msg !== 'fail') {
|
|
|
-
|
|
|
-
|
|
|
//如果有设备记录仪的权限
|
|
|
if(this.maintainCompleteTemp.isVideoBtnShow == '1'){
|
|
|
// 临时注释
|
|
@@ -2108,6 +2105,7 @@ export default {
|
|
|
this.postDataPramas.data[1] = { 'name': 'completeUpkeep', 'type': 'e', 'parammaps': {
|
|
|
id: this.maintainCompleteTemp.id
|
|
|
}}
|
|
|
+
|
|
|
ExecDataByConfig(this.postDataPramas).then(response => {
|
|
|
console.log('完成维修-是-保存发送参数', this.postDataPramas)
|
|
|
if (response.msg === 'fail') {
|
|
@@ -2118,10 +2116,12 @@ export default {
|
|
|
duration: 2000
|
|
|
})
|
|
|
} else {
|
|
|
+ this.handleDelALlImg()
|
|
|
this.dialogFormVisible_maintainComplete = false
|
|
|
this.dialogFormVisible_See = false
|
|
|
this.get_table_data()
|
|
|
this.getPendingList()
|
|
|
+
|
|
|
this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
|
|
|
}
|
|
|
})
|
|
@@ -2145,18 +2145,23 @@ export default {
|
|
|
// 保养审核
|
|
|
handleExamine(row) {
|
|
|
console.log('点击了保养审核', row, this.seeTemp, this.fileList)
|
|
|
- const obj = row != undefined ? row : this.seeTemp
|
|
|
- if(!this.fileList.length && obj.SHStatue == 2){
|
|
|
- this.$notify({ title: '提示', message: '请上传保养图片', type: 'warning', duration: 3000 })
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
if (row == undefined) {
|
|
|
+ console.log('里面审核')
|
|
|
this.examineTemp = this.seeTemp
|
|
|
this.$set(this.seeTemp, 'isStatue', 3)
|
|
|
this.$set(this.seeTemp, 'workflowNote', '')
|
|
|
this.$set(this.examineTemp, 'scores', '')
|
|
|
+ if(( this.seeTemp.scenePhoto1 == '-1' || this.seeTemp.scenePhoto1 == '' ) || !this.fileList.length ){
|
|
|
+ this.$notify({ title: '提示', message: '请上传保养图片', type: 'warning', duration: 3000 })
|
|
|
+ return
|
|
|
+ }
|
|
|
} else {
|
|
|
+ console.log('外面审核')
|
|
|
+ if((row.picId1 == '' || row.picId1 == '-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', '')
|