<template>
    <div>
        <el-card>
            <el-table :data="sysList" style="width: 100%" border>
                <el-table-column label="序号" type="index"></el-table-column>
                <el-table-column
                    label="系统名称"
                    prop="sysName"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    label="产品编码"
                    prop="thirdId"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    label="产品名称"
                    prop="thirdName"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>
                <el-table-column label="注册/备案凭证号" prop="registerNo" show-overflow-tooltip></el-table-column>
                <el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column>
            </el-table>
        </el-card>
        <el-card>
            <div style=" float: left;
                        text-align: left;
                        font-weight: bold;
                        margin-bottom: 8px"
            >
                <span>产品标识:</span>
            </div>
            <div style=" float: right;
                        text-align: right;
                        margin-bottom: 8px;">
            </div>

            <el-table
                v-loading="loading"
                :data="detailList"
                style="width: 100%; margin-top: 20px"
                border
                @current-change="handleDetail"
            >
                <el-table-column
                    label="产品标识"
                    prop="nameCode"
                    show-overflow-tooltip
                ></el-table-column>

                <el-table-column
                    label="产品通用名"
                    prop="cpmctymc"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    label="包装级别"
                    prop="packLevel"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    label="包装层级"
                    prop="bzcj"
                    show-overflow-tooltip
                ></el-table-column>
            </el-table>
        </el-card>
        <el-form
            :model="editQuery"
            ref="editQuery"
            label-width="100px"
            style="margin-top: 20px"
        >
            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>产品名称:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            size="small"
                            splaceholder="请输入内容"
                            :disabled="true"
                            v-model="editQuery.cpmctymc"
                        ></el-input>
                    </div>
                </el-col>
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>产品标识:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="true"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.nameCode"
                        ></el-input>
                    </div>
                </el-col>


            </el-row>

            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>规格型号:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.ggxh"
                        ></el-input>
                    </div>
                </el-col>

                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>器械类别:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.qxlb"
                        ></el-input>
                    </div>
                </el-col>
            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>产品类别:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.cplb"
                        ></el-input>
                    </div>
                </el-col>
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>分类编码:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.flbm"
                        ></el-input>
                    </div>
                </el-col>

            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">

                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>商品条码:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.sptm"
                        ></el-input>
                    </div>
                </el-col>
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>医保编码:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.ybbm"
                        ></el-input>
                    </div>
                </el-col>
            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">

                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>医疗器械注册人:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="ylqxzcrbarmc"
                            v-model="editQuery.ylqxzcrbarmc"
                        ></el-input>
                    </div>
                </el-col>
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>注册人英文名称:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.ylqxzcrbarywmc"
                        ></el-input>
                    </div>
                </el-col>

            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">

                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>统一社会信用号:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.tyshxydm"
                        ></el-input>
                    </div>
                </el-col>
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>注册证/备案号:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.zczbhhzbapzbh"
                        ></el-input>
                    </div>
                </el-col>
            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>上级产品编码:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="true"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.sjcpbm"
                        ></el-input>
                    </div>
                </el-col>

                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>包装级别:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            size="small"
                            splaceholder="请输入内容"
                            :disabled="true"
                            v-model="editQuery.packLevel"
                        ></el-input>
                    </div>
                </el-col>
            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>包装单位/包装级别:&nbsp;</span>
                        </div>

                        <el-input
                            style="width: 65%"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.bzcj"
                            :disabled="true"

                        ></el-input>
                    </div>
                </el-col>

                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>包含下级包装数量:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            size="small"
                            splaceholder="请输入内容"
                            :disabled="true"
                            v-model="editQuery.bhxjsl"
                        ></el-input>
                    </div>
                </el-col>
            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>包含下级产品编码:&nbsp;</span>
                        </div>

                        <el-input
                            style="width: 65%"
                            size="small"
                            :disabled="true"
                            splaceholder="请输入内容"
                            v-model="editQuery.bhxjcpbm"

                        ></el-input>
                    </div>
                </el-col>

                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>包含最小销售包装数量:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            size="small"
                            :disabled="true"
                            splaceholder="请输入内容"
                            v-model="editQuery.bhzxxsbzsl"
                        ></el-input>
                    </div>
                </el-col>
            </el-row>

            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>最小包装单元内包含使用单元数量:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.zxxsbzbhsydysl"
                        ></el-input>
                    </div>
                </el-col>
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>生产厂家:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="false"
                            size="small"
                            splaceholder="请输入内容"
                        ></el-input>
                    </div>
                </el-col>
            </el-row>

            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>是否包含批号:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="!checked"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.scbssfbhph"
                        ></el-input>
                    </div>
                </el-col>
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>是否包含序列号:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="!checked"
                            size="small"
                            v-model="editQuery.scbssfbhxlh"
                            splaceholder="请输入内容"
                        ></el-input>
                    </div>
                </el-col>
            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>是否包含生产日期:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="!checked"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.scbssfbhscrq"
                        ></el-input>
                    </div>
                </el-col>
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>是否包含失效日期:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="!checked"
                            v-model="editQuery.scbssfbhsxrq"
                            size="small"
                            splaceholder="请输入内容"
                        ></el-input>
                    </div>
                </el-col>
            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>产品描述:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 65%"
                            :disabled="!checked"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.cpms"
                        ></el-input>
                    </div>
                </el-col>
                <el-col :span="12" class="el-col">
                    <div class="text item">
                        <div class="itemTag">
                            <span>当前版本号:&nbsp;</span>
                        </div>
                        <el-input
                            style="width: 35%"
                            size="small"
                            splaceholder="请输入内容"
                            v-model="editQuery.versionNumber"
                            disabled
                        ></el-input>
                        <!--                                <el-button type="text" size="small" @click.native.stop="selectVersion()"-->
                        <!--                                           style="margin-left: 5%"-->
                        <!--                                >切换版本-->
                        <!--                                </el-button>-->
                    </div>
                </el-col>
            </el-row>
            <el-row :gutter="20" class="el-row" type="flex">
                <el-col :span="24" class="el-col">
                    <div style="margin-top: 18px;margin-bottom: 18px">
                        <el-checkbox v-model="checked" disabled
                        >启用使用单元
                        </el-checkbox>
                        <el-checkbox v-model="editQuery.isDisable" disabled
                        >是否禁用
                        </el-checkbox>
                        <el-checkbox v-model="editQuery.isAdavence" disabled
                        >是否寄售
                        </el-checkbox>
                        <el-checkbox v-model="editQuery.allowNoBatch" class=""
                        >允许无批次号
                        </el-checkbox>
                        <el-checkbox v-model="editQuery.allowNoExpire" class=""
                        >允许无失效日期
                        </el-checkbox>
                        <el-checkbox v-model="editQuery.allowNoProduct" class=""
                        >允许无生产日期
                        </el-checkbox>
                    </div>
                </el-col>
            </el-row>
        </el-form>
    </div>
</template>

<script>
export default {
    name: "basicProductDetail",
    props: {
        sysList: {
            type: Object,
            required: true,
        },
        detailList: {
            type: Object,
            required: true,
        },
        editQuery: {
            type: Object,
            required: true,
        },
        closeDialog: {
            type: Function,
            required: true,
        }
    },
    data() {
        return {
            loading: false,
        }
    },
    methods:{
        handleDetail(row) {
            let rlId = this.editQuery.rlId;
            this.editQuery = row;
            this.editQuery.rlId = rlId;
        },
    }
}
</script>

<style scoped>

</style>
