|
|
|
@ -3,9 +3,10 @@
|
|
|
|
|
<a-modal width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null">
|
|
|
|
|
<div style="padding-bottom:5px ;">
|
|
|
|
|
<div>
|
|
|
|
|
<BasicTable class="ds-table" @row-click="handleClick" @register="registerTable">
|
|
|
|
|
<BasicTable :rowClassName="rowClassName" class="ds-table" @row-click="handleClick"
|
|
|
|
|
@register="registerTable">
|
|
|
|
|
<template #right>
|
|
|
|
|
<div style="width: 40%;margin-left: 10px;margin-top:10px;">
|
|
|
|
|
<div style="width: 40%;margin-left: 10px;">
|
|
|
|
|
<div>
|
|
|
|
|
<BasicTable class="ds-table" @register="registerTable1">
|
|
|
|
|
<template #tableTitle>
|
|
|
|
@ -74,7 +75,8 @@
|
|
|
|
|
<a-modal width="1600px" @cancel="freeFlag = false" :visible="freeFlag" title="添加发票申请明细" :footer="null">
|
|
|
|
|
<div style="padding-bottom:5px ;">
|
|
|
|
|
<div>
|
|
|
|
|
<BasicTable class="ds-table" @row-click="handleClickFree" @register="registerTableFree">
|
|
|
|
|
<BasicTable :rowClassName="rowClassName" class="ds-table" @row-click="handleClickFree"
|
|
|
|
|
@register="registerTableFree">
|
|
|
|
|
<template #right>
|
|
|
|
|
<div style="width: 40%;margin-left: 10px;">
|
|
|
|
|
<div>
|
|
|
|
@ -120,22 +122,24 @@
|
|
|
|
|
<span v-if="record.businessType == 1">海运出口</span>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="main-statistic">
|
|
|
|
|
<span>选中合计:</span>
|
|
|
|
|
<span class="box">
|
|
|
|
|
<span class="title">RMB未开:</span>
|
|
|
|
|
<span class="count">{{ rmbTotal }}</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="box">
|
|
|
|
|
<span class="title">USD未开:</span>
|
|
|
|
|
<span class="count">{{ usdTotal }}</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="box">
|
|
|
|
|
<span class="title">其他未开:</span>
|
|
|
|
|
<span class="count">{{ otherTotal }}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicTable>
|
|
|
|
|
<div class="total">
|
|
|
|
|
<span style="margin-right: 10px;">合计:</span>
|
|
|
|
|
<span class="total-item">
|
|
|
|
|
<span class="text">RMB未开:</span>
|
|
|
|
|
<span class="number">{{ rmbTotal }}</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="total-item">
|
|
|
|
|
<span class="text">USD未开:</span>
|
|
|
|
|
<span class="number">{{ usdTotal }}</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="total-item">
|
|
|
|
|
<span class="text">其他未开:</span>
|
|
|
|
|
<span class="number">{{ otherTotal }}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-modal>
|
|
|
|
@ -213,16 +217,17 @@ const columnsFreeDetail = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
const queryDataFree = ref({})
|
|
|
|
|
const queryDataFree = ref({}) as any
|
|
|
|
|
const dataSource = ref([]) as any
|
|
|
|
|
const freeDetailList = ref([]) as any
|
|
|
|
|
const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, getRawDataSource, setLoading }] = useTable({
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
const res: API.DataResult = await GetApplicationList(p)
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
|
res.data.forEach((item, index) => {
|
|
|
|
|
item.amountUSDTotal = item.amountUSD
|
|
|
|
|
item.amountOtherTotal = item.amountOther
|
|
|
|
|
item.amountRMBTotal = item.amountRMB
|
|
|
|
|
item.cindex = index
|
|
|
|
|
})
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
resolve({ data: [...res.data], total: res.count })
|
|
|
|
@ -240,6 +245,9 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
|
|
|
|
|
showIndexColumn: false,
|
|
|
|
|
maxHeight: '600',
|
|
|
|
|
pagination: true,
|
|
|
|
|
rowKey: 'cindex',
|
|
|
|
|
id: '11',
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
rowSelection: {},
|
|
|
|
|
striped: true,
|
|
|
|
|
bordered: true,
|
|
|
|
@ -258,6 +266,8 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
|
|
|
|
|
dataSource: dataSource.value,
|
|
|
|
|
striped: true,
|
|
|
|
|
rowKey: 'recordId',
|
|
|
|
|
id: '22',
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
bordered: true,
|
|
|
|
|
indexColumnProps: {
|
|
|
|
|
width: 60,
|
|
|
|
@ -269,13 +279,16 @@ const [registerTableFree, { getForm: getFormFree, setSelectedRowKeys: setSelecte
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
const res: API.DataResult = await FreeInvoiceGetBizList(p)
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
res.data.forEach((item, index) => {
|
|
|
|
|
item.cindex = index
|
|
|
|
|
})
|
|
|
|
|
resolve({ data: [...res.data], total: res.count })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
beforeFetch: (p) => {
|
|
|
|
|
const data = formatParams(p)
|
|
|
|
|
data.otherQueryCondition = getFormFree().getFieldsValue().FeeRange
|
|
|
|
|
queryDataFree.value = JSON.parse(JSON.stringify(p))
|
|
|
|
|
queryDataFree.value = formatParams(p)
|
|
|
|
|
return data
|
|
|
|
|
},
|
|
|
|
|
columns: freeColums,
|
|
|
|
@ -289,6 +302,9 @@ const [registerTableFree, { getForm: getFormFree, setSelectedRowKeys: setSelecte
|
|
|
|
|
useSearchForm: true,
|
|
|
|
|
showIndexColumn: false,
|
|
|
|
|
maxHeight: '600',
|
|
|
|
|
rowKey: 'cindex',
|
|
|
|
|
id: '33',
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
pagination: true,
|
|
|
|
|
striped: true,
|
|
|
|
|
bordered: true,
|
|
|
|
@ -310,10 +326,9 @@ const [registerTableFreeDetail, { getSelectRows: getSelectRowsFeeDetail, setProp
|
|
|
|
|
dataSource: freeDetailList.value,
|
|
|
|
|
striped: true,
|
|
|
|
|
rowKey: 'recordId',
|
|
|
|
|
rowSelection: {
|
|
|
|
|
// onChange: onSelectAmount
|
|
|
|
|
},
|
|
|
|
|
bordered: true,
|
|
|
|
|
id: '44',
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
indexColumnProps: {
|
|
|
|
|
width: 60,
|
|
|
|
|
},
|
|
|
|
@ -324,12 +339,10 @@ const rmbTotal = ref(0)
|
|
|
|
|
const usdTotal = ref(0)
|
|
|
|
|
const otherTotal = ref(0)
|
|
|
|
|
function onSelectChange(selectedRowKeys) {
|
|
|
|
|
const list = getSelectRowsFree()
|
|
|
|
|
console.log(list, selectedRowKeys)
|
|
|
|
|
rmbTotal.value = 0
|
|
|
|
|
usdTotal.value = 0
|
|
|
|
|
otherTotal.value = 0
|
|
|
|
|
list.forEach(item => {
|
|
|
|
|
selectedRowKeys.forEach(item => {
|
|
|
|
|
rmbTotal.value += Number(item.unBilledRMB)
|
|
|
|
|
usdTotal.value += Number(item.unBilledUSD)
|
|
|
|
|
otherTotal.value += Number(item.unBilledOther)
|
|
|
|
@ -344,6 +357,12 @@ function handleAddDetial() {
|
|
|
|
|
}
|
|
|
|
|
changeApply()
|
|
|
|
|
}
|
|
|
|
|
function rowClassName(record, index) {
|
|
|
|
|
console
|
|
|
|
|
if (index == activeRow.value) {
|
|
|
|
|
return 'active-row'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function changeApply() {
|
|
|
|
|
const arr = getSelectRowsFeeDetail()
|
|
|
|
|
const exchangeArr = [] as any
|
|
|
|
@ -398,9 +417,29 @@ function addDetailFree() {
|
|
|
|
|
customerId: item.customerId
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
const queryDataStr = JSON.parse(queryDataFree.value.queryCondition)
|
|
|
|
|
const arrQuery = [] as any
|
|
|
|
|
queryDataStr.forEach(item => {
|
|
|
|
|
if (item.FieldName == 'feeType') {
|
|
|
|
|
arr.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.FieldName == 'currency') {
|
|
|
|
|
arr.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.FieldName == 'feeName') {
|
|
|
|
|
arr.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.FieldName == 'FeeRange') {
|
|
|
|
|
arr.push(item)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const data = {
|
|
|
|
|
items: freeList,
|
|
|
|
|
queryCondition: JSON.stringify(arrQuery)
|
|
|
|
|
}
|
|
|
|
|
currenciesData.value = []
|
|
|
|
|
exchangarr.value = []
|
|
|
|
|
GetCurrencies(freeList).then(res => {
|
|
|
|
|
GetCurrencies(data).then(res => {
|
|
|
|
|
const cuArr = [] as any
|
|
|
|
|
currenciesData.value = res.data
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
@ -522,8 +561,10 @@ function handleSureExhange() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const activeRow = ref(null)
|
|
|
|
|
function handleClick(record, index) {
|
|
|
|
|
setSelectedRowKeys([record.id])
|
|
|
|
|
setSelectedRowKeys([index])
|
|
|
|
|
activeRow.value = index
|
|
|
|
|
const data = {
|
|
|
|
|
ids: [record.id],
|
|
|
|
|
businessType: record.businessType,
|
|
|
|
@ -542,14 +583,34 @@ function handleClick(record, index) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function handleClickFree(record, index) {
|
|
|
|
|
setSelectedRowKeysFree([record.id])
|
|
|
|
|
setSelectedRowKeysFree([index])
|
|
|
|
|
const queryDataStr = JSON.parse(queryDataFree.value.queryCondition)
|
|
|
|
|
const arr = [] as any
|
|
|
|
|
queryDataStr.forEach(item => {
|
|
|
|
|
if (item.FieldName == 'feeType') {
|
|
|
|
|
arr.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.FieldName == 'currency') {
|
|
|
|
|
arr.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.FieldName == 'feeName') {
|
|
|
|
|
arr.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.FieldName == 'FeeRange') {
|
|
|
|
|
arr.push(item)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const data = {
|
|
|
|
|
id: record.id,
|
|
|
|
|
businessType: record.businessType,
|
|
|
|
|
customerId: record.customerId
|
|
|
|
|
items: [{
|
|
|
|
|
id: record.id,
|
|
|
|
|
businessType: record.businessType,
|
|
|
|
|
customerId: record.customerId
|
|
|
|
|
}],
|
|
|
|
|
queryCondition: JSON.stringify(arr)
|
|
|
|
|
}
|
|
|
|
|
activeRow.value = index
|
|
|
|
|
loading.value = true
|
|
|
|
|
FreeInvoiceGetFees([data]).then(res => {
|
|
|
|
|
FreeInvoiceGetFees(data).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
freeDetailList.value = res.data.items
|
|
|
|
|
freeDetailList.value.forEach(item => {
|
|
|
|
@ -568,7 +629,6 @@ function init(data) {
|
|
|
|
|
if (route.query.type == 'free') {
|
|
|
|
|
freeFlag.value = true
|
|
|
|
|
}
|
|
|
|
|
console.log(customerIdP.value)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (customerIdP.value) {
|
|
|
|
|
if (route.query.type == 'free') {
|
|
|
|
@ -581,6 +641,13 @@ function init(data) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
watch(
|
|
|
|
|
() => getSelectRowsFree(),
|
|
|
|
|
(data) => {
|
|
|
|
|
onSelectChange(data)
|
|
|
|
|
},
|
|
|
|
|
{ immediate: false, deep: true }
|
|
|
|
|
)
|
|
|
|
|
}, 200)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -781,4 +848,45 @@ defineExpose({ init, customerIdP })
|
|
|
|
|
/deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span {
|
|
|
|
|
color: #257afa;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.active-row) {
|
|
|
|
|
.ant-table-cell {
|
|
|
|
|
background: #dfe8f6;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.ant-table-footer) {
|
|
|
|
|
padding: 0px !important;
|
|
|
|
|
background: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.ant-table-container) {
|
|
|
|
|
padding: 0px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.main-statistic {
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
height: 34px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.count {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #257AFA;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.box {
|
|
|
|
|
background: #F5F9FC;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|