Parcourir la source

修改借款,若超预算走董事长批准流程;

修改项目安排显示错误的问题
余思翰 il y a 1 jour
Parent
révision
ede73ce86d

+ 1
- 1
oa-ui/src/components/FileUpload/index.vue Voir le fichier

@@ -15,7 +15,7 @@
15 15
         <template v-if="fileType">
16 16
           格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
17 17
         </template>
18
-        的文件
18
+        的文件,文件名请勿包含特殊字符(如:/、\、*、?、"、<、>、|、#)
19 19
       </div>
20 20
     </el-upload>
21 21
 

+ 1
- 1
oa-ui/src/views/flowable/form/components/print/borrowPrint.vue Voir le fichier

@@ -140,7 +140,7 @@
140 140
             </el-row>
141 141
           </td>
142 142
         </tr>
143
-        <tr v-if="form.borrowUsage == '0' && exceed">
143
+        <tr v-if="form.borrowUsage == '0' && exceed && !form.cwUser">
144 144
           <td :colspan="2" class="fontbold">董事长批准</td>
145 145
           <td :colspan="8">
146 146
             <div class="minHeight">{{ form.dszComment }}</div>

+ 110
- 101
oa-ui/src/views/flowable/form/finance/borrowForm.vue Voir le fichier

@@ -122,7 +122,8 @@
122 122
               <span class="low-money">{{ siteExpenses.toFixed(2) }}</span>
123 123
               <span class="up-money">(大写:{{ formatNumberWithWan(siteExpenses) }})</span>
124 124
             </el-tag>
125
-            <el-button type="primary" size="mini" @click="openBudget = true" v-hasPermi="['cmc:budget:list']">查看预算</el-button>
125
+            <el-button type="primary" size="mini" @click="openBudget = true"
126
+              v-hasPermi="['oa:budget:list']">查看预算</el-button>
126 127
           </el-form-item>
127 128
           <el-form-item label="已申请借款" v-if="isSelect">
128 129
             <el-tag type="danger">
@@ -227,11 +228,11 @@
227 228
                 </el-form-item>
228 229
               </el-col>
229 230
             </el-row>
230
-            <el-form-item label="董事长批准意见" prop="dszComment" label-width="150px">
231
+            <el-form-item label="董事长批准意见" prop="dszComment" label-width="150px" v-if="exceed && !form.cwUser">
231 232
               <el-input type="textarea" v-model="form.dszComment" placeholder="请输入董事长批准意见"
232 233
                 :disabled="taskName != '董事长批准'" :autosize="{ minRows: 4 }" />
233 234
             </el-form-item>
234
-            <el-row>
235
+            <el-row v-if="exceed && !form.cwUser">
235 236
               <el-col :span="6" :xs="24" :offset="12">
236 237
                 <el-form-item label="签名:" label-width="120px" v-if="showFormItem('董事长批准')">
237 238
                   <span class="auditor"> {{ form.dszUser ? form.dszUser.nickName : dszUser }} </span>
@@ -728,115 +729,123 @@ export default {
728 729
       if (this.taskName == '借款申请') {
729 730
         await this.VerificationAmount();
730 731
       }
731
-      this.$refs["form"].validate(valid => {
732
-        if (valid) {
733
-          if (this.form.borrowUsage == '0' && !this.form.projectId) {
734
-            this.$message.error('请选择项目!')
735
-            return
736
-          }
737
-          if (this.formTotal != 0) {
738
-            // 更新借款明细项
739
-            delBorrowDetail(this.taskForm.formId).then(res => {
740
-              this.detailList.forEach(detail => {
741
-                detail.borrowId = this.taskForm.formId;
742
-                addBorrowDetail(detail)
743
-              })
744
-            })
745
-            if (this.taskName == '部门审核') {
746
-              this.form.deptUserId = this.$store.getters.userId;
747
-              this.form.deptTime = parseTime(new Date(), '{y}-{m}-{d}')
748
-            }
749
-            if (this.taskName == '分管审核') {
750
-              this.form.managerUserId = this.$store.getters.userId;
751
-              this.form.managerTime = parseTime(new Date(), '{y}-{m}-{d}')
752
-            }
753
-            if (this.taskName == '总经理审核') {
754
-              this.form.zjlUserId = this.$store.getters.userId;
755
-              this.form.zjlTime = parseTime(new Date(), '{y}-{m}-{d}')
756
-            }
757
-            if (this.taskName == '董事长批准') {
758
-              this.form.dszUserId = this.$store.getters.userId;
759
-              this.form.dszTime = parseTime(new Date(), '{y}-{m}-{d}')
760
-            }
761
-            if (this.taskName == '党工团审核') {
762
-              this.form.unionUserId = this.$store.getters.userId;
763
-              this.form.unionTime = parseTime(new Date(), '{y}-{m}-{d}')
764
-            }
765
-            if (this.taskName == '财务处理') {
766
-              this.form.cwUserId = this.$store.getters.userId;
767
-              this.form.lendTime = parseTime(new Date(), '{y}-{m}-{d}')
732
+      let msg;
733
+      if(this.taskName == '财务处理'){
734
+        msg = '最后一个节点,提交将结束流程,是否提交?'
735
+      }else{
736
+        msg = '是否提交到下一个流程?'
737
+      }
738
+      this.$confirm(msg, '提示', {
739
+        confirmButtonText: '确定',
740
+        type: 'warning'
741
+      }).then(() => {
742
+        this.$refs["form"].validate(valid => {
743
+          if (valid) {
744
+            if (this.form.borrowUsage == '0' && !this.form.projectId) {
745
+              this.$message.error('请选择项目!')
746
+              return
768 747
             }
769
-            // 更新借款审批表
770
-            updateBorrow(this.form);
771
-            const params = { taskId: this.taskForm.taskId };
772
-            getNextFlowNode(params).then(res => {
773
-              if (this.taskName == '借款申请') {
774
-                this.borrowAprrovalFun();
775
-              } else if (this.taskName == '部门审核') {
776
-                getUsersManageLeaderByDept({ deptId: this.form.applyDept }).then(res => {
777
-                  let userIds = [];
778
-                  if (res.data) {
779
-                    res.data.forEach(item => {
780
-                      userIds.push(item.userId)
781
-                    })
782
-                  }
783
-                  this.$set(this.taskForm.variables, "approvalList", userIds);
784
-                  this.handleComplete(this.taskForm);
748
+            if (this.formTotal != 0) {
749
+              // 更新借款明细项
750
+              delBorrowDetail(this.taskForm.formId).then(res => {
751
+                this.detailList.forEach(detail => {
752
+                  detail.borrowId = this.taskForm.formId;
753
+                  addBorrowDetail(detail)
785 754
                 })
755
+              })
756
+              if (this.taskName == '部门审核') {
757
+                this.form.deptUserId = this.$store.getters.userId;
758
+                this.form.deptTime = parseTime(new Date(), '{y}-{m}-{d}')
786 759
               }
787
-              else if (this.taskName == '分管审核') {
788
-                getUserByPost({ postName: '总经理' }).then(res => {
789
-                  this.$set(this.taskForm.variables, "approval", res.data[0].userId);
790
-                  this.handleComplete(this.taskForm);
791
-                })
760
+              if (this.taskName == '分管审核') {
761
+                this.form.managerUserId = this.$store.getters.userId;
762
+                this.form.managerTime = parseTime(new Date(), '{y}-{m}-{d}')
792 763
               }
793
-              else if (this.taskName == '总经理审核') {
794
-                this.exceed = false; //待删
795
-                this.$set(this.taskForm.variables, "exceed", this.exceed);
796
-                if (!this.exceed) { //没有超预算
797
-                  this.submitFD(); //提交到财务部审核
764
+              if (this.taskName == '总经理审核') {
765
+                this.form.zjlUserId = this.$store.getters.userId;
766
+                this.form.zjlTime = parseTime(new Date(), '{y}-{m}-{d}')
767
+              }
768
+              if (this.taskName == '董事长批准') {
769
+                this.form.dszUserId = this.$store.getters.userId;
770
+                this.form.dszTime = parseTime(new Date(), '{y}-{m}-{d}')
771
+              }
772
+              if (this.taskName == '党工团审核') {
773
+                this.form.unionUserId = this.$store.getters.userId;
774
+                this.form.unionTime = parseTime(new Date(), '{y}-{m}-{d}')
775
+              }
776
+              if (this.taskName == '财务处理') {
777
+                this.form.cwUserId = this.$store.getters.userId;
778
+                this.form.lendTime = parseTime(new Date(), '{y}-{m}-{d}')
779
+              }
780
+              // 更新借款审批表
781
+              updateBorrow(this.form);
782
+              const params = { taskId: this.taskForm.taskId };
783
+              getNextFlowNode(params).then(res => {
784
+                if (this.taskName == '借款申请') {
785
+                  this.borrowAprrovalFun();
786
+                } else if (this.taskName == '部门审核') {
787
+                  getUsersManageLeaderByDept({ deptId: this.form.applyDept }).then(res => {
788
+                    let userIds = [];
789
+                    if (res.data) {
790
+                      res.data.forEach(item => {
791
+                        userIds.push(item.userId)
792
+                      })
793
+                    }
794
+                    this.$set(this.taskForm.variables, "approvalList", userIds);
795
+                    this.handleComplete(this.taskForm);
796
+                  })
798 797
                 }
799
-                else {
800
-                  getUserByPost({ postName: '董事长' }).then(res => {
798
+                else if (this.taskName == '分管审核') {
799
+                  getUserByPost({ postName: '总经理' }).then(res => {
801 800
                     this.$set(this.taskForm.variables, "approval", res.data[0].userId);
802 801
                     this.handleComplete(this.taskForm);
803 802
                   })
804 803
                 }
805
-              }
806
-              else if (this.taskName == '董事长批准') {
807
-                this.submitFD(); //提交到财务部审核
808
-              }
809
-              else if (this.taskName == '党工团审核') {
810
-                this.submitFD(); //提交到财务部审核
811
-              }
812
-              else if (this.taskName == '财务处理') {
813
-                this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(res => {
804
+                else if (this.taskName == '总经理审核') {
805
+                  // this.exceed = false; //待删
806
+                  this.$set(this.taskForm.variables, "exceed", this.exceed);
807
+                  if (!this.exceed) { //没有超预算
808
+                    this.submitFD(); //提交到财务部审核
809
+                  }
810
+                  else {
811
+                    getUserByPost({ postName: '董事长' }).then(res => {
812
+                      this.$set(this.taskForm.variables, "approval", res.data[0].userId);
813
+                      this.handleComplete(this.taskForm);
814
+                    })
815
+                  }
816
+                }
817
+                else if (this.taskName == '董事长批准') {
818
+                  this.submitFD(); //提交到财务部审核
819
+                }
820
+                else if (this.taskName == '党工团审核') {
821
+                  this.submitFD(); //提交到财务部审核
822
+                }
823
+                else if (this.taskName == '财务处理') {
814 824
                   this.handleComplete(this.taskForm);
815
-                })
816
-              }
817
-            })
825
+                }
826
+              })
827
+            } else {
828
+              delBorrowDetail(this.taskForm.formId).then(() => {
829
+                for (let detail of this.detailList) {
830
+                  detail.borrowId = this.taskForm.formId;
831
+                  addBorrowDetail(detail);
832
+                }
833
+              })
834
+              this.form.borrowId = this.taskForm.formId;
835
+              addBorrow(this.form).then(response => {
836
+                this.$modal.msgSuccess("新增成功");
837
+              });
838
+              const params = { taskId: this.taskForm.taskId };
839
+              // 提交到下一个流程
840
+              getNextFlowNode(params).then(res => {
841
+                this.borrowAprrovalFun();
842
+              })
843
+            }
818 844
           } else {
819
-            delBorrowDetail(this.taskForm.formId).then(() => {
820
-              for (let detail of this.detailList) {
821
-                detail.borrowId = this.taskForm.formId;
822
-                addBorrowDetail(detail);
823
-              }
824
-            })
825
-            this.form.borrowId = this.taskForm.formId;
826
-            addBorrow(this.form).then(response => {
827
-              this.$modal.msgSuccess("新增成功");
828
-            });
829
-            const params = { taskId: this.taskForm.taskId };
830
-            // 提交到下一个流程
831
-            getNextFlowNode(params).then(res => {
832
-              this.borrowAprrovalFun();
833
-            })
845
+            this.$message.error('请完善必填项')
834 846
           }
835
-        } else {
836
-          this.$message.error('请完善必填项')
837
-        }
838
-      });
839
-
847
+        });
848
+      })
840 849
     },
841 850
     handleComplete(taskForm) {
842 851
       complete(taskForm).then(response => {
@@ -985,7 +994,7 @@ export default {
985 994
     VerificationAmount() {
986 995
       if (this.isSelect) {
987 996
         if (this.form.applyAmount > (this.siteExpenses - this.hasBorrow)) {
988
-          return this.$confirm('借款总额已经超过项目预算,将走《超预算或预算外支付(报销)》流程', '提示', {
997
+          return this.$confirm('借款总额已经超过项目预算,将走《超预算或预算外支付(报销)》流程,即需要董事长批准,才可到财务。', '提示', {
989 998
             confirmButtonText: '确定',
990 999
             type: 'warning'
991 1000
           }).then(() => {

+ 12
- 11
oa-ui/src/views/flowable/form/projectProcess/arrangeProject.vue Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:54
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-10 17:30:59
5
+ * @LastEditTime: 2025-07-21 12:28:43
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -11,7 +11,7 @@
11 11
       <el-row :gutter="20">
12 12
         <el-col :span="12" :xs="24">
13 13
           <el-form-item label="项目负责人:" prop="projectLeader">
14
-            <el-select v-model="peopleForm.deptId" @change="handleChangeDept" clearable style="width:60%">
14
+            <el-select v-model="peopleForm.deptId" filterable @change="handleChangeDept" clearable style="width:60%">
15 15
               <el-option v-for="item, index in peopleForm.deptList" :key="'d' + index" :label="item.deptName"
16 16
                 :value="item.deptId" v-if="item.deptName != '四川中水成勘院测绘工程有限责任公司'">
17 17
               </el-option>
@@ -114,6 +114,7 @@ export default {
114 114
             let arr = (this.form.undertakingDept.split(',')).map(Number)
115 115
             this.$set(this.form, 'deptId', arr)
116 116
             this.getDeptLeader(arr);
117
+            this.getProjectLeaderDeptId();
117 118
           } else {
118 119
             this.$set(this.form, 'deptId', [])
119 120
           }
@@ -122,7 +123,7 @@ export default {
122 123
           this.$store.commit('SET_PROJECT', this.form)
123 124
         })
124 125
       } else {
125
-        let kcDatas = await listProject({ projectId: this.taskForm.formId, undertakingDept: 113 });
126
+        let kcDatas = await listProject({ projectId: this.taskForm.formId, undertakingDept: 113 }); //勘察设计事业部的项目
126 127
         if (kcDatas.rows.length > 0) {
127 128
           getProject(this.taskForm.formId).then(res => {
128 129
             this.form = res.data;
@@ -135,7 +136,7 @@ export default {
135 136
             this.$set(this.form, 'deptLeader', [])
136 137
             if (this.form.undertakingDept) {
137 138
               let arr = (this.form.undertakingDept.split(',')).map(Number)
138
-              this.$set(this.form, 'deptId', arr)
139
+              this.$set(this.form, 'deptId', arr);
139 140
               this.getDeptLeader(arr);
140 141
             } else {
141 142
               this.$set(this.form, 'deptId', [])
@@ -155,6 +156,7 @@ export default {
155 156
       }).then(res => {
156 157
         this.deptList = res.data
157 158
         this.peopleForm.deptList = res.data
159
+        console.log(this.peopleForm.deptList)
158 160
       })
159 161
     },
160 162
     async getDeptLeader(val) {
@@ -171,7 +173,6 @@ export default {
171 173
           })
172 174
         })
173 175
       })
174
-      this.handleChangeDept(val[0])
175 176
     },
176 177
     // 人员选择
177 178
     choosePeople() {
@@ -180,7 +181,6 @@ export default {
180 181
     // 改变部门选择
181 182
     handleChangeDept(deptId) {
182 183
       this.peopleForm.userId = '';
183
-      this.$set(this.peopleForm, 'deptId', deptId)
184 184
       listUser({ pageSize: 999999, deptId: deptId }).then(res => {
185 185
         this.peopleForm.userList = res.rows
186 186
         for (let a of res.rows) {
@@ -198,6 +198,12 @@ export default {
198 198
         this.peopleForm.allDeptUserList = uniqueArray
199 199
       })
200 200
     },
201
+    getProjectLeaderDeptId() {
202
+      let userList = this.$store.state.user.userList;
203
+      let leaderUser = userList.find(item => item.userId == this.form.projectLeader);
204
+      this.peopleForm.deptId = leaderUser.deptId;
205
+      this.handleChangeDept(leaderUser.deptId);
206
+    },
201 207
     // 确定项目负责人
202 208
     confirmPeople() {
203 209
       this.form.projectLeader = this.peopleForm.userId;
@@ -215,11 +221,6 @@ export default {
215 221
         }
216 222
       }
217 223
     },
218
-    cancelChoosePeople() {
219
-      this.peopleForm.deptId = '';
220
-      this.peopleForm.userId = '';
221
-      this.peopleVisible = false;
222
-    },
223 224
     save() {
224 225
       this.$refs['arrangeForm'].validate((vaild) => {
225 226
         if (vaild) {

Loading…
Annuler
Enregistrer