<template>
    <div>
        <a-card>
        <div>
           <div>
               <span style="font-size: 18px;font-weight: 600;"> 分配入库</span>
           </div>
            <div style="margin-top: 16px">
            <a-descriptions bordered :column="{  sm: 2, xs: 1 }">
                <a-descriptions-item label="发货单位">
                    {{detailInfo.medicalName || '--'}}
                </a-descriptions-item>
                <a-descriptions-item label="分配日期">
                    {{detailInfo.breedName || '--'}}
                </a-descriptions-item>
                <a-descriptions-item label="发货人姓名">
                    {{detailInfo.batchNumber || '--'}}
                </a-descriptions-item>
                <a-descriptions-item label="联系电话">
                    {{detailInfo.expireDate || '--'}}
                </a-descriptions-item>
                <a-descriptions-item label="供应商">
                    {{detailInfo.expireDate || '--'}}
                </a-descriptions-item>
                <a-descriptions-item label="品牌">
                    {{detailInfo.unit || '--'}}
                </a-descriptions-item>
                <a-descriptions-item label="批次号">
                    {{detailInfo.specs || '--'}}
                </a-descriptions-item>
                <a-descriptions-item label="生产日期">
                    {{detailInfo.specs || '--'}}
                </a-descriptions-item>
                <a-descriptions-item label="有效期至">
                    {{detailInfo.specs || '--'}}
                </a-descriptions-item>
                <a-descriptions-item label="单价">
                    {{detailInfo.unit || '--'}}<span>元</span>
                </a-descriptions-item>
                <a-descriptions-item label="数量">
                    {{detailInfo.stockNum || '--'}}
                </a-descriptions-item>

                <a-descriptions-item label="入库状态">
                    {{detailInfo.stockNum || '--'}}
                </a-descriptions-item>
            </a-descriptions>
                <a-form-model ref="formRef" :model="formData" :rules="formRules"
                              :labelCol="{span: 4}"
                              :wrapperCol="{span: 16}"
                              style="margin-top: 20px"
                >
                    <a-form-model-item label="备注"
                                       prop="stockNum"
                                       :labelCol="{span: 6}"
                                       :wrapperCol="{span: 15}">
                        <a-textarea
                                :rows="6"
                                v-model="formData.stockNum"
                                placeholder="请输入备注"></a-textarea>
                    </a-form-model-item>
                </a-form-model>
            </div>
        </div>
        <div style="text-align: center;margin-top: 40px">
            <a-button @click="goBack">取消</a-button>
            <a-button type="primary" @click="goBack" style="margin-left: 10px">入库</a-button>
        </div>
        </a-card>
    </div>
</template>
<script>
    import moment from 'moment';
    import {closedDetail} from "../../../utils/common";

    export default {
        data() {
            return {
                routerParams: {},
                detailInfo: {},
                formData: {

                },
                formRules: [

                ]
            }
        },
        created() {
            this.routerParams = this.$route.query
            this.getStockListDetail()
        },
        methods: {
            getStockListDetail() {
                let par = {
                    id: this.routerParams.id
                }
                this.$api.stockManage.fetchInStockLisDetail(par).then(({data = [], code}) => {
                    this.detailInfo = data
                })
            },
            goBack() {
                closedDetail('/inStock/inStockManageDetail', '/Home/distributionWarehousing')
            }
        },
    }
</script>
<style lang="less" scoped>

</style>
