Commit 09ff6c2e by lichengming

修改了添加编辑委托单现场编号必填判断

parent 59c1e2d6
......@@ -736,6 +736,13 @@ export default {
if (valid) {
const data = this.$serialize('MeterSendTestEdit')
console.log(this.getPage.records)
for (let i = 0; i < this.getPage.records.length; i++) {
if (this.getPage.records[i].siteNo === '') {
this.$Message.error('有未填写现场编号的样品')
this._hideLoading()
return
}
}
if (this.$string(this.id).isEmpty()) {
// 添加
data.sampleList = this.getPage.records
......@@ -746,6 +753,7 @@ export default {
data.projectLeader = undefined
data.projectLeaderId = undefined
}
// alert('添加')
this._save(data)
} else {
data.id = this.id
......@@ -758,6 +766,7 @@ export default {
data.projectLeader = undefined
data.projectLeaderId = undefined
}
// alert('编辑')
this._edit(data)
}
} else {
......
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