| | |
| | | }) |
| | | this.getTotal(sampleList) |
| | | let trees = this.selectTree.split(" - ") |
| | | if (trees.length < 3) { |
| | | if (trees.length < 5) { |
| | | this.$message.error('未选择对象') |
| | | return |
| | | } |
| | | this.addObj.factory = trees[0] |
| | | this.addObj.laboratory = trees[1] |
| | | this.addObj.sampleType = trees[2] |
| | | if ((trees[3] === undefined || trees[3] === '') || trees.length === 4) { |
| | | this.addObj.sample = trees[2] |
| | | this.addObj.sampleType = trees[3] |
| | | if ((trees[5] === undefined || trees[5] === '') || trees.length === 6) { |
| | | this.addObj.sample = trees[4] |
| | | } else { |
| | | this.addObj.sample = trees[3] |
| | | this.addObj.sample = trees[5] |
| | | } |
| | | this.addObj.model = (trees[4] == undefined ? null : trees[4]) |
| | | this.addObj.model = (trees[6] == undefined ? null : trees[6]) |
| | | this.addObj.ifsInventoryId = this.customsInspection.id |
| | | this.noNeedCheckLoad = true |
| | | addExemptionOrder({ |
| | |
| | | }, |
| | | saveMethod(sampleList) { |
| | | let trees = this.selectTree.split(" - ") |
| | | if (trees.length < 3) { |
| | | if (trees.length < 5) { |
| | | this.$message.error('未选择对象') |
| | | return |
| | | } |
| | | this.addObj.factory = trees[0] |
| | | this.addObj.laboratory = trees[1] |
| | | this.addObj.sampleType = trees[2] |
| | | if ((trees[3] === undefined || trees[3] === '') || trees.length === 4) { |
| | | this.addObj.sample = trees[2] |
| | | this.addObj.sampleType = trees[4] |
| | | if ((trees[5] === undefined || trees[5] === '') || trees.length === 6) { |
| | | this.addObj.sample = trees[4] |
| | | } else { |
| | | this.addObj.sample = trees[3] |
| | | this.addObj.sample = trees[5] |
| | | } |
| | | this.addObj.model = (trees[4] == undefined ? null : trees[4]) |
| | | this.addObj.model = (trees[6] == undefined ? null : trees[6]) |
| | | this.addObj.ifsInventoryId = this.customsInspection.id |
| | | this.saveLoad = true |
| | | if (this.addObj.createTime) { |