diff --git a/src/api/oa_financial.ts b/src/api/oa_financial.ts new file mode 100644 index 0000000..81434a8 --- /dev/null +++ b/src/api/oa_financial.ts @@ -0,0 +1,41 @@ +import request from "@/utils/request"; + +// 我申请的 +export function apiExpenseList(params: any) { + return request.get({ url: "/works.finance.expense/lists", params }); +} + +// 我申请的 +export function apiExpenseDetail(params: any) { + return request.get({ url: "/works.finance.expense/detail", params }); +} + +// 审核 +export function apiExpenseAdd(params: any) { + return request.post({ url: "/works.finance.expense/add", params }); +} + +// 审核 +export function apiExpenseCheck(params: any) { + return request.post({ url: "/works.finance.expense/check", params }); +} +// 我申请的 +export function apiExpensedealWithList(params: any) { + return request.get({ + url: "/works.finance.expense/deal_with", + params, + }); +} + +// 我申请的 +export function apiExpenseCopyList(params: any) { + return request.get({ + url: "/works.finance.expense/copy", + params, + }); +} + +// 我申请的 +export function apiExpenseList2(params: any) { + return request.get({ url: "/works.finance.expense/lists2", params }); +} diff --git a/src/components/generateForm/index.vue b/src/components/generateForm/index.vue index 9ce491e..e78e59c 100644 --- a/src/components/generateForm/index.vue +++ b/src/components/generateForm/index.vue @@ -66,7 +66,6 @@ const formRules = reactive({ }); - const showPerDialog = ref(false) const personnel = ref(null) diff --git a/src/components/oaFlow/index.vue b/src/components/oaFlow/index.vue index 3ce4af5..4422b70 100644 --- a/src/components/oaFlow/index.vue +++ b/src/components/oaFlow/index.vue @@ -19,9 +19,9 @@ @click="userclick(1)" /> - + - @@ -50,6 +50,12 @@ const props = defineProps({ type: Object, required: true, }, + flow_cate: { + type: Number, + }, + type: { + type: Number, + } }); const showPerDialog = ref(false); @@ -76,7 +82,7 @@ const submituser = (e) => { const flowList = ref([]); const getFlowList = async () => { // 根据id筛选审批流程列表 - const res = await apiOaFlowLists(); + const res = await apiOaFlowLists({ flow_cate: props.flow_cate, type: props.type }); flowList.value = res.lists; }; getFlowList(); @@ -89,17 +95,18 @@ const flowChnage = async (e) => { const flow = flowList.value.find((item) => item.id === e); checkType.value = flow.check_type; if (flow.check_type != 2) { + props.formData.check_admin_names = ''; + props.formData.check_admin_ids = ''; let res = await apiOaFlowDetail({ id: flow.id }); flowListPer.value = res.flow_list; - console.log(res); } }; -const flowTypeToText = (type) => { - console.log(type, "type") +const flowTypeToText = (type, item) => { if (type == 1) return '当前部门负责人'; if (type == 2) return '或签'; if (type == 3) return '会签'; + if (type == 4) return item.flow_name; } diff --git a/src/views/oa_Deal/detail.vue b/src/views/oa_Deal/detail.vue deleted file mode 100644 index e69de29..0000000 diff --git a/src/views/oa_Deal/index.vue b/src/views/oa_Deal/index.vue index 69baab3..06d93cb 100644 --- a/src/views/oa_Deal/index.vue +++ b/src/views/oa_Deal/index.vue @@ -18,16 +18,6 @@ - - - 新增 - - - 删除 -
@@ -39,8 +29,7 @@ @@ -51,7 +40,8 @@
- + @@ -61,11 +51,12 @@ import { useDictData } from '@/hooks/useDictOptions' import { apiOaoaApprovelst } from '@/api/oa_Initiate' import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' -// import EditPopup from './edit.vue' +import detailPopup from '@/views/oa_Initiate/detail.vue' +import { apiOaoaApproveDetail } from "@/api/oa_Initiate" -const editRef = shallowRef>() +const detailRef = ref(null) // 是否显示编辑框 -const showEdit = ref(false) +const showDetail = ref(false) // 查询条件 @@ -91,27 +82,15 @@ const { pager, getLists, resetParams, resetPage } = usePaging({ params: queryParams }) -// 添加 -const handleAdd = async () => { - showEdit.value = true +const handDetail = async (id: any) => { + let res = await apiOaoaApproveDetail({ id }) + showDetail.value = true await nextTick() - editRef.value?.open('add') + detailRef.value?.open() + detailRef.value?.setFormData(res) } -// 编辑 -const handleEdit = async (data: any) => { - showEdit.value = true - await nextTick() - editRef.value?.open('edit') - editRef.value?.setFormData(data) -} -// 删除 -const handleDelete = async (id: number | any[]) => { - await feedback.confirm('确定要删除?') - await apiOaSealCateDelete({ id }) - getLists() -} getLists() diff --git a/src/views/oa_Initiate/detail.vue b/src/views/oa_Initiate/detail.vue index 938338f..6891031 100644 --- a/src/views/oa_Initiate/detail.vue +++ b/src/views/oa_Initiate/detail.vue @@ -13,12 +13,11 @@ - {{ formData.check_status_text }} - {{ formData.check_admin_users }} + {{ formData.check_admin_users || "审批结束" }} {{ formData.copy_users }} @@ -26,12 +25,24 @@ - 审批流程 + + + + - 审批记录 +

