|
|
@@ -109,7 +109,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
|
|
|
<el-button type="primary" @click="getPlatFormReceivableList">搜索</el-button>
|
|
|
- <el-button plain>重置</el-button>
|
|
|
+ <el-button plain @click="reset">重置</el-button>
|
|
|
<span class="icon_s">
|
|
|
<span @click="isTrue = !isTrue">高级搜索</span>
|
|
|
<el-icon class="is_icon" :class="{ 'is_down': isTrue }">
|
|
|
@@ -133,6 +133,9 @@
|
|
|
<div class="col-108 m-r-8">
|
|
|
<el-button class="radius-2px width-100" type="primary">批量结算</el-button>
|
|
|
</div>
|
|
|
+ <div class="col-108 m-r-8">
|
|
|
+ <el-button class="radius-2px width-100" type="primary" @click="dropdownCommand('删除')">删除</el-button>
|
|
|
+ </div>
|
|
|
<div class="col-108 m-r-8">
|
|
|
<el-button class="radius-2px width-100" type="primary" @click="exportPlatformReceivable">导出</el-button>
|
|
|
</div>
|
|
|
@@ -194,6 +197,7 @@
|
|
|
<el-table-column label="操作" width="120" fixed="right">
|
|
|
<template #default="scope">
|
|
|
<el-button link type="primary" @click="toEdit(scope.row)">编辑</el-button>
|
|
|
+ <el-button link type="primary" @click="toDelete([scope.row.id])">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -293,7 +297,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" style="display: flex; align-items: center; justify-content: flex-end">
|
|
|
<el-button type="primary">搜索</el-button>
|
|
|
- <el-button plain>重置</el-button>
|
|
|
+ <el-button plain @click="reset">重置</el-button>
|
|
|
<span class="icon_s">
|
|
|
<span @click="isTrue = !isTrue">高级搜索</span>
|
|
|
<el-icon class="is_icon" :class="{ 'is_down': isTrue }">
|
|
|
@@ -317,6 +321,9 @@
|
|
|
<div class="col-108 m-r-8">
|
|
|
<el-button class="radius-2px width-100" type="primary">批量结算</el-button>
|
|
|
</div>
|
|
|
+ <div class="col-108 m-r-8">
|
|
|
+ <el-button class="radius-2px width-100" type="primary" @click="dropdownCommand('删除')">删除</el-button>
|
|
|
+ </div>
|
|
|
<div class="col-108 m-r-8">
|
|
|
<el-button class="radius-2px width-100" type="primary" @click="exportPlatformReceivable">导出</el-button>
|
|
|
</div>
|
|
|
@@ -347,6 +354,7 @@
|
|
|
<el-table-column label="操作" width="120" fixed="right">
|
|
|
<template #default="scope">
|
|
|
<el-button link type="primary" @click="toEdit(scope.row)">编辑</el-button>
|
|
|
+ <el-button link type="primary" @click="toDelete([scope.row.id])">删除</el-button>
|
|
|
<el-dropdown class="width-100" trigger="click" placement="bottom" @command="dropdownCommand">
|
|
|
<el-button class="radius-2px width-100">
|
|
|
更多 <el-icon>
|
|
|
@@ -528,7 +536,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ElMessage } from "element-plus";
|
|
|
+import { ElMessage,ElMessageBox } from "element-plus";
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
|
import api from '@/api'
|
|
|
@@ -552,13 +560,37 @@ const handleTabsClick = (e) => {
|
|
|
let isTrue = ref(false)
|
|
|
let receivableForm = ref({})
|
|
|
|
|
|
-let option = ref([])
|
|
|
-const tableProps = ref({
|
|
|
- value: "id",
|
|
|
- label: "name",
|
|
|
- children: "children",
|
|
|
- checkStrictly: true,
|
|
|
-});
|
|
|
+const toDelete = (ids) => {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ '确定要删除吗',
|
|
|
+ '删除应收订单',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'error',
|
|
|
+ center: true,
|
|
|
+ confirmButtonClass: 'el-button--danger',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ api.financeApi.deleteIncomesByIds(ids).then((res: any) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ ElMessage.success('删除成功')
|
|
|
+ reset()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const reset = () => {
|
|
|
+ receivableForm.value = {}
|
|
|
+ pages.value = 1
|
|
|
+ size.value = 10
|
|
|
+ if (activeName.value == '1') {
|
|
|
+ getPlatFormReceivableList()
|
|
|
+ } else if (activeName.value == '2') {
|
|
|
+ getPlatformReceivableList()
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
let ReceiveDataRef1 = ref()
|
|
|
let ReceiveDataRef2 = ref()
|
|
|
@@ -611,6 +643,13 @@ const dropdownCommand = (e) => {
|
|
|
if (e === '数据导入') {
|
|
|
batchShow.value = true
|
|
|
}
|
|
|
+ if (e === '删除') {
|
|
|
+ if (selectedList.value.length === 0) {
|
|
|
+ ElMessage.warning('请选择删除的数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ toDelete(selectedList.value.map(item => item.id))
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
let total1 = ref(0)
|