This commit is contained in:
zmj 2024-03-28 11:10:41 +08:00
parent ec02682dab
commit 77e69e89cb
23 changed files with 783 additions and 219 deletions

View File

@ -0,0 +1,11 @@
import request from "@/utils/request";
// 财务管理--项目预算书列表
export function apiFinancialBudgetDocLists(params: any) {
return request.get({
url: "/financial.financial_budget_doc/income",
params,
});
}

View File

@ -0,0 +1,26 @@
import request from '@/utils/request'
// 财务管理--费用报销单列表
export function apiFinancialExpenseReimbursementLists(params: any) {
return request.get({ url: '/financial.financial_expense_reimbursement/lists', params })
}
// 添加财务管理--费用报销单
export function apiFinancialExpenseReimbursementAdd(params: any) {
return request.post({ url: '/financial.financial_expense_reimbursement/add', params })
}
// 编辑财务管理--费用报销单
export function apiFinancialExpenseReimbursementEdit(params: any) {
return request.post({ url: '/financial.financial_expense_reimbursement/edit', params })
}
// 删除财务管理--费用报销单
export function apiFinancialExpenseReimbursementDelete(params: any) {
return request.post({ url: '/financial.financial_expense_reimbursement/delete', params })
}
// 财务管理--费用报销单详情
export function apiFinancialExpenseReimbursementDetail(params: any) {
return request.get({ url: '/financial.financial_expense_reimbursement/detail', params })
}

View File

@ -0,0 +1,26 @@
import request from '@/utils/request'
// 财务管理--费用申请列表
export function apiFinancialFeeApplicationLists(params: any) {
return request.get({ url: '/financial.financial_fee_application/lists', params })
}
// 添加财务管理--费用申请
export function apiFinancialFeeApplicationAdd(params: any) {
return request.post({ url: '/financial.financial_fee_application/add', params })
}
// 编辑财务管理--费用申请
export function apiFinancialFeeApplicationEdit(params: any) {
return request.post({ url: '/financial.financial_fee_application/edit', params })
}
// 删除财务管理--费用申请
export function apiFinancialFeeApplicationDelete(params: any) {
return request.post({ url: '/financial.financial_fee_application/delete', params })
}
// 财务管理--费用申请详情
export function apiFinancialFeeApplicationDetail(params: any) {
return request.get({ url: '/financial.financial_fee_application/detail', params })
}

0
src/api/index Normal file
View File

View File

