|
|
|
@ -50,7 +50,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="color: #8995a4">
|
|
|
|
|
<span>结算单号:</span>
|
|
|
|
|
<span>结算单号:{{ form.settlementNO }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content">
|
|
|
|
@ -62,7 +62,7 @@
|
|
|
|
|
</BasicForm>
|
|
|
|
|
<BasicTable class="ds-table" @row-click="handleClick" @register="registerTable">
|
|
|
|
|
<template #right>
|
|
|
|
|
<div style="width: 40%;margin-left: 10px;margin-top:10px;">
|
|
|
|
|
<div style="width: 40%;margin-left: 10px;">
|
|
|
|
|
<div>
|
|
|
|
|
<BasicTable class="ds-table" @register="registerTable1">
|
|
|
|
|
<template #tableTitle>
|
|
|
|
@ -89,13 +89,13 @@
|
|
|
|
|
<span class="iconfont icon-jia"></span>
|
|
|
|
|
添加
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-repeat type="link" @click="addDetailed()">
|
|
|
|
|
<span class="iconfont icon-jia"></span>
|
|
|
|
|
删除
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-repeat type="link" @click="addDetailed()">
|
|
|
|
|
<span class="iconfont icon-jia"></span>
|
|
|
|
|
附件
|
|
|
|
|
<a-popconfirm title="确定要删除勾选的数据?" ok-text="确定" cancel-text="取消" @confirm="deleteRow">
|
|
|
|
|
<a-button v-repeat type="link">
|
|
|
|
|
<span class="iconfont icon-shanchu1"></span>删除
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
<a-button v-repeat type="link" @click="openFile">
|
|
|
|
|
<span class="iconfont icon-fujian1"></span>附件
|
|
|
|
|
</a-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -110,19 +110,26 @@
|
|
|
|
|
</BasicTable>
|
|
|
|
|
</div>
|
|
|
|
|
</a-spin>
|
|
|
|
|
<invoiceTable ref="invoiceTableRef" @updateList="updateList" ></invoiceTable>
|
|
|
|
|
<invoiceTable ref="invoiceTableRef" @updateList="updateList"></invoiceTable>
|
|
|
|
|
<invoiceFile ref="invoiceFileRef"></invoiceFile>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { ref, onMounted, defineComponent, nextTick, watchEffect, watch } from 'vue'
|
|
|
|
|
import { InvoiceSettlementSave,InvoiceSettlementGet} from '../api'
|
|
|
|
|
import { InvoiceSettlementSave, InvoiceSettlementGet, GetClientBankList } from '../api'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
import invoiceTable from './invoiceTable.vue'
|
|
|
|
|
import invoiceFile from '../../../operation/invoiceIssue/detail/invoiceFile.vue'
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
|
import { useGo } from '/@/hooks/web/usePage'
|
|
|
|
|
import { detailForm, markForm, invoiceColum, invoiceDetailColum } from '../columns'
|
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'
|
|
|
|
|
import { useUserStore } from '/@/store/modules/user'
|
|
|
|
|
import { useMultipleTabStore } from '/@/store/modules/multipleTab'
|
|
|
|
|
const tabStore = useMultipleTabStore()
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
const go = useGo()
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
const loading = ref(false)
|
|
|
|
@ -132,12 +139,12 @@ const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getF
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
readonly: true,
|
|
|
|
|
})
|
|
|
|
|
const [registerFormMark, {getFieldsValue:getFieldsValueMark }] = useForm({
|
|
|
|
|
const [registerFormMark, { getFieldsValue: getFieldsValueMark, setFieldsValue: setFieldsValueMark }] = useForm({
|
|
|
|
|
labelWidth: 100,
|
|
|
|
|
schemas: markForm,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, getRawDataSource, setLoading }] = useTable({
|
|
|
|
|
const [registerTable, { setTableData }] = useTable({
|
|
|
|
|
columns: invoiceColum,
|
|
|
|
|
useSearchForm: false,
|
|
|
|
|
showIndexColumn: false,
|
|
|
|
@ -149,9 +156,11 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
|
|
|
|
|
width: 60,
|
|
|
|
|
},
|
|
|
|
|
canResize: true,
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
id:'1',
|
|
|
|
|
immediate: false,
|
|
|
|
|
})
|
|
|
|
|
const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee, setTableData }] = useTable({
|
|
|
|
|
const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee, setTableData: setTableData1 }] = useTable({
|
|
|
|
|
columns: invoiceDetailColum,
|
|
|
|
|
useSearchForm: false,
|
|
|
|
|
showIndexColumn: false,
|
|
|
|
@ -162,6 +171,8 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
|
|
|
|
|
indexColumnProps: {
|
|
|
|
|
width: 60,
|
|
|
|
|
},
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
id:'2',
|
|
|
|
|
canResize: true,
|
|
|
|
|
immediate: false,
|
|
|
|
|
})
|
|
|
|
@ -174,27 +185,101 @@ onMounted(() => {
|
|
|
|
|
getDetail()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
function updateList(arr,currency){
|
|
|
|
|
const invoiceFileRef = ref('')
|
|
|
|
|
function openFile() {
|
|
|
|
|
invoiceFileRef.value.init()
|
|
|
|
|
}
|
|
|
|
|
// 发票结算
|
|
|
|
|
function updateList(arr, currency) {
|
|
|
|
|
const data = {
|
|
|
|
|
settlement:{
|
|
|
|
|
settlement: {
|
|
|
|
|
...getFieldsValue(),
|
|
|
|
|
...getFieldsValueMark(),
|
|
|
|
|
},
|
|
|
|
|
documents:arr
|
|
|
|
|
documents: arr
|
|
|
|
|
}
|
|
|
|
|
data.settlement.billType =1
|
|
|
|
|
data.settlement.billType = 1
|
|
|
|
|
data.settlement.mode = 4
|
|
|
|
|
data.settlement.currency = currency
|
|
|
|
|
loading.value = true
|
|
|
|
|
InvoiceSettlementSave(data).then(res=>{
|
|
|
|
|
InvoiceSettlementSave(data).then(res => {
|
|
|
|
|
if (!route.query.id) {
|
|
|
|
|
const { fullPath } = route //获取当前路径
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
go(`/feeSettlementDetail?id=${res.data.id}`)
|
|
|
|
|
}, 50)
|
|
|
|
|
} else {
|
|
|
|
|
getDetail()
|
|
|
|
|
}
|
|
|
|
|
loading.value = false
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function getDetail(){
|
|
|
|
|
InvoiceSettlementGet({id:route.query.id}).then(res=>{
|
|
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
function handleSave() {
|
|
|
|
|
const data = {
|
|
|
|
|
settlement: {
|
|
|
|
|
...form.value,
|
|
|
|
|
...getFieldsValue(),
|
|
|
|
|
...getFieldsValueMark(),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
data.settlement.billType = 1
|
|
|
|
|
data.settlement.mode = 4
|
|
|
|
|
loading.value = true
|
|
|
|
|
InvoiceSettlementSave(data).then(res => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
createMessage.success('保存成功')
|
|
|
|
|
if (!route.query.id) {
|
|
|
|
|
const { fullPath } = route //获取当前路径
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
go(`/feeSettlementDetail?id=${res.data.id}`)
|
|
|
|
|
}, 50)
|
|
|
|
|
} else {
|
|
|
|
|
getDetail()
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const form = ref({ settlementNO: '' }) as any
|
|
|
|
|
function getDetail() {
|
|
|
|
|
loading.value = true
|
|
|
|
|
InvoiceSettlementGet({ id: route.query.id }).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
form.value = JSON.parse(JSON.stringify(res.data))
|
|
|
|
|
delete form.value.details
|
|
|
|
|
res.data.currencyAmount = res.data.currency + '/' + res.data.amount
|
|
|
|
|
setFieldsValueMark(res.data)
|
|
|
|
|
setFieldsValue(res.data)
|
|
|
|
|
setTableData(res.data.details)
|
|
|
|
|
}
|
|
|
|
|
loading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const bankList = ref([])
|
|
|
|
|
function getBankInfo(id) {
|
|
|
|
|
const queryStr = [
|
|
|
|
|
{
|
|
|
|
|
FieldName: 'ClientId',
|
|
|
|
|
FieldValue: id,
|
|
|
|
|
ConditionalType: '0',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
const data = {
|
|
|
|
|
pageCondition: {
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
sortConditions: [],
|
|
|
|
|
},
|
|
|
|
|
queryCondition: JSON.stringify(queryStr),
|
|
|
|
|
}
|
|
|
|
|
bankList.value = []
|
|
|
|
|
GetClientBankList(data).then((res) => { })
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
@ -250,7 +335,17 @@ function getDetail(){
|
|
|
|
|
padding-left: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/.ant-divider {
|
|
|
|
|
|
|
|
|
|
:deep(.ant-divider) {
|
|
|
|
|
margin: 5px 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.ant-table-footer) {
|
|
|
|
|
padding: 0px !important;
|
|
|
|
|
background: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.ant-table-container) {
|
|
|
|
|
padding: 0px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|