lifanagju_citu 10 hónapja
szülő
commit
96b927f601

+ 1 - 1
src/components/pay/index.vue

@@ -80,7 +80,7 @@ import { getEnableCodeList, getUnpaidOrder, payOrderSubmit, getOrderPayStatus }
 import { createTradeOrder } from '@/api/position'
 import { useSharedState } from '@/store/sharedState'
 import { rechargeOrderCreate } from '@/api/recruit/enterprise/member/points'
-// import { payCalculation } from '@/utils/position'
+// import { FenYuanTransform } from '@/utils/position'
 import Recharge from '@/views/recruit/enterprise/memberCenter/myMembers/components/pointsAndBalance.vue'
 
 const emit = defineEmits(['payTypeChange', 'paySuccess', 'stopInterval'])

+ 2 - 2
src/components/personalRecharge/index.vue

@@ -42,7 +42,7 @@
             <span class="font28" v-else>{{ item.payPrice }}</span>
           </div>   -->
           <div class="dailyPrice font-size-12 mt-1">
-            <span v-if="!item.custom">¥{{ payCalculation(item.payPrice, 'realPay') }}</span>
+            <span v-if="!item.custom">¥{{ FenYuanTransform(item.payPrice, 'realPay') }}</span>
             <span v-else>{{ item.tip }}</span>
           </div>
           <v-btn v-if="!item.custom" class="mt-5" size="small" color="error" variant="outlined" rounded >立即充值</v-btn>
@@ -64,7 +64,7 @@
 
 <script setup>
 defineOptions({ name: 'personalRecharge-index'})
-import { payCalculation } from '@/utils/position'
+import { FenYuanTransform } from '@/utils/position'
 import { ref } from 'vue'
 import { getUserWalletRechargeList } from '@/api/recruit/personal/myWallet.js'
 import initPay from './initPay.vue'

+ 2 - 2
src/components/personalRecharge/initPay.vue

@@ -11,7 +11,7 @@
       <div class="code-right ml-5">
         <div class="price">
           <span class="font-size-13">¥</span>
-          {{ payCalculation(props.info?.payPrice || 0, 'realPay') }}
+          {{ FenYuanTransform(props.info?.payPrice || 0, 'realPay') }}
         </div>
         <div class="mt-3 d-flex align-center">
           <span class="color-666 font-weight-bold mr-5">支付方式</span>
@@ -48,7 +48,7 @@
 <script setup>
 defineOptions({name: 'personalRecharge-initPay'})
 import QrCode from '@/components/QrCode'
-import { payCalculation } from '@/utils/position'
+import { FenYuanTransform } from '@/utils/position'
 import { definePayTypeList, qrCodePay, walletPay } from '@/utils/payType'
 import { getEnableCodeList, payOrderSubmit, getOrderPayStatus } from '@/api/common'
 import { setWalletRecharge } from '@/api/recruit/personal/myWallet.js'

+ 2 - 2
src/utils/position.js

@@ -101,8 +101,8 @@ export const commissionCalculation = (count, type) => {
   return value % 1 === 0 ? Math.floor(value) : value.toFixed(2)
 }
 
