|
| 1 | +<!-- 待审核回款 --> |
| 2 | +<template> |
| 3 | + <ContentWrap> |
| 4 | + <div class="pb-5 text-xl"> 待审核回款 </div> |
| 5 | + <!-- 搜索工作栏 --> |
| 6 | + <el-form |
| 7 | + class="-mb-15px" |
| 8 | + :model="queryParams" |
| 9 | + ref="queryFormRef" |
| 10 | + :inline="true" |
| 11 | + label-width="68px" |
| 12 | + > |
| 13 | + <el-form-item label="合同状态" prop="auditStatus"> |
| 14 | + <el-select |
| 15 | + v-model="queryParams.auditStatus" |
| 16 | + class="!w-240px" |
| 17 | + placeholder="状态" |
| 18 | + @change="handleQuery" |
| 19 | + > |
| 20 | + <el-option |
| 21 | + v-for="(option, index) in AUDIT_STATUS" |
| 22 | + :label="option.label" |
| 23 | + :value="option.value" |
| 24 | + :key="index" |
| 25 | + /> |
| 26 | + </el-select> |
| 27 | + </el-form-item> |
| 28 | + </el-form> |
| 29 | + </ContentWrap> |
| 30 | + <!-- 列表 --> |
| 31 | + <ContentWrap> |
| 32 | + <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> |
| 33 | + <el-table-column align="center" fixed="left" label="回款编号" prop="no" width="180"> |
| 34 | + <template #default="scope"> |
| 35 | + <el-link :underline="false" type="primary" @click="openDetail(scope.row.id)"> |
| 36 | + {{ scope.row.no }} |
| 37 | + </el-link> |
| 38 | + </template> |
| 39 | + </el-table-column> |
| 40 | + <el-table-column align="center" label="客户名称" prop="customerName" width="120"> |
| 41 | + <template #default="scope"> |
| 42 | + <el-link |
| 43 | + :underline="false" |
| 44 | + type="primary" |
| 45 | + @click="openCustomerDetail(scope.row.customerId)" |
| 46 | + > |
| 47 | + {{ scope.row.customerName }} |
| 48 | + </el-link> |
| 49 | + </template> |
| 50 | + </el-table-column> |
| 51 | + <el-table-column align="center" label="合同编号" prop="contractNo" width="180"> |
| 52 | + <template #default="scope"> |
| 53 | + <el-link |
| 54 | + :underline="false" |
| 55 | + type="primary" |
| 56 | + @click="openContractDetail(scope.row.contractId)" |
| 57 | + > |
| 58 | + {{ scope.row.contract.no }} |
| 59 | + </el-link> |
| 60 | + </template> |
| 61 | + </el-table-column> |
| 62 | + <el-table-column |
| 63 | + :formatter="dateFormatter2" |
| 64 | + align="center" |
| 65 | + label="回款日期" |
| 66 | + prop="returnTime" |
| 67 | + width="150px" |
| 68 | + /> |
| 69 | + <el-table-column |
| 70 | + align="center" |
| 71 | + label="回款金额(元)" |
| 72 | + prop="price" |
| 73 | + width="140" |
| 74 | + :formatter="erpPriceTableColumnFormatter" |
| 75 | + /> |
| 76 | + <el-table-column align="center" label="回款方式" prop="returnType" width="130px"> |
| 77 | + <template #default="scope"> |
| 78 | + <dict-tag :type="DICT_TYPE.CRM_RECEIVABLE_RETURN_TYPE" :value="scope.row.returnType" /> |
| 79 | + </template> |
| 80 | + </el-table-column> |
| 81 | + <el-table-column align="center" label="备注" prop="remark" width="200" /> |
| 82 | + <el-table-column |
| 83 | + align="center" |
| 84 | + label="合同金额(元)" |
| 85 | + prop="contract.totalPrice" |
| 86 | + width="140" |
| 87 | + :formatter="erpPriceTableColumnFormatter" |
| 88 | + /> |
| 89 | + <el-table-column align="center" label="负责人" prop="ownerUserName" width="120" /> |
| 90 | + <el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" /> |
| 91 | + <el-table-column |
| 92 | + :formatter="dateFormatter" |
| 93 | + align="center" |
| 94 | + label="更新时间" |
| 95 | + prop="updateTime" |
| 96 | + width="180px" |
| 97 | + /> |
| 98 | + <el-table-column |
| 99 | + :formatter="dateFormatter" |
| 100 | + align="center" |
| 101 | + label="创建时间" |
| 102 | + prop="createTime" |
| 103 | + width="180px" |
| 104 | + /> |
| 105 | + <el-table-column align="center" label="创建人" prop="creatorName" width="120" /> |
| 106 | + <el-table-column align="center" fixed="right" label="回款状态" prop="auditStatus" width="120"> |
| 107 | + <template #default="scope"> |
| 108 | + <dict-tag :type="DICT_TYPE.CRM_AUDIT_STATUS" :value="scope.row.auditStatus" /> |
| 109 | + </template> |
| 110 | + </el-table-column> |
| 111 | + <el-table-column align="center" fixed="right" label="操作" width="180px"> |
| 112 | + <template #default="scope"> |
| 113 | + <el-button |
| 114 | + v-hasPermi="['crm:receivable:update']" |
| 115 | + link |
| 116 | + type="primary" |
| 117 | + @click="handleProcessDetail(scope.row)" |
| 118 | + > |
| 119 | + 查看审批 |
| 120 | + </el-button> |
| 121 | + </template> |
| 122 | + </el-table-column> |
| 123 | + </el-table> |
| 124 | + <!-- 分页 --> |
| 125 | + <Pagination |
| 126 | + :total="total" |
| 127 | + v-model:page="queryParams.pageNo" |
| 128 | + v-model:limit="queryParams.pageSize" |
| 129 | + @pagination="getList" |
| 130 | + /> |
| 131 | + </ContentWrap> |
| 132 | +</template> |
| 133 | + |
| 134 | +<script setup lang="ts"> |
| 135 | +import { DICT_TYPE } from '@/utils/dict' |
| 136 | +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' |
| 137 | +import * as ReceivableApi from '@/api/crm/receivable' |
| 138 | +import { AUDIT_STATUS } from './common' |
| 139 | +import { erpPriceTableColumnFormatter } from '@/utils' |
| 140 | +
|
| 141 | +defineOptions({ name: 'CrmReceivableAuditList' }) |
| 142 | +
|
| 143 | +const loading = ref(true) // 列表的加载中 |
| 144 | +const total = ref(0) // 列表的总页数 |
| 145 | +const list = ref([]) // 列表的数据 |
| 146 | +const queryParams = reactive({ |
| 147 | + pageNo: 1, |
| 148 | + pageSize: 10, |
| 149 | + auditStatus: 10 |
| 150 | +}) |
| 151 | +const queryFormRef = ref() // 搜索的表单 |
| 152 | +
|
| 153 | +/** 查询列表 */ |
| 154 | +const getList = async () => { |
| 155 | + loading.value = true |
| 156 | + try { |
| 157 | + const data = await ReceivableApi.getReceivablePage(queryParams) |
| 158 | + list.value = data.list |
| 159 | + total.value = data.total |
| 160 | + } finally { |
| 161 | + loading.value = false |
| 162 | + } |
| 163 | +} |
| 164 | +
|
| 165 | +/** 搜索按钮操作 */ |
| 166 | +const handleQuery = () => { |
| 167 | + queryParams.pageNo = 1 |
| 168 | + getList() |
| 169 | +} |
| 170 | +
|
| 171 | +/** 查看审批 */ |
| 172 | +const handleProcessDetail = (row: ReceivableApi.ReceivableVO) => { |
| 173 | + push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } }) |
| 174 | +} |
| 175 | +
|
| 176 | +/** 打开回款详情 */ |
| 177 | +const { push } = useRouter() |
| 178 | +const openDetail = (id: number) => { |
| 179 | + push({ name: 'CrmReceivableDetail', params: { id } }) |
| 180 | +} |
| 181 | +
|
| 182 | +/** 打开客户详情 */ |
| 183 | +const openCustomerDetail = (id: number) => { |
| 184 | + push({ name: 'CrmCustomerDetail', params: { id } }) |
| 185 | +} |
| 186 | +
|
| 187 | +/** 打开合同详情 */ |
| 188 | +const openContractDetail = (id: number) => { |
| 189 | + push({ name: 'CrmContractDetail', params: { id } }) |
| 190 | +} |
| 191 | +
|
| 192 | +/** 激活时 */ |
| 193 | +onActivated(async () => { |
| 194 | + await getList() |
| 195 | +}) |
| 196 | +
|
| 197 | +/** 初始化 **/ |
| 198 | +onMounted(() => { |
| 199 | + getList() |
| 200 | +}) |
| 201 | +</script> |
0 commit comments