发票开出

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

@ -1,5 +1,5 @@
<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">
<div class="ctn-box">
<BasicForm @register="registerForm">
@ -587,11 +587,13 @@ function handleSaveCabin() {
CreateBookingOrder(ApiData).then(res => {
if (res.succeeded) {
closeModal()
createMessage.success(res.message)
createMessage.success('生成成功')
} else {
createMessage.error(res.message)
}
setModalProps({ loading: false })
}).catch(()=>{
setModalProps({ loading: false })
})
}
//

@ -83,4 +83,28 @@ export function PaymentSettlementDelete(parameter) {
method: 'post',
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: '发票折算汇率',
dataIndex: 'feeName',
dataIndex: 'exchangeRate1',
width: 100,
},
{
@ -866,7 +866,7 @@ export const invoiceTableDetailColums: BasicColumn[] = [
},
{
title: '录入方式',
dataIndex: 'feeName',
dataIndex: 'feeName1',
width: 100,
},
{
@ -876,7 +876,7 @@ export const invoiceTableDetailColums: BasicColumn[] = [
},
{
title: '更改单',
dataIndex: 'feeName',
dataIndex: 'feeName2',
width: 100,
},
]

@ -116,7 +116,7 @@
</template>
<script lang="ts" setup>
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 invoiceTable from './invoiceTable.vue'
import invoiceFile from '../../../operation/invoiceIssue/detail/invoiceFile.vue'
@ -144,7 +144,7 @@ const [registerFormMark, { getFieldsValue: getFieldsValueMark, setFieldsValue: s
schemas: markForm,
showActionButtonGroup: false,
})
const [registerTable, { setTableData,setSelectedRowKeys }] = useTable({
const [registerTable, { setTableData, setSelectedRowKeys, getSelectRows }] = useTable({
columns: invoiceColum,
useSearchForm: false,
showIndexColumn: false,
@ -157,7 +157,7 @@ const [registerTable, { setTableData,setSelectedRowKeys }] = useTable({
},
canResize: true,
showTableSetting: true,
id:'1',
id: '1',
immediate: false,
})
const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee, setTableData: setTableData1 }] = useTable({
@ -172,63 +172,83 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
width: 60,
},
showTableSetting: true,
id:'2',
id: '2',
canResize: true,
immediate: false,
})
function ClickLast(type) {
const data = {
"queryCondition": "[]",
"pageCondition": {
"pageIndex": 1,
"pageSize": 100,
"sortConditions": []
}
const data = {
"queryCondition": "[]",
"pageCondition": {
"pageIndex": 1,
"pageSize": 100,
"sortConditions": []
}
let indexQuery = 0
let list = []
PaymentSettlementGetList(data).then(res => {
list = res.data.list
res.data.list.forEach((item, index) => {
if (item.id == route.query.id) {
indexQuery = index
}
})
console.log(indexQuery, list)
if (type == 'next') {
if (indexQuery == 0) {
createMessage.warning('已经是第一条了')
} else {
go("/invoiceIssueDetail?id=" + list[indexQuery - 1].id + '&type=' + route.query.type)
}
}
if (type == 'last') {
if (indexQuery == list.length - 1) {
createMessage.warning('已经是最后一条了')
} else {
go("/invoiceIssueDetail?id=" + list[indexQuery + 1].id + '&type=' + route.query.type)
}
}
}
let indexQuery = 0
let list = []
PaymentSettlementGetList(data).then(res => {
list = res.data.list
res.data.list.forEach((item, index) => {
if (item.id == route.query.id) {
indexQuery = index
}
})
console.log(indexQuery, list)
if (type == 'next') {
if (indexQuery == 0) {
createMessage.warning('已经是第一条了')
} else {
go("/invoiceIssueDetail?id=" + list[indexQuery - 1].id + '&type=' + route.query.type)
}
}
if (type == 'last') {
if (indexQuery == list.length - 1) {
createMessage.warning('已经是最后一条了')
} else {
go("/invoiceIssueDetail?id=" + list[indexQuery + 1].id + '&type=' + route.query.type)
}
}
})
}
function addDetailed(){
function addDetailed() {
if (route.query.type == 'invoice') {
invoiceTableRef.value.customerIdP = form.value.customerId
invoiceTableRef.value.init()
}
}
function handleClick(record){
setSelectedRowKeys([record.id])
const deleteRow = async () => {
let ids = []
ids = getSelectRows().map((item) => {
return item.id
})
if(ids.length==0){
createMessage.error('请选择数据')
return false
}
const data = {
ids: [record.id],
businessType: record.businessType,
ids: ids
}
loading.value = true
InvoiceSettlementGetInvoiceDetails(data).then(res => {
PaymentSettlementDeleteDetail(data).then(res => {
if (res.succeeded) {
setTableData1(res.data)
createMessage.success(res.message)
getDetail()
}
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('')
@ -243,7 +263,7 @@ onMounted(() => {
})
const invoiceFileRef = ref('')
function openFile() {
invoiceFileRef.value.init()
invoiceFileRef.value.init()
}
//
function updateList(arr, currency) {
@ -262,8 +282,9 @@ function updateList(arr, currency) {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${route.query.type}`)
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
@ -291,8 +312,9 @@ function handleSave() {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${route.query.type}`)
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
@ -306,7 +328,7 @@ function getDetail() {
loading.value = true
InvoiceSettlementGet({ id: route.query.id }).then(res => {
if (res.succeeded) {
form.value = JSON.parse(JSON.stringify(res.data))
form.value = JSON.parse(JSON.stringify(res.data))
delete form.value.details
res.data.currencyAmount = res.data.currency + '/' + res.data.amount
setFieldsValueMark(res.data)
@ -372,6 +394,10 @@ function getDetail() {
padding-left: 20px;
}
.bold {
font-size: 12px;
font-weight: bold;
}
:deep(.ant-divider) {
margin: 5px 0 !important;

@ -24,7 +24,7 @@
<template #title>
<span>提交锁定</span>
</template>
<span class="ds-action-svg-btn">
<span @click="handleLock" class="ds-action-svg-btn">
<img src="../../../assets/icons/lock.svg" class="SvgImg" />
</span>
</a-tooltip>
@ -32,7 +32,7 @@
<template #title>
<span>解除锁定</span>
</template>
<span class="ds-action-svg-btn">
<span @click="handleLock" class="ds-action-svg-btn">
<img src="../../../assets/icons/openLock.svg" class="SvgImg" />
</span>
</a-tooltip>
@ -91,7 +91,7 @@
</template>
<script setup lang="ts">
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 { formatParams } from '/@/hooks/web/common'
import { columns, searchFormSchema, detailColumns, feeColumns, feeColumnsSum } from './columns'
@ -174,7 +174,7 @@ function handleLock() {
ids: [...ids]
}
setLoading(true)
GeneralInvoiceSetLock(data).then(res => {
PaymentSettlementSetLock(data).then(res => {
if (res.succeeded) {
createMessage.success('操作成功')
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>
</span>
</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>
</template>
<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>
</BasicTable>
</div>
@ -124,7 +138,7 @@
</template>
<script setup lang="ts">
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 { formatParams } from '/@/hooks/web/common'
import { columns, searchFormSchema, detailColumns, feeColumns, feeColumnsSum } from './columns'
@ -269,6 +283,7 @@ function handleClick(row) {
}
loading.value = false
})
getfileList(row.id)
}
function tabChange(val) {
@ -284,6 +299,23 @@ function tabChange(val) {
}, 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() {
let ids = []
ids = getSelectRows().map((item) => {

@ -8,15 +8,13 @@
<template #tableTitle>
<div class="buttonGroup ">
<div class="tableTitleBox">
<div class="ds-h-aciton-btns-fee">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>新建</span>
</template>
<span class="ds-action-svg-btn">
<a-button @click="GoDetailed(false)" v-repeat type="link">
<img src="../../../assets/svg/infoclient/xinjian.svg" class="SvgImg" />
</a-button>
<span class="ds-action-svg-btn" @click="GoDetailed(false)">
<img src="../../../assets/svg/infoclient/xinjian.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
@ -25,9 +23,27 @@
</template>
<span class="ds-action-svg-btn">
<a-popconfirm title="确定删除当前选中数据?" @confirm="FnDel" ok-text="" cancel-text="">
<a-button v-repeat type="link">
<img src="../../../assets/svg/infoclient/shanchu.svg" class="SvgImg" />
</a-button>
<img src="../../../assets/svg/infoclient/shanchu.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="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>
</span>
</a-tooltip>
@ -41,14 +57,6 @@
<span class="iconfont icon-a-17Btuichu IconColor"></span>
导出EXCEL
</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>
</template>
<template v-slot:bodyCell="{ column, record }">
@ -64,9 +72,26 @@
]" />
</template>
<template v-if="column.key === 'currency'">
<span v-if="!record.currency" >原币申</span>
<span v-if="!record.currency"></span>
<span v-else>{{ record.currency }}</span>
</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>
</BasicTable>
</div>
@ -122,6 +147,7 @@ const [registerTable, { reload, getPaginationRef, getSelectRows, getRawDataSourc
pagination: true,
striped: true,
useSearchForm: true,
resizeHeightOffset: 15,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
@ -145,6 +171,11 @@ function GoDetailed(type, data) {
go(`/invoiceapplyDetail?type=add`)
}
}
const copyNo = (e, v) => {
e.stopPropagation()
navigator.clipboard.writeText(v)
createMessage.success("复制成功")
}
//
function FnDel() {
let ids = []
@ -258,9 +289,7 @@ async function printFee() {
height: calc(100vh - 145px);
}
.SvgImg {
width: 12px;
}
.tableTitleBox {
.ant-btn-link {
@ -272,8 +301,45 @@ async function printFee() {
}
}
.SvgImg {
width: 18px;
height: 18px;
margin: 6.8px;
}
.buttonGroup {
display: flex;
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>

@ -36,10 +36,10 @@
</span>
</a-tooltip>
</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>锁定
</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>未锁定
</div>
<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'">
<span class="iconfont icon-touzijilu"></span>自由开票
</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>普票
</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>红票
</div>
<div style="color: rgba(186, 56, 73, 1)" class="right-b" v-if="route.query.id">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>蓝票
</div>
</div> -->
<div>
<a-popconfirm title="确定申请开票吗?" ok-text="" cancel-text="" @confirm="handleIssue">
<a-button v-repeat type="link" v-if="route.query.id">

@ -91,6 +91,17 @@
</template>
</template>
</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>
</template>
@ -107,6 +118,8 @@ const go = useGo()
const [registerTable, { reload, setLoading, getSelectRows, getRawDataSource }] = useTable({
api: async (p) => {
const res: API.DataResult = await GeneralInvoiceGetList(p)
invoiceAmount.value = res.data.invoiceAmount
applyAmount.value = res.data.applyAmount
return new Promise((resolve) => {
resolve({ data: [...res.data.list], total: res.count })
})
@ -126,6 +139,7 @@ const [registerTable, { reload, setLoading, getSelectRows, getRawDataSource }] =
useSearchForm: true,
showTableSetting: true,
bordered: true,
resizeHeightOffset: 15,
showIndexColumn: true,
indexColumnProps: {
width: 60,
@ -139,7 +153,7 @@ const [registerTable, { reload, setLoading, getSelectRows, getRawDataSource }] =
fixed: 'right',
},
})
function FnDel(){
function FnDel() {
let ids = []
ids = getSelectRows().map((item) => {
return item.id
@ -162,6 +176,8 @@ function FnDel(){
setLoading(false)
})
}
const invoiceAmount = ref(0)
const applyAmount = ref(0)
function goDetail(type) {
go(`/invoiceIssueDetail?type=` + type)
}
@ -213,4 +229,27 @@ function GoDetailed(row) {
.SvgImg {
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>

Loading…
Cancel
Save