Browse Source

修改网页端借款中存在的小问题;

修改移动端借款审批表单
余思翰 2 months ago
parent
commit
3590bfb497

+ 3
- 3
oa-ui-app/main.js View File

1
 /*
1
 /*
2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-01-16 11:17:07
3
  * @Date: 2025-01-16 11:17:07
4
- * @LastEditors: 
5
- * @LastEditTime: 2025-03-03 14:24:08
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2025-03-18 17:11:37
6
  */
6
  */
7
 import Vue from 'vue'
7
 import Vue from 'vue'
8
 import App from './App'
8
 import App from './App'
19
 // 创建全局的 publicData 对象
19
 // 创建全局的 publicData 对象
20
 Vue.prototype.publicData = {
20
 Vue.prototype.publicData = {
21
   partySecretary: 4, // 党委书记
21
   partySecretary: 4, // 党委书记
22
-  leagueSecretary: 142, // 团委书记
22
+  leagueSecretary: 15, // 团委书记
23
   gm: 7, //总经理
23
   gm: 7, //总经理
24
   chairman: 2,//董事长
24
   chairman: 2,//董事长
25
   zg: 9,
25
   zg: 9,

+ 1
- 1
oa-ui-app/manifest.json View File

60
             "port" : 9090,
60
             "port" : 9090,
61
             "https" : false
61
             "https" : false
62
         },
62
         },
