|
@@ -1,23 +1,5 @@
|
|
|
<template>
|
|
|
<div class="cost_box">
|
|
|
- <div class="searchBox">
|
|
|
- <div class="form">
|
|
|
- <span class="formSpan">用款单号:</span>
|
|
|
- <el-input
|
|
|
- v-model="queryParams.useMoneyNo"
|
|
|
- placeholder="请输入用款单号"
|
|
|
- style="width: 210px"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="from">
|
|
|
- <div class="btnBox">
|
|
|
- <el-button type="primary" style="background: #3485ff" @click="searchHandle">
|
|
|
- <img src="@/assets/imgs/OA/search.png" class="mr-8px" alt="" />
|
|
|
- 查询</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
<div class="tableBox">
|
|
|
<div class="table" ref="tableRef">
|
|
|
<el-table
|
|
@@ -34,103 +16,70 @@
|
|
|
<template #default="scope">{{ scope.$index + 1 }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- :show-overflow-tooltip="true"
|
|
|
+ show-overflow-tooltip="true"
|
|
|
+ align="center"
|
|
|
prop="useMoneyNo"
|
|
|
label="用款单号"
|
|
|
- width="180"
|
|
|
/>
|
|
|
- <el-table-column prop="userNickname" label="申请人" width="120" />
|
|
|
- <el-table-column prop="deptName" label="申请部门" />
|
|
|
<el-table-column
|
|
|
+ align="center"
|
|
|
prop="applyTime"
|
|
|
:formatter="dateFormatter2"
|
|
|
label="申请时间"
|
|
|
- width="120"
|
|
|
/>
|
|
|
- <el-table-column prop="totalAmount" label="用款总金额" width="120" />
|
|
|
+ <el-table-column align="center" prop="totalAmount" label="用款总金额" />
|
|
|
+ <el-table-column
|
|
|
+ show-overflow-tooltip="true"
|
|
|
+ align="center"
|
|
|
+ prop="projectName"
|
|
|
+ label="项目名称"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ show-overflow-tooltip="true"
|
|
|
+ align="center"
|
|
|
+ prop="projectDeptName"
|
|
|
+ label="项目部门"
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
+ align="center"
|
|
|
prop="agreedPayTime"
|
|
|
:formatter="dateFormatter2"
|
|
|
label="约定付款期限"
|
|
|
- width="120"
|
|
|
/>
|
|
|
- <el-table-column prop="status" label="状态" align="center" width="120" />
|
|
|
- <el-table-column label="操作" fixed="right" align="center" width="120">
|
|
|
+ <el-table-column align="center" prop="status" label="状态" />
|
|
|
+ <el-table-column align="center" label="操作" width="80" fixed="right">
|
|
|
<template #default="scope">
|
|
|
<div class="operateBtn" @click="operateClick(scope.row)">
|
|
|
- <span style="color: #2e77e6; cursor: pointer">查看流程</span>
|
|
|
+ <span>查看</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
- <div class="pageBox">
|
|
|
- <el-pagination
|
|
|
- v-model:current-page="queryParams.pageNo"
|
|
|
- :page-size="10"
|
|
|
- background
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- />
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
-import moment from 'moment'
|
|
|
+import request from '@/config/axios'
|
|
|
import { dateFormatter2 } from '@/utils/formatTime'
|
|
|
-import * as UseMoneyApi from '@/api/oa/useMoney'
|
|
|
-import { getAssetURL } from '@/utils/auth'
|
|
|
|
|
|
defineOptions({ name: 'UseMoneyCost' })
|
|
|
|
|
|
const tableRef: any = ref(null)
|
|
|
const tableHeight: any = ref(0)
|
|
|
-const queryParams = reactive<{
|
|
|
- useMoneyNo: string
|
|
|
- totalAmount: string
|
|
|
- finishOn: string
|
|
|
- finishOff: string
|
|
|
- project: string[]
|
|
|
- pageNo: number
|
|
|
- pageSize: number
|
|
|
-}>({
|
|
|
- useMoneyNo: '',
|
|
|
- totalAmount: '',
|
|
|
- finishOn: '',
|
|
|
- finishOff: '',
|
|
|
- project: [],
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10
|
|
|
-})
|
|
|
-const handleCurrentChange = (pageNo: number) => {
|
|
|
- queryParams.pageNo = pageNo
|
|
|
- getListAjax()
|
|
|
-}
|
|
|
const tableData = ref<Array<any>>([])
|
|
|
-const total = ref<number>()
|
|
|
-const searchHandle: () => void = () => {
|
|
|
- getListAjax()
|
|
|
-}
|
|
|
|
|
|
-const loading = ref(true) // 列表的加载中
|
|
|
-const initDetailCoast = (projectIds: string[], countDate: string) => {
|
|
|
- queryParams.project = projectIds
|
|
|
- queryParams.finishOn = moment(countDate).startOf('months').format('YYYY-MM-DD')
|
|
|
- queryParams.finishOff = moment(countDate).endOf('months').format('YYYY-MM-DD')
|
|
|
- getListAjax()
|
|
|
+const initDetailCoast = (contractId: string) => {
|
|
|
+ getListAjax(contractId)
|
|
|
}
|
|
|
-const getListAjax = async (): Promise<void> => {
|
|
|
- loading.value = true
|
|
|
- try {
|
|
|
- const data = await UseMoneyApi.getUseMoneyPage(queryParams)
|
|
|
- tableData.value = data.list
|
|
|
- total.value = data.total
|
|
|
- } finally {
|
|
|
- loading.value = false
|
|
|
- }
|
|
|
+const getListAjax = async (contractId): Promise<void> => {
|
|
|
+ const urlApi = `/UseMoney/list-contractId?contractId=${contractId}`
|
|
|
+ const result = await request.get({ url: urlApi, data: null }, '/business')
|
|
|
+ tableData.value = result
|
|
|
}
|
|
|
+onMounted(() => {
|
|
|
+ tableHeight.value = tableRef.value.clientHeight
|
|
|
+})
|
|
|
const router = useRouter()
|
|
|
const operateClick = (row: any) => {
|
|
|
router.push({
|
|
@@ -143,9 +92,6 @@ const operateClick = (row: any) => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-onMounted(() => {
|
|
|
- tableHeight.value = tableRef.value.clientHeight
|
|
|
-})
|
|
|
defineExpose({
|
|
|
initDetailCoast
|
|
|
})
|
|
@@ -158,75 +104,14 @@ defineExpose({
|
|
|
border-radius: 20px;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- .oa-sys-top-search,
|
|
|
- .searchBox {
|
|
|
- display: flex;
|
|
|
- width: 100%;
|
|
|
- padding: 10px 30px;
|
|
|
- background: #eaf5fd;
|
|
|
- border-radius: 4px;
|
|
|
- box-sizing: border-box;
|
|
|
- align-items: center;
|
|
|
- flex-wrap: wrap;
|
|
|
-
|
|
|
- .form {
|
|
|
- display: flex;
|
|
|
- width: 240px;
|
|
|
- margin: 5px 0;
|
|
|
- margin-right: 16px;
|
|
|
- align-items: center;
|
|
|
- flex-shrink: 0;
|
|
|
-
|
|
|
- &.form-time-range {
|
|
|
- width: 380px;
|
|
|
- }
|
|
|
-
|
|
|
- :deep(.el-input) {
|
|
|
- width: 160px;
|
|
|
- }
|
|
|
-
|
|
|
- :deep(.el-table--default) {
|
|
|
- .el-table thead th {
|
|
|
- .cell {
|
|
|
- white-space: nowrap;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .el-table__cell {
|
|
|
- padding: 14px 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .formSpan {
|
|
|
- width: 80px;
|
|
|
- font-size: 16px;
|
|
|
- color: #505a69;
|
|
|
- white-space: nowrap;
|
|
|
- flex-shrink: 0;
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
-
|
|
|
- .btnBox {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
.tableBox {
|
|
|
position: relative;
|
|
|
width: 100%;
|
|
|
- height: calc(100% - 100px);
|
|
|
- margin-top: 20px;
|
|
|
+ height: 100%;
|
|
|
flex: 1;
|
|
|
> .table {
|
|
|
width: 100%;
|
|
|
}
|
|
|
- > .pageBox {
|
|
|
- margin-top: 20px;
|
|
|
- display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</style>
|