feat: 审批流程加立即抄送按钮
This commit is contained in:
@@ -68,6 +68,13 @@ export const editAllocation = (data) => {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const applyCcSend = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/cc/send',
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
export const deleteAllocation = (id) => {
|
export const deleteAllocation = (id) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/mosr/cost/allocation/${id}`,
|
url: `/workflow/mosr/cost/allocation/${id}`,
|
||||||
|
|||||||
@@ -91,10 +91,12 @@ const handleUploadSuccess = (res) => {
|
|||||||
emit("success")
|
emit("success")
|
||||||
}
|
}
|
||||||
const uploadError = (error) => {
|
const uploadError = (error) => {
|
||||||
|
console.log("🚀 ~ file:'error ", error.response.data.msg)
|
||||||
|
|
||||||
// loading.value = false
|
// loading.value = false
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: "上传失败,请稍后再试!",
|
message: error.response.data.msg,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,9 @@
|
|||||||
<el-button type="primary" size="mini"
|
<el-button type="primary" size="mini"
|
||||||
@click="handleEdit(scope.row.deploymentId)" link>编辑
|
@click="handleEdit(scope.row.deploymentId)" link>编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button type="primary" size="mini"
|
||||||
|
@click="handleCarbonCopy(scope.row)" link>立即抄送
|
||||||
|
</el-button>
|
||||||
<!-- <el-button type="primary" size="mini"-->
|
<!-- <el-button type="primary" size="mini"-->
|
||||||
<!-- @click="viewHistoricalVersion(scope.row)" link>历史-->
|
<!-- @click="viewHistoricalVersion(scope.row)" link>历史-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
@@ -68,6 +71,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
<user-picker :multiple="true" ref="carbonCopyUserRef" title="请选择抄送人员"
|
||||||
|
v-model:value="carbonCopyUserList" @ok="carbonCopyUserPickerOk" @cancelOrClear="carbonCopyUserPickerOk"/>
|
||||||
<paging :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[10, 20, 30, 40,50]"
|
<paging :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[10, 20, 30, 40,50]"
|
||||||
:total="total" @changeSize="handleSizeChange" @goPage="handleCurrentChange"/>
|
:total="total" @changeSize="handleSizeChange" @goPage="handleCurrentChange"/>
|
||||||
<el-dialog v-model="isVisited" title="历史" width="800px">
|
<el-dialog v-model="isVisited" title="历史" width="800px">
|
||||||
@@ -118,14 +123,18 @@ import {
|
|||||||
deleteHistoryVersion
|
deleteHistoryVersion
|
||||||
} from "@/api/workflow/process-definition.js";
|
} from "@/api/workflow/process-definition.js";
|
||||||
import {Search, Refresh, Delete, Plus, Edit, Download, Document} from '@element-plus/icons-vue'
|
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 {useCacheStore} from '@/stores/cache.js'
|
||||||
import PointTag from "@/components/PointTag.vue";
|
import PointTag from "@/components/PointTag.vue";
|
||||||
import Paging from "@/components/pagination/index.vue";
|
import Paging from "@/components/pagination/index.vue";
|
||||||
|
import UserPicker from "./common/UserPicker.vue";
|
||||||
|
import {applyCcSend} from "@/api/expense-manage";
|
||||||
|
|
||||||
const dictStore = useCacheStore()
|
const dictStore = useCacheStore()
|
||||||
dictStore.setCacheKey(['normal_disable'])
|
dictStore.setCacheKey(['normal_disable'])
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const carbonCopyUserList = ref([])
|
||||||
|
const carbonCopyUserRef = ref()
|
||||||
|
|
||||||
//查询参数
|
//查询参数
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
@@ -144,6 +153,7 @@ const loading = ref(true)
|
|||||||
const list = ref([])
|
const list = ref([])
|
||||||
const queryForm = ref()
|
const queryForm = ref()
|
||||||
const total = ref()
|
const total = ref()
|
||||||
|
const chooseRow = ref({})
|
||||||
const selectDefinition = ref(null)
|
const selectDefinition = ref(null)
|
||||||
const historyVersionList = ref([])
|
const historyVersionList = ref([])
|
||||||
const singleTable = ref()
|
const singleTable = ref()
|
||||||
@@ -151,6 +161,41 @@ const isVisited = ref(false)
|
|||||||
onActivated(() => {
|
onActivated(() => {
|
||||||
getList()
|
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 = () => {
|
const handleReset = () => {
|
||||||
queryForm.value.resetFields()
|
queryForm.value.resetFields()
|
||||||
@@ -182,7 +227,6 @@ const handleAdd = () => {
|
|||||||
path: '/workflow/process/add',
|
path: '/workflow/process/add',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = (deploymentId) => {
|
const handleEdit = (deploymentId) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: `/workflow/process/edit/${deploymentId}`,
|
path: `/workflow/process/edit/${deploymentId}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user