Quellcode durchsuchen

fix:“优化退款弹窗兼容性问题”

soobin vor 1 Jahr
Ursprung
Commit
23ff01aea7

+ 20 - 16
src/components/dateSelectList/index.vue

@@ -2,24 +2,21 @@
   <div class="dateSelectListBox flex-col">
   <div class="dateSelectListBox flex-col">
     <div class="Tabs1 flex-col">
     <div class="Tabs1 flex-col">
       <div class="timeTabBox">
       <div class="timeTabBox">
-        <div class="timeTab" :class="{ active: timeType === '0' }" @click="timeChange('0')">{{$t('dateSelectList.today')}}</div>
-        <div class="timeTab" :class="{ active: timeType === '1' }" @click="timeChange('1')">{{$t('dateSelectList.yesterday')}}</div>
-        <div class="timeTab" :class="{ active: timeType === '2' }" @click="timeChange('2')">{{$t('dateSelectList.thisWeek')}}</div>
-        <div class="timeTab" :class="{ active: timeType === '3' }" @click="timeChange('3')">{{$t('dateSelectList.thisMonth')}}</div>
+        <div class="timeTab" :class="{ active: timeType === '0' }" @click="timeChange('0')">
+          {{ $t('dateSelectList.today') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '1' }" @click="timeChange('1')">
+          {{ $t('dateSelectList.yesterday') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '2' }" @click="timeChange('2')">
+          {{ $t('dateSelectList.thisWeek') }}</div>
+        <div class="timeTab" :class="{ active: timeType === '3' }" @click="timeChange('3')">
+          {{ $t('dateSelectList.thisMonth') }}</div>
         <div class="timeTab" :class="{ active: timeType === '4' }" @click="timeChange('4')">
         <div class="timeTab" :class="{ active: timeType === '4' }" @click="timeChange('4')">
-          {{$t('dateSelectList.other')}}
+          {{ $t('dateSelectList.other') }}
           <div class="block3 flex-col"></div>
           <div class="block3 flex-col"></div>
         </div>
         </div>
         <!-- 日期选择 -->
         <!-- 日期选择 -->
-        <van-calendar
-          color="#4d6add"
-          v-model:show="calendarShow"
-          type="range"
-          :show-confirm="false"
-          :allow-same-day="true"
-          :min-date="minDate"
-          @confirm="calendarConfirm"
-        />
+        <van-calendar color="#4d6add" v-model:show="calendarShow" type="range" :show-confirm="false"
+          :allow-same-day="true" :min-date="minDate" @confirm="calendarConfirm" />
       </div>
       </div>
     </div>
     </div>
   </div>
   </div>
@@ -28,12 +25,14 @@
 <script>
 <script>
 import { ref } from "vue";
 import { ref } from "vue";
 import dateUtil from "@/utils/dateUtil";
 import dateUtil from "@/utils/dateUtil";
+import { getLoginUser } from "@/common/js/utils";
 
 
 export default {
 export default {
   name: "dateSelectList",
   name: "dateSelectList",
   components: {},
   components: {},
-  setup(props, {emit}) {
+  setup(props, { emit }) {
     const minDate = new Date(2018, 1, 1);
     const minDate = new Date(2018, 1, 1);
+    const user = getLoginUser();
     // 时间类型
     // 时间类型
     const timeType = ref("0");
     const timeType = ref("0");
     // 时间类型切换
     // 时间类型切换
@@ -81,6 +80,11 @@ export default {
       // 本周
       // 本周
       if (timeType.value === "2") {
       if (timeType.value === "2") {
         const curr = new Date();
         const curr = new Date();
+        const dayOfWeek = curr.getDay();
+        // 如果是周日,将当前日期设置到本周的周一
+        if (dayOfWeek === 0 && user.ifForeign != '1') {
+          curr.setDate(curr.getDate() - 6); // 将当前日期设置为本周的周一
+        }
         const firstday = new Date(
         const firstday = new Date(
           curr.setDate(curr.getDate() - curr.getDay() + 1)
           curr.setDate(curr.getDate() - curr.getDay() + 1)
         );
         );
@@ -139,7 +143,7 @@ export default {
 };
 };
 </script>
 </script>
 
 
-<style lang="less" scoped >
+<style lang="less" scoped>
 @import "@/common/style/common.less";
 @import "@/common/style/common.less";
 @import "./index.less";
 @import "./index.less";
 </style>
 </style>

+ 9 - 6
src/styles/orderCenter/index.less

@@ -1233,8 +1233,8 @@
 
 
 
 
 
 
-  .cust_vantBorder {
-    display: flex;
+  .refundBox {
+    display: block;
     justify-content: flex-end;
     justify-content: flex-end;
     /* 水平方向上右对齐 */
     /* 水平方向上右对齐 */
     align-items: center;
     align-items: center;
@@ -1244,10 +1244,12 @@
 
 
     .van-card {
     .van-card {
       background-color: #ffff;
       background-color: #ffff;
-      width: 100%;
+      width: 95%;
+      margin: 0 5px;
     }
     }
 
 
     .van-card__thumb {
     .van-card__thumb {
+      margin-top: 10px;
       width: 60px;
       width: 60px;
       height: 60px;
       height: 60px;
     }
     }
@@ -1262,7 +1264,7 @@
 
 
     .van-card__footer {
     .van-card__footer {
       position: absolute;
       position: absolute;
-      top: 25px;
+      top: 35px;
       right: 15px;
       right: 15px;
       // width: 20px;
       // width: 20px;
       overflow-wrap: break-word;
       overflow-wrap: break-word;
@@ -1275,8 +1277,9 @@
 
 
     .card01 {
     .card01 {
       display: flex;
       display: flex;
+      margin: 0 15px;
       width: 90%;
       width: 90%;
-      height: 90px;
+      height: auto;
     }
     }
 
 
     .van-card__content {
     .van-card__content {
@@ -1284,7 +1287,7 @@
     }
     }
 
 
     .van-card__bottom {
     .van-card__bottom {
-      margin-bottom: 25px;
+      margin-bottom: 15px;
     }
     }
 
 
     .inputAmount {
     .inputAmount {

+ 4 - 4
src/views/home/index.vue

@@ -13,7 +13,7 @@
         <span class="txt3">{{ userName }}</span>
         <span class="txt3">{{ userName }}</span>
         <div class="l-flex-RC">
         <div class="l-flex-RC">
           <span class="info3" style="color: #4d6add;">{{ $t("home.totalEquipment") }} : {{ equipStatus.machineTotalNum
           <span class="info3" style="color: #4d6add;">{{ $t("home.totalEquipment") }} : {{ equipStatus.machineTotalNum
-          }}</span>
+            }}</span>
           <div class="lineCon o-mlr-6"></div>
           <div class="lineCon o-mlr-6"></div>
           <span class="word2" style="color: #07c160;">{{ $t("home.running") }} : {{ equipStatus.machineUseNum }}</span>
           <span class="word2" style="color: #07c160;">{{ $t("home.running") }} : {{ equipStatus.machineUseNum }}</span>
         </div>
         </div>
@@ -96,7 +96,8 @@
         </div>
         </div>
       </div>
       </div>
       <div class="outer11 flex-row">
       <div class="outer11 flex-row">
-        <div class="main25 flex-col" v-for="(item, index) in pushToolList" :key="index" @click="pushToolPage(item.value)">
+        <div class="main25 flex-col" v-for="(item, index) in pushToolList" :key="index"
+          @click="pushToolPage(item.value)">
           <img class="mod7 flex-col" :src="showLogo(item.value)" />
           <img class="mod7 flex-col" :src="showLogo(item.value)" />
           <div class="TextGroup14 flex-col">
           <div class="TextGroup14 flex-col">
             <!-- <span class="info15" v-html="item.label"></span> -->
             <!-- <span class="info15" v-html="item.label"></span> -->
@@ -138,8 +139,7 @@
         <iframe :src="aiUrl" sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
         <iframe :src="aiUrl" sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
           style="width: 100%; height: 100%;"></iframe>
           style="width: 100%; height: 100%;"></iframe>
       </van-popup> -->
       </van-popup> -->
-      <van-popup v-model:show="popupVisible" position="bottom" :style="{ height: '90%' }" round 
-        @click="onClose"  >
+      <van-popup v-model:show="popupVisible" position="bottom" :style="{ height: '90%' }" round @click="onClose">
         <!--    @click-overlay="onClickOverlay" @click-close-icon="onClickCloseIcon" -->
         <!--    @click-overlay="onClickOverlay" @click-close-icon="onClickCloseIcon" -->
         <iframe :src="aiUrl" sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
         <iframe :src="aiUrl" sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
           style="width: 100%; height: 100%;"></iframe>
           style="width: 100%; height: 100%;"></iframe>

+ 36 - 45
src/views/orderCenter/index.vue

@@ -7,21 +7,21 @@
         :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
         :finished="finished" :finished-text="$t('public.noMore')" offset="300" :immediate-check="false" @load="onLoad">
         <div class="main3 flex-col justify-center">
         <div class="main3 flex-col justify-center">
           <!-- <div class="outer1 flex-col justify-between"> -->
           <!-- <div class="outer1 flex-col justify-between"> -->
-            <div class="group4 flex-row justify-between">
-              <div class="ImageText1 flex-col">
-                <div class="outer2 flex-row justify-between">
-                  <div class="block1 flex-col"></div>
-                  <div class="TextGroup1 flex-col">
-                    <span class="txt1">{{ $t('orderCenter.dataOverview') }}</span>
-                  </div>
+          <div class="group4 flex-row justify-between">
+            <div class="ImageText1 flex-col">
+              <div class="outer2 flex-row justify-between">
+                <div class="block1 flex-col"></div>
+                <div class="TextGroup1 flex-col">
+                  <span class="txt1">{{ $t('orderCenter.dataOverview') }}</span>
                 </div>
                 </div>
               </div>
               </div>
-              <!-- 订单中心搜索 -->
-              <div class="flex-col" >
-                <div class="main5 flex-row justify-between" @click="searchClick()">
-                  <img class="label2" src="@/assets/device/searchIcon.png" />
-                </div>
+            </div>
+            <!-- 订单中心搜索 -->
+            <div class="flex-col">
+              <div class="main5 flex-row justify-between" @click="searchClick()">
+                <img class="label2" src="@/assets/device/searchIcon.png" />
               </div>
               </div>
+            </div>
           </div>
           </div>
         </div>
         </div>
         <img class="img1" referrerpolicy="no-referrer" src="@/assets/line.png" />
         <img class="img1" referrerpolicy="no-referrer" src="@/assets/line.png" />
@@ -107,27 +107,28 @@
                         <span class="info5">{{ currencySymbol }}</span>
                         <span class="info5">{{ currencySymbol }}</span>
                         <span class="word12" v-if="item.status === 3">{{ item.price.toFixed(2) }}</span>
                         <span class="word12" v-if="item.status === 3">{{ item.price.toFixed(2) }}</span>
                         <span class="word12" v-else>{{ item.refundAmount == null ? item.price.toFixed(2) : (item.price -
                         <span class="word12" v-else>{{ item.refundAmount == null ? item.price.toFixed(2) : (item.price -
-                          item.refundAmount).toFixed(2) }}</span>
+      item.refundAmount).toFixed(2) }}</span>
                       </div>
                       </div>
                     </template>
                     </template>
                     <template #price-top>
                     <template #price-top>
-                      <span class="time_01" :style="user.ifForeign == '0' ? 'margin-top: 20px;' : 'margin-top: 40px;'">{{
-                        $t('orderCenter.paymentTime') }}:{{ showOrderTime(item, 1) }}</span>
+                      <span class="time_01"
+                        :style="user.ifForeign == '0' ? 'margin-top: 20px;' : 'margin-top: 40px;'">{{
+      $t('orderCenter.paymentTime') }}:{{ showOrderTime(item, 1) }}</span>
                     </template>
                     </template>
                     <template #footer>
                     <template #footer>
                       <span v-if="item.status === 3">x{{ item.refundQuantity }}</span>
                       <span v-if="item.status === 3">x{{ item.refundQuantity }}</span>
                       <span v-else>x{{ item.refundQuantity == null ? item.productNumber : (item.productNumber -
                       <span v-else>x{{ item.refundQuantity == null ? item.productNumber : (item.productNumber -
-                        item.refundQuantity) }}</span>
+      item.refundQuantity) }}</span>
                     </template>
                     </template>
                   </van-card>
                   </van-card>
                   <div v-if="typeof item.status === 'undefined'" class="main11 flex-col orderSuccess"></div>
                   <div v-if="typeof item.status === 'undefined'" class="main11 flex-col orderSuccess"></div>
                   <div v-else class="main11 flex-col" :class="{
                   <div v-else class="main11 flex-col" :class="{
-                    orderSuccess: item.status === 1 && (user.ifForeign == '0' || user.ifForeign == null),
-                    coinOrderSuccess: item.status === 1 && user.ifForeign == '1',
-                    orderError: item.status === 0,
-                    refunding: item.status === 2,
-                    refunded: item.status === 3,
-                  }"></div>
+      orderSuccess: item.status === 1 && (user.ifForeign == '0' || user.ifForeign == null),
+      coinOrderSuccess: item.status === 1 && user.ifForeign == '1',
+      orderError: item.status === 0,
+      refunding: item.status === 2,
+      refunded: item.status === 3,
+    }"></div>
                 </div>
                 </div>
                 <!-- <div class="section6 flex-col"></div> -->
                 <!-- <div class="section6 flex-col"></div> -->
               </div>
               </div>
@@ -149,7 +150,7 @@
                 <!-- <span class="txt4">这里是设备名称</span> -->
                 <!-- <span class="txt4">这里是设备名称</span> -->
                 <span class="info1">{{ $t('orderCenter.business') }}</span>
                 <span class="info1">{{ $t('orderCenter.business') }}</span>
                 <span class="txt5">+ {{ refundObject.refundAmount == null ? refundObject.price.toFixed(2) :
                 <span class="txt5">+ {{ refundObject.refundAmount == null ? refundObject.price.toFixed(2) :
-                  (refundObject.price - refundObject.refundAmount).toFixed(2) }}</span>
+      (refundObject.price - refundObject.refundAmount).toFixed(2) }}</span>
               </div>
               </div>
             </div>
             </div>
             <div class="layer1 flex-col"></div>
             <div class="layer1 flex-col"></div>
@@ -202,23 +203,9 @@
     </van-popup>
     </van-popup>
     <!-- 退款弹窗 -->
     <!-- 退款弹窗 -->
     <kDialog :isCloseForConfirm="false" :dialogTitle="$t('orderCenter.refundTip')"
     <kDialog :isCloseForConfirm="false" :dialogTitle="$t('orderCenter.refundTip')"
-      :confirmBtnTxt="$t('orderCenter.refundSubmit')" ref="kDialogRef" @confirmclk="confirmClk">
+      :confirmBtnTxt="$t('orderCenter.refundSubmit')" ref="kDialogRef" @confirmclk="confirmClk" >
       <template #content>
       <template #content>
-        <!-- <van-field colon required type="number" clearable v-model="cofficentForm.price" class="inputAmount"
-          :placeholder="$t('orderCenter.refundAmountPlace')" :label="$t('orderCenter.refundAmount')">
-          <template #extra>
-            {{ $t('orderCenter.most') }}¥{{ cofficentForm.maxPrice }}
-          </template>
-        </van-field>
-        <div class="van-cell l-flex-RC">
-          <div class="van-field__label van-field__label--required">
-            <span>{{ $t('orderCenter.refundQuantity') }}: </span>
-          </div>
-          <van-stepper v-model="cofficentForm.productNumber" theme="round" button-size="22"
-            :max="cofficentForm.maxNumber" disable-input />
-          <span class="o-pl-10">{{ $t('orderCenter.most') + cofficentForm.maxNumber + $t('orderCenter.at') }}</span>
-        </div> -->
-        <div class="cust_vantBorder l-flex-RC">
+        <div class="refundBox l-flex-RC" style="overflow-y: auto; overflow-x: hidden; max-height: 40vh;" >
           <div v-for="(item, index) in orderDetails" :key="index" class="card01">
           <div v-for="(item, index) in orderDetails" :key="index" class="card01">
             <van-checkbox v-model="isChecked[index]" @change="checkGood(index)" icon-size="20px"></van-checkbox>
             <van-checkbox v-model="isChecked[index]" @change="checkGood(index)" icon-size="20px"></van-checkbox>
             <van-card :price="item.price.toFixed(2)" :title="item.productName" :thumb="showSugarPic(item.productNo)">
             <van-card :price="item.price.toFixed(2)" :title="item.productName" :thumb="showSugarPic(item.productNo)">
@@ -235,7 +222,6 @@
           <van-checkbox class="checkAllBtn o-mt-5" v-model="checkedAll" @click="checkAll">全选</van-checkbox>
           <van-checkbox class="checkAllBtn o-mt-5" v-model="checkedAll" @click="checkAll">全选</van-checkbox>
           <div class="o-mt-5">
           <div class="o-mt-5">
             <span class="">{{ $t('orderCenter.totalRefund') }}:</span>
             <span class="">{{ $t('orderCenter.totalRefund') }}:</span>
-            <!-- <span class="totalRefund o-pr-15">&yen; {{ totalRefund.toFixed(2) }}</span> -->
             <span class="totalRefund o-pr-15">{{ currencySymbol }} {{ totalRefund.toFixed(2) }}</span>
             <span class="totalRefund o-pr-15">{{ currencySymbol }} {{ totalRefund.toFixed(2) }}</span>
           </div>
           </div>
         </div>
         </div>
@@ -344,13 +330,18 @@ export default {
     // 点击全选按钮
     // 点击全选按钮
     const checkAll = () => {
     const checkAll = () => {
       isChecked.value.forEach((item, index) => {
       isChecked.value.forEach((item, index) => {
-        if (isChecked.value[index]) {
-          isChecked.value[index] = !isChecked.value[index]
-          checkedAll.value = false;
+        if (checkedAll.value) {
+          isChecked.value[index] = true;
         } else {
         } else {
-          isChecked.value[index] = !isChecked.value[index]
-          checkedAll.value = true;
+          isChecked.value[index] = false;
         }
         }
+        // if (isChecked.value[index]) {
+        //   isChecked.value[index] = !isChecked.value[index]
+        //   checkedAll.value = false;
+        // } else {
+        //   isChecked.value[index] = !isChecked.value[index]
+        //   checkedAll.value = true;
+        // }
       })
       })
     }
     }
     // 点击确定按钮
     // 点击确定按钮