supp_clock_approve.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  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 == '待人事审核'"
  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="empName" label-width="140" class="uForm_item">
  27. <u-input input-align="right" disabled v-model="dataList.empName" />
  28. </u-form-item>
  29. <u-form-item label="补卡日期" prop="suppDay" label-width="140" class="uForm_item">
  30. <u-input input-align="right" disabled v-model="dataList.suppDay" />
  31. </u-form-item>
  32. <u-form-item label="补卡原因" prop="supplementClockType" label-width="140" class="uForm_item">
  33. <u-input input-align="right" disabled v-if="dataList.supplementClockType=='1'" value="上班">上班</u-input>
  34. <u-input input-align="right" disabled v-if="dataList.supplementClockType=='3'" value="下班">下班</u-input>
  35. </u-form-item>
  36. <view class="uForm_item">
  37. <u-form-item label="申请理由" prop="reasonForApplication" label-width="160" label-position="top">
  38. <u-input v-model="dataList.reasonForApplication" input-align="left" placeholder="请输入业务描述"
  39. type="textarea" class="textarea" maxlength="150" />
  40. </u-form-item>
  41. </view>
  42. </u-form>
  43. </view>
  44. <view v-if='show' class="shade1">
  45. <view class="wrap1">
  46. <view class="alert-top1">
  47. <view class="title1">
  48. {{title}}
  49. </view>
  50. <u-icon name="close" class="close1" color="#8890B1" @click="close()"></u-icon>
  51. </view>
  52. <view class="u-textarea-style1">
  53. <view class="right-bottom1">
  54. {{auditMind.length}}/1000个字
  55. </view>
  56. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  57. maxlength="1000" />
  58. </view>
  59. <view @click='close()' class="cancel1">取消</view>
  60. <view @click='passSubmit()' class="confirm1">确定</view>
  61. </view>
  62. </view>
  63. <u-toast ref="uToast" />
  64. <view style='padding:10px;' class='flex bottom-btn'>
  65. <u-button @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
  66. <u-button @click='pass' type="success" class="btn2">通过</u-button>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. import helper from '@/common/helper.js';
  72. import {
  73. mapState
  74. } from 'vuex';
  75. export default {
  76. data() {
  77. return {
  78. everyCheck: '',
  79. height: 200,
  80. autoHeight: true,
  81. border: false,
  82. id: "",
  83. show: false,
  84. auditMind: '',
  85. reasonForApplication:'',
  86. supplementClockType:'',
  87. approveStatus:'',
  88. status:'',
  89. updateDate:'',
  90. dataList:{},
  91. }
  92. },
  93. onBackPress(e) {
  94. if (this.everyCheck) {
  95. uni.navigateTo({
  96. url: "/pages/task/my_task"
  97. })
  98. return true;
  99. }
  100. },
  101. onLoad(options) {
  102. this.id = options.id
  103. this.everyCheck = uni.getStorageSync("everyTask")
  104. this.getList()
  105. },
  106. computed: {
  107. ...mapState(['hasLogin', 'userInfo']),
  108. },
  109. methods: {
  110. getList() {
  111. this.$api.doRequest('get', '/clockInfo/getSuppClock', {
  112. id: this.id
  113. }).then(res => {
  114. if (res.data.code == 200) {
  115. this.dataList = res.data.data
  116. }
  117. })
  118. },
  119. close() {
  120. this.show = false
  121. },
  122. pass() {
  123. this.show = true
  124. this.title = '审核意见(通过)'
  125. },
  126. reject() {
  127. this.show = true
  128. this.title = '驳回原因(驳回)'
  129. },
  130. //通过
  131. passSubmit() {
  132. var that = this
  133. if (this.title == '驳回原因(驳回)') {
  134. this.rejectSubmit()
  135. } else {
  136. let that = this
  137. that.show = false
  138. uni.showModal({
  139. content: "是否确定通过?",
  140. showCancel: true,
  141. confirmText: '确定',
  142. success: function(res) {
  143. uni.showLoading({
  144. title: "审核中"
  145. })
  146. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  147. approved: true,
  148. taskId: that.dataList.taskId,
  149. auditMind: that.auditMind,
  150. needReapply: false
  151. }).then(res => {
  152. uni.hideLoading()
  153. if (res.data.code == 200) {
  154. that.$api.msg('审核成功!')
  155. uni.navigateTo({
  156. url: "/pages/task/my_task"
  157. })
  158. } else {
  159. that.$api.msg('审核失败!')
  160. }
  161. }).catch(res => {
  162. uni.hideLoading()
  163. if (res.message) {
  164. uni.showToast({
  165. title: res.message,
  166. icon: 'none',
  167. duration: 2000
  168. })
  169. } else {
  170. uni.showToast({
  171. title: "系统异常,请联系管理员",
  172. icon: 'none',
  173. duration: 2000
  174. })
  175. }
  176. })
  177. }
  178. })
  179. }
  180. },
  181. //驳回
  182. rejectSubmit() {
  183. if (!this.auditMind) {
  184. this.$api.msg('驳回原因不能为空!')
  185. } else {
  186. this.show = false
  187. let that = this
  188. uni.showModal({
  189. content: "是否确定驳回?",
  190. showCancel: true,
  191. confirmText: '确定',
  192. success: function(res) {
  193. uni.showLoading({
  194. title: "审核中"
  195. })
  196. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  197. approved: false,
  198. taskId: that.dataList.taskId,
  199. auditMind: that.auditMind,
  200. needReapply: true
  201. }).then(res => {
  202. if (res.data.code == 200) {
  203. this.$api.msg('驳回成功!')
  204. uni.navigateTo({
  205. url: "/pages/task/my_task"
  206. })
  207. uni.hideLoading()
  208. } else {
  209. this.$api.msg('驳回失败!')
  210. }
  211. })
  212. }
  213. })
  214. }
  215. },
  216. }
  217. }
  218. </script>
  219. <style scoped lang="scss">
  220. .content1 {
  221. margin: 10rpx;
  222. padding-bottom: 224rpx;
  223. .title {
  224. height: 70rpx;
  225. line-height: 60rpx;
  226. font-size: 32rpx;
  227. font-weight: 600;
  228. color: #333333;
  229. border-bottom: 2rpx solid #EEEEEE;
  230. }
  231. }
  232. .uForm {
  233. padding: 0 40rpx;
  234. }
  235. .u-form-item {
  236. padding: 0;
  237. }
  238. .bottom-btn {
  239. width: 100%;
  240. position: fixed;
  241. bottom: 0;
  242. display: flex;
  243. z-index: 2;
  244. left: 0;
  245. background-color: #f8f8f8;
  246. flex-direction: column;
  247. .btn1,
  248. .btn2 {
  249. width: 100%;
  250. margin-bottom: 26rpx;
  251. border-radius: 90rpx;
  252. }
  253. .btn1 {
  254. background: white;
  255. color: #00C265;
  256. }
  257. }
  258. .submit {
  259. width: 50%;
  260. background: #22C572;
  261. border-radius: 10rpx;
  262. }
  263. .part2 {
  264. margin-top: 20rpx;
  265. }
  266. .textarea {
  267. border: 1px solid #ccc;
  268. border-radius: 10rpx;
  269. background-color: #F9F9FA;
  270. height: 100px;
  271. }
  272. .row {
  273. display: flex;
  274. justify-content: space-between;
  275. // border-bottom: 1px solid #EEEEEE;
  276. padding: 21rpx 0;
  277. .right,
  278. input {
  279. font-size: 28rpx;
  280. color: #333333;
  281. }
  282. }
  283. //弹出框
  284. // .popup {
  285. // padding: 30rpx;
  286. // border-radius: 20rpx;
  287. // }
  288. // .rejectInfoCss {
  289. // border: 1px solid #ccc;
  290. // border-radius: 10rpx;
  291. // background-color: #F9F9FA;
  292. // margin: 30rpx;
  293. // overflow-y: auto;
  294. // // height: 300rpx;
  295. // background: red;
  296. // }
  297. .uForm_item {
  298. padding: 20rpx;
  299. background-color: #FFFFFF;
  300. margin: 20rpx;
  301. border-radius: 20rpx;
  302. }
  303. .rejectText {
  304. text-align: center;
  305. }
  306. .topInfo {
  307. height: 210rpx;
  308. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  309. padding: 30rpx;
  310. .topInfo-item {
  311. height: 150rpx;
  312. background-color: #FFFFFF;
  313. border-radius: 20rpx;
  314. padding: 40rpx;
  315. .logo {
  316. width: 40rpx;
  317. height: 40rpx;
  318. margin-top: 8rpx;
  319. }
  320. .infoText {
  321. font-size: 36rpx;
  322. font-weight: 600;
  323. margin-left: 20rpx;
  324. }
  325. .infoData {
  326. color: #878C9C;
  327. font-size: 26rpx;
  328. margin-top: 10rpx;
  329. }
  330. }
  331. }
  332. .shade1 {
  333. position: fixed;
  334. top: 0;
  335. left: 0;
  336. height: 100%;
  337. width: 100%;
  338. background: rgba(0, 0, 0, 0.4);
  339. z-index: 3;
  340. .wrap1 {
  341. position: absolute;
  342. left: 0;
  343. top: 0;
  344. right: 0;
  345. bottom: 0;
  346. margin: auto;
  347. background: #fff;
  348. width: calc(100% - 198rpx);
  349. height: 355px;
  350. border-radius: 20rpx;
  351. .alert-top1 {
  352. padding: 33rpx;
  353. display: flex;
  354. justify-content: center;
  355. align-items: center;
  356. position: relative;
  357. }
  358. .title1 {
  359. font-size: 32rpx;
  360. font-weight: 600;
  361. color: #333333;
  362. }
  363. .close1 {
  364. position: absolute;
  365. right: 33rpx;
  366. }
  367. }
  368. .u-textarea-style1 {
  369. margin: 20rpx;
  370. background: #F9F9FA;
  371. border-radius: 10px;
  372. border: 1px solid #EEEEEE;
  373. padding: 10rpx 20rpx;
  374. height: 230px;
  375. .right-bottom1 {
  376. position: absolute;
  377. right: 20rpx;
  378. bottom: 80px;
  379. color: #AFB3BF;
  380. }
  381. }
  382. .cancel1 {
  383. position: absolute;
  384. display: inline-block;
  385. width: 50%;
  386. text-align: center;
  387. bottom: 0;
  388. padding: 10px;
  389. border-top: 1px solid #eee;
  390. font-size: 34rpx;
  391. }
  392. .confirm1 {
  393. position: absolute;
  394. display: inline-block;
  395. width: 50%;
  396. text-align: center;
  397. bottom: 0;
  398. padding: 10px;
  399. border-top: 1px solid #eee;
  400. font-size: 34rpx;
  401. }
  402. .cancel1 {
  403. left: 0;
  404. border-right: 1px solid #eee;
  405. color: #ff0000;
  406. }
  407. .confirm1 {
  408. right: 0;
  409. color: #22C572;
  410. }
  411. .bottom-btn1 {
  412. width: 100%;
  413. // position: fixed;
  414. bottom: 0;
  415. display: flex;
  416. z-index: 2;
  417. left: 0;
  418. background-color: #f8f8f8;
  419. flex-direction: column;
  420. .btn1,
  421. .btn2 {
  422. width: 100%;
  423. margin-bottom: 26rpx;
  424. border-radius: 90rpx;
  425. }
  426. .btn1 {
  427. background: white;
  428. color: #00C265;
  429. }
  430. }
  431. }
  432. /deep/.u-input__textarea {
  433. height: 300rpx !important;
  434. }
  435. </style>