代码更新

This commit is contained in:
2022-08-22 14:54:26 +08:00
parent 811d192b84
commit 778935ca8b
4 changed files with 67 additions and 4 deletions

View File

@@ -470,6 +470,37 @@ export default {
},
onSubmit() {
const msg = '是否继续!'
const data = this.form1.tableData
var flag = 0
for (var row of data) {
if (!row.value) {
flag = flag + 1
}
}
// 如果检测值一项都没填则提示是否继续
if (flag === data.length) {
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
crudPhysicalMst.saveResult(this.form1).then(res => {
this.close()
this.crud.toQuery()
this.notify('操作成功', 'success')
})
})
} else {
crudPhysicalMst.saveResult(this.form1).then(res => {
this.close()
this.crud.toQuery()
this.notify('操作成功', 'success')
})
}
},
onSubmit2() {
const data = this.form1.tableData
var flag = 0
for (var row of data) {

View File

@@ -475,8 +475,38 @@ export default {
format_inspection_item_type(row, column) {
return this.dict.label.QL_TEST_POINTTYPE[row.inspection_item_type]
},
onSubmit() {
const msg = '是否继续!'
const data = this.form1.tableData
var flag = 0
for (var row of data) {
if (!row.value) {
flag = flag + 1
}
}
// 如果检测值一项都没填则提示是否继续
if (flag === data.length) {
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
crudPhysicalMst.saveResult(this.form1).then(res => {
this.close()
this.crud.toQuery()
this.notify('操作成功', 'success')
})
})
} else {
crudPhysicalMst.saveResult(this.form1).then(res => {
this.close()
this.crud.toQuery()
this.notify('操作成功', 'success')
})
}
},
onSubmit2() {
const data = this.form1.tableData
var flag = 0
for (var row of data) {