<div class="modal face" id="box">
    <div class="modal-dialog modal-lg boxClass" >
        <div class="modal-content">
            <div class="modal-header">
                <div class="modal-title">
                    <span v-show="tag==='update'">修改规则</span>
                    <span v-show="tag==='create'">创建规则</span>
                </div>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group row">
                        <label for="owner-id" class="col-sm-3 col-form-label text-right">货主</label>
                        <div class="col-sm-9 form-inline">
                            <select id="owner-id" class="form-control col-sm-6"
                                    :class="errors.owner_id?'is-invalid':''"
                                    v-model="stationRuleBatch.owner_id" @input="setStationRuleBatchName($event)"
                                    @change="errors.owner_id = null">
                                <option value=""></option>
                                <option :value="owner.id" v-for="owner in ownerFilters">@{{ owner.name }}</option>
                            </select>
                            <input type="text" name="material-code" id="owner-id" class="form-control col-sm-3" placeholder="货主" @input="filterOwner($event)" v-model="filterName">
                            <div class="invalid-feedback" v-if="errors.owner_id">
                                @{{ errors.owner_id ? errors.owner_id[0] : ''  }}
                            </div>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="rule-name" class="col-sm-3 col-form-label text-right">名称</label>
                        <div class="col-sm-9 form-inline">
                            <input type="text" name="phone" id="rule-name" class="form-control col-9"
                                   :class="errors.name &&  !stationRuleBatch.name ?'is-invalid':''"
                                   v-model="stationRuleBatch.name" @change="errors.name = null">
                            <div class="invalid-feedback" v-if="errors.name">
                                @{{ errors.name ? errors.name[0] : ''  }}
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn btn-primary" @click="_edit" v-show="tag==='update'">修改</button>
                <button class="btn btn-primary" @click="_create" v-show="tag==='create'">创建</button>
            </div>
        </div>
    </div>
</div>

