feat: booking审批表单更改2
This commit is contained in:
parent
316776845e
commit
2996a6b2e6
|
@ -46,7 +46,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="会议时间段" prop="slots" required v-if="mode !== 'show'">
|
||||
<el-form-item label="会议时间段" prop="slots" required v-if="mode != 'show'">
|
||||
<div v-for="(item,$index) in timesList" :key="item.value">
|
||||
<div v-if="item.isSelect" class="timeBlock selectedTimeBlock" @click="selectTime($index)">{{ item.label }}</div>
|
||||
<div v-else class="timeBlock" @click="selectTime($index)">{{ item.label }}</div>
|
||||
|
@ -62,7 +62,7 @@
|
|||
<el-button @click="$emit('closed')" style="margin-right: 4px">取消</el-button>
|
||||
<ticketd_b
|
||||
:workflow_key="'booking'"
|
||||
:title="bookingTitle"
|
||||
:title="form.title+'-会议室预定'"
|
||||
:t_id="form.id"
|
||||
:ticket_="form.ticket_"
|
||||
@success="()=>{$emit('success')}"
|
||||
|
@ -81,7 +81,7 @@
|
|||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
emits: ["success", "closed", "changeMode"],
|
||||
name: "index",
|
||||
components: {
|
||||
ticketd_b, ticketd
|
||||
|
@ -101,7 +101,7 @@ export default {
|
|||
},
|
||||
t_id: {
|
||||
type: String,
|
||||
default: null
|
||||
default: ""
|
||||
},
|
||||
|
||||
},
|
||||
|
@ -183,16 +183,18 @@ export default {
|
|||
mounted() {
|
||||
let that = this;
|
||||
that.getmRoomList();
|
||||
that.getTid();
|
||||
if(that.mode=='add'){
|
||||
that.form.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
|
||||
if (that.t_id){
|
||||
that.getTid();
|
||||
}
|
||||
else if (that.mode=='edit'||that.mode=='show'){
|
||||
that.form = that.bookingIitem;
|
||||
that.mroomName = that.bookingIitem.mroom_name;
|
||||
that.bookingTitle = that.mroomName+"预定";
|
||||
that.handleEidt(that.editId);
|
||||
else {
|
||||
if(that.mode=='add'){
|
||||
that.form.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
|
||||
}
|
||||
else if (that.mode=='edit'||that.mode=='show'){
|
||||
that.form = that.bookingIitem;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
getmRoomList(){
|
||||
|
@ -207,9 +209,10 @@ export default {
|
|||
that.$API.ofm.mroombooking.item.req(that.t_id).then(res=>{
|
||||
that.form = res;
|
||||
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||
that.mode = "edit";
|
||||
that.handleEidt(that.t_id);
|
||||
that.$emit("changeMode", "edit");
|
||||
}else{
|
||||
that.mode = "show";
|
||||
that.$emit("changeMode", "show");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
:mode="mode"
|
||||
:editId="editId"
|
||||
:bookingIitem="bookingIitem"
|
||||
@changeMode="(mode)=>{this.mode=mode;console.log('mode',mode)}"
|
||||
@success="handleSuccess"
|
||||
@closed="handleCancel"
|
||||
></bookingDialog>
|
||||
|
|
Loading…
Reference in New Issue