examine-detail.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <template>
  2. <view class="examine-detail">
  3. <custom-nav ref="ltm" :title="title" />
  4. <w-picker ref="Selector" mode="selector" defaultVal="特级代理" themeColor="#F76454" :selectList="selectList" @confirm="onConfirm" />
  5. <view class="content">
  6. <view class="examine-item">
  7. <view class="top">
  8. <view class="apply"> 申请人:{{ info.apply_name }} </view>
  9. <view class="invite">
  10. <text class="cuIcon-selection icon"></text>
  11. <text>邀请人:{{ info.invite_name }}</text>
  12. </view>
  13. <view class="time">
  14. <text class="cuIcon-time icon"></text>
  15. <text>申请时间:{{ info.apply_time }}</text>
  16. </view>
  17. </view>
  18. <view class="bot">
  19. <view class="left">
  20. <text class="name">状态:</text>
  21. <text class="basecolor">待审核</text>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="app-item item item-space">
  26. <text>微信昵称</text>
  27. <text style="text-align: right;">{{ info.apply_name }}</text>
  28. </view>
  29. <view class="app-item item">
  30. <text>真实姓名</text>
  31. <text style="text-align: right;">{{ info.real_name }}</text>
  32. </view>
  33. <view class="app-item item">
  34. <text>身份证号</text>
  35. <text style="text-align: right;">{{ info.id_card_num }}</text>
  36. </view>
  37. <view class="app-item item">
  38. <text>联系方式</text>
  39. <text style="text-align: right;">{{ info.apply_phone }}</text>
  40. </view>
  41. <view class="app-item item level_name" @tap="chooseLevel">
  42. <text>代理等级</text>
  43. <view>
  44. <text>{{ info.level ? info.level : '请选择代理等级' }}</text>
  45. <text v-if="type === 0" class="cuIcon-right"></text>
  46. </view>
  47. </view>
  48. <view class="button">
  49. <view class="left big-btn" @tap="tapNoass">驳回</view>
  50. <view class="right big-btn bg" @tap="tapPass">通过</view>
  51. </view>
  52. </view>
  53. <view v-if="reject || animationKey" class="reject" @tap.stop="closeSheet">
  54. <view class="bottom-sheet" :class="reject ? 'moveIn' : 'moveOut'" @tap.stop="">
  55. <view class="top">
  56. <text>驳回原因</text>
  57. <text class="cuIcon-close" @tap="closeSheet"></text>
  58. </view>
  59. <view class="msg">若所邀请人填写信息与你线下沟通不符,请先进行联系确认 之后,再进行驳回申请</view>
  60. <view class="sheet-item" v-for="(item, index) in rejectReasonList" :key="index" @tap="chooseReason(index)">
  61. <view class="sheet-item-left">{{ item }}</view>
  62. <text v-if="index === choosedRejectReason" class="cuIcon-roundcheckfill basecolor"></text>
  63. <text v-else class="cuIcon-round"></text>
  64. </view>
  65. <view class="sheet-item" @tap="chooseReason(rejectReasonList.length)">
  66. <view class="sheet-item-left">
  67. 其他:<input type="text" v-model="rejectReason" maxlength="12" placeholder="请输入驳回原因(12字以内)" />
  68. </view>
  69. <text v-if="rejectReasonList.length === choosedRejectReason" class="cuIcon-roundcheckfill basecolor"></text>
  70. <text v-else class="cuIcon-round"></text>
  71. </view>
  72. <view class="bot">
  73. <view class="left big-btn" @tap="closeSheet">暂不驳回</view>
  74. <view class="right big-btn bg" @tap="tapReject">驳回申请</view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. import { _API_Examine } from '@/apis/team.js'
  82. import WPicker from '@/components/w-picker/w-picker.vue'
  83. export default {
  84. components: { WPicker },
  85. data() {
  86. return {
  87. title: '审核详情',
  88. type: 0, // 0 邀请人审核 1 上级审核
  89. index: 0,
  90. info: {},
  91. selectList: [
  92. { label: '特级代理', value: '1' },
  93. { label: '顶级代理', value: '2' },
  94. { label: '皇冠代理', value: '3' },
  95. ],
  96. reject: false,
  97. animationKey: false,
  98. rejectReasonList: [
  99. '微信昵称填写错误',
  100. '与线下沟通情况不符',
  101. '真实姓名填写错误'
  102. ],
  103. rejectReason: '',
  104. choosedRejectReason: -1
  105. }
  106. },
  107. onLoad(opt) {
  108. this.type = +opt.type
  109. this.index = opt.index
  110. this.info = JSON.parse(opt.data)
  111. },
  112. methods: {
  113. chooseLevel() { // 点击选择等级
  114. if (this.type === 0) {
  115. this.$refs.Selector.show()
  116. }
  117. },
  118. onConfirm(e) { // 邀请人选择等级
  119. this.info.level = e.checkArr.label
  120. this.info.levelID = e.checkArr.value
  121. },
  122. tapNoass() { // 点击驳回
  123. this.reject = true
  124. this.animationKey = true
  125. },
  126. chooseReason(index) { // 选择驳回原因
  127. this.choosedRejectReason = index
  128. },
  129. tapPass() { // 点击通过
  130. if (!this.info.levelID && this.type === 0) {
  131. this.$refs.ltm.toast('请选择注册用户的代理等级')
  132. return
  133. }
  134. this.$refs.ltm.modal('提示', ['确定要通过注册申请?']).then(() => {
  135. this.$refs.ltm.loading()
  136. _API_Examine({ type: this.type ? 'up' : 'invite', action: 'pass', id: this.info.id, level: this.info.levelID }).then(() => {
  137. uni.$emit('EXAMINEPASS', this.type, this.index) // 广播通过
  138. this.$refs.ltm.modal('提示', ['通过成功'], 'noCancel').then(() => uni.navigateBack())
  139. })
  140. }).catch(() => {
  141. this.$refs.ltm.toast('取消通过')
  142. })
  143. },
  144. tapReject() { // 驳回
  145. if (this.rejectReason || (this.choosedRejectReason > -1 && this.choosedRejectReason < this.rejectReasonList.length)) {
  146. const reason = this.rejectReason ? this.rejectReason : this.rejectReasonList[this.choosedRejectReason]
  147. this.$refs.ltm.modal('提示', ['确定要驳回注册申请?']).then(() => {
  148. this.reject = false
  149. this.$refs.ltm.loading()
  150. _API_Examine({ type: this.type ? 'up' : 'invite', action: 'reject', id: this.info.id, reason }).then(() => {
  151. uni.$emit('EXAMINEREJECT', this.type, this.index, reason) // 广播驳回
  152. this.$refs.ltm.modal('提示', ['驳回成功'], 'noCancel').then(() => uni.navigateBack())
  153. })
  154. }).catch(() => {
  155. this.$refs.ltm.toast('取消驳回')
  156. })
  157. } else {
  158. this.$refs.ltm.toast('请输入驳回原因', 'bottom')
  159. }
  160. },
  161. closeSheet() { // 关闭驳回弹窗
  162. this.reject = false
  163. setTimeout(() => {
  164. this.animationKey = false
  165. }, 200)
  166. }
  167. }
  168. }
  169. </script>
  170. <style lang="scss">
  171. .examine-detail {
  172. @include page();
  173. .content {
  174. .examine-item {
  175. height: 270rpx;
  176. margin-top: 10rpx;
  177. background: #FFFFFF;
  178. position: relative;
  179. .top {
  180. @include flex(column);
  181. height: 180rpx;
  182. padding: 30rpx;
  183. box-sizing: border-box;
  184. border-bottom: 1rpx solid $app-base-bg;
  185. >view {
  186. flex: 1;
  187. width: 100%;
  188. font-size: 26rpx;
  189. color: $app-sec-text-color;
  190. &.apply {
  191. font-size: 32rpx;
  192. margin-bottom: 16rpx;
  193. color: $app-main-text-color;
  194. }
  195. &.invite, &.time {
  196. line-height: 44rpx;
  197. .icon {
  198. font-size: 32rpx;
  199. margin-right: 20rpx;
  200. color: $app-base-color;
  201. }
  202. }
  203. }
  204. }
  205. .bot {
  206. @include flex();
  207. height: 90rpx;
  208. padding: 30rpx;
  209. font-size: 32rpx;
  210. box-sizing: border-box;
  211. justify-content: space-between;
  212. .left {
  213. flex: 1;
  214. @include flex();
  215. justify-content: flex-start;
  216. .status {
  217. color: $app-sec-text-color;
  218. }
  219. .reject {
  220. font-size: 26rpx;
  221. margin-left: 20rpx;
  222. }
  223. }
  224. }
  225. .ispass {
  226. top: 20rpx;
  227. width: 85rpx;
  228. right: 30rpx;
  229. height: 58rpx;
  230. position: absolute;
  231. }
  232. }
  233. .level_name {
  234. .picker {
  235. @include flex();
  236. height: 90rpx;
  237. text-align: right;
  238. justify-content: flex-end;
  239. }
  240. }
  241. .button {
  242. @include flex();
  243. height: 88rpx;
  244. margin-top: 99rpx;
  245. justify-content: space-around;
  246. view {
  247. width: 240rpx;
  248. border-radius: 10rpx;
  249. }
  250. }
  251. }
  252. .reject {
  253. @include flex();
  254. top: 0;
  255. left: 0;
  256. right: 0;
  257. bottom: 0;
  258. z-index: 1;
  259. position: fixed;
  260. align-items: flex-end;
  261. background: rgba(0, 0, 0, .4);
  262. .bottom-sheet {
  263. @include flex(column);
  264. width: 100%;
  265. background: #FFFFFF;
  266. border-radius: 20rpx 20rpx 0 0;
  267. &.moveIn {
  268. animation: move-in .2s;
  269. animation-fill-mode: forwards;
  270. }
  271. &.moveOut {
  272. animation: move-out .2s;
  273. animation-fill-mode: forwards;
  274. }
  275. .top {
  276. @include flex();
  277. width: 100%;
  278. height: 80rpx;
  279. font-size: 32rpx;
  280. position: relative;
  281. .cuIcon-close {
  282. @include flex();
  283. top: 0;
  284. right: 0;
  285. height: 100%;
  286. width: 110rpx;
  287. position: absolute;
  288. }
  289. }
  290. .msg {
  291. height: 90rpx;
  292. font-size: 26rpx;
  293. background: #F2F2F2;
  294. padding: 14rpx 30rpx;
  295. box-sizing: border-box;
  296. }
  297. .sheet-item {
  298. @include flex();
  299. width: 100%;
  300. height: 74rpx;
  301. padding: 0 30rpx;
  302. box-sizing: border-box;
  303. justify-content: space-between;
  304. border-bottom: 1px solid #F2F2F2;
  305. .sheet-item-left {
  306. @include flex();
  307. flex: 1;
  308. justify-content: flex-start;
  309. input {
  310. flex: 1;
  311. }
  312. }
  313. }
  314. .bot {
  315. @include flex();
  316. width: 100%;
  317. height: 124rpx;
  318. justify-content: space-around;
  319. view {
  320. margin: 0;
  321. width: 185rpx;
  322. height: 68rpx;
  323. }
  324. }
  325. }
  326. }
  327. }
  328. @keyframes move-in {
  329. 0% {
  330. transform: translateY(100%);
  331. }
  332. 100% {
  333. transform: translateY(0%);
  334. }
  335. }
  336. @keyframes move-out {
  337. 0% {
  338. transform: translateY(0%);
  339. }
  340. 100% {
  341. transform: translateY(100%);
  342. }
  343. }
  344. </style>