addSanfangHetong.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="sfht-info-page">
  3. <view class="icon-title-navBar-box">
  4. <view @click="goUpPage" class="nav-bar-icon"></view>
  5. <text class="nav-bar-title">新增三方合同</text>
  6. </view>
  7. <!-- form -->
  8. <view class="sfht-form-box">
  9. <!-- 合同模板 -->
  10. <view class="form-label-select form-radius-box">
  11. <view class="phone-form-label"><text class="form-label-require"></text>合同模板</view>
  12. <picker :range="data.mobanList" mode='selector' :value="data.mobanIndex" range-key="name"
  13. @change="onMobanSelect" class="select-picker-box">
  14. <view class="form-radio-select" >
  15. <view v-if="data.mobanIndex==null">请点击选择</view>
  16. <view v-else>{{ data.mobanList[data.mobanIndex].name}}</view>
  17. <icon></icon>
  18. </view>
  19. </picker>
  20. </view>
  21. </view>
  22. <!-- 客户信息 -->
  23. <kehuCardVue :info="data.kehu"></kehuCardVue>
  24. <!-- 家政人员 -->
  25. <jiazhengCardVue :info="data.jiazheng"></jiazhengCardVue>
  26. <!-- 合同信息 -->
  27. <hetongCardVue :info="data.hetong"></hetongCardVue>
  28. <!-- 其他约定 -->
  29. <qiTaYueDingVue :info="data.qita"></qiTaYueDingVue>
  30. <!-- 家政签名 -->
  31. <qianMingVue :info="data.qianming"></qianMingVue>
  32. <!-- <button @click="handleSelct('kh')">选择客户</button>
  33. <button @click="handleSelct('jz')">选择家政</button> -->
  34. <!-- 客户 -->
  35. <selectKh ref="khRef"></selectKh>
  36. <!-- 家政 -->
  37. <selectJz ref="jzRef"></selectJz>
  38. </view>
  39. </template>
  40. <script setup>
  41. import {
  42. ref,
  43. reactive,
  44. nextTick
  45. } from "vue";
  46. import {
  47. onLoad
  48. } from "@dcloudio/uni-app";
  49. import * as httpApi from "@/api/sanfang.js"
  50. import selectKh from "./components/selectKh.vue"
  51. import selectJz from "./components/selectJz.vue"
  52. import hetongCardVue from "./components/hetongCard.vue";
  53. import jiazhengCardVue from "./components/jiazhengCard.vue";
  54. import kehuCardVue from "./components/kehuCard.vue";
  55. import qianMingVue from "./components/qianMing.vue";
  56. import qiTaYueDingVue from "./components/qiTaYueDing.vue";
  57. const data = reactive({
  58. mobanList: [],
  59. mobanIndex: null,
  60. kehu: {
  61. name: '',
  62. idCard: '',
  63. tel: '',
  64. dizhi: ''
  65. },
  66. jiazheng: {},
  67. hetong: {},
  68. qita: '',
  69. qianming: ''
  70. })
  71. const khRef = ref(null)
  72. const jzRef = ref(null)
  73. function handleSelct(code) {
  74. if (code == 'kh') {
  75. khRef.value.handleShow();
  76. } else {
  77. jzRef.value.handleShow();
  78. }
  79. }
  80. function goUpPage() {
  81. uni.navigateBack()
  82. }
  83. function getMoban() {
  84. httpApi.getMobanList().then(res => {
  85. data.mobanList = res.data;
  86. })
  87. }
  88. function onMobanSelect(da) {
  89. data.mobanIndex = da.detail.value
  90. }
  91. onLoad(() => {
  92. getMoban();
  93. })
  94. </script>
  95. <style>
  96. </style>