Pārlūkot izejas kodu

Merge branch 'master' of http://oa.sccehui.com:6101/cmc-coding/cmc-oa

余思翰 1 gadu atpakaļ
vecāks
revīzija
36ae7cc3d3

+ 1
- 7
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceApprovalController.java Parādīt failu

@@ -96,7 +96,6 @@ public class CmcDeviceApprovalController extends BaseController
96 96
         cmcDeviceApproval.setBeginDate(formDataJson.getDate("beginDate"));
97 97
         cmcDeviceApproval.setEndDate(formDataJson.getDate("endDate"));
98 98
         cmcDeviceApproval.setDays(formDataJson.getLong("days"));
99
-        cmcDeviceApproval.setState("0");
100 99
         if (formDataJson.getJSONArray("devices").size() > 0) {
101 100
             String deviceString = formDataJson.getString("devices").substring(1, formDataJson.getString("devices").length() - 1);
102 101
             cmcDeviceApproval.setDevices(deviceString);
@@ -104,8 +103,6 @@ public class CmcDeviceApprovalController extends BaseController
104 103
             BigDecimal estimateCost = new BigDecimal(0);
105 104
             for (String device : devices) {
106 105
                 CmcDevice cmcDevice = cmcDeviceService.selectCmcDeviceByDeviceId(Integer.parseInt(device));
107
-                cmcDevice.setStatus("0");
108
-                cmcDeviceService.updateCmcDevice(cmcDevice);
109 106
                 if (cmcDevice.getDayCost() != null)
110 107
                     estimateCost = estimateCost.add(cmcDevice.getDayCost().multiply(new BigDecimal(cmcDeviceApproval.getDays())));
111 108
             }
@@ -140,7 +137,6 @@ public class CmcDeviceApprovalController extends BaseController
140 137
             cmcDeviceApproval.setManagerTime(new Date());
141 138
         }
142 139
         if (formDataJson.getDate("confirmDate") != null) {
143
-            cmcDeviceApproval.setState("1");
144 140
             cmcDeviceApproval.setConfirmDate(formDataJson.getDate("confirmDate"));
145 141
         }
