Ver Fonte

Merge branch 'test-sunzee' into sunzee-test

soobin há 2 anos atrás
pai
commit
605d5626ea

+ 14 - 0
src/router/index.js

@@ -490,6 +490,20 @@ const router = createRouter({
       component: () => import("@/views/accountOperation/index"),
       meta: { index: 1 },
     },
+    // 汇付支付获取openid
+    {
+      path: "/weChatPay",
+      name: "weChatPay",
+      component: () => import("@/views/weChatPay"),
+      meta: { index: 1, noLogin: true },
+    },
+    // 汇付支付获取openid
+    {
+      path: "/popPayment",
+      name: "popPayment",
+      component: () => import("@/views/popPayment"),
+      meta: { index: 1, noLogin: true },
+    },
     // apk管理,广告管理,订单导出 不是所有的帐号能看到
   ],
 });

+ 5 - 1
src/styles/orderCenter/index.less

@@ -355,7 +355,7 @@
             }
 
             .van-image__img {
-              object-fit: none !important;
+              object-fit: contain !important;
             }
 
             .sugerPhto {
@@ -1272,6 +1272,10 @@
       object-fit: contain !important;
     }
 
+    .van-card__title {
+      width: 100px;
+    }
+
     .van-card__footer {
       position: absolute;
       top: 25px;

+ 1 - 1
src/views/popPayment.vue

@@ -96,6 +96,6 @@ export default {
 <style>
 
 .van-image__img{
-    object-fit: none !important;
+    object-fit: contain !important;
 }
 </style>

+ 44 - 32
src/views/taskMessage/equipment/index.vue

@@ -4,13 +4,13 @@
     <s-header :name="$t('taskMessage.taskMessage')" :noback="false"></s-header>
     <div class="taskMessageBox flex-col">
       <van-list v-model:loading="loading" v-model:error="error" :error-text="$t('common.reqFailClkReload')"
-                :finished="finished" :finished-text="$t('common.noMoreTxt')" offset="300" :immediate-check="false" @load="onLoad">
+        :finished="finished" :finished-text="$t('common.noMoreTxt')" offset="300" :immediate-check="false" @load="onLoad">
         <div class="searchRow flex-row justify-between">
           <div class="flex-col">
             <div class="flex-row justify-between bd3">
               <div class="flex-col outer4 equipmentIcon"></div>
               <span class="flex-col txt2">{{ $t("taskMessage.total")
-                }}<span class="discountNumber">{{ alarmHistoryTotal }}</span>{{ $t("taskMessage.recordsInTotal") }}</span>
+              }}<span class="discountNumber">{{ alarmHistoryTotal }}</span>{{ $t("taskMessage.recordsInTotal") }}</span>
             </div>
           </div>
           <div class="l-flex-RC">
@@ -49,7 +49,7 @@
                 }}
               </div>
               <div v-if="item.statusType === 1 && isOper" class="itemRow"
-                   style="display: flex; justify-content: flex-end">
+                style="display: flex; justify-content: flex-end">
                 <van-button span="5" round type="primary" style="
                       height: 2em;
                       padding: 0 2em;
@@ -72,11 +72,11 @@
               </div>
               <div class="itemRow" style="display: flex; justify-content: flex-end">
                 <span v-if="item.statusType === 2" style="color: #ff0000">{{
-                    showItemType(item.statusType)
-                  }}</span>
+                  showItemType(item.statusType)
+                }}</span>
                 <span v-if="item.statusType === 3" style="color: #4fc08d">{{
-                    showItemType(item.statusType)
-                  }}</span>
+                  showItemType(item.statusType)
+                }}</span>
               </div>
             </div>
           </div>
@@ -85,29 +85,25 @@
     </div>
     <!-- 筛选弹窗 -->
     <kDialog :dialogTitle="$t('taskMessage.equipmentInit.searchPop.title')"
-             :confirmBtnTxt="$t('taskMessage.equipmentInit.searchPop.filterBtn')" ref="kDialogRef" @confirmclk="confirmClk">
+      :confirmBtnTxt="$t('taskMessage.equipmentInit.searchPop.filterBtn')" ref="kDialogRef" @confirmclk="confirmClk">
       <template #content>
         <div class="cust_vantBorder">
