max 6 місяців тому
батько
коміт
5c55d5553a
1 змінених файлів з 7 додано та 6 видалено
  1. 7 6
      src/views/cashier.vue

+ 7 - 6
src/views/cashier.vue

@@ -17,7 +17,7 @@
               </el-select>
             </template>
           </el-input>
-          <el-col style="text-align: right; margin-top: 12px" v-show="currency!== 'CNY'" :span="24" v-loading="ARS_amount_loading">
+          <el-col style="text-align: right; margin-top: 12px" :span="24" v-loading="ARS_amount_loading">
             Exchange Rate: 1.00{{currency}} = <span style="font-size: 12px">{{ARS_amount}}ARS</span>
           </el-col>
           <el-col style="text-align: right; margin-top: 12px">
@@ -78,6 +78,7 @@ import {createOrder, getOrder, getConversionFactors} from '@/api'
 import {useRoute} from 'vue-router';
 import _ from 'lodash'
 import md5 from "md5";
+import {getRateData} from '@/utils/index.js'
 
 import dayjs from "dayjs";
 
@@ -149,9 +150,9 @@ function convertStringToNumberWithTwoDecimals(input) {
 
 
 const getAmount = async () => {
-  if(currency.value === 'CNY')  {
-    return amount.value * 144.38
-  }
+  // if(currency.value === 'CNY')  {
+  //   return amount.value * 144.38
+  // }
   const  res = await getConversionFactors({
     currency: currency.value,
     amount: Number(amount.value).toFixed(2)
@@ -160,7 +161,7 @@ const getAmount = async () => {
 }
 
 watch(currency, async () => {
-  if(currency.value === 'CNY')  return
+  // if(currency.value === 'CNY')  return
   ARS_amount_loading.value = true
   const  res = await getConversionFactors({
     currency: currency.value,
@@ -251,7 +252,7 @@ function signSort(args) {
 
 onMounted(() => {
   getOrderInfo()
-  currency.value = "USD"
+  currency.value = "CNY"
 })
 </script>