发票开出

szh-new
sunzehua 2 months ago
parent 30b1ee066e
commit 98eb2efc50

@ -1,5 +1,5 @@
<template> <template>
<BasicModal width="800px" v-bind="$attrs" :use-wrapper="true" title="生成方式选择" @register="registerModal" <BasicModal width="900px" v-bind="$attrs" :use-wrapper="true" title="生成方式选择" @register="registerModal"
@ok="handleSave"> @ok="handleSave">
<div class="ctn-box"> <div class="ctn-box">
<BasicForm @register="registerForm"> <BasicForm @register="registerForm">
@ -587,11 +587,13 @@ function handleSaveCabin() {
CreateBookingOrder(ApiData).then(res => { CreateBookingOrder(ApiData).then(res => {
if (res.succeeded) { if (res.succeeded) {
closeModal() closeModal()
createMessage.success(res.message) createMessage.success('生成成功')
} else { } else {
createMessage.error(res.message) createMessage.error(res.message)
} }
setModalProps({ loading: false }) setModalProps({ loading: false })
}).catch(()=>{
setModalProps({ loading: false })
}) })
} }
// //

@ -84,3 +84,27 @@ export function PaymentSettlementDelete(parameter) {
data: parameter, data: parameter,
}) })
} }
export function GeneralInvoiceGet(params) {
return request({
url: '/feeApi/GeneralInvoice/Get',
method: 'get',
params
})
}
export function PaymentSettlementSetLock(parameter) {
return request({
url: '/feeApi/PaymentSettlement/SetLock',
method: 'post',
data: parameter,
})
}
export function PaymentSettlementDeleteDetail(parameter) {
return request({
url: '/feeApi/PaymentSettlement/DeleteDetail',
method: 'post',
data: parameter,
})
}

@ -851,7 +851,7 @@ export const invoiceTableDetailColums: BasicColumn[] = [
}, },
{ {
title: '发票折算汇率', title: '发票折算汇率',
dataIndex: 'feeName', dataIndex: 'exchangeRate1',
width: 100, width: 100,
}, },
{ {
@ -866,7 +866,7 @@ export const invoiceTableDetailColums: BasicColumn[] = [
}, },
{ {
title: '录入方式', title: '录入方式',
dataIndex: 'feeName', dataIndex: 'feeName1',
width: 100, width: 100,
}, },
{ {
@ -876,7 +876,7 @@ export const invoiceTableDetailColums: BasicColumn[] = [
}, },
{ {
title: '更改单', title: '更改单',
dataIndex: 'feeName', dataIndex: 'feeName2',
width: 100, width: 100,
}, },
] ]

@ -116,7 +116,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted, defineComponent, nextTick, watchEffect, watch } from 'vue' import { ref, onMounted, defineComponent, nextTick, watchEffect, watch } from 'vue'
import { InvoiceSettlementSave, InvoiceSettlementGet, PaymentSettlementGetList,InvoiceSettlementGetInvoiceDetails } from '../api' import { InvoiceSettlementSave, InvoiceSettlementGet, PaymentSettlementGetList, PaymentSettlementDeleteDetail, GeneralInvoiceGet } from '../api'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import invoiceTable from './invoiceTable.vue' import invoiceTable from './invoiceTable.vue'
import invoiceFile from '../../../operation/invoiceIssue/detail/invoiceFile.vue' import invoiceFile from '../../../operation/invoiceIssue/detail/invoiceFile.vue'
@ -144,7 +144,7 @@ const [registerFormMark, { getFieldsValue: getFieldsValueMark, setFieldsValue: s
schemas: markForm, schemas: markForm,
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
const [registerTable, { setTableData,setSelectedRowKeys }] = useTable({ const [registerTable, { setTableData, setSelectedRowKeys, getSelectRows }] = useTable({
columns: invoiceColum, columns: invoiceColum,
useSearchForm: false, useSearchForm: false,
showIndexColumn: false, showIndexColumn: false,
@ -217,18 +217,38 @@ function addDetailed(){
invoiceTableRef.value.init() invoiceTableRef.value.init()
} }
} }
function handleClick(record){ const deleteRow = async () => {
setSelectedRowKeys([record.id]) let ids = []
ids = getSelectRows().map((item) => {
return item.id
})
if(ids.length==0){
createMessage.error('请选择数据')
return false
}
const data = { const data = {
ids: [record.id], ids: ids
businessType: record.businessType,
} }
loading.value = true loading.value = true
InvoiceSettlementGetInvoiceDetails(data).then(res => { PaymentSettlementDeleteDetail(data).then(res => {
if (res.succeeded) { if (res.succeeded) {
setTableData1(res.data) createMessage.success(res.message)
getDetail()
} }
loading.value = false loading.value = false
}).catch(()=>{
loading.value = false
})
}
function handleClick(record) {
setSelectedRowKeys([record.id])
const data = {
id: record.id,
}
GeneralInvoiceGet(data).then(res => {
if (res.succeeded) {
setTableData1(res.data.details)
}
}) })
} }
const invoiceTableRef = ref('') const invoiceTableRef = ref('')
@ -262,8 +282,9 @@ function updateList(arr, currency) {
if (!route.query.id) { if (!route.query.id) {
const { fullPath } = route // const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router) tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => { setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${route.query.type}`) go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50) }, 50)
} else { } else {
getDetail() getDetail()
@ -291,8 +312,9 @@ function handleSave() {
if (!route.query.id) { if (!route.query.id) {
const { fullPath } = route // const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router) tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => { setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${route.query.type}`) go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50) }, 50)
} else { } else {
getDetail() getDetail()
@ -372,6 +394,10 @@ function getDetail() {
padding-left: 20px; padding-left: 20px;
} }
.bold {
font-size: 12px;
font-weight: bold;
}
:deep(.ant-divider) { :deep(.ant-divider) {
margin: 5px 0 !important; margin: 5px 0 !important;

@ -24,7 +24,7 @@
<template #title> <template #title>
<span>提交锁定</span> <span>提交锁定</span>
</template> </template>
<span class="ds-action-svg-btn"> <span @click="handleLock" class="ds-action-svg-btn">
<img src="../../../assets/icons/lock.svg" class="SvgImg" /> <img src="../../../assets/icons/lock.svg" class="SvgImg" />
</span> </span>
</a-tooltip> </a-tooltip>
@ -32,7 +32,7 @@
<template #title> <template #title>
<span>解除锁定</span> <span>解除锁定</span>
</template> </template>
<span class="ds-action-svg-btn"> <span @click="handleLock" class="ds-action-svg-btn">
<img src="../../../assets/icons/openLock.svg" class="SvgImg" /> <img src="../../../assets/icons/openLock.svg" class="SvgImg" />
</span> </span>
</a-tooltip> </a-tooltip>
@ -91,7 +91,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onMounted, defineExpose, computed } from 'vue' import { ref, reactive, onMounted, defineExpose, computed } from 'vue'
import { PaymentSettlementGetList,PaymentSettlementDelete } from './api.js' import { PaymentSettlementGetList,PaymentSettlementDelete,PaymentSettlementSetLock } from './api.js'
import { BasicTable, useTable, TableAction } from '/@/components/Table' import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
import { columns, searchFormSchema, detailColumns, feeColumns, feeColumnsSum } from './columns' import { columns, searchFormSchema, detailColumns, feeColumns, feeColumnsSum } from './columns'
@ -174,7 +174,7 @@ function handleLock() {
ids: [...ids] ids: [...ids]
} }
setLoading(true) setLoading(true)
GeneralInvoiceSetLock(data).then(res => { PaymentSettlementSetLock(data).then(res => {
if (res.succeeded) { if (res.succeeded) {
createMessage.success('操作成功') createMessage.success('操作成功')
reload() reload()

@ -24,4 +24,12 @@ export function Audit(parameter) {
}) })
} }
export function GetOpFileList(parameter) {
return request({
url: '/mainApi/OpFile/GetOpFileList',
method: 'get',
params:parameter
})
}

@ -8,10 +8,24 @@
<a-button type="link"><i class="icon-yiwancheng2-copy iconfont"></i>审核通过</a-button> <a-button type="link"><i class="icon-yiwancheng2-copy iconfont"></i>审核通过</a-button>
</span> </span>
</a-popconfirm> </a-popconfirm>
<a-button type="link"><i class="icon-piliangshenhe iconfont"></i>全部审核通过</a-button> <!-- <a-button type="link"><i class="icon-piliangshenhe iconfont"></i>全部审核通过</a-button> -->
<a-button @click="refuse" type="link"><i class="icon-bohui-01 iconfont"></i>驳回提交</a-button> <a-button @click="refuse" type="link"><i class="icon-bohui-01 iconfont"></i>驳回提交</a-button>
</template> </template>
<template v-slot:bodyCell="{ column, record }"> <template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'statusText'">
<span v-if="record.status == 0" class="ds-blue-tag">
{{ record.statusText }}</span>
<span v-else-if="record.status == 1" class="ds-green-tag">{{
record.statusText
}}</span>
<span v-else-if="/^2|3$/.test(record.status)" class="ds-orange-tag">{{
record.statusText
}}</span>
<span v-else-if="/^4|5$/.test(record.status)" class="ds-red-tag">{{
record.statusText
}}</span>
<span v-else class="ds-purple-tag">{{ record.statusText }}</span>
</template>
</template> </template>
</BasicTable> </BasicTable>
</div> </div>
@ -124,7 +138,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onMounted, defineExpose, computed } from 'vue' import { ref, reactive, onMounted, defineExpose, computed } from 'vue'
import { GetList, InvoiceApplicationGet, Audit } from './api.js' import { GetList, InvoiceApplicationGet, Audit,GetOpFileList } from './api.js'
import { BasicTable, useTable, TableAction } from '/@/components/Table' import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
import { columns, searchFormSchema, detailColumns, feeColumns, feeColumnsSum } from './columns' import { columns, searchFormSchema, detailColumns, feeColumns, feeColumnsSum } from './columns'
@ -269,6 +283,7 @@ function handleClick(row) {
} }
loading.value = false loading.value = false
}) })
getfileList(row.id)
} }
function tabChange(val) { function tabChange(val) {
@ -284,6 +299,23 @@ function tabChange(val) {
}, 100) }, 100)
} }
} }
const getfileList = (id) => {
GetOpFileList({ id: id }).then(res => {
res.data.forEach(item => {
if (item.createTime) {
item.createTime = new Date(item.createTime)
item.createTime = item.createTime.getFullYear() + '-' + (item.createTime.getMonth() + 1) + '-' + (item.createTime.getDate())
}
item['type'] = item?.filePath?.split('.')[1]
fileData.value = res.data
})
if (res.data.length == 0) {
fileData.value = []
}
}).catch(() => {
})
}
function applySuccess() { function applySuccess() {
let ids = [] let ids = []
ids = getSelectRows().map((item) => { ids = getSelectRows().map((item) => {

@ -8,15 +8,13 @@
<template #tableTitle> <template #tableTitle>
<div class="buttonGroup "> <div class="buttonGroup ">
<div class="tableTitleBox"> <div class="ds-h-aciton-btns-fee">
<a-tooltip placement="top" :mouseEnterDelay="0.5"> <a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title> <template #title>
<span>新建</span> <span>新建</span>
</template> </template>
<span class="ds-action-svg-btn"> <span class="ds-action-svg-btn" @click="GoDetailed(false)">
<a-button @click="GoDetailed(false)" v-repeat type="link">
<img src="../../../assets/svg/infoclient/xinjian.svg" class="SvgImg" /> <img src="../../../assets/svg/infoclient/xinjian.svg" class="SvgImg" />
</a-button>
</span> </span>
</a-tooltip> </a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5"> <a-tooltip placement="top" :mouseEnterDelay="0.5">
@ -25,9 +23,27 @@
</template> </template>
<span class="ds-action-svg-btn"> <span class="ds-action-svg-btn">
<a-popconfirm title="确定删除当前选中数据?" @confirm="FnDel" ok-text="" cancel-text=""> <a-popconfirm title="确定删除当前选中数据?" @confirm="FnDel" ok-text="" cancel-text="">
<a-button v-repeat type="link">
<img src="../../../assets/svg/infoclient/shanchu.svg" class="SvgImg" /> <img src="../../../assets/svg/infoclient/shanchu.svg" class="SvgImg" />
</a-button> </a-popconfirm>
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>删除</span>
</template>
<span class="ds-action-svg-btn">
<a-popconfirm title="确定提交审核吗?" @confirm="handleApply" ok-text="" cancel-text="">
<img src="../../../assets/svg/infoclient/tijiao.svg" class="SvgImg" />
</a-popconfirm>
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>删除</span>
</template>
<span class="ds-action-svg-btn">
<a-popconfirm title="确定撤销审核吗?" @confirm="handleWithdraw" ok-text="" cancel-text="">
<img src="../../../assets/svg/infoclient/chexiaotijiao.svg" class="SvgImg" />
</a-popconfirm> </a-popconfirm>
</span> </span>
</a-tooltip> </a-tooltip>
@ -41,14 +57,6 @@
<span class="iconfont icon-a-17Btuichu IconColor"></span> <span class="iconfont icon-a-17Btuichu IconColor"></span>
导出EXCEL 导出EXCEL
</a-button> </a-button>
<a-button @click="handleApply" v-repeat type="link">
<span class="iconfont icon-tijiao1 IconColor"></span>
提交审核
</a-button>
<a-button @click="handleWithdraw" v-repeat type="link">
<span class="iconfont icon-chehuisekuai IconColor"></span>
撤销审核
</a-button>
</div> </div>
</template> </template>
<template v-slot:bodyCell="{ column, record }"> <template v-slot:bodyCell="{ column, record }">
@ -67,6 +75,23 @@
<span v-if="!record.currency"></span> <span v-if="!record.currency"></span>
<span v-else>{{ record.currency }}</span> <span v-else>{{ record.currency }}</span>
</template> </template>
<template v-if="column.dataIndex == 'applicationNO'">
<span style="cursor: pointer"><span><span @click="copyNo($event, record.applicationNO)" class="iconfont icon-fuzhi11"></span>{{ record.applicationNO }}</span></span>
</template>
<template v-if="column.dataIndex == 'statusText'">
<span v-if="record.status == 0" class="ds-blue-tag">
{{ record.statusText }}</span>
<span v-else-if="record.status == 1" class="ds-green-tag">{{
record.statusText
}}</span>
<span v-else-if="/^2|3$/.test(record.status)" class="ds-orange-tag">{{
record.statusText
}}</span>
<span v-else-if="/^4|5$/.test(record.status)" class="ds-red-tag">{{
record.statusText
}}</span>
<span v-else class="ds-purple-tag">{{ record.statusText }}</span>
</template>
</template> </template>
</BasicTable> </BasicTable>
</div> </div>
@ -122,6 +147,7 @@ const [registerTable, { reload, getPaginationRef, getSelectRows, getRawDataSourc
pagination: true, pagination: true,
striped: true, striped: true,
useSearchForm: true, useSearchForm: true,
resizeHeightOffset: 15,
showTableSetting: true, showTableSetting: true,
bordered: true, bordered: true,
showIndexColumn: true, showIndexColumn: true,
@ -145,6 +171,11 @@ function GoDetailed(type, data) {
go(`/invoiceapplyDetail?type=add`) go(`/invoiceapplyDetail?type=add`)
} }
} }
const copyNo = (e, v) => {
e.stopPropagation()
navigator.clipboard.writeText(v)
createMessage.success("复制成功")
}
// //
function FnDel() { function FnDel() {
let ids = [] let ids = []
@ -258,9 +289,7 @@ async function printFee() {
height: calc(100vh - 145px); height: calc(100vh - 145px);
} }
.SvgImg {
width: 12px;
}
.tableTitleBox { .tableTitleBox {
.ant-btn-link { .ant-btn-link {
@ -272,8 +301,45 @@ async function printFee() {
} }
} }
.SvgImg {
width: 18px;
height: 18px;
margin: 6.8px;
}
.buttonGroup { .buttonGroup {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.ds-h-aciton-btns-fee {
display: flex;
align-items: center;
height: 38px;
padding-right: 10px;
border-right: 1px solid rgb(194, 188, 188);
.ds-action-svg-btn {
display: inline-block;
width: 32px;
height: 32px;
border-radius: 2px;
margin-right: 8px;
cursor: pointer;
.next {
transform: rotate(180deg);
}
}
.ds-action-svg-btn:hover {
box-shadow: 0px 2px 4px #cad1db;
}
.vben-svg-icon {
margin: 6.8px;
}
}
</style> </style>

@ -36,10 +36,10 @@
</span> </span>
</a-tooltip> </a-tooltip>
</div> </div>
<div style="color: #17a6a3" class="right-b" v-if="route.query.id"> <div style="color: #17a6a3" class="right-b" v-if="route.query.id && form.isLocked">
<span class="iconfont icon-locksuo"></span>锁定 <span class="iconfont icon-locksuo"></span>锁定
</div> </div>
<div style="color: #7a8798" class="right-b" v-if="!route.query.id"> <div style="color: #7a8798" class="right-b" v-if="!route.query.id || !form.isLocked">
<span class="iconfont icon-a-jiesuo1_jiesuo"></span>未锁定 <span class="iconfont icon-a-jiesuo1_jiesuo"></span>未锁定
</div> </div>
<div style="color: #3081fa" class="right-b" v-if="route.query.type == 'apply'"> <div style="color: #3081fa" class="right-b" v-if="route.query.type == 'apply'">
@ -48,15 +48,15 @@
<div style="color: #3081fa" class="right-b" v-if="route.query.type == 'free'"> <div style="color: #3081fa" class="right-b" v-if="route.query.type == 'free'">
<span class="iconfont icon-touzijilu"></span>自由开票 <span class="iconfont icon-touzijilu"></span>自由开票
</div> </div>
<div style="color: rgba(122, 135, 152, 1)" class="right-b" v-if="!route.query.id"> <div style="color: rgba(122, 135, 152, 1)" class="right-b" >
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>普票 <span class="iconfont icon-a-xiaopiaofapiao-01"></span>普票
</div> </div>
<div style="color: rgba(37, 122, 250, 1)" class="right-b" v-if="route.query.id"> <!-- <div style="color: rgba(37, 122, 250, 1)" class="right-b" v-if="route.query.id">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>红票 <span class="iconfont icon-a-xiaopiaofapiao-01"></span>红票
</div> </div>
<div style="color: rgba(186, 56, 73, 1)" class="right-b" v-if="route.query.id"> <div style="color: rgba(186, 56, 73, 1)" class="right-b" v-if="route.query.id">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>蓝票 <span class="iconfont icon-a-xiaopiaofapiao-01"></span>蓝票
</div> </div> -->
<div> <div>
<a-popconfirm title="确定申请开票吗?" ok-text="" cancel-text="" @confirm="handleIssue"> <a-popconfirm title="确定申请开票吗?" ok-text="" cancel-text="" @confirm="handleIssue">
<a-button v-repeat type="link" v-if="route.query.id"> <a-button v-repeat type="link" v-if="route.query.id">

@ -91,6 +91,17 @@
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
<div class="calc">
<span style="font-size: 12px;">合计</span>
<span class="box">
<span class="title">申请金额:</span>
<span class="count">{{ applyAmount }}</span>
</span>
<span class="box">
<span class="title">开票金额:</span>
<span class="count">{{ invoiceAmount }}</span>
</span>
</div>
</div> </div>
</template> </template>
@ -107,6 +118,8 @@ const go = useGo()
const [registerTable, { reload, setLoading, getSelectRows, getRawDataSource }] = useTable({ const [registerTable, { reload, setLoading, getSelectRows, getRawDataSource }] = useTable({
api: async (p) => { api: async (p) => {
const res: API.DataResult = await GeneralInvoiceGetList(p) const res: API.DataResult = await GeneralInvoiceGetList(p)
invoiceAmount.value = res.data.invoiceAmount
applyAmount.value = res.data.applyAmount
return new Promise((resolve) => { return new Promise((resolve) => {
resolve({ data: [...res.data.list], total: res.count }) resolve({ data: [...res.data.list], total: res.count })
}) })
@ -126,6 +139,7 @@ const [registerTable, { reload, setLoading, getSelectRows, getRawDataSource }] =
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
bordered: true, bordered: true,
resizeHeightOffset: 15,
showIndexColumn: true, showIndexColumn: true,
indexColumnProps: { indexColumnProps: {
width: 60, width: 60,
@ -162,6 +176,8 @@ function FnDel(){
setLoading(false) setLoading(false)
}) })
} }
const invoiceAmount = ref(0)
const applyAmount = ref(0)
function goDetail(type) { function goDetail(type) {
go(`/invoiceIssueDetail?type=` + type) go(`/invoiceIssueDetail?type=` + type)
} }
@ -213,4 +229,27 @@ function GoDetailed(row) {
.SvgImg { .SvgImg {
width: 12px; width: 12px;
} }
.main{
flex-direction: column;
}
.calc {
position: fixed;
display: flex;
bottom: 10px;
margin-left: 20px;
.title {
font-size: 14px;
font-weight: 700;
}
.count {
font-size: 14px;
font-weight: 700;
color: #257AFA;
}
.box {
background: #F5F9FC;
margin-left: 10px;
padding: 0 5px;
}
}
</style> </style>

Loading…
Cancel
Save