This commit is contained in:
zmj 2024-05-27 20:55:19 +08:00
parent 11acfad196
commit ddab7a6b4d
14 changed files with 1929 additions and 6 deletions

View File

@ -39,3 +39,49 @@ export function apiExpenseCopyList(params: any) {
export function apiExpenseList2(params: any) {
return request.get({ url: "/works.finance.expense/lists2", params });
}
// 审核
export function apiExpensePayment(params: any) {
return request.post({
url: "/works.finance.expense/payment",
params,
});
}
export function apiInvoiceAdd(params: any) {
return request.post({
url: "/works.finance.invoice/add",
params,
});
}
// 我申请的
export function apiInvliceList(params: any) {
return request.get({ url: "/works.finance.invoice/lists", params });
}
export function apiInvliceDetail(params: any) {
return request.post({ url: "/works.finance.invoice/detail", params });
}
export function apiInvliceCopy(params: any) {
return request.get({ url: "/works.finance.invoice/copy", params });
}
export function apiInvlicedealwith(params: any) {
return request.get({ url: "/works.finance.invoice/deal_with", params });
}
export function apiInvliceList2(params: any) {
return request.get({ url: "/works.finance.invoice/lists2", params });
}
export function apiInvliceCheck(params: any) {
return request.post({ url: "/works.finance.invoice/check", params });
}
export function apiInvliceInvoice(params: any) {
return request.post({
url: "/works.finance.invoice/invoice",
params,
});
}

View File

@ -74,7 +74,7 @@ const submituser = (e) => {
props.formData.check_admin_ids = e.id;
} else {
props.formData.copy_names = e.map((item) => item.name).join(",");
props.formData.copy_ids = e.map((item) => item.id).join(",");
props.formData.copy_uids = e.map((item) => item.id).join(",");
}
showPerDialog.value = false;
};

View File

