|
@@ -26,77 +26,76 @@ const dialogTitle = ref<string>('')
|
|
|
const dialogVisible = ref<boolean>(false)
|
|
|
|
|
|
const deptIdRef = ref<InstanceType<typeof DeptTreeSelect>>()
|
|
|
+const selectDeptIdRef = ref<InstanceType<typeof DeptTreeSelect>>()
|
|
|
+
|
|
|
+const disabled = ref(false)
|
|
|
|
|
|
const queryConfig: FormConfigType[] = [
|
|
|
{
|
|
|
- type: 'input',
|
|
|
+ type: 'select',
|
|
|
prop: 'corporationId',
|
|
|
- label: '归属公司id'
|
|
|
+ label: '归属公司',
|
|
|
+ keyName: 'id',
|
|
|
+ labelName: 'name',
|
|
|
+ async option() {
|
|
|
+ const data = await getCorporationPageApi({ searchAll: true })
|
|
|
+ return data.records
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- type: 'input',
|
|
|
+ type: 'slot',
|
|
|
prop: 'deptId',
|
|
|
- label: '部门id'
|
|
|
+ label: '归属部门',
|
|
|
},
|
|
|
{
|
|
|
- type: 'input',
|
|
|
+ type: 'select',
|
|
|
prop: 'type',
|
|
|
- label: '请款类型'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'input',
|
|
|
- prop: 'useTime',
|
|
|
- label: '用款时间'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'input',
|
|
|
- prop: 'useRemark',
|
|
|
- label: '用款说明'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'input',
|
|
|
- prop: 'atts',
|
|
|
- label: '附件列表'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'input',
|
|
|
- prop: 'totalAmount',
|
|
|
- label: '付款总金额'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'input',
|
|
|
- prop: 'documentQuantity',
|
|
|
- label: '单据数量'
|
|
|
+ label: '请款类型',
|
|
|
+ dict: 'payment_requests_type'
|
|
|
},
|
|
|
{
|
|
|
- type: 'input',
|
|
|
+ type: 'select',
|
|
|
prop: 'payType',
|
|
|
- label: '付款方式'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'input',
|
|
|
- prop: 'capitalAccountId',
|
|
|
- label: '资金账户id'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'input',
|
|
|
- prop: 'accountName',
|
|
|
- label: '户名'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'input',
|
|
|
- prop: 'account',
|
|
|
- label: '银行账号'
|
|
|
+ label: '付款方式',
|
|
|
+ dict: 'pay_type'
|
|
|
},
|
|
|
{
|
|
|
- type: 'input',
|
|
|
- prop: 'depositBank',
|
|
|
- label: '开户银行'
|
|
|
+ type: 'select',
|
|
|
+ prop: 'approvalStatus',
|
|
|
+ label: '审批状态',
|
|
|
+ option: [
|
|
|
+ {
|
|
|
+ key: 0,
|
|
|
+ label: '待发起'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 1,
|
|
|
+ label: '进行中'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 2,
|
|
|
+ label: '已通过'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 3,
|
|
|
+ label: '已驳回'
|
|
|
+ },
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
- type: 'input',
|
|
|
- prop: 'correspondentNumber',
|
|
|
- label: '联行号/ SWIFT Code'
|
|
|
+ type: 'select',
|
|
|
+ prop: 'paymentStatus',
|
|
|
+ label: '放款状态',
|
|
|
+ option: [
|
|
|
+ {
|
|
|
+ key: 0,
|
|
|
+ label: '未放款'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 1,
|
|
|
+ label: '已放款'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
]
|
|
|
|
|
@@ -207,12 +206,27 @@ const columnConfig: ColumnConfigType[] = [
|
|
|
},
|
|
|
click(row) {
|
|
|
dialogVisible.value = true
|
|
|
- dialogTitle.value = '编辑'
|
|
|
+ dialogTitle.value = '重新发起'
|
|
|
+ disabled.value = false
|
|
|
getDetailApi({id: row.id}).then((resp: StrAnyObj) => {
|
|
|
formData.value = resp
|
|
|
})
|
|
|
nextTick(() => deptIdRef.value?.load())
|
|
|
}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ common: 'detail',
|
|
|
+ click(row) {
|
|
|
+ dialogVisible.value = true
|
|
|
+ dialogTitle.value = '详情'
|
|
|
+ disabled.value = true
|
|
|
+ nextTick(() => deptIdRef.value?.load())
|
|
|
+ getDetailApi({ id: row.id }).then((resp: StrAnyObj) => {
|
|
|
+ formData.value = resp
|
|
|
+ updateAmount()
|
|
|
+ updateDetailRemark()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -346,6 +360,7 @@ const detailTableColumnConfig: ColumnConfigType[] = [
|
|
|
},
|
|
|
{
|
|
|
width: 100,
|
|
|
+ if: () => !disabled.value,
|
|
|
handleConfig: [
|
|
|
{
|
|
|
common: 'delete',
|
|
@@ -361,6 +376,7 @@ const detailTableColumnConfig: ColumnConfigType[] = [
|
|
|
|
|
|
onMounted(() => {
|
|
|
getPage()
|
|
|
+ selectDeptIdRef.value?.load()
|
|
|
})
|
|
|
|
|
|
function getPage() {
|
|
@@ -386,6 +402,10 @@ function formSubmit() {
|
|
|
ElMessage.error('请款明细存在费用类型为空,无法提交')
|
|
|
return
|
|
|
}
|
|
|
+ if (!item.remark) {
|
|
|
+ ElMessage.error('请款明细存在款项说明为空,无法提交')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!item.amount) {
|
|
|
ElMessage.error('请款明细存在请款金额为空,无法提交')
|
|
|
return
|
|
@@ -443,7 +463,11 @@ function updateAmount() {
|
|
|
<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">
|
|
|
+ <template #deptId>
|
|
|
+ <dept-tree-select ref="selectDeptIdRef" v-model="formData.deptId" />
|
|
|
+ </template>
|
|
|
+ </a-form>
|
|
|
</el-card>
|
|
|
|
|
|
<a-table
|
|
@@ -469,12 +493,12 @@ function updateAmount() {
|
|
|
width="1400px"
|
|
|
height="200px"
|
|
|
>
|
|
|
- <a-form ref="formRef" v-model="formData" :config="formConfig" :span="12">
|
|
|
+ <a-form ref="formRef" v-model="formData" :config="formConfig" :span="12" :disabled="disabled">
|
|
|
<template #deptId>
|
|
|
- <dept-tree-select ref="deptIdRef" v-model="formData.deptId"/>
|
|
|
+ <dept-tree-select ref="deptIdRef" v-model="formData.deptId" :disabled="disabled"/>
|
|
|
</template>
|
|
|
<template #atts>
|
|
|
- <file-upload v-model="formData.atts"/>
|
|
|
+ <file-upload v-model="formData.atts" :disabled="disabled"/>
|
|
|
</template>
|
|
|
<template #detailTable>
|
|
|
<a-table
|
|
@@ -484,7 +508,7 @@ function updateAmount() {
|
|
|
: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" :disabled="disabled"/>
|
|
|
</template>
|
|
|
<template #remark="scope">
|
|
|
<a-input
|
|
@@ -492,6 +516,7 @@ function updateAmount() {
|
|
|
type="textarea"
|
|
|
:rows="2"
|
|
|
@change="updateDetailRemark"
|
|
|
+ :disabled="disabled"
|
|
|
/>
|
|
|
</template>
|
|
|
<template #amount="scope">
|
|
@@ -500,10 +525,12 @@ function updateAmount() {
|
|
|
:min="0.01"
|
|
|
:precision="2"
|
|
|
@change="updateAmount"
|
|
|
+ :disabled="disabled"
|
|
|
/>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
<el-button
|
|
|
+ v-if="!disabled"
|
|
|
style="width: 100%; margin-bottom: 20px"
|
|
|
type="primary"
|
|
|
@click="addPaymentRequestsDetailList"
|