<div class="modal " id="add-proof" tabindex="-1" >
    <div class="modal-dialog modal-lg modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title text-center">新增打样单</h5>
                <button type="button" class="close" data-dismiss="modal">
                    <span>&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form class="form">
                    <div class="form-group row">
                        <label for="owner_id" class="col-2 col-form-label text-right text-primary">项目名称{{old('owner_id')}} *</label>
                        <div class="col-8 form-inline">
                            <select id="owner_id" name="owner_id" class="form-control col-4" :class="errors.owner_id ? 'is-invalid' : ''" v-model="owner_id" @change="selectOwner" required>
                                <option v-for="owner in owners" :value="owner.name">@{{owner.value}}</option>
                            </select>
                            <input type="text" class="form-control-sm ml-2" placeholder="输入关键字定位项目" @input="owner_seek">
                            <span class="invalid-feedback" role="alert" v-if="errors.owner_id">
                                <strong>@{{ errors.owner_id[0] }}</strong>
                            </span>
                        </div>
                    </div>
{{--                    <div class="form-group row">--}}
{{--                        <label for="customer_name" class="col-2 col-form-label text-right">客户名称</label>--}}
{{--                        <div class="col-8">--}}
{{--                            <input type="text" class="form-control " name="customer_name" autocomplete="off" value="{{ old('customer_name') }}" v-model="customer_name" readonly>--}}
{{--                        </div>--}}
{{--                    </div>--}}
                    <div class="form-group row">
                        <label for="owner_material_id" class="col-2 col-form-label text-right text-primary">项目耗材编号{{old('owner_material_id')}} *</label>
                        <div class="col-8">
                            <select id="owner_material_id" name="owner_material_id" :class="errors.owner_material_id ? 'is-invalid' : ''" class="form-control" v-model="owner_material_id" @change="ownerMaterial" required>
                                <option v-for="ownerMaterial in ownerMaterials" :value="ownerMaterial.id">@{{ownerMaterial.material_code}}</option>
                            </select>
                            <span class="invalid-feedback" role="alert" v-if="errors.owner_material_id">
                                <strong>@{{ errors.owner_material_id[0] }}</strong>
                            </span>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="name" class="col-2 col-form-label text-right">耗材名称</label>
                        <div class="col-8">
                            <input type="text" class="form-control " name="material_name" autocomplete="off" value="{{ old('material_name') }}" v-model="material_name" readonly>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="name" class="col-2 col-form-label text-right">尺寸大小</label>
                        <div class="col-8">
                            <input type="text" class="form-control " name="size" autocomplete="off" value="{{ old('size') }}" v-model="size" readonly>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="name" class="col-2 col-form-label text-right">特殊要求</label>
                        <div class="col-8">
                            <input type="text" class="form-control " name="special" autocomplete="off" value="{{ old('special') }}" v-model="special" readonly>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="name" class="col-2 col-form-label text-right">材质规格</label>
                        <div class="col-8">
                            <textarea type="text" class="form-control" name="specification" autocomplete="off" value="{{ old('specification') }}" readonly>@{{ specification }}</textarea>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary"  data-dismiss="modal" >关闭</button>
                <button type="button" class="btn btn-primary" @click="createProof">提交</button>
            </div>
        </div>
    </div>
</div>
