Commit 546e3c66 by lichengming

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

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