update 调整流程图预览校验

This commit is contained in:
gssong 2024-06-03 21:04:42 +08:00
parent 212361dc94
commit 38df345078
2 changed files with 15 additions and 13 deletions

View File

@ -5,7 +5,8 @@ export interface LeaveVO {
endDate: string;
leaveDays: number;
remark: string;
processInstanceVo: any;
status?: string;
processInstanceId?: string;
}
export interface LeaveForm extends BaseEntity {
@ -15,7 +16,8 @@ export interface LeaveForm extends BaseEntity {
endDate?: string;
leaveDays?: number;
remark?: string;
processInstanceVo?: any;
status?: string;
processInstanceId?: string;
}
export interface LeaveQuery extends PageQuery {

View File

@ -4,18 +4,20 @@
<div style="display: flex; justify-content: space-between">
<div>
<el-button
v-if="routeParams.type === 'add' ||
(routeParams.type === 'update' &&form.status &&
(form.status === 'draft' || form.status === 'cancel' || form.status === 'back'))"
v-if="
routeParams.type === 'add' ||
(routeParams.type === 'update' && form.status && (form.status === 'draft' || form.status === 'cancel' || form.status === 'back'))
"
:loading="buttonLoading"
type="info"
@click="submitForm('draft')"
>暂存</el-button
>
<el-button
v-if="routeParams.type === 'add' ||
(routeParams.type === 'update' && form.status &&
(form.status === 'draft' || form.status === 'cancel' || form.status === 'back'))"
v-if="
routeParams.type === 'add' ||
(routeParams.type === 'update' && form.status && (form.status === 'draft' || form.status === 'cancel' || form.status === 'back'))
"
:loading="buttonLoading"
type="primary"
@click="submitForm('submit')"
@ -28,7 +30,7 @@
@click="approvalVerifyOpen"
>审批</el-button
>
<el-button v-if="processInstanceId" type="primary" @click="handleApprovalRecord">流程进度</el-button>
<el-button v-if="form.processInstanceId" type="primary" @click="handleApprovalRecord">流程进度</el-button>
</div>
<div>
<el-button style="float: right" @click="goBack()">返回</el-button>
@ -123,7 +125,8 @@ const initFormData: LeaveForm = {
endDate: undefined,
leaveDays: undefined,
remark: undefined,
processInstanceVo: {}
status: undefined,
processInstanceId: undefined
};
const data = reactive<PageData<LeaveForm, LeaveQuery>>({
form: { ...initFormData },
@ -166,9 +169,6 @@ const getInfo = () => {
leaveTime.value = [];
leaveTime.value.push(form.value.startDate);
leaveTime.value.push(form.value.endDate);
if (form.value.processInstanceVo) {
processInstanceId.value = form.value.processInstanceVo.id;
}
loading.value = false;
buttonLoading.value = false;
});