<div class="row">
    <label for="logistic_name" class="col-2"><b class="text-danger">* </b>价格名称</label>
    <input id="logistic_name" type="text" class="col-6 form-control"
           :class="errors.name ? 'is-invalid' : ''" v-model="model.logistic.name">
    <span class="invalid-feedback mt-0 offset-2" role="alert" v-if="errors.name">
        <strong>@{{ errors.name[0] }}</strong>
    </span>
</div>
<div class="row mt-3">
    <label class="col-2" for="logistic_id">承运商</label>
    <select id="logistic_id" class="selectpicker logistic" multiple data-live-search="true" title="承运商(多选)"
            v-model="model.logistic.logistics" :class="errors.logistics ? 'is-invalid' : ''">
        <option v-for="logistic in pool.logistics" :value="logistic.id" v-if="logistic.type != '快递'">@{{ logistic.name }}</option>
    </select>
</div>
<div class="row mt-3">
    <label for="logistic_pick_up_price" class="col-2">提货费</label>
    <input id="logistic_pick_up_price" type="number" min="0" step="0.01" class="col-3 form-control"
           :class="errors.pick_up_price ? 'is-invalid' : ''" v-model="model.logistic.pick_up_price">
    <span class="invalid-feedback mt-0 offset-2" role="alert" v-if="errors.pick_up_price">
        <strong>@{{ errors.pick_up_price[0] }}</strong>
    </span>
</div>
<div class="row mt-3">
    <label for="logistic_fuel_price" class="col-2">燃油附加费</label>
    <input id="logistic_fuel_price" type="number" min="0" step="0.01" class="col-3 form-control"
           :class="errors.fuel_price ? 'is-invalid' : ''" v-model="model.logistic.fuel_price">
    <span class="invalid-feedback mt-0 offset-2" role="alert" v-if="errors.fuel_price">
        <strong>@{{ errors.fuel_price[0] }}</strong>
    </span>
</div>
<div class="row mt-3">
    <label for="logistic_service_price" class="col-2">信息服务费</label>
    <input id="logistic_service_price" type="number" min="0" step="0.01" class="col-3 form-control"
           :class="errors.service_price ? 'is-invalid' : ''" v-model="model.logistic.service_price">
    <span class="invalid-feedback mt-0 offset-2" role="alert" v-if="errors.service_price">
        <strong>@{{ errors.service_price[0] }}</strong>
    </span>
</div>
<div class="row mt-3 mb-0">
    <label for="logistic_unit_id" class="col-2"><b class="text-danger">* </b>单位一</label>
    <select id="logistic_unit_id" class="col-2 form-control"
            v-model="model.logistic.unit_id" :class="errors.unit_id ? 'is-invalid' : ''">
        <option v-for="unit in pool.units" :value="unit.id">@{{ unit.name }}</option>
    </select>
    <label for="logistic_unit_range" class="col-2 text-right"><b class="text-danger">*</b>区间值</label>
    <input id="logistic_unit_range" type="text" placeholder="文字描述区间逗号(,)间隔,示例：0-5,10-30,30-"
           v-model="model.logistic.unit_range" class="col-3 form-control" :class="errors.unit_range ? 'is-invalid' : ''" @change="changeRange('ranges')">
</div>
<div class="row mt-0">
    <label class="offset-2 mt-0 col-3 small text-danger">
        <label v-if="errors.unit_id">@{{ errors.unit_id[0] }}</label></label>
    <label class="offset-1 mt-0 col-5 small text-danger" v-if="errors.unit_range">@{{ errors.unit_range[0] }}</label>
</div>
<div class="row mt-3 mb-0">
    <label for="logistic_other_unit_id" class="col-2"><b class="text-danger">* </b>单位二</label>
    <select id="logistic_other_unit_id" class="col-2 form-control"
            v-model="model.logistic.other_unit_id" :class="errors.other_unit_id ? 'is-invalid' : ''">
        <option v-for="unit in pool.units" :value="unit.id">@{{ unit.name }}</option>
    </select>
    <label for="logistic_other_unit_range" class="col-2 text-right"><b class="text-danger">*</b>区间值</label>
    <input id="logistic_other_unit_range" type="text" placeholder="文字描述区间逗号(,)间隔,示例：0-5,5-30,30-" title="文字描述区间逗号(,)间隔,示例：0-5,5-30,30-"
           v-model="model.logistic.other_unit_range" class="col-3 form-control" :class="errors.other_unit_range ? 'is-invalid' : ''" @change="changeRange('other_ranges')">
</div>
<div class="row mt-0">
    <label class="offset-2 mt-0 col-3 small text-danger">
        <label v-if="errors.other_unit_id">@{{ errors.other_unit_id[0] }}</label></label>
    <label class="offset-1 mt-0 col-5 small text-danger" v-if="errors.other_unit_range">@{{ errors.other_unit_range[0] }}</label>
</div>
<div class="row mt-3">
    <label class="col-2">详情</label>
    <div class="col-10">
        <div class="row">
            <button type="button" class="btn btn-sm btn-outline-info col-4" @click="showDetailModal()">详情列表</button>
        </div>
    </div>
</div>
<div class="row mt-3">
    <label for="tax_rate_id" class="col-2 text-muted">税率</label>
    <select id="tax_rate_id" class="col-3 form-control" v-model="model.logistic.tax_rate_id" :class="errors.tax_rate_id ? 'is-invalid' : ''">
        <option> </option>
        <option v-for="tax in pool.taxRates" :value="tax.id">@{{ tax.value }}%</option>
    </select>
</div>