|
|
@ -3,9 +3,10 @@
|
|
|
|
<a-modal width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null">
|
|
|
|
<a-modal width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null">
|
|
|
|
<div style="padding-bottom:5px ;">
|
|
|
|
<div style="padding-bottom:5px ;">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<BasicTable :rowClassName="rowClassName" class="ds-table" @row-click="handleClick" @register="registerTable">
|
|
|
|
<BasicTable :rowClassName="rowClassName" class="ds-table" @row-click="handleClick"
|
|
|
|
|
|
|
|
@register="registerTable">
|
|
|
|
<template #right>
|
|
|
|
<template #right>
|
|
|
|
<div style="width: 40%;margin-left: 10px;margin-top:10px;">
|
|
|
|
<div style="width: 40%;margin-left: 10px;">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<BasicTable class="ds-table" @register="registerTable1">
|
|
|
|
<BasicTable class="ds-table" @register="registerTable1">
|
|
|
|
<template #tableTitle>
|
|
|
|
<template #tableTitle>
|
|
|
@ -74,7 +75,8 @@
|
|
|
|
<a-modal width="1600px" @cancel="freeFlag = false" :visible="freeFlag" title="添加发票申请明细" :footer="null">
|
|
|
|
<a-modal width="1600px" @cancel="freeFlag = false" :visible="freeFlag" title="添加发票申请明细" :footer="null">
|
|
|
|
<div style="padding-bottom:5px ;">
|
|
|
|
<div style="padding-bottom:5px ;">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<BasicTable class="ds-table" @row-click="handleClickFree" @register="registerTableFree">
|
|
|
|
<BasicTable :rowClassName="rowClassName" class="ds-table" @row-click="handleClickFree"
|
|
|
|
|
|
|
|
@register="registerTableFree">
|
|
|
|
<template #right>
|
|
|
|
<template #right>
|
|
|
|
<div style="width: 40%;margin-left: 10px;">
|
|
|
|
<div style="width: 40%;margin-left: 10px;">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
@ -219,10 +221,11 @@ const freeDetailList = ref([]) as any
|
|
|
|
const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, getRawDataSource, setLoading }] = useTable({
|
|
|
|
const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, getRawDataSource, setLoading }] = useTable({
|
|
|
|
api: async (p) => {
|
|
|
|
api: async (p) => {
|
|
|
|
const res: API.DataResult = await GetApplicationList(p)
|
|
|
|
const res: API.DataResult = await GetApplicationList(p)
|
|
|
|
res.data.forEach(item => {
|
|
|
|
res.data.forEach((item, index) => {
|
|
|
|
item.amountUSDTotal = item.amountUSD
|
|
|
|
item.amountUSDTotal = item.amountUSD
|
|
|
|
item.amountOtherTotal = item.amountOther
|
|
|
|
item.amountOtherTotal = item.amountOther
|
|
|
|
item.amountRMBTotal = item.amountRMB
|
|
|
|
item.amountRMBTotal = item.amountRMB
|
|
|
|
|
|
|
|
item.cindex = index
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
resolve({ data: [...res.data], total: res.count })
|
|
|
|
resolve({ data: [...res.data], total: res.count })
|
|
|
@ -240,6 +243,9 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
|
|
|
|
showIndexColumn: false,
|
|
|
|
showIndexColumn: false,
|
|
|
|
maxHeight: '600',
|
|
|
|
maxHeight: '600',
|
|
|
|
pagination: true,
|
|
|
|
pagination: true,
|
|
|
|
|
|
|
|
rowKey: 'cindex',
|
|
|
|
|
|
|
|
id: '11',
|
|
|
|
|
|
|
|
showTableSetting: true,
|
|
|
|
rowSelection: {},
|
|
|
|
rowSelection: {},
|
|
|
|
striped: true,
|
|
|
|
striped: true,
|
|
|
|
bordered: true,
|
|
|
|
bordered: true,
|
|
|
@ -258,6 +264,8 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
|
|
|
|
dataSource: dataSource.value,
|
|
|
|
dataSource: dataSource.value,
|
|
|
|
striped: true,
|
|
|
|
striped: true,
|
|
|
|
rowKey: 'recordId',
|
|
|
|
rowKey: 'recordId',
|
|
|
|
|
|
|
|
id: '22',
|
|
|
|
|
|
|
|
showTableSetting: true,
|
|
|
|
bordered: true,
|
|
|
|
bordered: true,
|
|
|
|
indexColumnProps: {
|
|
|
|
indexColumnProps: {
|
|
|
|
width: 60,
|
|
|
|
width: 60,
|
|
|
@ -269,6 +277,9 @@ const [registerTableFree, { getForm: getFormFree, setSelectedRowKeys: setSelecte
|
|
|
|
api: async (p) => {
|
|
|
|
api: async (p) => {
|
|
|
|
const res: API.DataResult = await FreeInvoiceGetBizList(p)
|
|
|
|
const res: API.DataResult = await FreeInvoiceGetBizList(p)
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
|
|
|
res.data.forEach((item, index) => {
|
|
|
|
|
|
|
|
item.cindex = index
|
|
|
|
|
|
|
|
})
|
|
|
|
resolve({ data: [...res.data], total: res.count })
|
|
|
|
resolve({ data: [...res.data], total: res.count })
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -289,6 +300,9 @@ const [registerTableFree, { getForm: getFormFree, setSelectedRowKeys: setSelecte
|
|
|
|
useSearchForm: true,
|
|
|
|
useSearchForm: true,
|
|
|
|
showIndexColumn: false,
|
|
|
|
showIndexColumn: false,
|
|
|
|
maxHeight: '600',
|
|
|
|
maxHeight: '600',
|
|
|
|
|
|
|
|
rowKey: 'cindex',
|
|
|
|
|
|
|
|
id: '33',
|
|
|
|
|
|
|
|
showTableSetting: true,
|
|
|
|
pagination: true,
|
|
|
|
pagination: true,
|
|
|
|
striped: true,
|
|
|
|
striped: true,
|
|
|
|
bordered: true,
|
|
|
|
bordered: true,
|
|
|
@ -310,10 +324,9 @@ const [registerTableFreeDetail, { getSelectRows: getSelectRowsFeeDetail, setProp
|
|
|
|
dataSource: freeDetailList.value,
|
|
|
|
dataSource: freeDetailList.value,
|
|
|
|
striped: true,
|
|
|
|
striped: true,
|
|
|
|
rowKey: 'recordId',
|
|
|
|
rowKey: 'recordId',
|
|
|
|
rowSelection: {
|
|
|
|
|
|
|
|
// onChange: onSelectAmount
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
bordered: true,
|
|
|
|
bordered: true,
|
|
|
|
|
|
|
|
id: '44',
|
|
|
|
|
|
|
|
showTableSetting: true,
|
|
|
|
indexColumnProps: {
|
|
|
|
indexColumnProps: {
|
|
|
|
width: 60,
|
|
|
|
width: 60,
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -324,12 +337,10 @@ const rmbTotal = ref(0)
|
|
|
|
const usdTotal = ref(0)
|
|
|
|
const usdTotal = ref(0)
|
|
|
|
const otherTotal = ref(0)
|
|
|
|
const otherTotal = ref(0)
|
|
|
|
function onSelectChange(selectedRowKeys) {
|
|
|
|
function onSelectChange(selectedRowKeys) {
|
|
|
|
const list = getSelectRowsFree()
|
|
|
|
|
|
|
|
console.log(list, selectedRowKeys)
|
|
|
|
|
|
|
|
rmbTotal.value = 0
|
|
|
|
rmbTotal.value = 0
|
|
|
|
usdTotal.value = 0
|
|
|
|
usdTotal.value = 0
|
|
|
|
otherTotal.value = 0
|
|
|
|
otherTotal.value = 0
|
|
|
|
list.forEach(item => {
|
|
|
|
selectedRowKeys.forEach(item => {
|
|
|
|
rmbTotal.value += Number(item.unBilledRMB)
|
|
|
|
rmbTotal.value += Number(item.unBilledRMB)
|
|
|
|
usdTotal.value += Number(item.unBilledUSD)
|
|
|
|
usdTotal.value += Number(item.unBilledUSD)
|
|
|
|
otherTotal.value += Number(item.unBilledOther)
|
|
|
|
otherTotal.value += Number(item.unBilledOther)
|
|
|
@ -345,6 +356,7 @@ function handleAddDetial() {
|
|
|
|
changeApply()
|
|
|
|
changeApply()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function rowClassName(record, index) {
|
|
|
|
function rowClassName(record, index) {
|
|
|
|
|
|
|
|
console
|
|
|
|
if (index == activeRow.value) {
|
|
|
|
if (index == activeRow.value) {
|
|
|
|
return 'active-row'
|
|
|
|
return 'active-row'
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -529,7 +541,7 @@ function handleSureExhange() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const activeRow = ref(null)
|
|
|
|
const activeRow = ref(null)
|
|
|
|
function handleClick(record, index) {
|
|
|
|
function handleClick(record, index) {
|
|
|
|
setSelectedRowKeys([record.id])
|
|
|
|
setSelectedRowKeys([index])
|
|
|
|
activeRow.value = index
|
|
|
|
activeRow.value = index
|
|
|
|
const data = {
|
|
|
|
const data = {
|
|
|
|
ids: [record.id],
|
|
|
|
ids: [record.id],
|
|
|
@ -549,12 +561,13 @@ function handleClick(record, index) {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function handleClickFree(record, index) {
|
|
|
|
function handleClickFree(record, index) {
|
|
|
|
setSelectedRowKeysFree([record.id])
|
|
|
|
setSelectedRowKeysFree([index])
|
|
|
|
const data = {
|
|
|
|
const data = {
|
|
|
|
id: record.id,
|
|
|
|
id: record.id,
|
|
|
|
businessType: record.businessType,
|
|
|
|
businessType: record.businessType,
|
|
|
|
customerId: record.customerId
|
|
|
|
customerId: record.customerId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
activeRow.value = index
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
FreeInvoiceGetFees([data]).then(res => {
|
|
|
|
FreeInvoiceGetFees([data]).then(res => {
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
@ -575,7 +588,6 @@ function init(data) {
|
|
|
|
if (route.query.type == 'free') {
|
|
|
|
if (route.query.type == 'free') {
|
|
|
|
freeFlag.value = true
|
|
|
|
freeFlag.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(customerIdP.value)
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
if (customerIdP.value) {
|
|
|
|
if (customerIdP.value) {
|
|
|
|
if (route.query.type == 'free') {
|
|
|
|
if (route.query.type == 'free') {
|
|
|
@ -588,6 +600,13 @@ function init(data) {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
|
|
|
() => getSelectRowsFree(),
|
|
|
|
|
|
|
|
(data) => {
|
|
|
|
|
|
|
|
onSelectChange(data)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{ immediate: false, deep: true }
|
|
|
|
|
|
|
|
)
|
|
|
|
}, 200)
|
|
|
|
}, 200)
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -788,6 +807,7 @@ defineExpose({ init, customerIdP })
|
|
|
|
/deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span {
|
|
|
|
/deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span {
|
|
|
|
color: #257afa;
|
|
|
|
color: #257afa;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.active-row) {
|
|
|
|
:deep(.active-row) {
|
|
|
|
.ant-table-cell {
|
|
|
|
.ant-table-cell {
|
|
|
|
background: #dfe8f6;
|
|
|
|
background: #dfe8f6;
|
|
|
|