You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
6.0 KiB

1 year ago
1 year ago
  1. <!--pages/addperson/addperson.wxml-->
  2. <view class="page">
  3. <van-sidebar active-key="{{ activeKey }}" class="left" bind:change="onChange">
  4. <van-sidebar-item title="密码" />
  5. <van-sidebar-item title="NFC" wx:if="{{deviceinfo.manufactureId==201||deviceinfo.manufactureId == 221||deviceinfo.manufactureId == 1201 || deviceinfo.manufactureId == 1241}}" />
  6. <van-sidebar-item title="指纹" wx:if="{{deviceinfo.manufactureId==201 || deviceinfo.manufactureId == 1201 || deviceinfo.manufactureId == 1241}}" />
  7. <!-- <van-sidebar-item title="身份证" /> -->
  8. </van-sidebar>
  9. <view class="" class="right">
  10. <view wx:if="{{activeKey==0}}" class="topBox">
  11. <view class="list">
  12. <view class="personli" wx:for="{{passwordList}}" wx:for-item="data" wx:key="{{index}}">
  13. <view class="name">{{data.pzname}}</view>
  14. <!-- <view class="name">{{data.password}}</view> -->
  15. <view class="operation">
  16. <view class="delete red" bindtap="delMode" data-current="1" data-index="{{index}}">删除</view>
  17. </view>
  18. </view>
  19. </view>
  20. <van-button type="primary" block size="small" bindtap="addPassword" data-current="0" data-addIndex="0" class="add">添加</van-button>
  21. </view>
  22. <view wx:if="{{activeKey==2}}" class="topBox">
  23. <radio-group bindchange="radioChange" class="radioGroup">
  24. <label class="weui-cell weui-check__label" wx:for="{{items}}" wx:key="{{item.value}}">
  25. <view class="weui-cell__hd">
  26. <radio value="{{item.value}}" checked="{{item.checked}}" />
  27. </view>
  28. <view class="weui-cell__bd">{{item.name}}</view>
  29. </label>
  30. </radio-group>
  31. <view class="list">
  32. <view class="personli" wx:for="{{FpList}}" wx:for-item="data" wx:key="{{index}}">
  33. <view class="name">{{data.pzname}}-{{data.fingerprintAlias}}</view>
  34. <view class="operation">
  35. <view class="delete red" bindtap="delMode" data-current="3" data-index="{{index}}">删除</view>
  36. </view>
  37. </view>
  38. </view>
  39. <van-button type="primary" class="add" size="small" block bindtap="addPassword" data-current="2"
  40. data-addIndex="2">添加</van-button>
  41. </view>
  42. <view wx:if="{{activeKey==1}}" class="topBox">
  43. <view class="list">
  44. <view class="personli" wx:for="{{NfcList}}" wx:for-item="data" wx:key="{{index}}">
  45. <!-- <view class="name">{{data.password}}</view> -->
  46. <view class="name">{{data.pzname}}</view>
  47. <view class="operation">
  48. <view class="delete red" bindtap="delMode" data-current="2" data-index="{{index}}">删除</view>
  49. </view>
  50. </view>
  51. </view>
  52. <van-button type="primary" class="add" size="small" block bindtap="addPassword" data-addIndex="1">添加</van-button>
  53. </view>
  54. <!-- <view wx:if="{{activeKey==3}}">
  55. <view class="add" bindtap="addPassword" data-addIndex="3">添加</view>
  56. <view class="list">
  57. <view class="personli" wx:for="{{CarIdList}}" wx:for-item="data" wx:key="{{index}}">
  58. <view class="name">{{data.password}}</view>
  59. <view class="operation">
  60. <view class="delete red" bindtap="delMode" data-current="4" data-index="{{index}}">删除</view>
  61. </view>
  62. </view>
  63. </view>
  64. </view> -->
  65. </view>
  66. <van-popup show="{{ show }}" custom-style="width: 90%" bind:close="onClose" round>
  67. <view class="addword" wx:if="{{addIndex==0}}">
  68. <van-field value="{{ password }}" type="number" placeholder="请输入6位数字密码" label="密码" border="{{ true }}"
  69. bind:change="onChange1" maxlength="6" />
  70. <picker mode="date" value="{{starttime}}" start="{{minDate}}" end="{{ minDate1 }}" bindchange="bindDateChange">
  71. <van-field value="{{ starttime }}" placeholder="请选择开始时间" label="开始时间" border="{{ true }}" readonly />
  72. </picker>
  73. <picker mode="date" value="{{endtime}}" start="{{minDate}}" end="{{ minDate1 }}" bindchange="bindDateChange1">
  74. <van-field value="{{ endtime }}" placeholder="请选择结束时间" label="结束时间" border="{{ true }}" readonly />
  75. </picker>
  76. <view class=""><button type="primary" bindtap="sendPassword">添加</button></view>
  77. </view>
  78. <view class="addword" wx:if="{{addIndex==1}}">
  79. <!-- <van-field value="{{ password }}" type="number" placeholder="请输入8位卡号" label="NFC" border="{{ true }}" bind:change="onChange1" maxlength="8" /> -->
  80. <van-field value="{{ pzname }}" placeholder="请输入NFC名称" label="NFC" border="{{ true }}" bind:change="onChange2"/>
  81. <picker mode="date" value="{{starttime}}" start="{{minDate}}" end="{{ minDate1 }}" bindchange="bindDateChange">
  82. <van-field value="{{ starttime }}" placeholder="请选择开始时间" label="开始时间" border="{{ true }}" readonly />
  83. </picker>
  84. <picker mode="date" value="{{endtime}}" start="{{minDate}}" end="{{ minDate1 }}"bindchange="bindDateChange1">
  85. <van-field value="{{ endtime }}" placeholder="请选择结束时间" label="结束时间" border="{{ true }}" readonly />
  86. </picker>
  87. <view class=""><button type="primary" bindtap="sendNfc">添加</button></view>
  88. </view>
  89. <view class="addword" wx:if="{{addIndex==2}}">
  90. <van-field value="{{ pzname }}" placeholder="请输入指纹名称" label="指纹" border="{{ true }}" bind:change="onChange2"
  91. maxlength="8" />
  92. <picker mode="date" value="{{starttime}}" start="{{minDate}}" end="{{ minDate1 }}" bindchange="bindDateChange">
  93. <van-field value="{{ starttime }}" placeholder="请选择开始时间" label="开始时间" border="{{ true }}" readonly />
  94. </picker>
  95. <picker mode="date" value="{{endtime}}" start="{{minDate}}" end="{{ minDate1 }}" bindchange="bindDateChange1">
  96. <van-field value="{{ endtime }}" placeholder="请选择结束时间" label="结束时间" border="{{ true }}" readonly />
  97. </picker>
  98. <view class=""><button type="primary" bindtap="sendFp">添加</button></view>
  99. </view>
  100. </van-popup>
  101. </view>
  102. <loading wx:if="{{showLoading}}"></loading>