|
@@ -651,7 +651,8 @@ export default {
|
|
|
//如果取小样
|
|
//如果取小样
|
|
|
if (this.conditionType == 2) {
|
|
if (this.conditionType == 2) {
|
|
|
// this.baseForm.sampleMeasureUnit = this.$refs.table12.getData()[0].measureUnit
|
|
// this.baseForm.sampleMeasureUnit = this.$refs.table12.getData()[0].measureUnit
|
|
|
- this.formData.sampleUnit = this.$refs.table12.getData()[0].measureUnit
|
|
|
|
|
|
|
+ const data1 = this.$refs.table12.getData()
|
|
|
|
|
+ this.formData.sampleUnit = data1[0]?.measureUnit;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -857,7 +858,10 @@ export default {
|
|
|
getNewSampleList(measureQ, unit, nums) {
|
|
getNewSampleList(measureQ, unit, nums) {
|
|
|
this.sampleList = [];
|
|
this.sampleList = [];
|
|
|
let data = [];
|
|
let data = [];
|
|
|
-
|
|
|
|
|
|
|
+ if (this.selectedList.length == 0) {
|
|
|
|
|
+ this.$message.warning('请先选择样品!')
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.selectedList.forEach(oldItem => {
|
|
this.selectedList.forEach(oldItem => {
|
|
|
|
|
|
|
|
delete oldItem.id;
|
|
delete oldItem.id;
|
|
@@ -900,6 +904,7 @@ export default {
|
|
|
let unit = this.formData.sampleUnit;
|
|
let unit = this.formData.sampleUnit;
|
|
|
let nums = Number(this.formData.portion);
|
|
let nums = Number(this.formData.portion);
|
|
|
|
|
|
|
|
|
|
+ console.log(measureQ, unit, nums, 'measureQ, unit, nums')
|
|
|
this.getNewSampleList(measureQ, unit, nums)
|
|
this.getNewSampleList(measureQ, unit, nums)
|
|
|
}
|
|
}
|
|
|
this.activeName = '2'
|
|
this.activeName = '2'
|