2024-03-26 11:50:41 +08:00
|
|
|
<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_name">
|
|
|
|
<el-input class="w-[280px]" v-model="queryParams.contract_name" clearable placeholder="请输入合同名称" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="合同编号" prop="contract_num">
|
|
|
|
<el-input class="w-[280px]" v-model="queryParams.contract_num" clearable placeholder="请输入合同编号" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="甲方单位" prop="part_b">
|
|
|
|
<el-input class="w-[280px]" v-model="queryParams.part_b" clearable placeholder="请输入甲方单位" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="合同类型" prop="contract_type">
|
|
|
|
<el-input class="w-[280px]" v-model="queryParams.contract_type" 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">
|
2024-03-26 13:45:16 +08:00
|
|
|
<!-- <el-button v-perms="['financial.financial_refund/add']" type="primary" @click="handleAdd">
|
2024-03-26 11:50:41 +08:00
|
|
|
<template #icon>
|
|
|
|
<icon name="el-icon-Plus" />
|
|
|
|
</template>
|
|
|
|
新增
|
2024-03-26 13:45:16 +08:00
|
|
|
</el-button> -->
|
2024-03-26 11:50:41 +08:00
|
|
|
<el-button v-perms="['financial.financial_refund/delete']" :disabled="!selectData.length"
|
|
|
|
@click="handleDelete(selectData)">
|
|
|
|
删除
|
|
|
|
</el-button>
|
|
|
|
<div class="mt-4">
|
|
|
|
<el-table :data="pager.lists">
|
|
|
|
<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_type" show-overflow-tooltip>
|
|
|
|
<template #default="{ row }">
|
|
|
|
<dict-value :options="dictData.cost_contract_type" :value="row.contract_type" />
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="业务性质" prop="business_nature" show-overflow-tooltip>
|
|
|
|
<template #default="{ row }">
|
|
|
|
<dict-value :options="dictData.cost_consultation_business_nature"
|
|
|
|
:value="row.business_nature" />
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<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 />
|
|
|
|
<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="settlement_date" show-overflow-tooltip width="120" />
|
|
|
|
<el-table-column label="操作" width="120" fixed="right">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<el-button v-perms="['financial.financial_refund/edit']" type="primary" link
|
|
|
|
@click="handleEdit(row)">
|
|
|
|
编辑
|
|
|
|
</el-button>
|
|
|
|
<el-button v-perms="['financial.financial_refund/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="financialRefundLists">
|
|
|
|
import { usePaging } from '@/hooks/usePaging'
|
|
|
|
import { useDictData } from '@/hooks/useDictOptions'
|
|
|
|
import { apiContractLedgerLists } from '@/api/contract_ledger'
|
|
|
|
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_name: "",
|
|
|
|
contract_name: '',
|
|
|
|
part_b: '',
|
|
|
|
contract_type: '',
|
|
|
|
})
|
|
|
|
|
|
|
|
// 选中数据
|
|
|
|
const selectData = ref<any[]>([])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取字典数据
|
|
|
|
const { dictData } = useDictData('cost_consultation_business_nature,cost_contract_type')
|
|
|
|
|
|
|
|
// 分页相关
|
|
|
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
|
|
|
fetchFun: apiContractLedgerLists,
|
|
|
|
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 apiFinancialRefundDelete({ id })
|
|
|
|
// getLists()
|
|
|
|
// }
|
|
|
|
|
|
|
|
getLists()
|
|
|
|
</script>
|
|
|
|
|