68
68
:formatter =" dateFormatter"
69
69
width =" 180px"
70
70
/>
71
- <el-table-column label =" 操作" align =" center" width =" 130px" >
72
- <template #default =" scope " >
73
- <el-button
74
- link
75
- type =" primary"
76
- @click =" openForm('update', scope.row.id)"
77
- v-hasPermi =" ['crm:receivable-plan:update']"
78
- >
79
- 编辑
80
- </el-button >
81
- <el-button
82
- link
83
- type =" danger"
84
- @click =" handleDelete(scope.row.id)"
85
- v-hasPermi =" ['crm:receivable-plan:delete']"
86
- >
87
- 删除
88
- </el-button >
89
- </template >
90
- </el-table-column >
91
71
</el-table >
92
72
<!-- 分页 -->
93
73
<Pagination
102
82
<script setup lang="ts" name="RemindReceivables">
103
83
import { DICT_TYPE } from ' @/utils/dict'
104
84
import { dateFormatter , dateFormatter2 } from ' @/utils/formatTime'
105
- import download from ' @/utils/download'
106
85
import * as ReceivablePlanApi from ' @/api/crm/receivable/plan'
107
86
import * as UserApi from ' @/api/system/user'
108
87
import { RECEIVABLE_REMIND_TYPE } from ' ./common'
109
88
110
89
defineOptions ({ name: ' ReceivablePlan' })
111
90
112
- const message = useMessage () // 消息弹窗
113
- const { t } = useI18n () // 国际化
114
-
115
91
const loading = ref (true ) // 列表的加载中
116
92
const total = ref (0 ) // 列表的总页数
117
93
const list = ref ([]) // 列表的数据
@@ -122,7 +98,6 @@ const queryParams = reactive({
122
98
remindType: 1
123
99
})
124
100
const queryFormRef = ref () // 搜索的表单
125
- const exportLoading = ref (false ) // 导出的加载中
126
101
127
102
/** 查询列表 */
128
103
const getList = async () => {
@@ -142,46 +117,6 @@ const handleQuery = () => {
142
117
getList ()
143
118
}
144
119
145
- /** 重置按钮操作 */
146
- const resetQuery = () => {
147
- queryFormRef .value .resetFields ()
148
- handleQuery ()
149
- }
150
-
151
- /** 添加/修改操作 */
152
- const formRef = ref ()
153
- const openForm = (type : string , id ? : number ) => {
154
- formRef .value .open (type , id )
155
- }
156
-
157
- /** 删除按钮操作 */
158
- const handleDelete = async (id : number ) => {
159
- try {
160
- // 删除的二次确认
161
- await message .delConfirm ()
162
- // 发起删除
163
- await ReceivablePlanApi .deleteReceivablePlan (id )
164
- message .success (t (' common.delSuccess' ))
165
- // 刷新列表
166
- await getList ()
167
- } catch {}
168
- }
169
-
170
- /** 导出按钮操作 */
171
- const handleExport = async () => {
172
- try {
173
- // 导出的二次确认
174
- await message .exportConfirm ()
175
- // 发起导出
176
- exportLoading .value = true
177
- const data = await ReceivablePlanApi .exportReceivablePlan (queryParams )
178
- download .excel (data , ' 回款计划.xls' )
179
- } catch {
180
- } finally {
181
- exportLoading .value = false
182
- }
183
- }
184
-
185
120
/** 初始化 **/
186
121
onMounted (async () => {
187
122
await getList ()
0 commit comments