@ -29,7 +29,7 @@ const customList = reactive([
{
name: "项目总数",
value: 3,
url: "/construction/project/project_lists"
url: "/construction/project/project_list"
},
{
name: "项目跟进",

View File

@ -42,22 +42,6 @@
<el-table-column label="分项工程" prop="subentry_engineering" show-overflow-tooltip />
<el-table-column label="工序步骤" prop="process_step" show-overflow-tooltip />
<el-table-column label="质量控制点" prop="quality_control_points" show-overflow-tooltip />
<el-table-column label="图例说明" prop="file" show-overflow-tooltip>
<template #default="{ row }">
<div v-if="row.file && row.file.length > 0">
<!-- <div v-for="(item, i) in row.file " :key='i'>
<el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
</div> -->
<el-image style="width:50px;height:50px;" :src="row.file" />
</div>
<div v-else>
暂无文件
</div>
</template>
</el-table-column>
<el-table-column label="工序步骤号" prop="process_step_no" show-overflow-tooltip />
<el-table-column label="班组长" prop="project_member_name" show-overflow-tooltip />
<el-table-column label="施工人员" prop="work_user" show-overflow-tooltip />

View File

@ -1,21 +1,18 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
@close="handleClose">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="140px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="客户名称" prop="custom_id" @click="showDialog = true"
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
<el-input v-model="custom_name" readonly clearable placeholder="请选择客户"
:disabled="project" />
<el-input v-model="custom_name" readonly clearable placeholder="请选择客户" :disabled="project" />
</el-form-item> </el-col>
<el-col :span="8">
<el-form-item label="项目名称" prop="project_id" @click="tanchuan"
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
<el-input v-model="project_name" readonly clearable placeholder="请选择项目"
:disabled="project" />
<el-input v-model="project_name" readonly clearable placeholder="请选择项目" :disabled="project" />
</el-form-item></el-col>
<el-col :span="8">
<el-form-item label="项目编码">
@ -35,8 +32,8 @@
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
<el-select class="flex-1" v-model="formData.contract_type" clearable placeholder="请选择合同类型">
<el-option v-for="(item, index) in dictData.contract_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
<el-option v-for="(item, index) in dictData.contract_type" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item></el-col><el-col :span="8">
<el-form-item label="合同计价方式" prop="contract_pricing_method"

View File

@ -32,9 +32,9 @@
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" border >
<el-table :data="pager.lists" border>
<el-table-column label="合同名称" prop="contract_name" :render-header="pager.calcWidth" />
<el-table-column label="合同编号" prop="contract_num" :render-header="pager.calcWidth" />
<el-table-column label="合同编号" prop="contract_num" :render-header="pager.calcWidth" />
<el-table-column label="合同类型" prop="contract_type" show-overflow-tooltip width='90'>
<template #default="{ row }">
<dict-value :options="dictData.cost_contract_type" :value="row.contract_type" />
@ -49,9 +49,13 @@
<el-table-column label="合同签订金额" prop="money" show-overflow-tooltip width="120" />
<el-table-column label="甲方签约单位" prop="part_a" show-overflow-tooltip width="120" />
<el-table-column label="签订部门" prop="dept" show-overflow-tooltip width='90' />
<el-table-column label="已开票金额" prop="total_invoice_amount" show-overflow-tooltip width="100" />
<el-table-column label="已到账金额" prop="total_refund_amount" show-overflow-tooltip width="100" />
<el-table-column label="已结算金额" prop="total_settlement_amount" show-overflow-tooltip width="100" />
<el-table-column label="已开票金额" prop="total_invoice_amount" show-overflow-tooltip />
<el-table-column label="已到账金额" prop="total_refund_amount" show-overflow-tooltip />
<el-table-column label="已结算金额" prop="total_settlement_amount" show-overflow-tooltip />
<el-table-column label="未开票金额" prop="not_total_invoice_amount" show-overflow-tooltip />
<el-table-column label="未到账金额" prop="not_total_refund_amount" show-overflow-tooltip />
<el-table-column label="开票未回款金额" prop="invoice_not_refund_amount" show-overflow-tooltip />
<el-table-column label="回款未开票金额" prop="refund_not_invoice_amount" show-overflow-tooltip />
<el-table-column label="合同结算日期" prop="settlement_date" show-overflow-tooltip width="120" />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">

View File

@ -0,0 +1,95 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="合同名称" prop="contract_id">
<select-remote model="contract_id" :formData="queryParams"
:api="apiCostApprovedProjectSerch"></select-remote>
</el-form-item>
<el-form-item label="预算书编号">
<el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入预算书编号" />
</el-form-item>
<el-form-item label="预算书名称">
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入预算书名称" />
</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" border>
<el-table-column type="selection" width="55" />
<el-table-column label="合同名称" prop="contract_name" :render-header="pager.calcWidth" />
<el-table-column label="预算书名称" prop="name" :render-header="pager.calcWidth" />
<el-table-column label="预算书编号" prop="code" show-overflow-tooltip />
<el-table-column label="合同金额" prop="money" show-overflow-tooltip />
<el-table-column label="分成金额合计" prop="amount" show-overflow-tooltip />
<el-table-column label="累计金额结算" prop="settlement_amount" show-overflow-tooltip />
<el-table-column label="未结算金额" prop="not_settlement_amount" show-overflow-tooltip />
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
</div>
</template>
<script lang="ts" setup name="financialRefundLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialBudgetDocLists } from '@/api/financial_budget_doc_income'
import { apiCostApprovedProjectSerch } from "@/api/cost_approved_project";
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const detailRef = ref('')
//
const showEdit = ref(false)
const showDetail = ref(false)
//
const queryParams = reactive({
code: "",
name: "",
contract_id: ""
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiFinancialBudgetDocLists,
params: queryParams
})
//
const handleAdd = async () => {
showEdit.value = true
await nextTick()
editRef.value?.open('add')
}
getLists()
</script>

View File

@ -30,13 +30,16 @@
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table :data="pager.lists" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" />
<el-table-column label="合同名称" prop="contract_name" :render-header="pager.calcWidth" />
<el-table-column label="合同金额" prop="total_amount" width="150" />
<el-table-column label="预算书编号" prop="code" show-overflow-tooltip />
<el-table-column label="预算书名称" prop="name" show-overflow-tooltip />
<el-table-column label="下达日期" prop="issue_date" show-overflow-tooltip />
<el-table-column label="合同名称" prop="contract_name" />
<el-table-column label="合同类型" prop="contract_type_text" />
<el-table-column label="甲方签约单位" prop="part_a" />
<el-table-column label="合同金额" prop="money" width="150" />
<el-table-column label="预计分成金额" prop="total_amount" width="150" />
<el-table-column label="操作" fixed="right">
<template #default="{ row }">
<el-button v-perms="['financial.financial_budget_doc/edit']" type="primary" link

View File

@ -26,7 +26,7 @@
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table :data="pager.lists" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" />
<el-table-column label="预算书编号" prop="budget_doc_code" show-overflow-tooltip />
<el-table-column label="预算书名称" prop="budget_doc_name" show-overflow-tooltip />

View File

@ -0,0 +1,185 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="合同id" prop="contract_id">
<el-input v-model="formData.contract_id" clearable placeholder="请输入合同id" />
</el-form-item>
<el-form-item label="费用申请id" prop="fee_application_id">
<el-input v-model="formData.fee_application_id" clearable placeholder="请输入费用申请id" />
</el-form-item>
<el-form-item label="单据主题" prop="theme">
<el-input v-model="formData.theme" clearable placeholder="请输入单据主题" />
</el-form-item>
<el-form-item label="单据编号" prop="code">
<el-input v-model="formData.code" clearable placeholder="请输入单据编号" />
</el-form-item>
<el-form-item label="单据张数" prop="bill_num">
<el-input v-model="formData.bill_num" clearable placeholder="请输入单据张数" />
</el-form-item>
<el-form-item label="支付方式" prop="pay_type">
<el-input v-model="formData.pay_type" clearable placeholder="请输入支付方式" />
</el-form-item>
<el-form-item label="事由" prop="content">
<el-input v-model="formData.content" clearable placeholder="请输入事由" />
</el-form-item>
<el-form-item label="附件" prop="annex">
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
</el-form-item>
<el-form-item label="申请人员" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入申请人员" />
</el-form-item>
<el-form-item label="报销日期" prop="create_time">
<el-input v-model="formData.create_time" clearable placeholder="请输入报销日期" />
</el-form-item>
</el-form>
</popup>
</div>
</template>
<script lang="ts" setup name="financialExpenseReimbursementEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiFinancialExpenseReimbursementAdd, apiFinancialExpenseReimbursementEdit, apiFinancialExpenseReimbursementDetail } from '@/api/financial_expense_reimbursement'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
}
})
const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const mode = ref('add')
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑财务管理--费用报销单' : '新增财务管理--费用报销单'
})
//
const formData = reactive({
id: '',
contract_id: '',
fee_application_id: '',
theme: '',
code: '',
bill_num: '',
pay_type: '',
content: '',
annex: '',
create_user: '',
create_time: '',
})
//
const formRules = reactive<any>({
contract_id: [{
required: true,
message: '请输入合同id',
trigger: ['blur']
}],
fee_application_id: [{
required: true,
message: '请输入费用申请id',
trigger: ['blur']
}],
theme: [{
required: true,
message: '请输入单据主题',
trigger: ['blur']
}],
code: [{
required: true,
message: '请输入单据编号',
trigger: ['blur']
}],
bill_num: [{
required: true,
message: '请输入单据张数',
trigger: ['blur']
}],
pay_type: [{
required: true,
message: '请输入支付方式',
trigger: ['blur']
}],
content: [{
required: true,
message: '请输入事由',
trigger: ['blur']
}],
create_user: [{
required: true,
message: '请输入申请人员',
trigger: ['blur']
}],
create_time: [{
required: true,
message: '请输入报销日期',
trigger: ['blur']
}]
})
//
const setFormData = async (data: Record<any, any>) => {
for (const key in formData) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
}
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiFinancialExpenseReimbursementDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiFinancialExpenseReimbursementEdit(data)
: await apiFinancialExpenseReimbursementAdd(data)
popupRef.value?.close()
emit('success')
}
//
const open = (type = 'add') => {
mode.value = type
popupRef.value?.open()
}
//
const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,
getDetail
})
</script>