@ -0,0 +1,130 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw">
<el-card>
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="发票金额" label-align="left" align="left">
{{ formData.amount }}
</el-descriptions-item>
<el-descriptions-item label="抬头类型" label-align="left" align="left">
{{ formData.type_text }}
</el-descriptions-item>
<el-descriptions-item label="发票主体" label-align="left" align="left">
{{ formData.invoice_subject }}
</el-descriptions-item>
<el-descriptions-item label="发票类型" label-align="left" align="left">
{{ formData.invoice_type_text }}
</el-descriptions-item>
<el-descriptions-item label="开票抬头" label-align="left" align="left">
{{ formData.invoice_title }}
</el-descriptions-item>
<el-descriptions-item label="电话号码" label-align="left" align="left">
{{ formData.invoice_phone }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" label-align="left" align="left">
{{ formData.invoice_tax }}
</el-descriptions-item>
<el-descriptions-item label="开户银行" label-align="left" align="left">
{{ formData.invoice_bank }}
</el-descriptions-item>
<el-descriptions-item label="银行账号" label-align="left" align="left">
{{ formData.invoice_account }}
</el-descriptions-item>
<el-descriptions-item label="银行营业网点" label-align="left" align="left">
{{ formData.invoice_banking }}
</el-descriptions-item>
<el-descriptions-item label="地址" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="开票人" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="未到账金额" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="已到账金额" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left">
{{ formData.remark }}
</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left">
<annexLink :annex="formData.annex || []"></annexLink>
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import annexLink from './../../components/annexLink/index.vue'
import Popup from '@/components/popup/index.vue'
import useUserStore from "@/stores/modules/user";
import { Clock } from '@element-plus/icons-vue'
import { apiInvliceCheck } from '@/api/oa_financial'
const emit = defineEmits(['close'])
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const showPerDialog = ref(false);
const personnel = ref(null);
const userStore = useUserStore().userInfo;
//
const formData = reactive({
id: 0,
extends: {}
})
//
const setFormData = async (data: Record<any, any>) => {
for (const key in data) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
}
console.log(formData)
}
//
const open = () => {
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
//
defineExpose({
open,
setFormData,
})
</script>
<style lang="scss" scoped>
:deep(.el-step__icon) {
margin-top: 10px !important;
}
</style>

View File

@ -1,5 +1,124 @@
<tamplate>
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="开始时间" prop="uid">
<el-date-picker class="flex-1 !flex" v-model="queryParams.start_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="uid">
<el-date-picker class="flex-1 !flex" v-model="queryParams.end_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" class="flex-1">
<el-option label="未到账" value="1" />
<el-option label="部分到账" value="2" />
<el-option label="全部到账" value="3" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="id" prop="invoice_title" show-overflow-tooltip />
<el-table-column label="到账状态" prop="amount" show-overflow-tooltip />
<el-table-column label="到账金额" prop="invoice_type_text" show-overflow-tooltip />
<el-table-column label="最新到账时间" prop="check_status_text" show-overflow-tooltip />
<el-table-column label="发票抬头" prop="user_name" show-overflow-tooltip />
<el-table-column label="发票金额" prop="dept_name" show-overflow-tooltip />
<el-table-column label="开票类型" prop="create_time" show-overflow-tooltip />
<el-table-column label="申请开票人" prop="check_admin_users" show-overflow-tooltip />
<el-table-column label="申请时间" prop="open_admin_name" show-overflow-tooltip />
<el-table-column label="发票号码" prop="open_time" show-overflow-tooltip />
<el-table-column label="开票时间" prop="code" show-overflow-tooltip />
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="form.id = row.id, showDialog = true">
到账管理
</el-button>
<el-button type="primary" link @click="handDetail(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<detailPopup v-if="showDetail" ref="detailRef" @success="showDetail = false, getLists()"
@close="showDetail = false, getLists()" />
</div>
</template>
到账管理
<script lang="ts" setup name="oaSealCateLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import detailPopup from '@/views/oa_Initiate/detail.vue'
import { apiInvliceList2, apiInvliceDetail, apiInvliceInvoice } from '@/api/oa_financial'
const detailRef = ref(null)
//
const showDetail = ref(false)
const showDialog = ref(false)
//
const queryParams = reactive({
title: '',
status: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiInvliceList2,
params: queryParams
})
const handDetail = async (id: any) => {
// let res = await apiInvliceDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData({})
}
const form = reactive({
"id": '',
"code": "",
"open_time": "",
"delivery": ""
})
getLists()
setTimeout(() => {
pager.lists.push({})
}, 2000);
</script>
</tamplate>

View File

@ -0,0 +1,234 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw">
<el-card>
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="发票金额" label-align="left" align="left">
{{ formData.amount }}
</el-descriptions-item>
<el-descriptions-item label="抬头类型" label-align="left" align="left">
{{ formData.type_text }}
</el-descriptions-item>
<el-descriptions-item label="发票主体" label-align="left" align="left">
{{ formData.invoice_subject }}
</el-descriptions-item>
<el-descriptions-item label="发票类型" label-align="left" align="left">
{{ formData.invoice_type_text }}
</el-descriptions-item>
<el-descriptions-item label="开票抬头" label-align="left" align="left">
{{ formData.invoice_title }}
</el-descriptions-item>
<el-descriptions-item label="电话号码" label-align="left" align="left">
{{ formData.invoice_phone }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" label-align="left" align="left">
{{ formData.invoice_tax }}
</el-descriptions-item>
<el-descriptions-item label="开户银行" label-align="left" align="left">
{{ formData.invoice_bank }}
</el-descriptions-item>
<el-descriptions-item label="银行账号" label-align="left" align="left">
{{ formData.invoice_account }}
</el-descriptions-item>
<el-descriptions-item label="银行营业网点" label-align="left" align="left">
{{ formData.invoice_banking }}
</el-descriptions-item>
<el-descriptions-item label="地址" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left">
{{ formData.remark }}
</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left">
<annexLink :annex="formData.annex || []"></annexLink>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card>
<template #header>审批流程</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="审批状态" label-align="left" align="left">
{{ formData.check_status_text }}
</el-descriptions-item>
<el-descriptions-item label="当前审核人" label-align="left" align="left">
{{ formData.check_admin_users || "审批结束" }}
</el-descriptions-item>
<el-descriptions-item label="抄送人" label-align="left" align="left">
{{ formData.copy_users }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" border>
<el-descriptions-item label="审批流程" label-align="left" align="left">
<el-steps class="mb-4" style="max-width: 50vw" :space="200" :active="findActive() + 1" simple>
<el-step :icon="Clock" :title="formData.record[0].check_user_name + '创建'" />
<el-step :icon="Clock" :title="flowTypeToText(item.flow_type, item)"
v-for="item in formData.steps" />
</el-steps>
</el-descriptions-item>
<el-descriptions-item label="审批记录" label-align="left" align="left">
<p v-for="item in formData.record">
<span>{{ item.check_user_name + item.status_text }} </span>了申请
{{ item.check_time }}
<span>
操作意见
{{ item.content }}
</span>
</p>
</el-descriptions-item>
<el-descriptions-item label="审批节点" label-align="left" align="left"
v-if="formData.flow_info.check_type == 2 && formData.check_status != 3 && formData.check_status != 2 && formData.admin_id != userStore.id">
<div class="flex" style="position: relative;">
<el-radio-group v-model="form.check_node">
<el-radio :label="1">审批结束</el-radio>
<el-radio :label="2">下一审批人</el-radio>
</el-radio-group>
<div class="w-280[px]" style="position: absolute;left:250px">
<el-input v-show="form.check_node == 2" v-model="form.check_admin_names"
placeholder="点击选择下一审批人" clearable readonly @click="userclick" />
</div>
</div>
</el-descriptions-item>
<el-descriptions-item label="审批意见" label-align="left" align="left" v-if="showTextarea()">
<el-input type="textarea" v-model="form.content"></el-input>
</el-descriptions-item>
<el-descriptions-item label="操作" label-align="left" align="left" v-if="showTextarea()">
<el-button type="primary" @click="form.check = 1, handCheck()"
v-if="formData.admin_id != userStore.id">
通过
</el-button>
<el-button @click="form.check = 2, handCheck()"
v-if="formData.admin_id != userStore.id && formData.flow_info.check_type != 3">
拒绝
</el-button>
<el-button @click="form.check = 2, handCheck()"
v-if="formData.admin_id != userStore.id && formData.flow_info.check_type == 3">
回退
</el-button>
<el-button type="info" @click="form.check = 3, handCheck()"
v-if="formData.admin_id == userStore.id">
撤回
</el-button>
</el-descriptions-item>
</el-descriptions>
</el-card>
<div v-if="showPerDialog">
<personnelselector ref="personnel" @confirm="submituser" type="1">
</personnelselector>
</div>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import annexLink from './../../components/annexLink/index.vue'
import Popup from '@/components/popup/index.vue'
import useUserStore from "@/stores/modules/user";
import { Clock } from '@element-plus/icons-vue'
import { apiInvliceCheck } from '@/api/oa_financial'
const emit = defineEmits(['close'])
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const showPerDialog = ref(false);
const personnel = ref(null);
const userStore = useUserStore().userInfo;
//
const formData = reactive({
id: 0,
extends: {}
})
//
const setFormData = async (data: Record<any, any>) => {
for (const key in data) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
}
console.log(formData)
}
const form = reactive({
"id": formData.id,
"check": '',
"content": "",
"check_node": 1,
"check_admin_ids": '',
check_admin_names: ""
})
const userclick = async () => {
showPerDialog.value = true;
await nextTick();
personnel.value.open();
};
const submituser = (e) => {
form.check_admin_names = e.name;
form.check_admin_ids = e.id;
showPerDialog.value = false;
};
//
const open = () => {
popupRef.value?.open()
}
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')
}
//
const handCheck = async () => {
if (formData.flow_info.check_type != 2) delete form.check_node;
form.id = formData.id
const res = await apiInvliceCheck({ ...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,
})
</script>
<style lang="scss" scoped>
:deep(.el-step__icon) {
margin-top: 10px !important;
}
</style>

View File

@ -0,0 +1,193 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
<el-card>
<template #header>
审批内容
</template>
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="发票金额" prop="amount">
<el-input v-model="formData.amount" clearable placeholder="请输入发票金额" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="抬头类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择抬头类型" class="flex-1">
<el-option label="企业" value="1" />
<el-option label="个人" value="2" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发票主体" prop="invoice_subject">
<el-input v-model="formData.invoice_subject" clearable placeholder="请输入发票主体" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发票类型" prop="invoice_type">
<el-select v-model="formData.invoice_type" placeholder="请选择发票类型" class="flex-1">
<el-option label="增值税专用发票" value="1" />
<el-option label="普通发票" value="2" />
<el-option label="专用发票" value="3" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开票抬头" prop="invoice_title">
<el-input v-model="formData.invoice_title" clearable placeholder="请输入开票抬头" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="电话号码" prop="invoice_phone">
<el-input v-model="formData.invoice_phone" clearable placeholder="请输入电话号码" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="纳税人识别号" prop="invoice_tax">
<el-input v-model="formData.invoice_tax" clearable placeholder="请输入纳税人识别号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户银行" prop="invoice_bank">
<el-input v-model="formData.invoice_bank" clearable placeholder="请输入开户银行" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="银行账号" prop="invoice_account">
<el-input v-model="formData.invoice_account" clearable placeholder="请输入银行账号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="银行营业网点" prop="invoice_banking">
<el-input v-model="formData.invoice_banking" clearable placeholder="请输入银行营业网点" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="地址" prop="invoice_address">
<el-input v-model="formData.invoice_address" clearable placeholder="请输入地址" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="24" class="mt-4">
<el-form-item label="附件" prop="income_month">
<uploadAnnex :form-data="formData"></uploadAnnex>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<oaFlow :form-data="formData" type="6"></oaFlow>
</popup>
</div>
</template>
<script lang="ts" setup name="oaFlowTypeEdit">
import uploadAnnex from './../../components/uploadAnnex/index.vue'
import Popup from "@/components/popup/index.vue";
import { apiInvoiceAdd } from '@/api/oa_financial'
const emit = defineEmits(["success", "close"]);
const formRef = shallowRef<FormInstance>();
const popupRef = shallowRef<InstanceType<typeof Popup>>();
const mode = ref("add");
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
},
})
//
const popupTitle = computed(() => {
return "新增审批"
});
//
const formData = reactive({
"amount": 0,
"type": "",
"invoice_subject": "",
"invoice_type": '',
"invoice_title": "",
"invoice_phone": "",
"invoice_tax": "",
"invoice_bank": "",
"invoice_account": "",
"invoice_banking": "",
"invoice_address": "",
"remark": "",
"annex": [],
"flow_id": '',
"check_admin_ids": "",
"copy_uids": ""
});
const handAdd = () => {
formData.detail.push({
"amount": '',
"cate_id": '',
"remark": ""
})
}
const handDel = (i) => {
formData.detail.splice(i, 1)
}
//
const formRules = reactive<any>({
type: [
{
required: true,
message: "请输入所属分类",
trigger: ["blur"],
},
]
});
//
const setFormData = async (data: Record<any, any>) => {
// formData.data = data.data;
// formData.id = data.id;
};
//
const handleSubmit = async () => {
await formRef.value?.validate();
const data = { ...formData };
await apiInvoiceAdd(data)
popupRef.value?.close();
emit("success");
};
//
const open = (type = "add") => {
mode.value = type;
popupRef.value?.open();
};
//
const handleClose = () => {
emit("close");
};
defineExpose({
open,
setFormData,
});
</script>

