|
@@ -3,9 +3,9 @@ import AForm from '@/components/AForm/index.vue'
|
|
|
import { FormConfigType } from '@/components/AForm/type'
|
|
|
import { ColumnConfigType } from '@/components/ATable/type'
|
|
|
import { StrAnyObj } from '@/typings'
|
|
|
-import {getPageApi as getCorporationPageApi} from "@/api/business/corporation/corporation";
|
|
|
-import DeptTreeSelect from "@/views/components/DeptTreeSelect/index.vue";
|
|
|
-import {getPageApi as getCapitalAccountPageApi} from "@/api/business/capital/account";
|
|
|
+import { getPageApi as getCorporationPageApi } from '@/api/business/corporation/corporation'
|
|
|
+import DeptTreeSelect from '@/views/components/DeptTreeSelect/index.vue'
|
|
|
+import { getPageApi as getCapitalAccountPageApi } from '@/api/business/capital/account'
|
|
|
|
|
|
const formRef = ref<InstanceType<typeof AForm>>()
|
|
|
|
|
@@ -20,7 +20,7 @@ const formConfig: FormConfigType[] = [
|
|
|
label: '归属公司',
|
|
|
keyName: 'id',
|
|
|
labelName: 'name',
|
|
|
- async option () {
|
|
|
+ async option() {
|
|
|
const data = await getCorporationPageApi({ searchAll: true })
|
|
|
return data.records
|
|
|
},
|
|
@@ -105,22 +105,22 @@ const formConfig: FormConfigType[] = [
|
|
|
{
|
|
|
type: 'input',
|
|
|
prop: 'accountName',
|
|
|
- label: '户名',
|
|
|
+ label: '户名'
|
|
|
},
|
|
|
{
|
|
|
type: 'input',
|
|
|
prop: 'account',
|
|
|
- label: '银行账号',
|
|
|
+ label: '银行账号'
|
|
|
},
|
|
|
{
|
|
|
type: 'input',
|
|
|
prop: 'depositBank',
|
|
|
- label: '开户银行',
|
|
|
+ label: '开户银行'
|
|
|
},
|
|
|
{
|
|
|
type: 'input',
|
|
|
prop: 'correspondentNumber',
|
|
|
- label: '联行号/SWIFT Code',
|
|
|
+ label: '联行号/SWIFT Code'
|
|
|
}
|
|
|
]
|
|
|
|
|
@@ -132,7 +132,7 @@ const detailTableColumnConfig: ColumnConfigType[] = [
|
|
|
},
|
|
|
{
|
|
|
slot: 'remark',
|
|
|
- label: '款项说明',
|
|
|
+ label: '款项说明'
|
|
|
},
|
|
|
{
|
|
|
slot: 'amount',
|
|
@@ -160,18 +160,17 @@ function addPaymentRequestsDetailList() {
|
|
|
|
|
|
function updateDetailRemark() {
|
|
|
formData.value.useRemark = formData.value.paymentRequestsDetailList
|
|
|
- .map((item) => item.remark)
|
|
|
- .filter((item) => item !== '' && item !== null && item !== undefined)
|
|
|
- .join(' - \n')
|
|
|
+ .map((item) => item.remark)
|
|
|
+ .filter((item) => item !== '' && item !== null && item !== undefined)
|
|
|
+ .join(' - \n')
|
|
|
}
|
|
|
|
|
|
function updateAmount() {
|
|
|
formData.value.totalAmount = formData.value.paymentRequestsDetailList
|
|
|
- .map((item) => item.amount)
|
|
|
- .filter((item) => item !== '' && item !== null && item !== undefined)
|
|
|
- .reduce((pre, next) => pre + next, 0)
|
|
|
+ .map((item) => item.amount)
|
|
|
+ .filter((item) => item !== '' && item !== null && item !== undefined)
|
|
|
+ .reduce((pre, next) => pre + next, 0)
|
|
|
}
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -179,21 +178,39 @@ function updateAmount() {
|
|
|
<template #dept>
|
|
|
<dept-tree-select ref="deptIdRef" v-model="formData.deptId" />
|
|
|
</template>
|
|
|
- <template #atts>
|
|
|
- </template>
|
|
|
+ <template #atts> </template>
|
|
|
<template #detailTable>
|
|
|
- <a-table :data="formData.paymentRequestsDetailList" :columnConfig="detailTableColumnConfig" style="width: 100%" :card="false">
|
|
|
+ <a-table
|
|
|
+ :data="formData.paymentRequestsDetailList"
|
|
|
+ :columnConfig="detailTableColumnConfig"
|
|
|
+ style="width: 100%"
|
|
|
+ :card="false"
|
|
|
+ >
|
|
|
<template #expenseType="scope">
|
|
|
- <a-select v-model="scope.row.expenseType" dict="expense_type"/>
|
|
|
+ <a-select v-model="scope.row.expenseType" dict="expense_type" />
|
|
|
</template>
|
|
|
<template #remark="scope">
|
|
|
- <a-input v-model="scope.row.remark" type="textarea" rows="2" @change="updateDetailRemark"/>
|
|
|
+ <a-input
|
|
|
+ v-model="scope.row.remark"
|
|
|
+ type="textarea"
|
|
|
+ rows="2"
|
|
|
+ @change="updateDetailRemark"
|
|
|
+ />
|
|
|
</template>
|
|
|
<template #amount="scope">
|
|
|
- <a-inputNumber v-model="scope.row.amount" :min="0.01" :precision="2" @change="updateAmount" />
|
|
|
+ <a-inputNumber
|
|
|
+ v-model="scope.row.amount"
|
|
|
+ :min="0.01"
|
|
|
+ :precision="2"
|
|
|
+ @change="updateAmount"
|
|
|
+ />
|
|
|
</template>
|
|
|
</a-table>
|
|
|
- <el-button style="width: 100%; margin-bottom: 20px" type="primary" @click="addPaymentRequestsDetailList">
|
|
|
+ <el-button
|
|
|
+ style="width: 100%; margin-bottom: 20px"
|
|
|
+ type="primary"
|
|
|
+ @click="addPaymentRequestsDetailList"
|
|
|
+ >
|
|
|
添加行
|
|
|
</el-button>
|
|
|
</template>
|