fix : 修复分摊汇总及编辑功能
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
// import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import { ElNotification} from "element-plus";
|
||||
import {deleteAllocation} from "@/api/expense-manage";
|
||||
|
||||
const router = useRouter();
|
||||
const searchConfig = reactive([
|
||||
@@ -22,7 +24,7 @@ const searchConfig = reactive([
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
}
|
||||
},{
|
||||
}, {
|
||||
label: '分摊月份',
|
||||
prop: 'apportionmentMonth',
|
||||
component: 'el-date-picker',
|
||||
@@ -78,7 +80,7 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state == undefined||row.state == 0) {
|
||||
if (row.state == undefined || row.state == 0) {
|
||||
return '--'
|
||||
} else {
|
||||
return (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||
@@ -93,7 +95,7 @@ const tableConfig = reactive({
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
let buttons
|
||||
if(row.buttons){
|
||||
if (row.buttons) {
|
||||
buttons = new Set(Array.from(row.buttons))
|
||||
}
|
||||
if (buttons.has("details")) {
|
||||
@@ -124,10 +126,10 @@ const tableConfig = reactive({
|
||||
}
|
||||
{
|
||||
buttons.has("delete") ?
|
||||
<popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'}
|
||||
<popover-delete name={row.shareName} type={'费用分摊'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/>
|
||||
: ''
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
@@ -155,7 +157,7 @@ const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Share/detail',
|
||||
query: {
|
||||
id:row.allocationId
|
||||
id: row.allocationId
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -163,10 +165,22 @@ const handleEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Share/edit',
|
||||
query: {
|
||||
id:row.allocationId
|
||||
id: row.allocationId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDelete = (row) => {
|
||||
deleteAllocation(row.allocationId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
});
|
||||
}
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
|
||||
Reference in New Issue
Block a user