lupeng пре 1 месец
родитељ
комит
09d4b5f5d6
1 измењених фајлова са 15 додато и 9 уклоњено
  1. 15 9
      src/views/statistic/report/toPrintTables.vue

+ 15 - 9
src/views/statistic/report/toPrintTables.vue

@@ -10,12 +10,14 @@ import {getQualityTableData} from "@/api/statistic/reportData";
 const detail = ref<any>({});
 
 const dialogVisible = ref(false);
-
+const tableData=ref([]);
 const openPrintDialog = (row) => {
   dialogVisible.value = true;
   console.info("openPrintDialog", row);
     getQualityTableData(row).then(
-
+        (data)=>{
+          tableData.value=data.data;
+        }
     )
   //   在这里调接口
   detail.value = row;
@@ -105,12 +107,16 @@ defineExpose({
                   </tr>
                 </thead>
                 <tbody>
-                  <tr v-for="(item, index) in consistencyTestData" :key="index">
-                    <td>{{ item.id }}</td>
-                    <td>{{ item.model }}</td>
-                    <td>{{ item.batch }}</td>
-                    <td>{{ item.inspectionStatus }}</td>
-                    <td>{{ item.sampleQuantity }}</td>
+                  <tr v-for="(item, index) in tableData.salesReportList" :key="index">
+                    <td>{{ index }}</td>
+                    <td>{{ item.created }}</td>
+                    <td>{{ item.materialModel }}</td>
+                    <td>{{ item.workOrderCode }}</td>
+                    <td>{{ item.num }}</td>
+                    <td>{{ item.remark1 }}</td>
+                    <td>{{ item.remark3 }}</td>
+                    <td>{{ item.remark4 }}</td>
+                    <td>{{ item.remark }}</td>
                   </tr>
                 </tbody>
               </table>
@@ -177,7 +183,7 @@ defineExpose({
     <template #header>
       <div class="dialog-header">
         <div>报告预览</div>
-        <el-button type="primary" size="small" @click="dialogVisible = false">
+        <el-button type="primary" size="small" @click="dialogVisible = false" v-print="'#print'">
           打印
         </el-button>
       </div>