customField.axml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <view class='customField-customField {{className}}' style='{{style}}' ref='saveChildRef0'>
  2. <view class='content'>
  3. <view class='content_item'>
  4. <view
  5. a:for='{{list}}'
  6. a:if='{{item.isShow===1}}'
  7. a:key='{{index}}'
  8. class='border'
  9. ref-numbers='{{list}}'
  10. >
  11. <view a:if="{{item.customType==='下拉选择'&&item.isShow===1}}" class='cu-form-group'>
  12. <view class='title'>
  13. <text class="{{item.customNameVal?'text-green':'text-red'}}">
  14. *
  15. </text>
  16. <text>
  17. {{item.customName}}
  18. </text>
  19. </view>
  20. <picker
  21. disabled='{{item.isEditable === 0}}'
  22. data-index='{{index}}'
  23. value='{{item.customNameVal}}'
  24. range='{{item.configurationOption}}'
  25. range-key="{{'name'}}"
  26. onChange='getSelect'
  27. >
  28. <view class='picker'>
  29. {{item.customNameVal?item.customNameVal:item.prompt ||'请选择'}}
  30. <!-- <van-icon class='icon' name='arrow' ref='saveChildRef1'></van-icon> -->
  31. </view>
  32. </picker>
  33. </view>
  34. <view a:if="{{item.customType==='文本' &&item.isShow===1}}" class='cu-form-group'>
  35. <view class='title'>
  36. <text class="{{item.customNameVal?'text-green':'text-red'}}">
  37. *
  38. </text>
  39. <text>
  40. {{item.customName}}
  41. </text>
  42. </view>
  43. <custom-input
  44. disabled='{{item.isEditable === 0}}'
  45. type='text'
  46. value='{{item.customNameVal}}'
  47. placeholder="{{item.prompt || '请填写内容'}}"
  48. data-index='{{index}}'
  49. onInput='getValue'
  50. >
  51. </custom-input>
  52. </view>
  53. <view a:if="{{item.customType==='日期'&&item.isShow===1}}" class='cu-form-group'>
  54. <view class='title'>
  55. <text class="{{item.customNameVal ?'text-green':'text-red'}}">
  56. *
  57. </text>
  58. <text>
  59. {{item.customName}}
  60. </text>
  61. </view>
  62. <picker
  63. disabled='{{item.isEditable === 0}}'
  64. data-index='{{index}}'
  65. class='picker'
  66. mode='date'
  67. value='{{item.customNameVal}}'
  68. start='2015-01-01'
  69. end='2100-01-01'
  70. onChange='getValue'
  71. >
  72. <view class='picker'>
  73. {{item.customNameVal?item.customNameVal:item.prompt ||'请选择日期'}}
  74. </view>
  75. </picker>
  76. </view>
  77. <view a:if="{{item.customType==='时间'&&item.isShow===1}}" class='cu-form-group'>
  78. <view class='title'>
  79. <text class="{{item.customNameVal?'text-green':'text-red'}}">
  80. *
  81. </text>
  82. <text>
  83. {{item.customName}}
  84. </text>
  85. </view>
  86. <picker
  87. disabled='{{item.isEditable === 0}}'
  88. data-index='{{index}}'
  89. class='picker'
  90. mode='time'
  91. value='{{item.customNameVal}}'
  92. start='00:00'
  93. end='23:59'
  94. onChange='getValue'
  95. >
  96. <view class='picker'>
  97. {{item.customNameVal?item.customNameVal:item.prompt ||'请选择时间'}}
  98. </view>
  99. </picker>
  100. </view>
  101. <view a:if="{{item.customType==='图片'&&item.isShow===1}}" class='cu-form-group height'>
  102. <view class='title'>
  103. <text class="{{item.customNameVal?'text-green':'text-red'}}">
  104. *
  105. </text>
  106. <text>
  107. {{item.customName}}
  108. </text>
  109. </view>
  110. <view a:if='{{item.customNameVal}}' class='img_box'>
  111. <image
  112. src='{{item.customNameVal}}'
  113. class='img'
  114. data-src='{{item.customNameVal}}'
  115. onTap='antmoveAction'
  116. data-antmove-tap='previewImg'
  117. >
  118. </image>
  119. <image
  120. src='/static/images/delete_img.png'
  121. class='DelImg'
  122. data-index='{{index}}'
  123. data-type='vvv'
  124. catchTap='antmoveAction'
  125. data-antmove-tap='DelImg'
  126. >
  127. </image>
  128. </view>
  129. <image
  130. a:else
  131. class='upload'
  132. data-index='{{index}}'
  133. src='/static/images/default_img.png'
  134. onTap='antmoveAction'
  135. data-antmove-tap='doUploadAvatar'
  136. >
  137. </image>
  138. </view>
  139. <view a:if="{{(item.customType==='省市区'||item.customType==='省市区街道')&&item.isShow===1}}">
  140. <view class='cu-form-group'>
  141. <view class='title'>
  142. <text class="{{item.customNameVal?'text-green':'text-red'}}">
  143. *
  144. </text>
  145. <text>
  146. {{item.customName}}
  147. </text>
  148. </view>
  149. <area-picker
  150. content='{{item.customNameVal}}'
  151. hasStreet="{{item.customType==='省市区街道'}}"
  152. data-index='{{index}}'
  153. onValue='getAddress'
  154. ref='saveChildRef2'
  155. >
  156. </area-picker>
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. </view>