<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="https://www.thymeleaf.org ">
<head>
    <title>采美365网-申请维修-中国美业全方位线上交易服务互动平台，做美业，上采美</title>
    <template th:replace="components/head-link"></template>
    <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/user-center/repair/form.css(v=${version})}" rel="stylesheet" type="text/css">
</head>
<body>
<!-- 引用头部 -->
<template th:replace="components/header"></template>
<!-- 我的维修 -->
<div id="addFormPage" v-cloak>
    <div class="navLayout" th:object="${pageInfo}">
        <div class="crumbs">
            <span>我的交易</span>
            <span>&gt;</span>
            <span>我的维修</span>
            <span>&gt;</span>
            <span>申请维修</span>
        </div>
        <div class="wrap clear">
            <!--左侧面包屑-->
            <template th:replace="user-center/components/tableft"></template>
            <div class="right">
                <div class="container clear">
                    <form>
                        <div class="formLine">
                            <p><em>*</em>联系人：</p>
                            <input type="text" v-model.trim="form.userContact" placeholder="请输入联系人姓名" :rule="rule.name" maxlength="10" @blur="blurHandle($event)" needverify>
                            <i class="checked icon mIcon"></i>
                            <span class="errTips icon mIcon" tips="请输入联系人姓名"></span>
                        </div>
                        <div class="formLine">
                            <p><em>*</em>联系方式：</p>
                            <input type="text" v-model.trim="form.userMobile" placeholder="请输入联系人手机号" :rule="rule.phone" maxlength="11" @blur="blurHandle($event)" needverify>
                            <i class="checked icon mIcon"></i>
                            <span class="errTips icon mIcon" tips="请输入正确的手机号"></span>
                        </div>
                        <div class="formLine">
                            <p><em>*</em>联系地址：</p>
                            <div class="address">
                                <select name="province" id="province" ref="cProvince" @change="ChangeProvince" v-model="addressfrom.province">
                                    <option value="" >请选择</option>
                                    <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.provinceID' >{{item.name}}</option>
                                </select>
                                <select name="city" id="cCity" @change="ChangeGetcity($event)" v-model="addressfrom.city">
                                    <option value="" >请选择</option>
                                    <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID" >{{item.name}}</option>
                                </select>
                                <select name="town" id="cTown" @change="ChangeGetcTown($event)" v-model="addressfrom.town">
                                    <option value="" >请选择</option>
                                    <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
                                </select>
                                <textarea placeholder="建议您如实填写详细地址，例如：街道名称，门牌号码，楼层和房间号等信息"  v-model="form.userAddress"></textarea>
                            </div>
                            <i class="checked icon mIcon"></i>
                            <span class="errTips icon mIcon" tips="请输入正确的联系地址"></span>
                        </div>
                        <div class="formLine">
                            <p><em>*</em>仪器名称：</p>
                            <input type="text" v-model.trim="form.instrumentName" placeholder="请输入仪器名称" :rule="rule.name" maxlength="30" @blur="blurHandle($event)" needverify>
                            <i class="checked icon mIcon"></i>
                            <span class="errTips icon mIcon" tips="请输入仪器名称"></span>
                        </div>
                        <div class="formLine">
                            <p>生产厂家：</p>
                            <input type="text" v-model.trim="form.manufacturer" placeholder="请输入生产厂家"  maxlength="30">
                        </div>
                        <div class="formLine file">
                            <p>上传仪器图片：</p>
                            <div class="upload-image"  id="uploadGoodsImages">
                                <div class="upload-file"  v-for="(item, index) in form.imagesList" :key="index">
                                    <img :src="item" alt="" :data-image="item" :id="'uploadGoodsImages'+ index" class="upload-img" @click="showViewerImageFn(index)">
                                    <i class="icon-del" @click="removeGoodsImagesFn(index)"></i>
                                </div>
                                <div class="upload-file" v-show="form.imagesList.length<5">
                                    <div class="file-add">
                                        <i class="icon mIcon"></i>
                                        <p>添加图片</p>
                                    </div>
                                    <input ref="goodsImages" type="file" name="file" value="" class="input-file" accept="image/png,image/jpeg,image/gif,image/jpg"  @change="uploadGoodsImagesFn">
                                </div>
                            </div>
                            <div class="upload-tips">
                                <p>请尽量上传仪器全照或者仪器故障图片，方便您的维修事宜</p>
                                <p>上传jpg/png格式照片，单个照片不能超过5M,最多不超过5张</p>
                            </div>
                        </div>
                        <div class="formLine">
                            <p><em>*</em>问题描述：</p>
                            <div class="address mark">
                                <textarea placeholder="建议您的问题描述..."  v-model="form.problemDescription"></textarea>
                            </div>
                            <i class="checked icon mIcon"></i>
                            <span class="errTips icon mIcon" tips="请输入正确的联系地址"></span>
                        </div>
                        <div class="formLine">
                            <a href="javascript: void(0);" @click="submitData" class="btn" :class="loginLoading ? 'disabled' : ''">提交</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 引入底部 -->
<template th:replace="components/footer"></template>
<template th:replace="components/foot-link"></template>
<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/repair.service.js(v=${version})}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/user-center/repair/form-user.js(v=${version})}"></script>
</body>
</html>
