index.wxml 11 KB

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