Przeglądaj źródła

移动端完善项目页面、完善借款、用车、设备、工作填报

余思翰 3 dni temu
rodzic
commit
810b643d1e

+ 50
- 0
oa-ui-app/api/oa/budget/budgetSite.js Wyświetl plik

@@ -0,0 +1,50 @@
1
+/*
2
+ * @Author: ysh
3
+ * @Date: 2025-05-12 11:03:30
4
+ * @LastEditors: 
5
+ * @LastEditTime: 2025-05-12 11:03:36
6
+ */
7
+import request from '@/utils/request'
8
+
9
+// 查询cmc现场开支列表
10
+export function listSite(query) {
11
+  return request({
12
+    url: '/oa/site/list',
13
+    method: 'get',
14
+    params: query
15
+  })
16
+}
17
+
18
+// 查询cmc现场开支详细
19
+export function getSite(expenseId) {
20
+  return request({
21
+    url: '/oa/site/' + expenseId,
22
+    method: 'get'
23
+  })
24
+}
25
+
26
+// 新增cmc现场开支
27
+export function addSite(data) {
28
+  return request({
29
+    url: '/oa/site',
30
+    method: 'post',
31
+    data: data
32
+  })
33
+}
34
+
35
+// 修改cmc现场开支
36
+export function updateSite(data) {
37
+  return request({
38
+    url: '/oa/site',
39
+    method: 'put',
40
+    data: data
41
+  })
42
+}
43
+
44
+// 删除cmc现场开支
45
+export function delSite(expenseId) {
46
+  return request({
47
+    url: '/oa/site/' + expenseId,
48
+    method: 'delete'
49
+  })
50
+}

