发票+任务+舱位

zth
sunzehua 3 weeks ago
parent 8603a27730
commit a31cac3de4

@ -1403,7 +1403,7 @@ export const freeColum: BasicColumn[] = [
},
{
title: '结算金额',
dataIndex: 'settlementAmount',
dataIndex: 'applyAmount',
width: 100,
},
{

@ -44,7 +44,7 @@
</template>
<template v-if="column.dataIndex == 'amount'">
<a-input-number @change="onSelectChangeDetail" :precision="2" size="small" :controls="false"
:max="record.restAmount" v-model:value="record.amount" />
:max="record.maxRestAmount" v-model:value="record.restAmount" />
</template>
</template>
<template #footer>
@ -112,12 +112,12 @@
</a-spin>
</div>
</a-modal>
<a-modal width="400px" @cancel="exchangeFlag = false" @ok="handleSureExhange" :visible="exchangeFlag"
<a-modal width="500px" @cancel="exchangeFlag = false" @ok="handleSureExhange" :visible="exchangeFlag"
title="币别汇率折算">
<div>
<div v-for="(item, index) in exchangarr" :key="index">
<div style="margin-bottom: 15px;margin-top: 10px">
<span class="bold" style="margin-right: 10px;width:46px;display: inline-block">1{{ item.currencyTo
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1{{ item.currencyTo
}}
=</span>
<a-input-number :addon-after="item.currencyFrom" :precision="4" size="small" :controls="false"
@ -202,7 +202,8 @@ const [registerTable1, { getSelectRows: getSelectRowsDetail, setTableData }] = u
pagination: false,
striped: false,
rowSelection: {
onChange: onSelectChangeDetail
onChange: onSelectChangeDetail,
fixed: true,
},
maxHeight: '900',
bordered: true,
@ -314,6 +315,9 @@ const onRowClick = (record, index) => {
}
PaymentFreeSettlementGetFees(data).then(res => {
if (res.succeeded) {
res.data.items.forEach(item=>{
item.maxRestAmount = item.restAmount
})
setTableData(res.data.items)
}
loading.value = false
@ -554,8 +558,8 @@ function handleSureExhange() {
list.forEach(item => {
item.originalCurrency = item.currency
item.currency = currency.value
item.originalAmount = item.amount
item.amount = Number((Number(item.amount) * Number(item.exchangeRate)).toFixed(2))
item.originalAmount = item.restAmount
item.restAmount = Number((Number(item.restAmount) * Number(item.exchangeRate)).toFixed(2))
})
emits('updateListFree', list, currency.value)
}
@ -645,7 +649,7 @@ function onSelectChangeDetail() {
if (route.query.type == 'free') {
totalAmount.value = 0
list.forEach(item => {
totalAmount.value += Number(item.amount)
totalAmount.value += Number(item.restAmount)
})
}
}

@ -1384,7 +1384,7 @@ export const freeColum: BasicColumn[] = [
},
{
title: '结算金额',
dataIndex: 'settlementAmount',
dataIndex: 'applyAmount',
width: 100,
},
{

@ -44,7 +44,7 @@
</template>
<template v-if="column.dataIndex == 'amount'">
<a-input-number @change="onSelectChangeDetail" :precision="2" size="small" :controls="false"
:max="record.restAmount" v-model:value="record.amount" />
:max="record.maxRestAmount" v-model:value="record.restAmount" />
</template>
</template>
<template #footer>
@ -112,12 +112,12 @@
</a-spin>
</div>
</a-modal>
<a-modal width="400px" @cancel="exchangeFlag = false" @ok="handleSureExhange" :visible="exchangeFlag"
<a-modal width="500px" @cancel="exchangeFlag = false" @ok="handleSureExhange" :visible="exchangeFlag"
title="币别汇率折算">
<div>
<div v-for="(item, index) in exchangarr" :key="index">
<div style="margin-bottom: 15px;margin-top: 10px">
<span class="bold" style="margin-right: 10px;width:46px;display: inline-block">1{{ item.currencyTo
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1{{ item.currencyTo
}}
=</span>
<a-input-number :addon-after="item.currencyFrom" :precision="4" size="small" :controls="false"
@ -202,7 +202,8 @@ const [registerTable1, { getSelectRows: getSelectRowsDetail, setTableData }] = u
pagination: false,
striped: false,
rowSelection: {
onChange: onSelectChangeDetail
onChange: onSelectChangeDetail,
fixed: true,
},
maxHeight: '900',
bordered: true,
@ -314,6 +315,9 @@ const onRowClick = (record, index) => {
}
PaymentFreeSettlementGetFees(data).then(res => {
if (res.succeeded) {
res.data.items.forEach(item=>{
item.maxRestAmount = item.restAmount
})
setTableData(res.data.items)
}
loading.value = false
@ -555,8 +559,8 @@ function handleSureExhange() {
list.forEach(item => {
item.originalCurrency = item.currency
item.currency = currency.value
item.originalAmount = item.amount
item.amount = Number((Number(item.amount) * Number(item.exchangeRate)).toFixed(2))
item.originalAmount = item.restAmount
item.restAmount = Number((Number(item.restAmount) * Number(item.exchangeRate)).toFixed(2))
})
emits('updateListFree', list, currency.value)
}
@ -642,11 +646,12 @@ function init() {
}
const totalAmount = ref(0)
function onSelectChangeDetail() {
console.log('list', 111)
const list = getSelectRowsDetail()
if (route.query.type == 'free') {
totalAmount.value = 0
list.forEach(item => {
totalAmount.value += Number(item.amount)
totalAmount.value += Number(item.restAmount)
})
}
}

@ -96,18 +96,18 @@
</div>
</div>
</a-modal>
<a-modal width="400px" @cancel="exchangeFlag = false" @ok="handleSureExhange" :visible="exchangeFlag"
<a-modal width="500px" @cancel="exchangeFlag = false" @ok="handleSureExhange" :visible="exchangeFlag"
title="币别汇率折算">
<div v-for="(item, index) in exchangeData" :key="index">
<div style="margin-bottom: 15px;margin-top: 10px">
<span class="bold" style="margin-right: 10px;width:46px;display: inline-block">1{{ item.currencyTo
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1{{ item.currencyTo
}}
=</span>
<a-input-number addon-after="RMB" :precision="4" size="small" :controls="false"
v-model:value="item.reverseRate" />
</div>
<div>
<span class="bold" style="margin-right: 10px;width:46px;display: inline-block">1RMB =</span>
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1RMB =</span>
<a-input-number :addon-after="item.currencyTo" :precision="4" size="small" :controls="false"
v-model:value="item.rate" />
</div>

@ -60,11 +60,11 @@
</div>
</div>
</a-modal>
<a-modal width="400px" @cancel="exchangeFlag = false" @ok="handleSureExhange" :visible="exchangeFlag"
<a-modal width="500px" @cancel="exchangeFlag = false" @ok="handleSureExhange" :visible="exchangeFlag"
title="币别汇率折算">
<div v-for="(item, index) in exchangarr" :key="index">
<div style="margin-bottom: 15px;margin-top: 10px">
<span class="bold" style="margin-right: 10px;width:46px;display: inline-block">1{{ item.currencyTo
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1{{ item.currencyTo
}}
=</span>
<a-input-number addon-after="RMB" :precision="4" size="small" :controls="false"

@ -843,7 +843,6 @@ const columns = [
const [registerTable, { reload, setProps, getForm, getSelectRows, setColumns, setLoading }] = useTable({
api: async (p) => {
const res: API.DataResult = await GetPageAsync(p)
console.log(res)
return new Promise((resolve) => {
res.data.forEach((item) => {
if (item.recvUserList) {

Loading…
Cancel
Save