|
@@ -1,20 +1,13 @@
|
|
|
<script setup lang="ts">
|
|
|
import AForm from '@/components/AForm/index.vue'
|
|
|
-import { FormConfigType } from '@/components/AForm/type'
|
|
|
-import { ToolbarConfigType } from '@/components/AToolbar/type'
|
|
|
-import { ColumnConfigType } from '@/components/ATable/type'
|
|
|
-import { StrAnyObj, StrAnyObjArr } from '@/typings'
|
|
|
-import { useHandleData } from '@/utils/useHandleData'
|
|
|
-import {
|
|
|
- getPageApi,
|
|
|
- getDetailApi,
|
|
|
- addApi,
|
|
|
- editApi,
|
|
|
- deleteApi,
|
|
|
- confirmArrivalAccountApi
|
|
|
-} from '@/api/business/contract/fundReceived'
|
|
|
-import { getPageApi as getCapitalAccountPageApi } from '@/api/business/capital/account'
|
|
|
+import {FormConfigType} from '@/components/AForm/type'
|
|
|
+import {ToolbarConfigType} from '@/components/AToolbar/type'
|
|
|
+import {ColumnConfigType} from '@/components/ATable/type'
|
|
|
+import {StrAnyObj, StrAnyObjArr} from '@/typings'
|
|
|
+import {confirmArrivalAccountApi, getDetailApi, getPageApi} from '@/api/business/contract/fundReceived'
|
|
|
+import {getPageApi as getCapitalAccountPageApi} from '@/api/business/capital/account'
|
|
|
import Detail from '@/views/business/contract/info/detail.vue'
|
|
|
+import {getPageApi as getContractPageApi} from "@/api/business/contract/info";
|
|
|
|
|
|
const queryRef = ref<InstanceType<typeof AForm>>()
|
|
|
const formRef = ref<InstanceType<typeof AForm>>()
|
|
@@ -23,7 +16,7 @@ const showQuery = ref<boolean>(true)
|
|
|
const selectKeys = ref<string[]>([])
|
|
|
const pageTotal = ref<number>(0)
|
|
|
|
|
|
-const queryData = ref<StrAnyObj>({ pageNum: 1, pageSize: 10 })
|
|
|
+const queryData = ref<StrAnyObj>({pageNum: 1, pageSize: 10})
|
|
|
const tableData = ref<StrAnyObjArr>([])
|
|
|
const formData = ref<StrAnyObj>({})
|
|
|
|
|
@@ -40,7 +33,7 @@ const queryConfig: FormConfigType[] = [
|
|
|
{
|
|
|
type: 'select',
|
|
|
prop: 'hasReceived',
|
|
|
- label: '是否到账',
|
|
|
+ label: '是否认领',
|
|
|
dict: 'yes_no'
|
|
|
}
|
|
|
]
|
|
@@ -73,7 +66,7 @@ const columnConfig: ColumnConfigType[] = [
|
|
|
},
|
|
|
{
|
|
|
prop: 'hasReceived',
|
|
|
- label: '是否到账',
|
|
|
+ label: '是否认领',
|
|
|
dict: 'yes_no'
|
|
|
},
|
|
|
{
|
|
@@ -95,11 +88,11 @@ const columnConfig: ColumnConfigType[] = [
|
|
|
if: (row) => {
|
|
|
return row.hasReceived == 0
|
|
|
},
|
|
|
- text: '确认到账',
|
|
|
+ text: '到账认领',
|
|
|
click(row) {
|
|
|
dialogVisible.value = true
|
|
|
- dialogTitle.value = '确认到账'
|
|
|
- getDetailApi({ id: row.id }).then((resp: StrAnyObj) => {
|
|
|
+ dialogTitle.value = '到账认领'
|
|
|
+ getDetailApi({id: row.id}).then((resp: StrAnyObj) => {
|
|
|
formData.value = resp
|
|
|
})
|
|
|
}
|
|
@@ -110,10 +103,23 @@ const columnConfig: ColumnConfigType[] = [
|
|
|
|
|
|
const formConfig: FormConfigType[] = [
|
|
|
{
|
|
|
- type: 'input',
|
|
|
- prop: 'contractNo',
|
|
|
+ type: 'select',
|
|
|
label: '合同',
|
|
|
- disabled: true
|
|
|
+ prop: 'contractId',
|
|
|
+ option: () => {
|
|
|
+ return getContractPageApi({searchAll: true}).then((res: StrAnyObjArr) => {
|
|
|
+ if (res.records && res.records.length > 0) {
|
|
|
+ return res.records.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.contractNo,
|
|
|
+ key: item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
type: 'input',
|
|
@@ -127,11 +133,12 @@ const formConfig: FormConfigType[] = [
|
|
|
label: '资金账号',
|
|
|
keyName: 'id',
|
|
|
labelName: 'accountAlias',
|
|
|
+ disabled: true,
|
|
|
async option() {
|
|
|
- const data = await getCapitalAccountPageApi({ searchAll: true })
|
|
|
+ const data = await getCapitalAccountPageApi({searchAll: true})
|
|
|
return data.records
|
|
|
},
|
|
|
- rule: [{ required: true, message: '资金账号不能为空', trigger: 'blur' }]
|
|
|
+ rule: [{required: true, message: '资金账号不能为空', trigger: 'blur'}]
|
|
|
},
|
|
|
{
|
|
|
type: 'datePicker',
|
|
@@ -140,7 +147,8 @@ const formConfig: FormConfigType[] = [
|
|
|
datePickerType: 'datetime',
|
|
|
format: 'YYYY-MM-DD hh:mm:ss',
|
|
|
valueFormat: 'YYYY-MM-DD hh:mm:ss',
|
|
|
- rule: [{ required: true, message: '到账时间不能为空', trigger: 'blur' }]
|
|
|
+ disabled: true,
|
|
|
+ rule: [{required: true, message: '到账时间不能为空', trigger: 'blur'}]
|
|
|
},
|
|
|
{
|
|
|
type: 'input',
|
|
@@ -180,6 +188,7 @@ function formSubmit() {
|
|
|
function formClosed() {
|
|
|
formRef.value?.resetFields()
|
|
|
}
|
|
|
+
|
|
|
function clickContract(item: StrAnyObjArr) {
|
|
|
formData.value = {
|
|
|
id: item.contractId
|
|
@@ -192,48 +201,48 @@ function clickContract(item: StrAnyObjArr) {
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-card v-if="showQuery">
|
|
|
- <a-form ref="queryRef" v-model="queryData" :config="queryConfig" :span="6"> </a-form>
|
|
|
+ <a-form ref="queryRef" v-model="queryData" :config="queryConfig" :span="6"></a-form>
|
|
|
</el-card>
|
|
|
|
|
|
<a-table
|
|
|
- :data="tableData"
|
|
|
- :page-total="pageTotal"
|
|
|
- :toolbar-config="toolbarConfig"
|
|
|
- :column-config="columnConfig"
|
|
|
- v-model:showQuery="showQuery"
|
|
|
- v-model:page-num="queryData.pageNum"
|
|
|
- v-model:page-size="queryData.pageSize"
|
|
|
- @page-num-change="getPage"
|
|
|
- @page-size-change="getPage"
|
|
|
- @selection-change="tableSelectionChange"
|
|
|
+ :data="tableData"
|
|
|
+ :page-total="pageTotal"
|
|
|
+ :toolbar-config="toolbarConfig"
|
|
|
+ :column-config="columnConfig"
|
|
|
+ v-model:showQuery="showQuery"
|
|
|
+ v-model:page-num="queryData.pageNum"
|
|
|
+ v-model:page-size="queryData.pageSize"
|
|
|
+ @page-num-change="getPage"
|
|
|
+ @page-size-change="getPage"
|
|
|
+ @selection-change="tableSelectionChange"
|
|
|
>
|
|
|
<template #contractNo="{ row }">
|
|
|
<div>
|
|
|
<a
|
|
|
- style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
- @click="clickContract(row)"
|
|
|
- >{{ row.contractNo }}</a
|
|
|
+ style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
+ @click="clickContract(row)"
|
|
|
+ >{{ row.contractNo }}</a
|
|
|
>
|
|
|
</div>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
|
|
|
<a-dialog
|
|
|
- v-model="dialogVisible"
|
|
|
- :title="dialogTitle"
|
|
|
- @submit="formSubmit"
|
|
|
- @closed="formClosed"
|
|
|
+ v-model="dialogVisible"
|
|
|
+ :title="dialogTitle"
|
|
|
+ @submit="formSubmit"
|
|
|
+ @closed="formClosed"
|
|
|
>
|
|
|
- <a-form ref="formRef" v-model="formData" :config="formConfig" :span="24"> </a-form>
|
|
|
+ <a-form ref="formRef" v-model="formData" :config="formConfig" :span="24"></a-form>
|
|
|
</a-dialog>
|
|
|
|
|
|
<a-dialog
|
|
|
- v-if="detailDialog"
|
|
|
- v-model="detailDialog"
|
|
|
- :title="detailTitle"
|
|
|
- @closed="formClosed"
|
|
|
- style="width: 900px"
|
|
|
- :footer="false"
|
|
|
+ v-if="detailDialog"
|
|
|
+ v-model="detailDialog"
|
|
|
+ :title="detailTitle"
|
|
|
+ @closed="formClosed"
|
|
|
+ style="width: 900px"
|
|
|
+ :footer="false"
|
|
|
>
|
|
|
<Detail :rowData="formData"></Detail>
|
|
|
</a-dialog>
|