fix: 智聪记账管理,部分功能新增复制功能,时间默认当前日期。
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
<div class="content-con" v-loading="loading" height="calc(100% - 0.65rem)">
|
||||
<el-table v-loading="loading" :data="accountDealRecordList" @selection-change="handleSelectionChange" height="calc(100% - 0.65rem)">
|
||||
<el-table-column label="账户名称" align="center" width="200" prop="accountName" />
|
||||
<el-table-column label="记账类型" align="center" prop="type">
|
||||
<el-table-column label="记账类型" align="center" width="180" prop="type">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="account_type" :value="scope.row.type" />
|
||||
</template>
|
||||
@@ -57,14 +57,14 @@
|
||||
<dict-tag :options="deal_type" :value="scope.row.dealType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易类别" align="center" prop="dealCategory">
|
||||
<el-table-column label="交易类别" align="center" width="180" prop="dealCategory">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="deal_category" :value="scope.row.dealCategory" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易子类别" align="center" prop="childCategoryName" />
|
||||
<el-table-column label="备注" align="center" width="350" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="交易子类别" align="center" width="150" prop="childCategoryName" />
|
||||
<el-table-column label="备注" align="center" width="180" prop="remark" />
|
||||
<el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<div class="ctrl-btn d-flex">
|
||||
<el-tooltip v-for="item in operateList" :key="item.id" class="item" effect="dark" :content="item.title" placement="top">
|
||||
@@ -159,6 +159,7 @@ const currentBalanceShow = ref(false)
|
||||
const operateList = ref([
|
||||
{ id: 'view', icon: 'View', title: '查看', hasPermi: ['invest:accountDealRecord:query'] },
|
||||
{ id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['invest:accountDealRecord:edit'] },
|
||||
{ id: 'copy', icon: 'Link', title: '复制', hasPermi: ['invest:accountDealRecord:edit'] },
|
||||
{ id: 'delete', icon: 'Delete', title: '删除', hasPermi: ['invest:accountDealRecord:remove'] }
|
||||
])
|
||||
const data = reactive({
|
||||
@@ -217,6 +218,9 @@ const handleOperate = (operate, row) => {
|
||||
case 'delete':
|
||||
handleDelete(row)
|
||||
break
|
||||
case 'copy':
|
||||
handleCopy(row)
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -340,6 +344,7 @@ function handleAdd() {
|
||||
currentBalanceShow.value = false
|
||||
queryAddAccountParams.value.type = ''
|
||||
getAddAccountList()
|
||||
form.value.createTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
|
||||
open.value = true
|
||||
title.value = '添加账户交易记录'
|
||||
}
|
||||
@@ -359,7 +364,26 @@ function handleUpdate(row) {
|
||||
} else {
|
||||
childCategoryShow.value = false
|
||||
}
|
||||
title.value = '修改账户交易记录'
|
||||
title.value = '复制账户交易记录'
|
||||
})
|
||||
}
|
||||
/** 复制按钮操作 */
|
||||
function handleCopy(row) {
|
||||
reset()
|
||||
currentBalanceShow.value = true
|
||||
queryAddAccountParams.value.type = ''
|
||||
getAddAccountList()
|
||||
const _id = row.id || ids.value
|
||||
getAccountDealRecord(_id).then((response) => {
|
||||
form.value = response.data
|
||||
open.value = true
|
||||
form.value.createTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
|
||||
if (form.value.dealCategory == '1') {
|
||||
childCategoryShow.value = true
|
||||
} else {
|
||||
childCategoryShow.value = false
|
||||
}
|
||||
title.value = '复制账户交易记录'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user