| <template> | 
|     <div class="content_list_item"> | 
|         <van-skeleton :loading="loading" title :row="8" :row-width="['100%', '100%', '100%', '100%', '100%', '100%']" /> | 
|         <div class="content_list_item_top" v-show="!loading"> | 
|             <div class="content_list_item_top_left"> | 
|                 <span v-if="props.info.mmodel">{{props.info.mmodel.name}} | {{props.info.procedureName}}</span> | 
|                 <div class="type backgreen" v-if="props.info.type === 0">正常</div> | 
|                 <div class="type backyellow" v-if="props.info.type === 2">返工返修</div> | 
|             </div> | 
|             <div class="content_list_item_top_right"> | 
|                 <span class="yellow" v-if="props.info.status === 0">已创建</span> | 
|                 <span class="green" v-if="props.info.status === 1">已备料</span> | 
|                 <span v-if="props.info.status === 2">已完工检</span> | 
|                 <span class="purple" v-if="props.info.status === 3">已检验</span> | 
|                 <span v-if="props.info.status === 4">已报工</span> | 
|                 <span v-if="props.info.status === 5">已入库</span> | 
|                 <span v-if="props.info.status === 6">已取消</span> | 
|             </div> | 
|         </div> | 
|         <div class="content_list_item_code" v-show="!loading">工单编号:{{props.info.code}}</div> | 
|   | 
|         <div class="content_list_item_content" v-show="!loading"> | 
|             <div class="content_list_item_content_item"> | 
|                 <div class="content_list_item_content_item_label">物料编码:</div> | 
|                 <div class="content_list_item_content_item_nr" v-if="props.info.mmodel">{{props.info.mmodel.code}}</div> | 
|             </div> | 
|             <div class="content_list_item_content_item"> | 
|                 <div class="content_list_item_content_item_label">计划开工:</div> | 
|                 <div class="content_list_item_content_item_nr">{{props.info.planDate}}</div> | 
|             </div> | 
|             <div class="content_list_item_content_item"> | 
|                 <div class="content_list_item_content_item_label">生产批次:</div> | 
|                 <div class="content_list_item_content_item_nr">{{props.info.batch}}</div> | 
|             </div> | 
|             <div class="content_list_item_content_item"> | 
|                 <div class="content_list_item_content_item_label">计划数量:</div> | 
|                 <div class="content_list_item_content_item_nr" v-if="props.info.umodel">{{props.info.planNum}}{{props.info.umodel.name}}</div> | 
|             </div> | 
|   | 
|             <div class="content_list_item_content_item"> | 
|                 <div class="content_list_item_content_item_label">生产设备:</div> | 
|                 <div class="content_list_item_content_item_nr" v-if="props.info.pgmodel">{{props.info.pgmodel.code}} - {{props.info.pgmodel.name}}</div> | 
| <!--                <div class="content_list_item_content_item_nr" v-if="props.info.pgmodel">{{props.info.pgmodel.code}}</div>--> | 
|             </div> | 
|             <div class="content_list_item_content_item"> | 
|                 <div class="content_list_item_content_item_label">生产人员:</div> | 
|                 <div class="content_list_item_content_item_nrs"> | 
|                     <template v-for="(item, index) in props.info.proUserList" :key="index">{{item.proUserDepartName}}<template v-if="index !== props.info.proUserList.length - 1"> / </template></template> | 
|                 </div> | 
|             </div> | 
|         </div> | 
|         <div class="content_list_item_yq" @click="jumpGY" v-show="!loading && tips"> | 
|             <div class="content_list_item_yq_left"> | 
|                 <span>工艺要求:</span> | 
|                 <span>{{tips}}</span> | 
|             </div> | 
|             <van-icon name="arrow" color="#666666" size="16" /> | 
|         </div> | 
|     </div> | 
| </template> | 
|   | 
| <script setup lang="ts"> | 
|     import { defineProps, ref, watch } from 'vue' | 
|     import { getListByWorkOrderId } from '@/apis/WorkOrderAPI' | 
|     import { useRouter } from "vue-router" | 
|   | 
|     let loading = ref<boolean>(true) | 
|     const router = useRouter() | 
|     let tips = ref<string>('')  // 工艺要求 | 
|   | 
|     // 详情数据 | 
|     const props = defineProps({ | 
|         info: { | 
|             type: Object, | 
|             required: true | 
|         } | 
|     }) | 
|   | 
|     // 根据工单id查工艺卡 | 
|     const getListByWorkOrderIdInfo = () => { | 
|         getListByWorkOrderId({ workOrderId: props.info.id }) | 
|             .then(res => { | 
|                 if (res.code === 200) { | 
|                     tips.value = res.data.tips | 
|                 } | 
|             }) | 
|             .finally(() => { | 
|                 loading.value = false | 
|             }) | 
|     } | 
|   | 
|     // 跳转查工艺 | 
|     const jumpGY = () => { | 
|         router.push({ name: 'checkTheProcess', query: { id: props.info.id } }) | 
|     } | 
|   | 
|     watch(() => props.info, async (news) => { | 
|         if (JSON.stringify(news) !== "{}") { | 
|             await getListByWorkOrderIdInfo() | 
|         } | 
|     }, { immediate: true }) | 
| </script> | 
|   | 
| <style lang="scss" scoped> | 
|     .content_list_item { | 
|         padding: 30px; | 
|         display: flex; | 
|         flex-direction: column; | 
|         background: #ffffff; | 
|         .van-skeleton { | 
|             padding: 0 !important; | 
|         } | 
|         .content_list_item_top { | 
|             display: flex; | 
|             align-items: center; | 
|             justify-content: space-between; | 
|             .content_list_item_top_left { | 
|                 width: 85%; | 
|                 display: flex; | 
|                 align-items: center; | 
|                 overflow: hidden; | 
|                 text-overflow: ellipsis; | 
|                 white-space: nowrap; | 
|                 .type { | 
|                     padding: 5px 10px; | 
|                     border-radius: 10px; | 
|                     color: white; | 
|                     margin-left: 10px; | 
|                 } | 
|                 span { | 
|                     font-size: 32px; | 
|                     font-weight: 500; | 
|                     color: #333333; | 
|                     max-width: 100%; | 
|                     overflow: hidden; | 
|                     white-space: nowrap; | 
|                     text-overflow: ellipsis; | 
|                     -o-text-overflow: ellipsis; | 
|                 } | 
|             } | 
|             .content_list_item_top_right { | 
|                 font-size: 26px; | 
|                 font-weight: 400; | 
|                 color: #666666; | 
|                 flex-shrink: 0; | 
|                 .purple { | 
|                     color: $nav-color !important; | 
|                 } | 
|                 .green { | 
|                     color: $nav-stateColor6 !important; | 
|                 } | 
|                 .yellow { | 
|                     color: $nav-stateColor1 !important; | 
|                 } | 
|             } | 
|         } | 
|         .content_list_item_code { | 
|             font-size: 24px; | 
|             font-weight: 400; | 
|             color: #666666; | 
|             margin: 24px 0; | 
|             span { | 
|                 font-size: 24px; | 
|                 font-weight: 400; | 
|                 color: #666666; | 
|                 margin: 24px 0; | 
|             } | 
|         } | 
|         .content_list_item_content { | 
|             padding: 24px 30px; | 
|             background: #F7F7F7; | 
|             border-radius: 16px; | 
|             display: flex; | 
|             flex-wrap: wrap; | 
|             justify-content: space-between; | 
|             .content_list_item_content_item { | 
|                 width: 100%; | 
|                 display: flex; | 
|                 margin-top: 24px; | 
|                 &:nth-child(1) { | 
|                     margin-top: 0 !important; | 
|                 } | 
|                 .content_list_item_content_item_label { | 
|                     font-size: 24px; | 
|                     font-weight: 400; | 
|                     color: #666666; | 
|                     flex-shrink: 0; | 
|                 } | 
|                 .content_list_item_content_item_nrs { | 
|                     flex: 1; | 
|                     font-size: 24px; | 
|                     font-weight: 400; | 
|                     color: #222222; | 
|                     margin-right: 10px; | 
|                     display: flex; | 
|                     word-break: break-word; | 
|                 } | 
|                 .content_list_item_content_item_nr { | 
|                     flex: 1; | 
|                     overflow: hidden; | 
|                     white-space: nowrap; | 
|                     text-overflow: ellipsis; | 
|                     -o-text-overflow:ellipsis; | 
|                     word-wrap: break-word; | 
|                     font-size: 24px; | 
|                     font-weight: 400; | 
|                     color: #222222; | 
|                     margin-right: 10px; | 
|                 } | 
|             } | 
|         } | 
|         .content_list_item_yq { | 
|             display: flex; | 
|             align-items: center; | 
|             justify-content: space-between; | 
|             margin-top: 30px; | 
|             .content_list_item_yq_left { | 
|                 display: flex; | 
|                 span { | 
|                     font-size: 26px; | 
|                     font-weight: 400; | 
|                     &:nth-child(1) { | 
|                         color: #666666; | 
|                         flex-shrink: 0; | 
|                     } | 
|                     &:nth-child(2) { | 
|                         color: #222222; | 
|                     } | 
|                 } | 
|             } | 
|         } | 
|     } | 
| </style> |