-// type: emit-> 提交(需要*100) realPay-> 回显(需要/100)
-export const payCalculation = (count, type) => {
+// 转化:分-元。 type: emit-> 提交(需要*100) realPay-> 回显(需要/100)
+export const FenYuanTransform = (count, type) => {
   if ((count - 0) === 0) return 0
   if (!count) return ''
   const Magnification = type === 'emit' ? 100 : 1/100 

+ 3 - 3
src/views/recruit/enterprise/memberCenter/myMembers/components/pointsAndBalance.vue

@@ -25,7 +25,7 @@
                 @focus="item.tip = '输入完成后请按Enter键确认'"
               >
             </span>
-            <span class="font28" v-else>¥{{ payCalculation(item.payPrice, 'realPay') }}</span>
+            <span class="font28" v-else>¥{{ FenYuanTransform(item.payPrice, 'realPay') }}</span>
           </div>  
           <!-- <div class="dailyPrice font-size-12 mt-3">
             <span v-if="!item.custom">¥{{ calcFun(item.payPrice, true) }}</span>
@@ -81,7 +81,7 @@
     v-if="showConfirmPaymentDialog"
     :appId="11"
     unit="元"
-    :cost="payCalculation(rechargeDataItem.payPrice, 'realPay')"
+    :cost="FenYuanTransform(rechargeDataItem.payPrice, 'realPay')"
     :rechargeInfo="rechargeDataItem"
     @paySuccess="paySuccess"
     @stopInterval="stopInterval"
@@ -95,7 +95,7 @@ import { ref } from 'vue'
 import Public from './public.vue'
 // import QrCode from '@/components/QrCode'
 import { getEnterpriseRechargePackageList } from '@/api/recruit/enterprise/member/points'
-import { payCalculation } from '@/utils/position'
+import { FenYuanTransform } from '@/utils/position'
 
 const emits = defineEmits(['paySuccess'])
 defineProps({

+ 6 - 6
src/views/recruit/enterprise/memberCenter/tradingOrder/index.vue

@@ -31,7 +31,7 @@ import {
 import { ref } from 'vue'
 import { timesTampChange } from '@/utils/date'
 import { getDict } from '@/hooks/web/useDictionaries'
-import { payCalculation, rechargeRatio } from '@/utils/position'
+import { FenYuanTransform, rechargeRatio } from '@/utils/position'
 
 const tab = ref('tab_transaction')
 const total = ref(0)
@@ -76,20 +76,20 @@ const headersList = {
     { title: '订单支付时间', key: 'payTime', value: item =>  timesTampChange(item.payTime), sortable: false },
     // { title: '支付渠道', key: 'payChannelCode', value: item => channelData.value.find(e => e.value === item.payChannelCode)?.label, sortable: false },
     // { title: '退款订单编号', key: 'payReFundId', sortable: false },
-    // { title: '退款金额', key: 'refundPrice', sortable: false, value: item => payCalculation(item.refundPrice, 'realPay') },
+    // { title: '退款金额', key: 'refundPrice', sortable: false, value: item => FenYuanTransform(item.refundPrice, 'realPay') },
     // { title: '退款时间', key: 'refundTime', value: item =>  timesTampChange(item.refundTime), sortable: false },
     // { title: '更新时间', key: 'updateTime', value: item =>  timesTampChange(item.updateTime), sortable: false },
   ],
   tab_recharge: [
-    { title: '充值点数', key: '点数', value: item => rechargeRatio()*payCalculation(item.payPrice, 'realPay'), sortable: false },
-    { title: '支付金额', key: 'payPrice', value: item => payCalculation(item.payPrice, 'realPay')+'元', sortable: false },
+    { title: '充值点数', key: '点数', value: item => rechargeRatio()*FenYuanTransform(item.payPrice, 'realPay'), sortable: false },
+    { title: '支付金额', key: 'payPrice', value: item => FenYuanTransform(item.payPrice, 'realPay')+'元', sortable: false },
     { title: '订单支付时间', key: 'payTime', value: item =>  timesTampChange(item.payTime), sortable: false },
     { title: '支付成功的外部订单号', key: 'payOrderChannelOrderNo', sortable: false },
     { title: '支付渠道名', key: 'payChannelName', sortable: false },
     // { title: '支付状态', key: 'payStatus', sortable: false },
     // { title: '退款状态', key: 'refundStatus', value: item => pay_refund_status.value.find(e => e.value-0 === item.refundStatus-0)?.label, sortable: false },
-    // { title: '用户实际到账余额', key: 'totalPrice', value: item => payCalculation(item.totalPrice, 'realPay'), sortable: false },
-    // { title: '赠送金额', key: 'bonusPrice', value: item => payCalculation(item.bonusPrice, 'realPay'), sortable: false },
+    // { title: '用户实际到账余额', key: 'totalPrice', value: item => FenYuanTransform(item.totalPrice, 'realPay'), sortable: false },
+    // { title: '赠送金额', key: 'bonusPrice', value: item => FenYuanTransform(item.bonusPrice, 'realPay'), sortable: false },
     // { title: '编号', key: 'id', sortable: false },
     // { title: '支付成功的支付渠道', key: 'payChannelCode', sortable: false },
     // { title: '支付订单编号', key: 'payOrderId', sortable: false },

+ 2 - 2
src/views/recruit/personal/myWallet/myBalance/index.vue

@@ -46,7 +46,7 @@
 defineOptions({name: 'myWallet-myBalance-index'})
 import { ref } from 'vue'
 import { timesTampChange } from '@/utils/date'
-import { payCalculation } from '@/utils/position'
+import { FenYuanTransform } from '@/utils/position'
 import { getUserWalletRechargePage } from '@/api/recruit/personal/myWallet.js'
 
 const tab = ref('rechargeDetails')
@@ -62,7 +62,7 @@ const dataList = ref([])
 
 const headerList = {
   rechargeDetails: [
-    { title: '充值金额', key: 'payPrice', value: item =>  payCalculation(item.payPrice, 'realPay') + '元', sortable: false },
+    { title: '充值金额', key: 'payPrice', value: item =>  FenYuanTransform(item.payPrice, 'realPay') + '元', sortable: false },
     { title: '支付方式', key: 'payChannelName', sortable: false },
     { title: '支付订单编号', key: 'payOrderId', sortable: false },
     { title: '交易时间', key: 'payTime', value: item =>  timesTampChange(item.payTime), sortable: false },