addSanfangHetong.vue 740 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view>
  3. <button @click="handleSelct('kh')">选择客户</button>
  4. <button @click="handleSelct('jz')">选择家政</button>
  5. </view>
  6. <!-- 客户 -->
  7. <selectKh ref="khRef"></selectKh>
  8. <!-- 家政 -->
  9. <selectJz ref="jzRef"></selectJz>
  10. </template>
  11. <script setup>
  12. import {
  13. ref,
  14. reactive,
  15. nextTick
  16. } from "vue";
  17. import {
  18. onLoad
  19. } from "@dcloudio/uni-app";
  20. import * as httpApi from "@/api/sanfang.js"
  21. import selectKh from "./components/selectKh.vue"
  22. import selectJz from "./components/selectJz.vue"
  23. const khRef = ref(null)
  24. const jzRef = ref(null)
  25. function handleSelct(code) {
  26. if (code == 'kh') {
  27. khRef.value.handleShow();
  28. } else {
  29. jzRef.value.handleShow();
  30. }
  31. }
  32. </script>
  33. <style>
  34. </style>