63
-        "title" : "RuoYi-App",
63
+        "title" : "CMC-App",
64
         "router" : {
64
         "router" : {
65
             "mode" : "hash",
65
             "mode" : "hash",
66
             "base" : "./"
66
             "base" : "./"

+ 100
- 0
oa-ui-app/pages/components/fileUpload.vue View File

1
+<template>
2
+  <view>
3
+    <uv-button @click="chooseFile" text="+ 选择文件" type="primary" v-if="showBtn"></uv-button>
4
+    <view v-if="fileName" class="file-box">
5
+      <view class="link">
6
+        <uv-link :href="`${fileUrl + fileName}`" :text="docName" color="#19be6b" line-color="#19be6b"></uv-link>
7
+      </view>
8
+      <view class="delete" v-if="showBtn">
9
+        <uv-icon name="trash" color="#f56c6c" size="18px" @click="deleteFile()"></uv-icon>
10
+      </view>
11
+    </view>
12
+    <text v-if="showBtn">只能上传1个文件,重复上传将覆盖原文件</text>
13
+  </view>
14
+</template>
15
+<script>
16
+import config from '@/config';
17
+import { getToken } from '@/utils/auth'
18
+import { getFileName } from '@/utils/common';
19
+import upload from '@/utils/upload'
20
+export default {
21
+  props: {
22
+    fileType: String,
23
+    fileName: String,
24
+    showBtn: Boolean
25
+  },
26
+  data() {
27
+    return {
28
+      value: [],
29
+      tempFilePath: '',
30
+      fileUrl: config.baseUrl + '/profile/upload',
31
+      docName: ''
32
+    }
33
+  },
34
+  watch: {
35
+    fileName(newval) {
36
+      this.docName = getFileName(newval);
37
+    }
38
+  },
39
+  created() {
40
+  },
41
+  methods: {
42
+    chooseFile() {
43
+      uni.chooseFile({
44
+        count: 1,
45
+        type: 'all',
46
+        success: (res) => {
47
+          this.tempFilePath = res.tempFiles[0].path;
48
+          let params = {
49
+            url: '/common/upload',
50
+            filePath: this.tempFilePath,
51
+            name: 'file',
52
+            formData: { // 附加表单数据
53
+              fileType: this.fileType
54
+            },
55
+          }
56
+          //上传文件
57
+          upload(params).then(res => {
58
+            if (res.code == 200) {
59
+              let fileName = '/' + this.fileType + '/' + res.newFileName
60
+              this.$modal.msgSuccess(res.msg);
61
+              this.$emit('success', fileName)
62
+            }
63
+          })
64
+        },
65
+        fail: (err) => {
66
+          console.error('选择文件失败:', err);
67
+        }
68
+      });
69
+    },
70
+    deleteFile() {
71
+      uni.showModal({
72
+        title: '提示',
73
+        content: '是否删除文件?',
74
+        success: (res) => {
75
+          if (!res.confirm) {
76
+            return;
77
+          }
78
+          // 继续执行后续代码
79
+          this.$emit('deleteFile')
80
+        }
81
+      });
82
+    }
83
+  },
84
+}
85
+</script>
86
+
87
+<style lang="scss" scoped>
88
+.file-box {
89
+  display: flex;
90
+  height: 60px;
91
+  align-items: center;
92
+  border: 1px solid #ececec;
93
+  padding: 10px;
94
+
95
+  .link {
96
+    flex: 1;
97
+
98
+  }
99
+}
100
+</style>

+ 75
- 0
oa-ui-app/pages/components/flowNote.vue View File

1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2025-03-17 10:04:51
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2025-03-18 10:45:52
6
+-->
7
+<template>
8
+  <view>
9
+    <uv-steps :current="currentNum">
10
+      <uv-steps-item :error="item.comment && item.comment.type == '退回意见'" v-for="item, index in flowRecordList"
11
+        :key="'f' + index" :title="item.taskName" :desc="item.finishTime"></uv-steps-item>
12
+    </uv-steps>
13
+    <view class="custom-block danger" v-if="isRetrun">
14
+      <uni-title type="h3" title="任务被退回,请修改后重新提交" color="#900"></uni-title>
15
+      <view>
16
+        <p>退回意见:{{ reBackDescription }}</p>
17
+        <p>办理人:{{ assigneeName }}</p>
18
+      </view>
19
+    </view>
20
+    <uv-divider></uv-divider>
21
+  </view>
22
+</template>
23
+
24
+<script>
25
+import { flowRecord, flowRecordFull } from "@/api/flowable/finished";
26
+export default {
27
+  props: {
28
+    taskForm: Object,
29
+  },
30
+  data() {
31
+    return {
32
+      flowRecordList: [],
33
+      currentNum: 0,
34
+      isRetrun: false,
35
+      reBackDescription: '',
36
+      assigneeName: ''
37
+    }
38
+  },
39
+  created() {
40
+    this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
41
+  },
42
+  methods: {
43
+    /** 流程流转记录 */
44
+    getFlowRecordList(procInsId, deployId) {
45
+      const params = { procInsId: procInsId, deployId: deployId }
46
+      flowRecordFull(params).then(res => {
47
+        if (res.data.flowList.length > 1 && res.data.flowList[1].comment && res.data.flowList[1].comment.type == '退回意见') {
48
+          this.reBackDescription = res.data.flowList[1].comment.comment
49
+          this.assigneeName = res.data.flowList[1].assigneeName
50
+          this.isRetrun = true
51
+        } else {
52
+          this.isRetrun = false
53
+        }
54
+        this.flowRecordList = res.data.flowList.reverse();
55
+        this.currentNum = this.flowRecordList.length - 1;
56
+      })
57
+    },
58
+  },
59
+}
60
+</script>
61
+
62
+<style lang="scss" scoped>
63
+.custom-block {
64
+  padding: 10px;
65
+  border-left-width: 2px;
66
+  border-left-style: solid;
67
+  margin: 5px 0;
68
+}
69
+
70
+.danger {
71
+  background-color: #ffe6e6;
72
+  border-color: #c00;
73
+  color: #4d0000;
74
+}
75
+</style>

+ 130
- 0
oa-ui-app/pages/components/returnPopup.vue View File

1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2025-03-17 15:04:06
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2025-03-17 15:43:28
6
+-->
7
+<template>
8
+  <view class="add-popup">
9
+    <view class="popup-content">
10
+      <text class="popup-title">退回菜单</text>
11
+      <uni-forms ref="form" :modelValue="taskForm" :rules="rules" label-position="top" label-width="150">
12
+        <uni-forms-item label="退回节点" name="targetKey" required class="form-item">
13
+          <uv-radio-group v-model="taskForm.targetKey" placement="column">
14
+            <uv-radio :name="item.id" :label="item.name" v-for="(item, index) in returnTaskList" :customStyle="{margin: '8px'}" 
15
+              :key="'r' + index"></uv-radio>
16
+          </uv-radio-group>
17
+        </uni-forms-item>
18
+        <uni-forms-item label="退回意见" name="comment" required class="form-item">
19
+          <uv-textarea v-model="taskForm.comment" placeholder="请输入退回意见"></uv-textarea>
20
+        </uni-forms-item>
21
+        <view class="popup-buttons">
22
+          <u-button style="margin-right: 10px;" @click="cancel">取消</u-button>
23
+          <u-button type="primary" class="confirm" @click="taskReturn">确认</u-button>
24
+        </view>
25
+      </uni-forms>
26
+
27
+    </view>
28
+  </view>
29
+</template>
30
+
31
+<script>
32
+import { complete, rejectTask, returnList, returnTask, getNextFlowNode, delegate, flowTaskForm, } from "@/api/flowable/todo";
33
+export default {
34
+  props: {
35
+    taskForm: Object,
36
+    comment: String,
37
+  },
38
+  data() {
39
+    return {
40
+      rules: {
41
+        targetKey: {
42
+          rules: [{
43
+            required: true,
44
+            errorMessage: '请选择退回节点',
45
+          },]
46
+        },
47
+        comment: {
48
+          rules: [{
49
+            required: true,
50
+            errorMessage: '请填写退回意见',
51
+          },]
52
+        },
53
+      },
54
+      returnTaskList: [],
55
+    }
56
+  },
57
+  created() {
58
+    this.handleReturn();
59
+  },
60
+  mounted() {
61
+    if (this.comment != '') {
62
+      this.taskForm.comment = this.comment
63
+    }
64
+  },
65
+  watch: {
66
+    comment(newval) {
67
+      this.taskForm.comment = newval
68
+    }
69
+  },
70
+  methods: {
71
+    /** 可退回任务列表 */
72
+    handleReturn() {
73
+      returnList(this.taskForm).then(res => {
74
+        this.returnTaskList = res.data.reverse();
75
+        this.taskForm.variables = null;
76
+      })
77
+    },
78
+    /** 提交退回任务 */
79
+    taskReturn() {
80
+      this.$refs.form.validate().then(resopnse => {
81
+        returnTask(this.taskForm).then(res => {
82
+          this.$modal.msgSuccess(res.msg);
83
+          this.$emit('goBack')
84
+        });
85
+      }).catch(err => {
86
+        console.log('表单错误信息:', err);
87
+      })
88
+    },
89
+    cancel() {
90
+      this.$emit('cancel')
91
+    },
92
+    confirm() {
93
+
94
+    }
95
+  },
96
+}
97
+</script>
98
+
99
+<style lang="scss" scoped>
100
+.add-popup {
101
+  position: fixed;
102
+  top: 0;
103
+  left: 0;
104
+  right: 0;
105
+  bottom: 0;
106
+  background-color: rgba(0, 0, 0, 0.5);
107
+  display: flex;
108
+  justify-content: center;
109
+  align-items: center;
110
+  z-index: 999;
111
+
112
+  .popup-title {
113
+    font-size: 36rpx;
114
+    font-weight: bold;
115
+    display: block;
116
+    margin-bottom: 40rpx;
117
+  }
118
+
119
+  .popup-content {
120
+    background-color: white;
121
+    width: 600rpx;
122
+    padding: 40rpx;
123
+    border-radius: 20rpx;
124
+  }
125
+
126
+  .popup-buttons {
127
+    display: flex;
128
+  }
129
+}
130
+</style>

+ 168
- 41
oa-ui-app/pages/form/borrow/borrow.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-02-20 10:20:22
3
  * @Date: 2025-02-20 10:20:22
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-03 17:23:02
6
--->
7
-<!--
8
- * @Author: ysh
9
- * @Date: 2025-02-20 10:20:22
10
- * @LastEditors: Please set LastEditors
11
- * @LastEditTime: 2025-03-03 17:19:59
5
+ * @LastEditTime: 2025-03-18 17:13:59
12
 -->
6
 -->
13
 <template>
7
 <template>
14
   <view class="form-container">
8
   <view class="form-container">
19
     </view>
13
     </view>
20
     <!-- 表单内容 -->
14
     <!-- 表单内容 -->
21
     <uni-forms ref="form" :modelValue="form" :rules="rules" label-position="top" label-width="150" class="custom-form">
15
     <uni-forms ref="form" :modelValue="form" :rules="rules" label-position="top" label-width="150" class="custom-form">
16
+      <flow-note :taskForm="taskForm"></flow-note>
22
       <!-- 当前节点 -->
17
       <!-- 当前节点 -->
23
       <uni-forms-item label="当前节点" class="form-item">
18
       <uni-forms-item label="当前节点" class="form-item">
24
         <uni-tag :inverted="true" type="primary" :text="taskName"></uni-tag>
19
         <uni-tag :inverted="true" type="primary" :text="taskName"></uni-tag>
26
 
21
 
27
       <!-- 流程发起人 -->
22
       <!-- 流程发起人 -->
28
       <uni-forms-item label="填报人" class="form-item">
23
       <uni-forms-item label="填报人" class="form-item">
29
-        <uni-tag :inverted="true" type="primary" :text="startUserName"></uni-tag>
24
+        <b style="font-size:35rpx;">{{ startUserName }}</b>
30
       </uni-forms-item>
25
       </uni-forms-item>
31
 
26
 
32
       <!-- 填报日期 -->
27
       <!-- 填报日期 -->
54
 
49
 
55
       <!-- 借款明细 -->
50
       <!-- 借款明细 -->
56
       <uni-forms-item label="借款明细" required class="form-item">
51
       <uni-forms-item label="借款明细" required class="form-item">
57
-        <BorrowDetail :borrowId="form.borrowId" :taskName="taskName" @getApplyAmount="setApplyAmount"></BorrowDetail>
52
+        <BorrowDetail :borrowId="form.borrowId" :taskName="taskName" @getApplyAmount="setApplyAmount"
53
+          @getManagerAmount="setManagerAmount"></BorrowDetail>
58
       </uni-forms-item>
54
       </uni-forms-item>
59
 
55
 
56
+      <!-- 最大借款金额限制 -->
57
+      <uni-forms-item label="最大借款金额" class="form-item" v-if="form.borrowUsage == '0'">
58
+        <view class="amount-text">¥ {{ totalBudget.toFixed(2) }}</view>
59
+      </uni-forms-item>
60
+      <uni-forms-item label="已申请借款" class="form-item" v-if="form.borrowUsage == '0'">
61
+        <view class="amount-text">¥ {{ hasBorrow.toFixed(2) }}</view>
62
+      </uni-forms-item>
63
+      <uni-forms-item label="可用借款" class="form-item" v-if="form.borrowUsage == '0'">
64
+        <view class="amount-text">¥ {{ (totalBudget - hasBorrow).toFixed(2) }}</view>
65
+      </uni-forms-item>
60
       <uni-forms-item label="申请金额" required class="form-item">
66
       <uni-forms-item label="申请金额" required class="form-item">
61
-        <view class="amount-text">¥ {{ (this.form.applyAmount).toFixed(2) }}</view>
67
+        <view class="amount-text">¥ {{ (this.form.applyAmount ? this.form.applyAmount : 0).toFixed(2) }}</view>
62
         <view class="warning-text" v-if="exceed && form.borrowUsage == '0'">
68
         <view class="warning-text" v-if="exceed && form.borrowUsage == '0'">
63
           超过预算金额:¥ {{ getMoreAmount('0') }}
69
           超过预算金额:¥ {{ getMoreAmount('0') }}
64
         </view>
70
         </view>
65
       </uni-forms-item>
71
       </uni-forms-item>
66
-
67
-      <uni-forms-item label="最大借款金额" class="form-item">
68
-        <view class="amount-text">¥ {{ totalBudget.toFixed(2) }}</view>
72
+      <uni-forms-item label="校准金额" required class="form-item" v-if="taskName != '借款申请' && taskName != '部门审核'">
73
+        <view class="amount-text">¥ {{ (this.form.managerAmount ? this.form.managerAmount : 0).toFixed(2) }}</view>
74
+        <view class="warning-text" v-if="exceed && form.borrowUsage == '0'">
75
+          超过预算金额:¥ {{ getMoreAmount('1') }}
76
+        </view>
69
       </uni-forms-item>
77
       </uni-forms-item>
70
 
78
 
71
-      <uni-forms-item label="已申请借款" class="form-item">
72
-        <view class="amount-text">¥ {{ hasBorrow.toFixed(2) }}</view>
79
+      <!-- 申请人说明 -->
80
+      <uni-forms-item label="申请人说明" required class="form-item" name="remark">
81
+        <uv-textarea v-model="form.remark" placeholder="请输入申请人说明" :disabled="taskName != '借款申请'"></uv-textarea>
73
       </uni-forms-item>
82
       </uni-forms-item>
74
 
83
 
75
-      <uni-forms-item label="可用借款" class="form-item">
76
-        <view class="amount-text">¥ {{ (totalBudget - hasBorrow).toFixed(2) }}</view>
84
+      <!-- 附件上传 -->
85
+      <uni-forms-item label="附件上传" class="form-item" name="borrowDocument">
86
+        <file-upload :fileType="'借款/申请附件'" :showBtn="taskName == '借款申请'" :fileName="form.borrowDocument"
87
+          @deleteFile="form.borrowDocument = ''" @success="uploadSuccess"></file-upload>
77
       </uni-forms-item>
88
       </uni-forms-item>
78
-      <uni-forms-item label="申请人说明" required class="form-item">
79
-        <uv-textarea v-model="form.remark" placeholder="请输入申请人说明" :disabled="taskName != '借款申请'"></uv-textarea>
89
+
90
+      <!-- 部门审核 -->
91
+      <uni-forms-item label="部门负责人意见" required class="form-item" v-if="taskName != '借款申请'" name="deptComment">
92
+        <uv-textarea v-model="form.deptComment" placeholder="请输入部门负责人意见" :disabled="taskName != '部门审核'"></uv-textarea>
80
       </uni-forms-item>
93
       </uni-forms-item>
81
 
94
 
95
+      <!-- 分管审核 -->
96
+      <uni-forms-item label="分管领导审核意见" required class="form-item" v-if="taskName != '借款申请'" name="managerComment">
97
+        <uv-textarea v-model="form.managerComment" placeholder="请输入分管领导审核意见"
98
+          :disabled="taskName != '分管审核'"></uv-textarea>
99
+      </uni-forms-item>
82
 
100
 
83
-      <uni-forms-item label="部门负责人意见" required class="form-item" v-if="taskName != '借款申请'">
84
-        <uv-textarea v-model="form.deptComment" placeholder="请输入部门负责人意见"></uv-textarea>
101
+      <!-- 总经理审核 -->
102
+      <uni-forms-item label="总经理审核意见" required class="form-item" v-if="taskName != '借款申请'" name="zjlComment">
103
+        <uv-textarea v-model="form.zjlComment" placeholder="请输入总经理审核意见" :disabled="taskName != '总经理审核'"></uv-textarea>
85
       </uni-forms-item>
104
       </uni-forms-item>
86
 
105
 
87
-      <view class="form-button">
88
-        <u-button type="warning" size="normal" @click="saves" style="margin-right: 10px"
89
-          v-if="taskName == '借款申请'">保存</u-button>
106
+      <!-- 非党工团审核 -->
107
+
108
+
109
+      <!-- 操作栏 -->
110
+      <view class="form-button" v-if="taskName">
111
+        <u-button type="warning" size="normal" @click="saves" style="margin-right: 10px" v-if="taskName">保存</u-button>
112
+        <u-button type="error" size="normal" style="margin-right: 10px" @click="$refs.returnPopup.open()"
113
+          v-if="taskName != '借款申请'">退回</u-button>
90
         <u-button type="primary" size="normal" @click="submit">{{ taskName == '借款申请' ? '提交申请' : '提交审核' }}</u-button>
114
         <u-button type="primary" size="normal" @click="submit">{{ taskName == '借款申请' ? '提交申请' : '提交审核' }}</u-button>
91
       </view>
115
       </view>
92
     </uni-forms>
116
     </uni-forms>
93
 
117
 
118
+    <!-- 退回弹窗 -->
119
+    <uni-popup ref="returnPopup" background-color="#fff">
120
+      <return-popup @cancel="$refs.returnPopup.close()" :taskForm="taskForm" :comment="commentByRole()"
121
+        @goBack="goHome"></return-popup>
122
+    </uni-popup>
123
+
94
   </view>
124
   </view>
95
 </template>
125
 </template>
96
 
126
 
97
 <script>
127
 <script>
98
-import ProjectPicker from '@/pages/components/ProjectPicker.vue';
99
-import ProjectInfo from '@/pages/components/ProjectInfo.vue';
100
 import { parseTime } from "@/utils/common.js"
128
 import { parseTime } from "@/utils/common.js"
101
-import { listBorrow, getBorrow, delBorrow, addBorrow, updateBorrow } from "@/api/oa/borrow/borrow";
102
-import { listProject, getProject } from "@/api/oa/project/project";
103
 import { listBudget } from "@/api/oa/budget/budget";
129
 import { listBudget } from "@/api/oa/budget/budget";
104
-import { getUserByPost, getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersViceDeptLeaderByDept, getUsersManageLeaderByDept } from '@/api/system/post.js'
130
+import ProjectInfo from '@/pages/components/ProjectInfo.vue';
105
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
131
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
106
-import config from '@/config'
132
+import ProjectPicker from '@/pages/components/ProjectPicker.vue';
133
+import { listProject, getProject } from "@/api/oa/project/project";
134
+import { listBorrow, getBorrow, delBorrow, addBorrow, updateBorrow } from "@/api/oa/borrow/borrow";
135
+import { getUserByPost, getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersViceDeptLeaderByDept, getUsersManageLeaderByDept } from '@/api/system/post.js'
107
 import BorrowDetail from './borrowDetail.vue';
136
 import BorrowDetail from './borrowDetail.vue';
137
+import FlowNote from '@/pages/components/flowNote.vue';
138
+import ReturnPopup from '@/pages/components/returnPopup.vue';
139
+import FileUpload from '@/pages/components/fileUpload.vue';
108
 export default {
140
 export default {
109
   components: {
141
   components: {
110
     ProjectPicker,
142
     ProjectPicker,
111
     ProjectInfo,
143
     ProjectInfo,
112
-    BorrowDetail
144
+    BorrowDetail,
145
+    FlowNote,
146
+    ReturnPopup,
147
+    FileUpload,
113
   },
148
   },
114
   props: {
149
   props: {
115
     taskForm: Object,
150
     taskForm: Object,
120
     this.form.borrowId = this.taskForm.formId;
155
     this.form.borrowId = this.taskForm.formId;
121
     this.deptId = this.$store.getters.deptId;
156
     this.deptId = this.$store.getters.deptId;
122
     this.initForm();
157
     this.initForm();
158
+    this.initRules();
123
     uni.setNavigationBarTitle({
159
     uni.setNavigationBarTitle({
124
       title: '借款审批'
160
       title: '借款审批'
125
     });
161
     });
126
   },
162
   },
163
+  watch: {
164
+    form: {
165
+      handler(newVal) {
166
+        this.initRules();
167
+      },
168
+      deep: true // 启用深度监测
169
+    }
170
+  },
127
   data() {
171
   data() {
128
     return {
172
     return {
129
       form: {
173
       form: {
130
         submitTime: '',
174
         submitTime: '',
131
         borrowUsage: '0',
175
         borrowUsage: '0',
132
         applyAmount: 0,
176
         applyAmount: 0,
177
+        managerAmount: 0,
133
         remark: '',
178
         remark: '',
179
+        applyDate: ''
134
       },
180
       },
135
       rules: {},
181
       rules: {},
136
       borrowUsageOptions: [{
182
       borrowUsageOptions: [{
163
       exceed: false, //是否超预算
209
       exceed: false, //是否超预算
164
       hasBorrow: 0, //已申请借款
210
       hasBorrow: 0, //已申请借款
165
       deptId: undefined,
211
       deptId: undefined,
212
+      returnBack: false,
166
     }
213
     }
167
   },
214
   },
168
   methods: {
215
   methods: {
216
+    initRules() {
217
+      this.rules = {
218
+        // 借款类型验证(必填)
219
+        borrowUsage: {
220
+          rules: [{
221
+            required: true,
222
+            errorMessage: '请选择借款类型'
223
+          }]
224
+        },
225
+        // 借款事由验证(当 borrowUsage != 0 时必填)
226
+        applyReason: {
227
+          rules: [{
228
+            required: this.form.borrowUsage != '0', // 动态控制必填
229
+            errorMessage: '请输入借款事由'
230
+          }]
231
+        },
232
+        // 项目选择验证(当 borrowUsage == 0 时必填)
233
+        projectId: {
234
+          rules: [{
235
+            required: this.form.borrowUsage == '0', // 动态控制必填
236
+            errorMessage: '请选择项目'
237
+          }]
238
+        },
239
+        // 申请人说明验证(必填)
240
+        remark: {
241
+          rules: [{
242
+            required: true,
243
+            errorMessage: '请输入申请人说明'
244
+          }]
245
+        },
246
+        // 部门意见验证(仅在部门审核步骤必填)
247
+        deptComment: {
248
+          rules: [{
249
+            required: this.taskName === '部门审核',
250
+            errorMessage: '请输入部门意见'
251
+          }]
252
+        },
253
+        // 分管意见验证(仅在分管审核步骤必填)
254
+        managerComment: {
255
+          rules: [{
256
+            required: this.taskName === '分管审核',
257
+            errorMessage: '请输入分管意见'
258
+          }]
259
+        },
260
+        // 总经理意见验证(仅在总经理审核步骤必填)
261
+        zjlComment: {
262
+          rules: [{
263
+            required: this.taskName === '总经理审核',
264
+            errorMessage: '请输入总经理意见'
265
+          }]
266
+        }
267
+      }
268
+    },
169
     async initForm() {
269
     async initForm() {
170
       getBorrow(this.taskForm.formId).then(async res => {
270
       getBorrow(this.taskForm.formId).then(async res => {
171
         if (res.data) {
271
         if (res.data) {
172
           this.formTotal = 1;
272
           this.formTotal = 1;
173
           this.form = res.data;
273
           this.form = res.data;
174
-          console.log(this.form);
175
           if (this.form.projectId) {
274
           if (this.form.projectId) {
176
             getProject(this.form.projectId).then(res => {
275
             getProject(this.form.projectId).then(res => {
177
               if (res.data) {
276
               if (res.data) {
232
     setApplyAmount(val) {
331
     setApplyAmount(val) {
233
       this.form.applyAmount = val
332
       this.form.applyAmount = val
234
     },
333
     },
334
+    setManagerAmount(val) {
335
+      this.form.managerAmount = val
336
+    },
235
     handleConfirm(project) {
337
     handleConfirm(project) {
236
-      console.log('选中的项目:', project);
237
       this.selectedProject = project;
338
       this.selectedProject = project;
238
       this.projectObj = project;
339
       this.projectObj = project;
239
       this.form.projectId = project.projectId;
340
       this.form.projectId = project.projectId;
267
     // 处理提交逻辑
368
     // 处理提交逻辑
268
     handleSubmit() {
369
     handleSubmit() {
269
       this.$refs.form.validate().then(async res => {
370
       this.$refs.form.validate().then(async res => {
270
-        if (this.form.borrowUsage == '0' && !this.form.projectId) {
271
-          this.$modal.msgError('请选择项目!')
272
-          return
273
-        }
274
         if (this.formTotal != 0) {
371
         if (this.formTotal != 0) {
275
           // 定义审核节点配置
372
           // 定义审核节点配置
276
           const auditConfig = {
373
           const auditConfig = {
313
           // 更新借款申请
410
           // 更新借款申请
314
           await updateBorrow(this.form);
411
           await updateBorrow(this.form);
315
           const params = { taskId: this.taskForm.taskId };
412
           const params = { taskId: this.taskForm.taskId };
316
-          console.log('params', params);
317
           getNextFlowNode(params).then(async res => {
413
           getNextFlowNode(params).then(async res => {
318
             // 处理不同的流程节点
414
             // 处理不同的流程节点
319
             if (this.taskName == '借款申请') {
415
             if (this.taskName == '借款申请') {
369
     handleComplete(taskForm) {
465
     handleComplete(taskForm) {
370
       complete(taskForm).then(response => {
466
       complete(taskForm).then(response => {
371
         this.$modal.msgSuccess(response.msg);
467
         this.$modal.msgSuccess(response.msg);
372
-        this.$emit('goBack');
468
+        this.goHome();
373
       })
469
       })
374
     },
470
     },
375
     // 借款申请提交方法
471
     // 借款申请提交方法
376
     async borrowApprovalFun() {
472
     async borrowApprovalFun() {
377
       let userId;
473
       let userId;
474
+      console.log(this.deptId);
475
+
378
       // 如果是党工团申请 deptId == 0 为党工团申请
476
       // 如果是党工团申请 deptId == 0 为党工团申请
379
       if (this.deptId === 0) {
477
       if (this.deptId === 0) {
380
         // 2为工会、3为党委
478
         // 2为工会、3为党委
381
         if (this.form.borrowUsage == 2 || this.form.borrowUsage == 3) {
479
         if (this.form.borrowUsage == 2 || this.form.borrowUsage == 3) {
382
-          userId = this.publicData.partySecretary;
480
+          const res = await getUserByPost({ postName: '党总支书记' });
481
+          userId = res.data[0].userId;
383
         } else {
482
         } else {
384
-          userId = this.publicData.leagueSecretary;
483
+          const res = await getUserByPost({ postName: '团委书记' });
484
+          userId = res.data[0].userId;
385
         }
485
         }
386
         this.taskForm.variables.dept = this.deptId;
486
         this.taskForm.variables.dept = this.deptId;
387
         this.taskForm.variables.approval = userId;
487
         this.taskForm.variables.approval = userId;
397
         const res = await getUserByPost({ postName: '董事长' });
497
         const res = await getUserByPost({ postName: '董事长' });
398
         this.taskForm.variables.dept = this.deptId;
498
         this.taskForm.variables.dept = this.deptId;
399
         this.taskForm.variables.approval = res.data[0].userId;
499
         this.taskForm.variables.approval = res.data[0].userId;
500
+        this.taskForm.variables.exceed = true;
400
         this.handleComplete(this.taskForm);
501
         this.handleComplete(this.taskForm);
401
       } else { //普通员工申请项目借款
502
       } else { //普通员工申请项目借款
402
         const res = await getUsersDeptLeader({ userId: this.$store.getters.userId });
503
         const res = await getUsersDeptLeader({ userId: this.$store.getters.userId });
416
       this.taskForm.variables.approvalList = approvalList;
517
       this.taskForm.variables.approvalList = approvalList;
417
       this.handleComplete(this.taskForm);
518
       this.handleComplete(this.taskForm);
418
     },
519
     },
520
+    commentByRole() {
521
+      if (this.taskName == '部门审核') {
522
+        return this.form.deptComment
523
+      } else if (this.taskName == '分管审核') {
524
+        return this.form.managerComment
525
+      } else if (this.taskName == '总经理审核') {
526
+        return this.form.zjlComment
527
+      } else if (this.taskName == '董事长批准') {
528
+        return this.form.dszComment
529
+      } else if (this.taskName == '党工团审核') {
530
+        return this.form.unionComment
531
+      } else if (this.taskName == '财务处理') {
532
+        return this.form.cwComment
533
+      }
534
+    },
535
+    goHome() {
536
+      uni.switchTab({
537
+        url: '/pages/message/index'
538
+      })
539
+    },
540
+    uploadSuccess(fileName) {
541
+      this.form.borrowDocument = fileName
542
+      updateBorrow(this.form)
543
+    }
419
   },
544
   },
420
 }
545
 }
421
 </script>
546
 </script>
425
   font-size: 16px;
550
   font-size: 16px;
426
   font-weight: bold;
551
   font-weight: bold;
427
   color: #333;
552
   color: #333;
553
+  text-align: right;
428
 }
554
 }
429
 
555
 
430
 .warning-text {
556
 .warning-text {
431
   font-size: 14px;
557
   font-size: 14px;
432
   color: #ff0000;
558
   color: #ff0000;
433
   margin-top: 5px;
559
   margin-top: 5px;
560
+  text-align: right;
434
 }
561
 }
435
 
562
 
436
 .form-button {
563
 .form-button {

+ 43
- 8
oa-ui-app/pages/form/borrow/borrowDetail.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-02-27 10:43:04
3
  * @Date: 2025-02-27 10:43:04
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-03 16:58:18
5
+ * @LastEditTime: 2025-03-18 16:36:32
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <view class="container">
8
   <view class="container">
28
           <text class="total-amount">¥{{ item.applyAmount }}</text>
28
           <text class="total-amount">¥{{ item.applyAmount }}</text>
29
         </view>
29
         </view>
30
       </view>
30
       </view>
31
+      <uv-divider :dashed="true" v-if="taskName != '借款申请' && taskName != '部门审核'"></uv-divider>
32
+      <view class="list-item" v-if="taskName != '借款申请' && taskName != '部门审核'">
33
+        <view class="item-left">
34
+          <text style="color:#398ade;padding-left: 10rpx;">分管审核金额</text>
35
+        </view>
36
+        <view class="item-right">
37
+          <uni-easyinput type="number" v-model="item.managerAmount" placeholder="请输入审核金额" v-if="taskName == '分管审核'"
38
+            @blur="editManagerAmount(detailList)" />
39
+          <text class="mg-amount" v-else>¥{{ item.managerAmount }}</text>
40
+        </view>
41
+      </view>
31
       <view class="box-button" v-if="taskName == '借款申请'">
42
       <view class="box-button" v-if="taskName == '借款申请'">
32
         <u-button size="normal" icon="edit-pen" @click="editItem(item)">修改</u-button>
43
         <u-button size="normal" icon="edit-pen" @click="editItem(item)">修改</u-button>
33
         <u-button size="normal" icon="trash" @click="deleteItem(item)">删除</u-button>
44
         <u-button size="normal" icon="trash" @click="deleteItem(item)">删除</u-button>
38
     <view v-if="showAddPopup" class="add-popup">
49
     <view v-if="showAddPopup" class="add-popup">
39
       <view class="popup-content">
50
       <view class="popup-content">
40
         <text class="popup-title">新增借款项</text>
51
         <text class="popup-title">新增借款项</text>
41
-        <uni-forms ref="form" :modelValue="newItem" :rules="rules" label-position="top" label-width="150"
42
-          class="custom-form">
52
+        <uni-forms ref="form" :modelValue="newItem" :rules="rules" label-position="top" label-width="150">
43
           <uni-forms-item label="开支项目" name="borrowItem" required class="form-item">
53
           <uni-forms-item label="开支项目" name="borrowItem" required class="form-item">
44
             <uni-easyinput v-model="newItem.borrowItem" placeholder="请输入开支项目" />
54
             <uni-easyinput v-model="newItem.borrowItem" placeholder="请输入开支项目" />
45
           </uni-forms-item>
55
           </uni-forms-item>
124
       this.initList();
134
       this.initList();
125
     },
135
     },
126
     detailList(newval) {
136
     detailList(newval) {
127
-      let sum = newval.reduce((sum, item) => sum + Number(item.applyAmount), 0);
128
-      this.$emit('getApplyAmount', sum)
137
+      this.getAomunt(newval)
129
     }
138
     }
130
   },
139
   },
131
   methods: {
140
   methods: {
132
     initList() {
141
     initList() {
133
-      console.log('borrowId',  this.borrowId);
134
       listBorrowDetail({ pageSize: 999, borrowId: this.borrowId }).then(res => {
142
       listBorrowDetail({ pageSize: 999, borrowId: this.borrowId }).then(res => {
135
         if (res.rows.length != 0) {
143
         if (res.rows.length != 0) {
136
           this.detailList = res.rows
144
           this.detailList = res.rows
145
+          if (!this.detailList[0].managerAmount) {
146
+            this.detailList.forEach(item => {
147
+              item.managerAmount = item.applyAmount;
148
+            });
149
+            this.editManagerAmount(this.detailList);
150
+          }
137
         }
151
         }
138
       });
152
       });
139
     },
153
     },
140
     // 确认添加
154
     // 确认添加
141
     confirmAdd() {
155
     confirmAdd() {
142
-      const borrowId =  this.borrowId
156
+      const borrowId = this.borrowId
143
       this.$refs.form.validate().then(async res => {
157
       this.$refs.form.validate().then(async res => {
144
         this.newItem.applyAmount = this.getTotal();
158
         this.newItem.applyAmount = this.getTotal();
159
+        this.newItem.managerAmount = this.getTotal();
145
         if (this.isModify) {
160
         if (this.isModify) {
146
           await updateBorrowDetail(this.newItem);
161
           await updateBorrowDetail(this.newItem);
147
         } else {
162
         } else {
189
       this.isModify = true;
204
       this.isModify = true;
190
       this.showAddPopup = true;
205
       this.showAddPopup = true;
191
     },
206
     },
207
+    getAomunt(list) {
208
+      let sum = list.reduce((sum, item) => sum + Number(item.applyAmount), 0);
209
+      let managerSum = list.reduce((sum, item) => sum + Number(item.managerAmount), 0);
210
+      this.$emit('getApplyAmount', sum);
211
+      this.$emit('getManagerAmount', managerSum);
212
+    },
213
+    async editManagerAmount(list) {
214
+      this.getAomunt(list);
215
+      for (let item of list) {
216
+        await updateBorrowDetail(item);
217
+      }
218
+    }
192
   },
219
   },
193
 }
220
 }
194
 </script>
221
 </script>
255
   font-weight: bold;
282
   font-weight: bold;
256
   color: #333;
283
   color: #333;
257
   margin-bottom: 15rpx;
284
   margin-bottom: 15rpx;
285
+  padding-left: 10rpx;
258
 }
286
 }
259
 
287
 
260
 .item-sub {
288
 .item-sub {
261
   font-size: 26rpx;
289
   font-size: 26rpx;
262
   color: #999;
290
   color: #999;
291
+  padding-left: 10rpx;
263
 }
292
 }
264
 
293
 
265
 .total-amount {
294
 .total-amount {
268
   font-weight: bold;
297
   font-weight: bold;
269
   padding-right: 30rpx;
298
   padding-right: 30rpx;
270
 }
299
 }
271
-
300
+.mg-amount{
301
+  font-size: 30rpx;
302
+  color: #398ade;
303
+  font-weight: bold;
304
+  padding-right: 30rpx;
305
+}
272
 .delete {
306
 .delete {
273
   font-size: 30rpx;
307
   font-size: 30rpx;
274
   color: #ff6a6c;
308
   color: #ff6a6c;
290
 
324
 
291
 
325
 
292
 .item-right {
326
 .item-right {
327
+  flex: 1;
293
   min-width: 200rpx;
328
   min-width: 200rpx;
294
   text-align: right;
329
   text-align: right;
295
 }
330
 }

+ 17
- 9
oa-ui-app/pages/form/declare/declare.vue View File

8
 		<!-- 表单内容 -->
8
 		<!-- 表单内容 -->
9
 		<uni-forms ref="form" :modelValue="formData" :rules="rules" label-position="top" label-width="150"
9
 		<uni-forms ref="form" :modelValue="formData" :rules="rules" label-position="top" label-width="150"
10
 			class="custom-form">
10
 			class="custom-form">
11
+			<flow-note :taskForm="taskForm"></flow-note>
11
 			<!-- 当前节点 -->
12
 			<!-- 当前节点 -->
12
 			<uni-forms-item label="当前节点" class="form-item">
13
 			<uni-forms-item label="当前节点" class="form-item">
13
 				<uni-tag :inverted="true" type="primary" :text="taskName"></uni-tag>
14
 				<uni-tag :inverted="true" type="primary" :text="taskName"></uni-tag>
15
 
16
 
16
 			<!-- 流程发起人 -->
17
 			<!-- 流程发起人 -->
17
 			<uni-forms-item label="填报人" class="form-item">
18
 			<uni-forms-item label="填报人" class="form-item">
18
-				<uni-tag :inverted="true" type="primary" :text="startUserName"></uni-tag>
19
+				<b style="font-size:35rpx;">{{ startUserName }}</b>
19
 			</uni-forms-item>
20
 			</uni-forms-item>
20
 
21
 
21
 			<!-- 填报日期 -->
22
 			<!-- 填报日期 -->
84
 			</uni-forms-item>
85
 			</uni-forms-item>
85
 			<!-- 提交按钮 -->
86
 			<!-- 提交按钮 -->
86
 			<button class="save-btn" @click="save">保存</button>
87
 			<button class="save-btn" @click="save">保存</button>
87
-			<button class="submit-btn margin-top-xs" type="primary" @click="submitForm">提交</button>
88
+			<button class="submit-btn margin-top-xs" type="primary" @click="submitForm" v-if="taskName == '工作填报'">提交</button>
89
+			<button class="submit-btn margin-top-xs" type="primary" @click="submitForm" v-else>确认审核</button>
88
 		</uni-forms>
90
 		</uni-forms>
89
 
91
 
90
 		<uv-modal ref="popModal" title="提示" content='是否提交表单?' :showCancelButton="true" @confirm="confirmSubmit"></uv-modal>
92
 		<uv-modal ref="popModal" title="提示" content='是否提交表单?' :showCancelButton="true" @confirm="confirmSubmit"></uv-modal>
100
 import { parseTime } from "@/utils/common.js"
102
 import { parseTime } from "@/utils/common.js"
101
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
103
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
102
 import { getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersManageLeaderByDept } from "@/api/system/post.js";
104
 import { getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersManageLeaderByDept } from "@/api/system/post.js";
105
+import FlowNote from '@/pages/components/flowNote.vue';
103
 export default {
106
 export default {
104
 	components: {
107
 	components: {
105
 		ProjectPicker,
108
 		ProjectPicker,
106
-		ProjectInfo
109
+		ProjectInfo,
110
+		FlowNote
107
 	},
111
 	},
108
 	props: {
112
 	props: {
109
 		taskForm: Object,
113
 		taskForm: Object,
311
 		},
315
 		},
312
 		submitForm() {
316
 		submitForm() {
313
 			this.$refs.form.validate().then(res => {
317
 			this.$refs.form.validate().then(res => {
314
-				console.log('表单数据信息:', res);
315
-				console.log(this.taskForm);
316
 				this.taskForm.variables.skip = false;
318
 				this.taskForm.variables.skip = false;
317
 				if (!this.projectObj.projectLeader) {
319
 				if (!this.projectObj.projectLeader) {
318
 					if (this.isScattered == 0) {
320
 					if (this.isScattered == 0) {
339
 				let approval = this.projectObj.projectLeader;
341
 				let approval = this.projectObj.projectLeader;
340
 				this.taskForm.variables.approval = approval
342
 				this.taskForm.variables.approval = approval
341
 			} else {
343
 			} else {
342
-				let resData = await getUsersDeptLeader({ userId: this.form.userId });
344
+				let resData = await getUsersDeptLeader({
345
+					userId: this.form.userId
346
+				});
343
 				if (resData.data) {
347
 				if (resData.data) {
344
 					this.taskForm.variables.approval = resData.data.userId
348
 					this.taskForm.variables.approval = resData.data.userId
345
 					this.taskForm.variables.skip = true;
349
 					this.taskForm.variables.skip = true;
357
 			if (this.taskName == '项目负责人审核') {
361
 			if (this.taskName == '项目负责人审核') {
358
 				this.formData.checkStatus = '1';
362
 				this.formData.checkStatus = '1';
359
 				updateDeclare(this.formData);
363
 				updateDeclare(this.formData);
360
-				let resData = await getUsersDeptLeader({ userId: this.formData.userId });
364
+				let resData = await getUsersDeptLeader({
365
+					userId: this.formData.userId
366
+				});
361
 				if (resData.data) {
367
 				if (resData.data) {
362
 					this.taskForm.variables.approval = resData.data.userId;
368
 					this.taskForm.variables.approval = resData.data.userId;
363
 					this.handleComplete(this.taskForm);
369
 					this.handleComplete(this.taskForm);
378
 			})
384
 			})
379
 		},
385
 		},
380
 		handleComplete(taskForm) {
386
 		handleComplete(taskForm) {
381
-			const params = { taskId: this.taskForm.taskId };
387
+			const params = {
388
+				taskId: this.taskForm.taskId
389
+			};
382
 			getNextFlowNode(params).then(() => {
390
 			getNextFlowNode(params).then(() => {
383
 				complete(taskForm).then(response => {
391
 				complete(taskForm).then(response => {
384
 					uni.showToast({
392
 					uni.showToast({
430
 .form-item {
438
 .form-item {
431
 	margin-bottom: 20px;
439
 	margin-bottom: 20px;
432
 
440
 
433
-	/deep/ .uni-forms-item__label {
441
+	::v-deep .uni-forms-item__label {
434
 		font-weight: 500;
442
 		font-weight: 500;
435
 		color: #666;
443
 		color: #666;
436
 		padding-bottom: 8px;
444
 		padding-bottom: 8px;

+ 10
- 4
oa-ui-app/pages/message/index.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-01-21 10:01:39
3
  * @Date: 2025-01-21 10:01:39
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-02-19 15:18:10
5
+ * @LastEditTime: 2025-03-17 16:01:12
6
 -->
6
 -->
7
 <template>
7
 <template>
8
 	<view class="u-page">
8
 	<view class="u-page">
74
 	created() {
74
 	created() {
75
 		this.getTodoList();
75
 		this.getTodoList();
76
 	},
76
 	},
77
-	onLoad() {
78
-
77
+	onLoad: function (options) {
78
+		uni.startPullDownRefresh();
79
+	},
80
+	onPullDownRefresh() {
81
+		this.getTodoList();
79
 	},
82
 	},
80
 	methods: {
83
 	methods: {
81
 		getTodoList() {
84
 		getTodoList() {
86
 			}).then(response => {
89
 			}).then(response => {
87
 				this.detail = response.data.total;
90
 				this.detail = response.data.total;
88
 				this.todoList = response.data.records;
91
 				this.todoList = response.data.records;
89
-				this.acceptTime = response.data.records[0].createTime;
92
+				if (response.data.records.length != 0) {
93
+					this.acceptTime = response.data.records[0].createTime;
94
+				}
95
+				uni.stopPullDownRefresh();
90
 			});
96
 			});
91
 		}
97
 		}
92
 	},
98
 	},

+ 1
- 1
oa-ui-app/pages/work/index.vue View File

82
 
82
 
83
     <uv-popup ref="popup" mode="bottom">
83
     <uv-popup ref="popup" mode="bottom">
84
       <view class="bottom-popup">
84
       <view class="bottom-popup">
85
-        <view v-for="item in sendFlowList">
85
+        <view v-for="item,index in sendFlowList" :key="index">
86
           <u-button @click="sendFlow(item)">{{ item.name }}</u-button>
86
           <u-button @click="sendFlow(item)">{{ item.name }}</u-button>
87
         </view>
87
         </view>
88
       </view>
88
       </view>

+ 1
- 1
oa-ui-app/static/scss/global.scss View File

148
 .form-item {
148
 .form-item {
149
   margin-bottom: 20px;
149
   margin-bottom: 20px;
150
 
150
 
151
-  /deep/ .uni-forms-item__label {
151
+  ::v-deep .uni-forms-item__label {
152
     font-weight: 500;
152
     font-weight: 500;
153
     color: #666;
153
     color: #666;
154
     padding-bottom: 8px;
154
     padding-bottom: 8px;

+ 10
- 1
oa-ui-app/utils/common.js View File

20
       content: content,
20
       content: content,
21
       cancelText: '取消',
21
       cancelText: '取消',
22
       confirmText: '确定',
22
       confirmText: '确定',
23
-      success: function(res) {
23
+      success: function (res) {
24
         resolve(res)
24
         resolve(res)
25
       }
25
       }
26
     })
26
     })
102
     return value || 0
102
     return value || 0
103
   })
103
   })
104
   return time_str
104
   return time_str
105
+}
106
+
107
+
108
+
109
+export function getFileName(name) {
110
+  if (name) {
111
+    let arr = name.split("/");
112
+    return arr[arr.length - 1];
113
+  }
105
 }
114
 }

+ 2
- 2
oa-ui/src/assets/datas/publicData.js View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-04-24 15:07:42
3
  * @Date: 2024-04-24 15:07:42
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-09 09:20:08
5
+ * @LastEditTime: 2025-03-18 17:11:26
6
  */
6
  */
7
 const publicData = {
7
 const publicData = {
8
   partySecretary: 4, //党委书记
8
   partySecretary: 4, //党委书记
9
-  leagueSecretary: 142, //团委书记
9
+  leagueSecretary: 15, //团委书记
10
   gm: 7, //总经理
10
   gm: 7, //总经理
11
   chairman: 2,//董事长
11
   chairman: 2,//董事长
12
   zg: 9,
12
   zg: 9,

+ 31
- 9
oa-ui/src/views/flowable/form/finance/borrowForm.vue View File

114
           </table>
114
           </table>
115
           <el-button icon="el-icon-plus" size="mini" @click="addDetailList()" type="primary" plain
115
           <el-button icon="el-icon-plus" size="mini" @click="addDetailList()" type="primary" plain
116
             :disabled="taskName != '借款申请'"></el-button>
116
             :disabled="taskName != '借款申请'"></el-button>
117
-          <!-- </el-form-item> -->
117
+
118
           <el-form-item label="最大借款金额" v-if="isSelect">
118
           <el-form-item label="最大借款金额" v-if="isSelect">
119
-            <el-tag>{{ totalBudget.toFixed(2) }}(大写:{{ formatNumberWithWan(totalBudget) }})</el-tag>
119
+            <el-tag>
120
+              <span class="low-money">{{ totalBudget.toFixed(2) }}</span>
121
+              <span class="up-money">(大写:{{ formatNumberWithWan(totalBudget) }})</span>
122
+            </el-tag>
120
           </el-form-item>
123
           </el-form-item>
121
           <el-form-item label="已申请借款" v-if="isSelect">
124
           <el-form-item label="已申请借款" v-if="isSelect">
122
-            <el-tag type="danger">{{ hasBorrow.toFixed(2) }}(大写:{{ formatNumberWithWan(hasBorrow) }})</el-tag>
125
+            <el-tag type="danger">
126
+              <span class="low-money">{{ hasBorrow.toFixed(2) }}</span>
127
+              <span class="up-money">(大写:{{ formatNumberWithWan(hasBorrow) }})</span>
128
+            </el-tag>
123
           </el-form-item>
129
           </el-form-item>
124
           <el-form-item label="可用借款" v-if="isSelect">
130
           <el-form-item label="可用借款" v-if="isSelect">
125
-            <el-tag type="success">{{ (totalBudget - hasBorrow).toFixed(2) }}(大写:{{ formatNumberWithWan((totalBudget -
126
-              hasBorrow)) }})</el-tag>
131
+            <el-tag type="success">
132
+              <span class="low-money">{{ (totalBudget - hasBorrow).toFixed(2) }}</span>
133
+              <span class="up-money">(大写:{{ formatNumberWithWan((totalBudget - hasBorrow)) }})</span>
134
+            </el-tag>
127
           </el-form-item>
135
           </el-form-item>
136
+
128
           <el-row :gutter="20">
137
           <el-row :gutter="20">
129
             <el-col :span="12" :xs="24">
138
             <el-col :span="12" :xs="24">
130
               <el-form-item label="申请金额" prop="applyAmount">
139
               <el-form-item label="申请金额" prop="applyAmount">
770
             // 提交到下一个流程
779
             // 提交到下一个流程
771
             getNextFlowNode(params).then(res => {
780
             getNextFlowNode(params).then(res => {
772
               this.borrowAprrovalFun();
781
               this.borrowAprrovalFun();
773
-
774
             })
782
             })
775
           }
783
           }
776
         } else {
784
         } else {
786
       })
794
       })
787
     },
795
     },
788
     // 借款申请提交方法
796
     // 借款申请提交方法
789
-    borrowAprrovalFun() {
797
+    async borrowAprrovalFun() {
790
       let userId;
798
       let userId;
791
       // 如果是党工团申请 deptId == 0 为党工团申请
799
       // 如果是党工团申请 deptId == 0 为党工团申请
792
       if (this.deptId == 0) {
800
       if (this.deptId == 0) {
793
         // 2为工会、3为党委
801
         // 2为工会、3为党委
794
         if (this.form.borrowUsage == 2 || this.form.borrowUsage == 3) {
802
         if (this.form.borrowUsage == 2 || this.form.borrowUsage == 3) {
795
-          userId = this.publicData.partySecretary
803
+          const res = await getUserByPost({ postName: '党总支书记' });
804
+          userId = res.data[0].userId;
796
         } else {
805
         } else {
797
-          userId = this.publicData.leagueSecretary
806
+          const res = await getUserByPost({ postName: '团委书记' });
807
+          userId = res.data[0].userId;
798
         }
808
         }
799
         this.$set(this.taskForm.variables, "dept", this.deptId);
809
         this.$set(this.taskForm.variables, "dept", this.deptId);
800
         this.$set(this.taskForm.variables, "approval", userId);
810
         this.$set(this.taskForm.variables, "approval", userId);
811
         getUserByPost({ postName: '董事长' }).then(res => {
821
         getUserByPost({ postName: '董事长' }).then(res => {
812
           this.$set(this.taskForm.variables, "dept", this.deptId);
822
           this.$set(this.taskForm.variables, "dept", this.deptId);
813
           this.$set(this.taskForm.variables, "approval", res.data[0].userId);
823
           this.$set(this.taskForm.variables, "approval", res.data[0].userId);
824
+          this.$set(this.taskForm.variables, "exceed", true);
814
           this.handleComplete(this.taskForm);
825
           this.handleComplete(this.taskForm);
815
         })
826
         })
816
       }
827
       }
995
   }
1006
   }
996
 }
1007
 }
997
 
1008
 
1009
+.low-money {
1010
+  display: inline-block;
1011
+  width: 75px;
1012
+  text-align: right;
1013
+}
1014
+
1015
+.up-money {
1016
+  display: inline-block;
1017
+  text-align: right;
1018
+}
1019
+
998
 ::v-deep .el-descriptions-item__label.is-bordered-label {
1020
 ::v-deep .el-descriptions-item__label.is-bordered-label {
999
   width: 110px;
1021
   width: 110px;
1000
 }
1022
 }

+ 2
- 2
oa-ui/src/views/oa/study/record.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-03-12 10:06:03
3
  * @Date: 2025-03-12 10:06:03
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-14 16:48:00
5
+ * @LastEditTime: 2025-03-17 09:28:35
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container">
8
   <div class="app-container">
40
         <el-row :gutter="10" class="mb8">
40
         <el-row :gutter="10" class="mb8">
41
           <el-col :span="1.5">
41
           <el-col :span="1.5">
42
             <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
42
             <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
43
-              v-hasPermi="['oa:study:export']">导出</el-button>
43
+              v-hasPermi="['oa:record:export']">导出</el-button>
44
           </el-col>
44
           </el-col>
45
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
45
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
46
         </el-row>
46
         </el-row>

Loading…
Cancel
Save