<template>
    <div>
        <div class="container">
            <div class="bg">
                <el-row :gutter="0">
                    <el-col :span="3">
                        <img src="../img/logo1.png" style="width: 100px;
                        height: 100px; margin: 0 25px;">
                    </el-col>
                    <el-col :span="3">
                        <p class="div-p">首页</p>
                    </el-col>  
                    <el-popover placement="bottom" :width="150" trigger="hover">
                        <template #reference>
                            <el-col :span="3">
                                <p class="div-p">快递服务</p>
                            </el-col>
                        </template>
                        <div class="funcs">收件</div><el-divider style="margin-top: 10px; margin-bottom: 10px;"/>
                        <div class="funcs">寄件</div><el-divider style="margin-top: 10px; margin-bottom: 10px;"/>
                        <div class="funcs">查询快递</div>
                        
                    </el-popover>
                    <el-popover placement="bottom" :width="150" trigger="hover">
                        <template #reference>
                            <el-col :span="3">
                                <p class="div-p">可持续发展</p>
                            </el-col>
                        </template>
                        <div class="funcs">ESG</div><el-divider style="margin-top: 10px; margin-bottom: 10px;"/>
                        <div class="funcs">零碳未来</div><el-divider style="margin-top: 10px; margin-bottom: 10px;"/>
                        <div class="funcs">社会关怀</div>
                    </el-popover>
                    <el-popover placement="bottom" :width="150" trigger="hover">
                        <template #reference>
                            <el-col :span="3">
                                <p class="div-p">关于我们</p>
                            </el-col>
                        </template>
                        <div class="funcs">企业介绍</div><el-divider style="margin-top: 10px; margin-bottom: 10px;"/>
                        <div class="funcs">联系方式</div><el-divider style="margin-top: 10px; margin-bottom: 10px;"/>
                        <div class="funcs">开发人员</div>
                    </el-popover>
                    <div class="userPic">

                        <el-icon style="width: 3em;height: 3em;margin-right: 8px;font-size: 30px; cursor: pointer;"@click="visible = true"><UserFilled />
                            <el-drawer v-model="visible" :show-close="false">
                                <template #header="{ close, titleId, titleClass }">
                                <h4 :id="titleId" :class="titleClass">消息列表</h4>
                                <el-button type="danger" @click="close">
                                    <el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
                                    Close
                                </el-button>
                                </template>
                            </el-drawer>
                        </el-icon>
                    </div>
                </el-row>
            </div>
            <br><br>
            <div class="sender">
                <img src="../img/send_icon.png" style="display: inline;"><p style="display: inline; margin-left: 15px;">寄件人信息填写</p><br><br>
                <el-form :model="sendform" label-width="auto" style="max-width: 600px">

                    <el-form-item label="寄件人姓名">
                        <el-input v-model="sendform.name" />
                    </el-form-item>
                    <el-form-item label="寄件人身份证">
                        <el-input v-model="sendform.id" />
                    </el-form-item>
                    <el-form-item label="寄件人手机号">
                        <el-input v-model="sendform.telephoneNumber" />
                    </el-form-item>
                    <el-form-item label="您的地区">
                        <el-select v-model="sendform.region" placeholder="选择地区">
                            <el-option label="福建" value="fujian" />
                            <el-option label="徐州" value="xuzhou" />
                            <el-option label="淮安" value="huaian" />
                            <el-option label="陕西" value="shanxi" />
                            <el-option label="湖北" value="hubei" />      
                            <el-option label="上海" value="shanghai" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="邮寄种类">
                        <el-checkbox-group v-model="sendform.type">
                            <el-checkbox value="smallGoods" name="type">
                            小件
                            </el-checkbox>
                            <el-checkbox value="bigGoods" name="type">
                            大件
                            </el-checkbox>
                            <el-checkbox value="chilledGoods" name="type">
                            冷鲜
                            </el-checkbox>
                            <el-checkbox value="digitalGoods" name="type">
                            数码电器
                            </el-checkbox>
                        </el-checkbox-group>
                    </el-form-item>
                    <el-form-item label="取件方式">
                        <el-radio-group v-model="sendform.resource">
                            <el-radio value="Instance">上门取件</el-radio>
                            <el-radio value="SelfDelivery">自送服务点</el-radio>
                        </el-radio-group>
                    </el-form-item>
                    <el-form-item label="详细地址">
                        <el-input v-model="sendform.desc" type="textarea" />
                    </el-form-item>
                    <br>
                </el-form>
            </div>
            <br><br><br>
            <div class="sender">
                <img src="../img/receive_icon.png" style="display: inline;"><p style="display: inline; margin-left: 15px;">收件人信息填写</p><br><br>
                <el-form :model="receiveform" label-width="auto" style="max-width: 600px">

                    <el-form-item label="收件人姓名">
                        <el-input v-model="receiveform.name" />
                    </el-form-item>
                    <el-form-item label="收件人身份证">
                        <el-input v-model="receiveform.id" />
                    </el-form-item>
                    <el-form-item label="收件人手机号">
                        <el-input v-model="receiveform.telephoneNumber" />
                    </el-form-item>
                    <el-form-item label="收件人地区">
                        <el-select v-model="receiveform.region" placeholder="选择地区">
                            <el-option label="福建" value="fujian" />
                            <el-option label="徐州" value="xuzhou" />
                            <el-option label="淮安" value="huaian" />
                            <el-option label="陕西" value="shanxi" />
                            <el-option label="湖北" value="hubei" />      
                            <el-option label="上海" value="shanghai" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="收件人详细地址">
                        <el-input v-model="receiveform.desc" type="textarea" />
                    </el-form-item>
                    <br>
                </el-form>
            </div>
                <div class="mb-4">
                    <el-button type="primary" style="margin-left: 350px; margin-top: 100px;">确定</el-button>  
                </div>
        </div>
        <br><br>
        
    </div>
