|
|
|
@ -5,79 +5,79 @@
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<div class="ds-fee-apply-settle-main-detail">
|
|
|
|
|
<div class="act-box">
|
|
|
|
|
<!-- 保存按钮组 -->
|
|
|
|
|
<ActionBar
|
|
|
|
|
code="sea_freight_export"
|
|
|
|
|
name="hyck"
|
|
|
|
|
:save="save"
|
|
|
|
|
:delete="deleteRow"
|
|
|
|
|
:create="create"
|
|
|
|
|
:showBtns="['create', 'save', 'delete', 'print']"
|
|
|
|
|
layout="horizontal"
|
|
|
|
|
></ActionBar>
|
|
|
|
|
<Divider
|
|
|
|
|
type="vertical"
|
|
|
|
|
class="action-divider"
|
|
|
|
|
/>
|
|
|
|
|
<!-- <a-dropdown>
|
|
|
|
|
<template #overlay>
|
|
|
|
|
<a-menu>
|
|
|
|
|
<a-menu-item @click="toggleBookingType(formData.bookingType)">{{
|
|
|
|
|
formData.bookingType == 'xs' ? '线下' : '线上'
|
|
|
|
|
}}</a-menu-item>
|
|
|
|
|
</a-menu>
|
|
|
|
|
</template>
|
|
|
|
|
<a-button type="link">
|
|
|
|
|
<span
|
|
|
|
|
style="font-size: 13px"
|
|
|
|
|
class="iconfont"
|
|
|
|
|
:class="{
|
|
|
|
|
'icon-xianshang': formData.bookingType == 'xs',
|
|
|
|
|
'icon-piliangxiaxian': formData.bookingType == 'xx',
|
|
|
|
|
}"
|
|
|
|
|
></span>
|
|
|
|
|
{{ formData.bookingType == 'xs' ? '线上' : '线下' }}
|
|
|
|
|
<span class="iconfont icon-30jiantouxiangxiafill"></span>
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-dropdown> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ds-detail-box">
|
|
|
|
|
<!-- 表单区域 -->
|
|
|
|
|
<div class="form-area">
|
|
|
|
|
<BasicForm @register="registerForm" />
|
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
|
<div class="act-box">
|
|
|
|
|
<!-- 保存按钮组 -->
|
|
|
|
|
<ActionBar
|
|
|
|
|
code="sea_freight_export"
|
|
|
|
|
name="hyck"
|
|
|
|
|
:save="save"
|
|
|
|
|
:delete="deleteRow"
|
|
|
|
|
:create="create"
|
|
|
|
|
:showBtns="id ? ['create', 'save', 'delete', 'print'] : ['save']"
|
|
|
|
|
layout="horizontal"
|
|
|
|
|
></ActionBar>
|
|
|
|
|
<Divider
|
|
|
|
|
type="vertical"
|
|
|
|
|
class="action-divider"
|
|
|
|
|
/>
|
|
|
|
|
<!-- <a-dropdown>
|
|
|
|
|
<template #overlay>
|
|
|
|
|
<a-menu>
|
|
|
|
|
<a-menu-item @click="toggleBookingType(formData.bookingType)">{{
|
|
|
|
|
formData.bookingType == 'xs' ? '线下' : '线上'
|
|
|
|
|
}}</a-menu-item>
|
|
|
|
|
</a-menu>
|
|
|
|
|
</template>
|
|
|
|
|
<a-button type="link">
|
|
|
|
|
<span
|
|
|
|
|
style="font-size: 13px"
|
|
|
|
|
class="iconfont"
|
|
|
|
|
:class="{
|
|
|
|
|
'icon-xianshang': formData.bookingType == 'xs',
|
|
|
|
|
'icon-piliangxiaxian': formData.bookingType == 'xx',
|
|
|
|
|
}"
|
|
|
|
|
></span>
|
|
|
|
|
{{ formData.bookingType == 'xs' ? '线上' : '线下' }}
|
|
|
|
|
<span class="iconfont icon-30jiantouxiangxiafill"></span>
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-dropdown> -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 申请明细 -->
|
|
|
|
|
<div>
|
|
|
|
|
<ApplyInfo
|
|
|
|
|
ref="applyInfo"
|
|
|
|
|
:id="id"
|
|
|
|
|
:status="status"
|
|
|
|
|
:feeData="feeData"
|
|
|
|
|
@del="init"
|
|
|
|
|
@add="add"
|
|
|
|
|
></ApplyInfo>
|
|
|
|
|
<div class="ds-detail-box">
|
|
|
|
|
<!-- 表单区域 -->
|
|
|
|
|
<div class="form-area">
|
|
|
|
|
<BasicForm @register="registerForm" />
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 申请明细 -->
|
|
|
|
|
<div>
|
|
|
|
|
<ApplyInfo
|
|
|
|
|
ref="applyInfo"
|
|
|
|
|
:id="id"
|
|
|
|
|
:feeData="feeData"
|
|
|
|
|
@del="init"
|
|
|
|
|
@add="add"
|
|
|
|
|
></ApplyInfo>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<a-modal
|
|
|
|
|
class="fee-modal"
|
|
|
|
|
v-model:visible="visible"
|
|
|
|
|
title="添加支付结算明细"
|
|
|
|
|
width="90%"
|
|
|
|
|
@ok="handleOk"
|
|
|
|
|
>
|
|
|
|
|
<!-- 业务表格 -->
|
|
|
|
|
<BusinessTable
|
|
|
|
|
v-if="visible"
|
|
|
|
|
ref="busTable"
|
|
|
|
|
:formData="getFieldsValue()"
|
|
|
|
|
:setFieldsValue="setFieldsValue"
|
|
|
|
|
@save="save"
|
|
|
|
|
@refresh="refresh"
|
|
|
|
|
></BusinessTable>
|
|
|
|
|
<template #footer>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<a-modal
|
|
|
|
|
class="fee-modal"
|
|
|
|
|
v-model:visible="visible"
|
|
|
|
|
title="添加支付结算明细"
|
|
|
|
|
width="90%"
|
|
|
|
|
>
|
|
|
|
|
<!-- 业务表格 -->
|
|
|
|
|
<BusinessTable
|
|
|
|
|
v-if="visible"
|
|
|
|
|
ref="busTable"
|
|
|
|
|
:formData="getFieldsValue()"
|
|
|
|
|
:setFieldsValue="setFieldsValue"
|
|
|
|
|
@save="save"
|
|
|
|
|
@refresh="refresh"
|
|
|
|
|
></BusinessTable>
|
|
|
|
|
<template #footer>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
@ -93,17 +93,19 @@
|
|
|
|
|
import { formSchema } from './columns'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
const [registerForm, { validate, getFieldsValue, setFieldsValue, getSelectRows }] = useForm({
|
|
|
|
|
import { useGo } from '/@/hooks/web/usePage'
|
|
|
|
|
const go = useGo()
|
|
|
|
|
const [registerForm, { validate, getFieldsValue, setFieldsValue }] = useForm({
|
|
|
|
|
labelWidth: 150,
|
|
|
|
|
schemas: formSchema,
|
|
|
|
|
readonly: route.path != '/payment-settlement/create',
|
|
|
|
|
showActionButtonGroup: false
|
|
|
|
|
})
|
|
|
|
|
// 当前数据id
|
|
|
|
|
const id = ref(null)
|
|
|
|
|
const id = ref('')
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
// 添加明细弹窗
|
|
|
|
|
const visible = ref(false)
|
|
|
|
|
// 打开弹窗添加数据
|
|
|
|
@ -116,7 +118,7 @@
|
|
|
|
|
}
|
|
|
|
|
// 新建
|
|
|
|
|
const create = () => {
|
|
|
|
|
router.go(0)
|
|
|
|
|
go(`/payment-settlement/create`)
|
|
|
|
|
}
|
|
|
|
|
// 导出
|
|
|
|
|
function exportFile() {
|
|
|
|
@ -130,28 +132,41 @@
|
|
|
|
|
visible.value = false
|
|
|
|
|
init()
|
|
|
|
|
}
|
|
|
|
|
const applyInfo = ref(null)
|
|
|
|
|
// 保存
|
|
|
|
|
const save = () => {
|
|
|
|
|
const settlement = validate()
|
|
|
|
|
const save = async () => {
|
|
|
|
|
const settlement = await validate()
|
|
|
|
|
const postData = {
|
|
|
|
|
description: '按申请单增加添加费用明细',
|
|
|
|
|
settlement,
|
|
|
|
|
documents: getSelectRows()
|
|
|
|
|
}
|
|
|
|
|
description: '按申请单增加添加费用明细',
|
|
|
|
|
settlement,
|
|
|
|
|
documents: applyInfo.value.getSelectRows()
|
|
|
|
|
}
|
|
|
|
|
loading.value = true
|
|
|
|
|
Save(postData).then(async (res) => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
createMessage.success('保存成功!')
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 费用列表数据
|
|
|
|
|
const feeData = ref([])
|
|
|
|
|
// 初始化接口
|
|
|
|
|
const init = () => {
|
|
|
|
|
id.value = route.query.id || getFieldsValue().id
|
|
|
|
|
console.log(id.value)
|
|
|
|
|
if (id.value) {
|
|
|
|
|
// 详情页
|
|
|
|
|
Get({ id: id.value }).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
...res.data
|
|
|
|
|
})
|
|
|
|
|
feeData.value = res.data.settlementDetails
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
// 新建
|
|
|
|
|
visible.value = true
|
|
|
|
|