+ {{ item.check_user_name + item.status_text }} 了申请 + {{ item.check_time }} + + 操作意见: + {{ item.content }} + +

- +
审批结束 @@ -43,17 +54,24 @@
- + - - + + 通过 - + 拒绝 - + + 回退 + + 撤回 @@ -71,7 +89,7 @@ import Popup from '@/components/popup/index.vue' import { apiOaoaApproveCheck } from "@/api/oa_initiate" import useUserStore from "@/stores/modules/user"; - +import { Clock } from '@element-plus/icons-vue' const emit = defineEmits(['close']) const popupRef = shallowRef>() @@ -79,6 +97,7 @@ const showPerDialog = ref(false); const personnel = ref(null); const userStore = useUserStore().userInfo; +console.log(userStore) // 表单数据 const formData = reactive({ id: 0, @@ -93,6 +112,7 @@ const setFormData = async (data: Record) => { formData[key] = data[key] } } + console.log(formData) } @@ -106,7 +126,7 @@ const form = reactive({ }) -const userclick = async (type) => { +const userclick = async () => { showPerDialog.value = true; await nextTick(); personnel.value.open(); @@ -124,11 +144,20 @@ const open = () => { popupRef.value?.open() } - -// 提交按钮 -const handleSubmit = async () => { - popupRef.value?.close() +const flowTypeToText = (type, item) => { + if (type == 0) return item.user_id_info[0].name; + if (type == 1) return "部门负责人"; + if (type == 2) return "或签"; + if (type == 3) return "会签"; + if (type == 4) return item.user_id_info[0].name; } + + +const findActive = () => { + let index = formData.steps.findIndex(item => { return item.sort == formData.check_step_sort }) + return index +} + // 关闭回调 const handleClose = () => { emit('close') @@ -137,14 +166,36 @@ const handleClose = () => { // 审批 const handCheck = async () => { + console.log(formData.flow_info.check_type != 2) + if (formData.flow_info.check_type != 2) delete form.check_node; + form.id = formData.id const res = await apiOaoaApproveCheck({ ...form }) handleClose() } +// 显示 +const showActionList = reactive([4, 3, 2]) +const showTextarea = () => { + if (showActionList.includes(formData.check_status)) return false; + if (formData.admin_id == userStore.id) return true; + if (formData?.check_admin_ids.length > 1) { + if (formData.steps[findActive()].check_list.map(item => item.check_user_id).includes(userStore.id)) return false; + else return (formData?.check_admin_ids.split(',').map(Number).includes(userStore.id)); // 判断是否是当前用户 + } else { + return (formData?.check_admin_ids == userStore.id) + } + + +} defineExpose({ open, setFormData, }) + diff --git a/src/views/oa_Initiate/edit.vue b/src/views/oa_Initiate/edit.vue index 8f885a5..6f9de43 100644 --- a/src/views/oa_Initiate/edit.vue +++ b/src/views/oa_Initiate/edit.vue @@ -1,14 +1,13 @@ @@ -26,11 +25,12 @@ const showDialog = ref(false) // 弹窗标题 const popupTitle = computed(() => { - return mode.value == "edit" ? "编辑审批类型" : "新增审批类型"; + return "新增审批" }); // 表单数据 const formData = reactive({ + id: 0, data: [], extends: {} }); @@ -50,6 +50,8 @@ const formRules = reactive({ // 获取详情 const setFormData = async (data: Record) => { formData.data = data.data; + formData.id = data.id; + console.log(formData) }; diff --git a/src/views/oa_Initiate/index.vue b/src/views/oa_Initiate/index.vue index c1d653b..6825a5a 100644 --- a/src/views/oa_Initiate/index.vue +++ b/src/views/oa_Initiate/index.vue @@ -1,6 +1,6 @@ @@ -128,7 +129,6 @@ getLists() const lists = ref([]) - const getTypeList = async () => { const res = await apiOaFlowTypeLists() lists.value = res @@ -145,12 +145,21 @@ getTypeList() height: 82vh; } +.left { + overflow-y: auto; + height: 82vh; +} + +.left::-webkit-scrollbar { + display: none; +} + .tit { margin-bottom: 10px; .tit-content { display: flex; - justify-content: space-between; + // justify-content: space-between; flex-wrap: wrap; .tit-li { @@ -161,6 +170,8 @@ getTypeList() height: 60px; line-height: 60px; cursor: pointer; + margin-bottom: 5px; + margin-right: 5px; } } diff --git a/src/views/oa_apply/detail.vue b/src/views/oa_apply/detail.vue new file mode 100644 index 0000000..40f08d0 --- /dev/null +++ b/src/views/oa_apply/detail.vue @@ -0,0 +1,216 @@ + + + + diff --git a/src/views/oa_apply/edit.vue b/src/views/oa_apply/edit.vue new file mode 100644 index 0000000..5a93a22 --- /dev/null +++ b/src/views/oa_apply/edit.vue @@ -0,0 +1,171 @@ + + + \ No newline at end of file diff --git a/src/views/oa_apply/index.vue b/src/views/oa_apply/index.vue new file mode 100644 index 0000000..cd85ef2 --- /dev/null +++ b/src/views/oa_apply/index.vue @@ -0,0 +1,143 @@ + + + + diff --git a/src/views/oa_arrival/index.vue b/src/views/oa_arrival/index.vue new file mode 100644 index 0000000..ae8664b --- /dev/null +++ b/src/views/oa_arrival/index.vue @@ -0,0 +1,5 @@ + + +到账管理 + + \ No newline at end of file diff --git a/src/views/oa_copy_to_me/detail.vue b/src/views/oa_copy_to_me/detail.vue new file mode 100644 index 0000000..40f08d0 --- /dev/null +++ b/src/views/oa_copy_to_me/detail.vue @@ -0,0 +1,216 @@ + + + + diff --git a/src/views/oa_copy_to_me/index.vue b/src/views/oa_copy_to_me/index.vue new file mode 100644 index 0000000..6f5f7f6 --- /dev/null +++ b/src/views/oa_copy_to_me/index.vue @@ -0,0 +1,107 @@ + + + + diff --git a/src/views/oa_flow/edit.vue b/src/views/oa_flow/edit.vue index ec5af9a..30a9a85 100644 --- a/src/views/oa_flow/edit.vue +++ b/src/views/oa_flow/edit.vue @@ -82,7 +82,7 @@ - 无需审批 + 无需配置审批人,审批时,根据实际情况选择审批人即可,自由度最高。 @@ -99,7 +99,7 @@ class="mx-1" closable> {{ tag.name }} - + 选择人员 @@ -128,7 +128,7 @@ - + @@ -157,6 +157,7 @@ const popupRef = shallowRef>(); const mode = ref("add"); const showPersonnel = ref(false) const showDialog = ref(false) +const perType = ref(2) // 弹窗标题 const popupTitle = computed(() => { @@ -270,7 +271,8 @@ const handleSubmit = async () => { // 人员选择器,selectIndex为-1时为抄送选择抄送人员,其余为指定人员所在的flow_list的下标 let selectIndex: nmber; -const openDialog = async (index) => { +const openDialog = async (index, type) => { + type ? perType.value = type : perType.value = 2; showPersonnel.value = true await nextTick() personnel.value?.open() @@ -280,7 +282,11 @@ const submituser = (e) => { if (selectIndex == -1) { formData.copy_uids = e.map(item => ({ id: item.id, name: item.name })) } else { - formData.flow_list[selectIndex].flow_uids = e.map(item => ({ id: item.id, name: item.name })) + if (perType.value == 2) { + formData.flow_list[selectIndex].flow_uids = e.map(item => ({ id: item.id, name: item.name })) + } else { + formData.flow_list[selectIndex].flow_uids = [{ id: e.id, name: e.name }] + } } showPersonnel.value = false } diff --git a/src/views/oa_myDeal/detail.vue b/src/views/oa_myDeal/detail.vue new file mode 100644 index 0000000..40f08d0 --- /dev/null +++ b/src/views/oa_myDeal/detail.vue @@ -0,0 +1,216 @@ + + + + diff --git a/src/views/oa_myDeal/index.vue b/src/views/oa_myDeal/index.vue new file mode 100644 index 0000000..e9cf712 --- /dev/null +++ b/src/views/oa_myDeal/index.vue @@ -0,0 +1,105 @@ + + + + diff --git a/src/views/oa_transfe/detail.vue b/src/views/oa_transfe/detail.vue new file mode 100644 index 0000000..40f08d0 --- /dev/null +++ b/src/views/oa_transfe/detail.vue @@ -0,0 +1,216 @@ + + + + diff --git a/src/views/oa_transfe/index.vue b/src/views/oa_transfe/index.vue new file mode 100644 index 0000000..6eaaf4f --- /dev/null +++ b/src/views/oa_transfe/index.vue @@ -0,0 +1,115 @@ + + + +