pending.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. <template>
  2. <view class="content">
  3. <view class="navbar">
  4. <view v-for="(item, index) in navList" :key="index" class="nav-item"
  5. :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
  6. </view>
  7. <swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
  8. <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
  9. <scroll-view class="list-scroll-content" scroll-y>
  10. <view class="main" v-for="(item,index) in 10" :key="index">
  11. <view class="main-top flex">
  12. <view class="main-title ">
  13. 旷工处罚
  14. </view>
  15. <view class="main-type" :class="{red:index%3==1}">
  16. {{index%3 ==1?'待处理':index%3 ==2?'已反对':'已完成'}}
  17. </view>
  18. </view>
  19. <view class="main-time">
  20. 处罚日期:2023年10月10日
  21. </view>
  22. <view class="main-info">
  23. <view class="main-info-item">
  24. <text
  25. class="main-info-title">处罚说明:</text>处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由处罚理由
  26. </view>
  27. <view class="main-info-item" v-if="index%3 !=1">
  28. <text
  29. class="main-info-title">领导处理说明:</text>领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明领导处理说明
  30. </view>
  31. </view>
  32. <view class="main-name flex">
  33. <view class="main-name-left">
  34. 提交人:李丹丹 <text v-if="index%3 !=1">领导:高启强</text>
  35. </view>
  36. <view class="main-name-right">
  37. ¥200
  38. </view>
  39. </view>
  40. <view class="btn-box" v-if="index%3 == 1" @click="open()">
  41. <view class="btn1">
  42. 拒绝扣款
  43. </view>
  44. <view class="btn2">
  45. 同意扣款
  46. </view>
  47. </view>
  48. </view>
  49. </scroll-view>
  50. </swiper-item>
  51. </swiper>
  52. <uni-popup ref="popup" type="center">
  53. <view class="popup-box">
  54. <view class="popup-title">
  55. 输入意见
  56. </view>
  57. <view class="popup-main">
  58. <textarea placeholder="请点击输入..." class="popup-main-font" name="" id="" cols="30"
  59. rows="10"></textarea>
  60. </view>
  61. <view class="popup-btn-box flex">
  62. <view class="popup-btn-item qx" @click="cancel()">
  63. 取消
  64. </view>
  65. <view class="popup-btn-item qd">
  66. 确定
  67. </view>
  68. </view>
  69. </view>
  70. </uni-popup>
  71. </view>
  72. </template>
  73. <script>
  74. export default {
  75. data() {
  76. return {
  77. tabCurrentIndex: 0,
  78. navList: [{
  79. state: '',
  80. text: '全部',
  81. loadingType: 'more',
  82. orderList: [],
  83. page: 1, //当前页数
  84. limit: 10 //每次信息条数
  85. },
  86. {
  87. state: '',
  88. text: '待处理',
  89. loadingType: 'more',
  90. orderList: [],
  91. page: 1, //当前页数
  92. limit: 10 //每次信息条数
  93. },
  94. {
  95. state: '',
  96. text: '已反对',
  97. loadingType: 'more',
  98. orderList: [],
  99. page: 1, //当前页数
  100. limit: 10 //每次信息条数
  101. },
  102. {
  103. state: '',
  104. text: '已完成',
  105. loadingType: 'more',
  106. orderList: [],
  107. page: 1, //当前页数
  108. limit: 10 //每次信息条数
  109. }
  110. ]
  111. }
  112. },
  113. onLoad() {},
  114. onShow() {},
  115. onReachBottom() {},
  116. onReady() {},
  117. methods: {
  118. //swiper 切换
  119. changeTab(e) {
  120. this.tabCurrentIndex = e.target.current;
  121. this.loadData('tabChange');
  122. },
  123. //顶部tab点击
  124. tabClick(index) {
  125. this.tabCurrentIndex = index;
  126. },
  127. loadData() {
  128. },
  129. open() {
  130. this.$refs.popup.open()
  131. },
  132. cancel() {
  133. this.$refs.popup.close()
  134. }
  135. }
  136. };
  137. </script>
  138. <style lang="scss">
  139. page,
  140. .content {
  141. min-height: 100%;
  142. height: auto;
  143. }
  144. .navbar {
  145. display: flex;
  146. height: 40px;
  147. padding: 0 5px;
  148. background: #fff;
  149. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
  150. position: relative;
  151. z-index: 10;
  152. .nav-item {
  153. flex: 1;
  154. display: flex;
  155. justify-content: center;
  156. align-items: center;
  157. height: 100%;
  158. font-size: 15px;
  159. color: $font-color-dark;
  160. position: relative;
  161. &.current {
  162. color: #FF4C4C;
  163. &:after {
  164. content: '';
  165. position: absolute;
  166. left: 50%;
  167. bottom: 0;
  168. transform: translateX(-50%);
  169. width: 44px;
  170. height: 0;
  171. border-bottom: 2px solid #FF4C4C;
  172. }
  173. }
  174. }
  175. }
  176. .swiper-box {
  177. height: calc(100vh - 40px);
  178. }
  179. .list-scroll-content {
  180. height: 100%;
  181. }
  182. .main {
  183. margin: 20rpx auto 0;
  184. width: 706rpx;
  185. background: #FFFFFF;
  186. border-radius: 15rpx;
  187. padding: 34rpx 20rpx 0rpx;
  188. .main-top {
  189. padding: 0 16rpx;
  190. .main-title {
  191. font-size: 30rpx;
  192. font-family: PingFang SC;
  193. font-weight: bold;
  194. color: #333333;
  195. }
  196. .main-type {
  197. font-size: 26rpx;
  198. font-family: PingFang SC;
  199. font-weight: 500;
  200. color: #999999;
  201. }
  202. .red {
  203. color: #FF4C4C;
  204. }
  205. }
  206. .main-time {
  207. margin-top: 20rpx;
  208. padding: 0 16rpx;
  209. font-size: 26rpx;
  210. font-family: PingFang SC;
  211. font-weight: 500;
  212. color: #666666;
  213. }
  214. .main-info {
  215. padding: 0 14rpx;
  216. margin-top: 20rpx;
  217. padding: 26rpx 26rpx 26rpx 20rpx;
  218. background: #f2f2f2;
  219. .main-info-item {
  220. .main-info-title {
  221. color: #333333;
  222. }
  223. margin-top: 24rpx;
  224. font-size: 24rpx;
  225. font-family: PingFang SC;
  226. font-weight: bold;
  227. color: #666666;
  228. }
  229. .main-info-item:first-child {
  230. margin-top: 0;
  231. }
  232. }
  233. .main-name {
  234. padding: 28rpx 16rpx;
  235. .main-name-left {
  236. font-size: 24rpx;
  237. font-family: PingFang SC;
  238. font-weight: bold;
  239. color: #333333;
  240. }
  241. .main-name-right {
  242. font-size: 30rpx;
  243. font-family: PingFang SC;
  244. font-weight: bold;
  245. color: #FF4C4C;
  246. }
  247. }
  248. .btn-box {
  249. border-top: 1px solid #f6f6f6;
  250. padding: 28rpx 12rpx 20rpx;
  251. display: flex;
  252. justify-content: flex-end;
  253. .btn1 {
  254. display: flex;
  255. justify-content: center;
  256. align-items: center;
  257. width: 144rpx;
  258. height: 55rpx;
  259. border: 2px solid #EBEBEB;
  260. border-radius: 28rpx;
  261. font-size: 26rpx;
  262. font-family: PingFang SC;
  263. font-weight: 500;
  264. color: #999999;
  265. }
  266. .btn2 {
  267. margin-left: 20rpx;
  268. display: flex;
  269. justify-content: center;
  270. align-items: center;
  271. width: 144rpx;
  272. height: 55rpx;
  273. border: 2px solid #FF4C4C;
  274. border-radius: 28rpx;
  275. font-size: 26rpx;
  276. font-family: PingFang SC;
  277. font-weight: 500;
  278. color: #FF4C4C;
  279. }
  280. }
  281. }
  282. .popup-box {
  283. width: 582rpx;
  284. background: #FFFFFF;
  285. border-radius: 7rpx;
  286. padding: 64rpx 32rpx 54rpx;
  287. .popup-title {
  288. text-align: center;
  289. font-size: 42rpx;
  290. font-family: PingFang SC;
  291. font-weight: bold;
  292. color: #2D2D2D;
  293. }
  294. .popup-main {
  295. margin-top: 42rpx;
  296. width: 100%;
  297. height: 194rpx;
  298. background: #F4F4F4;
  299. border-radius: 10rpx;
  300. padding: 20rpx;
  301. .popup-main-font {
  302. width: 100%;
  303. height: 100%;
  304. font-size: 34rpx;
  305. font-family: PingFang SC;
  306. font-weight: 500;
  307. color: #999999;
  308. }
  309. }
  310. .popup-btn-box {
  311. margin-top: 50rpx;
  312. .popup-btn-item {
  313. display: flex;
  314. justify-content: center;
  315. align-items: center;
  316. width: 248rpx;
  317. height: 78rpx;
  318. border-radius: 5rpx;
  319. font-size: 34rpx;
  320. font-family: PingFang SC;
  321. font-weight: 500;
  322. }
  323. .qx {
  324. color: #333333;
  325. background: #FFFFFF;
  326. border: 1px solid #999999;
  327. }
  328. .qd {
  329. background: #069CFA;
  330. color: #FFFFFF;
  331. }
  332. }
  333. }
  334. </style>