mirror of
https://github.com/creativetimofficial/vue-material-kit.git
synced 2025-05-23 21:04:21 +08:00
update funtion
This commit is contained in:
parent
c6dae715b4
commit
a4a19face5
@ -11,7 +11,9 @@
|
|||||||
{
|
{
|
||||||
"label": "นางสาว",
|
"label": "นางสาว",
|
||||||
"value": "นางสาว"
|
"value": "นางสาว"
|
||||||
},
|
}
|
||||||
|
],
|
||||||
|
"ranks2": [
|
||||||
{
|
{
|
||||||
"label": "ส.ต.ต.",
|
"label": "ส.ต.ต.",
|
||||||
"value": "ส.ต.ต."
|
"value": "ส.ต.ต."
|
||||||
@ -51,7 +53,9 @@
|
|||||||
{
|
{
|
||||||
"label": "ด.ต.หญิง",
|
"label": "ด.ต.หญิง",
|
||||||
"value": "ด.ต.หญิง"
|
"value": "ด.ต.หญิง"
|
||||||
},
|
}
|
||||||
|
],
|
||||||
|
"ranks3": [
|
||||||
{
|
{
|
||||||
"label": "ร.ต.ต.",
|
"label": "ร.ต.ต.",
|
||||||
"value": "ร.ต.ต."
|
"value": "ร.ต.ต."
|
||||||
@ -154,16 +158,8 @@
|
|||||||
],
|
],
|
||||||
"Affiliation": [
|
"Affiliation": [
|
||||||
{
|
{
|
||||||
"label": "ลูกจ้าง",
|
"label": "บก.อก.",
|
||||||
"value": "ลูกจ้าง"
|
"value": "บก.อก."
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "บช.ตซด.",
|
|
||||||
"value": "บช.ตซด."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "บช.อก.",
|
|
||||||
"value": "บช.อก."
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "ฝอ.1",
|
"label": "ฝอ.1",
|
||||||
@ -196,10 +192,12 @@
|
|||||||
{
|
{
|
||||||
"label": "ฝอ.8",
|
"label": "ฝอ.8",
|
||||||
"value": "ฝอ.8"
|
"value": "ฝอ.8"
|
||||||
},
|
}
|
||||||
|
],
|
||||||
|
"Affiliation2": [
|
||||||
{
|
{
|
||||||
"label": "บช.สสน.",
|
"label": "บก.สนน.",
|
||||||
"value": "บช.สสน."
|
"value": "บก.สสน."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "ฝสสน.1",
|
"label": "ฝสสน.1",
|
||||||
@ -327,5 +325,37 @@
|
|||||||
"roomnumber": "12,13",
|
"roomnumber": "12,13",
|
||||||
"type": "ช.2"
|
"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: "", //ยศ
|
rank: "", //ยศ
|
||||||
idcard: "",
|
idcard: "",
|
||||||
phone: "",
|
phone: "",
|
||||||
|
booknumber: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -166,8 +167,8 @@ export default {
|
|||||||
<div class="d-flex align-items-baseline">
|
<div class="d-flex align-items-baseline">
|
||||||
<label style="margin-right: 20px">ค้นหาชื่อ </label>
|
<label style="margin-right: 20px">ค้นหาชื่อ </label>
|
||||||
<MaterialInput
|
<MaterialInput
|
||||||
style="margin-right: 20px; width:300px"
|
style="margin-right: 20px; width: 300px"
|
||||||
class="input-group-dynamic "
|
class="input-group-dynamic"
|
||||||
icon="search"
|
icon="search"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Search"
|
placeholder="Search"
|
||||||
@ -237,6 +238,17 @@ export default {
|
|||||||
<label>ชื่อผู้เช่า</label>
|
<label>ชื่อผู้เช่า</label>
|
||||||
<v-select :options="options" v-model="selectedColor"></v-select>
|
<v-select :options="options" v-model="selectedColor"></v-select>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -293,17 +293,7 @@ export default {
|
|||||||
placeholder="จำนวนงวดเงินค่าประกัน"
|
placeholder="จำนวนงวดเงินค่าประกัน"
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
@ -489,57 +479,7 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
<style>
|
||||||
|
@ -93,6 +93,8 @@ export default {
|
|||||||
selectedRanks: "ส.ต.ต.",
|
selectedRanks: "ส.ต.ต.",
|
||||||
selectedAffiliation: "ฝอ.2",
|
selectedAffiliation: "ฝอ.2",
|
||||||
birthday: "14/07/2534",
|
birthday: "14/07/2534",
|
||||||
|
typeAffiliation: "ทั่วไป",
|
||||||
|
typeRanks: "ประทวน",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -103,6 +105,20 @@ export default {
|
|||||||
// this.updateColor(newValue)
|
// this.updateColor(newValue)
|
||||||
console.log(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: {
|
methods: {
|
||||||
changedLabel(event) {
|
changedLabel(event) {
|
||||||
@ -176,7 +192,6 @@ export default {
|
|||||||
/>
|
/>
|
||||||
<label class="form-check-label" for="inlineRadio2">บช.ตชด.</label>
|
<label class="form-check-label" for="inlineRadio2">บช.ตชด.</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex align-items-baseline">
|
<div class="d-flex align-items-baseline">
|
||||||
<label style="margin-right: 10px">ค้นหาชื่อ </label>
|
<label style="margin-right: 10px">ค้นหาชื่อ </label>
|
||||||
@ -286,18 +301,50 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div>
|
<div>
|
||||||
<div class="mb-3">
|
<div class="mb-1">
|
||||||
<label>สังกัด</label>
|
<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
|
<v-select
|
||||||
:options="masterData?.Affiliation"
|
:options="masterData?.Affiliation"
|
||||||
v-model="selectedAffiliation"
|
v-model="selectedAffiliation"
|
||||||
></v-select>
|
></v-select>
|
||||||
</div>
|
</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>
|
<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>
|
<v-select :options="masterData?.ranks" v-model="selectedRanks"></v-select>
|
||||||
</div>
|
</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
|
<MaterialInput
|
||||||
name="firstName"
|
name="firstName"
|
||||||
:value="firstName"
|
:value="firstName"
|
||||||
@ -383,17 +430,49 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div>
|
<div>
|
||||||
<div class="mb-3">
|
<div class="mb-1">
|
||||||
<label>สังกัด</label>
|
<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
|
<v-select
|
||||||
:options="masterData?.Affiliation"
|
:options="masterData?.Affiliation"
|
||||||
v-model="selectedAffiliation"
|
v-model="selectedAffiliation"
|
||||||
></v-select>
|
></v-select>
|
||||||
</div>
|
</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>
|
<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>
|
<v-select :options="masterData?.ranks" v-model="selectedRanks"></v-select>
|
||||||
</div>
|
</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">
|
<div class="mb-3">
|
||||||
<MaterialInput
|
<MaterialInput
|
||||||
name="firstName"
|
name="firstName"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user