Commit 51ab882a authored by Kittisak Maneewong's avatar Kittisak Maneewong

update page add job

parent 74c09d6a
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<v-content class="my-0"> <v-content class="my-0">
<v-container fluid white> <v-container fluid white>
<v-layout > <v-layout >
<v-flex xs10 offset-xs1> <v-flex sm10 xs12 offset-sm1>
<v-card flat height="600px"> <v-card flat height="600px">
<router-view></router-view> <router-view></router-view>
</v-card> </v-card>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<v-flex xs12 sm12 class="pa-3"> <v-flex xs12 sm12 class="pa-3">
<h2 class="font-weight-bold red--text">ข้อมูลบริษัท</h2> <h2 class="font-weight-bold red--text">ข้อมูลบริษัท</h2>
</v-flex> </v-flex>
<form enctype="multipart/form-data" > <v-form enctype="multipart/form-data" @submit.prevent="createJob()" ref="create">
<v-flex sm12 xs12> <v-flex sm12 xs12>
<v-layout row wrap class="borderbottom pa-3"> <v-layout row wrap class="borderbottom pa-3">
<v-flex sm4 xs12 class="px-3"> <v-flex sm4 xs12 class="px-3">
...@@ -23,18 +23,21 @@ ...@@ -23,18 +23,21 @@
<v-text-field <v-text-field
outline outline
label="ชื่อบริษัท" label="ชื่อบริษัท"
:rules="[rules.required]"
class="my-ip" class="my-ip"
></v-text-field> ></v-text-field>
<label class="font-weight-bold">ชื่อผู้ติดต่อ <span class="red--text">&nbsp;*</span></label> <label class="font-weight-bold">ชื่อผู้ติดต่อ <span class="red--text">&nbsp;*</span></label>
<v-text-field <v-text-field
outline outline
label="ชื่อผู้ติดต่อ" label="ชื่อผู้ติดต่อ"
:rules="[rules.required]"
class="my-ip" class="my-ip"
></v-text-field> ></v-text-field>
<label class="font-weight-bold">เบอร์ผู้ติดต่อ <span class="red--text">&nbsp;*</span></label> <label class="font-weight-bold">เบอร์ผู้ติดต่อ <span class="red--text">&nbsp;*</span></label>
<v-text-field <v-text-field
outline outline
label="เบอร์ผู้ติดต่อ" label="เบอร์ผู้ติดต่อ"
:rules="[rules.required]"
class="my-ip" class="my-ip"
></v-text-field> ></v-text-field>
</v-flex> </v-flex>
...@@ -43,6 +46,7 @@ ...@@ -43,6 +46,7 @@
<v-text-field <v-text-field
outline outline
label="อีเมล" label="อีเมล"
:rules="[rules.required, rules.email]"
class="my-ip" class="my-ip"
></v-text-field> ></v-text-field>
<label class="font-weight-bold">Fax <span class="red--text"></span></label> <label class="font-weight-bold">Fax <span class="red--text"></span></label>
...@@ -67,6 +71,7 @@ ...@@ -67,6 +71,7 @@
<v-textarea <v-textarea
outline outline
label="ที่อยู่" label="ที่อยู่"
:rules="[rules.required]"
rows rows
class="my-1" class="my-1"
></v-textarea> ></v-textarea>
...@@ -74,14 +79,16 @@ ...@@ -74,14 +79,16 @@
<VSelect <VSelect
:items="items" :items="items"
label="เลือกจังหวัด" label="เลือกจังหวัด"
:rules="[rules.required]"
></VSelect> ></VSelect>
<label class="font-weight-bold">เขต/อำเภอ <span class="red--text">&nbsp;*</span></label> <label class="font-weight-bold">เขต/อำเภอ <span class="red--text">&nbsp;*</span></label>
<VSelect <VSelect
:items="items" :items="items"
label="เลือกเขต/อำเภอ" label="เลือกเขต/อำเภอ"
:rules="[rules.required]"
></VSelect> ></VSelect>
<label class="font-weight-bold">เกี่ยวกับบริษัท <span class="red--text">&nbsp;*</span></label> <label class="font-weight-bold">เกี่ยวกับบริษัท</label>
<v-textarea <v-textarea
outline outline
label="เกี่ยวกับบริษัท" label="เกี่ยวกับบริษัท"
...@@ -93,11 +100,13 @@ ...@@ -93,11 +100,13 @@
<label class="font-weight-bold">แขวง/ตำบล<span class="red--text">&nbsp;*</span></label> <label class="font-weight-bold">แขวง/ตำบล<span class="red--text">&nbsp;*</span></label>
<VSelect <VSelect
:items="items" :items="items"
:rules="[rules.required]"
label="เลือกแขวง/ตำบล" label="เลือกแขวง/ตำบล"
></VSelect> ></VSelect>
<label class="font-weight-bold">รหัสไปรษณีย์<span class="red--text">&nbsp;*</span></label> <label class="font-weight-bold">รหัสไปรษณีย์<span class="red--text">&nbsp;*</span></label>
<v-text-field <v-text-field
label="รหัสไปรษณีย์" label="รหัสไปรษณีย์"
:rules="[rules.required]"
class="my-ip" class="my-ip"
></v-text-field> ></v-text-field>
<label class="font-weight-bold">แผนที่บริษัท</label> <label class="font-weight-bold">แผนที่บริษัท</label>
...@@ -115,7 +124,7 @@ ...@@ -115,7 +124,7 @@
></v-text-field> ></v-text-field>
</v-flex> </v-flex>
<v-flex sm12 xs12> <v-flex sm12 xs12>
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3851.7461712415493!2d104.9009800139957!3d15.117311868259526!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x311684db0c98987f%3A0x228caf3246f0fd8e!2z4Lih4Lir4Liy4Lin4Li04LiX4Lii4Liy4Lil4Lix4Lii4Lit4Li44Lia4Lil4Lij4Liy4LiK4LiY4Liy4LiZ4Li1!5e0!3m2!1sth!2sth!4v1555418432669!5m2!1sth!2sth" width="400" height="200" frameborder="0" style="border:0" allowfullscreen></iframe> <!-- <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3851.7461712415493!2d104.9009800139957!3d15.117311868259526!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x311684db0c98987f%3A0x228caf3246f0fd8e!2z4Lih4Lir4Liy4Lin4Li04LiX4Lii4Liy4Lil4Lix4Lii4Lit4Li44Lia4Lil4Lij4Liy4LiK4LiY4Liy4LiZ4Li1!5e0!3m2!1sth!2sth!4v1555418432669!5m2!1sth!2sth" width="400" height="200" frameborder="0" style="border:0" allowfullscreen></iframe> -->
</v-flex> </v-flex>
</v-layout> </v-layout>
...@@ -176,19 +185,22 @@ ...@@ -176,19 +185,22 @@
<v-text-field <v-text-field
outline outline
label="หัวข้องาน" label="หัวข้องาน"
:rules="[rules.required]"
class="my-job" class="my-job"
></v-text-field> ></v-text-field>
<label class="font-weight-bold my-2">ประเภทธุรกิจ</label> <label class="font-weight-bold my-2">ประเภทธุรกิจ <span class="red--text">&nbsp;*</span></label>
<VSelect <VSelect
outline outline
:items="items" :items="items"
:rules="[rules.required]"
label="เลือก" label="เลือก"
class="my-job" class="my-job"
></VSelect> ></VSelect>
<label class="font-weight-bold my-2">ตำแหน่งงาน</label> <label class="font-weight-bold my-2">ตำแหน่งงาน <span class="red--text">&nbsp;*</span></label>
<VSelect <VSelect
outline outline
:items="items" :items="items"
:rules="[rules.required]"
label="เลือก" label="เลือก"
class="my-job" class="my-job"
></VSelect> ></VSelect>
...@@ -198,63 +210,123 @@ ...@@ -198,63 +210,123 @@
label="ค่าตอบแทน/เงินเดือน" label="ค่าตอบแทน/เงินเดือน"
class="my-job" class="my-job"
></v-text-field> ></v-text-field>
<label class="font-weight-bold my-2">จำนวน(อัตรา)</label> <label class="font-weight-bold my-2">จำนวน(อัตรา) <span class="red--text">&nbsp;*</span></label>
<v-text-field <v-text-field
outline outline
label="จำนวน(อัตรา)" label="จำนวน(อัตรา)"
class="my-job" class="my-job"
:rules="[rules.required]"
min="0"
type="number" type="number"
></v-text-field> ></v-text-field>
<label class="font-weight-bold my-2">วันทำงาน</label> <label class="font-weight-bold my-2">วันทำงาน <span class="red--text">&nbsp;*</span></label>
<v-layout align-center justify-center row fill-height wrap> <v-layout align-center justify-center row fill-height wrap>
<v-flex sm6 xs12 class="px-2"> <v-flex sm6 xs12 class="px-2">
<v-text-field <v-text-field
outline outline
label="จาก" label="จาก"
:rules="[rules.required]"
class="my-job" class="my-job"
></v-text-field> ></v-text-field>
</v-flex> </v-flex>
<v-flex xs12 sm6 class="px-2"> <v-flex xs12 sm6 class="px-2">
<v-text-field <v-text-field
outline outline
:rules="[rules.required]"
label="ถึง" label="ถึง"
class="my-job" class="my-job"
></v-text-field> ></v-text-field>
</v-flex> </v-flex>
</v-layout> </v-layout>
<label class="font-weight-bold my-2">เวลาทำงาน</label> <label class="font-weight-bold my-2">เวลาทำงาน <span class="red--text">&nbsp;*</span></label>
<v-layout align-center justify-center row fill-height wrap> <v-layout align-center justify-center row fill-height wrap>
<v-flex sm6 xs12 class="px-2"> <v-flex sm6 xs12 class="px-2">
<v-text-field <!-- <v-text-field
outline outline
label="จาก" label="จาก"
type="time"
:rules="[rules.required]"
class="my-job" class="my-job"
></v-text-field> -->
<v-menu
ref="time1"
v-model="showTimeFrom"
:close-on-content-click="false"
:nudge-right="40"
lazy
transition="scale-transition"
offset-y
full-width
max-width="290px"
min-width="290px"
>
<template v-slot:activator="{ on }">
<v-text-field
outline
v-model="timeFrom"
label="จาก"
:rules="[rules.required]"
readonly
v-on="on"
></v-text-field> ></v-text-field>
</template>
<v-time-picker
v-if="showTimeFrom"
v-model="timeFrom"
full-width
@click:minute="$refs.time1.save(time)"
></v-time-picker>
</v-menu>
</v-flex> </v-flex>
<v-flex xs12 sm6 class="px-2"> <v-flex xs12 sm6 class="px-2">
<v-menu
ref="time2"
v-model="showTimeTo"
:close-on-content-click="false"
:nudge-right="40"
lazy
transition="scale-transition"
offset-y
full-width
max-width="290px"
min-width="290px"
>
<template v-slot:activator="{ on }">
<v-text-field <v-text-field
outline outline
v-model="timeTo"
label="ถึง" label="ถึง"
class="my-job" :rules="[rules.required]"
readonly
v-on="on"
></v-text-field> ></v-text-field>
</template>
<v-time-picker
v-if="showTimeTo"
v-model="timeTo"
full-width
@click:minute="$refs.time2.save(time)"
></v-time-picker>
</v-menu>
</v-flex> </v-flex>
</v-layout> </v-layout>
</v-flex> </v-flex>
</v-flex> </v-flex>
<v-flex sm6 xs12 class="pa-3"> <v-flex sm6 xs12 class="pa-3">
<h2 class="font-weight-bold mt-2"><span class="red--text">&nbsp;หน้าที่รับผิดชอบ</span></h2> <h2 class="font-weight-bold mt-2"><span class="red--text">&nbsp;หน้าที่รับผิดชอบ</span> <span class="red--text">&nbsp;*</span></h2>
<v-flex sm12 xs12 class="pa-3"> <v-flex sm12 xs12 class="pa-3">
<v-textarea <v-textarea
outline outline
:rules="[rules.required]"
label="หน้าที่รับผิดชอบ" label="หน้าที่รับผิดชอบ"
></v-textarea> ></v-textarea>
</v-flex> </v-flex>
<h2 class="font-weight-bold"><span class="red--text">&nbsp;คุณสมบัติ</span></h2> <h2 class="font-weight-bold"><span class="red--text">&nbsp;คุณสมบัติ</span> <span class="red--text">&nbsp;*</span></h2>
<v-flex sm12 xs12 class="pa-3"> <v-flex sm12 xs12 class="pa-3">
<v-textarea <v-textarea
outline outline
:rules="[rules.required]"
label="คุณสมบัติ" label="คุณสมบัติ"
></v-textarea> ></v-textarea>
</v-flex> </v-flex>
...@@ -266,12 +338,12 @@ ...@@ -266,12 +338,12 @@
></v-textarea> ></v-textarea>
</v-flex> </v-flex>
</v-flex> </v-flex>
<v-btn color="success">บันทึกข้อมูล</v-btn> <v-layout justify-center>
<v-btn color="success" type="submit">บันทึกข้อมูล</v-btn>
</v-layout>
</v-layout> </v-layout>
</v-flex> </v-flex>
</v-form>
</form>
</v-layout> </v-layout>
</div> </div>
</template> </template>
...@@ -281,7 +353,15 @@ export default { ...@@ -281,7 +353,15 @@ export default {
data () { data () {
return { return {
status: 'ยังไม่ได้เลือกไฟล์', status: 'ยังไม่ได้เลือกไฟล์',
srcImage: 'https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png' srcImage: 'https://asianinteriorservices.com/wp-content/uploads/2018/04/noImg.png',
rules: {
required: v => !!v || 'จำเป็นต้องกรอก',
email: v => /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(v) || 'รูปแบบอีเมลล์ไม่ถูกต้อง'
},
timeFrom: null,
timeTo: null,
showTimeFrom: false,
showTimeTo: false
} }
}, },
methods: { methods: {
...@@ -308,6 +388,13 @@ export default { ...@@ -308,6 +388,13 @@ export default {
console.log(imgBlob) console.log(imgBlob)
} }
reader.readAsArrayBuffer(file) reader.readAsArrayBuffer(file)
},
createJob () {
if (this.$refs.create.validate()) {
console.log('create job')
} else {
this.$Loading.error()
}
} }
} }
} }
...@@ -315,12 +402,12 @@ export default { ...@@ -315,12 +402,12 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.my-job{ // .my-job{
height: 70px; // height: 70px;
} // }
.my-ip{ // .my-ip{
height: 65px; // height: 65px;
} // }
.detail { .detail {
color: #276f86; color: #276f86;
background-color: #f8ffff; background-color: #f8ffff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment