<template>
    <div>
        <van-cell-group>
            <van-field label="计划名称" :value="obj.name" readonly></van-field>
            <van-field label="计划日期" :value="obj.planDate?$dateformat(obj.planDate,'yyyy-mm-dd'):''"
                       readonly></van-field>
            <van-field label="任务下达单位" :value="obj.issuingUnit" readonly></van-field>
            <van-field label="任务来源" :value="obj.taskSource" readonly></van-field>
            <van-field label="产品" :value="obj.product" readonly></van-field>
            <van-field label="抽查依据标准" :value="obj.standard" readonly></van-field>
            <van-field label="完成时间" :value="obj.finishDate?$dateformat(obj.finishDate,'yyyy-mm-dd'):''"
                       readonly></van-field>
            <van-field label="抽样数量" :value="obj.samplingQuantity" readonly></van-field>
            <van-field label="检测费用" :value="obj.testCost" readonly></van-field>
            <van-field label="公告号" :value="obj.announcementNo" readonly></van-field>
            <van-field label="公告日期" :value="obj.announcementDate?$dateformat(obj.announcementDate,'yyyy-mm-dd'):''"
                       readonly></van-field>
            <van-field label="备注" :value="obj.remark" readonly></van-field>
        </van-cell-group>
    </div>
</template>

<script>
    import {samplingPlan} from '../../api'

    export default {
        name: "SamplingTaskDetail",
        data() {
            return {
                obj: {}
            }
        },
        mounted() {
            this._getDetail()
        },
        methods: {
            _getDetail: async function () {
                let result = await samplingPlan.getById(this.$route.query.planId)
                if (result) {
                    this.obj = result
                }
            }
        }
    }
</script>

<style scoped>

</style>
