feat: booking审批表单更改2

This commit is contained in:
caoqianming 2025-10-17 13:57:40 +08:00
parent 316776845e
commit 2996a6b2e6
2 changed files with 18 additions and 14 deletions

View File

@ -46,7 +46,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <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-for="(item,$index) in timesList" :key="item.value">
<div v-if="item.isSelect" class="timeBlock selectedTimeBlock" @click="selectTime($index)">{{ item.label }}</div> <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> <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> <el-button @click="$emit('closed')" style="margin-right: 4px">取消</el-button>
<ticketd_b <ticketd_b
:workflow_key="'booking'" :workflow_key="'booking'"
:title="bookingTitle" :title="form.title+'-会议室预定'"
:t_id="form.id" :t_id="form.id"
:ticket_="form.ticket_" :ticket_="form.ticket_"
@success="()=>{$emit('success')}" @success="()=>{$emit('success')}"
@ -81,7 +81,7 @@
import ticketd_b from "@/views/wf/ticketd_b.vue"; import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from '@/views/wf/ticketd.vue' import ticketd from '@/views/wf/ticketd.vue'
export default { export default {
emits: ["success", "closed"], emits: ["success", "closed", "changeMode"],
name: "index", name: "index",
components: { components: {
ticketd_b, ticketd ticketd_b, ticketd
@ -101,7 +101,7 @@ export default {
}, },
t_id: { t_id: {
type: String, type: String,
default: null default: ""
}, },
}, },
@ -183,16 +183,18 @@ export default {
mounted() { mounted() {
let that = this; let that = this;
that.getmRoomList(); that.getmRoomList();
if (that.t_id){
that.getTid(); that.getTid();
}
else {
if(that.mode=='add'){ if(that.mode=='add'){
that.form.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept; that.form.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
} }
else if (that.mode=='edit'||that.mode=='show'){ else if (that.mode=='edit'||that.mode=='show'){
that.form = that.bookingIitem; that.form = that.bookingIitem;
that.mroomName = that.bookingIitem.mroom_name;
that.bookingTitle = that.mroomName+"预定";
that.handleEidt(that.editId);
} }
}
}, },
methods: { methods: {
getmRoomList(){ getmRoomList(){
@ -207,9 +209,10 @@ export default {
that.$API.ofm.mroombooking.item.req(that.t_id).then(res=>{ that.$API.ofm.mroombooking.item.req(that.t_id).then(res=>{
that.form = res; that.form = res;
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) { 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{ }else{
that.mode = "show"; that.$emit("changeMode", "show");
} }
}) })
} }

View File

@ -78,6 +78,7 @@
:mode="mode" :mode="mode"
:editId="editId" :editId="editId"
:bookingIitem="bookingIitem" :bookingIitem="bookingIitem"
@changeMode="(mode)=>{this.mode=mode;console.log('mode',mode)}"
@success="handleSuccess" @success="handleSuccess"
@closed="handleCancel" @closed="handleCancel"
></bookingDialog> ></bookingDialog>