Files
hazardousWaste_app/pages/components/DetailInfo.vue
2026-04-03 08:38:34 +08:00

88 lines
2.6 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>
<view>
<view>
<view class="detailInfo mb-2">
<view class="line title">
<p> {{ typeName + '单号' }}{{ detailInfo?.billNo }}</p>
<span :style="getColor(detailInfo?.billType)">
{{ getBillType(detailInfo?.billType,detailInfo?.status) }}
</span>
</view>
<p class="line content">仓库
<span> {{ detailInfo?.warehouseName }}</span>
</p>
<p class="line content">存储区
<span> {{ detailInfo?.areaName }}</span>
</p>
<p class="line content">开单时间
<span>{{ formatDate(detailInfo?.createTime) }}</span>
</p>
<p class="line content" v-if="detailInfo?.inboundTime">{{ typeName + '时间' }}
<span>{{ formatDate(detailInfo?.inboundTime) }}</span>
</p>
</view>
<view class="detailInfo mb-6">
<p class="line content">
<span class="grey" style="font-weight: 600;">详细备注</span>
<span>{{ detailInfo?.billRemark || '-' }}</span>
</p>
</view>
</view>
<!-- 物料列表 -只读 -->
<view>
<material-list ref="materialRef" isEdit="3" :extendData="{ billType: detailInfo?.billType }"
:pathParams="{ billNo: detailInfo?.billNo }" backStr="stockInDetail"
:formData="{ material: detailInfo.itemList }" />
</view>
</view>
</template>
<script setup>
import { getBillType, formatDate, getColor } from '../until'
import { computed, toRefs } from 'vue';
import MaterialList from './MaterialList.vue'
const props = defineProps({
// 查询列表类型 stockIn:入库 stockOut出库
type: {
type: String,
default: '',
required: true
},
detailInfo: {
type: Object,
default: {},
required: true
}
})
const { type, detailInfo } = toRefs(props)
const typeName = computed(() => type.value == 'stockIn' ? '入库单' : '出库单')
console.log(detailInfo, 'detailInfo');
</script>
<style scoped lang="scss">
.line {
display: flex;
background-color: #fff;
align-items: center;
padding: 6rpx 20rpx;
}
.title {
display: flex;
justify-content: space-between;
font-weight: 600;
font-size: 13px;
}
.content {
font-weight: 500;
font-size: 13px;
}
</style>