|
|
@@ -587,6 +587,7 @@
|
|
|
return; //取样数量验证
|
|
|
if (unit === 'KG' && !this.validateWeight(measureQ, sampleCount))
|
|
|
return; // 若计量单位为重量,还需验证总重量是否足够
|
|
|
+ console.log(1111111111111);
|
|
|
|
|
|
await this.getNewFullSampleList(
|
|
|
Math.ceil(sampleCount),
|
|
|
@@ -596,7 +597,7 @@
|
|
|
} else if (this.isWeightStandardFullSample()) {
|
|
|
//抽检取计重取整样
|
|
|
if (!this.validateSampleCount(sampleCount)) return;
|
|
|
-
|
|
|
+ console.log(222222222222222222);
|
|
|
await this.handleWeightFullSample(sampleCount);
|
|
|
}
|
|
|
this.activeName = '2';
|
|
|
@@ -1254,18 +1255,24 @@
|
|
|
},
|
|
|
|
|
|
async handleWeightFullSample(sampleCount) {
|
|
|
+ const dataList = [];
|
|
|
for (const item of this.selectedList) {
|
|
|
const qualitySampleTemplateList = item.qualitySampleTemplateList
|
|
|
?.length
|
|
|
? JSON.parse(JSON.stringify(item.qualitySampleTemplateList))
|
|
|
: JSON.parse(JSON.stringify(this.schemeList));
|
|
|
- this.sampleList.push({
|
|
|
+ dataList.push({
|
|
|
...item,
|
|
|
- measureQuantity: sampleCount, //作为计量数量
|
|
|
+ // measureQuantity: sampleCount, //作为计量数量
|
|
|
sampleCode: await this.getSampleCode(),
|
|
|
qualitySampleTemplateList
|
|
|
});
|
|
|
}
|
|
|
+ if (dataList.length > sampleCount) {
|
|
|
+ this.sampleList = dataList.splice(0, sampleCount);
|
|
|
+ } else {
|
|
|
+ this.sampleList = dataList;
|
|
|
+ }
|
|
|
this.sampleNumber = this.sampleList.length;
|
|
|
},
|
|
|
|