<div class="modal fade" tabindex="-1" role="dialog" id="addItem">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-body">
                <div class="mt-3 row">
                    <label for="strategy" class="col-4">计费策略</label>
                    <select id="strategy" class="form-control form-control-sm col-6" v-model="item.strategy">
                        <optgroup v-if="existStrategy.starting && item.strategy!='起步'" label="起步"></optgroup>
                        <option v-else>起步</option>
                        <optgroup v-if="existStrategy.default && item.strategy!='默认'" label="默认"></optgroup>
                        <option v-else>默认</option>
                        <option>特征</option>
                    </select>
                </div>
                <div class="mt-3 row">
                    <label for="amount" class="col-4">起步数</label>
                    <input type="number" min="0" id="amount" class="form-control form-control-sm col-8"  v-model="item.amount">
                </div>
                <div class="mt-3 row">
                    <label for="unit_id" class="col-4">单位</label>
                    <select id="unit_id" class="form-control form-control-sm col-6" v-model="item.unit_id">
                        <option v-for="unit in units" :value="unit.id">@{{ unit.name }}</option>
                    </select>
                </div>
                <div class="mt-3 row">
                    <label for="unit_price" class="col-4">单价</label>
                    <input type="number" min="0" step="0.001" id="unit_price" class="form-control form-control-sm col-8" v-model="item.unit_price">
                </div>
                <div class="mt-3 row">
                    <label for="priority" class="col-4">优先级</label>
                    <input type="number" min="0" id="priority" class="form-control form-control-sm col-8" v-model="item.priority">
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success" @click="submitItem()">提交</button>
            </div>
        </div>
    </div>
</div>
