소스 검색

请款审批

lxf 1 년 전
부모
커밋
d426593446
1개의 변경된 파일17개의 추가작업 그리고 6개의 파일을 삭제
  1. 17 6
      src/views/processApproval/components/SendFunds.vue

+ 17 - 6
src/views/processApproval/components/SendFunds.vue

@@ -23,15 +23,16 @@
 </template>
 
 <script setup>
-import { ref, getCurrentInstance, onMounted, defineProps, defineExpose, watch, reactive } from "vue";
+import { ref, getCurrentInstance, onMounted, defineProps, defineExpose, watch, reactive, toRefs } from "vue";
 import { useRoute } from "vue-router";
 import testForm from "@/components/testForm/index.vue";
 import { getUserInfo } from "@/utils/auth";
 
 // 接收父组件的传值
 const props = defineProps({
-  queryData: String,
+  queryData: Object,
 });
+const refProps = toRefs(props);
 const proxy = getCurrentInstance().proxy;
 const route = useRoute();
 const active = ref(0);
@@ -501,11 +502,21 @@ const handleSubmit = async () => {
   return formData.data;
 };
 watch(
-  props.queryData,
+  refProps.queryData,
   () => {
-    if (props.queryData && [10, 20, 30].includes(route.query.processType)) {
-      for (const key in props.queryData) {
-        formData.data[key] = props.queryData[key];
+    if (refProps.queryData.value && ["10", "20", "30"].includes(route.query.processType)) {
+      for (const key in refProps.queryData.value) {
+        formData.data[key] = refProps.queryData.value[key];
+      }
+      formDom1.value.formDataShowLabelOne();
+      formDom2.value.formDataListShowLabelOne();
+      formDom4.value.formDataShowLabelOne();
+      if (["10", "20"].includes(route.query.processType)) {
+        formOption.readonly = true;
+        formDetailOption.readonly = true;
+        formDetailOption.btnConfig.isNeed = false;
+        formDetailTwoOption.readonly = true;
+        formReceiptPaymentOption.readonly = true;
       }
     }
   },