| | |
| | | <script setup lang="ts"> |
| | | import {computed} from "vue"; |
| | | import {computed, onMounted, ref} from "vue"; |
| | | |
| | | defineOptions({ |
| | | name: "ReportingDetail" |
| | |
| | | set: (value: boolean) => emits("update:isShow", value), |
| | | }); |
| | | |
| | | const otherData = ref({}) |
| | | const otherDataEntries = computed(() => { |
| | | return Object.entries(otherData.value || {}) |
| | | .filter(([key]) => key !== "rows") |
| | | .map(([key, value]) => ({key, value})); |
| | | }); |
| | | const init = () => { |
| | | if (props.row.otherData !== null && props.row.otherData !== '') { |
| | | try { |
| | | otherData.value = JSON.parse(props.row.otherData); |
| | | } catch { |
| | | otherData.value = {}; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | init(); |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <el-descriptions-item label="报工人员">{{ row.nickName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="工序">{{ row.process || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="工单编号">{{ row.workOrderNo || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产品名称">{{ row.salesContractNo || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产品规格型号">{{ row.productName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产出数量">{{ row.productModelName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="报废数量">{{ row.quantity || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="单位">{{ row.scrapQty || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产品名称">{{ row.productName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产品规格型号">{{ row.productModelName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产出数量">{{ row.quantity || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="报废数量">{{ row.scrapQty || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="单位">{{ row.unit || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="创建时间">{{ row.createTime || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item |
| | | v-for="item in otherDataEntries" |
| | | :key="item.key" |
| | | :label="item.key" |
| | | > |
| | | {{ item.value || '-' }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item |
| | | v-for="item in (otherData.rows || [])" |
| | | :key="item.parameterItem" |
| | | :label="`${item.parameterItem}`" |
| | | > |
| | | {{ item.value || '-' }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |