|
|
@ -3,11 +3,11 @@
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
<div class="infoclientBox">
|
|
|
|
<div class="infoclientBox">
|
|
|
|
<div style="display: flex; align-items: center">
|
|
|
|
<div style="display: flex; align-items: center">
|
|
|
|
<a-tooltip placement="top" :mouseEnterDelay="0.5">
|
|
|
|
<a-tooltip placement="top" :mouseEnterDelay="0.5" v-if="route.query.id">
|
|
|
|
<template #title>
|
|
|
|
<template #title>
|
|
|
|
<span>新建</span>
|
|
|
|
<span>新建</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<span class="ds-action-svg-btn">
|
|
|
|
<span @click="handleNew" class="ds-action-svg-btn">
|
|
|
|
<img src="../../../../assets/svg/infoclient//xinjian.svg" class="SvgImg" />
|
|
|
|
<img src="../../../../assets/svg/infoclient//xinjian.svg" class="SvgImg" />
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</a-tooltip>
|
|
|
|
</a-tooltip>
|
|
|
@ -39,7 +39,7 @@
|
|
|
|
<template #title>
|
|
|
|
<template #title>
|
|
|
|
<span>撤销审核</span>
|
|
|
|
<span>撤销审核</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<span class="ds-action-svg-btn" @click="Withdraw">
|
|
|
|
<span class="ds-action-svg-btn" @click="handleWithdraw">
|
|
|
|
<img src="../../../../assets/svg/infoclient/chexiaotijiao.svg" class="SvgImg" />
|
|
|
|
<img src="../../../../assets/svg/infoclient/chexiaotijiao.svg" class="SvgImg" />
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</a-tooltip>
|
|
|
|
</a-tooltip>
|
|
|
@ -181,10 +181,12 @@ import {
|
|
|
|
GetClientBankList,
|
|
|
|
GetClientBankList,
|
|
|
|
GetOrgList,
|
|
|
|
GetOrgList,
|
|
|
|
InvoiceApplicationBizSave,
|
|
|
|
InvoiceApplicationBizSave,
|
|
|
|
GetClientInfo
|
|
|
|
GetClientInfo,
|
|
|
|
|
|
|
|
ApplyAudit,
|
|
|
|
|
|
|
|
Withdraw
|
|
|
|
} from '../api'
|
|
|
|
} from '../api'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
GetControllerClientList,
|
|
|
|
GetControllerClientList,
|
|
|
|
GetCustomerServiceList,
|
|
|
|
GetCustomerServiceList,
|
|
|
@ -196,6 +198,9 @@ import { useUserStore } from '/@/store/modules/user'
|
|
|
|
import { set } from 'nprogress'
|
|
|
|
import { set } from 'nprogress'
|
|
|
|
import { isNamedTupleMember } from 'typescript'
|
|
|
|
import { isNamedTupleMember } from 'typescript'
|
|
|
|
import { detailColumns } from '../columns'
|
|
|
|
import { detailColumns } from '../columns'
|
|
|
|
|
|
|
|
import { get } from 'sortablejs'
|
|
|
|
|
|
|
|
import { useMultipleTabStore } from '/@/store/modules/multipleTab'
|
|
|
|
|
|
|
|
const tabStore = useMultipleTabStore()
|
|
|
|
const userStore = useUserStore()
|
|
|
|
const userStore = useUserStore()
|
|
|
|
const go = useGo()
|
|
|
|
const go = useGo()
|
|
|
|
const CategoryData = [
|
|
|
|
const CategoryData = [
|
|
|
@ -673,6 +678,7 @@ const linkageFormBottom = (e) => {
|
|
|
|
const feeTableRef = ref(null) as any
|
|
|
|
const feeTableRef = ref(null) as any
|
|
|
|
const open = ref(false)
|
|
|
|
const open = ref(false)
|
|
|
|
const nameFlag = ref(false)
|
|
|
|
const nameFlag = ref(false)
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
// 保存 invoiceDetails是手动添加发票的数据 目前不允许手动添加 只能编辑
|
|
|
|
// 保存 invoiceDetails是手动添加发票的数据 目前不允许手动添加 只能编辑
|
|
|
|
async function handleSave() {
|
|
|
|
async function handleSave() {
|
|
|
|
// const values = await validate()
|
|
|
|
// const values = await validate()
|
|
|
@ -688,7 +694,11 @@ async function handleSave() {
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
|
createMessage.success('保存成功')
|
|
|
|
createMessage.success('保存成功')
|
|
|
|
|
|
|
|
const { fullPath } = route //获取当前路径
|
|
|
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
go(`/invoiceapplyDetail?id=${res.data.id}`)
|
|
|
|
go(`/invoiceapplyDetail?id=${res.data.id}`)
|
|
|
|
|
|
|
|
}, 50)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
createMessage.error(res.message)
|
|
|
|
createMessage.error(res.message)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -745,12 +755,18 @@ function openTemp() {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleChangeApply(e) {
|
|
|
|
function handleApply() {
|
|
|
|
form.value.isRMB = !e.target.checked
|
|
|
|
ApplyAudit({ ids: [route.query.id] }).then(res => {
|
|
|
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
|
|
|
createMessage.success('操作成功')
|
|
|
|
|
|
|
|
getDetail()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleChangeApply1(e) {
|
|
|
|
function handleNew() {
|
|
|
|
form.value.isYB = !e.target.checked
|
|
|
|
go(`/invoiceapplyDetail?type=add`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
function init() {
|
|
|
|
if (id.value) {
|
|
|
|
if (id.value) {
|
|
|
|
getDetail()
|
|
|
|
getDetail()
|
|
|
@ -780,11 +796,20 @@ function init() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function handleWithdraw() {
|
|
|
|
|
|
|
|
Withdraw({ ids: [route.query.id] }).then(res => {
|
|
|
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
|
|
|
createMessage.success('操作成功')
|
|
|
|
|
|
|
|
getDetail()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
function handleAddLabel(val) {
|
|
|
|
function handleAddLabel(val) {
|
|
|
|
tempContent.value += '[' + val.displayName + ']'
|
|
|
|
tempContent.value += '[' + val.displayName + ']'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const details = ref([])
|
|
|
|
const details = ref([])
|
|
|
|
|
|
|
|
// 获取详情 处理总量
|
|
|
|
function getDetail() {
|
|
|
|
function getDetail() {
|
|
|
|
InvoiceApplicationGet({ id: id.value }).then((res) => {
|
|
|
|
InvoiceApplicationGet({ id: id.value }).then((res) => {
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
@ -797,14 +822,19 @@ function getDetail() {
|
|
|
|
form.value.statusText = res.data.statusText
|
|
|
|
form.value.statusText = res.data.statusText
|
|
|
|
form.value.applicationNO = res.data.applicationNO
|
|
|
|
form.value.applicationNO = res.data.applicationNO
|
|
|
|
details.value = res.data.details
|
|
|
|
details.value = res.data.details
|
|
|
|
feeTableRef.value.init(res.data)
|
|
|
|
feeTableRef.value.changeCust(res.data.customerId)
|
|
|
|
|
|
|
|
amountArr.value = []
|
|
|
|
if (res.data.currency == 'RMB') {
|
|
|
|
if (res.data.currency == 'RMB') {
|
|
|
|
form.value.isRMB = true
|
|
|
|
form.value.isRMB = true
|
|
|
|
|
|
|
|
res.data.isRMB = true
|
|
|
|
|
|
|
|
res.data.isYB = false
|
|
|
|
res.data.summaryItems.forEach(item => {
|
|
|
|
res.data.summaryItems.forEach(item => {
|
|
|
|
totalRmb.value += Number(item.amount)
|
|
|
|
totalRmb.value += Number(item.amount)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
form.value.isYB = true
|
|
|
|
form.value.isYB = true
|
|
|
|
|
|
|
|
res.data.isRMB = false
|
|
|
|
|
|
|
|
res.data.isYB = true
|
|
|
|
res.data.summaryItems.forEach(item => {
|
|
|
|
res.data.summaryItems.forEach(item => {
|
|
|
|
amountArr.value.push({
|
|
|
|
amountArr.value.push({
|
|
|
|
currency: item.currency,
|
|
|
|
currency: item.currency,
|
|
|
@ -812,6 +842,7 @@ function getDetail() {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
feeTableRef.value.init(res.data)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -933,7 +964,11 @@ function updateListSave(arr, type) {
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
|
createMessage.success('保存成功')
|
|
|
|
createMessage.success('保存成功')
|
|
|
|
|
|
|
|
const { fullPath } = route //获取当前路径
|
|
|
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
go(`/invoiceapplyDetail?id=${res.data.id}`)
|
|
|
|
go(`/invoiceapplyDetail?id=${res.data.id}`)
|
|
|
|
|
|
|
|
}, 50)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
createMessage.error(res.message)
|
|
|
|
createMessage.error(res.message)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -947,7 +982,7 @@ function updateListSave(arr, type) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 左侧的添加过来 整个业务
|
|
|
|
// 左侧的添加过来 整个业务
|
|
|
|
function addLeftSave(arr,query) {
|
|
|
|
function addLeftSave(arr, query, exchang, type) {
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
changeCust(arr[0].customerId, arr[0].customerName).then(res => {
|
|
|
|
changeCust(arr[0].customerId, arr[0].customerName).then(res => {
|
|
|
|
const itemList = [] as any
|
|
|
|
const itemList = [] as any
|
|
|
@ -965,14 +1000,25 @@ function addLeftSave(arr,query) {
|
|
|
|
...form.value,
|
|
|
|
...form.value,
|
|
|
|
invoiceDetails: feeTableRef.value.list,
|
|
|
|
invoiceDetails: feeTableRef.value.list,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
exchanges: exchang,
|
|
|
|
items: itemList,
|
|
|
|
items: itemList,
|
|
|
|
queryString: JSON.stringify(query)
|
|
|
|
queryString: Object.keys(query).length != 0 ? JSON.stringify(query) : ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type == 'isRMB') {
|
|
|
|
|
|
|
|
data.application.currency = 'RMB'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type == 'isYB') {
|
|
|
|
|
|
|
|
data.application.currency = ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
InvoiceApplicationBizSave(data)
|
|
|
|
InvoiceApplicationBizSave(data)
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
|
createMessage.success('保存成功')
|
|
|
|
createMessage.success('保存成功')
|
|
|
|
|
|
|
|
const { fullPath } = route //获取当前路径
|
|
|
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
go(`/invoiceapplyDetail?id=${res.data.id}`)
|
|
|
|
go(`/invoiceapplyDetail?id=${res.data.id}`)
|
|
|
|
|
|
|
|
}, 50)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
createMessage.error(res.message)
|
|
|
|
createMessage.error(res.message)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -995,7 +1041,14 @@ function handleRender() {
|
|
|
|
id: id.value,
|
|
|
|
id: id.value,
|
|
|
|
template: temp,
|
|
|
|
template: temp,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RenderTemplate(data).then((res) => { })
|
|
|
|
RenderTemplate(data).then((res) => {
|
|
|
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
|
|
|
marksetFieldsValue({
|
|
|
|
|
|
|
|
note: res.data
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
nameFlag.value = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const tempName = ref('')
|
|
|
|
const tempName = ref('')
|
|
|
|
const tempId = ref('')
|
|
|
|
const tempId = ref('')
|
|
|
|