From a1422067d0db73458a4a0c3a03df700860d336d2 Mon Sep 17 00:00:00 2001 From: dj <1042039504@qq.com> Date: Mon, 14 Apr 2025 16:44:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=A1=E6=89=B9=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=8A=A0=E7=AB=8B=E5=8D=B3=E6=8A=84=E9=80=81=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/expense-manage/index.js | 7 ++++ src/components/ImportCostExcel.vue | 4 ++- src/views/workflow/process/index.vue | 48 ++++++++++++++++++++++++++-- 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/src/api/expense-manage/index.js b/src/api/expense-manage/index.js index 4c60bf8..34f7bdd 100644 --- a/src/api/expense-manage/index.js +++ b/src/api/expense-manage/index.js @@ -68,6 +68,13 @@ export const editAllocation = (data) => { data }); }; +export const applyCcSend = (data) => { + return request({ + url: '/workflow/mosr/cc/send', + method: "post", + data + }); +}; export const deleteAllocation = (id) => { return request({ url: `/workflow/mosr/cost/allocation/${id}`, diff --git a/src/components/ImportCostExcel.vue b/src/components/ImportCostExcel.vue index da6ba76..b2749e7 100644 --- a/src/components/ImportCostExcel.vue +++ b/src/components/ImportCostExcel.vue @@ -91,10 +91,12 @@ const handleUploadSuccess = (res) => { emit("success") } const uploadError = (error) => { + console.log("🚀 ~ file:'error ", error.response.data.msg) + // loading.value = false ElNotification({ title: '提示', - message: "上传失败,请稍后再试!", + message: error.response.data.msg, type: 'error' }) } diff --git a/src/views/workflow/process/index.vue b/src/views/workflow/process/index.vue index 39b18cc..b76adac 100644 --- a/src/views/workflow/process/index.vue +++ b/src/views/workflow/process/index.vue @@ -59,6 +59,9 @@ 编辑 + 立即抄送 + @@ -68,6 +71,8 @@ + @@ -118,14 +123,18 @@ import { deleteHistoryVersion } from "@/api/workflow/process-definition.js"; import {Search, Refresh, Delete, Plus, Edit, Download, Document} from '@element-plus/icons-vue' -import {ElMessage, ElMessageBox} from "element-plus"; +import {ElMessage, ElMessageBox, ElNotification} from "element-plus"; import {useCacheStore} from '@/stores/cache.js' import PointTag from "@/components/PointTag.vue"; import Paging from "@/components/pagination/index.vue"; +import UserPicker from "./common/UserPicker.vue"; +import {applyCcSend} from "@/api/expense-manage"; const dictStore = useCacheStore() dictStore.setCacheKey(['normal_disable']) const router = useRouter() +const carbonCopyUserList = ref([]) +const carbonCopyUserRef = ref() //查询参数 const queryParams = reactive({ @@ -144,6 +153,7 @@ const loading = ref(true) const list = ref([]) const queryForm = ref() const total = ref() +const chooseRow = ref({}) const selectDefinition = ref(null) const historyVersionList = ref([]) const singleTable = ref() @@ -151,6 +161,41 @@ const isVisited = ref(false) onActivated(() => { getList() }) + +const handleCarbonCopy=(row)=>{ + carbonCopyUserRef.value.showUserPicker() + chooseRow.value=row +} +const carbonCopyUserPickerOk = (userList) => { + carbonCopyUserList.value = userList.map(item => item.id) + console.log("🚀 ~ file:'carbonCopyUserList.value ", carbonCopyUserList.value) + + // addUser() +} +const addUser=async () => { + const res = await applyCcSend({ + instanceId: chooseRow.value.deploymentId, + message: chooseRow.value.remark, + projectId:0, + state: chooseRow.value.state, + userIds: carbonCopyUserList.value + }) + console.log('res',res) + if (res.code === 1000) { + ElNotification({ + title: '提示', + message: '抄送成功', + type: 'error' + }) + tableIns.value.refresh() + } else { + ElNotification({ + title: '提示', + message: res.msg, + type: 'error' + }) + } +} //重置搜索 const handleReset = () => { queryForm.value.resetFields() @@ -182,7 +227,6 @@ const handleAdd = () => { path: '/workflow/process/add', }) } - const handleEdit = (deploymentId) => { router.push({ path: `/workflow/process/edit/${deploymentId}`,