소스 검색

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-qms

lucw 7 달 전
부모
커밋
bebf728e11
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/views/inspectionWork/components/newQualityContentTabs.vue

+ 5 - 1
src/views/inspectionWork/components/newQualityContentTabs.vue

@@ -472,6 +472,8 @@
     queryQualityInventory
     queryQualityInventory
   } from '@/api/inspectionWork';
   } from '@/api/inspectionWork';
   import { getQualityTemplateByIds } from '@/api/inspectionTemplate';
   import { getQualityTemplateByIds } from '@/api/inspectionTemplate';
+  import { getCodeList } from '@/api/login';
+
   export default {
   export default {
     components: {
     components: {
       inspectionTemplateDialog
       inspectionTemplateDialog
@@ -883,7 +885,7 @@
     },
     },
     methods: {
     methods: {
       //合格数量变化设置样品清单 全减并且不拆包才执行
       //合格数量变化设置样品清单 全减并且不拆包才执行
-      setSampleList(val, total) {
+      async setSampleList(val, total) {
         this.$set(this.sampleList[0], 'measureQuantity', val);
         this.$set(this.sampleList[0], 'measureQuantity', val);
         let weight = this.form.totalWeight / total;
         let weight = this.form.totalWeight / total;
 
 
@@ -896,6 +898,8 @@
           data['qualitySampleTemplateList'] = [];
           data['qualitySampleTemplateList'] = [];
           data['id'] = '';
           data['id'] = '';
           data['weight'] = parseFloat(weight).toFixed(2);
           data['weight'] = parseFloat(weight).toFixed(2);
+          let code=await getCodeList('sample_code',{count:1});
+          data['sampleCode'] = code[0]
           arr.push(data);
           arr.push(data);
         }
         }
         this.$set(
         this.$set(