通知审批流优化

This commit is contained in:
‘huanghaiixia’
2026-01-12 17:49:22 +08:00
parent 8df05f6179
commit 673f87fdd6
7 changed files with 79 additions and 28 deletions

View File

@ -51,14 +51,14 @@ export const tabListData: TabItem[] = [
// unreadNum: 0,
// },
{
key: '3',
key: '3', // 4
name: t('工作流'),
list: [],
read: [],
unreadNum: 0,
},
{
key: '4',
key: '4', // 5
name: t('系统通知'),
list: [],
unreadNum: 0,

View File

@ -101,7 +101,7 @@
@click="
() => {
it.read = 1;
setReadSingle(it.id, item.key);
setReadSingle(it.id, item.key, it);
}
"
>
@ -115,7 +115,19 @@
</div>
<div class="notice-footer"
><span @click="setReadAll(item.key)">{{ t('全部设置已读') }}</span
><span>{{ t('查看更多') }} </span></div
>
<!-- <span>{{ t('查看更多') }} </span> -->
<router-link
class="opr"
style=" color: #02a7f0;"
:to="{
path: item.key=='1'? '/oaNews':'/OaNotice',
}"
>
{{ t('查看更多') }}
</router-link>
</div
>
</div>
<a-empty :image="simpleImage" v-else />
@ -148,6 +160,9 @@
/>
</template>
</Popover>
<ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
<ViewModal v-if="viewOpen" :viewData="viewData" />
</ModalPanel>
</div>
</template>
<script lang="ts">
@ -166,6 +181,9 @@
import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue';
import LookProcess from '/@/views/workflow/task/components/LookProcess.vue';
import ViewModal from '/@/views/dataconfig/oaNews/components/View.vue';
import { ModalPanel } from '/@/components/ModalPanel/index';
import { useI18n } from '/@/hooks/web/useI18n';
import { useRouter } from 'vue-router';
const { t } = useI18n();
@ -177,7 +195,9 @@
Badge,
Icon,
ApprovalProcess,
LookProcess
LookProcess,
ViewModal,
ModalPanel
},
setup() {
const router = useRouter();
@ -200,6 +220,16 @@
let times: any = ref();
const listData = ref(tabListData);
const simpleImage = ref(Empty.PRESENTED_IMAGE_SIMPLE);
const viewOpen = ref(false);
const viewData = ref({});
function handleView(record, num) {
viewData.value = {...record, typeId: num};
viewOpen.value = true;
}
function handleViewClose() {
viewOpen.value = false;
}
getDatas();
//停止循环获取通知
// times.value = setInterval(() => {
@ -217,6 +247,7 @@
(res || []).forEach((o) => {
if (!o.readId) listData.value[0].unreadNum += 1;
listData.value[0].list.push({
...o,
id: o.id,
avatar: '',
title: o.briefHead,
@ -224,13 +255,14 @@
datetime: o.releaseTime,
color: '',
type: '3',
read: o.isRead
read: o.isRead,
});
});
let res1 = await getOaNews(2);
(res1 || []).forEach((o) => {
if (!o.readId) listData.value[1].unreadNum += 1;
listData.value[1].list.push({
...o,
id: o.id,
avatar: '',
title: o.briefHead,
@ -319,7 +351,6 @@
}
return count;
});
async function setReadAll(type) {
if (type == 1 || type == 2) {
let ids: string[] = [];
@ -343,15 +374,18 @@
}
listData.value[type - 1].unreadNum = 0;
}
async function setReadSingle(ids, num) {
if (num == 3) {
await setScheduleRead([ids]);
} else if (num == 4) {
async function setReadSingle(ids, num, record) {
console.log(num, 'num')
// if (num == 3) { // 日程
// await setScheduleRead([ids]);
// } else
if (num == 3) { // 4
await setSingleRead(ids);
} else if (num == 5) {
} else if (num == 4) { // 5
await setSystemNoticeRead([ids]);
} else {
await setOaRead([ids]);
handleView(record, num)
}
if (listData.value[num - 1].unreadNum > 0) listData.value[num - 1].unreadNum -= 1;
}
@ -366,7 +400,13 @@
});
return;
}
router.push(record.path);
router.push({
path: record.path || '/form/systemNotice/' + record.id + '/viewForm',
query: {
formPath: 'system/systemNotice',
formName: '系统通知'
}
});
}
onUnmounted(() => {
clearInterval(times.value);
@ -404,7 +444,11 @@
Approval,
LookData,
t,
goToRouter
goToRouter,
viewData,
viewOpen,
handleView,
handleViewClose
};
}
});

View File

