feat: booking 优化
This commit is contained in:
parent
3ae9e207f3
commit
fbad9178ff
|
|
@ -78,7 +78,7 @@
|
|||
></ticketd_b>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
<el-aside width="20%" v-if="form.ticket">
|
||||
<el-aside width="20%" v-if="form.ticket_">
|
||||
<ticketd :ticket_="form.ticket_" @success="$emit('success')"></ticketd>
|
||||
</el-aside>
|
||||
</el-container>
|
||||
|
|
@ -98,10 +98,6 @@ export default {
|
|||
type: String,
|
||||
default: "show",
|
||||
},
|
||||
editId: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
bookingIitem: {
|
||||
type: Object,
|
||||
default: null,
|
||||
|
|
@ -190,8 +186,7 @@ export default {
|
|||
mounted() {
|
||||
let that = this;
|
||||
that.getmRoomList();
|
||||
console.log("that.editId",that.editId);
|
||||
if (that.editId){
|
||||
if (that.t_id){
|
||||
that.getTid();
|
||||
}
|
||||
else {
|
||||
|
|
@ -213,17 +208,15 @@ export default {
|
|||
},
|
||||
getTid (){
|
||||
var that = this;
|
||||
if (that.editId) {
|
||||
that.handleEidt(that.editId);
|
||||
that.$API.ofm.mroombooking.item.req(that.editId).then(res=>{
|
||||
that.form = res;
|
||||
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||
that.$emit("changeMode", "edit");
|
||||
}else{
|
||||
that.$emit("changeMode", "show");
|
||||
}
|
||||
})
|
||||
}
|
||||
that.$API.ofm.mroombooking.item.req(that.t_id).then(res=>{
|
||||
that.form = res;
|
||||
that.handleEidt(that.t_id);
|
||||
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||
that.$emit("changeMode", "edit");
|
||||
}else{
|
||||
that.$emit("changeMode", "show");
|
||||
}
|
||||
})
|
||||
},
|
||||
getmRoomSlot(){
|
||||
let that = this;
|
||||
|
|
|
|||
|
|
@ -56,13 +56,6 @@
|
|||
type="primary"
|
||||
@click="handleShow(scope.row)"
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="scope.row.ticket_.state_.type==1"
|
||||
@click="handleEidt(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row)">
|
||||
<template #reference>
|
||||
<el-button link size="small" type="danger">删除</el-button>
|
||||
|
|
@ -77,7 +70,7 @@
|
|||
<bookingDialog
|
||||
v-model="limitedVisible"
|
||||
:mode="mode"
|
||||
:editId="editId"
|
||||
:t_id="t_id"
|
||||
:bookingIitem="bookingIitem"
|
||||
@changeMode="(mode)=>{this.mode=mode;}"
|
||||
@success="handleSuccess"
|
||||
|
|
@ -97,7 +90,7 @@ export default {
|
|||
actStateEnum, interveneTypeEnum,
|
||||
apiObj: this.$API.ofm.mroombooking.list,
|
||||
query: {},
|
||||
editId: null,
|
||||
t_id: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
mode: "add",
|
||||
|
|
@ -131,17 +124,10 @@ export default {
|
|||
this.$refs.table.refresh();
|
||||
this.limitedVisible = false;
|
||||
},
|
||||
handleEidt(row) {
|
||||
let that = this;
|
||||
that.mode = "edit";
|
||||
that.editId = row.id;
|
||||
that.bookingIitem = row;
|
||||
that.limitedVisible = true;
|
||||
},
|
||||
handleShow(row){
|
||||
let that = this;
|
||||
let that = this;
|
||||
that.mode = "show";
|
||||
that.editId = row.id;
|
||||
that.t_id = row.id;
|
||||
that.bookingIitem = row;
|
||||
that.limitedVisible = true;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue