|
|
@ -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,
|
|
|
@ -157,7 +157,7 @@ const [registerTable, { setTableData,setSelectedRowKeys }] = useTable({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
canResize: true,
|
|
|
|
canResize: true,
|
|
|
|
showTableSetting: true,
|
|
|
|
showTableSetting: true,
|
|
|
|
id:'1',
|
|
|
|
id: '1',
|
|
|
|
immediate: false,
|
|
|
|
immediate: false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee, setTableData: setTableData1 }] = useTable({
|
|
|
|
const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee, setTableData: setTableData1 }] = useTable({
|
|
|
@ -172,63 +172,83 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
|
|
|
|
width: 60,
|
|
|
|
width: 60,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
showTableSetting: true,
|
|
|
|
showTableSetting: true,
|
|
|
|
id:'2',
|
|
|
|
id: '2',
|
|
|
|
canResize: true,
|
|
|
|
canResize: true,
|
|
|
|
immediate: false,
|
|
|
|
immediate: false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
function ClickLast(type) {
|
|
|
|
function ClickLast(type) {
|
|
|
|
const data = {
|
|
|
|
const data = {
|
|
|
|
"queryCondition": "[]",
|
|
|
|
"queryCondition": "[]",
|
|
|
|
"pageCondition": {
|
|
|
|
"pageCondition": {
|
|
|
|
"pageIndex": 1,
|
|
|
|
"pageIndex": 1,
|
|
|
|
"pageSize": 100,
|
|
|
|
"pageSize": 100,
|
|
|
|
"sortConditions": []
|
|
|
|
"sortConditions": []
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let indexQuery = 0
|
|
|
|
}
|
|
|
|
let list = []
|
|
|
|
let indexQuery = 0
|
|
|
|
PaymentSettlementGetList(data).then(res => {
|
|
|
|
let list = []
|
|
|
|
list = res.data.list
|
|
|
|
PaymentSettlementGetList(data).then(res => {
|
|
|
|
res.data.list.forEach((item, index) => {
|
|
|
|
list = res.data.list
|
|
|
|
if (item.id == route.query.id) {
|
|
|
|
res.data.list.forEach((item, index) => {
|
|
|
|
indexQuery = 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)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
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') {
|
|
|
|
if (route.query.type == 'invoice') {
|
|
|
|
invoiceTableRef.value.customerIdP = form.value.customerId
|
|
|
|
invoiceTableRef.value.customerIdP = form.value.customerId
|
|
|
|
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('')
|
|
|
@ -243,7 +263,7 @@ onMounted(() => {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const invoiceFileRef = ref('')
|
|
|
|
const invoiceFileRef = ref('')
|
|
|
|
function openFile() {
|
|
|
|
function openFile() {
|
|
|
|
invoiceFileRef.value.init()
|
|
|
|
invoiceFileRef.value.init()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 发票结算
|
|
|
|
// 发票结算
|
|
|
|
function updateList(arr, currency) {
|
|
|
|
function updateList(arr, currency) {
|
|
|
@ -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()
|
|
|
@ -306,7 +328,7 @@ function getDetail() {
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
InvoiceSettlementGet({ id: route.query.id }).then(res => {
|
|
|
|
InvoiceSettlementGet({ id: route.query.id }).then(res => {
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
|
form.value = JSON.parse(JSON.stringify(res.data))
|
|
|
|
form.value = JSON.parse(JSON.stringify(res.data))
|
|
|
|
delete form.value.details
|
|
|
|
delete form.value.details
|
|
|
|
res.data.currencyAmount = res.data.currency + '/' + res.data.amount
|
|
|
|
res.data.currencyAmount = res.data.currency + '/' + res.data.amount
|
|
|
|
setFieldsValueMark(res.data)
|
|
|
|
setFieldsValueMark(res.data)
|
|
|
@ -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;
|
|
|
|