yusheng il y a 1 semaine
Parent
commit
fb5382eabb

+ 7 - 2
src/views/inspectionWork/components/newQualityContentTabs.vue

@@ -590,12 +590,14 @@
           >
             <template slot-scope="scope">
               <el-select
-                @change="selectQualityResultsChange"
+                @change="getSampleQuantity"
                 v-model="scope.row.qualityResults"
                 placeholder="请选择"
                 style="width: 100%"
                 :disabled="
-                  type == 'detail' || [2, 3, 4].includes(scope.row.status)
+                  type == 'detail' ||
+                  [2, 3, 4].includes(scope.row.status) ||
+                  scope.row.correlationId
                 "
                 size="mini"
               >
@@ -1826,6 +1828,9 @@
       selectQualityResultsChange() {
         this.$emit('countQualityResults');
       },
+      getSampleQuantity() {
+        this.$emit('getSampleQuantity');
+      },
       addInspectionTemplate() {
         let type = this.form.qualityType || 1;
         this.$refs.inspectionTemplateRef.open(type);

+ 11 - 8
src/views/inspectionWork/edit.vue

@@ -249,6 +249,7 @@
         @handleSampleSubmit="handleSampleSubmit"
         @getConditionType="getConditionType"
         @countQualityResults="countQualityResults"
+        @getSampleQuantity="getSampleQuantity"
         @setSchemeList="setSchemeList"
         @sampleListChange="sampleListChange"
         @inspectionProjectReport="inspectionProjectReport"
@@ -607,10 +608,11 @@
         });
 
         this.form.sampleNoQualificationRate =
-          ((this.form.sampleNoQualifiedNumber / this.form.sampleQuantity) * 100).toFixed(
-            2
-          ) + '%';
-          
+          (
+            (this.form.sampleNoQualifiedNumber / this.form.sampleQuantity) *
+            100
+          ).toFixed(2) + '%';
+
         this.form.sampleQualificationRate =
           (
             (this.form.sampleQualifiedNumber / this.form.sampleQuantity) *
@@ -1063,7 +1065,7 @@
         //   data.remainingSampleCount - data.sampleQuantity;
         this.form.taskMonadInfo = data;
         this.form.hours = data.hours;
-        this.getSampleQuantity()
+        this.getSampleQuantity();
         console.log(this.schemeList, 'this.schemeList');
       },
       // 切换检验方式为全检后生成样品
@@ -1226,7 +1228,7 @@
         return nowDate.year + '-' + nowDate.month + '-' + nowDate.strDate;
       },
       async getDetail() {
-        getById(this.$route.query.id).then((res) => {
+        await getById(this.$route.query.id).then((res) => {
           if (res.data.jobList?.length == 1) {
             res.data.executeJobId = res.data.jobList[0].id;
             res.data.executeJobName = res.data.jobList[0].name;
@@ -1290,6 +1292,7 @@
         await this.queryQualitySamplContent();
         // 来源清单
         await this.getQueryQualityInventory();
+        console.log(this.form.recordingMethod, 'this.form.recordingMethod');
         if (this.form.recordingMethod != 1) {
           [
             'retainedSampleQuantity',
@@ -1300,8 +1303,8 @@
             this.form[key] =
               this.form[key] || this.getSampleQuantityYp(key) || 0;
           });
-        }else{
-          this.getSampleQuantity()
+        } else {
+          this.getSampleQuantity();
         }
         // this.getSampleQuantityYp()
       },

+ 13 - 4
src/views/unqualifiedProduct/unqualifiedList/detailList.vue

@@ -91,6 +91,7 @@
         :id="form.processInstanceId"
       ></bpmDetail>
       <div
+        style="width: 1200px"
         v-if="activeComp == 'html' && form.contentText.html"
         id="printSection"
         v-html="form.contentText.html"
@@ -629,16 +630,24 @@
         printWindow.document.write('<html><head><title>打印预览</title>');
         printWindow.document.write(`<style >
  
-      @media print {
-                       td {
-        padding: 4px;}
+ 
+      table{
+      font-size: 13px !important;
+      }
+      img{
+      width: 150px !important;
+      height: 120px !important;
+      
+      }
+
+                td {
+        padding: 2px !important;}
         .table1 {
           page-break-after: always;
         }
         .table2 {
           page-break-before: always;
         }
-      }
     </style>
         `);
         printWindow.document.write('</head><body>');