Files
zgty-mas-m/pages/device/accept/detail.vue
2025-11-27 16:12:25 +08:00

106 lines
2.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<uni-card style="height: 100%" spacing="0">
<view class="content">
<up-row class="flex-wrap">
<up-col :span="gridCol"
>使用部门
<text class="value">{{ acceptInfo.useDept }}</text>
</up-col>
<up-col :span="gridCol"
>到货日期
<text class="value">{{ acceptInfo.deviceCode }}</text>
</up-col>
<up-col :span="gridCol"
>安装调试
<text class="value">{{ acceptInfo.installStatus }}</text>
</up-col>
<up-col :span="gridCol"
>验收结果
<text class="value">{{ acceptInfo.acceptResult }}</text>
</up-col>
</up-row>
<wf-comment :commentWf="commentWf" />
</view>
</uni-card>
</template>
<script setup>
import { ref, reactive, onMounted, onBeforeMount } from 'vue'
import { acceptDetailList } from '@/nx/api/deviceInfo'
import { useGridCol } from '@/nx/hooks/useGridCol'
import nx from '@/nx'
const { gridCol } = useGridCol([700], [6, 4])
const acceptSchema = [
{
label: '使用部门',
field: 'useDept'
},
{
label: '到货日期',
field: 'arrivalDate'
},
{
label: '验收日期',
field: 'acceptDate'
},
{
label: '安装调试',
field: 'installStatus'
},
{
label: '验收结果',
field: 'acceptResult'
},
{
label: '验收状态',
field: 'acceptStatus'
},
{
label: '备注',
field: 'remark'
}
]
onMounted(() => {
const { id, deviceName } = nx.$store('biz').deviceInfo
getDetailInfo(id)
})
let acceptInfo = ref({})
let commentWf = ref([])
async function getDetailInfo(id) {
const res = await acceptDetailList({
deviceBusInfoId: id
})
if (res.length > 0) {
let info = res[0]
acceptInfo.value = info
if (info.commentJson) {
try {
commentWf.value = JSON.parse(info.commentJson)
} catch (error) {
uni.showToast({
title: '解析数据错误',
icon: 'none'
})
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
font-size: 18px;
color: #000;
.u-col {
padding: 10px;
}
.value {
color: #666;
font-size: 16px;
}
}
</style>