综合办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

businessReview.vue 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!--
  2. * @Author: ysh
  3. * @Date: 2024-04-08 13:56:14
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2024-04-30 11:27:44
  6. -->
  7. <template>
  8. <div class="app-container">
  9. <h2 style="text-align:center;">经营审核</h2>
  10. <el-form :model="form" :rules="rules" label-width="100px" :disabled="disabled">
  11. <el-form-item label="审核意见:" prop="jyComment">
  12. <el-input type="textarea" :rows="4" placeholder="请输入审核意见" v-model="form.jyComment">
  13. </el-input>
  14. </el-form-item>
  15. <el-form-item label="签名:">
  16. <span class="auditor">{{ form.jyApproverName }}</span>
  17. </el-form-item>
  18. <el-form-item label="审核时间:">
  19. {{ form.jyApprovalTime }}
  20. </el-form-item>
  21. <el-form-item>
  22. <p style="text-align:center;"><el-button type="primary" @click="confirm">确认审核</el-button></p>
  23. </el-form-item>
  24. </el-form>
  25. </div>
  26. </template>
  27. <script>
  28. import { mapGetters } from 'vuex';
  29. import { parseTime } from "@/utils/ruoyi";
  30. import { complete, rejectTask, returnList, returnTask, getNextFlowNode, delegate, flowTaskForm } from "@/api/flowable/todo";
  31. import { getProjectComment, addProjectComment } from "@/api/oa/project/projectComment"
  32. import { listProject, getProject, addProject, updateProject, delProject, submitProject, modifyProject } from "@/api/oa/project/project";
  33. import { getUsersManageLeaderByDept } from '@/api/system/post'
  34. export default {
  35. computed: {
  36. ...mapGetters(['name', 'userId']),
  37. },
  38. props: {
  39. disabled: {
  40. type: Boolean,
  41. require: true,
  42. },
  43. taskForm: {
  44. type: Object,
  45. required: true,
  46. },
  47. taskName: {
  48. type: String,
  49. required: true,
  50. }
  51. },
  52. data() {
  53. return {
  54. form: {
  55. jyApprover: '',
  56. jyApproverName: '',
  57. jyApprovalTime: ''
  58. },
  59. rules: {
  60. jyComment: [{ required: true, message: "请输入审核意见", trigger: "blur" }]
  61. },
  62. jyApprovalTime: "",
  63. managerList: []
  64. }
  65. },
  66. created() {
  67. if (this.$route.query.taskName != '项目登记' && this.$route.query.taskName != '项目安排') {
  68. this.initForm();
  69. }
  70. },
  71. mounted() {
  72. if (this.$route.query.taskName != '项目登记' && this.$route.query.taskName != '项目安排') {
  73. this.getDeptManageLeader()
  74. }
  75. },
  76. methods: {
  77. initForm() {
  78. getProjectComment(this.taskForm.formId).then(res => {
  79. if (res.data) {
  80. this.form = res.data
  81. if (this.form.jyUser) {
  82. this.form.jyApproverName = this.form.jyUser.nickName
  83. }
  84. } else {
  85. if (this.taskName == '经营审核') {
  86. this.form.jyApproverName = this.name;
  87. this.form.jyApprover = this.userId;
  88. this.form.jyApprovalTime = parseTime(new Date(), '{y}-{m}-{d}')
  89. } else {
  90. this.form.jyApprover = '';
  91. this.form.jyApprovalTime = '';
  92. }
  93. }
  94. })
  95. },
  96. getDeptManageLeader() {
  97. getProject(this.taskForm.formId).then(res => {
  98. let deptId = res.data.undertakingDept.split(',');
  99. this.$store.commit('SET_UNDERDEPTID', deptId);
  100. for (let d of deptId) {
  101. getUsersManageLeaderByDept({ deptId: Number(d) }).then(resopnse => {
  102. if (resopnse.data) {
  103. this.managerList.push(resopnse.data.userId)
  104. }
  105. })
  106. }
  107. })
  108. },
  109. confirm() {
  110. this.form.projectId = this.taskForm.formId
  111. addProjectComment({ projectId: this.taskForm.formId, jyComment: this.form.jyComment })
  112. const params = { taskId: this.taskForm.taskId };
  113. // 获取下一个流程节点
  114. getNextFlowNode(params).then(res => {
  115. this.managerList.push(10)
  116. this.managerList.push(7)
  117. this.managerList = Array.from(new Set(this.managerList));
  118. this.$set(this.taskForm.variables, "approvalList", this.managerList);
  119. complete(this.taskForm).then(response => {
  120. this.$modal.msgSuccess(response.msg);
  121. this.$emit("goBack");
  122. });
  123. });
  124. },
  125. },
  126. }
  127. </script>
  128. <style lang="scss" scoped>
  129. .auditor {
  130. font-family: '华文行楷';
  131. font-size: 20px;
  132. }
  133. ::v-deep .el-textarea.is-disabled .el-textarea__inner {
  134. color: #121212 !important;
  135. }
  136. </style>