index.wxml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <view class="section">
  2. <view class="cu-bar bg-white solid-bottom">
  3. <view class="action">
  4. <text class="cuIcon-title text-orange "></text>
  5. <view>
  6. <view class="text-xl text-black"><text>车辆和贷款信息</text> <text class="text-red">(必填)</text></view>
  7. <view class="text-sm">机动车及与车辆相关的物理附属设备、服务、水费等 </view>
  8. </view>
  9. </view>
  10. </view>
  11. <!--form框类型奇特 特殊处理 除开发人员或者经验娴熟的人,其余不建议修改-->
  12. <view wx:for="{{value[0]}}" wx:key="index" data-index="{{[0,index]}}"
  13. class="cu-form-group {{(item.for && item.norequire) ? 'hide' :'show'}}"
  14. bindtap="{{item.type=='switch' && !item.disabled ? 'switchFunc' : ''}}">
  15. <!-- 没有输入意义的行 -->
  16. <view wx:if="{{item.style}}" class="title">{{item.title}}</view>
  17. <!-- 输入行 -->
  18. <block wx:elif="{{item.type=='picker'}}">
  19. <view class="title">{{item.title}}</view>
  20. <picker disabled="{{item.disabled}}" class="picker" style="height:80rpx;line-height: 80rpx;" mode="date"
  21. value="{{item.value}}" data-index="{{[0,index]}}" start="1900-01-01" end="{{endDate}}" bindchange="DateChange">
  22. <view class="picker">
  23. {{item.value}}
  24. </view>
  25. </picker>
  26. </block>
  27. <block wx:else>
  28. <view class="title {{item.norequire ? 'text-blue' : ''}}" style="">{{item.title}}</view>
  29. <input class="{{item.type == 'switch' ? 'text-right' : ''}}" data-index="{{[0,index]}}"
  30. data-value="{{item.value}}" id="{{item.name}}" type="{{item._type ? item._type : 'text'}}"
  31. value="{{item.type == 'switch' ? switchs[item.name][item.index]['value'] : item.value}}" bindinput="inputFunc"
  32. style="z-index: 0;height: 60rpx;transform: translateY(-3rpx);"
  33. disabled="{{item.disabled || item.type=='switch'}}"
  34. placeholder="{{(item.disabled || item.type=='switch') ? '' : item._title ? '请输入' +item._title : '请输入' + item.title}}"></input>
  35. <!-- switch 特殊处理 -->
  36. <view wx:if="{{item.type=='switch'}}" class="cuIcon-right"></view>
  37. </block>
  38. </view>
  39. <view class="cu-bar bg-white solid-bottom solid-top">
  40. <view class="action">
  41. <text class="cuIcon-title text-orange "></text>
  42. <view>
  43. <view class="text-xl text-black"><text>申请人基本信息</text> <text class="text-red">(必填)</text></view>
  44. </view>
  45. </view>
  46. </view>
  47. <!--form框类型奇特 特殊处理 除开发人员或者经验娴熟的人,其余不建议修改-->
  48. <view wx:for="{{value[1]}}" wx:key="index" data-index="{{[1,index]}}"
  49. class="cu-form-group {{(item.for && item.norequire) ? 'hide' :'show'}}"
  50. bindtap="{{item.type=='switch' && !item.disabled ? 'switchFunc' : ''}}">
  51. <!-- 没有输入意义的行 -->
  52. <view wx:if="{{item.style}}" class="title">{{item.title}}</view>
  53. <!-- 输入行 -->
  54. <block wx:elif="{{item.type=='picker'}}">
  55. <view class="title">{{item.title}}</view>
  56. <picker disabled="{{item.disabled}}" class="picker" style="height:80rpx;line-height: 80rpx;" mode="date"
  57. value="{{item.value}}" data-index="{{[1,index]}}" start="1900-01-01" end="{{endDate}}" bindchange="DateChange">
  58. <view class="picker">
  59. {{item.value}}
  60. </view>
  61. </picker>
  62. </block>
  63. <block wx:else>
  64. <view class="title {{item.norequire ? 'text-blue' : ''}}" style="">{{item.title}}</view>
  65. <input class="{{item.type == 'switch' ? 'text-right' : ''}}" data-index="{{[1,index]}}"
  66. data-value="{{item.value}}" id="{{item.name}}" type="{{item._type ? item._type : 'text'}}"
  67. value="{{item.type == 'switch' ? switchs[item.name][item.index]['value'] : item.value}}" bindinput="inputFunc"
  68. style="z-index: 0;height: 60rpx;transform: translateY(-3rpx);"
  69. disabled="{{item.disabled || item.type=='switch'}}"
  70. placeholder="{{(item.disabled || item.type=='switch') ? '' : item._title ? '请输入' +item._title : '请输入' + item.title}}"></input>
  71. <!-- switch 特殊处理 -->
  72. <view wx:if="{{item.type=='switch'}}" class="cuIcon-right"></view>
  73. </block>
  74. </view>
  75. <view class="cu-bar bg-white solid-bottom solid-top">
  76. <view class="action">
  77. <text class="cuIcon-title text-orange "></text>
  78. <view>
  79. <view class="text-xl text-black"><text>紧急联系人信息</text> <text class="text-red">(必填)</text></view>
  80. </view>
  81. </view>
  82. </view>
  83. <!--form框类型奇特 特殊处理 除开发人员或者经验娴熟的人,其余不建议修改-->
  84. <view wx:for="{{value[2]}}" wx:key="index" data-index="{{[2,index]}}"
  85. class="cu-form-group {{(item.for && item.norequire) ? 'hide' :'show'}}"
  86. bindtap="{{item.type=='switch' && !item.disabled ? 'switchFunc' : ''}}">
  87. <!-- 没有输入意义的行 -->
  88. <view wx:if="{{item.style}}" class="title">{{item.title}}</view>
  89. <!-- 输入行 -->
  90. <block wx:elif="{{item.type=='picker'}}">
  91. <view class="title">{{item.title}}</view>
  92. <picker disabled="{{item.disabled}}" class="picker" style="height:80rpx;line-height: 80rpx;" mode="date"
  93. value="{{item.value}}" data-index="{{[2,index]}}" start="1900-01-01" end="{{endDate}}" bindchange="DateChange">
  94. <view class="picker">
  95. {{item.value}}
  96. </view>
  97. </picker>
  98. </block>
  99. <block wx:else>
  100. <view class="title {{item.norequire ? 'text-blue' : ''}}" style="">{{item.title}}</view>
  101. <input class="{{item.type == 'switch' ? 'text-right' : ''}}" data-index="{{[2,index]}}"
  102. data-value="{{item.value}}" id="{{item.name}}" type="{{item._type ? item._type : 'text'}}"
  103. value="{{item.type == 'switch' ? switchs[item.name][item.index]['value'] : item.value}}" bindinput="inputFunc"
  104. style="z-index: 0;height: 60rpx;transform: translateY(-3rpx);"
  105. disabled="{{item.disabled || item.type=='switch'}}"
  106. placeholder="{{(item.disabled || item.type=='switch') ? '' : item._title ? '请输入' +item._title : '请输入' + item.title}}"></input>
  107. <!-- switch 特殊处理 -->
  108. <view wx:if="{{item.type=='switch'}}" class="cuIcon-right"></view>
  109. </block>
  110. </view>
  111. <view wx:if="{{value[2][6]['value']==1}}" class="cu-bar bg-white solid-bottom solid-top">
  112. <view class="action">
  113. <text class="cuIcon-title text-orange "></text>
  114. <view>
  115. <view class="text-xl text-black"><text>共同借款人信息</text> <text class="text-red">(必填)</text></view>
  116. </view>
  117. </view>
  118. </view>
  119. <!--form框类型奇特 特殊处理 除开发人员或者经验娴熟的人,其余不建议修改-->
  120. <view wx:if="{{value[2][6]['value']==1}}" wx:for="{{value[3]}}" wx:key="index" data-index="{{[3,index]}}"
  121. class="cu-form-group {{(item.for && item.norequire) ? 'hide' :'show'}}"
  122. bindtap="{{item.type=='switch' && !item.disabled ? 'switchFunc' : ''}}">
  123. <!-- 没有输入意义的行 -->
  124. <view wx:if="{{item.style}}" class="title">{{item.title}}</view>
  125. <!-- 输入行 -->
  126. <block wx:elif="{{item.type=='picker'}}">
  127. <view class="title">{{item.title}}</view>
  128. <picker disabled="{{item.disabled}}" class="picker" style="height:80rpx;line-height: 80rpx;" mode="date"
  129. value="{{item.value}}" data-index="{{[3,index]}}" start="1900-01-01" end="{{endDate}}" bindchange="DateChange">
  130. <view class="picker">
  131. {{item.value}}
  132. </view>
  133. </picker>
  134. </block>
  135. <block wx:else>
  136. <view class="title {{item.norequire ? 'text-blue' : ''}}" style="">{{item.title}}</view>
  137. <input class="{{item.type == 'switch' ? 'text-right' : ''}}" data-index="{{[3,index]}}"
  138. data-value="{{item.value}}" id="{{item.name}}" type="{{item._type ? item._type : 'text'}}"
  139. value="{{item.type == 'switch' ? switchs[item.name][item.index]['value'] : item.value}}" bindinput="inputFunc"
  140. style="z-index: 0;height: 60rpx;transform: translateY(-3rpx);"
  141. disabled="{{item.disabled || item.type=='switch'}}"
  142. placeholder="{{(item.disabled || item.type=='switch') ? '' : item._title ? '请输入' +item._title : '请输入' + item.title}}"></input>
  143. <!-- switch 特殊处理 -->
  144. <view wx:if="{{item.type=='switch'}}" class="cuIcon-right"></view>
  145. </block>
  146. </view>
  147. <!-- <view class="cu-bar bg-white solid-bottom solid-top">
  148. <view class="action">
  149. <text class="cuIcon-title text-orange "></text>
  150. <view>
  151. <view class="text-xl text-black"><text>借款人身份证</text> <text class="text-red">(必填)</text></view>
  152. </view>
  153. </view>
  154. </view> -->
  155. </view>
  156. <!-- 功能栏 -->
  157. <van-goods-action wx:if="{{btn}}">
  158. <van-goods-action-button loading="{{saveLock}}" type="warning" bind:click="saveFunc" text="保存" />
  159. <van-goods-action-button loading="{{submitLock}}" bind:click="submitFunc" text="提交" />
  160. </van-goods-action>
  161. <!-- 单选 -->
  162. <view class="cu-modal {{switchB ?'show':''}}" bindtap="hideModal">
  163. <view class="cu-dialog" catchtap>
  164. <view class="bg-white padding solid-bottom">{{value[activeIndex[0]][activeIndex[1]]['title']}}</view>
  165. <scroll-view scroll-y style="max-height: 50vh;">
  166. <radio-group bindchange="changeFunc" class="block">
  167. <view class="cu-list menu text-left">
  168. <view class="cu-item" wx:for="{{switchs[active]}}" wx:key="index">
  169. <label class="flex justify-between align-center flex-sub">
  170. <view class="flex-sub">{{item.value}}</view>
  171. <radio value="{{[item.key,index]}}"
  172. checked="{{value[activeIndex[0]][activeIndex[1]]['value'] === item.key}}" class="round"></radio>
  173. </label>
  174. </view>
  175. </view>
  176. </radio-group>
  177. </scroll-view>
  178. </view>
  179. </view>
  180. <!-- 错误提示框 -->
  181. <van-dialog use-slot title="提示" show="{{ errorShow }}" confirmText="关闭" bind:confirm="errorConfirmFunc">
  182. <scroll-view scroll-y style="max-height:50vh;">
  183. <view wx:for="{{megs}}" wx:key="index" class="margin-sm">{{index+1}}、 {{item}}</view>
  184. </scroll-view>
  185. </van-dialog>
  186. <van-dialog id="van-dialog" />