Administrator пре 4 година
родитељ
комит
90a05eaf8e
1 измењених фајлова са 21 додато и 2 уклоњено
  1. 21 2
      src/views/business/purchase/components/funds/index.vue

+ 21 - 2
src/views/business/purchase/components/funds/index.vue

@@ -161,9 +161,9 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, reactive, ref, unref } from 'vue';
+import { defineComponent, PropType, reactive, ref, unref, watch, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import { formatValue } from '@/common/methods';
+import { formatValue, initData } from '@/common/methods';
 import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
 import { getPriceTypeName } from '@/views/business/purchase/setup';
 import { operationContractReq } from '@/services/proto/contract';
@@ -172,6 +172,7 @@ import { objectToUint8Array } from '@/utils/objHandle';
 import { FundsReq, InvoiceReq } from '@/services/proto/contract/interface';
 import { fundsReq, invoiceReq } from '@/views/business/purchase/components/setup';
 import { handleForm } from './setup';
+import { QueryMiddleGoodsChange } from '@/services/go/ermcp/goodsInfo';
 
 export default defineComponent({
     name: 'purchase_pending_funds',
@@ -186,6 +187,24 @@ export default defineComponent({
         const { visible, cancel } = closeModal('purchase_pending_funds');
         const loading = ref<boolean>(false);
         const { rules, formState, formRef } = handleForm();
+        // watch(visible, (newValue, oldValue) => { //直接监听
+        //   if(newValue){
+        //     initData(()=>{
+        //       QueryMiddleGoodsChange(props.selectedRow.deliverygoodsid).then(res=>{
+        //         debugger
+        //       })
+        //     })
+        //   }
+        // });
+        watchEffect(()=>{
+          if(visible.value){
+            initData(()=>{
+              QueryMiddleGoodsChange(props.selectedRow.deliverygoodsid).then(res=>{
+                
+              })
+            })
+          }
+        })
         function submit() {
             console.log(props.selectedRow)
             const wrapEl = unref(formRef);