消息确认按钮添加以及流程步骤文字说明添加
This commit is contained in:
parent
de20585560
commit
db8c74c1fb
|
|
@ -52,8 +52,8 @@ const jumpTo = (val) => {
|
|||
})
|
||||
}
|
||||
}
|
||||
// 同意
|
||||
const agree = async () => {
|
||||
// 同意/消息确认
|
||||
const agree = async (type) => {
|
||||
loading.value = true;
|
||||
try {
|
||||
await approvalApi(params.value?.id,{
|
||||
|
|
@ -63,7 +63,7 @@ const agree = async () => {
|
|||
safety_measures: info.value?.safety_measures,
|
||||
cosign_item_id: info.value?.cosign_item_id,//审核人id
|
||||
});
|
||||
showNotify({ message: '同意成功', background: '#00b42a' });
|
||||
showNotify({ message: type==='agree'? '同意成功' : '消息确认成功', background: '#00b42a' });
|
||||
jumpTo(params.value?.type==='wait'?1:0);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
|
|
@ -190,28 +190,33 @@ onMounted(() => {
|
|||
<div class="row col">
|
||||
<div class="timeline">
|
||||
<div class="timeline-item" v-if="info.template_id==4">
|
||||
<p class="timeline-dot"></p>
|
||||
<div class="left">
|
||||
<p class="timeline-dot"></p>
|
||||
<div class="txt">班长:</div>
|
||||
<div class="txt">{{info?.apply_user?.realname}}</div>
|
||||
<div class="txt">申请人&风险辨识:</div>
|
||||
<div class="txt">班长</div>
|
||||
<div class="txt name">{{info?.apply_user?.realname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timeline-item" v-if="info.template_id>=1 && info.template_id<=3">
|
||||
<p class="timeline-dot"></p>
|
||||
<div class="left">
|
||||
<p class="timeline-dot"></p>
|
||||
<div class="txt">车间工程师:</div>
|
||||
<div class="txt">{{info?.apply_user?.realname}}</div>
|
||||
<div class="txt">申请人:</div>
|
||||
<div class="txt">车间工程师</div>
|
||||
<div class="txt name">{{info?.apply_user?.realname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<template v-for="(item, index) in info?.steps || []" :key="index">
|
||||
<template v-for="(sItem,sIndex) in (item.cosigns || item.cosign_items || item.draft_cosign_items)" :key="sIndex">
|
||||
<div class="timeline-item">
|
||||
<div class="left">
|
||||
<p class="timeline-dot"></p>
|
||||
<div class="txt">{{sItem.dept_name}}:</div>
|
||||
<div class="txt">{{sItem.user_name}}</div>
|
||||
<p class="timeline-dot"></p>
|
||||
<div>
|
||||
<div class="left">
|
||||
<div class="txt">{{item.step_name}}:</div>
|
||||
<div class="txt">{{sItem.dept_name}}</div>
|
||||
<div class="txt name">{{sItem.user_name}}</div>
|
||||
</div>
|
||||
<div class="txt time" v-if="sItem.signed_at">{{(sItem.signed_at)?.slice(0,16)}}</div>
|
||||
</div>
|
||||
<div class="txt" v-if="sItem.signed_at">{{(sItem.signed_at)?.slice(0,16)}}</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
|
@ -231,8 +236,15 @@ onMounted(() => {
|
|||
((info?.template_id==2 || info?.template_id==3) && (info?.current_step>=1 && info?.current_step<=4))) ||
|
||||
info?.template_id==5
|
||||
">
|
||||
<p class="btn" @click="agree">同意</p>
|
||||
<p class="btn" @click="reject">驳回</p>
|
||||
<p class="btn" @click="agree('agree')">同意</p>
|
||||
<p class="btn" @click="reject">驳回</p>
|
||||
</div>
|
||||
<div class="op" v-if="
|
||||
params?.type==='wait' && info.status==5 && params?.isMyself==='pending' &&
|
||||
((info?.template_id==1 || info?.template_id==4) && info?.current_step==4) ||
|
||||
((info?.template_id==2 || info?.template_id==3) && info?.current_step==5)
|
||||
">
|
||||
<p class="btn" @click="agree('messageConfirm')">消息确认</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -328,7 +340,7 @@ onMounted(() => {
|
|||
.timeline:before {
|
||||
content: '';
|
||||
width: 1px;
|
||||
height: calc(100% - 6px);
|
||||
height: calc(100% - 16px);
|
||||
background: #1989fa;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
|
|
@ -337,7 +349,6 @@ onMounted(() => {
|
|||
.timeline-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
}
|
||||
.timeline-item .left {
|
||||
|
|
@ -352,4 +363,10 @@ onMounted(() => {
|
|||
border-radius: 50%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.time {
|
||||
margin-top: 2px;
|
||||
}
|
||||
.name {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ const getOrg = (data) => {
|
|||
}
|
||||
|
||||
// 同意
|
||||
const agree = async () => {
|
||||
const agree = async (type) => {
|
||||
loading.value = true;
|
||||
try {
|
||||
await approvalApi(params.value?.id,{
|
||||
|
|
@ -58,7 +58,7 @@ const agree = async () => {
|
|||
safety_measures: info.value?.safety_measures,
|
||||
cosign_item_id: info.value?.cosign_item_id,//审核人id
|
||||
});
|
||||
showNotify({ message: '同意成功', background: '#00b42a' });
|
||||
showNotify({ message: type==='agree'? '同意成功' : '消息确认成功', background: '#00b42a' });
|
||||
jumpTo(params.value?.type==='wait'?1:0);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
|
|
@ -183,8 +183,15 @@ onMounted(() => {
|
|||
((info?.template_id==2 || info?.template_id==3) && (info?.current_step>=1 && info?.current_step<=4))) ||
|
||||
info?.template_id==5
|
||||
">
|
||||
<p class="btn" @click="agree">同意</p>
|
||||
<p class="btn" @click="reject">驳回</p>
|
||||
<p class="btn" @click="agree('agree')">同意</p>
|
||||
<p class="btn" @click="reject">驳回</p>
|
||||
</div>
|
||||
<div class="op" v-if="
|
||||
params?.type==='wait' && info.status==5 && params?.isMyself==='pending' &&
|
||||
((info?.template_id==1 || info?.template_id==4) && info?.current_step==4) ||
|
||||
((info?.template_id==2 || info?.template_id==3) && info?.current_step==5)
|
||||
">
|
||||
<p class="btn" @click="agree('messageConfirm')">消息确认</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue