Mr.Zhang
2023-09-04 0d9c19184e72995fd8f57266c1ac5cf7f875e30c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<template>
    <view class="p30 bg_w f26 info-style">
        <view v-if="isOut" class="cm b f32">计划出库日期:{{ info.outPlandate }}</view>
        <view v-else class="cm b f32">计划入库日期:{{ info.inPlandate || info.planDate }}</view>
        <view class="c2 mt25">
            <text class="c6">来源类型:</text>
            {{ typeTstr(info.originType) }}
        </view>
        <view class="c2 mt25">
            <text class="c6">来源单号:</text>
            {{ info.originCode || '-' }}
        </view>
        <view class="c2 mt25">
            <text class="c6">申请人员:</text>
            {{ info.userName ? (info.userName + '/' + info.userDepartName) : (info.inUserName + '/' + info.inDepartName) }}
        </view>
        <view v-if="isOut" class="c2 mt25">
            <text class="c6">入库接收人:</text>
            {{ info.originCode || '-' }}
        </view>
        <view class="c2 mt25">
            <text class="c6">申请时间:</text>
            {{ info.createTime || '-' }}
        </view>
        <view class="rd15 ptb25 plr25 bg_f7">
            <view class="f26 b c2">备注:</view>
            <view class="mt20">
                <u-read-more :showHeight="60" :toggle="true" textIndent="0" closeText="展开" :shadowStyle="shadowStyle">
                    <rich-text :nodes="info.remark"></rich-text>
                    <!-- {{ info.remark }} -->
                </u-read-more>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        name:"InOutInfo",
        props: {
            isOut: {
                type: Boolean,
                default: true
            },
            info: {
                type: Object,
                default: () => {}
            }
        },
        data() {
            return {
                types: [
                    { name: '全部', id: '' },
                    { name: '采购订单', id: '0' },
                    { name: '生产工单', id: '1' },
                    { name: '销售订单', id: '2' },
                    { name: '转库单', id: '3'  },
                    { name: '盘点单', id: '4'  },
                ],
                shadowStyle: {
                    backgroundImage: "linear-gradient(to top, #f7f7f7, rgba(247, 247, 247, 0.5))",
                    paddingTop: "50rpx",
                    marginTop: "-50rpx",
                    justifyContent: 'flex-end',
                    colors: '#333',
                }
            };
        },
        methods: {
            typeTstr(type) {
                let temp = this.types.find(item => item.id == type)
                return temp ? temp.name : '-'
            }
        }
    }
</script>
 
<style lang="scss">
.info-style {
    border-bottom: 20rpx #f7f7f7 solid;
}
</style>