<div class="modal fade" tabindex="-1" role="dialog" id="importModal">
    <div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
        <div class="modal-content">
            <div class="modal-body">
                <div class="w-100 text-center mb-1" v-if="errors.length > 0">
                    <button class="btn btn-sm btn-danger mb-1 w-50" @click="isShowError = true" v-if="!isShowError">@{{ errors.length }}条错误,点击展开</button>
                    <button class="btn btn-sm btn-primary mb-1 w-50" @click="isShowError = false" v-else>收起错误展示</button>
                    <div v-if="isShowError" class="container-fluid text-danger font-weight-bolder">
                        <div class="row text-left">
                            <div class="col-6" v-for="error in errors">@{{ error }}</div>
                        </div>
                    </div>
                </div>
                <div class="mt-5 mb-5">
                    <input id="file" type="file" class="d-none" accept=".csv, .xlsx, .xls" @change="importAssign($event)"/>
                    <label class="w-100 text-center small"><b>表头示例：</b><label class="text-primary">订单编号  商品条码  数量  生产日期  失效日期</label></label>
                    <label class="w-100 row d-block ml-1"><input type="button" class="btn btn-dark col-6 offset-3" value="导入指定分配" @click="selectFile()"></label>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
