|
@@ -5,7 +5,15 @@ import { ToolbarConfigType } from '@/components/AToolbar/type'
|
|
import { ColumnConfigType } from '@/components/ATable/type'
|
|
import { ColumnConfigType } from '@/components/ATable/type'
|
|
import { StrAnyObj, StrAnyObjArr } from '@/typings'
|
|
import { StrAnyObj, StrAnyObjArr } from '@/typings'
|
|
import { useHandleData } from '@/utils/useHandleData'
|
|
import { useHandleData } from '@/utils/useHandleData'
|
|
-import { getPageApi, getDetailApi, addApi, editApi, deleteApi } from '@/api/business/contract/fundReceived'
|
|
|
|
|
|
+import {
|
|
|
|
+ getPageApi,
|
|
|
|
+ getDetailApi,
|
|
|
|
+ addApi,
|
|
|
|
+ editApi,
|
|
|
|
+ deleteApi,
|
|
|
|
+ confirmArrivalAccountApi
|
|
|
|
+} from '@/api/business/contract/fundReceived'
|
|
|
|
+import {getPageApi as getCapitalAccountPageApi} from "@/api/business/capital/account";
|
|
|
|
|
|
const queryRef = ref<InstanceType<typeof AForm>>()
|
|
const queryRef = ref<InstanceType<typeof AForm>>()
|
|
const formRef = ref<InstanceType<typeof AForm>>()
|
|
const formRef = ref<InstanceType<typeof AForm>>()
|
|
@@ -24,49 +32,15 @@ const dialogVisible = ref<boolean>(false)
|
|
const queryConfig: FormConfigType[] = [
|
|
const queryConfig: FormConfigType[] = [
|
|
{
|
|
{
|
|
type: 'input',
|
|
type: 'input',
|
|
- prop: 'contractId',
|
|
|
|
- label: '合同id'
|
|
|
|
|
|
+ prop: 'contractNo',
|
|
|
|
+ label: '合同'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- type: 'input',
|
|
|
|
- prop: 'receivedAmount',
|
|
|
|
- label: '到账金额'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'capitalAccountId',
|
|
|
|
- label: '资金账号id'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
|
|
+ type: 'select',
|
|
prop: 'hasReceived',
|
|
prop: 'hasReceived',
|
|
- label: '是否到账'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'receivedTime',
|
|
|
|
- label: '到账时间'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'remark',
|
|
|
|
- label: '备注'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'createTime',
|
|
|
|
- label: '创建时间'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'updateTime',
|
|
|
|
- label: '更新时间'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'updateUser',
|
|
|
|
- label: '更新人'
|
|
|
|
- },
|
|
|
|
|
|
+ label: '是否到账',
|
|
|
|
+ dict: 'yes_no'
|
|
|
|
+ }
|
|
]
|
|
]
|
|
|
|
|
|
const toolbarConfig: ToolbarConfigType[] = [
|
|
const toolbarConfig: ToolbarConfigType[] = [
|
|
@@ -83,41 +57,26 @@ const toolbarConfig: ToolbarConfigType[] = [
|
|
queryRef.value?.resetFields()
|
|
queryRef.value?.resetFields()
|
|
getPage()
|
|
getPage()
|
|
}
|
|
}
|
|
- },
|
|
|
|
- {
|
|
|
|
- common: 'add',
|
|
|
|
- click() {
|
|
|
|
- dialogVisible.value = true
|
|
|
|
- dialogTitle.value = '新增'
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- common: 'delete',
|
|
|
|
- disabled() {
|
|
|
|
- return selectKeys.value.length == 0
|
|
|
|
- },
|
|
|
|
- click() {
|
|
|
|
- handleRemove(selectKeys.value)
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
|
|
const columnConfig: ColumnConfigType[] = [
|
|
const columnConfig: ColumnConfigType[] = [
|
|
{
|
|
{
|
|
- prop: 'contractId',
|
|
|
|
- label: '合同id'
|
|
|
|
|
|
+ prop: 'contractNo',
|
|
|
|
+ label: '合同'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: 'receivedAmount',
|
|
prop: 'receivedAmount',
|
|
label: '到账金额'
|
|
label: '到账金额'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'capitalAccountId',
|
|
|
|
- label: '资金账号id'
|
|
|
|
|
|
+ prop: 'hasReceived',
|
|
|
|
+ label: '是否到账',
|
|
|
|
+ dict: 'yes_no'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'hasReceived',
|
|
|
|
- label: '是否到账'
|
|
|
|
|
|
+ prop: 'accountAlias',
|
|
|
|
+ label: '资金账号'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: 'receivedTime',
|
|
prop: 'receivedTime',
|
|
@@ -128,35 +87,20 @@ const columnConfig: ColumnConfigType[] = [
|
|
label: '备注'
|
|
label: '备注'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'createTime',
|
|
|
|
- label: '创建时间'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- prop: 'updateTime',
|
|
|
|
- label: '更新时间'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- prop: 'updateUser',
|
|
|
|
- label: '更新人'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- width: 250,
|
|
|
|
|
|
+ width: 180,
|
|
handleConfig: [
|
|
handleConfig: [
|
|
{
|
|
{
|
|
- common: 'update',
|
|
|
|
|
|
+ if: (row) => {
|
|
|
|
+ return row.hasReceived == 0
|
|
|
|
+ },
|
|
|
|
+ text: '确认到账',
|
|
click(row) {
|
|
click(row) {
|
|
dialogVisible.value = true
|
|
dialogVisible.value = true
|
|
- dialogTitle.value = '编辑'
|
|
|
|
|
|
+ dialogTitle.value = '确认到账'
|
|
getDetailApi({ id: row.id }).then((resp: StrAnyObj) => {
|
|
getDetailApi({ id: row.id }).then((resp: StrAnyObj) => {
|
|
formData.value = resp
|
|
formData.value = resp
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- },
|
|
|
|
- {
|
|
|
|
- common: 'delete',
|
|
|
|
- click(row) {
|
|
|
|
- handleRemove([row.id])
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
@@ -165,58 +109,45 @@ const columnConfig: ColumnConfigType[] = [
|
|
const formConfig: FormConfigType[] = [
|
|
const formConfig: FormConfigType[] = [
|
|
{
|
|
{
|
|
type: 'input',
|
|
type: 'input',
|
|
- prop: 'contractId',
|
|
|
|
- label: '合同id',
|
|
|
|
- rule: [{ required: true, message: '合同id不能为空', trigger: 'blur' }]
|
|
|
|
|
|
+ prop: 'contractNo',
|
|
|
|
+ label: '合同',
|
|
|
|
+ disabled: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'input',
|
|
type: 'input',
|
|
prop: 'receivedAmount',
|
|
prop: 'receivedAmount',
|
|
label: '到账金额',
|
|
label: '到账金额',
|
|
- rule: [{ required: true, message: '到账金额不能为空', trigger: 'blur' }]
|
|
|
|
|
|
+ disabled: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- type: 'input',
|
|
|
|
|
|
+ type: 'select',
|
|
prop: 'capitalAccountId',
|
|
prop: 'capitalAccountId',
|
|
- label: '资金账号id',
|
|
|
|
- rule: [{ required: true, message: '资金账号id不能为空', trigger: 'blur' }]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'hasReceived',
|
|
|
|
- label: '是否到账',
|
|
|
|
- rule: [{ required: true, message: '是否到账不能为空', trigger: 'blur' }]
|
|
|
|
|
|
+ label: '资金账号',
|
|
|
|
+ keyName: 'id',
|
|
|
|
+ labelName: 'accountAlias',
|
|
|
|
+ async option() {
|
|
|
|
+ const data = await getCapitalAccountPageApi({ searchAll: true })
|
|
|
|
+ return data.records
|
|
|
|
+ },
|
|
|
|
+ rule: [{ required: true, message: '资金账号不能为空', trigger: 'blur' }]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- type: 'input',
|
|
|
|
|
|
+ type: 'datePicker',
|
|
prop: 'receivedTime',
|
|
prop: 'receivedTime',
|
|
label: '到账时间',
|
|
label: '到账时间',
|
|
|
|
+ datePickerType: 'datetime',
|
|
|
|
+ format: 'YYYY-MM-DD hh:mm:ss',
|
|
|
|
+ valueFormat: 'YYYY-MM-DD hh:mm:ss',
|
|
rule: [{ required: true, message: '到账时间不能为空', trigger: 'blur' }]
|
|
rule: [{ required: true, message: '到账时间不能为空', trigger: 'blur' }]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'input',
|
|
type: 'input',
|
|
|
|
+ itemType: 'textarea',
|
|
prop: 'remark',
|
|
prop: 'remark',
|
|
label: '备注',
|
|
label: '备注',
|
|
- rule: [{ required: true, message: '备注不能为空', trigger: 'blur' }]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'createTime',
|
|
|
|
- label: '创建时间',
|
|
|
|
- rule: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'updateTime',
|
|
|
|
- label: '更新时间',
|
|
|
|
- rule: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'input',
|
|
|
|
- prop: 'updateUser',
|
|
|
|
- label: '更新人',
|
|
|
|
- rule: [{ required: true, message: '更新人不能为空', trigger: 'blur' }]
|
|
|
|
- },
|
|
|
|
|
|
+ rows: 3,
|
|
|
|
+ span: 24
|
|
|
|
+ }
|
|
]
|
|
]
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -236,34 +167,17 @@ function tableSelectionChange(item: StrAnyObjArr) {
|
|
|
|
|
|
function formSubmit() {
|
|
function formSubmit() {
|
|
formRef.value?.validate(() => {
|
|
formRef.value?.validate(() => {
|
|
- if (formData.value.id) {
|
|
|
|
- editApi(formData.value).then(() => {
|
|
|
|
- dialogVisible.value = false
|
|
|
|
- ElMessage.success('修改成功')
|
|
|
|
- getPage()
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- addApi(formData.value).then(() => {
|
|
|
|
- dialogVisible.value = false
|
|
|
|
- ElMessage.success('新增成功')
|
|
|
|
- getPage()
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ confirmArrivalAccountApi(formData.value).then(() => {
|
|
|
|
+ dialogVisible.value = false
|
|
|
|
+ ElMessage.success('确认成功')
|
|
|
|
+ getPage()
|
|
|
|
+ })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
function formClosed() {
|
|
function formClosed() {
|
|
formRef.value?.resetFields()
|
|
formRef.value?.resetFields()
|
|
}
|
|
}
|
|
-
|
|
|
|
-function handleRemove(idList: string[]) {
|
|
|
|
- useHandleData('是否确认删除?', () => {
|
|
|
|
- deleteApi({ idList }).then(() => {
|
|
|
|
- ElMessage.success('删除成功')
|
|
|
|
- getPage()
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -273,7 +187,6 @@ function handleRemove(idList: string[]) {
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
<a-table
|
|
<a-table
|
|
- selection
|
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
:page-total="pageTotal"
|
|
:page-total="pageTotal"
|
|
:toolbar-config="toolbarConfig"
|
|
:toolbar-config="toolbarConfig"
|