</template>
<style scoped>
    body{
        background: #F5F7FA;
    }
    .container{
        width: 125vh;
        height: 100vh;
        background-color: white;
        margin: 0 auto;
        position: relative;
    }
    a {
    color: inherit; /* 使链接文本颜色继承父元素的颜色 */
    text-decoration: none; /* 移除下划线 */
    }

        /* 如果你还想改变鼠标悬停时的样式 */
    a:hover {
        text-decoration: none; /* 悬停时仍然没有下划线 */
        cursor: auto; /* 改变鼠标指针样式为默认，或根据需要设置其他样式 */
    }
    
    .el-row {
        margin-bottom: 20px;
        justify-content: space-between;
    }
    .el-col {
        border-radius: 4px;
        margin-right: 50px;
        width: 100px;
        height: 100px;
    }
    .userPic{
        height: 90px;
        width: 90px;
        border-radius: 59px;
        /* background-color:#FA4B4B; */
    }
    .el-col:last-child{
        margin-right: 0px;
    }
    .el-row:last-child {
        margin-bottom: 0;
        
    }
    .div-p{
        font-size: 13px;
        text-align: center;
        margin-top: 20%;
    }
    .grid-content {
        border-radius: 4px;
        min-height: 36px;
    }
    .el-col:hover{
        cursor: pointer;
        border-bottom: 1px solid red;
        color: red;
    }
    .funcs{
        text-align: center;
        cursor: pointer;
    }
    .funcs:hover{
        color: red;
    }
    .sender{
        background-color: #eee;
        border-radius: 5px;
    }
</style>
<script setup>
    import { reactive } from 'vue'
    import { ref } from 'vue'
    import { ElButton, ElDrawer } from 'element-plus'
    import { CircleCloseFilled } from '@element-plus/icons-vue'

    const visible = ref(false);
    // do not use same name with ref
    const sendform = reactive({
        name: '',
        region: '',
        id:'',
        telephoneNumber:'',
        type: [],
        resource: '',
        desc:''
    });
    const receiveform = reactive({
        name: '',
        region: '',
        id:'',
        telephoneNumber:'',
        desc:''
    });

    const onSubmit = () => {
        
    }
</script>