supp_clock_approve.vue 9.3 KB

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