Commit 41f52d4e by lichengming

修改了样品拆分判断选中样品数量

parent 07f2e653
...@@ -267,7 +267,11 @@ export default { ...@@ -267,7 +267,11 @@ export default {
}) })
}, },
_sampleSplit() { _sampleSplit() {
this.$refs.splitModal._open(this.selectData[0], this.contractId) if (this.selectData.length === 1) {
this.$refs.splitModal._open(this.selectData[0])
} else {
this.$Message.warning('请选择一条数据')
}
}, },
_samplePre() { _samplePre() {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
......
...@@ -280,8 +280,7 @@ export default { ...@@ -280,8 +280,7 @@ export default {
break break
} }
}, },
_open(data, id) { _open(data) {
console.log(id)
this.sampleId = '' this.sampleId = ''
this.formObj = {} this.formObj = {}
this.sampleId = data.id this.sampleId = data.id
...@@ -303,9 +302,6 @@ export default { ...@@ -303,9 +302,6 @@ export default {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.$refs.pageTable._clearSelection() this.$refs.pageTable._clearSelection()
// this._page() // this._page()
for (let i = 0; i < data.length; i++) {
data[i]._XID = undefined
}
this.getPage.records.push(this.formObj) this.getPage.records.push(this.formObj)
console.log('123456', this.getPage.records) console.log('123456', this.getPage.records)
}, },
......
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