examine-detail.vue 9.3 KB

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