Commit 546e3c66 by lichengming

修改了试样检测的判断填写原始记录

parent 2b1dcf46
...@@ -429,17 +429,13 @@ export default { ...@@ -429,17 +429,13 @@ export default {
}, },
_submitItem(data) { _submitItem(data) {
console.log(data) console.log(data)
if (data[0].recorded !== '是') { this.$Modal.confirm({
this.$Message.warning('未编制报告不能提交') title: '提示',
} else { content: '确定提交该数据?',
this.$Modal.confirm({ onOk: () => {
title: '提示', this._submitOk()
content: '确定提交该数据?', }
onOk: () => { })
this._submitOk()
}
})
}
}, },
_submitOk: async function() { _submitOk: async function() {
const result = await soilTest.endExp(this.selectIds.join(',')) const result = await soilTest.endExp(this.selectIds.join(','))
...@@ -451,8 +447,20 @@ export default { ...@@ -451,8 +447,20 @@ export default {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$message.warning('请至少选择一条数据') this.$message.warning('请至少选择一条数据')
} else { } else {
console.log('打开填写原始记录界面') const errorInfo = []
this.$refs.recordModal._open(this.selectIds, this.entrustId) for (let i = 0; i < this.selectData.length; i++) {
console.log(this.selectData[i].recorded)
if (this.selectData[i].recorded === '否') {
errorInfo.push(this.selectData[i].index + 1)
}
}
console.log('未编制报告', errorInfo)
if (errorInfo.length !== 0) {
this.$Message.warning('第' + errorInfo + '条数据未编制报告')
} else {
console.log('打开填写原始记录界面')
this.$refs.recordModal._open(this.selectIds, this.entrustId)
}
} }
}, },
_allotByPerson() { _allotByPerson() {
......
...@@ -352,17 +352,13 @@ export default { ...@@ -352,17 +352,13 @@ export default {
}, },
_submitItem(data) { _submitItem(data) {
console.log(data) console.log(data)
if (data[0].recorded !== '是') { this.$Modal.confirm({
this.$Message.warning('未编制报告不能提交') title: '提示',
} else { content: '确定提交该数据?',
this.$Modal.confirm({ onOk: () => {
title: '提示', this._submitOk()
content: '确定提交该数据?', }
onOk: () => { })
this._submitOk()
}
})
}
}, },
_submitOk: async function() { _submitOk: async function() {
const result = await soilTest.endExp(this.selectIds.join(',')) const result = await soilTest.endExp(this.selectIds.join(','))
...@@ -374,8 +370,20 @@ export default { ...@@ -374,8 +370,20 @@ export default {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$message.warning('请至少选择一条数据') this.$message.warning('请至少选择一条数据')
} else { } else {
console.log('打开填写原始记录界面') const errorInfo = []
this.$refs.recordModal._open(this.selectIds, this.entrustId) for (let i = 0; i < this.selectData.length; i++) {
console.log(this.selectData[i].recorded)
if (this.selectData[i].recorded === '否') {
errorInfo.push(this.selectData[i].index + 1)
}
}
console.log('未编制报告', errorInfo)
if (errorInfo.length !== 0) {
this.$Message.warning('第' + errorInfo + '条数据未编制报告')
} else {
console.log('打开填写原始记录界面')
this.$refs.recordModal._open(this.selectIds, this.entrustId)
}
} }
}, },
// 信息维护 // 信息维护
......
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