feat: 相关审批表单更改
This commit is contained in:
parent
462cd5cede
commit
ce728f0d07
|
@ -177,8 +177,8 @@
|
|||
</el-main>
|
||||
<el-footer v-if="active === 1" style="text-align: center">
|
||||
<el-button @click="handleLastStep" style="margin-right: 4px">上一步</el-button>
|
||||
<ticketd_b_start :workflow_key="'routepack'" :title="form.name" :t_id="form.id" :ticket_="form.ticket_"
|
||||
@success="$emit('closed')"></ticketd_b_start>
|
||||
<ticketd_b :workflow_key="'routepack'" :title="form.name" :t_id="form.id" :ticket_="form.ticket_"
|
||||
@success="$emit('closed')"></ticketd_b>
|
||||
<el-button @click="$emit('closed')" type="warning">退出</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
|
@ -194,10 +194,10 @@
|
|||
</template>
|
||||
<script>
|
||||
import saveDialog from "./route_form.vue";
|
||||
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
export default {
|
||||
name: "routepack_form",
|
||||
components: { saveDialog, ticketd_b_start },
|
||||
components: { saveDialog, ticketd_b },
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
|
|
|
@ -31,14 +31,14 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-show="mode!=='show'">
|
||||
<ticketd_b_start
|
||||
<ticketd_b
|
||||
:workflow_key="'borrowrecord'"
|
||||
:title="ticketTitle"
|
||||
:t_id="addForm.id"
|
||||
:ticket_="addForm.ticket_"
|
||||
:submit_b_func="submit_b_func"
|
||||
:ticket_data="ticket_data"
|
||||
ref="ticketd_b_start"
|
||||
ref="ticketd_b"
|
||||
@success="$emit('success')"
|
||||
@colsed="$emit('closed')"
|
||||
/>
|
||||
|
@ -51,7 +51,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
props: {
|
||||
|
@ -59,7 +59,7 @@ export default {
|
|||
modelValue: { type: Object, default: () => ({}) },
|
||||
transitions: { type: Array, default: () => [] },
|
||||
},
|
||||
components: {ticketd, ticketd_b_start},
|
||||
components: {ticketd, ticketd_b},
|
||||
emits: ["update:modelValue", "submit", "cancel"],
|
||||
data(){
|
||||
return {
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议名称" prop="title">
|
||||
<el-input v-model="form.title" clearable placeholder="请输入会议名称"></el-input>
|
||||
<el-input v-model="form.title" clearable placeholder="请输入会议名称" :readonly="mode === 'show'"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议室" prop="mroom">
|
||||
<el-select v-model="form.mroom" placeholder="请选择会议室" @change="mRoomChange" style="width: 100%;">
|
||||
<el-select v-model="form.mroom" placeholder="请选择会议室" @change="mRoomChange" style="width: 100%;" :readonly="mode === 'show'">
|
||||
<el-option
|
||||
v-for="item in mRoomList"
|
||||
:key="item.id"
|
||||
|
@ -27,43 +27,48 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="参会领导" prop="key_participants">
|
||||
<el-input v-model="form.key_participants" clearable placeholder="请输入参会领导"></el-input>
|
||||
<el-input v-model="form.key_participants" clearable placeholder="请输入参会领导" :readonly="mode === 'show'"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议人数" prop="participant_count">
|
||||
<el-input-number v-model="form.participant_count" clearable style="width: 100%;" :precision="0" :step="1" min="1"></el-input-number>
|
||||
<el-input-number v-model="form.participant_count" clearable style="width: 100%;" :precision="0" :step="1" :min="1" :readonly="mode === 'show'"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议时间" prop="mdate">
|
||||
<el-date-picker v-model="form.mdate" type="date" value-format="YYYY-MM-DD" style="width: 100%;" placeholder="请选择会议时间"></el-date-picker>
|
||||
<el-form-item label="会议日期" prop="mdate">
|
||||
<el-date-picker v-model="form.mdate" type="date" value-format="YYYY-MM-DD" style="width: 100%;" placeholder="请选择会议日期" :readonly="mode === 'show'"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.title" clearable placeholder="备注"></el-input>
|
||||
<el-input v-model="form.note" clearable placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<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>
|
||||
</div>
|
||||
<el-col :span="24">
|
||||
<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>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="会议时间段" prop="slots" required v-else>
|
||||
<span v-for="item in form.time_ranges" :key="item">{{ item }};</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-footer v-show="type!=='show'">
|
||||
<ticketd_b_start
|
||||
<el-footer>
|
||||
<el-button @click="$emit('closed')" style="margin-right: 4px">取消</el-button>
|
||||
<ticketd_b
|
||||
:workflow_key="'booking'"
|
||||
:title="bookingTitle"
|
||||
:t_id="form.id"
|
||||
:ticket_="form.ticket_"
|
||||
@success="()=>{$emit('success')}"
|
||||
:submit_b_func="submit_b_func"
|
||||
ref="ticketd_b_start"
|
||||
></ticketd_b_start>
|
||||
<el-button @click="$emit('closed')">取消</el-button>
|
||||
ref="ticketd_b"
|
||||
></ticketd_b>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
<el-aside width="20%" v-if="form.ticket">
|
||||
|
@ -73,47 +78,37 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
name: "index",
|
||||
components: {
|
||||
ticketd_b_start, ticketd
|
||||
ticketd_b, ticketd
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
mode: {
|
||||
type: String,
|
||||
default: "add",
|
||||
default: "show",
|
||||
},
|
||||
editId: {
|
||||
type: String,
|
||||
default: "add",
|
||||
default: null,
|
||||
},
|
||||
bookingIitem: {
|
||||
type: String,
|
||||
default: "add",
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
t_id: {
|
||||
type: String,
|
||||
default: null
|
||||
default: null
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.ofm.mroombooking.list,
|
||||
bookingTitle: "会议预定",
|
||||
query: {},
|
||||
mroomName:'',
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
titleMap: {
|
||||
add: "新增会议预定",
|
||||
edit: "编辑会议预定",
|
||||
show: "查看会议预定",
|
||||
},
|
||||
//表单数据
|
||||
form: {
|
||||
note: "",
|
||||
mroom: "",
|
||||
|
@ -121,7 +116,7 @@ export default {
|
|||
title: "",
|
||||
slots: [],
|
||||
ticket_: null,
|
||||
belong_dept: "",
|
||||
belong_dept: null,
|
||||
participant_count: 0,
|
||||
key_participants: "",
|
||||
},
|
||||
|
@ -189,10 +184,10 @@ export default {
|
|||
let that = this;
|
||||
that.getmRoomList();
|
||||
that.getTid();
|
||||
if(that.type=='add'){
|
||||
that.form.belong_dept = that.$TOOL.data.get("USER_INFO").dept_id;
|
||||
if(that.mode=='add'){
|
||||
that.form.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
|
||||
}
|
||||
if(that.type=='edit'||that.type=='show'){
|
||||
else if (that.mode=='edit'||that.mode=='show'){
|
||||
that.form = that.bookingIitem;
|
||||
that.mroomName = that.bookingIitem.mroom_name;
|
||||
that.bookingTitle = that.mroomName+"预定";
|
||||
|
@ -212,9 +207,9 @@ 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.type = "edit";
|
||||
that.mode = "edit";
|
||||
}else{
|
||||
that.type = "show";
|
||||
that.mode = "show";
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -238,40 +233,16 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
submitHandle() {
|
||||
let that = this;
|
||||
this.$refs.addForm.validate((valid) => {
|
||||
if (valid) {
|
||||
that.isSaving = true;
|
||||
that.submit();
|
||||
}
|
||||
});
|
||||
},
|
||||
async submit_b_func() {
|
||||
let that = this;
|
||||
if(that.type == "add") {
|
||||
if(that.mode == "add") {
|
||||
that.form.belong_dept = that.$TOOL.data.get("USER_INFO").belong_dept;
|
||||
let res = await that.$API.ofm.mroombooking.create.req(that.form);
|
||||
that.form.id = res.id;
|
||||
} else if (that.type == "edit") {
|
||||
} else if (that.mode == "edit") {
|
||||
await that.$API.ofm.mroombooking.update.req(that.form.id, that.form);
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
let that = this,res = null;
|
||||
console.log('that.form',that.form);
|
||||
try {
|
||||
if (that.type === "add") {
|
||||
res = await that.$API.ofm.mroombooking.create.req(that.form);
|
||||
} else {
|
||||
res = await that.$API.ofm.mroombooking.update.req(that.form.id,that.form);
|
||||
}
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$refs.table.refresh();
|
||||
} catch (e) {
|
||||
that.isSaving = false;
|
||||
}
|
||||
},
|
||||
handleEidt(id) {
|
||||
let that = this;
|
||||
that.$API.ofm.mroomslot.list.req({booking:id,page:0}).then(res=>{
|
||||
|
@ -280,10 +251,6 @@ export default {
|
|||
})
|
||||
})
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
|
|
|
@ -52,14 +52,14 @@
|
|||
|
||||
</el-form>
|
||||
<el-footer v-show="mode!=='show'">
|
||||
<ticketd_b_start
|
||||
<ticketd_b
|
||||
:workflow_key="'borrowrecord'"
|
||||
:title="ticketTitle"
|
||||
:t_id="addForm.id"
|
||||
:ticket_="addForm.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
:submit_b_func="submit"
|
||||
ref="ticketd_b_start"
|
||||
ref="ticketd_b"
|
||||
@success="$emit('success')"
|
||||
/>
|
||||
</el-footer>
|
||||
|
@ -77,7 +77,7 @@
|
|||
</template>
|
||||
<script>
|
||||
|
||||
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
import ticketd from "@/views/wf/ticketd.vue";
|
||||
|
||||
export default {
|
||||
|
@ -94,7 +94,7 @@ export default {
|
|||
},
|
||||
|
||||
components: {
|
||||
ticketd, ticketd_b_start
|
||||
ticketd, ticketd_b
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -36,7 +36,16 @@
|
|||
<el-table-column label="预约日期" prop="mdate"></el-table-column>
|
||||
<el-table-column label="预约时间" prop="time_ranges">
|
||||
<template #default="scope">
|
||||
<span v-for="item in scope.row.time_ranges" :key="item">{{ item }}、</span>
|
||||
<span v-for="item in scope.row.time_ranges" :key="item">{{ item }};</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批信息">
|
||||
<template #default="scope">
|
||||
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
|
||||
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
|
||||
</el-tag>
|
||||
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
|
@ -64,9 +73,9 @@
|
|||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer :title="titleMap[type]" v-model="limitedVisible" :size="'80%'">
|
||||
<el-drawer title="会议室预定" v-model="limitedVisible" :size="'80%'" destroy-on-close>
|
||||
<bookingDialog
|
||||
:type="type"
|
||||
:mode="mode"
|
||||
:editId="editId"
|
||||
:bookingIitem="bookingIitem"
|
||||
@success="handleSuccess"
|
||||
|
@ -77,17 +86,19 @@
|
|||
|
||||
<script>
|
||||
import bookingDialog from "./booking_form.vue";
|
||||
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
|
||||
export default {
|
||||
name: "index",
|
||||
components: { bookingDialog },
|
||||
data() {
|
||||
return {
|
||||
actStateEnum, interveneTypeEnum,
|
||||
apiObj: this.$API.ofm.mroombooking.list,
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
type: "add",
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "新增会议预定",
|
||||
edit: "编辑会议预定",
|
||||
|
@ -108,7 +119,7 @@ export default {
|
|||
},
|
||||
//添加
|
||||
handleAdd() {
|
||||
this.type = "add";
|
||||
this.mode = "add";
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleCancel() {
|
||||
|
@ -120,14 +131,14 @@ export default {
|
|||
},
|
||||
handleEidt(row) {
|
||||
let that = this;
|
||||
that.type = "edit";
|
||||
that.mode = "edit";
|
||||
that.editId = row.id;
|
||||
that.bookingIitem = row;
|
||||
that.limitedVisible = true;
|
||||
},
|
||||
handleShow(row){
|
||||
let that = this;
|
||||
that.type = "show";
|
||||
that.mode = "show";
|
||||
that.editId = row.id;
|
||||
that.bookingIitem = row;
|
||||
that.limitedVisible = true;
|
||||
|
|
|
@ -128,14 +128,14 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-show="mode!=='show'">
|
||||
<ticketd_b_start
|
||||
<ticketd_b
|
||||
:workflow_key="'publicity'"
|
||||
:title="ticketTitle"
|
||||
:t_id="addForm.id"
|
||||
:ticket_="addForm.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
:submit_b_func="submit_b_func"
|
||||
ref="ticketd_b_start"
|
||||
ref="ticketd_b"
|
||||
@success="$emit('success')"
|
||||
@colsed="$emit('closed')"/>
|
||||
</el-footer>
|
||||
|
@ -152,7 +152,7 @@
|
|||
</template>
|
||||
<script>
|
||||
|
||||
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
|
||||
export default {
|
||||
|
@ -165,7 +165,7 @@ export default {
|
|||
transitions: { type: Array, default: () => [] },
|
||||
},
|
||||
components: {
|
||||
ticketd, ticketd_b_start
|
||||
ticketd, ticketd_b
|
||||
},
|
||||
emits: ["update:modelValue", "submit", "cancel"],
|
||||
data(){
|
||||
|
|
|
@ -84,14 +84,14 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-show="localMode!=='show'">
|
||||
<ticketd_b_start
|
||||
<ticketd_b
|
||||
:workflow_key="'seal'"
|
||||
:title="ticketTitle"
|
||||
:t_id="localForm.id"
|
||||
:ticket_="localForm.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
:submit_b_func="submit_b_func"
|
||||
ref="ticketd_b_start"
|
||||
ref="ticketd_b"
|
||||
@success="$emit('success')"
|
||||
/>
|
||||
</el-footer>
|
||||
|
@ -108,7 +108,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
props: {
|
||||
|
@ -120,7 +120,7 @@ export default {
|
|||
default: null
|
||||
},
|
||||
},
|
||||
components: {ticketd, ticketd_b_start },
|
||||
components: {ticketd, ticketd_b },
|
||||
emits: ["update:modelValue", "submit", "cancel"],
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -63,14 +63,14 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer v-show="mode!=='show'">
|
||||
<ticketd_b_start
|
||||
<ticketd_b
|
||||
:workflow_key="'vehicle'"
|
||||
:title="ticketTitle"
|
||||
:t_id="addForm.id"
|
||||
:ticket_="addForm.ticket_"
|
||||
:submit_b_func="submit_b_func"
|
||||
:ticket_data="ticket_data"
|
||||
ref="ticketd_b_start"
|
||||
ref="ticketd_b"
|
||||
@success="$emit('success')"
|
||||
@colsed="$emit('closed')"
|
||||
/>
|
||||
|
@ -88,7 +88,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
props: {
|
||||
|
@ -100,7 +100,7 @@ export default {
|
|||
default: null
|
||||
},
|
||||
},
|
||||
components: {ticketd, ticketd_b_start},
|
||||
components: {ticketd, ticketd_b},
|
||||
emits: ["update:modelValue", "submit", "cancel"],
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -189,8 +189,8 @@
|
|||
</el-form>
|
||||
<el-footer v-show="mode!=='show'">
|
||||
<template v-if="(route_code=='tuihuo'&&type==10&&mtype==10)||form.ticket!=null">
|
||||
<ticketd_b_start :workflow_key="'backfire'" :title="'退火交接审批单'" :t_id="form.id" :ticket_="form.ticket_"
|
||||
@success="()=>{$emit('success')} " :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b_start>
|
||||
<ticketd_b :workflow_key="'backfire'" :title="'退火交接审批单'" :t_id="form.id" :ticket_="form.ticket_"
|
||||
@success="()=>{$emit('success')} " :submit_b_func="submit_b_func" ref="ticketd_b"></ticketd_b>
|
||||
</template>
|
||||
<el-button v-else type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
|
||||
<el-button @click="$emit('closed')">取消</el-button>
|
||||
|
@ -203,12 +203,12 @@
|
|||
|
||||
</template>
|
||||
<script>
|
||||
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||
import ticketd_b from "@/views/wf/ticketd_b.vue";
|
||||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
components: {
|
||||
ticketd_b_start, ticketd
|
||||
ticketd_b, ticketd
|
||||
},
|
||||
props: {
|
||||
t_id: {
|
||||
|
@ -392,7 +392,7 @@ export default {
|
|||
that.mode = "show";
|
||||
}
|
||||
// that.$nextTick(()=>{
|
||||
// that.$refs.ticketd_b_start.init();
|
||||
// that.$refs.ticketd_b.init();
|
||||
// })
|
||||
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue