|
@@ -177,6 +177,7 @@
|
|
|
<p v-else>暂无</p>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- 入库申请-审核阶段 -->
|
|
|
<!-- audit history -->
|
|
|
<div
|
|
|
v-if="flowHistoryList.length && curTaskApply.flowStatus !== 'START'"
|
|
@@ -260,6 +261,7 @@
|
|
|
</el-timeline-item>
|
|
|
</el-timeline>
|
|
|
</div>
|
|
|
+ <!-- 入库申请-申请阶段 -->
|
|
|
<div
|
|
|
v-if="flowList.length && curTaskApply.flowStatus === 'START'"
|
|
|
class="task-audit-history flow-timeline"
|
|
@@ -274,7 +276,36 @@
|
|
|
<div class="flow-item">
|
|
|
<div class="flow-item-content">
|
|
|
<h4 class="flow-item-title">{{ flow.taskName }}</h4>
|
|
|
- <p class="flow-item-desc">{{ flow.approveUserNames }}</p>
|
|
|
+ <p v-if="flow.approveUserNames" class="flow-item-desc">
|
|
|
+ {{ flow.approveUserNames }}
|
|
|
+ </p>
|
|
|
+ <div
|
|
|
+ v-if="flow.isApproveSetFlowNextNode && approveUsers.length"
|
|
|
+ class="flow-item-users"
|
|
|
+ >
|
|
|
+ <span>审批人:</span>
|
|
|
+ <el-tag
|
|
|
+ v-for="user in approveUsers"
|
|
|
+ :key="user.id"
|
|
|
+ size="small"
|
|
|
+ :disable-transitions="false"
|
|
|
+ >
|
|
|
+ {{ user.name }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="flow.isApproveSetFlowNextNode"
|
|
|
+ class="flow-item-action"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ class="user-select"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="toSelectNextFlowUser"
|
|
|
+ ></el-button>
|
|
|
+ <p v-if="!approveUsers.length" class="tips-info tips-error">
|
|
|
+ 请选择用户
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-timeline-item>
|
|
@@ -419,7 +450,7 @@
|
|
|
></simple-image-preview>
|
|
|
<!-- select-user-dialog -->
|
|
|
<select-user-dialog
|
|
|
- v-if="IS_AUDIT"
|
|
|
+ v-if="IS_AUDIT || IS_NEED_SELECT_APPROVE_USER"
|
|
|
ref="SelectUserDialog"
|
|
|
:user-limit-count="userLimitCount"
|
|
|
:filter-roles="userFilterRoles"
|
|
@@ -574,6 +605,7 @@ export default {
|
|
|
rejectSetupList: [], // 可以驳回的节点
|
|
|
exchangeUsers: [],
|
|
|
selectUserType: "exchange", // exchange:转审,approve:下一节点审核
|
|
|
+ curSelectedUsers: [],
|
|
|
// 选择下一节点审批人
|
|
|
IS_NEED_SELECT_APPROVE_USER: false,
|
|
|
nextFlowTaskResult: {}, //下一节点信息
|
|
@@ -724,14 +756,27 @@ export default {
|
|
|
if (!this.curTaskApply.flowId) return;
|
|
|
const data = await flowDetailByFlowId(this.curTaskApply.flowId);
|
|
|
if (!data) return;
|
|
|
+
|
|
|
+ const modelType =
|
|
|
+ data.flowTaskResultList[0] && data.flowTaskResultList[0].modelType;
|
|
|
this.flowInfo = {
|
|
|
customFlowId: data.id,
|
|
|
version: data.version
|
|
|
};
|
|
|
- this.flowList = data.flowTaskResultList || [];
|
|
|
+ const nextFlowNodeIndex = 1;
|
|
|
+ this.IS_NEED_SELECT_APPROVE_USER = modelType === "APPROVE_SET";
|
|
|
+ const flowList = data.flowTaskResultList || [];
|
|
|
+ this.flowList = flowList.map((flow, index) => {
|
|
|
+ flow.isApproveSetFlowNextNode =
|
|
|
+ this.IS_NEED_SELECT_APPROVE_USER && index === nextFlowNodeIndex;
|
|
|
+ return flow;
|
|
|
+ });
|
|
|
+
|
|
|
if (this.flowList.length) {
|
|
|
this.flowList[0].type = "success";
|
|
|
}
|
|
|
+
|
|
|
+ this.nextFlowTaskResult = this.flowList[nextFlowNodeIndex];
|
|
|
},
|
|
|
async getCurFlowNodeInfo() {
|
|
|
const data = await taskFlowNodeInfo(this.curTaskApply.flowTaskId);
|
|
@@ -741,9 +786,11 @@ export default {
|
|
|
});
|
|
|
this.nextFlowTaskResult = data.nextFlowTaskResult;
|
|
|
// 判断发起人自选,是否需要选择下个审核人员
|
|
|
+ const { modelType, approveUserNames, taskKey } = this.nextFlowTaskResult;
|
|
|
this.IS_NEED_SELECT_APPROVE_USER =
|
|
|
- this.nextFlowTaskResult.modelType === "APPROVE_SET" &&
|
|
|
- !this.nextFlowTaskResult.approveUserNames;
|
|
|
+ modelType === "APPROVE_SET" &&
|
|
|
+ taskKey.toLowerCase() !== "end" &&
|
|
|
+ !approveUserNames;
|
|
|
this.flowHistoryList[
|
|
|
this.flowHistoryList.length - 1
|
|
|
].isApproveSetFlowNextNode = this.IS_NEED_SELECT_APPROVE_USER;
|
|
@@ -950,6 +997,8 @@ export default {
|
|
|
data.paperConfirmAttachmentIds = JSON.stringify(
|
|
|
this.paperConfirmAttachments
|
|
|
);
|
|
|
+ if (this.IS_NEED_SELECT_APPROVE_USER)
|
|
|
+ data.approveUserIds = this.approveUsers.map(item => item.id);
|
|
|
return data;
|
|
|
},
|
|
|
checkDataValid() {
|
|
@@ -979,6 +1028,11 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (this.IS_NEED_SELECT_APPROVE_USER && !this.approveUsers.length) {
|
|
|
+ this.$message.error("请设置审核人员!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
return true;
|
|
|
},
|
|
|
async toSave() {
|