accountFreezeRecord.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. <template>
  2. <view class="">
  3. <public-module></public-module>
  4. <u-sticky h5-nav-height="0">
  5. <view class="headers dis a-c j-start">
  6. <u-icon name="arrow-left" color="#333" size="38" @click="back"></u-icon>
  7. <text style="margin: auto;">{{ title }}</text>
  8. </view>
  9. <view class="filterTime dis j-s a-c ">
  10. <view class=" dis a-c " @click="searchPopup">
  11. <text>{{pageQuery.startTime && pageQuery.endTime ? pageQuery.startTime + '-' + pageQuery.endTime : '时间筛选' }}</text>
  12. <text>▼</text>
  13. </view>
  14. <view class=" dis a-c " @click="statusFilterShow=true">
  15. <text>{{pageQuery.gradeName || "全部"}}</text>
  16. <text>▼</text>
  17. </view>
  18. </view>
  19. <u-collapse hover-class="none">
  20. <u-collapse-item :title="item.head" v-for="(item, index) in itemList" :key="index">
  21. {{item.body}}
  22. </u-collapse-item>
  23. </u-collapse>
  24. </u-sticky>
  25. <view class="content" v-if="pageQuery.appStatus=='1'">
  26. <view class="cold" v-for="(item,index) in transferRecordsData" :key="index"
  27. @click="transferRecordsClick(item)">
  28. <view class="rows">
  29. <view class="left name">{{item.gradeName}}</view>
  30. <view class="right amount">{{ item.totalAmount }}</view>
  31. </view>
  32. <view class="rows mb-2">
  33. <view class="left">考核时间</view>
  34. <view class="right" style="white-space: pre-line;" v-if="item.dateTime">
  35. 起{{item.dateTime.upgradeTimeStart}}
  36. 止{{item.dateTime.upgradeTimeEnd}}
  37. </view>
  38. </view>
  39. <view class="rows mb-2">
  40. <view class="left">冻结时间</view>
  41. <view class="right" style="white-space: pre-line;" v-if="item.dateTime">
  42. 起{{item.dateTime.freezeStart}}
  43. 止{{item.dateTime.freezeEnd}}
  44. </view>
  45. </view>
  46. <view class="rows" v-if="item.dateTime">
  47. <view class="left">过期时间</view>
  48. <view class="right">{{item.dateTime.expired}}</view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="content" v-else>
  53. <view class="cold" v-for="(item,index) in transferRecordsData" :key="index"
  54. @click="transferRecordsClick(item)">
  55. <view class="rows">
  56. <view class="left name">{{item.gradeName}}</view>
  57. <view class="right amount">{{ item.totalAmount }}</view>
  58. </view>
  59. <view class="rows" v-if="item.dateTime">
  60. <view style="font-size: 20rpx;color: #999;">{{item.dateTime.expired}}</view>
  61. </view>
  62. </view>
  63. </view>
  64. <u-loadmore v-if="userlist.length!=0" :status="status" />
  65. <!-- 筛选组件 -->
  66. <uni-Popup :show="statusFilterShow" @close='statusFilterShow=false' headerTitle="筛选状态" :statusList="tablist"
  67. contentType="status" @statusConfirm="statusFilterConfirm">
  68. </uni-Popup>
  69. <my-date-picker ref="datePicker" @confirmPickDate="confirmPickDate" />
  70. </view>
  71. </template>
  72. <script>
  73. import myDatePicker from '../components/todaydate-picker.vue';
  74. export default {
  75. components: {
  76. myDatePicker
  77. },
  78. data() {
  79. return {
  80. tablist: [],
  81. itemList: [{
  82. head: "",
  83. body: "因您的职级处于冻结状态,且在该职级考核期区间内未完成解锁条件和申请解锁,按照规则,此部分收益已过期,无法再进行领取。",
  84. open: true,
  85. disabled: true
  86. }],
  87. title: '过期记录',
  88. referrerInfo: {}, //个人信息
  89. userlist: [],
  90. pageQuery: {
  91. grade: "",
  92. endTime: "",
  93. startTime: "",
  94. appStatus: '',
  95. pageNum: 1,
  96. pageSize: 10,
  97. },
  98. status: 'loadmore',
  99. totalPages: 0,
  100. parentStatus: "",
  101. transferRecords: [],
  102. transferRecordsTtoal: {},
  103. recordType: '',
  104. collapseTitle: '',
  105. statusFilterShow: false,
  106. quickOptions: [{
  107. label: "全部",
  108. value: null,
  109. },
  110. {
  111. label: "正常",
  112. value: "0",
  113. },
  114. {
  115. label: "已冻结",
  116. value: "1",
  117. },
  118. {
  119. label: "已失效",
  120. value: "2",
  121. }
  122. ],
  123. }
  124. },
  125. computed: {
  126. transferRecordsData() {
  127. const list = this.transferRecords.filter(val => val.grade != 1);
  128. return list;
  129. }
  130. },
  131. onReachBottom() {
  132. if (this.pageQuery.pageNum >= this.totalPages) return;
  133. this.status = 'loading';
  134. this.pageQuery.pageNum = ++this.pageQuery.pageNum;
  135. setTimeout(async () => {
  136. let res = await this.$http.post('/newAppPartner/selectByIdList', this.pageQuery);
  137. if (res.code == '200') {
  138. this.userlist = [...this.userlist, ...res.data.list.records];
  139. }
  140. if (this.pageQuery.pageNum >= this.totalPages) this.status = 'nomore';
  141. else this.status = 'loading';
  142. }, 1000)
  143. },
  144. async onLoad(options) {
  145. this.pageQuery.grade = options.grade;
  146. this.pageQuery.appStatus = options.appStatus;
  147. this.title = this.pageQuery.appStatus == '1' ? '冻结记录' : '过期记录'
  148. await this.querydata();
  149. await this.GradeListMap();
  150. this.itemList[0].head = options.appStatus == '1' ?
  151. `共有${this.transferRecordsTtoal.size || 0 }条冻结记录,累计冻结${this.transferRecordsTtoal.totalAmount || 0 }元` :
  152. `共有${this.transferRecordsTtoal.size || 0 }条过期记录,累计过期${this.transferRecordsTtoal.totalAmount || 0 }元`
  153. this.itemList[0].body = options.appStatus == '1' ?
  154. '因您的职级在考核期内,未达成考核任务,按照规则,此部分收益将冻结,考核任务达成后即可提现,在规定期间内未达成考核任务,收益将过期。' :
  155. '因您的职级处于冻结状态,且在该职级考核期区间内未完成解锁条件和申请解锁,按照规则,此部分收益已过期,无法再进行领取。'
  156. },
  157. methods: {
  158. transferRecordsClick(item) {
  159. let params = {
  160. grade: item.grade,
  161. appStatus: this.pageQuery.appStatus,
  162. }
  163. uni.navigateTo({
  164. url: "/pages/institutional/myEarnings?info=" + JSON.stringify(params),
  165. })
  166. },
  167. //获取角色列表
  168. async GradeListMap() {
  169. let res = await this.$http.get('/partner/getUserGradeListMap');
  170. if (res.code == 200) {
  171. this.tablist = res.data;
  172. this.tablist.map(val => {
  173. val.label = val.gradeName;
  174. return val;
  175. })
  176. }
  177. },
  178. back() {
  179. uni.navigateBack({
  180. delta: 1, // 返回的页面数,如果是1表示返回上一页
  181. success: function() {}
  182. });
  183. },
  184. async querydata() {
  185. let res = await this.$http.post('/partner/commissionDetails/queryExpiredLockRecords', this.pageQuery);
  186. if (res.code == '200') {
  187. this.transferRecords = res.data.data;
  188. this.transferRecordsTtoal = res.data.total;
  189. }
  190. },
  191. //激活时间选择组件
  192. searchPopup() {
  193. this.$refs.datePicker.open()
  194. },
  195. //日期选择回调
  196. confirmPickDate(startdate, enddate) {
  197. this.pageQuery.startTime = startdate;
  198. this.pageQuery.endTime = enddate;
  199. },
  200. statusFilterConfirm(item) {
  201. this.pageQuery.grade = item.grade;
  202. this.pageQuery.gradeName = item.gradeName;
  203. this.querydata();
  204. this.statusFilterShow = false;
  205. },
  206. }
  207. }
  208. </script>
  209. <style lang="scss" scoped>
  210. .headers {
  211. width: 100%;
  212. z-index: 999999;
  213. padding: 30rpx;
  214. padding-top: 50px;
  215. background: linear-gradient(180deg, #D1EFFE 0%, #FFFFFF 100%);
  216. border-bottom: 1rpx solid #f2f2f2;
  217. text {
  218. font-size: 36rpx;
  219. font-weight: bold;
  220. color: #000;
  221. }
  222. .right {
  223. position: absolute;
  224. right: 30rpx;
  225. image {
  226. width: 28rpx;
  227. height: 28rpx;
  228. margin-right: 4rpx;
  229. }
  230. text {
  231. font-weight: 400;
  232. color: #000;
  233. font-size: 24rpx;
  234. }
  235. }
  236. }
  237. //头部背景
  238. .homeBackground {
  239. position: fixed;
  240. top: 0;
  241. left: 0;
  242. z-index: 999;
  243. width: 100%;
  244. height: 176rpx;
  245. background: linear-gradient(180deg, #D1EFFE 0%, #FFFFFF 100%);
  246. border-bottom: 1rpx solid #f2f2f2;
  247. }
  248. //业绩
  249. .performance {
  250. width: 100%;
  251. height: 60rpx;
  252. background: #EBF4FF;
  253. border-radius: 0rpx 0rpx 0rpx 0rpx;
  254. font-size: 30rpx;
  255. color: #2B67EF;
  256. }
  257. //时间筛选
  258. .filterTime {
  259. width: 100%;
  260. background: #fff;
  261. border-radius: 0rpx 0rpx 0rpx 0rpx;
  262. padding: 20rpx 30rpx;
  263. box-sizing: border-box;
  264. text:first-child {
  265. font-size: 26rpx;
  266. color: #333;
  267. }
  268. text:last-child {
  269. font-size: 19rpx;
  270. color: #666;
  271. margin-left: 4rpx;
  272. }
  273. }
  274. .intro {
  275. position: fixed;
  276. top: 176rpx;
  277. left: 0;
  278. z-index: 999;
  279. width: 100%;
  280. padding: 25rpx 30rpx;
  281. box-sizing: border-box;
  282. background-color: #FFFFFF;
  283. image {
  284. width: 128rpx;
  285. height: 128rpx;
  286. }
  287. text {
  288. font-size: 28rpx;
  289. color: #666;
  290. }
  291. .title {
  292. font-size: 32rpx;
  293. color: #333;
  294. font-weight: bold;
  295. }
  296. .level {
  297. padding: 0 10rpx;
  298. box-sizing: border-box;
  299. font-size: 22rpx;
  300. color: #2D6DFF;
  301. border: 1rpx solid #2D6DFF;
  302. border-radius: 4rpx;
  303. margin-left: 20rpx;
  304. background: rgba(45, 109, 255, 0.1);
  305. }
  306. }
  307. //列表数据
  308. .card {
  309. position: relative;
  310. background: #FFFFFF;
  311. border-radius: 10rpx;
  312. background-image: url("/static/card.png");
  313. background-size: 100% 100%;
  314. border-top: 1px solid;
  315. border-image: linear-gradient(270deg, rgba(45, 109, 255, 0), rgba(45, 109, 255, 1), rgba(45, 109, 255, 0)) 1 1;
  316. padding: 20rpx 30rpx 30rpx;
  317. .card-title {
  318. .avatar {
  319. width: 40rpx;
  320. height: 40rpx;
  321. border-radius: 50%;
  322. image {
  323. width: 100%;
  324. height: 100%;
  325. }
  326. }
  327. >text {
  328. font-size: 24rpx;
  329. color: #666;
  330. }
  331. .name {
  332. font-size: 30rpx;
  333. color: #333;
  334. font-weight: bold;
  335. }
  336. }
  337. .card-data {
  338. .view {
  339. width: 33.33%;
  340. text:first-child {
  341. font-size: 30rpx;
  342. color: #333;
  343. font-weight: bold;
  344. }
  345. text:last-child {
  346. font-size: 24rpx;
  347. color: #999;
  348. }
  349. }
  350. .view:nth-child(2) {
  351. border-left: 1rpx solid #eee;
  352. border-right: 1rpx solid #eee;
  353. }
  354. }
  355. }
  356. .content {
  357. margin: 20rpx 30rpx;
  358. box-sizing: border-box;
  359. background-color: #FFFFFF;
  360. border-radius: 10rpx 10rpx 10rpx 10rpx;
  361. padding: 0 30rpx;
  362. box-sizing: border-box;
  363. .cold {
  364. padding: 30rpx 0;
  365. border-bottom: 1rpx solid #eee;
  366. .rows {
  367. display: flex;
  368. justify-content: space-between;
  369. .amount {
  370. font-size: 30rpx;
  371. color: #333;
  372. font-weight: bold;
  373. }
  374. .left {
  375. font-size: 28rpx;
  376. color: #999;
  377. }
  378. .name {
  379. font-size: 30rpx;
  380. color: #333;
  381. }
  382. .right {
  383. font-size: 28rpx;
  384. color: #333;
  385. }
  386. }
  387. }
  388. .cold:last-child {
  389. border-bottom: none;
  390. }
  391. }
  392. ::v-deep .uni-collapse-cell__title {
  393. background-color: #EBF4FF;
  394. height: 60rpx;
  395. padding: 0 30rpx;
  396. color: #2B67EF;
  397. }
  398. ::v-deep .uni-collapse-cell--hide {
  399. height: 60rpx;
  400. }
  401. ::v-deep .uni-collapse-cell__wrapper .content {
  402. margin: 0;
  403. background-color: #EBF4FF;
  404. color: #2B67EF;
  405. padding: 10rpx 30rpx;
  406. }
  407. ::v-deep .uni-collapse-cell__title::after {
  408. content: '';
  409. /* 确保内容不为空 */
  410. border-width: 4rpx 4rpx 0 0;
  411. /* 根据实际需要调整边框宽度 */
  412. border-style: solid;
  413. border-color: #2B67EF;
  414. /* 箭头颜色 */
  415. width: 16rpx;
  416. /* 箭头宽度 */
  417. height: 16rpx;
  418. /* 箭头高度 */
  419. transform: rotate(134deg);
  420. /* 旋转角度 */
  421. display: inline-block;
  422. /* 确保以块级元素显示 */
  423. margin-left: 10px;
  424. /* 根据需要调整边距 */
  425. }
  426. ::v-deep {
  427. .u-collapse-head {
  428. padding: 20rpx 30rpx;
  429. box-sizing: border-box;
  430. .u-icon-wrap {
  431. .u-icon__icon {
  432. color: #2B67EF !important;
  433. }
  434. }
  435. }
  436. .u-collapse-title {
  437. color: #2B67EF;
  438. }
  439. .u-collapse-item {
  440. background-color: #EBF4FF;
  441. }
  442. .u-collapse-body {
  443. padding: 0 30rpx;
  444. box-sizing: border-box;
  445. .u-collapse-content {
  446. color: #2B67EF;
  447. }
  448. }
  449. }
  450. </style>