View File

@ -0,0 +1,144 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="开始时间" prop="uid">
<el-date-picker class="flex-1 !flex" v-model="queryParams.start_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="uid">
<el-date-picker class="flex-1 !flex" v-model="queryParams.end_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="状态" prop="quit_time">
<el-select v-model="queryParams.status" placeholder="请选择状态" class="flex-1">
<el-option label="全部" value="0" />
<el-option label="待审核" value="1" />
<el-option label="审核中" value="2" />
<el-option label="审批通过,待开具" value="3" />
<el-option label="审核不通过" value="4" />
<el-option label="撤销审核" value="5" />
<el-option label="审批通过,已开具" value="6" />
<el-option label="已作废" value="7" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type=" primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-button v-perms="['works.rlzy.oa_personal_quit/add']" type="primary" @click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button v-perms="['works.rlzy.oa_personal_quit/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="开票抬头" prop="invoice_title" show-overflow-tooltip />
<el-table-column label="开票金额(元)" prop="amount" show-overflow-tooltip />
<el-table-column label="开票类型" prop="invoice_type_text" show-overflow-tooltip />
<el-table-column label="发票状态" prop="check_status_text" show-overflow-tooltip />
<el-table-column label="申请人" prop="user_name" show-overflow-tooltip />
<el-table-column label="所属部门" prop="dept_name" show-overflow-tooltip />
<el-table-column label="申请时间" prop="create_time" show-overflow-tooltip />
<el-table-column label="当前审核人" prop="check_admin_users" show-overflow-tooltip />
<el-table-column label="开票人" prop="open_admin_name" show-overflow-tooltip />
<el-table-column label="开票时间" prop="open_time" show-overflow-tooltip />
<el-table-column label="发票号码" prop="code" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="handDetail(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :deptList="deptList" :dict-data="dictData" @success="getLists"
@close="showEdit = false" />
<detailPopup v-if="showDetail" ref="detailRef" @success="showDetail = false, getLists()"
@close="showDetail = false, getLists()" />
</div>
</template>
<script lang="ts" setup name="oaPersonalQuitLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiInvliceList, apiInvliceDetail } from '@/api/oa_financial'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import detailPopup from './detail.vue'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const detailRef = ref(null)
//
const showDetail = ref(false)
//
const queryParams = reactive({
start_time: '',
end_time: '',
status: '',
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('oa_approve_cate')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiInvliceList,
params: queryParams
})
//
const handleAdd = async () => {
showEdit.value = true
await nextTick()
editRef.value?.open('add')
}
//
const handleEdit = async (data: any) => {
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(data)
}
const handDetail = async (id: any) => {
let res = await apiInvliceDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
getLists()
</script>

View File

@ -0,0 +1,234 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw">
<el-card>
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="发票金额" label-align="left" align="left">
{{ formData.amount }}
</el-descriptions-item>
<el-descriptions-item label="抬头类型" label-align="left" align="left">
{{ formData.type_text }}
</el-descriptions-item>
<el-descriptions-item label="发票主体" label-align="left" align="left">
{{ formData.invoice_subject }}
</el-descriptions-item>
<el-descriptions-item label="发票类型" label-align="left" align="left">
{{ formData.invoice_type_text }}
</el-descriptions-item>
<el-descriptions-item label="开票抬头" label-align="left" align="left">
{{ formData.invoice_title }}
</el-descriptions-item>
<el-descriptions-item label="电话号码" label-align="left" align="left">
{{ formData.invoice_phone }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" label-align="left" align="left">
{{ formData.invoice_tax }}
</el-descriptions-item>
<el-descriptions-item label="开户银行" label-align="left" align="left">
{{ formData.invoice_bank }}
</el-descriptions-item>
<el-descriptions-item label="银行账号" label-align="left" align="left">
{{ formData.invoice_account }}
</el-descriptions-item>
<el-descriptions-item label="银行营业网点" label-align="left" align="left">
{{ formData.invoice_banking }}
</el-descriptions-item>
<el-descriptions-item label="地址" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left">
{{ formData.remark }}
</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left">
<annexLink :annex="formData.annex || []"></annexLink>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card>
<template #header>审批流程</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="审批状态" label-align="left" align="left">
{{ formData.check_status_text }}
</el-descriptions-item>
<el-descriptions-item label="当前审核人" label-align="left" align="left">
{{ formData.check_admin_users || "审批结束" }}
</el-descriptions-item>
<el-descriptions-item label="抄送人" label-align="left" align="left">
{{ formData.copy_users }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" border>
<el-descriptions-item label="审批流程" label-align="left" align="left">
<el-steps class="mb-4" style="max-width: 50vw" :space="200" :active="findActive() + 1" simple>
<el-step :icon="Clock" :title="formData.record[0].check_user_name + '创建'" />
<el-step :icon="Clock" :title="flowTypeToText(item.flow_type, item)"
v-for="item in formData.steps" />
</el-steps>
</el-descriptions-item>
<el-descriptions-item label="审批记录" label-align="left" align="left">
<p v-for="item in formData.record">
<span>{{ item.check_user_name + item.status_text }} </span>了申请
{{ item.check_time }}
<span>
操作意见
{{ item.content }}
</span>
</p>
</el-descriptions-item>
<el-descriptions-item label="审批节点" label-align="left" align="left"
v-if="formData.flow_info.check_type == 2 && formData.check_status != 3 && formData.check_status != 2 && formData.admin_id != userStore.id">
<div class="flex" style="position: relative;">
<el-radio-group v-model="form.check_node">
<el-radio :label="1">审批结束</el-radio>
<el-radio :label="2">下一审批人</el-radio>
</el-radio-group>
<div class="w-280[px]" style="position: absolute;left:250px">
<el-input v-show="form.check_node == 2" v-model="form.check_admin_names"
placeholder="点击选择下一审批人" clearable readonly @click="userclick" />
</div>
</div>
</el-descriptions-item>
<el-descriptions-item label="审批意见" label-align="left" align="left" v-if="showTextarea()">
<el-input type="textarea" v-model="form.content"></el-input>
</el-descriptions-item>
<el-descriptions-item label="操作" label-align="left" align="left" v-if="showTextarea()">
<el-button type="primary" @click="form.check = 1, handCheck()"
v-if="formData.admin_id != userStore.id">
通过
</el-button>
<el-button @click="form.check = 2, handCheck()"
v-if="formData.admin_id != userStore.id && formData.flow_info.check_type != 3">
拒绝
</el-button>
<el-button @click="form.check = 2, handCheck()"
v-if="formData.admin_id != userStore.id && formData.flow_info.check_type == 3">
回退
</el-button>
<el-button type="info" @click="form.check = 3, handCheck()"
v-if="formData.admin_id == userStore.id">
撤回
</el-button>
</el-descriptions-item>
</el-descriptions>
</el-card>
<div v-if="showPerDialog">
<personnelselector ref="personnel" @confirm="submituser" type="1">
</personnelselector>
</div>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import annexLink from './../../components/annexLink/index.vue'
import Popup from '@/components/popup/index.vue'
import useUserStore from "@/stores/modules/user";
import { Clock } from '@element-plus/icons-vue'
import { apiInvliceCheck } from '@/api/oa_financial'
const emit = defineEmits(['close'])
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const showPerDialog = ref(false);
const personnel = ref(null);
const userStore = useUserStore().userInfo;
//
const formData = reactive({
id: 0,
extends: {}
})
//
const setFormData = async (data: Record<any, any>) => {
for (const key in data) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
}
console.log(formData)
}
const form = reactive({
"id": formData.id,
"check": '',
"content": "",
"check_node": 1,
"check_admin_ids": '',
check_admin_names: ""
})
const userclick = async () => {
showPerDialog.value = true;
await nextTick();
personnel.value.open();
};
const submituser = (e) => {
form.check_admin_names = e.name;
form.check_admin_ids = e.id;
showPerDialog.value = false;
};
//
const open = () => {
popupRef.value?.open()
}
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')
}
//
const handCheck = async () => {
if (formData.flow_info.check_type != 2) delete form.check_node;
form.id = formData.id
const res = await apiInvliceCheck({ ...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,
})
</script>
<style lang="scss" scoped>
:deep(.el-step__icon) {
margin-top: 10px !important;
}
</style>

View File

@ -0,0 +1,102 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="开始时间" prop="uid">
<el-date-picker class="flex-1 !flex" v-model="queryParams.start_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="uid">
<el-date-picker class="flex-1 !flex" v-model="queryParams.end_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择结束时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="开票抬头" prop="invoice_title" show-overflow-tooltip />
<el-table-column label="开票金额(元)" prop="amount" show-overflow-tooltip />
<el-table-column label="开票类型" prop="invoice_type_text" show-overflow-tooltip />
<el-table-column label="发票状态" prop="check_status_text" show-overflow-tooltip />
<el-table-column label="申请人" prop="user_name" show-overflow-tooltip />
<el-table-column label="所属部门" prop="dept_name" show-overflow-tooltip />
<el-table-column label="申请时间" prop="create_time" show-overflow-tooltip />
<el-table-column label="当前审核人" prop="check_admin_users" show-overflow-tooltip />
<el-table-column label="开票人" prop="open_admin_name" show-overflow-tooltip />
<el-table-column label="开票时间" prop="open_time" show-overflow-tooltip />
<el-table-column label="发票号码" prop="code" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="handDetail(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<detailPopup v-if="showDetail" ref="detailRef" @success="showDetail = false, getLists()"
@close="showDetail = false, getLists()" />
</div>
</template>
<script lang="ts" setup name="oaSealCateLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import detailPopup from '@/views/oa_Initiate/detail.vue'
import { apiInvliceCopy, apiInvliceDetail } from '@/api/oa_financial'
const detailRef = ref(null)
//
const showDetail = ref(false)
//
const queryParams = reactive({
title: '',
status: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiInvliceCopy,
params: queryParams
})
const handDetail = async (id: any) => {
let res = await apiInvliceDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
getLists()
</script>

View File

@ -0,0 +1,234 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw">
<el-card>
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="发票金额" label-align="left" align="left">
{{ formData.amount }}
</el-descriptions-item>
<el-descriptions-item label="抬头类型" label-align="left" align="left">
{{ formData.type_text }}
</el-descriptions-item>
<el-descriptions-item label="发票主体" label-align="left" align="left">
{{ formData.invoice_subject }}
</el-descriptions-item>
<el-descriptions-item label="发票类型" label-align="left" align="left">
{{ formData.invoice_type_text }}
</el-descriptions-item>
<el-descriptions-item label="开票抬头" label-align="left" align="left">
{{ formData.invoice_title }}
</el-descriptions-item>
<el-descriptions-item label="电话号码" label-align="left" align="left">
{{ formData.invoice_phone }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" label-align="left" align="left">
{{ formData.invoice_tax }}
</el-descriptions-item>
<el-descriptions-item label="开户银行" label-align="left" align="left">
{{ formData.invoice_bank }}
</el-descriptions-item>
<el-descriptions-item label="银行账号" label-align="left" align="left">
{{ formData.invoice_account }}
</el-descriptions-item>
<el-descriptions-item label="银行营业网点" label-align="left" align="left">
{{ formData.invoice_banking }}
</el-descriptions-item>
<el-descriptions-item label="地址" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left">
{{ formData.remark }}
</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left">
<annexLink :annex="formData.annex || []"></annexLink>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card>
<template #header>审批流程</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="审批状态" label-align="left" align="left">
{{ formData.check_status_text }}
</el-descriptions-item>
<el-descriptions-item label="当前审核人" label-align="left" align="left">
{{ formData.check_admin_users || "审批结束" }}
</el-descriptions-item>
<el-descriptions-item label="抄送人" label-align="left" align="left">
{{ formData.copy_users }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" border>
<el-descriptions-item label="审批流程" label-align="left" align="left">
<el-steps class="mb-4" style="max-width: 50vw" :space="200" :active="findActive() + 1" simple>
<el-step :icon="Clock" :title="formData.record[0].check_user_name + '创建'" />
<el-step :icon="Clock" :title="flowTypeToText(item.flow_type, item)"
v-for="item in formData.steps" />
</el-steps>
</el-descriptions-item>
<el-descriptions-item label="审批记录" label-align="left" align="left">
<p v-for="item in formData.record">
<span>{{ item.check_user_name + item.status_text }} </span>了申请
{{ item.check_time }}
<span>
操作意见
{{ item.content }}
</span>
</p>
</el-descriptions-item>
<el-descriptions-item label="审批节点" label-align="left" align="left"
v-if="formData.flow_info.check_type == 2 && formData.check_status != 3 && formData.check_status != 2 && formData.admin_id != userStore.id">
<div class="flex" style="position: relative;">
<el-radio-group v-model="form.check_node">
<el-radio :label="1">审批结束</el-radio>
<el-radio :label="2">下一审批人</el-radio>
</el-radio-group>
<div class="w-280[px]" style="position: absolute;left:250px">
<el-input v-show="form.check_node == 2" v-model="form.check_admin_names"
placeholder="点击选择下一审批人" clearable readonly @click="userclick" />
</div>
</div>
</el-descriptions-item>
<el-descriptions-item label="审批意见" label-align="left" align="left" v-if="showTextarea()">
<el-input type="textarea" v-model="form.content"></el-input>
</el-descriptions-item>
<el-descriptions-item label="操作" label-align="left" align="left" v-if="showTextarea()">
<el-button type="primary" @click="form.check = 1, handCheck()"
v-if="formData.admin_id != userStore.id">
通过
</el-button>
<el-button @click="form.check = 2, handCheck()"
v-if="formData.admin_id != userStore.id && formData.flow_info.check_type != 3">
拒绝
</el-button>
<el-button @click="form.check = 2, handCheck()"
v-if="formData.admin_id != userStore.id && formData.flow_info.check_type == 3">
回退
</el-button>
<el-button type="info" @click="form.check = 3, handCheck()"
v-if="formData.admin_id == userStore.id">
撤回
</el-button>
</el-descriptions-item>
</el-descriptions>
</el-card>
<div v-if="showPerDialog">
<personnelselector ref="personnel" @confirm="submituser" type="1">
</personnelselector>
</div>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import annexLink from './../../components/annexLink/index.vue'
import Popup from '@/components/popup/index.vue'
import useUserStore from "@/stores/modules/user";
import { Clock } from '@element-plus/icons-vue'
import { apiInvliceCheck } from '@/api/oa_financial'
const emit = defineEmits(['close'])
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const showPerDialog = ref(false);
const personnel = ref(null);
const userStore = useUserStore().userInfo;
//
const formData = reactive({
id: 0,
extends: {}
})
//
const setFormData = async (data: Record<any, any>) => {
for (const key in data) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
}
console.log(formData)
}
const form = reactive({
"id": formData.id,
"check": '',
"content": "",
"check_node": 1,
"check_admin_ids": '',
check_admin_names: ""
})
const userclick = async () => {
showPerDialog.value = true;
await nextTick();
personnel.value.open();
};
const submituser = (e) => {
form.check_admin_names = e.name;
form.check_admin_ids = e.id;
showPerDialog.value = false;
};
//
const open = () => {
popupRef.value?.open()
}
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')
}
//
const handCheck = async () => {
if (formData.flow_info.check_type != 2) delete form.check_node;
form.id = formData.id
const res = await apiInvliceCheck({ ...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,
})
</script>
<style lang="scss" scoped>
:deep(.el-step__icon) {
margin-top: 10px !important;
}
</style>

View File

@ -0,0 +1,99 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" class="flex-1">
<el-option label="全部" value="0" />
<el-option label="待我审核" value="1" />
<el-option label="我已审批" value="2" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="开票抬头" prop="invoice_title" show-overflow-tooltip />
<el-table-column label="开票金额(元)" prop="amount" show-overflow-tooltip />
<el-table-column label="开票类型" prop="invoice_type_text" show-overflow-tooltip />
<el-table-column label="发票状态" prop="check_status_text" show-overflow-tooltip />
<el-table-column label="申请人" prop="user_name" show-overflow-tooltip />
<el-table-column label="所属部门" prop="dept_name" show-overflow-tooltip />
<el-table-column label="申请时间" prop="create_time" show-overflow-tooltip />
<el-table-column label="当前审核人" prop="check_admin_users" show-overflow-tooltip />
<el-table-column label="开票人" prop="open_admin_name" show-overflow-tooltip />
<el-table-column label="开票时间" prop="open_time" show-overflow-tooltip />
<el-table-column label="发票号码" prop="code" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="handDetail(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<detailPopup v-if="showDetail" ref="detailRef" @success="showDetail = false, getLists()"
@close="showDetail = false, getLists()" />
</div>
</template>
<script lang="ts" setup name="oaSealCateLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import detailPopup from '@/views/oa_Initiate/detail.vue'
import { apiInvlicedealwith, apiInvliceDetail } from '@/api/oa_financial'
const detailRef = ref(null)
//
const showDetail = ref(false)
//
const queryParams = reactive({
title: '',
status: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiInvlicedealwith,
params: queryParams
})
const handDetail = async (id: any) => {
let res = await apiInvliceDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
getLists()
</script>

View File

@ -0,0 +1,234 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw">
<el-card>
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="发票金额" label-align="left" align="left">
{{ formData.amount }}
</el-descriptions-item>
<el-descriptions-item label="抬头类型" label-align="left" align="left">
{{ formData.type_text }}
</el-descriptions-item>
<el-descriptions-item label="发票主体" label-align="left" align="left">
{{ formData.invoice_subject }}
</el-descriptions-item>
<el-descriptions-item label="发票类型" label-align="left" align="left">
{{ formData.invoice_type_text }}
</el-descriptions-item>
<el-descriptions-item label="开票抬头" label-align="left" align="left">
{{ formData.invoice_title }}
</el-descriptions-item>
<el-descriptions-item label="电话号码" label-align="left" align="left">
{{ formData.invoice_phone }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" label-align="left" align="left">
{{ formData.invoice_tax }}
</el-descriptions-item>
<el-descriptions-item label="开户银行" label-align="left" align="left">
{{ formData.invoice_bank }}
</el-descriptions-item>
<el-descriptions-item label="银行账号" label-align="left" align="left">
{{ formData.invoice_account }}
</el-descriptions-item>
<el-descriptions-item label="银行营业网点" label-align="left" align="left">
{{ formData.invoice_banking }}
</el-descriptions-item>
<el-descriptions-item label="地址" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left">
{{ formData.remark }}
</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left">
<annexLink :annex="formData.annex || []"></annexLink>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card>
<template #header>审批流程</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="审批状态" label-align="left" align="left">
{{ formData.check_status_text }}
</el-descriptions-item>
<el-descriptions-item label="当前审核人" label-align="left" align="left">
{{ formData.check_admin_users || "审批结束" }}
</el-descriptions-item>
<el-descriptions-item label="抄送人" label-align="left" align="left">
{{ formData.copy_users }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="1" border>
<el-descriptions-item label="审批流程" label-align="left" align="left">
<el-steps class="mb-4" style="max-width: 50vw" :space="200" :active="findActive() + 1" simple>
<el-step :icon="Clock" :title="formData.record[0].check_user_name + '创建'" />
<el-step :icon="Clock" :title="flowTypeToText(item.flow_type, item)"
v-for="item in formData.steps" />
</el-steps>
</el-descriptions-item>
<el-descriptions-item label="审批记录" label-align="left" align="left">
<p v-for="item in formData.record">
<span>{{ item.check_user_name + item.status_text }} </span>了申请
{{ item.check_time }}
<span>
操作意见
{{ item.content }}
</span>
</p>
</el-descriptions-item>
<el-descriptions-item label="审批节点" label-align="left" align="left"
v-if="formData.flow_info.check_type == 2 && formData.check_status != 3 && formData.check_status != 2 && formData.admin_id != userStore.id">
<div class="flex" style="position: relative;">
<el-radio-group v-model="form.check_node">
<el-radio :label="1">审批结束</el-radio>
<el-radio :label="2">下一审批人</el-radio>
</el-radio-group>
<div class="w-280[px]" style="position: absolute;left:250px">
<el-input v-show="form.check_node == 2" v-model="form.check_admin_names"
placeholder="点击选择下一审批人" clearable readonly @click="userclick" />
</div>
</div>
</el-descriptions-item>
<el-descriptions-item label="审批意见" label-align="left" align="left" v-if="showTextarea()">
<el-input type="textarea" v-model="form.content"></el-input>
</el-descriptions-item>
<el-descriptions-item label="操作" label-align="left" align="left" v-if="showTextarea()">
<el-button type="primary" @click="form.check = 1, handCheck()"
v-if="formData.admin_id != userStore.id">
通过
</el-button>
<el-button @click="form.check = 2, handCheck()"
v-if="formData.admin_id != userStore.id && formData.flow_info.check_type != 3">
拒绝
</el-button>
<el-button @click="form.check = 2, handCheck()"
v-if="formData.admin_id != userStore.id && formData.flow_info.check_type == 3">
回退
</el-button>
<el-button type="info" @click="form.check = 3, handCheck()"
v-if="formData.admin_id == userStore.id">
撤回
</el-button>
</el-descriptions-item>
</el-descriptions>
</el-card>
<div v-if="showPerDialog">
<personnelselector ref="personnel" @confirm="submituser" type="1">
</personnelselector>
</div>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import annexLink from './../../components/annexLink/index.vue'
import Popup from '@/components/popup/index.vue'
import useUserStore from "@/stores/modules/user";
import { Clock } from '@element-plus/icons-vue'
import { apiInvliceCheck } from '@/api/oa_financial'
const emit = defineEmits(['close'])
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const showPerDialog = ref(false);
const personnel = ref(null);
const userStore = useUserStore().userInfo;
//
const formData = reactive({
id: 0,
extends: {}
})
//
const setFormData = async (data: Record<any, any>) => {
for (const key in data) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
}
console.log(formData)
}
const form = reactive({
"id": formData.id,
"check": '',
"content": "",
"check_node": 1,
"check_admin_ids": '',
check_admin_names: ""
})
const userclick = async () => {
showPerDialog.value = true;
await nextTick();
personnel.value.open();
};
const submituser = (e) => {
form.check_admin_names = e.name;
form.check_admin_ids = e.id;
showPerDialog.value = false;
};
//
const open = () => {
popupRef.value?.open()
}
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')
}
//
const handCheck = async () => {
if (formData.flow_info.check_type != 2) delete form.check_node;
form.id = formData.id
const res = await apiInvliceCheck({ ...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,
})
</script>
<style lang="scss" scoped>
:deep(.el-step__icon) {
margin-top: 10px !important;
}
</style>

View File

@ -0,0 +1,144 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="开始时间" prop="uid">
<el-date-picker class="flex-1 !flex" v-model="queryParams.start_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="uid">
<el-date-picker class="flex-1 !flex" v-model="queryParams.end_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择结束时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="开票抬头" prop="invoice_title" show-overflow-tooltip />
<el-table-column label="开票金额(元)" prop="amount" show-overflow-tooltip />
<el-table-column label="开票类型" prop="invoice_type_text" show-overflow-tooltip />
<el-table-column label="发票状态" prop="check_status_text" show-overflow-tooltip />
<el-table-column label="申请人" prop="user_name" show-overflow-tooltip />
<el-table-column label="所属部门" prop="dept_name" show-overflow-tooltip />
<el-table-column label="申请时间" prop="create_time" show-overflow-tooltip />
<el-table-column label="当前审核人" prop="check_admin_users" show-overflow-tooltip />
<el-table-column label="开票人" prop="open_admin_name" show-overflow-tooltip />
<el-table-column label="开票时间" prop="open_time" show-overflow-tooltip />
<el-table-column label="发票号码" prop="code" show-overflow-tooltip />
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="handDetail(row.id)">
详情
</el-button>
<el-button type="primary" link @click="form.id = row.id, showDialog = true">
开具发票
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<detailPopup v-if="showDetail" ref="detailRef" @success="showDetail = false, getLists()"
@close="showDetail = false, getLists()" />
<el-dialog v-model="showDialog" v-if="showDialog" width="550px" title="开具发票" @close="showDialog = false">
<el-form ref="formRef" :model="form" label-width="120px">
<el-form-item label="发票号码" prop="code">
<el-input v-model="form.code" clearable placeholder="请输入发票号码" />
</el-form-item>
<el-form-item label="发票开具时间" prop="open_time">
<el-date-picker class="flex-1 !flex" v-model="form.open_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择发票开具时间">
</el-date-picker>
</el-form-item>
<el-form-item label="快递单号" prop="delivery">
<el-input v-model="form.delivery" clearable placeholder="请输快递单号" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submit">确定</el-button>
<el-button @click="showDialog = false">取消</el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script lang="ts" setup name="oaSealCateLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import detailPopup from '@/views/oa_Initiate/detail.vue'
import { apiInvliceList2, apiInvliceDetail, apiInvliceInvoice } from '@/api/oa_financial'
const detailRef = ref(null)
//
const showDetail = ref(false)
const showDialog = ref(false)
//
const queryParams = reactive({
title: '',
status: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiInvliceList2,
params: queryParams
})
const handDetail = async (id: any) => {
let res = await apiInvliceDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
const form = reactive({
"id": '',
"code": "",
"open_time": "",
"delivery": ""
})
const submit = async () => {
// await apiInvliceInvoice({ ...form })
console.log(form)
showDialog.value = false
getLists()
}
getLists()
setTimeout(() => {
pager.lists.push({})
}, 2000);
</script>

View File

@ -41,9 +41,12 @@
<el-table-column label="打款确认时间" prop="" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="handDetail(row.id)">
<el-button link @click="handDetail(row.id)">
详情
</el-button>
<el-button type="primary" link @click="handPayment(row.id)">
设置打款
</el-button>
</template>
</el-table-column>
</el-table>
@ -60,7 +63,7 @@
<script lang="ts" setup name="oaPersonalQuitLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiExpenseList2, apiExpenseDetail } from '@/api/oa_financial'
import { apiExpenseList2, apiExpenseDetail, apiExpensePayment } from '@/api/oa_financial'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import detailPopup from './detail.vue'
@ -110,6 +113,13 @@ const handDetail = async (id: any) => {
detailRef.value?.setFormData(res)
}
const handPayment = async (id: any) => {
let res = await apiExpensePayment({ id })
getLists()
}
getLists()
</script>