supp_clock_approve.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  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}}/1000个字
  49. </view>
  50. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  51. maxlength="1000" />
  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. uni.showLoading({
  138. title: "审核中"
  139. })
  140. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  141. approved: true,
  142. taskId: that.dataList.taskId,
  143. auditMind: that.auditMind,
  144. needReapply: false
  145. }).then(res => {
  146. uni.hideLoading()
  147. if (res.data.code == 200) {
  148. that.$api.msg('审核成功!')
  149. uni.navigateTo({
  150. url: "/pages/task/my_task"
  151. })
  152. } else {
  153. that.$api.msg('审核失败!')
  154. }
  155. }).catch(res => {
  156. uni.hideLoading()
  157. if (res.message) {
  158. uni.showToast({
  159. title: res.message,
  160. icon: 'none',
  161. duration: 2000
  162. })
  163. } else {
  164. uni.showToast({
  165. title: "系统异常,请联系管理员",
  166. icon: 'none',
  167. duration: 2000
  168. })
  169. }
  170. })
  171. }
  172. })
  173. }
  174. },
  175. //驳回
  176. rejectSubmit() {
  177. if (!this.auditMind) {
  178. this.$api.msg('驳回原因不能为空!')
  179. } else {
  180. this.show = false
  181. let that = this
  182. uni.showModal({
  183. content: "是否确定驳回?",
  184. showCancel: true,
  185. confirmText: '确定',
  186. success: function(res) {
  187. uni.showLoading({
  188. title: "审核中"
  189. })
  190. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  191. approved: false,
  192. taskId: that.dataList.taskId,
  193. auditMind: that.auditMind,
  194. needReapply: true
  195. }).then(res => {
  196. if (res.data.code == 200) {
  197. this.$api.msg('驳回成功!')
  198. uni.navigateTo({
  199. url: "/pages/task/my_task"
  200. })
  201. uni.hideLoading()
  202. } else {
  203. this.$api.msg('驳回失败!')
  204. }
  205. })
  206. }
  207. })
  208. }
  209. },
  210. }
  211. }
  212. </script>
  213. <style scoped lang="scss">
  214. .content1 {
  215. margin: 10rpx;
  216. padding-bottom: 224rpx;
  217. .title {
  218. height: 70rpx;
  219. line-height: 60rpx;
  220. font-size: 32rpx;
  221. font-weight: 600;
  222. color: #333333;
  223. border-bottom: 2rpx solid #EEEEEE;
  224. }
  225. }
  226. .uForm {
  227. padding: 0 40rpx;
  228. }
  229. .u-form-item {
  230. padding: 0;
  231. }
  232. .bottom-btn {
  233. width: 100%;
  234. position: fixed;
  235. bottom: 0;
  236. display: flex;
  237. z-index: 2;
  238. left: 0;
  239. background-color: #f8f8f8;
  240. flex-direction: column;
  241. .btn1,
  242. .btn2 {
  243. width: 100%;
  244. margin-bottom: 26rpx;
  245. border-radius: 90rpx;
  246. }
  247. .btn1 {
  248. background: white;
  249. color: #00C265;
  250. }
  251. }
  252. .submit {
  253. width: 50%;
  254. background: #22C572;
  255. border-radius: 10rpx;
  256. }
  257. .part2 {
  258. margin-top: 20rpx;
  259. }
  260. .textarea {
  261. border: 1px solid #ccc;
  262. border-radius: 10rpx;
  263. background-color: #F9F9FA;
  264. height: 100px;
  265. }
  266. .row {
  267. display: flex;
  268. justify-content: space-between;
  269. // border-bottom: 1px solid #EEEEEE;
  270. padding: 21rpx 0;
  271. .right,
  272. input {
  273. font-size: 28rpx;
  274. color: #333333;
  275. }
  276. }
  277. //弹出框
  278. // .popup {
  279. // padding: 30rpx;
  280. // border-radius: 20rpx;
  281. // }
  282. // .rejectInfoCss {
  283. // border: 1px solid #ccc;
  284. // border-radius: 10rpx;
  285. // background-color: #F9F9FA;
  286. // margin: 30rpx;
  287. // overflow-y: auto;
  288. // // height: 300rpx;
  289. // background: red;
  290. // }
  291. .uForm_item {
  292. padding: 20rpx;
  293. background-color: #FFFFFF;
  294. margin: 20rpx;
  295. border-radius: 20rpx;
  296. }
  297. .rejectText {
  298. text-align: center;
  299. }
  300. .topInfo {
  301. height: 210rpx;
  302. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  303. padding: 30rpx;
  304. .topInfo-item {
  305. height: 150rpx;
  306. background-color: #FFFFFF;
  307. border-radius: 20rpx;
  308. padding: 40rpx;
  309. .logo {
  310. width: 40rpx;
  311. height: 40rpx;
  312. margin-top: 8rpx;
  313. }
  314. .infoText {
  315. font-size: 36rpx;
  316. font-weight: 600;
  317. margin-left: 20rpx;
  318. }
  319. .infoData {
  320. color: #878C9C;
  321. font-size: 26rpx;
  322. margin-top: 10rpx;
  323. }
  324. }
  325. }
  326. .shade1 {
  327. position: fixed;
  328. top: 0;
  329. left: 0;
  330. height: 100%;
  331. width: 100%;
  332. background: rgba(0, 0, 0, 0.4);
  333. z-index: 3;
  334. .wrap1 {
  335. position: absolute;
  336. left: 0;
  337. top: 0;
  338. right: 0;
  339. bottom: 0;
  340. margin: auto;
  341. background: #fff;
  342. width: calc(100% - 198rpx);
  343. height: 355px;
  344. border-radius: 20rpx;
  345. .alert-top1 {
  346. padding: 33rpx;
  347. display: flex;
  348. justify-content: center;
  349. align-items: center;
  350. position: relative;
  351. }
  352. .title1 {
  353. font-size: 32rpx;
  354. font-weight: 600;
  355. color: #333333;
  356. }
  357. .close1 {
  358. position: absolute;
  359. right: 33rpx;
  360. }
  361. }
  362. .u-textarea-style1 {
  363. margin: 20rpx;
  364. background: #F9F9FA;
  365. border-radius: 10px;
  366. border: 1px solid #EEEEEE;
  367. padding: 10rpx 20rpx;
  368. height: 230px;
  369. .right-bottom1 {
  370. position: absolute;
  371. right: 20rpx;
  372. bottom: 80px;
  373. color: #AFB3BF;
  374. }
  375. }
  376. .cancel1 {
  377. position: absolute;
  378. display: inline-block;
  379. width: 50%;
  380. text-align: center;
  381. bottom: 0;
  382. padding: 10px;
  383. border-top: 1px solid #eee;
  384. font-size: 34rpx;
  385. }
  386. .confirm1 {
  387. position: absolute;
  388. display: inline-block;
  389. width: 50%;
  390. text-align: center;
  391. bottom: 0;
  392. padding: 10px;
  393. border-top: 1px solid #eee;
  394. font-size: 34rpx;
  395. }
  396. .cancel1 {
  397. left: 0;
  398. border-right: 1px solid #eee;
  399. color: #ff0000;
  400. }
  401. .confirm1 {
  402. right: 0;
  403. color: #22C572;
  404. }
  405. .bottom-btn1 {
  406. width: 100%;
  407. // position: fixed;
  408. bottom: 0;
  409. display: flex;
  410. z-index: 2;
  411. left: 0;
  412. background-color: #f8f8f8;
  413. flex-direction: column;
  414. .btn1,
  415. .btn2 {
  416. width: 100%;
  417. margin-bottom: 26rpx;
  418. border-radius: 90rpx;
  419. }
  420. .btn1 {
  421. background: white;
  422. color: #00C265;
  423. }
  424. }
  425. }
  426. /deep/.u-input__textarea {
  427. height: 300rpx !important;
  428. }
  429. </style>