Commit 546e3c66 by lichengming

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

parent 2b1dcf46
...@@ -429,9 +429,6 @@ export default { ...@@ -429,9 +429,6 @@ export default {
}, },
_submitItem(data) { _submitItem(data) {
console.log(data) console.log(data)
if (data[0].recorded !== '是') {
this.$Message.warning('未编制报告不能提交')
} else {
this.$Modal.confirm({ this.$Modal.confirm({
title: '提示', title: '提示',
content: '确定提交该数据?', content: '确定提交该数据?',
...@@ -439,7 +436,6 @@ export default { ...@@ -439,7 +436,6 @@ export default {
this._submitOk() 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,9 +447,21 @@ export default { ...@@ -451,9 +447,21 @@ export default {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$message.warning('请至少选择一条数据') this.$message.warning('请至少选择一条数据')
} else { } else {
const errorInfo = []
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('打开填写原始记录界面') console.log('打开填写原始记录界面')
this.$refs.recordModal._open(this.selectIds, this.entrustId) this.$refs.recordModal._open(this.selectIds, this.entrustId)
} }
}
}, },
_allotByPerson() { _allotByPerson() {
const user = Global.getUserInfo('userInfo') const user = Global.getUserInfo('userInfo')
......
...@@ -352,9 +352,6 @@ export default { ...@@ -352,9 +352,6 @@ export default {
}, },
_submitItem(data) { _submitItem(data) {
console.log(data) console.log(data)
if (data[0].recorded !== '是') {
this.$Message.warning('未编制报告不能提交')
} else {
this.$Modal.confirm({ this.$Modal.confirm({
title: '提示', title: '提示',
content: '确定提交该数据?', content: '确定提交该数据?',
...@@ -362,7 +359,6 @@ export default { ...@@ -362,7 +359,6 @@ export default {
this._submitOk() 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,9 +370,21 @@ export default { ...@@ -374,9 +370,21 @@ export default {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$message.warning('请至少选择一条数据') this.$message.warning('请至少选择一条数据')
} else { } else {
const errorInfo = []
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('打开填写原始记录界面') console.log('打开填写原始记录界面')
this.$refs.recordModal._open(this.selectIds, this.entrustId) this.$refs.recordModal._open(this.selectIds, this.entrustId)
} }
}
}, },
// 信息维护 // 信息维护
_maintainInfo() { _maintainInfo() {
......
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