Pārlūkot izejas kodu

fix: 费控制度详情页 - 额度ID兜底取值 & 规则详情弹窗调接口缺失

alphah 1 nedēļu atpakaļ
vecāks
revīzija
a09f592460

BIN
frontend/dist.zip


+ 1 - 1
frontend/src/views/module_payment/institution/components/QuotaList.vue

@@ -234,7 +234,7 @@ function formatQuotaType(type?: string) {
 }
 
 function handleDetail(row: any) {
-  currentQuotaId.value = row.quota_id;
+  currentQuotaId.value = row.quota_id || String(row.id || "");
   detailVisible.value = true;
 }
 

+ 1 - 0
frontend/src/views/module_payment/institution/components/RuleDetailDialog.vue

@@ -3,6 +3,7 @@
     v-model="visible"
     title="使用规则详情"
     width="700px"
+    destroy-on-close
     @close="handleClose"
   >
     <RuleDetail :rule-id="ruleId" />

+ 8 - 1
frontend/src/views/module_payment/rule/components/RuleDetail.vue

@@ -57,7 +57,7 @@
 
 <script setup lang="ts">
 import RuleAPI, { RuleDetail, WEEK_DAY_LABEL } from "@/api/module_payment/rule";
-import { onMounted, ref } from "vue";
+import { onMounted, ref, watch } from "vue";
 
 interface Props {
   ruleId: string;
@@ -95,4 +95,11 @@ async function fetchDetail() {
 onMounted(() => {
   fetchDetail();
 });
+
+watch(() => props.ruleId, (newVal) => {
+  if (newVal) {
+    detailData.value = { status: "", created_time: "", updated_time: "" } as RuleDetail;
+    fetchDetail();
+  }
+});
 </script>