146 142
         if (formDataJson.getDate("returnDate") != null) {
@@ -156,13 +152,11 @@ public class CmcDeviceApprovalController extends BaseController
156 152
         if (formDataJson.getJSONArray("modifyDevices").size() > 0) {
157 153
             cmcDeviceApproval.setDispatcher(getLoginUser().getUserId());
158 154
             String deviceString = formDataJson.getString("modifyDevices").substring(1, formDataJson.getString("modifyDevices").length() - 1);
159
-            cmcDeviceApproval.setDevices(deviceString);
155
+            cmcDeviceApproval.setModifyDevices(deviceString);
160 156
             String[] devices = deviceString.split(",");
161 157
             BigDecimal estimateCost = new BigDecimal(0);
162 158
             for (String device : devices) {
163 159
                 CmcDevice cmcDevice = cmcDeviceService.selectCmcDeviceByDeviceId(Integer.parseInt(device));
164
-                cmcDevice.setStatus("1");
165
-                cmcDeviceService.updateCmcDevice(cmcDevice);
166 160
                 if (cmcDevice.getDayCost() != null)
167 161
                     estimateCost = estimateCost.add(cmcDevice.getDayCost().multiply(new BigDecimal(cmcDeviceApproval.getDays())));
168 162
             }

+ 6
- 7
oa-ui/src/views/flowable/form/oa/deviceForm.vue Parādīt failu

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-07 13:44:39
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-05-23 15:53:29
5
+ * @LastEditTime: 2024-05-23 17:35:16
6 6
 -->
7 7
 
8 8
 <template>
@@ -61,7 +61,7 @@
61 61
               <el-form-item label="设备选择:">
62 62
                 <el-select style="width: 100%;" v-model="form.devices" filterable multiple placeholder="请选择"
63 63
                   clearable :disabled="taskName != '设备申请'">
64
-                  <el-option v-for="item in deviceList" :key="item.deviceId" 
64
+                  <el-option v-for="item in deviceList" :key="item.deviceId" :disabled="item.status == null || item.status != 1"
65 65
                     :label="item.name +'【' +  (item.brand != null ? item.brand : '') + (item.series != null ? '-' + item.series  + '】': '')
66 66
                      + (item.code != null ? '(设备编号:' + item.code + ')' : '') + '📍' + item.place"  :value="item.deviceId">
67 67
                   </el-option>
@@ -98,7 +98,7 @@
98 98
               <el-form-item label-width="120px" label="拟发放设备:">
99 99
                 <el-select style="width: 100%;" v-model="form.modifyDevices" filterable multiple placeholder="请选择"
100 100
                   clearable :disabled="taskName != '安排设备'">
101
-                  <el-option v-for="item in deviceList" :key="item.deviceId" 
101
+                  <el-option v-for="item in deviceList" :key="item.deviceId" :disabled="item.status == null || item.status != 1"
102 102
                     :label="item.name +'【' +  (item.brand != null ? item.brand : '') + (item.series != null ? '-' + item.series  + '】': '')
103 103
                      + (item.code != null ? '(设备编号:' + item.code + ')' : '') + '📍' + item.place"  :value="item.deviceId">
104 104
                   </el-option>
@@ -146,8 +146,8 @@
146 146
               <el-divider></el-divider>
147 147
               <el-form-item label="设备状况:" prop="state" label-width="120px">                
148 148
                 <el-radio-group v-model="form.state" size="small" :disabled="taskName != '归还确认'">
149
-                  <el-radio label="2">完好</el-radio>
150
-                  <el-radio label="3">需维修</el-radio>
149
+                  <el-radio label="0">完好</el-radio>
150
+                  <el-radio label="1">需维修</el-radio>
151 151
                 </el-radio-group>
152 152
               </el-form-item>
153 153
               <el-form-item label="备注:" prop="remark" label-width="120px">
@@ -412,7 +412,6 @@ export default {
412 412
     // 获取设备列表
413 413
     getDeviceList() {
414 414
       listDevice({
415
-        status: "1",
416 415
         pageNum: 1,
417 416
         pageSize: 99999999,
418 417
         type: '仪器设备'
@@ -447,7 +446,7 @@ export default {
447 446
     showFormItem(name) {
448 447
       let isShow = false;
449 448
       if (name == '分管审核')
450
-        isShow = (this.taskName == '设备申请' || this.taskName == '部门审核' || this.taskName == '分管审核') || ((this.taskName == '安排设备' || this.taskName == '申请确认' || this.taskName == '归还确认') && this.form.managerUserId != null);
449
+        isShow = (this.taskName == '设备申请' || this.taskName == '安排设备' || this.taskName == '分管审核') || ((this.taskName == '申请确认' || this.taskName == '归还确认') && this.form.managerUserId != null);
451 450
       else if (name == '分管审核签名')
452 451
         isShow = this.taskName == '分管审核' || ((this.taskName == '安排设备' || this.taskName == '申请确认' || this.taskName == '归还确认') && this.form.managerUserId != null);
453 452
       return isShow;

+ 2
- 15
oa-ui/src/views/oa/device/detail.vue Parādīt failu

@@ -208,7 +208,6 @@
208 208
             <el-table-column label="设备状况" align="center" prop="state">
209 209
               <template slot-scope="scope">
210 210
                 <el-tag :type="stateTypeStyle(scope.row.state)">{{ stateTypeText(scope.row.state) }}</el-tag>
211
-                {{ scope.row.state ? (scope.row.state == '0' ? '完好' : '需维修') : '使用中' }}
212 211
               </template>
213 212
             </el-table-column>
214 213
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -473,29 +472,17 @@ export default {
473 472
     },
474 473
     stateTypeText(row) {
475 474
       if (row == '0') {
476
-        return '申领中'
477
-      }
478
-      if (row == '1') {
479
-        return '被领取'
480
-      }
481
-      if (row == '2') {
482 475
         return '完好'
483 476
       }
484
-      if (row == '3') {
477
+      if (row == '1') {
485 478
         return '需维修'
486 479
       }
487 480
     },
488 481
     stateTypeStyle(row) {
489 482
       if (row == '0') {
490
-        return 'primary'
491
-      }
492
-      if (row == '1') {
493
-        return 'warning'
494
-      }
495
-      if (row == '2') {
496 483
         return 'success'
497 484
       }
498
-      if (row == '3') {
485
+      if (row == '1') {
499 486
         return 'danger'
500 487
       }
501 488
     }

Notiek ielāde…
Atcelt
Saglabāt