Browse Source

fix:质量报告

lupeng 5 days ago
parent
commit
4792996a0f

+ 14 - 9
src/components/ReportView/reportTemplate.vue

@@ -1,4 +1,5 @@
 <template>
+  <div class="main-content">
   <div class="bgColor" v-if="modelValue" @click.stop="close">
     <div class="body">
       <div class="header">
@@ -20,13 +21,10 @@
           <div id="print">
             <div class="tableInfo">
               <div style="page-break-after: always">
-                <div class="title" style="text-align: center">质量日报</div>
+                <div class="title" style="text-align: center" v-if="props.detail.reportType==1">质量日报({{props.detail.generationDate}})</div>
+                <div class="title" style="text-align: center" v-if="props.detail.reportType==2">质量月报({{props.detail.generationDate}})</div>
+
                 <div class="tableTitle">模块筛选情况</div>
-                <div class="info">
-                  <div class="text">产品型号:</div>
-                  <div class="text">产品批次:</div>
-                  <div class="text">报告日期:2025年03月23日</div>
-                </div>
                 <table>
                   <thead>
                     <tr>
@@ -164,6 +162,7 @@
       </div>
     </div>
   </div>
+  </div>
 </template>
 
 <script setup>
@@ -172,14 +171,20 @@ import {
   consistencyTestData,
   productAcceptanceData,
 } from "@/api/statistic/reportMockData.ts";
+onMounted(async () => {
+  await getQualityTableData(props.detail.value);
 
+});
+const getQualityTableData=(data)=>{
+
+}
 const props = defineProps({
   modelValue: {
     type: [Boolean],
   },
-  // tablesData: {
-  //   type: [Object],
-  // },
+  detail: {
+    type: [Object],
+   },
 });
 const emits = defineEmits(["update:modelValue"]);
 const close = () => {

+ 2 - 2
src/views/statistic/firstPassYield/index.vue

@@ -17,7 +17,7 @@
             />
           </div>
         </div>
-        <div class="header">
+<!--        <div class="header">
           <div class="text">选择统计维度:</div>
           <div>
             <el-radio-group v-model="radio" style="display: flex">
@@ -27,7 +27,7 @@
               <el-radio size="small" :value="4">年</el-radio>
             </el-radio-group>
           </div>
-        </div>
+        </div>-->
         <div class="header">
           <div class="text">选择统计车间:</div>
           <el-tree

+ 8 - 4
src/views/statistic/report/index.vue

@@ -30,12 +30,14 @@
         </el-button>
       </template>
     </avue-crud>
+    <reportTemplate v-model="showStatus" :detail="detail" />
   </div>
 </template>
+
 <script setup>
 import { ref, getCurrentInstance } from "vue";
 import { useCrud } from "@/hooks/userCrud";
-
+import reportTemplate from "@/components/ReportView/reportTemplate.vue";
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
   useCrud({
@@ -45,22 +47,24 @@ const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
   Methords; //增删改查
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
-
+const tablesData=ref([]);
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 
 onMounted(() => {
   // console.log("crudRef", crudRef)
   dataList();
 });
-
+const showStatus=ref(false);
 const importExcelData = () => {
   if (uploadRef.value) {
     uploadRef.value.show("/api/v1/plan/order/import");
   }
 };
 
+const detail=ref({});
 const showDetail = (row) => {
-  console.log(row, "showDetail");
+  showStatus.value=true;
+  detail.value=row;
 };
 
 // 设置表格列或者其他自定义的option

+ 10 - 11
src/views/statistic/statistic/index.vue

@@ -17,7 +17,7 @@
             />
           </div>
         </div>
-        <div class="header">
+<!--        <div class="header">
           <div class="text">选择统计维度:</div>
           <div>
             <el-radio-group v-model="radio" style="display: flex">
@@ -27,7 +27,7 @@
               <el-radio size="small" :value="4">年</el-radio>
             </el-radio-group>
           </div>
-        </div>
+        </div>-->
         <div class="header">
           <div class="text">选择统计维度:</div>
           <el-tree
@@ -41,15 +41,11 @@
         </div>
         <div class="header" style="border-bottom: 0px">
           <div class="text">选择统计指标:</div>
-          <el-tree
-            ref="treeRef2"
-            :data="data1"
-            show-checkbox
-            default-expand-all
-            :default-checked-keys="['合格率']"
-            node-key="key"
-            highlight-current
-          />
+          <el-radio-group v-model="radio" style="width: 100px;margin-left: 25px">
+            <el-radio size="small" :value="pass">合格率</el-radio>
+            <el-radio size="small" :value="2">一次性送检合格率</el-radio>
+            <el-radio size="small" :value="3">PPM</el-radio>
+          </el-radio-group>
         </div>
       </el-scrollbar>
     </div>
@@ -256,6 +252,9 @@ onMounted(async () => {
       padding: 20px;
     }
   }
+  .el-radio {
+    display: block;
+  }
   .databox {
     width: calc(100% - 260px);
     border-left: 2px solid #00000010;