leave_details.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <template>
  2. <view class="warp">
  3. <view class="topInfo">
  4. <view class="topInfo-item">
  5. <view class="flex info">
  6. <view class="logo">
  7. <image src="../../../static/img/reject.png" mode=""
  8. v-if="dataList.status == '已驳回'" style="height: 40rpx;">
  9. </image><!-- 驳回 -->
  10. <image src="../../../static/img/tongguo.png" mode=""
  11. v-else-if="dataList.status == '已通过'"
  12. style="height: 40rpx;"></image><!-- 通过 -->
  13. <image src="../../../static/img/daishenhe.png" mode=""
  14. v-else-if="dataList.approveStatus == '待人事审核' || dataList.approveStatus == '待主管审核'"
  15. style="height: 40rpx;"></image><!-- 待审核 -->
  16. </view>
  17. <view class="infoText" v-if="dataList.approveStatus">{{dataList.approveStatus}}</view>
  18. <view class="infoText" v-else>{{dataList.status}}</view>
  19. </view>
  20. <view class="infoData" v-if="dataList.updateDate">{{dataList.updateDate}}</view>
  21. </view>
  22. </view>
  23. <view class="content1">
  24. <!-- :model="OutList" -->
  25. <u-form ref="uForm">
  26. <u-form-item label="请假类型" prop="leaveType" label-width="140" class="uForm_item">
  27. <u-input v-model="dataList.leaveType" input-align="right" disabled v-if="dataList.leaveType"/>
  28. </u-form-item>
  29. <view class="uForm_item">
  30. <view class='row'>
  31. <view class="left">开始时间</view>
  32. <view class="right">{{dataList.startDate}}</view>
  33. </view>
  34. <view class='row'>
  35. <view class="left">结束时间</view>
  36. <view class="right">{{dataList.endDate}}</view>
  37. </view>
  38. <view class='row'>
  39. <view class="left">请假时长</view>
  40. <view class="right">{{dataList.leaveDuration}}</view>
  41. </view>
  42. <u-form-item label="请假事由" prop="reasonForLeave" label-width="160" label-position="top">
  43. <u-input v-model="dataList.reasonForLeave" input-align="left" placeholder="请输入请假事由"
  44. type="textarea" class="textarea" maxlength="150" />
  45. </u-form-item>
  46. </view>
  47. </u-form>
  48. </view>
  49. <view style='padding:10px;' class='flex bottom-btn'>
  50. <u-button @click='fanHui' type="success" class="btn1" hover-class='none'>返回</u-button>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import {
  56. mapState
  57. } from 'vuex';
  58. export default {
  59. data() {
  60. return {
  61. id: "",
  62. show: false,
  63. show1: false,
  64. border: false,
  65. rejectInfo: "", //驳回原因
  66. leaveType:'',
  67. reasonForLeave:'',
  68. startDate:'',
  69. endDate:'',
  70. leaveDuration:'',
  71. leaveType:'',
  72. approveStatus:'',
  73. status:'',
  74. updateDate:'',
  75. dataList:{},
  76. }
  77. },
  78. // onReady() {
  79. // this.$refs.uForm.setRules(this.rules);
  80. // },
  81. onLoad(options) {
  82. this.id = options.id
  83. this.getList()
  84. },
  85. computed: {
  86. ...mapState(['hasLogin', 'userInfo']),
  87. },
  88. methods: {
  89. getList() {
  90. this.$api.doRequest('get', '/leaveInfo/getLeaveInfo', {
  91. id: this.id
  92. }).then(res => {
  93. if (res.data.code == 200) {
  94. this.dataList = res.data.data
  95. }
  96. })
  97. },
  98. fanHui() {
  99. uni.navigateBack()
  100. }
  101. }
  102. }
  103. </script>
  104. <style scoped lang="scss">
  105. .content1 {
  106. margin: 10rpx;
  107. padding-bottom: 120rpx;
  108. .title {
  109. height: 70rpx;
  110. line-height: 60rpx;
  111. font-size: 32rpx;
  112. font-weight: 600;
  113. color: #333333;
  114. border-bottom: 2rpx solid #EEEEEE;
  115. }
  116. }
  117. .uForm {
  118. padding: 0 40rpx;
  119. }
  120. .u-form-item {
  121. padding: 0;
  122. }
  123. .bottom-btn {
  124. width: 100%;
  125. position: fixed;
  126. bottom: 0;
  127. display: flex;
  128. z-index: 2;
  129. left: 0;
  130. background-color: #f8f8f8;
  131. flex-direction: column;
  132. .btn1,
  133. .btn2 {
  134. width: 100%;
  135. margin-bottom: 26rpx;
  136. border-radius: 90rpx;
  137. }
  138. .btn1 {
  139. background: white;
  140. color: #00C265;
  141. }
  142. }
  143. .submit {
  144. width: 50%;
  145. background: #22C572;
  146. border-radius: 10rpx;
  147. }
  148. .part2 {
  149. margin-top: 20rpx;
  150. }
  151. .textarea {
  152. border: 1px solid #ccc;
  153. border-radius: 10rpx;
  154. background-color: #F9F9FA;
  155. height: 100px;
  156. }
  157. .row {
  158. display: flex;
  159. justify-content: space-between;
  160. // border-bottom: 1px solid #EEEEEE;
  161. padding: 21rpx 0;
  162. .right,
  163. input {
  164. font-size: 28rpx;
  165. color: #333333;
  166. }
  167. }
  168. //弹出框
  169. // .popup {
  170. // padding: 30rpx;
  171. // border-radius: 20rpx;
  172. // }
  173. .rejectInfoCss {
  174. border: 1px solid #ccc;
  175. border-radius: 10rpx;
  176. background-color: #F9F9FA;
  177. height: 100px;
  178. margin: 30rpx;
  179. }
  180. .uForm_item {
  181. padding: 20rpx;
  182. background-color: #FFFFFF;
  183. margin: 20rpx;
  184. border-radius: 20rpx;
  185. }
  186. .rejectText {
  187. text-align: center;
  188. }
  189. .topInfo {
  190. height: 210rpx;
  191. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  192. padding: 30rpx;
  193. .topInfo-item {
  194. height: 150rpx;
  195. background-color: #FFFFFF;
  196. border-radius: 20rpx;
  197. padding: 40rpx;
  198. .logo {
  199. width: 40rpx;
  200. height: 40rpx;
  201. margin-top: 8rpx;
  202. }
  203. .infoText {
  204. font-size: 36rpx;
  205. font-weight: 600;
  206. margin-left: 20rpx;
  207. }
  208. .infoData {
  209. color: #878C9C;
  210. font-size: 26rpx;
  211. margin-top: 10rpx;
  212. }
  213. }
  214. }
  215. .deleteText {
  216. text-align: center;
  217. color: #AFB3BF;
  218. }
  219. </style>