+ 44
- 0
oa-ui-app/api/oa/budget/check.js Wyświetl plik

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询cmc项目核算列表
4
+export function listCheck(query) {
5
+  return request({
6
+    url: '/oa/check/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询cmc项目核算详细
13
+export function getCheck(checkId) {
14
+  return request({
15
+    url: '/oa/check/' + checkId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增cmc项目核算
21
+export function addCheck(data) {
22
+  return request({
23
+    url: '/oa/check',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改cmc项目核算
30
+export function updateCheck(data) {
31
+  return request({
32
+    url: '/oa/check',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除cmc项目核算
39
+export function delCheck(checkId) {
40
+  return request({
41
+    url: '/oa/check/' + checkId,
42
+    method: 'delete'
43
+  })
44
+}

+ 52
- 0
oa-ui-app/api/system/dict/data.js Wyświetl plik

@@ -0,0 +1,52 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询字典数据列表
4
+export function listData(query) {
5
+  return request({
6
+    url: '/system/dict/data/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询字典数据详细
13
+export function getData(dictCode) {
14
+  return request({
15
+    url: '/system/dict/data/' + dictCode,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 根据字典类型查询字典数据信息
21
+export function getDicts(dictType) {
22
+  return request({
23
+    url: '/system/dict/data/type/' + dictType,
24
+    method: 'get'
25
+  })
26
+}
27
+
28
+// 新增字典数据
29
+export function addData(data) {
30
+  return request({
31
+    url: '/system/dict/data',
32
+    method: 'post',
33
+    data: data
34
+  })
35
+}
36
+
37
+// 修改字典数据
38
+export function updateData(data) {
39
+  return request({
40
+    url: '/system/dict/data',
41
+    method: 'put',
42
+    data: data
43
+  })
44
+}
45
+
46
+// 删除字典数据
47
+export function delData(dictCode) {
48
+  return request({
49
+    url: '/system/dict/data/' + dictCode,
50
+    method: 'delete'
51
+  })
52
+}

+ 60
- 0
oa-ui-app/api/system/dict/type.js Wyświetl plik

@@ -0,0 +1,60 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询字典类型列表
4
+export function listType(query) {
5
+  return request({
6
+    url: '/system/dict/type/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询字典类型详细
13
+export function getType(dictId) {
14
+  return request({
15
+    url: '/system/dict/type/' + dictId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增字典类型
21
+export function addType(data) {
22
+  return request({
23
+    url: '/system/dict/type',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改字典类型
30
+export function updateType(data) {
31
+  return request({
32
+    url: '/system/dict/type',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除字典类型
39
+export function delType(dictId) {
40
+  return request({
41
+    url: '/system/dict/type/' + dictId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 刷新字典缓存
47
+export function refreshCache() {
48
+  return request({
49
+    url: '/system/dict/type/refreshCache',
50
+    method: 'delete'
51
+  })
52
+}
53
+
54
+// 获取字典选择框列表
55
+export function optionselect() {
56
+  return request({
57
+    url: '/system/dict/type/optionselect',
58
+    method: 'get'
59
+  })
60
+}

+ 1
- 1
oa-ui-app/main.js Wyświetl plik

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-01-16 11:17:07
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-18 17:11:37
5
+ * @LastEditTime: 2025-05-28 10:20:17
6 6
  */
7 7
 import Vue from 'vue'
8 8
 import App from './App'

+ 14
- 0
oa-ui-app/pages.json Wyświetl plik

@@ -121,6 +121,20 @@
121 121
 			{
122 122
 				"navigationBarTitleText" : "项目详情"
123 123
 			}
124
+		},
125
+		{
126
+			"path" : "pages/oa/budget/budgetInfo",
127
+			"style" : 
128
+			{
129
+				"navigationBarTitleText" : "项目预算表"
130
+			}
131
+		},
132
+		{
133
+			"path" : "pages/oa/borrow/borrowList",
134
+			"style" : 
135
+			{
136
+				"navigationBarTitleText" : "借款管理"
137
+			}
124 138
 		}
125 139
 	],
126 140
 	"tabBar": {

+ 67
- 17
oa-ui-app/pages/components/DevicePicker.vue Wyświetl plik

@@ -3,18 +3,21 @@
3 3
     <view class="modal-container">
4 4
       <!-- 搜索表单 -->
5 5
       <view class="search-box">
6
-        <!-- <uni-data-select v-model="queryParams.status" :localdata="statusOptions" style="width: 200rpx;"
7
-          :clearable="false" @change="handleSearch" disabled>
8
-        </uni-data-select> -->
9
-
10
-        <uni-easyinput v-model="queryParams.code" placeholder="出厂编号" @change="handleSearch" clearable>
11
-        </uni-easyinput>
12
-
13
-        <uni-easyinput v-model="queryParams.name" placeholder="设备名称" @change="handleSearch" clearable>
14
-        </uni-easyinput>
15
-
16
-        <uni-easyinput v-model="queryParams.brand" placeholder="设备品牌" @change="handleSearch" clearable>
17
-        </uni-easyinput>
6
+        <view class="search-type">
7
+          <uni-data-select v-model="searchType" :localdata="searchTypeOptions" @change="handleSearchTypeChange">
8
+          </uni-data-select>
9
+        </view>
10
+        <view class="search-item">
11
+          <uni-easyinput v-show="searchType === 'code'" v-model="queryParams.code" placeholder="出厂编号"
12
+            @blur="handleSearch" clearable>
13
+          </uni-easyinput>
14
+          <uni-data-select v-show="searchType === 'name'" v-model="queryParams.name" :localdata="nameList"
15
+            @change="handleSearch" clearable>
16
+          </uni-data-select>
17
+          <uni-easyinput v-show="searchType === 'brand'" v-model="queryParams.brand" placeholder="设备品牌"
18
+            @blur="handleSearch" clearable>
19
+          </uni-easyinput>
20
+        </view>
18 21
       </view>
19 22
 
20 23
       <!-- 设备列表 -->
@@ -76,13 +79,20 @@ export default {
76 79
 
77 80
   data() {
78 81
     return {
82
+      searchType: 'code',
83
+      searchTypeOptions: [
84
+        { value: 'code', text: '出厂编号' },
85
+        { value: 'name', text: '设备名称' },
86
+        { value: 'brand', text: '设备品牌' }
87
+      ],
79 88
       queryParams: {
80 89
         pageNum: 1,
81 90
         pageSize: 10,
82 91
         status: '1',
83 92
         type: '仪器设备',
84 93
         code: '',
85
-        name: ''
94
+        name: '',
95
+        brand: ''
86 96
       },
87 97
       statusOptions: [
88 98
         { value: '0', text: '被领用' },
@@ -95,7 +105,8 @@ export default {
95 105
       selectedList: [],
96 106
       hasMore: true,
97 107
       loading: false,
98
-      scrollTop: 0
108
+      scrollTop: 0,
109
+      nameList: []
99 110
     }
100 111
   },
101 112
 
@@ -119,6 +130,7 @@ export default {
119 130
 
120 131
   created() {
121 132
     this.debouncedSearch = debounce(this.loadData, 300);
133
+    this.getNameList();
122 134
   },
123 135
 
124 136
   methods: {
@@ -137,7 +149,7 @@ export default {
137 149
       this.loading = true;
138 150
       try {
139 151
         const res = await listDevice(this.queryParams);
140
-        
152
+
141 153
         // 如果是第一页,直接替换列表
142 154
         if (this.queryParams.pageNum === 1) {
143 155
           this.list = res.rows;
@@ -163,7 +175,23 @@ export default {
163 175
         this.loading = false;
164 176
       }
165 177
     },
166
-
178
+    getNameList() {
179
+      listDeviceName().then(res => {
180
+        this.nameList = res.data.filter(function (item) {
181
+          return item !== null;
182
+        }).map(function (item) {
183
+          return { value: item.name, text: item.name };
184
+        });
185
+      })
186
+    },
187
+    // 搜索类型改变处理
188
+    handleSearchTypeChange() {
189
+      // 清空其他搜索字段
190
+      this.queryParams.code = '';
191
+      this.queryParams.name = '';
192
+      this.queryParams.brand = '';
193
+      this.handleSearch();
194
+    },
167 195
     // 搜索处理
168 196
     handleSearch() {
169 197
       // 重置分页参数
@@ -231,10 +259,32 @@ export default {
231 259
 
232 260
 .search-box {
233 261
   display: flex;
234
-  flex-wrap: wrap;
262
+  flex-direction: row;
263
+  align-items: center;
235 264
   gap: 16rpx;
236 265
   margin-bottom: 32rpx;
237 266
 
267
+  .search-type {
268
+    width: 30%;
269
+
270
+    ::v-deep .uni-data-select {
271
+      width: 100%;
272
+    }
273
+  }
274
+
275
+  .search-item {
276
+    width: 70%;
277
+    position: relative;
278
+    height: 72rpx;
279
+    /* 设置固定高度,与输入框高度一致 */
280
+
281
+    ::v-deep .uni-easyinput__content,
282
+    ::v-deep .uni-data-select {
283
+      height: 72rpx;
284
+      line-height: 72rpx;
285
+    }
286
+  }
287
+
238 288
   ::v-deep .uni-easyinput__content {
239 289
     border-radius: 16rpx;
240 290
   }

+ 46
- 38
oa-ui-app/pages/form/borrow/borrow.vue Wyświetl plik

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-02-20 10:20:22
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-28 14:27:15
5
+ * @LastEditTime: 2025-05-29 10:15:51
6 6
 -->
7 7
 <template>
8 8
   <view class="form-container">
@@ -55,13 +55,13 @@
55 55
 
56 56
       <!-- 最大借款金额限制 -->
57 57
       <uni-forms-item label="最大借款金额" class="form-item" v-if="form.borrowUsage == '0'">
58
-        <view class="amount-text">¥ {{ totalBudget.toFixed(2) }}</view>
58
+        <view class="amount-text">¥ {{ siteExpenses.toFixed(2) }}</view>
59 59
       </uni-forms-item>
60 60
       <uni-forms-item label="已申请借款" class="form-item" v-if="form.borrowUsage == '0'">
61 61
         <view class="amount-text">¥ {{ hasBorrow.toFixed(2) }}</view>
62 62
       </uni-forms-item>
63 63
       <uni-forms-item label="可用借款" class="form-item" v-if="form.borrowUsage == '0'">
64
-        <view class="amount-text">¥ {{ (totalBudget - hasBorrow).toFixed(2) }}</view>
64
+        <view class="amount-text">¥ {{ (siteExpenses - hasBorrow).toFixed(2) }}</view>
65 65
       </uni-forms-item>
66 66
       <uni-forms-item label="申请金额" required class="form-item">
67 67
         <view class="amount-text">¥ {{ (this.form.applyAmount ? this.form.applyAmount : 0).toFixed(2) }}</view>
@@ -151,6 +151,7 @@ import ProjectInfo from '@/pages/components/ProjectInfo.vue';
151 151
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
152 152
 import ProjectPicker from '@/pages/components/ProjectPicker.vue';
153 153
 import { listProject, getProject } from "@/api/oa/project/project";
154
+import { listSite, delSite } from "@/api/oa/budget/budgetSite.js";
154 155
 import { listBorrow, getBorrow, delBorrow, addBorrow, updateBorrow } from "@/api/oa/borrow/borrow";
155 156
 import { getUserByPost, getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersViceDeptLeaderByDept, getUsersManageLeaderByDept } from '@/api/system/post.js'
156 157
 import BorrowDetail from './borrowDetail.vue';
@@ -229,7 +230,7 @@ export default {
229 230
       selectedProject: null, //选中的项目
230 231
       projectObj: {}, //项目信息的项目
231 232
       formTotal: 0,
232
-      totalBudget: 0, //预结算额
233
+      siteExpenses: 0, //预结算额
233 234
       exceed: false, //是否超预算
234 235
       hasBorrow: 0, //已申请借款
235 236
       deptId: undefined,
@@ -313,37 +314,8 @@ export default {
313 314
                 this.projectObj = res.data;
314 315
               }
315 316
             })
316
-            let budgetData = await listBudget({ projectId: this.form.projectId })
317
-            if (budgetData.total == 1) {
318
-              let budget = budgetData.rows[0];
319
-              this.totalBudget = budget.settleExpense
320
-            } else if (budgetData.total == 0) {
321
-              this.totalBudget = 0
322
-            }
323
-            if (this.form.borrowUsage == '0') {
324
-              if ((this.totalBudget - this.form.applyAmount) < 0) {
325
-                this.exceed = true;
326
-              } else {
327
-                this.exceed = false;
328
-              }
329
-            } else {
330
-              this.exceed = false;
331
-            }
332
-            let borrow = await listBorrow({ projectId: this.form.projectId })
333
-            if (borrow.total != 0) {
334
-              let borrowList = borrow.rows;
335
-              let hasBorrow = 0;
336
-              borrowList = borrowList.filter(item => item.borrowId != this.taskForm.formId)
337
-              borrowList.forEach(element => {
338
-                if (element.managerAmount) {
339
-                  hasBorrow = hasBorrow + element.managerAmount
340
-                }
341
-                if (!element.managerAmount && element.applyAmount) {
342
-                  hasBorrow = hasBorrow + element.applyAmount
343
-                }
344
-              });
345
-              this.hasBorrow = hasBorrow
346
-            }
317
+            await this.getMaxExpense();
318
+
347 319
           }
348 320
         } else {
349 321
           this.formTotal = 0;
@@ -353,6 +325,42 @@ export default {
353 325
       })
354 326
 
355 327
     },
328
+    async getMaxExpense() {
329
+      let budgetData = await listBudget({ projectId: this.form.projectId })
330
+      if (budgetData.total == 1) {
331
+        let budget = budgetData.rows[0];
332
+        let siteRes = await listSite({ budgetId: budget.budgetId });
333
+        let maxExpense = siteRes.rows.reduce((sum, site) => sum + (Number(site.amount) || 0), 0);
334
+        this.siteExpenses = maxExpense
335
+      } else {
336
+        this.siteExpenses = 0
337
+      }
338
+      if (this.form.borrowUsage == '0') {
339
+        if ((this.siteExpenses - this.form.applyAmount) < 0) {
340
+          this.exceed = true;
341
+        } else {
342
+          this.exceed = false;
343
+        }
344
+      } else {
345
+        this.exceed = false;
346
+      }
347
+      let borrow = await listBorrow({ projectId: this.form.projectId })
348
+      if (borrow.total != 0) {
349
+        let borrowList = borrow.rows;
350
+        let hasBorrow = 0;
351
+        borrowList = borrowList.filter(item => item.borrowId != this.taskForm.formId)
352
+        borrowList.forEach(element => {
353
+          if (element.managerAmount) {
354
+            hasBorrow = hasBorrow + element.managerAmount
355
+          }
356
+          if (!element.managerAmount && element.applyAmount) {
357
+            hasBorrow = hasBorrow + element.applyAmount
358
+          }
359
+        });
360
+        this.hasBorrow = hasBorrow
361
+      }
362
+      this.getMoreAmount();
363
+    },
356 364
     hanldeChangeType() {
357 365
       if (this.form.borrowUsage == '2') {
358 366
         this.dgtLabel = '工会审核意见'
@@ -366,9 +374,9 @@ export default {
366 374
     getMoreAmount(type) {
367 375
       let result;
368 376
       if (type == '0') {
369
-        result = this.form.applyAmount - (this.totalBudget - this.hasBorrow);
377
+        result = this.form.applyAmount - (this.siteExpenses - this.hasBorrow);
370 378
       } else {
371
-        result = this.form.managerAmount - (this.totalBudget - this.hasBorrow);
379
+        result = this.form.managerAmount - (this.siteExpenses - this.hasBorrow);
372 380
       }
373 381
       return result.toFixed(2)
374 382
     },
@@ -382,6 +390,7 @@ export default {
382 390
       this.selectedProject = project;
383 391
       this.projectObj = project;
384 392
       this.form.projectId = project.projectId;
393
+      this.getMaxExpense();
385 394
     },
386 395
     // 保存
387 396
     async saves() {
@@ -591,7 +600,6 @@ export default {
591 600
 </script>
592 601
 
593 602
 <style lang="scss" scoped>
594
-
595 603
 .amount-text {
596 604
   font-size: 16px;
597 605
   font-weight: bold;

+ 71
- 2
oa-ui-app/pages/form/borrow/borrowDetail.vue Wyświetl plik

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-02-27 10:43:04
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-19 10:34:18
5
+ * @LastEditTime: 2025-05-28 11:05:53
6 6
 -->
7 7
 <template>
8 8
   <view class="container">
@@ -51,7 +51,8 @@
51 51
         <text class="popup-title">新增借款项</text>
52 52
         <uni-forms ref="form" :modelValue="newItem" :rules="rules" label-position="top" label-width="150">
53 53
           <uni-forms-item label="开支项目" name="borrowItem" required class="form-item">
54
-            <uni-easyinput v-model="newItem.borrowItem" placeholder="请输入开支项目" />
54
+            <uni-data-select v-model="newItem.borrowItem" :localdata="dictsList" placeholder="请选择开支项目"
55
+              @change="handleExpenseChange" />
55 56
           </uni-forms-item>
56 57
           <uni-forms-item label="单位" name="unit" required class="form-item">
57 58
             <uni-easyinput v-model="newItem.unit" placeholder="请输入单位" />
@@ -73,12 +74,24 @@
73 74
         </uni-forms>
74 75
       </view>
75 76
     </view>
77
+    <!-- 新增开支项字典弹窗 -->
78
+    <view class="new-expense-popup" v-if="openNewExpense">
79
+      <view class="popup-content">
80
+        <text class="popup-title">新增开支项</text>
81
+        <uni-easyinput v-model="newExpenseName" placeholder="请输入开支名称" />
82
+        <view class="popup-buttons">
83
+          <u-button style="margin-right: 10px;" @click="openNewExpense = false">取消</u-button>
84
+          <u-button type="primary" class="confirm" @click="addNewExpense">确认添加</u-button>
85
+        </view>
86
+      </view>
87
+    </view>
76 88
   </view>
77 89
 </template>
78 90
 
79 91
 <script>
80 92
 import { listBorrowDetail, addBorrowDetail, updateBorrowDetail, delBorrowDetail, delBorrowDetailByDetailId } from "@/api/oa/borrow/borrowDetail";
81 93
 import uButton from '../../../uni_modules/uview-ui/components/u-button/u-button.vue';
94
+import { addData, getDicts } from "@/api/system/dict/data";
82 95
 export default {
83 96
   components: { uButton },
84 97
   props: {
@@ -124,10 +137,14 @@ export default {
124 137
       },
125 138
       errorMessage: '',
126 139
       isModify: false,
140
+      dictsList: [], //开支项字典
141
+      openNewExpense: false, //新增开支项字典弹窗
142
+      newExpenseName: '', //新增开支项名称
127 143
     }
128 144
   },
129 145
   created() {
130 146
     this.initList();
147
+    this.initDict();
131 148
   },
132 149
   watch: {
133 150
     borrowId() {
@@ -151,6 +168,45 @@ export default {
151 168
         }
152 169
       });
153 170
     },
171
+    initDict() {
172
+      getDicts('cmc_borrow_expense').then(res => {
173
+        this.dictsList = res.data.map(item => ({
174
+          value: item.dictValue,
175
+          text: item.dictLabel
176
+        }))
177
+        this.dictsList.push({
178
+          value: 'newExpense',
179
+          text: '+新增更多开支项...'
180
+        })
181
+      })
182
+    },
183
+    handleExpenseChange(value) {
184
+      console.log(value);
185
+      if (value == 'newExpense') {
186
+        this.openNewExpense = true;
187
+      }
188
+    },
189
+    addNewExpense() {
190
+      if (this.newExpenseName == '') {
191
+        this.$modal.msgError('请输入开支名称');
192
+        return;
193
+      }
194
+      let length = this.dictsList.length;
195
+      let newExpenseForm = {
196
+        dictType: 'cmc_borrow_expense',
197
+        dictLabel: this.newExpenseName,
198
+        dictValue: this.newExpenseName,
199
+        listClass: 'default',
200
+        dictSort: length
201
+      }
202
+      addData(newExpenseForm).then(res => {
203
+        this.$modal.msgSuccess('新增成功');
204
+        this.openNewExpense = false;
205
+        this.newItem.borrowItem = this.newExpenseName;
206
+        this.newExpenseName = '';
207
+        this.initDict();
208
+      })
209
+    },
154 210
     // 确认添加
155 211
     confirmAdd() {
156 212
       const borrowId = this.borrowId
@@ -363,4 +419,17 @@ export default {
363 419
 .popup-buttons {
364 420
   display: flex;
365 421
 }
422
+
423
+.new-expense-popup {
424
+  position: fixed;
425
+  top: 0;
426
+  left: 0;
427
+  right: 0;
428
+  bottom: 0;
429
+  background-color: rgba(0, 0, 0, 0.5);
430
+  display: flex;
431
+  justify-content: center;
432
+  align-items: center;
433
+  z-index: 1000;
434
+}
366 435
 </style>

+ 64
- 33
oa-ui-app/pages/form/device/device.vue Wyświetl plik

@@ -24,18 +24,26 @@
24 24
       </uni-forms-item>
25 25
 
26 26
       <!-- 选择项目 -->
27
-      <uni-forms-item label="选择项目" required class="form-item" name="projectId">
27
+      <uni-forms-item label="选择项目" class="form-item" name="projectId">
28
+        <view v-if="taskName == '设备申请'" style="display: flex; align-items: center; margin-bottom: 10px;">
29
+          <uni-icons type="info" size="16" color="#666"></uni-icons>
30
+          <text style="font-size: 24rpx; color: #666;">项目非必选,非项目设备申请时,可不选项目</text>
31
+        </view>
28 32
         <uv-button type="primary" @click="openProject = true" v-if="taskName == '设备申请'">+ 选择项目</uv-button>
29 33
         <ProjectPicker :visible.sync="openProject" :selected.sync="selectedProject" @confirm="handleConfirm" />
30
-        <ProjectInfo :project="projectObj"></ProjectInfo>
34
+        <ProjectInfo :project="projectObj" v-if="form.projectId != '0'"></ProjectInfo>
35
+        <view v-if="form.projectId == '0' && taskName != '设备申请'">
36
+          <uni-tag type="primary" text="非项目设备申请"></uni-tag>
37
+        </view>
31 38
       </uni-forms-item>
39
+      <!-- 设备选择器 -->
40
+      <device-picker :visible.sync="openDevice" :selected.sync="selectDevice" :multiple="!isReplaceMode"
41
+        @confirm="handleDeviceConfirm"></device-picker>
32 42
 
33 43
       <!-- 设备选择 -->
34 44
       <uni-forms-item label="申请设备" required class="form-item" name="devices"
35 45
         v-if="taskName != '安排设备' && taskName != '归还确认'">
36 46
         <uv-button type="primary" @click="openDevice = true" v-if="taskName == '设备申请'">+ 选择设备</uv-button>
37
-        <device-picker :visible.sync="openDevice" :selected.sync="selectDevice" :multiple="!isReplaceMode"
38
-          @confirm="handleDeviceConfirm"></device-picker>
39 47
         <view class="device-cards" v-if="deviceList.length > 0">
40 48
           <view class="device-card" v-for="(item, index) in deviceList" :key="index">
41 49
             <view class="card-header">
@@ -147,7 +155,7 @@
147 155
 
148 156
       <!-- 归还确认 -->
149 157
       <uni-forms-item label="已归还设备" required class="form-item" v-if="taskName == '' || taskName == '归还确认'">
150
-        <text style="color: #a69494;" v-if="taskName == '归还确认'">Tips:请点击卡片,切换归还状态</text>
158
+        <text style="color: #3c9cff;" v-if="taskName == '归还确认'">Tips:请点击卡片,切换归还状态</text>
151 159
         <view class="device-cards" v-if="returnDevicesList.length > 0">
152 160
           <view class="device-card" v-for="(item, index) in returnDevicesList" :key="index"
153 161
             :class="{ 'selected': isDeviceSelected(item.deviceId) }" @click="toggleDeviceSelection(item)">
@@ -224,7 +232,7 @@
224 232
             </view>
225 233
           </view>
226 234
         </view>
227
-        <view v-else>
235
+        <view v-if="repairDevicesList.length == 0 && taskName != '归还确认'" style="margin-top: 10rpx;">
228 236
           <uni-tag type="success" text="没有需维修的设备" size="small"></uni-tag>
229 237
         </view>
230 238
       </uni-forms-item>
@@ -311,9 +319,9 @@ export default {
311 319
         returnDate: ''
312 320
       },
313 321
       rules: {
314
-        projectId: {
315
-          rules: [{ required: true, errorMessage: '请选择项目' }]
316
-        },
322
+        // projectId: {
323
+        //   rules: [{ required: true, errorMessage: '请选择项目' }]
324
+        // },
317 325
         devices: {
318 326
           rules: [{ required: true, errorMessage: '请选择设备' }]
319 327
         },
@@ -405,12 +413,14 @@ export default {
405 413
           this.formTotal = 1;
406 414
           this.form = res.data;
407 415
           this.applierUserName = res.data.applierUser.nickName;
408
-          const project = await getProject(res.data.projectId);
409
-          this.projectObj = project.data;
416
+          if (res.data.projectId != '0') {
417
+            const project = await getProject(res.data.projectId);
418
+            this.projectObj = project.data;
419
+          }
410 420
           // 初始化申请设备
411 421
           if (res.data.devices) {
412 422
             const deviceIds = res.data.devices.split(',').map(id => parseInt(id));
413
-            this.form.devices = res.data.devices.split(',');
423
+            this.form.devices = res.data.devices.split(',').map(id => parseInt(id));
414 424
             this.deviceList = [];
415 425
             this.selectDevice = [];
416 426
 
@@ -432,7 +442,7 @@ export default {
432 442
               : Array.isArray(res.data.modifyDevices)
433 443
                 ? res.data.modifyDevices.map(id => parseInt(id))
434 444
                 : [];
435
-            this.form.modifyDevices = res.data.modifyDevices.split(',');
445
+            this.form.modifyDevices = res.data.modifyDevices.split(',').map(id => parseInt(id));
436 446
             this.modifyDeviceList = [];
437 447
 
438 448
             for (const id of modifyDeviceIds) {
@@ -494,8 +504,10 @@ export default {
494 504
           }
495 505
 
496 506
           if (this.form.beginDate && this.form.endDate) {
497
-            this.form.dateRange = [this.form.beginDate, this.form.endDate];
507
+            let dateRange = [this.form.beginDate, this.form.endDate];
508
+            this.$set(this.form, 'dateRange', dateRange);
498 509
           }
510
+
499 511
         } else {
500 512
           this.form.applier = this.$store.getters.userId;
501 513
           this.form.applyDate = parseTime(new Date(), "{y}-{m}-{d}");
@@ -532,7 +544,7 @@ export default {
532 544
         this.isReplaceMode = false;
533 545
       } else {
534 546
         this.deviceList = Array.isArray(devices) ? devices : [devices];
535
-        this.form.devices = this.deviceList.map(item => item.deviceId);
547
+        this.form.devices = this.deviceList.map(item => Number(item.deviceId));
536 548
       }
537 549
     },
538 550
     handleDateRangeChange(e) {
@@ -584,26 +596,45 @@ export default {
584 596
     },
585 597
     submit() {
586 598
       this.$refs.form.validate().then(() => {
587
-        let submitData = {
588
-          ...this.form,
589
-          ...(this.form.formId ? {} : { formId: this.taskForm.formId }),
590
-          ...(this.form.deviceApplyId ? {} : { deviceApplyId: this.taskForm.formId })
591
-        };
592
-        let jsonForm = JSON.stringify(submitData);
593
-        submitDeviceApproval(jsonForm).then(res => {
594
-          // 获取下一个流程节点
595
-          this.getNextFlowNodeApproval().then(() => {
596
-            uni.showToast({
597
-              title: '提交成功',
598
-              icon: 'success'
599
+        this.$modal.confirm('是否提交设备申请?').then(() => {
600
+          let submitData = {
601
+            ...this.form,
602
+            ...(this.form.formId ? {} : { formId: this.taskForm.formId }),
603
+            ...(this.form.deviceApplyId ? {} : { deviceApplyId: this.taskForm.formId })
604
+          };
605
+          let jsonForm = JSON.stringify(submitData);
606
+          if (!this.form.deviceApplyId) {
607
+            submitDeviceApproval(jsonForm).then(res => {
608
+              // 获取下一个流程节点
609
+              this.getNextFlowNodeApproval().then(() => {
610
+                uni.showToast({
611
+                  title: '提交成功',
612
+                  icon: 'success'
613
+                });
614
+                setTimeout(() => {
615
+                  uni.switchTab({
616
+                    url: '/pages/message/index'
617
+                  })
618
+                }, 500);
619
+              })
599 620
             });
600
-            setTimeout(() => {
601
-              uni.switchTab({
602
-                url: '/pages/message/index'
621
+          } else {
622
+            modifyDeviceApproval(jsonForm).then(res => {
623
+              // 获取下一个流程节点
624
+              this.getNextFlowNodeApproval().then(() => {
625
+                uni.showToast({
626
+                  title: '提交成功',
627
+                  icon: 'success'
628
+                });
629
+                setTimeout(() => {
630
+                  uni.switchTab({
631
+                    url: '/pages/message/index'
632
+                  })
633
+                }, 500);
603 634
               })
604
-            }, 500);
605
-          })
606
-        });
635
+            })
636
+          }
637
+        })
607 638
       });
608 639
     },
609 640
     saves() {

+ 2
- 2
oa-ui-app/pages/message/completed/index.vue Wyświetl plik

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-02-19 15:30:13
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-23 16:00:38
5
+ * @LastEditTime: 2025-06-03 10:19:28
6 6
 -->
7 7
 <template>
8 8
   <view class="page-container">
@@ -203,7 +203,7 @@ export default {
203 203
             }
204 204
             revokeProcess(params).then(res => {
205 205
               this.$modal.msgSuccess(res.msg);
206
-              this.upCallback();
206
+              this.downCallback();
207 207
             });
208 208
           }
209 209
         }

+ 2
- 2
oa-ui-app/pages/message/myProcess/index.vue Wyświetl plik

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-02-19 15:36:34
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-26 10:46:52
5
+ * @LastEditTime: 2025-05-29 10:29:10
6 6
 -->
7 7
 <template>
8 8
   <view class="page-container">
@@ -245,7 +245,7 @@ export default {
245 245
             }
246 246
             return delDeployment(ids);
247 247
           }).then(() => {
248
-            this.upCallback();
248
+            this.downCallback();
249 249
             this.$modal.msgSuccess("流程取消成功");
250 250
             this.$refs.actionPopup.close()
251 251
           })

+ 107
- 95
oa-ui-app/pages/mine/index.vue Wyświetl plik

@@ -1,5 +1,11 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2025-01-16 11:17:08
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2025-06-03 14:51:33
6
+-->
1 7
 <template>
2
-  <view class="mine-container" :style="{height: `${windowHeight}px`}">
8
+  <view class="mine-container" :style="{ height: `${windowHeight}px` }">
3 9
     <!--顶部个人信息栏-->
4 10
     <view class="header-section">
5 11
       <view class="flex padding justify-between">
@@ -70,6 +76,12 @@
70 76
             <view>应用设置</view>
71 77
           </view>
72 78
         </view>
79
+        <view class="list-cell list-cell-arrow" @click="handleLogout">
80
+          <view class="menu-item-box" style="color:#f56c6c">
81
+            <view class="iconfont icon-logout menu-icon" style="color:#f56c6c"></view>
82
+            <view>退出登录</view>
83
+          </view>
84
+        </view>
73 85
       </view>
74 86
 
75 87
     </view>
@@ -77,122 +89,122 @@
77 89
 </template>
78 90
 
79 91
 <script>
80
-  import storage from '@/utils/storage'
81
-  
82
-  export default {
83
-    data() {
84
-      return {
85
-        name: this.$store.state.user.name,
86
-        version: getApp().globalData.config.appInfo.version
87
-      }
92
+import storage from '@/utils/storage'
93
+
94
+export default {
95
+  data() {
96
+    return {
97
+      name: this.$store.state.user.name,
98
+      version: getApp().globalData.config.appInfo.version
99
+    }
100
+  },
101
+  computed: {
102
+    avatar() {
103
+      return this.$store.state.user.avatar
88 104
     },
89
-    computed: {
90
-      avatar() {
91
-        return this.$store.state.user.avatar
92
-      },
93
-      windowHeight() {
94
-        return uni.getSystemInfoSync().windowHeight - 50
95
-      }
105
+    windowHeight() {
106
+      return uni.getSystemInfoSync().windowHeight - 50
107
+    }
108
+  },
109
+  methods: {
110
+    handleToInfo() {
111
+      this.$tab.navigateTo('/pages/mine/info/index')
112
+    },
113
+    handleToEditInfo() {
114
+      this.$tab.navigateTo('/pages/mine/info/edit')
96 115
     },
97
-    methods: {
98
-      handleToInfo() {
99
-        this.$tab.navigateTo('/pages/mine/info/index')
100
-      },
101
-      handleToEditInfo() {
102
-        this.$tab.navigateTo('/pages/mine/info/edit')
103
-      },
104
-      handleToSetting() {
105
-        this.$tab.navigateTo('/pages/mine/setting/index')
106
-      },
107
-      handleToLogin() {
108
-        this.$tab.reLaunch('/pages/login')
109
-      },
110
-      handleToAvatar() {
111
-        this.$tab.navigateTo('/pages/mine/avatar/index')
112
-      },
113
-      handleLogout() {
114
-        this.$modal.confirm('确定注销并退出系统吗?').then(() => {
115
-          this.$store.dispatch('LogOut').then(() => {
116
-            this.$tab.reLaunch('/pages/index')
117
-          })
116
+    handleToSetting() {
117
+      this.$tab.navigateTo('/pages/mine/setting/index')
118
+    },
119
+    handleToLogin() {
120
+      this.$tab.reLaunch('/pages/login')
121
+    },
122
+    handleToAvatar() {
123
+      this.$tab.navigateTo('/pages/mine/avatar/index')
124
+    },
125
+    handleLogout() {
126
+      this.$modal.confirm('确定注销并退出系统吗?').then(() => {
127
+        this.$store.dispatch('LogOut').then(() => {
128
+          this.$tab.reLaunch('/pages/index')
118 129
         })
119
-      },
120
-      handleHelp() {
121
-        this.$tab.navigateTo('/pages/mine/help/index')
122
-      },
123
-      handleAbout() {
124
-        this.$tab.navigateTo('/pages/mine/about/index')
125
-      },
126
-      handleJiaoLiuQun() {
127
-        this.$modal.showToast('QQ群:133713780')
128
-      },
129
-      handleBuilding() {
130
-        this.$modal.showToast('模块建设中~')
131
-      }
130
+      })
131
+    },
132
+    handleHelp() {
133
+      this.$tab.navigateTo('/pages/mine/help/index')
134
+    },
135
+    handleAbout() {
136
+      this.$tab.navigateTo('/pages/mine/about/index')
137
+    },
138
+    handleJiaoLiuQun() {
139
+      this.$modal.showToast('QQ群:133713780')
140
+    },
141
+    handleBuilding() {
142
+      this.$modal.showToast('模块建设中~')
132 143
     }
133 144
   }
145
+}
134 146
 </script>
135 147
 
136 148
 <style lang="scss">
137
-  page {
138
-    background-color: #f5f6f7;
139
-  }
149
+page {
150
+  background-color: #f5f6f7;
151
+}
140 152
 
141
-  .mine-container {
142
-    width: 100%;
143
-    height: 100%;
153
+.mine-container {
154
+  width: 100%;
155
+  height: 100%;
144 156
 
145 157
 
146
-    .header-section {
147
-      padding: 15px 15px 45px 15px;
148
-      background-color: #3c96f3;
149
-      color: white;
158
+  .header-section {
159
+    padding: 15px 15px 45px 15px;
160
+    background-color: #3c96f3;
161
+    color: white;
150 162
 
151
-      .login-tip {
152
-        font-size: 18px;
153
-        margin-left: 10px;
154
-      }
163
+    .login-tip {
164
+      font-size: 18px;
165
+      margin-left: 10px;
166
+    }
155 167
 
156
-      .cu-avatar {
157
-        border: 2px solid #eaeaea;
168
+    .cu-avatar {
169
+      border: 2px solid #eaeaea;
158 170
 
159
-        .icon {
160
-          font-size: 40px;
161
-        }
171
+      .icon {
172
+        font-size: 40px;
162 173
       }
174
+    }
163 175
 
164
-      .user-info {
165
-        margin-left: 15px;
176
+    .user-info {
177
+      margin-left: 15px;
166 178
 
167
-        .u_title {
168
-          font-size: 18px;
169
-          line-height: 30px;
170
-        }
179
+      .u_title {
180
+        font-size: 18px;
181
+        line-height: 30px;
171 182
       }
172 183
     }
184
+  }
185
+
186
+  .content-section {
187
+    position: relative;
188
+    top: -50px;
189
+
190
+    .mine-actions {
191
+      margin: 15px 15px;
192
+      padding: 20px 0px;
193
+      border-radius: 8px;
194
+      background-color: white;
195
+
196
+      .action-item {
197
+        .icon {
198
+          font-size: 28px;
199
+        }
173 200
 
174
-    .content-section {
175
-      position: relative;
176
-      top: -50px;
177
-
178
-      .mine-actions {
179
-        margin: 15px 15px;
180
-        padding: 20px 0px;
181
-        border-radius: 8px;
182
-        background-color: white;
183
-
184
-        .action-item {
185
-          .icon {
186
-            font-size: 28px;
187
-          }
188
-
189
-          .text {
190
-            display: block;
191
-            font-size: 13px;
192
-            margin: 8px 0px;
193
-          }
201
+        .text {
202
+          display: block;
203
+          font-size: 13px;
204
+          margin: 8px 0px;
194 205
         }
195 206
       }
196 207
     }
197 208
   }
209
+}
198 210
 </style>

+ 2
- 2
oa-ui-app/pages/mine/setting/index.vue Wyświetl plik

@@ -20,13 +20,13 @@
20 20
         </view>
21 21
       </view>
22 22
     </view>
23
-    <view class="cu-list menu">
23
+    <!-- <view class="cu-list menu">
24 24
       <view class="cu-item item-box">
25 25
         <view class="content text-center" @click="handleLogout">
26 26
           <text class="text-black">退出登录</text>
27 27
         </view>
28 28
       </view>
29
-    </view>
29
+    </view> -->
30 30
   </view>
31 31
 </template>
32 32
 

+ 159
- 0
oa-ui-app/pages/oa/borrow/borrowList.vue Wyświetl plik

@@ -0,0 +1,159 @@
1
+<template>
2
+  <view class="container">
3
+    <uv-tabs :list="tabList" @click="clickTab"></uv-tabs>
4
+    <view>
5
+      
6
+    </view>
7
+  </view>
8
+</template>
9
+
10
+<script>
11
+
12
+export default {
13
+  data() {
14
+    return {
15
+      tabList: [{
16
+        name: '项目借款',
17
+      }, {
18
+        name: '非项目借款',
19
+      }, {
20
+        name: '工会借款'
21
+      }, {
22
+        name: '党委借款'
23
+      }, {
24
+        name: '团委借款'
25
+      }],
26
+      selectedTab: '项目借款',
27
+      isSearchExpanded: false,
28
+      queryParams: {
29
+        projectId: '',
30
+        applier: '',
31
+        borrowUsage: ''
32
+      },
33
+      borrowUsageList: [
34
+        {
35
+          value: '0',
36
+          text: '项目借款'
37
+        },
38
+        {
39
+          value: '1',
40
+          text: '非项目借款'
41
+        },
42
+        {
43
+          value: '2',
44
+          text: '工会借款'
45
+        },
46
+        {
47
+          value: '3',
48
+          text: '党委借款'
49
+        },
50
+        {
51
+          value: '4',
52
+          text: '团委借款'
53
+        }
54
+      ],
55
+      selectedBorrowUsage: '项目借款'
56
+    }
57
+  },
58
+  methods: {
59
+    toggleSearch() {
60
+      this.isSearchExpanded = !this.isSearchExpanded;
61
+    },
62
+    handleQuery() {
63
+      console.log(this.queryParams);
64
+    },
65
+    resetQuery() {
66
+      this.queryParams = {
67
+        projectNumber: '',
68
+        projectName: '',
69
+        leader: '',
70
+        dept: ''
71
+      };
72
+    },
73
+    handleBorrowUsageChange(e) {
74
+      this.selectedBorrowUsage = this.borrowUsageList[e.target.value].text;
75
+    },
76
+    clickTab(obj) {
77
+      console.log(obj);
78
+      let index = obj.index;
79
+      this.selectedTab = this.tabList[index].name;
80
+    }
81
+  }
82
+}
83
+</script>
84
+
85
+<style lang="scss" scoped>
86
+.container {
87
+  padding: 20rpx;
88
+  background-color: #f5f5f5;
89
+  height: 100vh;
90
+  display: flex;
91
+  flex-direction: column;
92
+}
93
+
94
+.search-box {
95
+  background-color: #fff;
96
+  border-radius: 8rpx;
97
+  margin-bottom: 20rpx;
98
+  overflow: hidden;
99
+}
100
+
101
+.search-header {
102
+  padding: 20rpx;
103
+  display: flex;
104
+  justify-content: space-between;
105
+  align-items: center;
106
+  border-bottom: 1px solid #ebeef5;
107
+}
108
+
109
+.search-title {
110
+  font-size: 32rpx;
111
+  font-weight: bold;
112
+  color: #333;
113
+}
114
+
115
+.search-icon {
116
+  font-size: 28rpx;
117
+  color: #909399;
118
+}
119
+
120
+.search-content {
121
+  padding: 20rpx;
122
+}
123
+
124
+.search-item {
125
+  margin-bottom: 20rpx;
126
+}
127
+
128
+.search-item text {
129
+  display: block;
130
+  margin-bottom: 10rpx;
131
+  font-size: 28rpx;
132
+  color: #333;
133
+}
134
+
135
+.search-item input,
136
+.search-item .picker {
137
+  width: 100%;
138
+  height: 80rpx;
139
+  padding: 0 20rpx;
140
+  border: 1px solid #dcdfe6;
141
+  border-radius: 4rpx;
142
+  box-sizing: border-box;
143
+}
144
+
145
+.search-item .picker {
146
+  line-height: 80rpx;
147
+  color: #606266;
148
+}
149
+
150
+.search-buttons {
151
+  display: flex;
152
+  gap: 20rpx;
153
+  margin-top: 20rpx;
154
+}
155
+
156
+.search-buttons button {
157
+  flex: 1;
158
+}
159
+</style>

+ 35
- 0
oa-ui-app/pages/oa/budget/budgetInfo.vue Wyświetl plik

@@ -0,0 +1,35 @@
1
+<template>
2
+  <div>
3
+    <view class="section">
4
+      <view class="section-title">
5
+        <view class="line"></view>
6
+        <text>项目预算表</text>
7
+      </view>
8
+    </view>
9
+  </div>
10
+</template>
11
+
12
+<script>
13
+  export default {
14
+    data() {
15
+      return {
16
+        budgetList: [],
17
+        budgetTotal: 0,
18
+        budgetPage: 1,
19
+        budgetLimit: 10
20
+      }
21
+    },
22
+    created() {
23
+      this.getBudgetList()
24
+    },
25
+    methods: {
26
+      getBudgetList() {
27
+        
28
+      }
29
+    }
30
+  }
31
+</script>
32
+
33
+<style lang="scss" scoped>
34
+
35
+</style>

+ 14
- 35
oa-ui-app/pages/project/projectInfo.vue Wyświetl plik

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-05-26 10:44:29
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-27 10:10:16
5
+ * @LastEditTime: 2025-05-30 15:05:07
6 6
 -->
7 7
 <template>
8 8
   <view class="container">
@@ -153,8 +153,7 @@
153 153
           <view class="info-item full-width">
154 154
             <text class="label">项目预算编制</text>
155 155
             <view class="value">
156
-              <text class="link" @click="openBudget = true" v-if="isProjectLeader">项目预算表</text>
157
-              <text class="link" @click="openBudget = true" v-else-if="hasPermi(['oa:allproject:query'])">项目预算表</text>
156
+              <text class="link" @click="openBudgetFn" v-if="isProjectLeader">项目预算表</text>
158 157
             </view>
159 158
           </view>
160 159
         </view>
@@ -179,10 +178,10 @@
179 178
             <text class="label">质量检查员</text>
180 179
             <text class="value">{{ project.qualityInspectorName }}</text>
181 180
           </view>
182
-          <view class="info-item">
181
+          <!-- <view class="info-item">
183 182
             <text class="label">技术方案设计</text>
184 183
             <text class="value link" @click="openPlan = true">技术方案审批表</text>
185
-          </view>
184
+          </view> -->
186 185
         </view>
187 186
       </view>
188 187
 
@@ -231,7 +230,7 @@
231 230
           <text>项目生产情况</text>
232 231
         </view>
233 232
         <view class="info-list">
234
-          <view class="info-item full-width">
233
+          <!-- <view class="info-item full-width">
235 234
             <text class="label" style="width:200rpx">安全交底记录表</text>
236 235
             <view class="value">
237 236
               <text class="link" @click="openSafe = true">安全交底记录表</text>
@@ -244,7 +243,7 @@
244 243
               <text class="link" @click="openTech = true">技术交底记录表</text>
245 244
               <button class="btn-small" @click="handleUrge('2')" v-if="isSend">发送企业微信消息提醒相关人员</button>
246 245
             </view>
247
-          </view>
246
+          </view> -->
248 247
           <view class="info-item full-width">
249 248
             <text class="label">申请设备</text>
250 249
             <view class="value">
@@ -399,7 +398,6 @@ export default {
399 398
       actualList: [],
400 399
       contractCode: "",
401 400
       contractNumber: "",
402
-      openBudget: false,
403 401
       openPlan: false,
404 402
       openSafe: false,
405 403
       openTech: false,
@@ -464,7 +462,7 @@ export default {
464 462
       const res = await getProject(projectId)
465 463
       if (res.data) {
466 464
         this.project = res.data;
467
-        if (this.project.projectLeader == this.$store.state.user.id) {
465
+        if (this.project.projectLeader == this.$store.getters.userId) {
468 466
           this.isProjectLeader = true;
469 467
         }
470 468
         let deptArr = [];
@@ -503,7 +501,6 @@ export default {
503 501
             return res.data.nickName
504 502
           }))
505 503
         }
506
-        console.log(this.devices, this.cars, this.drivers, this.participates)
507 504
         this.getManagerList();
508 505
       }
509 506
     },
@@ -685,30 +682,6 @@ export default {
685 682
       uni.navigateBack();
686 683
     },
687 684
 
688
-    // 预览文档
689
-    reviewWord(url) {
690
-      uni.navigateTo({
691
-        url: '/pages/preview/preview?url=' + encodeURIComponent(url)
692
-      });
693
-    },
694
-
695
-    // 下载文件
696
-    downloadFile(url) {
697
-      uni.downloadFile({
698
-        url: url,
699
-        success: (res) => {
700
-          if (res.statusCode === 200) {
701
-            uni.openDocument({
702
-              filePath: res.tempFilePath,
703
-              success: function () {
704
-                console.log('打开文档成功');
705
-              }
706
-            });
707
-          }
708
-        }
709
-      });
710
-    },
711
-
712 685
     // 处理设备选择变化
713 686
     onDeviceChange(e) {
714 687
       this.devices = e.detail.value;
@@ -798,6 +771,11 @@ export default {
798 771
       return pattern.replace('{y}', year)
799 772
         .replace('{m}', month.toString().padStart(2, '0'))
800 773
         .replace('{d}', day.toString().padStart(2, '0'));
774
+    },
775
+    openBudgetFn() {
776
+      uni.navigateTo({
777
+        url: '/pages/form/budget/budgetInfo?projectId=' + this.project.projectId
778
+      })
801 779
     }
802 780
   }
803 781
 }
@@ -1027,7 +1005,8 @@ export default {
1027 1005
   word-break: break-all;
1028 1006
   padding-left: 10rpx;
1029 1007
 }
1030
-.device-item{
1008
+
1009
+.device-item {
1031 1010
   border-bottom: 1px solid #e2e2e2;
1032 1011
   padding: 10rpx;
1033 1012
 }

+ 15
- 6
oa-ui-app/pages/work/index.vue Wyświetl plik

@@ -14,13 +14,19 @@
14 14
     <!-- 宫格组件 -->
15 15
     <uni-section title="常用操作" type="line"></uni-section>
16 16
     <view class="grid-body">
17
-      <uni-grid :column="4" :showBorder="false" @change="openSendFlow">
17
+      <uni-grid :column="4" :showBorder="false">
18 18
         <uni-grid-item>
19
-          <view class="grid-item-box">
20
-            <uni-icons type="paperplane-filled" size="30" color="#2979ff"></uni-icons>
19
+          <view class="grid-item-box" @click="openSendFlow">
20
+            <u-image :fade="false" src="@/static/images/work/sendFlow.png" width="40px" height="40px"></u-image>
21 21
             <text class="text">发起流程</text>
22 22
           </view>
23 23
         </uni-grid-item>
24
+        <!-- <uni-grid-item>
25
+          <view class="grid-item-box" @click="openBorrow">
26
+            <u-image :fade="false" src="@/static/images/work/borrow.png" width="40px" height="40px"></u-image>
27
+            <text class="text">借款管理</text>
28
+          </view>
29
+        </uni-grid-item> -->
24 30
       </uni-grid>
25 31
       <!-- <uni-grid :column="4" :showBorder="false" @change="changeGrid">
26 32
         <uni-grid-item>
@@ -82,7 +88,7 @@
82 88
 
83 89
     <uv-popup ref="popup" mode="bottom">
84 90
       <view class="bottom-popup">
85
-        <view v-for="item,index in sendFlowList" :key="index">
91
+        <view v-for="item, index in sendFlowList" :key="index">
86 92
           <u-button @click="sendFlow(item)">{{ item.name }}</u-button>
87 93
         </view>
88 94
       </view>
@@ -147,6 +153,11 @@ export default {
147 153
     openSendFlow() {
148 154
       this.$refs.popup.open();
149 155
     },
156
+    openBorrow() {
157
+      uni.navigateTo({
158
+        url: '/pages/oa/borrow/borrowList'
159
+      })
160
+    },
150 161
     sendFlow(row) {
151 162
       let formId = new Snowflake(1n, 1n, 0n).nextId().toString();
152 163
       getNextFlowNodeByStart({ deploymentId: row.deploymentId, variables: { formId: formId } }).then(res => {
@@ -287,7 +298,5 @@ view {
287 298
   margin-bottom: 65px;
288 299
   padding: 10px;
289 300
   text-align: center;
290
-
291
-  .popup-item {}
292 301
 }
293 302
 </style>

BIN
oa-ui-app/static/images/work/borrow.png Wyświetl plik


BIN
oa-ui-app/static/images/work/sendFlow.png Wyświetl plik


BIN
oa-ui-app/static/images/work/user.png Wyświetl plik


+ 1
- 1
oa-ui-app/static/scss/colorui.css Wyświetl plik

@@ -11,7 +11,7 @@
11 11
         初始化
12 12
  ==================== */
13 13
 body {
14
-	background-color: #f1f1f1;
14
+	background-color: #ffffff;
15 15
 	font-size: 28upx;
16 16
 	color: #333333;
17 17
 	font-family: Helvetica Neue, Helvetica, sans-serif;

+ 0
- 1
oa-ui-app/utils/deleteResource.js Wyświetl plik

@@ -169,7 +169,6 @@ export async function deleteResources(procDefName, id) {
169 169
     // 替换URL中的:id占位符  
170 170
     const url = apiUrl.replace(':id', id);
171 171
     // 发送DELETE请求并返回Promise  
172
-    console.log(request.delete);
173 172
     return request({
174 173
       url: url,
175 174
       method: 'delete'

Ładowanie…
Anuluj
Zapisz