|
@@ -1,146 +1,36 @@
|
|
|
<template>
|
|
|
<div class="_ReturnMessageBox">
|
|
|
- <div class="cardBox">
|
|
|
- <div>
|
|
|
- <p class="title">年份</p>
|
|
|
- <p class="numberBox">
|
|
|
- <span class="value">{{ curYear }}</span>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <p class="value">{{ messageInfo['sign'] }}</p>
|
|
|
- <p class="title">已签(万元)</p>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <p class="value">{{ messageInfo['new'] }}</p>
|
|
|
- <p class="title">新开拓(万元)</p>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <p class="value">{{ messageInfo['return'] }}</p>
|
|
|
- <p class="title">回款(万元)</p>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <div class="tableBox">
|
|
|
- <div class="table" ref="tableRef">
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%; height: 100%"
|
|
|
- :style="{ height: tableHeight + 'px' }"
|
|
|
- :header-cell-style="{
|
|
|
- background: '#F7F8FA',
|
|
|
- color: '#121518',
|
|
|
- height: '50px'
|
|
|
- }"
|
|
|
- >
|
|
|
- <el-table-column label="序号" width="60">
|
|
|
- <template #default="scope">{{ scope.$index + 1 }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="messageContent" label="消息内容" width="1350" />
|
|
|
- <el-table-column prop="createTime" label="消息时间" width="240" />
|
|
|
- <el-table-column label="操作" width="80">
|
|
|
- <template #default="scope">
|
|
|
- <div class="operateBtn" @click="operateClick(scope.row)">
|
|
|
- <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>
|
|
|
+ <MessageTop
|
|
|
+ :signNum="messageInfo['sign']"
|
|
|
+ :newNum="messageInfo['new']"
|
|
|
+ :returnNum="messageInfo['return']"
|
|
|
+ :curYear="curYear"
|
|
|
+ :yearOnChange="yearOnChange"
|
|
|
+ />
|
|
|
+
|
|
|
+ <MessageTable api="/contract-message/page" messageType="manager" :curYear="curYear" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
-import moment from 'moment'
|
|
|
-import { useRouter } from 'vue-router'
|
|
|
-import request from '@/config/axios'
|
|
|
-import { getAssetURL } from '@/utils/auth'
|
|
|
-import { isSignListAll } from '@/utils/business'
|
|
|
-import { signWayAllList } from '@/utils/business'
|
|
|
-import { mainTypeAllList } from '@/utils/business'
|
|
|
-import { secondTypeAllList } from '@/utils/business'
|
|
|
-import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
|
|
+/**
|
|
|
+ * @description 我的回款消息
|
|
|
+ */
|
|
|
+import MessageTop from './MessageTop.vue'
|
|
|
+import MessageTable from './MessageTable.vue'
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
defineOptions({ name: 'ReturnMessage' })
|
|
|
-const curYear = new Date().getFullYear()
|
|
|
-const { wsCache } = useCache()
|
|
|
-const user = wsCache.get(CACHE_KEY.USER)
|
|
|
-const userId = user.user.id ? user.user.id : ''
|
|
|
-const router = useRouter()
|
|
|
-const tableRef: any = ref(null)
|
|
|
-const tableHeight: any = ref(0)
|
|
|
-const queryParams = reactive<{
|
|
|
- pageNo: number
|
|
|
- pageSize: number
|
|
|
- year: string
|
|
|
- managerId: string
|
|
|
-}>({
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- year: '',
|
|
|
- managerId: userId
|
|
|
-})
|
|
|
|
|
|
+const curYear: any = ref(new Date().getFullYear())
|
|
|
+const yearOnChange = (val) => {
|
|
|
+ curYear.value = dayjs(val).format('YYYY')
|
|
|
+}
|
|
|
const messageInfo = ref({
|
|
|
sign: 0,
|
|
|
new: 0,
|
|
|
return: 0
|
|
|
})
|
|
|
-
|
|
|
-const handleCurrentChange = (pageNo: number) => {
|
|
|
- queryParams.pageNo = pageNo
|
|
|
- queryContractListAjax()
|
|
|
-}
|
|
|
-const operateClick = (row: any) => {
|
|
|
- // router.push({
|
|
|
- // path: '/projectDetail',
|
|
|
- // query: { id: row.projectId, contractId: row.id }
|
|
|
- // })
|
|
|
-}
|
|
|
-const tableData = ref<Array<any>>([])
|
|
|
-const total = ref<number>()
|
|
|
-const searchHandle: () => void = () => {
|
|
|
- queryContractListAjax()
|
|
|
-}
|
|
|
-const queryContractListAjax = async (): Promise<void> => {
|
|
|
- const urlApi = `/contract-message/page`
|
|
|
- const sendData = {
|
|
|
- ...queryParams,
|
|
|
- pageSize: 10
|
|
|
- }
|
|
|
- const result = await request.get({ url: urlApi, params: sendData }, '/business')
|
|
|
- tableData.value = result['records']
|
|
|
- total.value = result['total']
|
|
|
-}
|
|
|
-queryContractListAjax()
|
|
|
-
|
|
|
-const filterNodeMethod = (value, data) => {
|
|
|
- return data.name.includes(value)
|
|
|
-}
|
|
|
-onMounted(() => {
|
|
|
- tableHeight.value = tableRef.value.clientHeight
|
|
|
-})
|
|
|
</script>
|
|
|
-<style lang="scss" scoped>
|
|
|
-@import url(./returnMessage.scss);
|
|
|
-._ReturnMessageBox {
|
|
|
- margin-top: 20px;
|
|
|
- height: calc(100% - 20px);
|
|
|
- background-color: #fff;
|
|
|
- border-radius: 20px;
|
|
|
- padding: 20px;
|
|
|
- position: relative;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
+<style scoped lang="scss">
|
|
|
+@import url(./index.scss);
|
|
|
</style>
|