<div class="row mt-3">
    <label for="customer_id" class="col-2 text-info">客户</label>
    <select id="customer_id" v-model="owner.customer_id" @change="selectOwner()" class="form-control form-control-sm col-4 mb-0" :class="errors.customer_id ? 'is-invalid' : ''">
        <option v-for="customer in customers" :value="customer.id">@{{ customer.name }}</option>
    </select>
    <label class="col-2"><input type="text" class="form-control form-control-sm rounded-pill" placeholder="输入关键字定位客户" @input="filterCustomer($event)"></label>
    <span class="invalid-feedback mt-0 offset-2" role="alert" v-if="errors.customer_id">
        <strong>@{{ errors.customer_id[0] }}</strong>
    </span>
</div>
<div class="row mt-3">
    <label for="owner_group_id" class="col-2 text-info">项目小组</label>
    <select id="owner_group_id" v-model="owner.owner_group_id" @change="selectGroup()" class="form-control form-control-sm col-4 mb-0" :class="errors.owner_group_id ? 'is-invalid' : ''" >
        <option v-for="ownerGroup in ownerGroups" :value="ownerGroup.id">@{{ ownerGroup.name }}</option>
    </select>
    <label class="col-2"><input type="text" class="form-control form-control-sm rounded-pill" placeholder="输入关键字项目小组" @input="filterOwnerGroup($event)"></label>
    <span class="invalid-feedback offset-2 mt-0" role="alert" v-if="errors.owner_group_id">
        <strong>@{{ errors.owner_group_id[0] }}</strong>
    </span>
</div>
<div class="row mt-3">
    <label for="warehouse_id" class="col-2 text-info">仓库</label>
    <select id="warehouse_id" v-model="owner.warehouse_id" class="form-control form-control-sm col-4 mb-0" :class="errors.warehouse_id ? 'is-invalid' : ''" >
        <option v-for="warehouse in warehouses" :value="warehouse.id">@{{ warehouse.name }}</option>
    </select>
    <span class="invalid-feedback offset-2 mt-0" role="alert" v-if="errors.warehouse_id">
        <strong>@{{ errors.warehouse_id[0] }}</strong>
    </span>
</div>
<div class="row mt-3">
    <label for="user_workgroup_id" class="col-2 text-info">仓库小组</label>
    <select id="user_workgroup_id" v-model="owner.user_workgroup_id" @change="selectGroup()" class="form-control form-control-sm col-4 mb-0" :class="errors.user_workgroup_id ? 'is-invalid' : ''" >
        <option v-for="userGroup in userGroups" :value="userGroup.id" v-if="userGroup.warehouse_id == owner.warehouse_id">@{{ userGroup.name }}</option>
    </select>
    <label class="col-2"><input type="text" class="form-control form-control-sm rounded-pill" placeholder="输入关键字项目小组" @change="filterUserGroup($event)"></label>
    <span class="invalid-feedback offset-2 mt-0" role="alert" v-if="errors.user_workgroup_id">
        <strong>@{{ errors.user_workgroup_id[0] }}</strong>
    </span>
</div>
<div class="row mt-3">
    <label for="subjection" class="col-2">主体公司</label>
    <select id="subjection" v-model="owner.subjection" class="form-control form-control-sm col-4 mb-0" >
        <option v-for="(ownerSubjection,i) in pool.ownerSubjections" :value="i+1">@{{ pool.ownerSubjections[i+1] }}</option>
    </select>
</div>
<div class="row mt-3">
    <label for="tax_rate_id" class="col-2">税率</label>
    <select id="tax_rate_id" v-model="owner.tax_rate_id" class="form-control form-control-sm col-4 mb-0" :class="errors.tax_rate_id ? 'is-invalid' : ''" >
        <option value=""> </option>
        <option value="0">子模型必填</option>
        <option v-for="taxRate in pool.taxRates" :value="taxRate.id">@{{ taxRate.value }}%</option>
    </select>
    <span class="invalid-feedback offset-2 mt-0" role="alert" v-if="errors.tax_rate_id">
        <strong>@{{ errors.tax_rate_id[0] }}</strong>
    </span>
</div>
<div class="row mt-3">
    <label for="waring_line_on" class="col-2">月单量预警</label>
    <input type="number" v-model="owner.waring_line_on" id="waring_line_on" class="form-control form-control-sm col-3 mb-0" :class="errors.waring_line_on ? 'is-invalid' : ''">
    <span class="invalid-feedback offset-2 mt-0" role="alert" v-if="errors.waring_line_on">
        <strong>@{{ errors.waring_line_on[0] }}</strong>
    </span>
</div>
<div class="row mt-3">
    <label for="linkman" class="col-2">联系人</label>
    <input type="text" v-model="owner.linkman" id="linkman" class="form-control form-control-sm col-7">
</div>
<div class="row mt-3">
    <label for="phone_number" class="col-2">联系电话</label>
    <input type="text" v-model="owner.phone_number" id="phone_number" class="form-control form-control-sm col-7">
</div>
<div class="row mt-3">
    <label for="description" class="col-2">项目描述</label>
    <textarea id="description" v-model="owner.description" class="form-control form-control-sm col-7"></textarea>
</div>
