You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
4.0 KiB
59 lines
4.0 KiB
<div class="window-modal " x-cloak data-type="window-modal" x-show="modalShow.option" x-ref="optionsModal" id="optionModal">
|
|
<div class="window-modal-content modal-xl">
|
|
<div class="window-modal-header">
|
|
<h4>OPTION加價</h4>
|
|
<button class="btn btn-close" @click="hideOptionsModal()">X</button>
|
|
<div class="mt-3">
|
|
<input type="text" class="form-control" x-model="searchtext" @keyup="searchOptions()" placeholder="搜尋..." />
|
|
</div>
|
|
<div class="categories mt-3">
|
|
<button :class="['btn', 'mt-2', (kind==1) ? 'btn-primary' : 'btn-secondary text-light']" @click="searchOptions(1)">顯示全部</button>
|
|
<button :class="['btn', 'mt-2', (kind=='A') ? 'btn-primary' : 'btn-secondary text-light']" @click="searchOptions('A', 1)">A-1 車廂意匠</button>
|
|
<button :class="['btn', 'mt-2', (kind=='B') ? 'btn-primary' : 'btn-secondary text-light']" @click="searchOptions('B', 1)">A-2 車廂內裝</button>
|
|
<button :class="['btn', 'mt-2', (kind=='C') ? 'btn-primary' : 'btn-secondary text-light']" @click="searchOptions('C', 1)">A-3 車廂外部</button>
|
|
<button :class="['btn', 'mt-2', (kind=='D') ? 'btn-primary' : 'btn-secondary text-light']" @click="searchOptions('D', 1)">A-4 控制與其他</button>
|
|
<button :class="['btn', 'mt-2', (kind=='E') ? 'btn-primary' : 'btn-secondary text-light']" @click="searchOptions('E', 1)">B-1 平台梯</button>
|
|
<button :class="['btn', 'mt-2', (kind=='F') ? 'btn-primary' : 'btn-secondary text-light']" @click="searchOptions('F', 1)">C-1 汰改</button>
|
|
<br /><br />
|
|
<template x-for="button in buttons">
|
|
<button style="margin-right:3px" :class="['btn', (button.type == subkind) ? 'btn-primary' : 'btn-secondary text-light']" @click="searchOptions(null, button.type)" x-text="button.name"></button>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
<div class="window-modal-body">
|
|
<div>
|
|
<table class="table " border=1>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>名稱</th>
|
|
<th>規格</th>
|
|
<th>備註</th>
|
|
<th>配置</th>
|
|
<th>單位</th>
|
|
<th>定價</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<template x-for="(option, idx) in options" :key="option.id">
|
|
<tr style="cursor:pointer;" :class="option.selected == 1 ? ' selected' : ''" x-show="option.isShow == 1" @click="selectOption(idx, option.id, option.group_name, option.price, option.memo)">
|
|
<td x-text='option.id' name="optionID" class="bg-transparent"></td>
|
|
<td x-text="option.group_name" class="bg-transparent"> </td>
|
|
<td x-text="option.spec" class="bg-transparent"></td>
|
|
<td x-text="option.memo" class="bg-transparent"></td>
|
|
<td x-text="optionalArr[option.optional]" class="bg-transparent"></td>
|
|
<td x-text="option.unit" class="bg-transparent"></td>
|
|
<td x-text="option.price" class="bg-transparent"></td>
|
|
</tr>
|
|
</template>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="hideOptionsModal()">關閉</button>
|
|
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" @click="chkOptions()">確認</button>
|
|
</div>
|
|
</div>
|
|
<div class="window-back" @click="hideOptionsModal()"></div>
|
|
</div>
|