mirror of
https://github.com/creativetimofficial/vue-material-kit.git
synced 2025-05-23 04:04:22 +08:00
update funtion
This commit is contained in:
parent
c6dae715b4
commit
a4a19face5
@ -11,7 +11,9 @@
|
||||
{
|
||||
"label": "นางสาว",
|
||||
"value": "นางสาว"
|
||||
},
|
||||
}
|
||||
],
|
||||
"ranks2": [
|
||||
{
|
||||
"label": "ส.ต.ต.",
|
||||
"value": "ส.ต.ต."
|
||||
@ -51,7 +53,9 @@
|
||||
{
|
||||
"label": "ด.ต.หญิง",
|
||||
"value": "ด.ต.หญิง"
|
||||
},
|
||||
}
|
||||
],
|
||||
"ranks3": [
|
||||
{
|
||||
"label": "ร.ต.ต.",
|
||||
"value": "ร.ต.ต."
|
||||
@ -154,16 +158,8 @@
|
||||
],
|
||||
"Affiliation": [
|
||||
{
|
||||
"label": "ลูกจ้าง",
|
||||
"value": "ลูกจ้าง"
|
||||
},
|
||||
{
|
||||
"label": "บช.ตซด.",
|
||||
"value": "บช.ตซด."
|
||||
},
|
||||
{
|
||||
"label": "บช.อก.",
|
||||
"value": "บช.อก."
|
||||
"label": "บก.อก.",
|
||||
"value": "บก.อก."
|
||||
},
|
||||
{
|
||||
"label": "ฝอ.1",
|
||||
@ -196,10 +192,12 @@
|
||||
{
|
||||
"label": "ฝอ.8",
|
||||
"value": "ฝอ.8"
|
||||
},
|
||||
}
|
||||
],
|
||||
"Affiliation2": [
|
||||
{
|
||||
"label": "บช.สสน.",
|
||||
"value": "บช.สสน."
|
||||
"label": "บก.สนน.",
|
||||
"value": "บก.สสน."
|
||||
},
|
||||
{
|
||||
"label": "ฝสสน.1",
|
||||
@ -327,5 +325,37 @@
|
||||
"roomnumber": "12,13",
|
||||
"type": "ช.2"
|
||||
}
|
||||
],
|
||||
"typeranks": [
|
||||
{
|
||||
"label": "ทั่วไป",
|
||||
"value": "ทั่วไป"
|
||||
},
|
||||
{
|
||||
"label": "ประทวน",
|
||||
"value": "ประทวน"
|
||||
},
|
||||
{
|
||||
"label": "สัญญาบัตร",
|
||||
"value": "สัญญาบัตร"
|
||||
}
|
||||
],
|
||||
"typeAffiliation": [
|
||||
{
|
||||
"label": "ลูกจ้าง",
|
||||
"value": "ลูกจ้าง"
|
||||
},
|
||||
{
|
||||
"label": "บช.ตซด.",
|
||||
"value": "บช.ตซด."
|
||||
},
|
||||
{
|
||||
"label": "บก.อก.",
|
||||
"value": "บก.อก."
|
||||
},
|
||||
{
|
||||
"label": "บก.สนน.",
|
||||
"value": "บก.สนน."
|
||||
}
|
||||
]
|
||||
}
|
@ -82,6 +82,7 @@ export default {
|
||||
rank: "", //ยศ
|
||||
idcard: "",
|
||||
phone: "",
|
||||
booknumber: ""
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -166,8 +167,8 @@ export default {
|
||||
<div class="d-flex align-items-baseline">
|
||||
<label style="margin-right: 20px">ค้นหาชื่อ </label>
|
||||
<MaterialInput
|
||||
style="margin-right: 20px; width:300px"
|
||||
class="input-group-dynamic "
|
||||
style="margin-right: 20px; width: 300px"
|
||||
class="input-group-dynamic"
|
||||
icon="search"
|
||||
type="text"
|
||||
placeholder="Search"
|
||||
@ -237,6 +238,17 @@ export default {
|
||||
<label>ชื่อผู้เช่า</label>
|
||||
<v-select :options="options" v-model="selectedColor"></v-select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label style="margin-left: -5px">กรอกเลขลงรับหนังสือ</label>
|
||||
<textarea
|
||||
:value="booknumber"
|
||||
@input="(event) => (booknumber = event.target.value)"
|
||||
class="form-control"
|
||||
id="exampleFormControlTextarea1"
|
||||
rows="3"
|
||||
placeholder="ตัวอย่าง : 11244"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
@ -293,17 +293,7 @@ export default {
|
||||
placeholder="จำนวนงวดเงินค่าประกัน"
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label style="margin-left:-5px">กรอกเลขลงรับหนังสือ</label>
|
||||
<textarea
|
||||
:value="booknumber"
|
||||
@input="(event) => (booknumber = event.target.value)"
|
||||
class="form-control"
|
||||
id="exampleFormControlTextarea1"
|
||||
rows="3"
|
||||
placeholder="ตัวอย่าง : 11244"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@ -489,57 +479,7 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- modal -->
|
||||
<div
|
||||
class="modal fade"
|
||||
id="addBookBackdrop"
|
||||
data-bs-backdrop="static"
|
||||
data-bs-keyboard="false"
|
||||
tabindex="-1"
|
||||
aria-labelledby="staticBackdropLabel"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="staticBackdropLabel">เพิ่มเลขลงรับหนังสือ</h5>
|
||||
<button
|
||||
type="button"
|
||||
class="btn-close"
|
||||
data-bs-dismiss="modal"
|
||||
aria-label="Close"
|
||||
></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<div class="mb-3">
|
||||
<label style="margin-left:-5px">กรอกเลขลงรับหนังสือ</label>
|
||||
<textarea
|
||||
:value="booknumber"
|
||||
@input="(event) => (booknumber = event.target.value)"
|
||||
class="form-control"
|
||||
id="exampleFormControlTextarea1"
|
||||
rows="3"
|
||||
placeholder="ตัวอย่าง : 11244"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
ปิดหน้าต่าง
|
||||
</button>
|
||||
<MaterialButton
|
||||
variant="gradient"
|
||||
color="success"
|
||||
@click="submitForm"
|
||||
html-type="submit"
|
||||
>บันทึก</MaterialButton
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</template>
|
||||
<style>
|
||||
|
@ -93,6 +93,8 @@ export default {
|
||||
selectedRanks: "ส.ต.ต.",
|
||||
selectedAffiliation: "ฝอ.2",
|
||||
birthday: "14/07/2534",
|
||||
typeAffiliation: "ทั่วไป",
|
||||
typeRanks: "ประทวน",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -103,6 +105,20 @@ export default {
|
||||
// this.updateColor(newValue)
|
||||
console.log(newValue);
|
||||
},
|
||||
typeAffiliation: function (newValue) {
|
||||
// this.updateColor(newValue)
|
||||
console.log(newValue);
|
||||
// if(newValue != undefined){
|
||||
// this.typeAffiliation = newValue.value
|
||||
// }
|
||||
},
|
||||
typeRanks: function (newValue) {
|
||||
// this.updateColor(newValue)
|
||||
console.log(newValue);
|
||||
// if(newValue != undefined){
|
||||
// this.typeRanks = newValue.value
|
||||
// }
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
changedLabel(event) {
|
||||
@ -176,7 +192,6 @@ export default {
|
||||
/>
|
||||
<label class="form-check-label" for="inlineRadio2">บช.ตชด.</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="d-flex align-items-baseline">
|
||||
<label style="margin-right: 10px">ค้นหาชื่อ </label>
|
||||
@ -199,27 +214,27 @@ export default {
|
||||
</div>
|
||||
<div>
|
||||
<div class="form-check form-check-inline">
|
||||
<label style="margin-right: 20px">ยศ</label>
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
name="inlineRadioOptions1"
|
||||
id="inlineRadio3"
|
||||
value="Radio3"
|
||||
checked
|
||||
/>
|
||||
<label class="form-check-label" for="inlineRadio3">ประทวน</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
name="inlineRadioOptions1"
|
||||
id="inlineRadio4"
|
||||
value="Radio4"
|
||||
/>
|
||||
<label class="form-check-label" for="inlineRadio4">สัญญาบัตร</label>
|
||||
</div>
|
||||
<label style="margin-right: 20px">ยศ</label>
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
name="inlineRadioOptions1"
|
||||
id="inlineRadio3"
|
||||
value="Radio3"
|
||||
checked
|
||||
/>
|
||||
<label class="form-check-label" for="inlineRadio3">ประทวน</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
name="inlineRadioOptions1"
|
||||
id="inlineRadio4"
|
||||
value="Radio4"
|
||||
/>
|
||||
<label class="form-check-label" for="inlineRadio4">สัญญาบัตร</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center pt-4 table-responsive">
|
||||
<table class="table border border-2 border-success">
|
||||
@ -286,18 +301,50 @@ export default {
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<div class="mb-3">
|
||||
<div class="mb-1">
|
||||
<label>สังกัด</label>
|
||||
<v-select
|
||||
:options="masterData?.typeAffiliation"
|
||||
v-model="typeAffiliation"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-3" v-if="typeAffiliation.label == 'บก.อก.'">
|
||||
<label>สังกัด {{ typeAffiliation.label }}</label>
|
||||
<v-select
|
||||
:options="masterData?.Affiliation"
|
||||
v-model="selectedAffiliation"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<div class="mb-3" v-if="typeAffiliation.label == 'บก.สนน.'">
|
||||
<label>สังกัด {{ typeAffiliation.label }}</label>
|
||||
<v-select
|
||||
:options="masterData?.Affiliation2"
|
||||
v-model="selectedAffiliation"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<label>ยศ</label>
|
||||
<v-select :options="masterData?.typeranks" v-model="typeRanks"></v-select>
|
||||
</div>
|
||||
<div class="mb-3" v-if="typeRanks.label == 'ทั่วไป'">
|
||||
<label> {{ typeRanks.label }}</label>
|
||||
<v-select :options="masterData?.ranks" v-model="selectedRanks"></v-select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<div class="mb-3" v-if="typeRanks.label == 'ประทวน'">
|
||||
<label> {{ typeRanks.label }}</label>
|
||||
<v-select
|
||||
:options="masterData?.ranks2"
|
||||
v-model="selectedRanks"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-3" v-if="typeRanks.label == 'สัญญาบัตร'">
|
||||
<label> {{ typeRanks.label }}</label>
|
||||
<v-select
|
||||
:options="masterData?.ranks3"
|
||||
v-model="selectedRanks"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-3 pt-1">
|
||||
<MaterialInput
|
||||
name="firstName"
|
||||
:value="firstName"
|
||||
@ -383,17 +430,49 @@ export default {
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<div class="mb-3">
|
||||
<div class="mb-1">
|
||||
<label>สังกัด</label>
|
||||
<v-select
|
||||
:options="masterData?.typeAffiliation"
|
||||
v-model="typeAffiliation"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-3" v-if="typeAffiliation.label == 'บก.อก.'">
|
||||
<label>สังกัด {{ typeAffiliation.label }}</label>
|
||||
<v-select
|
||||
:options="masterData?.Affiliation"
|
||||
v-model="selectedAffiliation"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<div class="mb-3" v-if="typeAffiliation.label == 'บก.สนน.'">
|
||||
<label>สังกัด {{ typeAffiliation.label }}</label>
|
||||
<v-select
|
||||
:options="masterData?.Affiliation2"
|
||||
v-model="selectedAffiliation"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<label>ยศ</label>
|
||||
<v-select :options="masterData?.typeranks" v-model="typeRanks"></v-select>
|
||||
</div>
|
||||
<div class="mb-3" v-if="typeRanks.label == 'ทั่วไป'">
|
||||
<label> {{ typeRanks.label }}</label>
|
||||
<v-select :options="masterData?.ranks" v-model="selectedRanks"></v-select>
|
||||
</div>
|
||||
<div class="mb-3" v-if="typeRanks.label == 'ประทวน'">
|
||||
<label> {{ typeRanks.label }}</label>
|
||||
<v-select
|
||||
:options="masterData?.ranks2"
|
||||
v-model="selectedRanks"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-3" v-if="typeRanks.label == 'สัญญาบัตร'">
|
||||
<label> {{ typeRanks.label }}</label>
|
||||
<v-select
|
||||
:options="masterData?.ranks3"
|
||||
v-model="selectedRanks"
|
||||
></v-select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<MaterialInput
|
||||
name="firstName"
|
||||
|
Loading…
x
Reference in New Issue
Block a user