yxk-20260710
党委会、所务会、把把脉:部门负责人审批节点,增加判断是否完成,若完成则进入督办部门审批;若未完成则回到经办人继续反馈完成情况,直到最终完成任务。
This commit is contained in:
@@ -245,6 +245,18 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-form v-if="showFinishSelector" class="process-variable-form" labelAlign="left" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否已完成" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<a-radio-group v-model:value="isFinish" :disabled="savingFinish">
|
||||
<a-radio value="0">否(未完成)</a-radio>
|
||||
<a-radio value="1">是(已完成)</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<TaskHandleInnerContent
|
||||
:form-data="formData"
|
||||
:claim="claim"
|
||||
@@ -268,7 +280,7 @@
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { bgTakepulseFeedbackDelete, bgTakepulseFeedbackList, saveBpmForm, setProcessVariable } from '../BgTakepulse.api';
|
||||
import { bgTakepulseFeedbackDelete, bgTakepulseFeedbackList, saveBpmForm, setBpmVariableLocal } from '../BgTakepulse.api';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
import BgTakepulseBPMFeedbackModal from './BgTakepulseBPMFeedbackModal.vue';
|
||||
@@ -306,6 +318,7 @@
|
||||
const loading = ref(false);
|
||||
const savingMain = ref(false);
|
||||
const savingSubApproveUser = ref(false);
|
||||
const savingFinish = ref(false);
|
||||
const showBaseInfoDetail = ref(false);
|
||||
const showFeedbackDetail = ref(true);
|
||||
const feedbackList = ref<any[]>([]);
|
||||
@@ -323,6 +336,7 @@
|
||||
const subApproveUserNameText = ref('');
|
||||
const userResolveVersion = ref(0);
|
||||
const isEnd = ref(0);
|
||||
const isFinish = ref('0');
|
||||
|
||||
const mainForm = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
@@ -392,6 +406,7 @@
|
||||
const canManageFeedback = computed(() => props.formBpm && props.formData?.PROCESS_TAB_TYPE === 'run' && !!props.formData?.taskId);
|
||||
const showAddFeedback = computed(() => String(props.formData?.extendUrlParams?.addfeedback ?? '') === '1');
|
||||
const showSubApproveUser = computed(() => String(props.formData?.extendUrlParams?.selectuser ?? '') === '1');
|
||||
const showFinishSelector = computed(() => String(props.formData?.extendUrlParams?.selectfinish ?? '') === '1');
|
||||
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
||||
|
||||
const processInfo = computed(() => ({
|
||||
@@ -435,6 +450,14 @@
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.formData?.vars?.isFinish,
|
||||
(value) => {
|
||||
isFinish.value = String(value ?? '0') === '1' ? '1' : '0';
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
subApproveUser,
|
||||
(value) => {
|
||||
@@ -561,7 +584,7 @@
|
||||
}
|
||||
|
||||
function buildDeptLeaderApproveReason() {
|
||||
return '已审批,请督办部门确认。';
|
||||
return String(isFinish.value) === '1' ? '已审批,请督办部门确认。' : '请反馈完成情况。';
|
||||
}
|
||||
|
||||
function buildSuperviseHandlerConfirmReason() {
|
||||
@@ -710,7 +733,13 @@
|
||||
}
|
||||
}
|
||||
if (showSubApproveUser.value) {
|
||||
return saveSubApproveUserVariable({ showSuccessMessage: false });
|
||||
const subApproveUserSaved = await saveSubApproveUserVariable({ showSuccessMessage: false });
|
||||
if (!subApproveUserSaved) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (showFinishSelector.value) {
|
||||
return saveFinishVariable({ showSuccessMessage: false });
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -799,11 +828,39 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function saveFinishVariable(options: { showSuccessMessage?: boolean } = {}) {
|
||||
const { showSuccessMessage = true } = options;
|
||||
const processInstanceId = processInfo.value.processInstanceId;
|
||||
if (!processInstanceId) {
|
||||
createMessage.warning('流程实例ID不能为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
savingFinish.value = true;
|
||||
try {
|
||||
// Gateway_isfinish 读取当前分支局部变量,需在办理动作前写入外层分支 execution。
|
||||
const result = await saveProcessVariable('isFinish', String(isFinish.value));
|
||||
if (!result?.success) {
|
||||
createMessage.warning(result.message || '保存失败');
|
||||
return false;
|
||||
}
|
||||
if (showSuccessMessage) {
|
||||
createMessage.success('保存成功');
|
||||
}
|
||||
return true;
|
||||
} catch (error) {
|
||||
createMessage.warning('保存失败');
|
||||
return false;
|
||||
} finally {
|
||||
savingFinish.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function saveProcessVariable(varField: string, varVal: any) {
|
||||
return setProcessVariable({
|
||||
return setBpmVariableLocal({
|
||||
processInstanceId: processInfo.value.processInstanceId,
|
||||
taskId: processInfo.value.taskId,
|
||||
local: true,
|
||||
parentLevel: 2,
|
||||
varField,
|
||||
varVal,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user