-          <van-field clearable v-model="searchForm.equipmentNo" :placeholder="
-            $t('taskMessage.equipmentInit.searchPop.equipmentNoPlace')
-          " :label="$t('taskMessage.equipmentInit.searchPop.equipmentNo')" />
-          <van-field clearable v-model="searchForm.managementSystemID" :placeholder="
-            $t('taskMessage.equipmentInit.searchPop.managementSystemIDPlace')
-          " :label="
-  $t('taskMessage.equipmentInit.searchPop.managementSystemID')
-" />
-          <van-field clearable v-model="searchForm.merchantName" :placeholder="
-            $t('taskMessage.equipmentInit.searchPop.merchantNamePlace')
-          " :label="$t('taskMessage.equipmentInit.searchPop.merchantName')" />
+          <van-field clearable v-model="searchForm.equipmentNo" :placeholder="$t('taskMessage.equipmentInit.searchPop.equipmentNoPlace')
+            " :label="$t('taskMessage.equipmentInit.searchPop.equipmentNo')" />
+          <van-field clearable v-model="searchForm.managementSystemID" :placeholder="$t('taskMessage.equipmentInit.searchPop.managementSystemIDPlace')
+            " :label="$t('taskMessage.equipmentInit.searchPop.managementSystemID')
+    " />
+          <van-field clearable v-model="searchForm.merchantName" :placeholder="$t('taskMessage.equipmentInit.searchPop.merchantNamePlace')
+            " :label="$t('taskMessage.equipmentInit.searchPop.merchantName')" />
           <van-field @click-input="busiInpClk" readonly clearable v-model="searchForm.stateName"
-                     :placeholder="$t('taskMessage.equipmentInit.searchPop.statePlace')"
-                     :label="$t('taskMessage.equipmentInit.searchPop.state')">
+            :placeholder="$t('taskMessage.equipmentInit.searchPop.statePlace')"
+            :label="$t('taskMessage.equipmentInit.searchPop.state')">
             <template #right-icon>
               <div class="l-flex-RC">
                 <van-icon v-if="searchForm.stateName" @click="
                   searchForm.stateName = '';
                 searchForm.state = '';
-                                    " class="o-mr-6" name="clear" />
+                " class="o-mr-6" name="clear" />
                 <van-icon @click="busiInpClk" name="arrow-down" />
               </div>
             </template>
@@ -118,7 +114,7 @@
     <!-- 状态选择框 -->
     <van-popup v-model:show="busiPopShow" position="bottom">
       <van-picker :title="$t('taskMessage.equipmentInit.searchPop.statePlace')" :columns="busiPopList"
-                  :columns-field-names="busiPopFieldName" @confirm="busiPopConfirm" @cancel="busiPopShow = false" />
+        :columns-field-names="busiPopFieldName" @confirm="busiPopConfirm" @cancel="busiPopShow = false" />
     </van-popup>
   </div>
 </template>
@@ -132,10 +128,13 @@ import { getLoginUser, styleUrl } from "@/common/js/utils";
 import dateUtil from "@/utils/dateUtil";
 import kDialog from "@/components/commom/kDialog/index.vue";
 import { useI18n } from "vue-i18n";
+import { useRouter } from 'vue-router'
+
 export default {
   components: { sHeader, kDialog },
   setup() {
     const { t } = useI18n();
+    const router = useRouter()
     // 筛选弹窗
     const busiPopList = reactive([
       {
@@ -231,12 +230,12 @@ export default {
       searchParams.userName = searchForm.merchantName;
       searchParams.managerId = searchForm.managementSystemID;
       const { data } = await getTaskEquipmentList(
-          Object.assign({}, searchParams)
+        Object.assign({}, searchParams)
       );
       if (data.code === "00000") {
         // 列表值叠加
         alarmHistoryList.value = alarmHistoryList.value.concat(
-            data.data.records
+          data.data.records
         );
         alarmHistoryTotal.value = data.data.total;
         if (alarmHistoryList.value.length === data.data.total) {
@@ -249,8 +248,8 @@ export default {
     };
     const showDateTime = (date) => {
       return date
-          ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
-          : "";
+        ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
+        : "";
     };
     const showItemType = (type) => {
       if (type === 1) {
@@ -264,11 +263,24 @@ export default {
       }
       return "";
     };
-    const changeStatusFun = (item, status) => {
-      changeStatus({ id: item.id, status: status }).then((res) => {
-        Toast(res.data.message);
-        getList();
-      });
+    const changeStatusFun = async (item, status) => {
+      try {
+        const res = await changeStatus({ id: item.id, status: status });
+        Toast.success({
+          message: res.data.message,
+          forbidClick: true,
+          duration: 1500,
+        });
+        setTimeout(() => {
+          router.go(0); // 刷新当前页面
+        }, 1500); // 延迟1.5秒后执行刷新操作
+      } catch (error) {
+        console.error(error);
+        // 处理错误情况
+      }
+      // changeStatus({ id: item.id, status: status }).then((res) => {
+      //   getList();
+      // });
     };
     // 是否有操作的权限
     const isOper = ref(true);