| <template> | 
|     <div class="page"> | 
|         <div class="page_info"> | 
|             <div class="page_info_title">{{info.code}}</div> | 
|             <div class="page_info_nr"> | 
|                 <div class="item"> | 
|                     <div class="item_label">物料信息:</div> | 
|                     <div class="item_nr" v-if="info.mmodel">{{info.mmodel.name}}丨{{info.mmodel.code}}</div> | 
|                 </div> | 
|                 <div class="items" style="margin-top: 0"> | 
|                     <div class="item_label">生产数量:</div> | 
|                     <div class="item_nr" v-if="info.umodel">{{info.num}}{{info.umodel.name}}</div> | 
|                 </div> | 
|                 <div class="item"> | 
|                     <div class="item_label">生产批次:</div> | 
|                     <div class="item_nr">{{info.batch}}</div> | 
|                 </div> | 
|                 <div class="items"> | 
|                     <div class="item_label">生产工序:</div> | 
|                     <div class="item_nr" v-if="info.pmodel">{{info.pmodel.name}}</div> | 
|                 </div> | 
|                 <div class="item"> | 
|                     <div class="item_label">工单编号:</div> | 
|                     <div class="item_nr">{{info.workorderCode}}</div> | 
|                 </div> | 
| <!--                <div class="items">--> | 
| <!--                    <div class="item_label">生产人员:</div>--> | 
| <!--                    <div class="item_nr">{{info.proUserids}}</div>--> | 
| <!--                </div>--> | 
|                 <div class="items"> | 
|                     <div class="item_label">生产设备:</div> | 
|                     <div class="item_nr" v-if="info.devmodel">{{info.devmodel.name}}</div> | 
|                 </div> | 
|                 <!-- <div class="items"> | 
|                     <div class="item_label">工装码:</div> | 
|                     <div class="item_nr" v-if="info.amodel">{{info.amodel.code}}</div> | 
|                 </div> --> | 
|             </div> | 
|         </div> | 
|         <div class="page_title">检验信息</div> | 
|         <div class="page_info1"> | 
|             <div class="page_info1_item" style="margin: 0;"> | 
|                 <div class="label">检验人员:</div> | 
|                 <div class="nr">{{info.smodelRealName}}/{{info.checkUserDepartName}}</div> | 
|             </div> | 
|             <div class="page_info1_items"> | 
|                 <div class="label">检验日期:</div> | 
|                 <div class="nr">{{info.checkDate}}</div> | 
|             </div> | 
|             <div class="page_info1_item"> | 
|                 <div class="label">合格数量:</div> | 
|                 <div class="nr" v-if="info.umodel">{{info.qualifiedNum}}{{info.umodel.name}}</div> | 
|             </div> | 
|             <div class="page_info1_items"> | 
|                 <div class="label">不良数量:</div> | 
|                 <div class="nr" v-if="info.umodel">{{info.unqualifiedNum}}{{info.umodel.name}}</div> | 
|             </div> | 
|         </div> | 
|         <div class="page_err" v-if="info.checkInfo"> | 
|             <!-- <div class="page_err_item"> | 
|                 <span>工装 {{info.qualifiedApplianceCode}}</span> | 
|                 <span v-if="info.umodel">{{info.unqualifiedNum}}{{info.umodel.name}}</span> | 
|             </div> --> | 
|             <div class="page_err_items"> | 
|                 <span>不良原因:</span> | 
|                 <span>{{info.checkInfo}}</span> | 
|             </div> | 
|         </div> | 
|         <div class="page_footer" v-if="info.createUser === store.state.userInfo.id && info.workorderstatus !== 4 && info.workorderstatus !== 2"> | 
|             <div class="page_footer_dele red" @click="dele">删除</div> | 
|         </div> | 
|     </div> | 
| </template> | 
|   | 
| <script setup lang="ts"> | 
|     import { ref, onMounted } from 'vue' | 
|     import { useStore } from 'vuex' | 
|     import { useRoute, useRouter } from "vue-router" | 
|     import { getBYid } from '@/apis/QualityAPI' | 
|     import { deletejy } from "@/apis/PlanningAPI" | 
|     import { Toast } from 'vant' | 
|   | 
|     const route = useRoute() | 
|     const store = useStore() | 
|     const router = useRouter() | 
|   | 
|     let info: any = ref({}) | 
|   | 
|     const getBYids = () => { | 
|         getBYid(route.query.id) | 
|             .then(res => { | 
|                 if (res.code === 200 && res.data) { | 
|                     info.value = res.data | 
|                 } | 
|             }) | 
|     } | 
|   | 
|     // 删除检验记录 | 
|     const dele = (): void => { | 
|         deletejy(route.query.id) | 
|             .then(res => { | 
|                 if (res.code === 200) { | 
|                     Toast.success({ message: '删除成功', forbidClick: true, duration: 2000 }) | 
|                     setTimeout(() => { | 
|                         router.go(-1) | 
|                     }, 2000) | 
|                 } | 
|             }) | 
|     } | 
|   | 
|     onMounted(() => { | 
|         getBYids() | 
|     }) | 
| </script> | 
|   | 
| <style lang="scss" scoped> | 
| .page { | 
|     width: 100%; | 
|     height: 100%; | 
|     position: absolute; | 
|     background: #F7F7F7; | 
|     .page_info { | 
|         padding: 30px; | 
|         background: #ffffff; | 
|         .page_info_title { | 
|             font-size: 32px; | 
|             font-weight: 500; | 
|             color: #333333; | 
|         } | 
|         .page_info_nr { | 
|             padding: 0 30px 30px 30px; | 
|             margin-top: 30px; | 
|             background: #F7F7F7; | 
|             border-radius: 16px; | 
|             display: flex; | 
|             align-items: center; | 
|             flex-wrap: wrap; | 
|             .items { | 
|                 width: 45%; | 
|                 display: flex; | 
|                 margin-top: 24px; | 
|                 .item_label { | 
|                     font-size: 24px; | 
|                     font-weight: 400; | 
|                     color: #666666; | 
|                     flex-shrink: 0; | 
|                 } | 
|                 .item_nr { | 
|                     font-size: 24px; | 
|                     font-weight: 400; | 
|                     color: #222222; | 
|                 } | 
|             } | 
|             .item { | 
|                 width: 55%; | 
|                 display: flex; | 
|                 margin-top: 24px; | 
|                 .item_label { | 
|                     font-size: 24px; | 
|                     font-weight: 400; | 
|                     color: #666666; | 
|                     flex-shrink: 0; | 
|                 } | 
|                 .item_nr { | 
|                     font-size: 24px; | 
|                     font-weight: 400; | 
|                     color: #222222; | 
|                 } | 
|             } | 
|         } | 
|     } | 
|     .page_title { | 
|         padding: 40px 30px 30px 30px; | 
|         font-size: 32px; | 
|         font-weight: 500; | 
|         color: #222222; | 
|     } | 
|     .page_info1 { | 
|         padding: 0 30px 30px 30px; | 
|         background: #ffffff; | 
|         display: flex; | 
|         align-items: center; | 
|         justify-content: space-between; | 
|         flex-wrap: wrap; | 
|         margin-bottom: 24px; | 
|         .page_info1_items { | 
|             display: flex; | 
|             width: 45%; | 
|             margin-top: 30px; | 
|             .label { | 
|                 font-size: 26px; | 
|                 font-weight: 400; | 
|                 color: #666666; | 
|                 flex-shrink: 0; | 
|             } | 
|             .nr { | 
|                 font-size: 26px; | 
|                 font-weight: 400; | 
|                 color: #222222; | 
|             } | 
|         } | 
|         .page_info1_item { | 
|             display: flex; | 
|             width: 55%; | 
|             margin-top: 30px; | 
|             .label { | 
|                 font-size: 26px; | 
|                 font-weight: 400; | 
|                 color: #666666; | 
|                 flex-shrink: 0; | 
|             } | 
|             .nr { | 
|                 font-size: 26px; | 
|                 font-weight: 400; | 
|                 color: #222222; | 
|             } | 
|         } | 
|     } | 
|     .page_err { | 
|         padding: 0 30px 30px 30px; | 
|         background: #ffffff; | 
|         .page_err_item { | 
|             display: flex; | 
|             align-items: center; | 
|             justify-content: space-between; | 
|             padding-top: 30px; | 
|             span { | 
|                 &:nth-child(1) { | 
|                     font-size: 32px; | 
|                     font-weight: 500; | 
|                     color: #DE5243; | 
|                 } | 
|                 &:nth-child(2) { | 
|                     font-size: 26px; | 
|                     font-weight: 400; | 
|                     color: #DE5243; | 
|                 } | 
|             } | 
|         } | 
|         .page_err_items { | 
|             display: flex; | 
|             justify-content: space-between; | 
|             padding-top: 30px; | 
|             span { | 
|                 &:nth-child(1) { | 
|                     font-size: 26px; | 
|                     font-weight: 400; | 
|                     color: #666666; | 
|                     flex-shrink: 0; | 
|                 } | 
|                 &:nth-child(2) { | 
|                     font-size: 26px; | 
|                     font-weight: 400; | 
|                     color: #222222; | 
|                 } | 
|             } | 
|         } | 
|     } | 
|     .page_footer { | 
|         position: fixed; | 
|         bottom: 0; | 
|         width: 100%; | 
|         padding-bottom: 68px; | 
|         padding-left: 30px; | 
|         padding-right: 30px; | 
|         box-sizing: border-box; | 
|         .page_footer_dele { | 
|             width: 100%; | 
|             height: 88px; | 
|             background: white; | 
|             display: flex; | 
|             align-items: center; | 
|             justify-content: center; | 
|             font-size: 30px; | 
|             border-radius: 8px; | 
|             box-shadow: 0 0 12px 0 rgba(0,0,0,0.08); | 
|         } | 
|     } | 
| } | 
| </style> |