View File

@ -0,0 +1,153 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form-item label="合同id" prop="contract_id">
<el-input class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请输入合同id" />
</el-form-item>
<el-form-item label="费用申请id" prop="fee_application_id">
<el-input class="w-[280px]" v-model="queryParams.fee_application_id" clearable placeholder="请输入费用申请id" />
</el-form-item>
<el-form-item label="单据主题" prop="theme">
<el-input class="w-[280px]" v-model="queryParams.theme" clearable placeholder="请输入单据主题" />
</el-form-item>
<el-form-item label="单据编号" prop="code">
<el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入单据编号" />
</el-form-item>
<el-form-item label="支付方式" prop="pay_type">
<el-input class="w-[280px]" v-model="queryParams.pay_type" clearable placeholder="请输入支付方式" />
</el-form-item>
<el-form-item label="申请人员" prop="create_user">
<el-input class="w-[280px]" v-model="queryParams.create_user" clearable placeholder="请输入申请人员" />
</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="['financial.financial_expense_reimbursement/add']" type="primary" @click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button
v-perms="['financial.financial_expense_reimbursement/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="合同id" prop="contract_id" show-overflow-tooltip />
<el-table-column label="费用申请id" prop="fee_application_id" show-overflow-tooltip />
<el-table-column label="单据主题" prop="theme" show-overflow-tooltip />
<el-table-column label="单据编号" prop="code" show-overflow-tooltip />
<el-table-column label="单据张数" prop="bill_num" show-overflow-tooltip />
<el-table-column label="支付方式" prop="pay_type" show-overflow-tooltip />
<el-table-column label="事由" prop="content" show-overflow-tooltip />
<el-table-column label="申请人员" prop="create_user" show-overflow-tooltip />
<el-table-column label="报销日期" prop="create_time" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['financial.financial_expense_reimbursement/edit']"
type="primary"
link
@click="handleEdit(row)"
>
编辑
</el-button>
<el-button
v-perms="['financial.financial_expense_reimbursement/delete']"
type="danger"
link
@click="handleDelete(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" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
</div>
</template>
<script lang="ts" setup name="financialExpenseReimbursementLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialExpenseReimbursementLists, apiFinancialExpenseReimbursementDelete } from '@/api/financial_expense_reimbursement'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
//
const queryParams = reactive({
contract_id: '',
fee_application_id: '',
theme: '',
code: '',
pay_type: '',
create_user: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiFinancialExpenseReimbursementLists,
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 handleDelete = async (id: number | any[]) => {
await feedback.confirm('确定要删除?')
await apiFinancialExpenseReimbursementDelete({ id })
getLists()
}
getLists()
</script>

View File

@ -1,34 +1,41 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="合同id" prop="contract_id">
<el-input v-model="formData.contract_id" clearable placeholder="请输入合同id" />
<el-form-item label="单据主题" prop="theme">
<el-input v-model="formData.theme" clearable placeholder="请输入单据主题" />
</el-form-item>
<el-form-item label="开票id" prop="invoice_id">
<el-input v-model="formData.invoice_id" clearable placeholder="请输入开票id" />
<el-form-item label="单据编号" prop="code">
<el-input v-model="formData.code" clearable placeholder="请输入单据编号" />
</el-form-item>
<el-form-item label="本次到账金额" prop="amount">
<el-input v-model="formData.amount" clearable placeholder="请输入本次到账金额" />
<el-form-item label="借款天数" prop="days">
<el-input v-model="formData.days" clearable placeholder="请输入借款天数" />
</el-form-item>
<el-form-item label="到账日期" prop="date">
<el-input v-model="formData.date" clearable placeholder="请输入到账日期" />
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
</el-form-item>
<el-form-item label="说明" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入说明" />
<el-form-item label="申请人" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入申请人" />
</el-form-item>
<el-form-item label="登记人" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入登记人" />
<el-form-item label="申请日期" prop="create_time">
<el-input v-model="formData.create_time" clearable placeholder="请输入申请日期" />
</el-form-item>
</el-form>
</popup>
</div>
</template>
<script lang="ts" setup name="financialRefundEdit">
<script lang="ts" setup name="financialFeeApplicationEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiFinancialRefundAdd, apiFinancialRefundEdit, apiFinancialRefundDetail } from '@/api/financial_refund'
import { apiFinancialFeeApplicationAdd, apiFinancialFeeApplicationEdit, apiFinancialFeeApplicationDetail } from '@/api/financial_fee_application'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
defineProps({
@ -45,51 +52,46 @@ const mode = ref('add')
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑财务管理--合同台账' : '新增财务管理--合同台账'
return mode.value == 'edit' ? '编辑财务管理--费用申请' : '新增财务管理--费用申请'
})
//
const formData = reactive({
id: '',
contract_id: '',
invoice_id: '',
amount: '',
date: '',
theme: '',
code: '',
days: '',
remark: '',
create_user: '',
create_time: '',
})
//
const formRules = reactive<any>({
contract_id: [{
theme: [{
required: true,
message: '请输入合同id',
message: '请输入单据主题',
trigger: ['blur']
}],
invoice_id: [{
code: [{
required: true,
message: '请输入开票id',
message: '请输入单据编号',
trigger: ['blur']
}],
amount: [{
days: [{
required: true,
message: '请输入本次到账金额',
trigger: ['blur']
}],
date: [{
required: true,
message: '请输入到账日期',
trigger: ['blur']
}],
remark: [{
required: true,
message: '请输入说明',
message: '请输入借款天数',
trigger: ['blur']
}],
create_user: [{
required: true,
message: '请输入登记人',
message: '请输入申请人',
trigger: ['blur']
}],
create_time: [{
required: true,
message: '请输入申请日期',
trigger: ['blur']
}]
})
@ -103,12 +105,12 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiFinancialRefundDetail({
const data = await apiFinancialFeeApplicationDetail({
id: row.id
})
setFormData(data)
@ -118,10 +120,10 @@ const getDetail = async (row: Record<string, any>) => {
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiFinancialRefundEdit(data)
: await apiFinancialRefundAdd(data)
const data = { ...formData, }
mode.value == 'edit'
? await apiFinancialFeeApplicationEdit(data)
: await apiFinancialFeeApplicationAdd(data)
popupRef.value?.close()
emit('success')
}

View File

@ -0,0 +1,142 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form-item label="单据主题" prop="theme">
<el-input class="w-[280px]" v-model="queryParams.theme" clearable placeholder="请输入单据主题" />
</el-form-item>
<el-form-item label="单据编号" prop="code">
<el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入单据编号" />
</el-form-item>
<el-form-item label="申请人" prop="create_user">
<el-input class="w-[280px]" v-model="queryParams.create_user" clearable placeholder="请输入申请人" />
</el-form-item>
<el-form-item label="申请日期" prop="create_time">
<el-input class="w-[280px]" v-model="queryParams.create_time" clearable placeholder="请输入申请日期" />
</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="['financial.financial_fee_application/add']" type="primary" @click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button
v-perms="['financial.financial_fee_application/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="theme" show-overflow-tooltip />
<el-table-column label="单据编号" prop="code" show-overflow-tooltip />
<el-table-column label="借款天数" prop="days" show-overflow-tooltip />
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
<el-table-column label="申请人" prop="create_user" show-overflow-tooltip />
<el-table-column label="申请日期" prop="create_time" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['financial.financial_fee_application/edit']"
type="primary"
link
@click="handleEdit(row)"
>
编辑
</el-button>
<el-button
v-perms="['financial.financial_fee_application/delete']"
type="danger"
link
@click="handleDelete(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" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
</div>
</template>
<script lang="ts" setup name="financialFeeApplicationLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialFeeApplicationLists, apiFinancialFeeApplicationDelete } from '@/api/financial_fee_application'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
//
const queryParams = reactive({
theme: '',
code: '',
create_user: '',
create_time: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiFinancialFeeApplicationLists,
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 handleDelete = async (id: number | any[]) => {
await feedback.confirm('确定要删除?')
await apiFinancialFeeApplicationDelete({ id })
getLists()
}
getLists()
</script>

View File

@ -1,21 +1,20 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
@close="handleClose">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="120px">
<el-col>
<el-row>
<el-col :span="8">
<el-form-item label="审批流名称" prop="name">
<el-input v-model="formData.name" clearable placeholder="请输入审批流名称" />
<el-form-item label="审批流名称" prop="name">
<el-input v-model="formData.name" clearable placeholder="请输入审批流名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审批分类">
<el-select class="flex-1" v-model="formData.flow_type" clearable placeholder="请选择所属分类"
@change="getFlowTypeList">
<el-option v-for="(item, index) in dictData.flow_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
<el-option v-for="(item, index) in dictData.flow_type" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
@ -40,8 +39,7 @@
<el-col :span="8">
<el-form-item label="状态" prop="status" v-if="mode == 'edit'">
<el-radio-group v-model="formData.status" placeholder="请选择状态">
<el-radio v-for="(item, index) in dictData.flow_type_status" :key="index"
:label="(item.value)">
<el-radio v-for="(item, index) in dictData.flow_type_status" :key="index" :label="(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
@ -77,26 +75,25 @@
<el-button type="primary" @click="openDialog(index)">
选择人员
</el-button>
<el-button @click="formData.flow_list.splice(index, 1)" class="ml-[5px]">
删除
</el-button>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button @click="formData.flow_list.splice(index, 1)">
删除
</el-button>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item>
<el-button type="primary" @click="
formData.flow_list.push(
{
flow_step: '',
flow_user: []
}
)
">其他联系人</el-button>
formData.flow_list.push(
{
flow_step: '',
flow_user: []
}
)
">其他联系人</el-button>
</el-form-item>
</el-col>
</p>
@ -134,15 +131,15 @@
</el-col>
</el-row>
<el-col :span="24">
<el-form-item >
<el-form-item>
<el-button type="primary" @click="
formData.flow_list.push(
{
flow_step: '',
flow_user: []
}
)
">其他联系人</el-button>
formData.flow_list.push(
{
flow_step: '',
flow_user: []
}
)
">其他联系人</el-button>
</el-form-item>
</el-col>
</p>
@ -242,7 +239,7 @@ const setRules = () => {
ruleList.forEach(item => {
formRules[item] = {
required: true,
message: "请输入审批流名称",
message: "请输入审批流名称",
trigger: ["blur"]
}
})

View File

@ -34,7 +34,7 @@
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column label="审批流名称" prop="name" show-overflow-tooltip />
<el-table-column label="审批流名称" prop="name" show-overflow-tooltip />
<el-table-column label="审批类型" prop="flow_cate" show-overflow-tooltip />
<el-table-column label="审批流类型" prop="check_type" show-overflow-tooltip />
<el-table-column label="流程说明" prop="remark" show-overflow-tooltip />

View File

@ -56,18 +56,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="附件">
<div v-if="formDataannex && formDataannex.length > 0">
<div v-for="(item, index) in formDataannex"
style="margin-left: 5px;display: block;">
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
:href="item.uri" target="_blank">{{ item.name }}</a>
<span style="cursor: pointer;margin-left: 5px;"
@click="delFileFn(index)">x</span>
</div>
</div>
<div>暂无附件</div>
<annexLink :annex="formData.annex"></annexLink>
</el-form-item>
</el-col>
</el-row>

View File

@ -1,8 +1,7 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
@close="handleClose">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
@ -19,8 +18,6 @@
</el-col>
<el-col :span="8">
<el-form-item label="材料中类" prop="second_level">
<el-select class="flex-1" v-model="formData.second_level" clearable placeholder="请选择材料中类"
@change="secondChange">
<el-option v-for="(item, index) in secondList" :key="index" :label="item.name"
@ -31,7 +28,6 @@
<el-col :span="8">
<el-form-item label="材料小类" prop="three_level">
<!-- <el-input v-model="formData.three_level" clearable placeholder="材料小类" /> -->
<el-select class="flex-1" v-model="formData.three_level" clearable placeholder="请选择材料小类">
<el-option v-for="(item, index) in threedList" :key="index" :label="item.name"
:value="item.id" />
@ -42,7 +38,7 @@
<el-col :span="8">
<el-form-item label="材料编码" prop="code"
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
<el-input v-model="formData.code" clearable placeholder="请输入材料编码" />
<el-input v-model="formData.code" clearable placeholder="请输入材料编码" v-type="'code'" />
</el-form-item>
</el-col>
@ -71,12 +67,12 @@
<el-col :span="8">
<el-form-item label="单位" prop="unit"
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
<el-input v-model="formData.unit" clearable placeholder="请输入单位" />
<el-input v-model="formData.unit" clearable placeholder="请输入单位" v-type="'unit'" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="安全库存量" prop="inventory">
<el-input v-model="formData.inventory" clearable placeholder="请输入安全库存量" />
<el-input v-model="formData.inventory" clearable placeholder="请输入安全库存量" type="number" />
</el-form-item>
</el-col>
@ -91,37 +87,20 @@
<el-col :span="24">
<el-form-item label="附件">
<el-upload
accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv"
class="upload-demo" :show-file-list="false" aria-hidden="true"
:headers="{ Token: userStore.token }" :action="base_url + '/upload/file'"
:on-success="handleAvatarSuccess_four" ref="upload">
<el-button type="primary">
上传
</el-button>
</el-upload>
<div>
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
:href="item.uri" target="_blank">{{ item.name }}</a>
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
</div>
</div>
<uploadAnnex :formData="formData"></uploadAnnex>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="销售指导价" prop="sales_price">
<el-input v-model="formData.sales_price" clearable placeholder="请输入销售指导价" />
<el-input v-model="formData.sales_price" clearable placeholder="请输入销售指导价" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预算成本价" prop="cost_price">
<el-input v-model="formData.cost_price" clearable placeholder="请输入预算成本价" />
<el-input v-model="formData.cost_price" clearable placeholder="请输入预算成本价" type="number" />
</el-form-item>
</el-col>
@ -162,21 +141,7 @@ const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const mode = ref('add')
//
const handleAvatarSuccess_four = (
response,
uploadFile
) => {
if (response.code == 0) {
ElMessage.error(response.msg);
return;
}
formDataannex.push(
{ uri: response.data.uri, name: response.data.name }
);
};
//
const firstChange = (e: any) => {
apimaterialDatas({ page_no: 1, page_size: 9999, pid: e }).then((res) => {
@ -230,17 +195,6 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
if (data.annex && data.annex.length > 0) {
const arry1 = data.annex.map((item: any, index: any) => {
return {
name: `文件${index + 1}`,
uri: item
};
});
Object.assign(formDataannex, arry1)
}
if (data.first_level) {
firstChange(data.first_level)
@ -263,12 +217,7 @@ const getDetail = async (row: Record<string, any>) => {
//
const handleSubmit = async () => {
formData.annex = formDataannex.map((item: any) => item.uri)
await formRef.value?.validate()
const data = { ...formData }
mode.value == 'edit'
? await materialEdit(data)

View File

@ -6,8 +6,14 @@
<el-descriptions :column="3" title="费用报销详情" border>
<el-descriptions-item :label="item.lable" label-align="left" align="left" label-class-name="my-label"
v-for="(item, index) in descriptionList" :key="index">
{{ item.value.length > 1 ? formData[item.value[0]][item.value[1]] : formData[item.value[0]] }}
<span v-if="item.lable != '附件'"> {{ item.value.length > 1 ? formData[item.value[0]][item.value[1]] :
formData[item.value[0]]
}}</span>
<span v-else> <el-link class="m-2" v-for="item in formData.annex" :href="item.uri" target="_blank"
type='primary'>{{ item.name }}</el-link>
</span>
</el-descriptions-item>
</el-descriptions>
</el-card>
@ -116,6 +122,10 @@ const descriptionList = reactive([
lable: "备注",
value: ['remark']
},
{
lable: "附件",
value: ['Annex']
},
])
const emit = defineEmits(['success', 'close'])

View File

@ -22,12 +22,13 @@
<el-col :span="8" v-if="formData.reimbursement_type.includes('1')">
<el-form-item label="借款单号">
<el-input v-model="formData.loan_apply_code" clearable placeholder="点击选择" readonly
@click="showDialog1 = true" />
@click="showDialog1 = true" v-type="'code'" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="formData.reimbursement_type.includes('1')">
<el-form-item label="冲抵借款金额" prop="offset_loan_amount">
<el-input v-model="formData.offset_loan_amount" clearable placeholder="请输入冲抵借款金额" />
<el-input v-model="formData.offset_loan_amount" clearable placeholder="请输入冲抵借款金额"
type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -68,24 +69,24 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="账户编码" prop="bank_account_id">
<el-form-item label="账户编码">
<el-input v-model="formData.bank_account.account_sn" clearable placeholder="点击选择银行" readonly
@click="showDialog2 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户银行">
<el-input v-model="formData.bank_account.deposit_bank" clearable readonly />
<el-input v-model="formData.bank_account.deposit_bank" disabled placeholder="系统自动获取" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户名称">
<el-input v-model="formData.bank_account.account_name" clearable readonly />
<el-input v-model="formData.bank_account.account_name" disabled placeholder="系统自动获取" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户账号">
<el-input v-model="formData.bank_account.account" clearable readonly />
<el-input v-model="formData.bank_account.account" disabled placeholder="系统自动获取" />
</el-form-item>
</el-col>
</el-row>
@ -144,7 +145,7 @@
<el-table-column label="发票号">
<template #default="{ row }"> <el-input v-model="row.invoice_sn" type="number" />
<template #default="{ row }"> <el-input v-model="row.invoice_sn" v-type="'code'" />
</template></el-table-column>
<el-table-column label="发票税率">
@ -167,7 +168,7 @@
<el-table-column label="发票金额" prop="remark">
<template #default="{ row }">
<el-input v-model="row.invoice_amount" />
<el-input v-model="row.invoice_amount" type="number" />
</template>
</el-table-column>
<el-table-column label="发票附件" prop="remark">
@ -185,8 +186,10 @@
<div>
<div v-for="(item, index) in scope.row.annex"
style="margin-left: 5px;display: block;">
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
:href="item.uri" target="_blank">{{ item.name }}</a>
<!-- <a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
:href="item.uri" target="_blank">{{ item.name }}</a> -->
<el-link type="primary" :href="item.uri" target="_blank">{{
itme.name }}</el-link>
<span style="cursor: pointer;margin-left: 5px;"
@click="scope.row.annex.splice(index, 1)">x</span>
</div>

View File

@ -25,7 +25,7 @@
<el-input v-model="formData.payee_bank" clearable placeholder="请输入收款银行" />
</el-form-item>
<el-form-item label="收款账号" prop="payee_account">
<el-input v-model="formData.payee_account" clearable placeholder="请输入收款账号" />
<el-input v-model="formData.payee_account" clearable placeholder="请输入收款账号" type="number" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />

View File

@ -27,7 +27,8 @@
</el-col>
<el-col :span="8" v-if="formData.reimbursement_type.includes('1')">
<el-form-item label="冲抵借款金额" prop="offset_loan_amount">
<el-input v-model="formData.offset_loan_amount" clearable placeholder="请输入冲抵借款金额" />
<el-input v-model="formData.offset_loan_amount" clearable placeholder="请输入冲抵借款金额"
type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -59,7 +60,7 @@
<el-col :span="8">
<el-form-item label="收款账号" prop="payee_account">
<el-input v-model="formData.payee_account" clearable placeholder="请输入收款账号" />
<el-input v-model="formData.payee_account" clearable placeholder="请输入收款账号" type="number" />
</el-form-item>
</el-col>
@ -72,17 +73,17 @@
<el-col :span="8">
<el-form-item label="开户银行" prop="bank_account_id">
<el-input v-model="formData.bank_account.deposit_bank" clearable readonly />
<el-input v-model="formData.bank_account.deposit_bank" disabled placeholder="系统自动获取" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户名称" prop="bank_account_id">
<el-input v-model="formData.bank_account.account_name" clearable readonly />
<el-input v-model="formData.bank_account.account_name" disabled placeholder="系统自动获取" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户账号" prop="bank_account_id">
<el-input v-model="formData.bank_account.account" clearable readonly />
<el-input v-model="formData.bank_account.account" disabled placeholder="系统自动获取" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -181,7 +182,7 @@
</el-table-column>
<el-table-column label="发票编号">
<template #default="{ row }"> <el-input v-model="row.invoice_sn" type="number" />
<template #default="{ row }"> <el-input v-model="row.invoice_sn" v-type="'code'" />
</template></el-table-column>
<el-table-column label="发票税率">
@ -222,8 +223,8 @@
<div>
<div v-for="(item, index) in scope.row.annex"
style="margin-left: 5px;display: block;">
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
:href="item.uri" target="_blank">{{ item.name }}</a>
<el-link type="primary" :href="item.uri" target="_blank">{{
item.name }}</el-link>
<span style="cursor: pointer;margin-left: 5px;"
@click="scope.row.annex.splice(index, 1)">x</span>
</div>
@ -256,10 +257,6 @@
<el-dialog v-model="showDialog3" title="选择科目" width="70%">
<projectcostTemLists @customEvent="customEvent3"></projectcostTemLists>
</el-dialog>
<!-- <el-dialog v-model="showDialog4" title="选择科目" width="70%">
<projectTripApply @customEvent="customEvent3"></projectTripApply>
</el-dialog> -->
</popup>
</div>
</template>
@ -267,7 +264,7 @@
<script lang="ts" setup name="projectTravelReimbursementEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
// import projectTripApply from '@/components/project_trip_apply.vue'
import { cloneDeep } from 'lodash'
import { apiProjectTravelReimbursementAdd, apiProjectTravelReimbursementEdit, apiProjectTravelReimbursementDetail } from '@/api/project_travel_reimbursement'
import type { PropType } from 'vue'
import projectTripApply from "@/components/project_trip_apply/index.vue"
@ -344,9 +341,9 @@ const popupTitle = computed(() => {
const formData = reactive({
id: '',
project_id: "",
"trip_apply_id": "", //id
"trip_apply_code": "", //id
"reimbursement_type": [], //
"trip_apply_id": "",
"trip_apply_code": "",
"reimbursement_type": [],
"loan_apply_id": "", //id
"loan_apply_code": "", //id
"offset_loan_amount": "", //
@ -395,15 +392,7 @@ const formData = reactive({
// },
})
//
const handleAvatarSuccess_four = (response: any) => {
// @ts-ignore
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
};
//
const delFileFn = (index: number) => {
formData.annex.splice(index, 1)
}
const invoiceIndex = ref(0)
//
const handleAvatarSuccess_four1 = (response: any) => {
@ -541,9 +530,8 @@ const getDetail = async (row: Record<string, any>) => {
//
const handleSubmit = async () => {
await formRef.value?.validate()
formData.reimbursement_type = formData.reimbursement_type.join(',')
formData.annex.length ? "" : formData.annex = []
const data = { ...formData, }
const data = cloneDeep({ ...formData, })
data.reimbursement_type = data.reimbursement_type.join(',')
mode.value == 'edit'
? await apiProjectTravelReimbursementEdit(data)
: await apiProjectTravelReimbursementAdd(data)