Commit f8ced358 authored by 盖献康's avatar 盖献康

feat: bug(70668、70658)

parent b39fd189
......@@ -1058,10 +1058,11 @@ export default {
} else if (this.currentVehicleSampleInformation.length === 0) {
this.$message.error('请填写整车样品信息')
return
} else if (this.currentPartSampleInformation.length === 0) {
this.$message.error('请填写零件样品信息')
return
}
// else if (this.currentPartSampleInformation.length === 0) {
// this.$message.error('请填写零部件样品信息')
// return
// }
this.$confirm('是否确认进行发布功能', '发布', {
confirmButtonText: '确定',
concelButtonText: '取消',
......
......@@ -1051,10 +1051,11 @@ export default {
} else if (this.currentVehicleSampleInformation.length === 0) {
this.$message.error('请填写整车样品信息')
return
} else if (this.currentPartSampleInformation.length === 0) {
this.$message.error('请填写零件样品信息')
return
}
// else if (this.currentPartSampleInformation.length === 0) {
// this.$message.error('请填写零部件样品信息')
// return
// }
this.$confirm('是否确认进行发布功能', '发布', {
confirmButtonText: '确定',
concelButtonText: '取消',
......@@ -1143,53 +1144,43 @@ export default {
this.$modal.msgError('请填写部分内容再进行暂存')
return
}
this.$confirm('是否确认进行暂存功能', '暂存', {
confirmButtonText: '确定',
concelButtonText: '取消',
type: 'warning',
customClass: 'box-logout',
cancelButtonClass: 'resetBtn',
closeOnClickModal: false,
confirmButtonClass: 'queryBtn'
}).then(() => {
// 窜数据
for (const key in this.model) {
// eslint-disable-next-line no-prototype-builtins
if (this.taskCreateRequest.hasOwnProperty(key)) {
this.taskCreateRequest[key] = this.model[key]
}
// 窜数据
for (const key in this.model) {
// eslint-disable-next-line no-prototype-builtins
if (this.taskCreateRequest.hasOwnProperty(key)) {
this.taskCreateRequest[key] = this.model[key]
}
this.taskCreateRequest.taskList = this.model.inspectionItemList
this.tableData.forEach(item => {
item.deptName = item.dept.deptName
item.name = item.nickName
})
this.taskCreateRequest.auditors = this.tableData
this.taskCreateRequest.sample = this.currentVehicleSampleInformation
this.taskCreateRequest.sample.forEach(item => {
delete item.id
}
this.taskCreateRequest.taskList = this.model.inspectionItemList
this.tableData.forEach(item => {
item.deptName = item.dept.deptName
item.name = item.nickName
})
this.taskCreateRequest.auditors = this.tableData
this.taskCreateRequest.sample = this.currentVehicleSampleInformation
this.taskCreateRequest.sample.forEach(item => {
delete item.id
})
this.taskCreateRequest.partSample = this.currentPartSampleInformation
this.taskCreateRequest.partSample.forEach(item => {
delete item.id
})
console.log('暂存', this.taskCreateRequest)
if (this.taskTemporaryStorage !== null) {
// 暂存有数据再次暂存走编辑
this.taskCreateRequest.id = this.taskTemporaryStorage.id
editTemporaryStorage(this.taskCreateRequest).then(response => {
if (response.code === 200) {
this.$modal.msgSuccess('保存成功')
}
})
this.taskCreateRequest.partSample = this.currentPartSampleInformation
this.taskCreateRequest.partSample.forEach(item => {
delete item.id
} else {
temporaryTask(this.taskCreateRequest).then(response => {
if (response.code === 200) {
this.$modal.msgSuccess('保存成功')
}
})
console.log('暂存', this.taskCreateRequest)
if (this.taskTemporaryStorage !== null) {
// 暂存有数据再次暂存走编辑
this.taskCreateRequest.id = this.taskTemporaryStorage.id
editTemporaryStorage(this.taskCreateRequest).then(response => {
if (response.code === 200) {
this.$modal.msgSuccess('暂存成功')
}
})
} else {
temporaryTask(this.taskCreateRequest).then(response => {
if (response.code === 200) {
this.$modal.msgSuccess('暂存成功')
}
})
}
})
}
},
// 判断一个对象里的数据是否为空
areAllPropertiesEmpty(obj) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment