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.

170 lines
4.8 KiB

<template>
<div>
<xy-dialog ref="dialog" :width="40" :is-show.sync="isShow" :type="'form'" :title="type=='show'?'预约查看':'预约审核'"
:form="form">
<template v-slot:name>
<div class="xy-table-item" style="padding:0">
<div class="xy-table-item-label" style="font-weight: bold;width:0;padding:0;display:none">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>
</div>
<div class="xy-table-item-content" style="flex-grow:1;text-align:center">
<div class="bookInfo">
<div>
<span>预约日期</span>
1 year ago
<span>{{submitObj.date}}</span>
</div>
<div>
<span>时间段</span>
1 year ago
<span></span>
</div>
1 year ago
<div>
<span>预约事项</span>
<span>{{submitObj.content}}</span>
</div>
<div>
<span>预约场地</span>
1 year ago
<span>{{submitObj.appointment_config?submitObj.appointment_config.name:''}}</span>
1 year ago
</div>
<div>
<span>车牌</span>
<span>{{submitObj.plate}}</span>
</div>
<div>
<span>同行人数</span>
<span>{{submitObj.accompany_total}}</span>
</div>
1 year ago
<div>
<span>同行人</span>
<span v-if="submitObj.appointment_accompany&&submitObj.appointment_accompany.length>0">
<template v-for="item in submitObj.appointment_accompany">
{{item.name}},
</template>
</span>
</div>
1 year ago
<div>
<span>预约人</span>
1 year ago
<span>{{submitObj.user?submitObj.user.username:''}}</span>
1 year ago
</div>
<div>
<span>状态</span>
1 year ago
<span>
<template v-for="item in book_status">
<el-tag :type="item.type" v-if="submitObj.status===item.id">{{item.value}}</el-tag>
</template>
</span>
1 year ago
</div>
</div>
<div v-if="type=='check'">
<lx-header icon="" text="审核意见" style="margin-bottom: 10px; border: 0px;text-align: left;">
</lx-header>
<div>
<el-input v-model="submitObj.reason" type="textarea" row="3"></el-input>
</div>
<div style="margin-top:15px">
<el-button type="primary" style='margin:15px;' @click="submit(1)"></el-button>
<el-button type="primary" style='margin:15px;' @click="submit(2)"></el-button>
<el-button type="primary" plain style='margin:15px;' @click="submit(3)"></el-button>
</div>
</div>
</div>
</div>
</template>
<template v-slot:footerContent>
1 year ago
<div></div>
</template>
</xy-dialog>
</div>
</template>
<script>
1 year ago
import myMixins from "@/mixin/selectMixin.js";
import {
show,
save
} from "@/api/book/index.js"
export default {
1 year ago
mixins: [myMixins],
components: {
},
data() {
return {
isShow: false,
type: 'show',
id: '',
1 year ago
submitObj: {},
form: {
name: '',
},
}
},
created() {},
methods: {
1 year ago
submit(status) {
this.submitObj.status = status
save(this.submitObj).then(res => {
this.$message({
type: 'success',
1 year ago
message: '审核成功'
})
this.isShow = false
this.$emit('refresh')
})
},
getDetail() {
show({
id: this.id,
1 year ago
show_relation: ['user', 'appointmentAccompany', 'appointmentConfig']
}).then(res => {
1 year ago
this.submitObj = this.base.deepCopy(res, this.submitObj)
console.log("this.submitObj", this.submitObj)
})
}
},
watch: {
isShow(newVal) {
if (newVal) {
1 year ago
this.getDetail()
} else {
this.id = ''
1 year ago
this.submitObj = {}
this.$refs['dialog'].reset()
}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .name {
flex-basis: 100%;
1 year ago
}
.bookInfo {
&>div {
span {
display: inline-block;
}
span:first-child {
width: 20%;
text-align: right;
}
span:last-child {
width: 80%;
text-align: left;
}
}
}
</style>