index.wxml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <view class="main">
  2. <text class="remind" wx:if="{{list.length > 0}}">尊敬的用户,请完善下列带*号的信息后提交</text>
  3. <view class="content">
  4. <view class="content_item">
  5. <view wx:for="{{list}}" wx:key="index" class="border">
  6. <view class="cu-form-group" wx:if="{{item.customType==='下拉选择'&&item.isShow===1}}">
  7. <view class="title"><text class="{{item.customNameVal?'text-green':'text-red'}}">*</text>
  8. <text>{{item.customName}}</text>
  9. </view>
  10. <picker disabled="{{item.isEditable === 0}}" bindchange="getSelect" value="{{item.customNameVal}}" range="{{item.configurationOption}}" range-key="{{'name'}}" data-index="{{index}}">
  11. <view class="picker">
  12. {{item.customNameVal?item.customNameVal:item.prompt ||'请选择'}}
  13. </view>
  14. </picker>
  15. </view>
  16. <view class="cu-form-group" wx:if="{{item.customType==='文本' &&item.isShow===1}}">
  17. <view class="title"><text class="{{item.customNameVal?'text-green':'text-red'}}">*</text><text>{{item.customName}}</text>
  18. </view>
  19. <input disabled="{{item.isEditable === 0}}" type="text" bindinput="getValue" value="{{item.customNameVal}}" placeholder="{{item.prompt || '请填写内容'}}" data-index="{{index}}"></input>
  20. </view>
  21. <view class="cu-form-group" wx:if="{{item.customType==='日期'&&item.isShow===1}}">
  22. <view class="title"><text class="{{item.customNameVal ?'text-green':'text-red'}}">*</text><text>{{item.customName}}</text>
  23. </view>
  24. <picker disabled="{{item.isEditable === 0}}" data-index="{{index}}" class="picker" mode="date" value="{{item.customNameVal}}" start="2015-01-01" end="2100-01-01" bindchange="getValue">
  25. <view class="picker">
  26. {{item.customNameVal?item.customNameVal:item.prompt ||'请选择日期'}}
  27. </view>
  28. </picker>
  29. </view>
  30. <view class="cu-form-group" wx:if="{{item.customType==='时间'&&item.isShow===1}}">
  31. <view class="title"><text class="{{item.customNameVal?'text-green':'text-red'}}">*</text><text>{{item.customName}}</text>
  32. </view>
  33. <picker disabled="{{item.isEditable === 0}}" data-index="{{index}}" class="picker" mode="time" value="{{item.customNameVal}}" start="00:00" end="23:59" bindchange="getValue">
  34. <view class="picker">
  35. {{item.customNameVal?item.customNameVal:item.prompt ||'请选择时间'}}
  36. </view>
  37. </picker>
  38. </view>
  39. <!-- 图片 -->
  40. <view class="cu-form-group height" wx:if="{{item.customType==='图片'&&item.isShow===1}}">
  41. <view class="title"><text class="{{item.customNameVal?'text-green':'text-red'}}">*</text><text>{{item.customName}}</text>
  42. </view>
  43. <view wx:if="{{item.customNameVal}}" class="img_box">
  44. <image src="{{item.customNameVal}}" class="img" bindtap="previewImg" data-src="{{item.customNameVal}}"></image>
  45. <view class="cu-tag bg-red DelImg" catchtap="DelImg" data-index="{{index}}">
  46. <text class="cuIcon-close"></text>
  47. </view>
  48. </view>
  49. <image bindtap="doUploadAvatar" class="upload" wx:else data-index="{{index}}" src="../../../static/images/default_img.png"></image>
  50. </view>
  51. <!-- 省市区(街道) -->
  52. <view wx:if="{{(item.customType==='省市区'||item.customType==='省市区街道')&&item.isShow===1}}">
  53. <!-- 标题 -->
  54. <view class="cu-form-group">
  55. <view class="title">
  56. <text class="{{item.customNameVal?'text-green':'text-red'}}">*</text><text>{{item.customName}}</text>
  57. </view>
  58. <area-picker bind:value="getAddress" content="{{item.customNameVal}}" hasStreet="{{item.customType==='省市区街道'}}" data-index="{{index}}"></area-picker>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="bottom" wx:if="{{list.length > 0}}">
  64. <button class="sureButton" bindtap="submit">提交</button>
  65. </view>
  66. </view>
  67. </view>