@ -90,7 +90,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="合同金额(万元)" name="amount">
<a-input-number v-model:value="formState.amount" style="width: 100%" @blur="amountBlur(formState.amount)" :min="0" :disabled="isDisable" />
<a-input-number v-model:value="formState.amount" style="width: 100%" :formatter="value => ` ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')" @blur="amountBlur(formState.amount)" :min="0" :disabled="isDisable" />
</a-form-item>
</a-col>
<a-col :span="8">
@ -528,6 +528,7 @@
formState.cpCount = dataList.value.length
}
if (btn == 'edit') {
curIdx.value = index
openModalUser(true, {record: record,isUpdate: true});
}
}

View File

@ -2,9 +2,8 @@
<a-spin :spinning="spinning" tip="加载中...">
<div class="page-bg-wrap formViewStyle">
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
<Card title="客户基本信息" :bordered="false" >
<Card title="基本信息" :bordered="false" >
<div>
<h4>基本信息</h4>
<a-row>
<a-col :span="8">
<a-form-item label="客户编码" name="cuCode">
@ -114,8 +113,9 @@
</a-col>
</a-row>
</div>
</Card>
<Card title="资信/业务信息" :bordered="false" >
<div>
<h4>资信/业务信息</h4>
<a-row>
<a-col :span="8">
<a-form-item label="客户分类" name="classCode">

View File

@ -38,7 +38,7 @@
</template>
</a-space>
</div>
<component v-if="customFormConfig.codeList.includes(curPageCode)" :is="componentName" ref="formInformation" :disabled="(rQuery.status=='COMPLETED'?false : readonly)" />
<component v-if="customFormConfig.codeList.includes(curPageCode)" :is="componentName" ref="formInformation" :disabled="(rQuery.status=='COMPLETED'?false : true)" />
<FormInformation
v-else
:key="renderKey"
@ -50,8 +50,12 @@
:opinionsComponents="data.opinionsComponents"
@get-form-configs="(config) => (formConfigs = config)"
/>
<Title :font-size="18" default-value="流转信息"></Title>
<flow-history :items="getTaskRecords()"></flow-history>
<div class="formViewStyle">
<Card title="流转信息" :bordered="false" >
<!-- <Title :font-size="18" default-value="流转信息"></Title> -->
<flow-history :items="getTaskRecords()"></flow-history>
</Card>
</div>
<opinion-dialog ref="opinionDlg" />
<transfer-dialog ref="transferDlg" />
<a-modal :closable="false" v-if="showFlowChart" visible="true" centered class="geg" title="流程图" width="1200px" @cancel="closeFlowChart">
@ -75,6 +79,7 @@
</template>
<script setup>
import { Card } from 'ant-design-vue';
import { useRouter } from 'vue-router';
import { onMounted, reactive, ref, unref, createVNode, provide,computed,defineAsyncComponent } from 'vue';
import FormInformation from '/@/views/secondDev/FormInformation.vue';
@ -413,8 +418,8 @@
return;
}
} else {
await formInformation.value.handleSubmit(true);
validateSuccess.value = true
// await formInformation.value.handleSubmit(true);
// validateSuccess.value = true
}
const params = await getApproveParams();
const nextNodes = await postGetNextTaskMaybeArrival(params);

View File

@ -47,9 +47,10 @@
<FormInformation v-else :key="randKey" ref="formInformation" :disabled="false" :formAssignmentData="data.formAssignmentData" :formInfos="data.formInfos" :opinions="data.opinions" :opinionsComponents="data.opinionsComponents" />
</div>
</div>
<div v-if="rQuery.type == 'update'">
<Title :font-size="18" default-value="流转信息"></Title>
<flow-history :items="historyList"></flow-history>
<div v-if="rQuery.type == 'update'" class="formViewStyle">
<Card title="流转信息" :bordered="false" >
<flow-history :items="historyList"></flow-history>
</Card>
</div>
<a-modal :visible="showFlowChart" centered class="geg" closable title="流程图" width="1200px" @cancel="closeFlowChart">
<process-information :process-id="processId" :xml="data.xml" />
@ -63,6 +64,7 @@
</template>
<script setup>
import { Card } from 'ant-design-vue';
import { useRouter } from 'vue-router';
import userTaskItem from '/@/views/workflow/task/hooks/userTaskItem';
import FormInformation from '/@/views/secondDev/FormInformation.vue';

View File

@ -2,9 +2,8 @@
<a-spin :spinning="spinning" tip="加载中...">
<div class="page-bg-wrap formViewStyle">
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
<Card title="供应商基本信息" :bordered="false" >
<Card title="基本信息" :bordered="false" >
<div>
<h4>基本信息</h4>
<a-row>
<a-col :span="8">
<a-form-item label="供应商编码" name="suCode">