207ead01 by zhangmeng

民生付

1 parent 7b0fa146
......@@ -85,7 +85,7 @@
min-width="100" prop="insuranceFee"
>
<template #default="scope">
<span class="text-primary">{{ language == 0 ? '¥' : '€' }}{{ scope.row.insuranceFee }}</span>
<span class="text-primary">{{ payType != 3 ? '¥' : '€' }}{{ payType != 3?scope.row.insuranceFee:scope.row.insuranceFeeEn }}</span>
</template>
</el-table-column>
<!-- 补充信息-->
......@@ -122,7 +122,7 @@
</div>
<div v-if="showSummary" style="display: inline-block">
{{ language == 0 ? '金额小计' : 'Amount' }}: <span>{{ language == 0 ? '¥' : '€' }}{{ total }}</span>
{{ language == 0 ? '金额小计' : 'Amount' }}: <span>{{ payType != 3 ? '¥' : '€' }}{{ total }}</span>
</div>
</div>
......@@ -162,6 +162,11 @@ const props = defineProps({
type: Number,
required: false,
default: 0
},
payType: {
type: String,
required: false,
default: ''
}
})
import { useStorage } from '@vueuse/core/index'
......@@ -194,8 +199,6 @@ function getMatch() {
})
}
function totalMethod() {
}
</script>
<style lang="scss" scoped>
......
<template>
<div class="mt20"></div>
<div class="mt20" />
<el-table :data="list" border style="width: 100%">
<el-table-column :label="language==0?'序号':'Index'" type="index" width="70" align="center"/>
<el-table-column :label="language==0?'组别代码':'EVENT code'" width="120px" align="center" prop="project.code"/>
<el-table-column :label="language==0?'序号':'Index'" type="index" width="70" align="center" />
<el-table-column :label="language==0?'组别代码':'EVENT code'" width="120px" align="center" prop="project.code" />
<el-table-column :label="language==0?'组别':'EVENT'" min-width="150px" header-align="center" prop="project.name">
<template #default="scope">
<el-tooltip effect="dark" :content="scope.row.project.name">
<div class="esp">{{scope.row.project.name}}</div>
<div class="esp">{{ scope.row.project.name }}</div>
</el-tooltip>
</template>
</el-table-column>
<el-table-column :label="language==0?'舞种':'DISCIPLINE'" align="center" width="120px" prop="project.danceType"/>
<el-table-column :label="language==0?'舞种':'DISCIPLINE'" align="center" width="120px" prop="project.danceType" />
<el-table-column :label="language==0?'参赛说明':'Participation Instructions'" header-align="center" min-width="160px">
<template #default="scope">
<el-tooltip effect="dark" :content="scope.row.project.remarks">
<div class="esp" v-html="scope.row.project.remarks"></div>
<div class="esp" v-html="scope.row.project.remarks" />
</el-tooltip>
</template>
</el-table-column>
......@@ -22,10 +22,10 @@
<template #default="scope">
<el-tooltip effect="dark">
<template #content>
<span v-for="s in scope.row.athletes">{{ s.name }},</span>
<span v-for="s in scope.row.athletes" :key="s">{{ s.name }},</span>
</template>
<div class="esp">
<span v-for="s in scope.row.athletes">{{ s.name }},</span>
<span v-for="s in scope.row.athletes" :key="s">{{ s.name }},</span>
</div>
</el-tooltip>
</template>
......@@ -33,14 +33,22 @@
<el-table-column :label="language==0?'参赛服务费':'REGISTRATION FEE'" align="center" width="150px" prop="">
<template #default="scope">
<div class="text-primary">
{{ language==0?'¥':'€' }}{{ scope.row.project.chargeType == '0'?scope.row.project.serviceFee : scope.row.project.serviceFee * scope.row.athletes.length }}
<!-- // chargeType 0 按项目收费 1按人数收费-->
{{ payType!=3?'¥':'€' }}
<span v-if="scope.row.project.chargeType == '0'">
{{ payType!=3? scope.row.project.serviceFee:scope.row.project.serviceFeeEn }}
</span>
<span v-else>
{{ payType!=3? scope.row.project.serviceFee * scope.row.athletes.length:scope.row.project.serviceFeeEn * scope.row.athletes.length }}
</span>
<!-- {{ scope.row.project.chargeType == '0'?scope.row.project.serviceFee : scope.row.project.serviceFee * scope.row.athletes.length }}-->
</div>
</template>
</el-table-column>
<el-table-column v-if="hasAction" :label="language==0?'操作':'Actions'" fixed="right" width="150" align="center">
<template #default="scope">
<el-button type="primary" link @click="remove(scope.row.signId)">
{{language == 0 ? '删除' : 'Delete' }}
{{ language == 0 ? '删除' : 'Delete' }}
</el-button>
</template>
......@@ -50,13 +58,13 @@
<div>
{{ language==0?'总报项数':'Count' }}: <span class="mr20">{{ list.length }}</span>
{{ language==0?'金额小计':'Amount' }}: <span>{{ language==0?'¥':'€' }}{{ total }}</span>
{{ language==0?'金额小计':'Amount' }}: <span>{{ payType!=3?'¥':'€' }}{{ total }}</span>
</div>
</div>
</template>
<script setup>
import {useStorage} from "@vueuse/core/index";
import { useStorage } from '@vueuse/core/index'
const emit = defineEmits(['delete'])
const props = defineProps({
......@@ -64,23 +72,28 @@ const props = defineProps({
type: Array,
required: true
},
hasAction:{
hasAction: {
type: Boolean,
required: false,
default: true
},
showSummary:{
showSummary: {
type: Boolean,
required: false,
default: false
},
total:{
total: {
type: Number,
required: false,
default: 0
},
payType: {
type: String,
required: false,
default: ''
}
})
const language= useStorage('language',0)
const language = useStorage('language', 0)
const remove = (id) => {
emit('delete', id)
}
......
......@@ -592,7 +592,6 @@ function getMatch(id) {
loading.value = true
match.getMatchById({ id: id }).then(res => {
matchData.value = res.data
console.log(666666, matchData.value)
loading.value = false
const today = dayjs().format('YYYY-MM-DD HH:mm:ss')
time.value = dayjs(res.data.signEndTime).diff(today, 'millisecond')
......
......@@ -55,7 +55,9 @@
:list="signInfoList"
:match-id="matchId"
:show-summary="route.query.buy=='1'"
:total="signTotal" class="mt20"
:total="language==0? signTotal:signTotalEn"
class="mt20"
:pay-type="language==1?3:4"
/>
</div>
<div class="mt20">
......@@ -71,7 +73,8 @@
:has-action="false"
:list="zuTableList"
:show-summary="true"
:total="zuTotal"
:total="language==0? zuTotal:zuTotalEn"
:pay-type="language==1?3:4"
class="mt20"
/>
</div>
......@@ -171,7 +174,9 @@ const signInfoList = ref([])
const signEndTime = ref('')
const zuTableList = ref([])
const zuTotal = ref(0)
const zuTotalEn = ref(0)
const signTotal = ref(0)
const signTotalEn = ref(0)
const groupId = ref(route.query.groupId || 0)
const matchId = ref(route.query.matchId)
const isNational = ref(route.query.isNational || false)
......@@ -215,41 +220,51 @@ function getMyMemberTable() {
function getSignList() {
match.getMySignInfoList(zuQuery.value).then(res => {
zuTotal.value = 0
zuTotalEn.value = 0
signTotal.value = 0
signTotalEn.value = 0
signInfoList.value = res.data.singleData
console.log(signInfoList.value)
zuTableList.value = res.data.zuData
for (var s of signInfoList.value) {
signTotal.value = (Number(signTotal.value) + Number(s.insuranceFee)).toFixed(2)
signTotalEn.value = (Number(signTotalEn.value) + Number(s.insuranceFeeEn)).toFixed(2)
}
// for (var z of zuTableList.value) {
// zuTotal.value = (Number(zuTotal.value) + Number(z.project.serviceFee)).toFixed(2)
// }
// for (var z of zuTableList.value) {
// zuTotal.value = (Number(zuTotal.value) + Number(z.project.serviceFee)).toFixed(2)
// }
for (const z of zuTableList.value) {
if (!z.project) {
continue;
continue
}
const serviceFee = Number(z.project.serviceFee) || 0;
const serviceFee = Number(z.project.serviceFee) || 0
const serviceFeeEn = Number(z.project.serviceFeeEn) || 0
const chargeType = String(z.project.chargeType).trim();
const chargeType = String(z.project.chargeType).trim()
let currentItemFee = 0;
let currentItemFee = 0
let currentItemFeeEn = 0
if (chargeType === '0') {
currentItemFee = serviceFee;
currentItemFee = serviceFee
currentItemFeeEn = serviceFeeEn
} else if (chargeType === '1') {
const athletesLength = z.athletes?.length || 0;
currentItemFee = serviceFee * athletesLength;
const athletesLength = z.athletes?.length || 0
currentItemFee = serviceFee * athletesLength
currentItemFeeEn = serviceFeeEn * athletesLength
} else {
currentItemFee = 0;
currentItemFee = 0
currentItemFeeEn = 0
}
zuTotal.value += currentItemFee;
zuTotal.value += currentItemFee
zuTotalEn.value += currentItemFeeEn
}
zuTotal.value = zuTotal.value.toFixed(2);
zuTotal.value = zuTotal.value.toFixed(2)
zuTotalEn.value = zuTotalEn.value.toFixed(2)
})
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!