浏览代码

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

修改项目安排显示错误的问题
余思翰 1 天前
父节点
当前提交
ede73ce86d

+ 1
- 1
oa-ui/src/components/FileUpload/index.vue 查看文件

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

+ 1
- 1
oa-ui/src/views/flowable/form/components/print/borrowPrint.vue 查看文件

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

+ 110
- 101
oa-ui/src/views/flowable/form/finance/borrowForm.vue 查看文件

122
               <span class="low-money">{{ siteExpenses.toFixed(2) }}</span>
122
               <span class="low-money">{{ siteExpenses.toFixed(2) }}</span>
123
               <span class="up-money">(大写:{{ formatNumberWithWan(siteExpenses) }})</span>
123
               <span class="up-money">(大写:{{ formatNumberWithWan(siteExpenses) }})</span>
124
             </el-tag>
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
           </el-form-item>
127
           </el-form-item>
127
           <el-form-item label="已申请借款" v-if="isSelect">
128
           <el-form-item label="已申请借款" v-if="isSelect">
128
             <el-tag type="danger">
129
             <el-tag type="danger">
227
                 </el-form-item>
228
                 </el-form-item>
228
               </el-col>
229
               </el-col>
229
             </el-row>
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
               <el-input type="textarea" v-model="form.dszComment" placeholder="请输入董事长批准意见"
232
               <el-input type="textarea" v-model="form.dszComment" placeholder="请输入董事长批准意见"
232
                 :disabled="taskName != '董事长批准'" :autosize="{ minRows: 4 }" />
233
                 :disabled="taskName != '董事长批准'" :autosize="{ minRows: 4 }" />
233
             </el-form-item>
234
             </el-form-item>
234
-            <el-row>
235
+            <el-row v-if="exceed && !form.cwUser">
235
               <el-col :span="6" :xs="24" :offset="12">
236
               <el-col :span="6" :xs="24" :offset="12">
236
                 <el-form-item label="签名:" label-width="120px" v-if="showFormItem('董事长批准')">
237
                 <el-form-item label="签名:" label-width="120px" v-if="showFormItem('董事长批准')">
237
                   <span class="auditor"> {{ form.dszUser ? form.dszUser.nickName : dszUser }} </span>
238
                   <span class="auditor"> {{ form.dszUser ? form.dszUser.nickName : dszUser }} </span>
728
       if (this.taskName == '借款申请') {
729
       if (this.taskName == '借款申请') {
729
         await this.VerificationAmount();
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
                     this.$set(this.taskForm.variables, "approval", res.data[0].userId);
800
                     this.$set(this.taskForm.variables, "approval", res.data[0].userId);
802
                     this.handleComplete(this.taskForm);
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
                   this.handleComplete(this.taskForm);
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
           } else {
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
     handleComplete(taskForm) {
850
     handleComplete(taskForm) {
842
       complete(taskForm).then(response => {
851
       complete(taskForm).then(response => {
985
     VerificationAmount() {
994
     VerificationAmount() {
986
       if (this.isSelect) {
995
       if (this.isSelect) {
987
         if (this.form.applyAmount > (this.siteExpenses - this.hasBorrow)) {
996
         if (this.form.applyAmount > (this.siteExpenses - this.hasBorrow)) {
988
-          return this.$confirm('借款总额已经超过项目预算,将走《超预算或预算外支付(报销)》流程', '提示', {
997
+          return this.$confirm('借款总额已经超过项目预算,将走《超预算或预算外支付(报销)》流程,即需要董事长批准,才可到财务。', '提示', {
989
             confirmButtonText: '确定',
998
             confirmButtonText: '确定',
990
             type: 'warning'
999
             type: 'warning'
991
           }).then(() => {
1000
           }).then(() => {

+ 12
- 11
oa-ui/src/views/flowable/form/projectProcess/arrangeProject.vue 查看文件

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

正在加载...
取消
保存