xy 2 horas atrás
pai
commit
22fcb7d718

+ 6 - 18
yudao-ui-admin-vue3/src/views/pressure2/financialFees/detail.vue

@@ -64,7 +64,7 @@ import { FormSchema } from '@/types/form'
 import { FormExpose } from '@/components/Form'
 import { usePlanNewStore } from '@/store/modules/planNew'
 import { useDictStore } from '@/store/modules/dict'
-import {DICT_TYPE} from "@/utils/dict";
+import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
 
 const { loadDone, loadStart } = usePageLoading()
 const router = useRouter()
@@ -73,7 +73,9 @@ const smartTableRef = ref<SmartInstanceExpose>()
 const dictStore = useDictStore()
 const equipTypeMap = dictStore.getDictMap[DICT_TYPE.PRESSURE2_EQUIP_MAIN_TYPE]
 const { getPlanNewData } = usePlanNewStore()
-
+// 检验性质映射
+const boilerCheckTypeOptions = dictStore.getDictMap[DICT_TYPE.BOILER_CHECK_TYPE]
+const pipeCheckTypeOptions = dictStore.getDictMap[DICT_TYPE.PIPE_CHECK_TYPE]
 const UnitEnterpriseTypeOptions = dictStore.getDictMap['system_client_unit_enterprise_type']
 const formRef = ref<FormExpose>()
 interface FormSchemaNew extends FormSchema {
@@ -156,21 +158,6 @@ const handleStatusChange = (val: TabStatus) => {
   getListPageFn()
 }
 type OptItem = { label: string; value: number | null }
-// 检验性质映射
-const checkTypeMap = ref<OptItem[]>([
-  {
-    label: '定期检验',
-    value: 100
-  },
-  {
-    label: '年度检查',
-    value: 200
-  },
-  {
-    label: '超年限检验',
-    value: 300
-  }
-])
 const nonTaxApplyStatusMap = ref<OptItem[]>([
   {
     label: '未开单',
@@ -392,7 +379,8 @@ const columns = ref<SmartTableColumn[]>([
       showOverflowTooltip: true
     },
     render: (row, value) => {
-      return checkTypeMap.value.find((item) => item.value === value)?.label || '-'
+      return row.equipMainType == 200 ? (boilerCheckTypeOptions.find((item) => item.value == value)?.label || '-')
+        : pipeCheckTypeOptions.find((item) => item.value == value)?.label || '-'
     }
   },
   {