<div class="modal fade" tabindex="-1" role="dialog" id="addContract">
    <div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
            </div>
            <div class="modal-body">
                <div class="container-fluid">
                    <div class="row">
                        <label class="col-2" for="owner">所属项目</label>
                        <span class="fa fa-edit col-1 form-font"></span>
                        <select id="owner" type="text" class="form-control form-control-sm ml-0 col-5" v-if="index !== ''">
                            <option v-for="owner in customerOwners[customers[index].id]" :value="owner.id">@{{ owner.name }}</option>
                        </select>
                    </div>
                    <div class="row mt-2">
                        <label class="col-2" for="contract_number">合同号</label>
                        <span class="fa fa-pencil col-1 form-font"></span>
                        <input id="contract_number" type="text" class="form-control form-control-sm ml-0 col-7">
                    </div>
                    <div class="row mt-2">
                        <label class="col-2" for="files">合同附件</label>
                        <input id="files" hidden multiple="multiple" type="file" @change="uploadFiles($event)">
                        <div class="col-7 pl-0">
                            <p v-for="(file,i) in files" class="border w-100 p-1" style="border-radius: 0.3rem">
                                <span class="fa fa-file ml-1"></span>&nbsp; @{{ file.name }}（<span class="text-primary">@{{ file.size | size }}</span>）
                                <span class="pull-right cursor-pointer text-danger close" @click="deleteFile(i)">&times;</span>
                            </p>
                            <p><button class="btn btn-success" @click="selectFile()">
                                    <span class="fa fa-files-o"></span>&nbsp;
                                    <span v-if="files && files.length>0">继续上传</span>
                                    <span v-else>选择文件</span>
                            </button></p>
                        </div>
                    </div>
                    <div class="row mt-2">
                        <label class="col-2" for="remark">合同备注</label>
                        <textarea class="form-control form-control-sm col-8" id="remark"></textarea>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success" @click="submitContract()">提交</button>
            </div>
        </div>
    </div>
</div>