发票+任务+舱位

dev
sunzehua 3 weeks ago
parent 8603a27730
commit a31cac3de4

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

@ -44,7 +44,7 @@
</template> </template>
<template v-if="column.dataIndex == 'amount'"> <template v-if="column.dataIndex == 'amount'">
<a-input-number @change="onSelectChangeDetail" :precision="2" size="small" :controls="false" <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> </template>
<template #footer> <template #footer>
@ -112,12 +112,12 @@
</a-spin> </a-spin>
</div> </div>
</a-modal> </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="币别汇率折算"> title="币别汇率折算">
<div> <div>
<div v-for="(item, index) in exchangarr" :key="index"> <div v-for="(item, index) in exchangarr" :key="index">
<div style="margin-bottom: 15px;margin-top: 10px"> <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> =</span>
<a-input-number :addon-after="item.currencyFrom" :precision="4" size="small" :controls="false" <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, pagination: false,
striped: false, striped: false,
rowSelection: { rowSelection: {
onChange: onSelectChangeDetail onChange: onSelectChangeDetail,
fixed: true,
}, },
maxHeight: '900', maxHeight: '900',
bordered: true, bordered: true,
@ -314,6 +315,9 @@ const onRowClick = (record, index) => {
} }
PaymentFreeSettlementGetFees(data).then(res => { PaymentFreeSettlementGetFees(data).then(res => {
if (res.succeeded) { if (res.succeeded) {
res.data.items.forEach(item=>{
item.maxRestAmount = item.restAmount
})
setTableData(res.data.items) setTableData(res.data.items)
} }
loading.value = false loading.value = false
@ -554,8 +558,8 @@ function handleSureExhange() {
list.forEach(item => { list.forEach(item => {
item.originalCurrency = item.currency item.originalCurrency = item.currency
item.currency = currency.value item.currency = currency.value
item.originalAmount = item.amount item.originalAmount = item.restAmount
item.amount = Number((Number(item.amount) * Number(item.exchangeRate)).toFixed(2)) item.restAmount = Number((Number(item.restAmount) * Number(item.exchangeRate)).toFixed(2))
}) })
emits('updateListFree', list, currency.value) emits('updateListFree', list, currency.value)
} }
@ -645,7 +649,7 @@ function onSelectChangeDetail() {
if (route.query.type == 'free') { if (route.query.type == 'free') {
totalAmount.value = 0 totalAmount.value = 0
list.forEach(item => { list.forEach(item => {
totalAmount.value += Number(item.amount) totalAmount.value += Number(item.restAmount)
}) })
} }
} }

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

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

@ -96,18 +96,18 @@
</div> </div>
</div> </div>
</a-modal> </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="币别汇率折算"> title="币别汇率折算">
<div v-for="(item, index) in exchangeData" :key="index"> <div v-for="(item, index) in exchangeData" :key="index">
<div style="margin-bottom: 15px;margin-top: 10px"> <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> =</span>
<a-input-number addon-after="RMB" :precision="4" size="small" :controls="false" <a-input-number addon-after="RMB" :precision="4" size="small" :controls="false"
v-model:value="item.reverseRate" /> v-model:value="item.reverseRate" />
</div> </div>
<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" <a-input-number :addon-after="item.currencyTo" :precision="4" size="small" :controls="false"
v-model:value="item.rate" /> v-model:value="item.rate" />
</div> </div>

@ -60,11 +60,11 @@
</div> </div>
</div> </div>
</a-modal> </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="币别汇率折算"> title="币别汇率折算">
<div v-for="(item, index) in exchangarr" :key="index"> <div v-for="(item, index) in exchangarr" :key="index">
<div style="margin-bottom: 15px;margin-top: 10px"> <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> =</span>
<a-input-number addon-after="RMB" :precision="4" size="small" :controls="false" <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({ const [registerTable, { reload, setProps, getForm, getSelectRows, setColumns, setLoading }] = useTable({
api: async (p) => { api: async (p) => {
const res: API.DataResult = await GetPageAsync(p) const res: API.DataResult = await GetPageAsync(p)
console.log(res)
return new Promise((resolve) => { return new Promise((resolve) => {
res.data.forEach((item) => { res.data.forEach((item) => {
if (item.recvUserList) { if (item.recvUserList) {

Loading…
Cancel
Save