accountExamine.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. <template>
  2. <!-- 账户审核 -->
  3. <view class="add main-bg">
  4. <view class="search" @click="goto('/pages/manage/account/retrieval')">
  5. <u-icon name="search" color="#2E4F1C" size="44"></u-icon>
  6. <view class="search-text font-color2">退役军人检索</view>
  7. </view>
  8. <view class="sys-header">
  9. <view class="sys" @click="goto('/pages/soldier/user/scanning?flag=true')"><!--/pages/soldier/user/scanning-->
  10. <view class="icon">
  11. <u-icon name="scan" color="#2E4F1C" size="88"></u-icon>
  12. </view>
  13. <view class="text font-twenty-four font-color3">扫一扫</view>
  14. </view>
  15. <view class="sys" @click="goto('/pages/soldier/user/add')">
  16. <view class="icon">
  17. <u-icon name="plus" color="#2E4F1C" size="78"></u-icon>
  18. </view>
  19. <view class="text font-twenty-four font-color3">添加优抚对象信息</view>
  20. </view>
  21. <view class="sys" @click="handleQuit">
  22. <view class="icon">
  23. <u-icon name="backspace" color="#2E4F1C" size="78"></u-icon>
  24. </view>
  25. <view class="text font-twenty-four font-color3">退出登录</view>
  26. </view>
  27. </view>
  28. <view v-if="list.length > 0">
  29. <view class="examine-content" v-for="(item,index) in list">
  30. <view class="examine-dis">
  31. <view class="number header-long-bg">{{index + 1}}</view>
  32. <view style="margin-left: 30rpx;">
  33. <view class="font-twenty font-color3">
  34. 姓名:{{item.veteransName}}
  35. </view>
  36. <view class="font-twenty font-color3" style="margin: 30rpx 0;">
  37. 身份证号:{{item.veteransIdcard}}
  38. </view>
  39. <view v-if="item.veteransPic">
  40. <image :src="image(item.veteransPic)" mode="" class="examine-img" @tap="preAvatar(image(item.veteransPic))"></image>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="button-dis">
  45. <button type="default" class="btn" @click="handlePass(item.veteransId)">通过</button>
  46. <button type="default" class="btn color" @click="show(item.veteransId)">不通过</button>
  47. </view>
  48. </view>
  49. </view>
  50. <view v-else style="padding-top: 200rpx;">
  51. <u-empty text="暂无数据" mode="list"></u-empty>
  52. </view>
  53. <ming-pop ref="statement" direction="below" :is_mask="true" :width="100" height="50%" :maskFun="true">
  54. <pop @close="close()" @noPass='handleNoPass'></pop>
  55. </ming-pop>
  56. <u-tabbar :list="tabBarList" :active-color="activeColor" :inactive-color="inactiveColor"
  57. :border-top="borderTop"></u-tabbar>
  58. <u-toast ref="uToast" />
  59. </view>
  60. </template>
  61. <script>
  62. import { mapGetters } from 'vuex'
  63. import server from "@/api/index";
  64. import http from '@/common/http.js'
  65. export default {
  66. data() {
  67. return {
  68. borderTop: false,
  69. inactiveColor: '#ccc',
  70. activeColor: '#2E4F1C',
  71. list:[
  72. {veteransName: 'qwe',
  73. veteransIdcard:123,
  74. veteransPic: '/static/img.png'
  75. }
  76. ],
  77. id: null,
  78. userInfo: {}
  79. }
  80. },
  81. computed: {
  82. ...mapGetters([
  83. 'tabBarList',
  84. 'role'
  85. ])
  86. },
  87. onLoad(){
  88. uni.startPullDownRefresh();
  89. },
  90. onPullDownRefresh() {
  91. this.userInfo = uni.getStorageSync('userInfo');
  92. this.getAccountListFn();
  93. setTimeout(function () {
  94. uni.stopPullDownRefresh();
  95. }, 1000);
  96. },
  97. onShow() {
  98. this.userInfo = uni.getStorageSync('userInfo');
  99. this.getAccountListFn();
  100. },
  101. methods: {
  102. handleQuit(){
  103. let _this = this;
  104. uni.showModal({
  105. title: '提示',
  106. content: '确定退出登录吗?',
  107. success: function (res) {
  108. if (res.confirm) {
  109. uni.removeStorage({
  110. key: 'userInfo',
  111. success: function (res) {
  112. uni.removeStorage({
  113. key: 'role',
  114. });
  115. uni.removeStorage({
  116. key: 'token',
  117. success: function (res) {
  118. uni.reLaunch({
  119. url: '/pages/index/index'
  120. });
  121. }
  122. });
  123. }
  124. });
  125. } else if (res.cancel) {
  126. console.log('用户点击取消');
  127. }
  128. }
  129. });
  130. },
  131. goto(url){
  132. uni.navigateTo({
  133. url
  134. })
  135. },
  136. image(e) {
  137. return http.webUrl + e
  138. },
  139. handlePass(id){
  140. let _this = this;
  141. uni.showModal({
  142. title: '提示',
  143. content: '确定通过审核吗?',
  144. success: function (res) {
  145. if (res.confirm) {
  146. let params = {
  147.         veteransId: id,
  148.         veteransStatus: "2",
  149.         veteransReviewer: _this.userInfo.userId
  150. }
  151. server.getAccountPass(params).then(res =>{
  152. _this.$refs.uToast.show({
  153. title: '通过成功!',
  154. type: 'default',
  155. });
  156. _this.getAccountListFn()
  157. })
  158. } else if (res.cancel) {
  159. console.log('用户点击取消');
  160. }
  161. }
  162. });
  163. },
  164. handleNoPass(data){
  165. let _this = this;
  166. let params = {
  167. remark: data,
  168.         veteransId: this.id,
  169.         veteransStatus: "3",
  170.         veteransReviewer: _this.userInfo.userId,
  171. }
  172. server.getAccountPass(params).then(res =>{
  173. _this.$refs.uToast.show({
  174. title: '操作成功!',
  175. type: 'default',
  176. });
  177. _this.getAccountListFn()
  178. })
  179. },
  180. getAccountListFn(){
  181. server.getAccountList({veteransStatus: "1"}).then(res =>{
  182. this.list = [];
  183. if(res){
  184. this.list = res
  185. }
  186. })
  187. },
  188. show(id) {
  189. this.$refs.statement.show();
  190. this.id = id
  191. },
  192. close() {
  193. this.$refs.statement.close();
  194. },
  195. // 预览图片
  196. preAvatar(url) {
  197. console.log(url)
  198. wx.previewImage({
  199. current: url, // 当前显示图片的 http 链接
  200. urls: [url] ,// 需要预览的图片 http 链接列表
  201. })
  202. },
  203. }
  204. }
  205. </script>
  206. <style lang="scss" scoped>
  207. .add{
  208. width: 100%;
  209. height: auto;
  210. min-height: 100vh;
  211. padding: 0rpx 30rpx 30rpx;
  212. .search{
  213. width: 100%;
  214. height: 80rpx;
  215. margin-top: 30rpx;
  216. background-color: rgba(46, 79, 28, 0.13);
  217. border-radius: 16rpx;
  218. display: flex;
  219. justify-content: center;
  220. .search-text{
  221. height: 80rpx;
  222. padding-left: 16rpx;
  223. line-height: 80rpx;
  224. letter-spacing: 1rpx;
  225. }
  226. }
  227. }
  228. .sys-header{
  229. padding-top: 30rpx;
  230. display: flex;
  231. justify-content: space-between;
  232. .sys{
  233. width: calc(33% - 10rpx);
  234. height: 218rpx;
  235. background: #FFFFFF;
  236. border-radius: 24rpx;
  237. padding: 30rpx 0rpx;
  238. .icon{
  239. height: 88rpx;
  240. text-align: center;
  241. image{
  242. width: 88rpx;
  243. height: 88rpx;
  244. }
  245. }
  246. .text{
  247. text-align: center;
  248. height: 100rpx;
  249. line-height: 100rpx;
  250. letter-spacing: 2rpx;
  251. }
  252. }
  253. }
  254. .examine-content {
  255. margin: 50rpx 0rpx 0;
  256. padding: 30rpx;
  257. background: rgba(46, 79, 28, 0.13);
  258. opacity: 1;
  259. border-radius: 16rpx;
  260. .examine-dis {
  261. display: flex;
  262. .number {
  263. width: 48rpx;
  264. height: 48rpx;
  265. color: #FFFFFF;
  266. padding-top: 5rpx;
  267. text-align: center;
  268. border-radius: 50%;
  269. }
  270. .examine-img {
  271. width: 360rpx;
  272. height: 203rpx;
  273. margin-left: 60rpx;
  274. }
  275. }
  276. .button-dis {
  277. display: flex;
  278. margin-top: 30rpx;
  279. .btn {
  280. width: 300rpx;
  281. background: #2E4F1C;
  282. color: #FFFFFF;
  283. border-radius: 48rpx;
  284. }
  285. .color {
  286. background: #CC1019;
  287. }
  288. }
  289. }
  290. </style>