民生付
Showing
5 changed files
with
73 additions
and
43 deletions
| ... | @@ -85,7 +85,7 @@ | ... | @@ -85,7 +85,7 @@ |
| 85 | min-width="100" prop="insuranceFee" | 85 | min-width="100" prop="insuranceFee" |
| 86 | > | 86 | > |
| 87 | <template #default="scope"> | 87 | <template #default="scope"> |
| 88 | <span class="text-primary">{{ language == 0 ? '¥' : '€' }}{{ scope.row.insuranceFee }}</span> | 88 | <span class="text-primary">{{ payType != 3 ? '¥' : '€' }}{{ payType != 3?scope.row.insuranceFee:scope.row.insuranceFeeEn }}</span> |
| 89 | </template> | 89 | </template> |
| 90 | </el-table-column> | 90 | </el-table-column> |
| 91 | <!-- 补充信息--> | 91 | <!-- 补充信息--> |
| ... | @@ -122,7 +122,7 @@ | ... | @@ -122,7 +122,7 @@ |
| 122 | </div> | 122 | </div> |
| 123 | 123 | ||
| 124 | <div v-if="showSummary" style="display: inline-block"> | 124 | <div v-if="showSummary" style="display: inline-block"> |
| 125 | {{ language == 0 ? '金额小计' : 'Amount' }}: <span>{{ language == 0 ? '¥' : '€' }}{{ total }}</span> | 125 | {{ language == 0 ? '金额小计' : 'Amount' }}: <span>{{ payType != 3 ? '¥' : '€' }}{{ total }}</span> |
| 126 | </div> | 126 | </div> |
| 127 | 127 | ||
| 128 | </div> | 128 | </div> |
| ... | @@ -162,6 +162,11 @@ const props = defineProps({ | ... | @@ -162,6 +162,11 @@ const props = defineProps({ |
| 162 | type: Number, | 162 | type: Number, |
| 163 | required: false, | 163 | required: false, |
| 164 | default: 0 | 164 | default: 0 |
| 165 | }, | ||
| 166 | payType: { | ||
| 167 | type: String, | ||
| 168 | required: false, | ||
| 169 | default: '' | ||
| 165 | } | 170 | } |
| 166 | }) | 171 | }) |
| 167 | import { useStorage } from '@vueuse/core/index' | 172 | import { useStorage } from '@vueuse/core/index' |
| ... | @@ -194,8 +199,6 @@ function getMatch() { | ... | @@ -194,8 +199,6 @@ function getMatch() { |
| 194 | }) | 199 | }) |
| 195 | } | 200 | } |
| 196 | 201 | ||
| 197 | function totalMethod() { | ||
| 198 | } | ||
| 199 | </script> | 202 | </script> |
| 200 | 203 | ||
| 201 | <style lang="scss" scoped> | 204 | <style lang="scss" scoped> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="mt20"></div> | 2 | <div class="mt20" /> |
| 3 | <el-table :data="list" border style="width: 100%"> | 3 | <el-table :data="list" border style="width: 100%"> |
| 4 | <el-table-column :label="language==0?'序号':'Index'" type="index" width="70" align="center"/> | 4 | <el-table-column :label="language==0?'序号':'Index'" type="index" width="70" align="center" /> |
| 5 | <el-table-column :label="language==0?'组别代码':'EVENT code'" width="120px" align="center" prop="project.code"/> | 5 | <el-table-column :label="language==0?'组别代码':'EVENT code'" width="120px" align="center" prop="project.code" /> |
| 6 | <el-table-column :label="language==0?'组别':'EVENT'" min-width="150px" header-align="center" prop="project.name"> | 6 | <el-table-column :label="language==0?'组别':'EVENT'" min-width="150px" header-align="center" prop="project.name"> |
| 7 | <template #default="scope"> | 7 | <template #default="scope"> |
| 8 | <el-tooltip effect="dark" :content="scope.row.project.name"> | 8 | <el-tooltip effect="dark" :content="scope.row.project.name"> |
| 9 | <div class="esp">{{scope.row.project.name}}</div> | 9 | <div class="esp">{{ scope.row.project.name }}</div> |
| 10 | </el-tooltip> | 10 | </el-tooltip> |
| 11 | </template> | 11 | </template> |
| 12 | </el-table-column> | 12 | </el-table-column> |
| 13 | <el-table-column :label="language==0?'舞种':'DISCIPLINE'" align="center" width="120px" prop="project.danceType"/> | 13 | <el-table-column :label="language==0?'舞种':'DISCIPLINE'" align="center" width="120px" prop="project.danceType" /> |
| 14 | <el-table-column :label="language==0?'参赛说明':'Participation Instructions'" header-align="center" min-width="160px"> | 14 | <el-table-column :label="language==0?'参赛说明':'Participation Instructions'" header-align="center" min-width="160px"> |
| 15 | <template #default="scope"> | 15 | <template #default="scope"> |
| 16 | <el-tooltip effect="dark" :content="scope.row.project.remarks"> | 16 | <el-tooltip effect="dark" :content="scope.row.project.remarks"> |
| 17 | <div class="esp" v-html="scope.row.project.remarks"></div> | 17 | <div class="esp" v-html="scope.row.project.remarks" /> |
| 18 | </el-tooltip> | 18 | </el-tooltip> |
| 19 | </template> | 19 | </template> |
| 20 | </el-table-column> | 20 | </el-table-column> |
| ... | @@ -22,25 +22,33 @@ | ... | @@ -22,25 +22,33 @@ |
| 22 | <template #default="scope"> | 22 | <template #default="scope"> |
| 23 | <el-tooltip effect="dark"> | 23 | <el-tooltip effect="dark"> |
| 24 | <template #content> | 24 | <template #content> |
| 25 | <span v-for="s in scope.row.athletes">{{ s.name }},</span> | 25 | <span v-for="s in scope.row.athletes" :key="s">{{ s.name }},</span> |
| 26 | </template> | 26 | </template> |
| 27 | <div class="esp"> | 27 | <div class="esp"> |
| 28 | <span v-for="s in scope.row.athletes">{{ s.name }},</span> | 28 | <span v-for="s in scope.row.athletes" :key="s">{{ s.name }},</span> |
| 29 | </div> | 29 | </div> |
| 30 | </el-tooltip> | 30 | </el-tooltip> |
| 31 | </template> | 31 | </template> |
| 32 | </el-table-column> | 32 | </el-table-column> |
| 33 | <el-table-column :label="language==0?'参赛服务费':'REGISTRATION FEE'" align="center" width="150px" prop=""> | 33 | <el-table-column :label="language==0?'参赛服务费':'REGISTRATION FEE'" align="center" width="150px" prop=""> |
| 34 | <template #default="scope"> | 34 | <template #default="scope"> |
| 35 | <div class="text-primary"> | 35 | <div class="text-primary"> |
| 36 | {{ language==0?'¥':'€' }}{{ scope.row.project.chargeType == '0'?scope.row.project.serviceFee : scope.row.project.serviceFee * scope.row.athletes.length }} | 36 | <!-- // chargeType 0 按项目收费 1按人数收费--> |
| 37 | {{ payType!=3?'¥':'€' }} | ||
| 38 | <span v-if="scope.row.project.chargeType == '0'"> | ||
| 39 | {{ payType!=3? scope.row.project.serviceFee:scope.row.project.serviceFeeEn }} | ||
| 40 | </span> | ||
| 41 | <span v-else> | ||
| 42 | {{ payType!=3? scope.row.project.serviceFee * scope.row.athletes.length:scope.row.project.serviceFeeEn * scope.row.athletes.length }} | ||
| 43 | </span> | ||
| 44 | <!-- {{ scope.row.project.chargeType == '0'?scope.row.project.serviceFee : scope.row.project.serviceFee * scope.row.athletes.length }}--> | ||
| 37 | </div> | 45 | </div> |
| 38 | </template> | 46 | </template> |
| 39 | </el-table-column> | 47 | </el-table-column> |
| 40 | <el-table-column v-if="hasAction" :label="language==0?'操作':'Actions'" fixed="right" width="150" align="center"> | 48 | <el-table-column v-if="hasAction" :label="language==0?'操作':'Actions'" fixed="right" width="150" align="center"> |
| 41 | <template #default="scope"> | 49 | <template #default="scope"> |
| 42 | <el-button type="primary" link @click="remove(scope.row.signId)"> | 50 | <el-button type="primary" link @click="remove(scope.row.signId)"> |
| 43 | {{language == 0 ? '删除' : 'Delete' }} | 51 | {{ language == 0 ? '删除' : 'Delete' }} |
| 44 | </el-button> | 52 | </el-button> |
| 45 | 53 | ||
| 46 | </template> | 54 | </template> |
| ... | @@ -48,15 +56,15 @@ | ... | @@ -48,15 +56,15 @@ |
| 48 | </el-table> | 56 | </el-table> |
| 49 | <div v-if="showSummary" class="rowSummary"> | 57 | <div v-if="showSummary" class="rowSummary"> |
| 50 | <div> | 58 | <div> |
| 51 | {{ language==0?'总报项数':'Count' }}: <span class="mr20">{{ list.length }}</span> | 59 | {{ language==0?'总报项数':'Count' }}: <span class="mr20">{{ list.length }}</span> |
| 52 | 60 | ||
| 53 | {{ language==0?'金额小计':'Amount' }}: <span>{{ language==0?'¥':'€' }}{{ total }}</span> | 61 | {{ language==0?'金额小计':'Amount' }}: <span>{{ payType!=3?'¥':'€' }}{{ total }}</span> |
| 54 | </div> | 62 | </div> |
| 55 | </div> | 63 | </div> |
| 56 | </template> | 64 | </template> |
| 57 | 65 | ||
| 58 | <script setup> | 66 | <script setup> |
| 59 | import {useStorage} from "@vueuse/core/index"; | 67 | import { useStorage } from '@vueuse/core/index' |
| 60 | 68 | ||
| 61 | const emit = defineEmits(['delete']) | 69 | const emit = defineEmits(['delete']) |
| 62 | const props = defineProps({ | 70 | const props = defineProps({ |
| ... | @@ -64,23 +72,28 @@ const props = defineProps({ | ... | @@ -64,23 +72,28 @@ const props = defineProps({ |
| 64 | type: Array, | 72 | type: Array, |
| 65 | required: true | 73 | required: true |
| 66 | }, | 74 | }, |
| 67 | hasAction:{ | 75 | hasAction: { |
| 68 | type: Boolean, | 76 | type: Boolean, |
| 69 | required: false, | 77 | required: false, |
| 70 | default: true | 78 | default: true |
| 71 | }, | 79 | }, |
| 72 | showSummary:{ | 80 | showSummary: { |
| 73 | type: Boolean, | 81 | type: Boolean, |
| 74 | required: false, | 82 | required: false, |
| 75 | default: false | 83 | default: false |
| 76 | }, | 84 | }, |
| 77 | total:{ | 85 | total: { |
| 78 | type: Number, | 86 | type: Number, |
| 79 | required: false, | 87 | required: false, |
| 80 | default: 0 | 88 | default: 0 |
| 89 | }, | ||
| 90 | payType: { | ||
| 91 | type: String, | ||
| 92 | required: false, | ||
| 93 | default: '' | ||
| 81 | } | 94 | } |
| 82 | }) | 95 | }) |
| 83 | const language= useStorage('language',0) | 96 | const language = useStorage('language', 0) |
| 84 | const remove = (id) => { | 97 | const remove = (id) => { |
| 85 | emit('delete', id) | 98 | emit('delete', id) |
| 86 | } | 99 | } | ... | ... |
| ... | @@ -592,7 +592,6 @@ function getMatch(id) { | ... | @@ -592,7 +592,6 @@ function getMatch(id) { |
| 592 | loading.value = true | 592 | loading.value = true |
| 593 | match.getMatchById({ id: id }).then(res => { | 593 | match.getMatchById({ id: id }).then(res => { |
| 594 | matchData.value = res.data | 594 | matchData.value = res.data |
| 595 | console.log(666666, matchData.value) | ||
| 596 | loading.value = false | 595 | loading.value = false |
| 597 | const today = dayjs().format('YYYY-MM-DD HH:mm:ss') | 596 | const today = dayjs().format('YYYY-MM-DD HH:mm:ss') |
| 598 | time.value = dayjs(res.data.signEndTime).diff(today, 'millisecond') | 597 | time.value = dayjs(res.data.signEndTime).diff(today, 'millisecond') | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -55,7 +55,9 @@ | ... | @@ -55,7 +55,9 @@ |
| 55 | :list="signInfoList" | 55 | :list="signInfoList" |
| 56 | :match-id="matchId" | 56 | :match-id="matchId" |
| 57 | :show-summary="route.query.buy=='1'" | 57 | :show-summary="route.query.buy=='1'" |
| 58 | :total="signTotal" class="mt20" | 58 | :total="language==0? signTotal:signTotalEn" |
| 59 | class="mt20" | ||
| 60 | :pay-type="language==1?3:4" | ||
| 59 | /> | 61 | /> |
| 60 | </div> | 62 | </div> |
| 61 | <div class="mt20"> | 63 | <div class="mt20"> |
| ... | @@ -71,7 +73,8 @@ | ... | @@ -71,7 +73,8 @@ |
| 71 | :has-action="false" | 73 | :has-action="false" |
| 72 | :list="zuTableList" | 74 | :list="zuTableList" |
| 73 | :show-summary="true" | 75 | :show-summary="true" |
| 74 | :total="zuTotal" | 76 | :total="language==0? zuTotal:zuTotalEn" |
| 77 | :pay-type="language==1?3:4" | ||
| 75 | class="mt20" | 78 | class="mt20" |
| 76 | /> | 79 | /> |
| 77 | </div> | 80 | </div> |
| ... | @@ -171,7 +174,9 @@ const signInfoList = ref([]) | ... | @@ -171,7 +174,9 @@ const signInfoList = ref([]) |
| 171 | const signEndTime = ref('') | 174 | const signEndTime = ref('') |
| 172 | const zuTableList = ref([]) | 175 | const zuTableList = ref([]) |
| 173 | const zuTotal = ref(0) | 176 | const zuTotal = ref(0) |
| 177 | const zuTotalEn = ref(0) | ||
| 174 | const signTotal = ref(0) | 178 | const signTotal = ref(0) |
| 179 | const signTotalEn = ref(0) | ||
| 175 | const groupId = ref(route.query.groupId || 0) | 180 | const groupId = ref(route.query.groupId || 0) |
| 176 | const matchId = ref(route.query.matchId) | 181 | const matchId = ref(route.query.matchId) |
| 177 | const isNational = ref(route.query.isNational || false) | 182 | const isNational = ref(route.query.isNational || false) |
| ... | @@ -215,41 +220,51 @@ function getMyMemberTable() { | ... | @@ -215,41 +220,51 @@ function getMyMemberTable() { |
| 215 | function getSignList() { | 220 | function getSignList() { |
| 216 | match.getMySignInfoList(zuQuery.value).then(res => { | 221 | match.getMySignInfoList(zuQuery.value).then(res => { |
| 217 | zuTotal.value = 0 | 222 | zuTotal.value = 0 |
| 223 | zuTotalEn.value = 0 | ||
| 218 | signTotal.value = 0 | 224 | signTotal.value = 0 |
| 225 | signTotalEn.value = 0 | ||
| 219 | signInfoList.value = res.data.singleData | 226 | signInfoList.value = res.data.singleData |
| 220 | console.log(signInfoList.value) | 227 | console.log(signInfoList.value) |
| 221 | zuTableList.value = res.data.zuData | 228 | zuTableList.value = res.data.zuData |
| 222 | for (var s of signInfoList.value) { | 229 | for (var s of signInfoList.value) { |
| 223 | signTotal.value = (Number(signTotal.value) + Number(s.insuranceFee)).toFixed(2) | 230 | signTotal.value = (Number(signTotal.value) + Number(s.insuranceFee)).toFixed(2) |
| 231 | signTotalEn.value = (Number(signTotalEn.value) + Number(s.insuranceFeeEn)).toFixed(2) | ||
| 224 | } | 232 | } |
| 225 | 233 | ||
| 226 | // for (var z of zuTableList.value) { | 234 | // for (var z of zuTableList.value) { |
| 227 | // zuTotal.value = (Number(zuTotal.value) + Number(z.project.serviceFee)).toFixed(2) | 235 | // zuTotal.value = (Number(zuTotal.value) + Number(z.project.serviceFee)).toFixed(2) |
| 228 | // } | 236 | // } |
| 229 | 237 | ||
| 230 | 238 | ||
| 231 | for (const z of zuTableList.value) { | 239 | for (const z of zuTableList.value) { |
| 232 | if (!z.project) { | 240 | if (!z.project) { |
| 233 | continue; | 241 | continue |
| 234 | } | 242 | } |
| 243 | |||
| 244 | const serviceFee = Number(z.project.serviceFee) || 0 | ||
| 245 | const serviceFeeEn = Number(z.project.serviceFeeEn) || 0 | ||
| 235 | 246 | ||
| 236 | const serviceFee = Number(z.project.serviceFee) || 0; | 247 | const chargeType = String(z.project.chargeType).trim() |
| 237 | 248 | ||
| 238 | const chargeType = String(z.project.chargeType).trim(); | 249 | let currentItemFee = 0 |
| 239 | 250 | let currentItemFeeEn = 0 | |
| 240 | let currentItemFee = 0; | ||
| 241 | if (chargeType === '0') { | 251 | if (chargeType === '0') { |
| 242 | currentItemFee = serviceFee; | 252 | currentItemFee = serviceFee |
| 253 | currentItemFeeEn = serviceFeeEn | ||
| 243 | } else if (chargeType === '1') { | 254 | } else if (chargeType === '1') { |
| 244 | const athletesLength = z.athletes?.length || 0; | 255 | const athletesLength = z.athletes?.length || 0 |
| 245 | currentItemFee = serviceFee * athletesLength; | 256 | currentItemFee = serviceFee * athletesLength |
| 257 | currentItemFeeEn = serviceFeeEn * athletesLength | ||
| 246 | } else { | 258 | } else { |
| 247 | currentItemFee = 0; | 259 | currentItemFee = 0 |
| 260 | currentItemFeeEn = 0 | ||
| 248 | } | 261 | } |
| 249 | 262 | ||
| 250 | zuTotal.value += currentItemFee; | 263 | zuTotal.value += currentItemFee |
| 264 | zuTotalEn.value += currentItemFeeEn | ||
| 251 | } | 265 | } |
| 252 | zuTotal.value = zuTotal.value.toFixed(2); | 266 | zuTotal.value = zuTotal.value.toFixed(2) |
| 267 | zuTotalEn.value = zuTotalEn.value.toFixed(2) | ||
| 253 | }) | 268 | }) |
| 254 | } | 269 | } |
| 255 | 270 | ... | ... |
-
Please register or sign in to post a comment