Procházet zdrojové kódy

修改设备申请

余思翰 před 10 měsíci
rodič
revize
00a4c986cd

+ 4
- 1
oa-ui/src/views/flowable/form/budget/components/chooseDevice.vue Zobrazit soubor

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-03-27 11:10:26
3
  * @Date: 2024-03-27 11:10:26
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-06-11 10:54:16
5
+ * @LastEditTime: 2024-07-15 17:35:10
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div>
8
   <div>
26
       <el-form-item label="品牌:">
26
       <el-form-item label="品牌:">
27
         <el-input v-model="queryParams.brand" clearable @keyup.enter.native="getList"></el-input>
27
         <el-input v-model="queryParams.brand" clearable @keyup.enter.native="getList"></el-input>
28
       </el-form-item>
28
       </el-form-item>
29
+      <el-form-item label="出厂编号:">
30
+        <el-input v-model="queryParams.code" clearable @keyup.enter.native="getList"></el-input>
31
+      </el-form-item>
29
       <el-form-item>
32
       <el-form-item>
30
         <el-button @click="getList" type="primary">搜索</el-button>
33
         <el-button @click="getList" type="primary">搜索</el-button>
31
       </el-form-item>
34
       </el-form-item>

+ 49
- 20
oa-ui/src/views/flowable/form/oa/deviceForm.vue Zobrazit soubor

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-03-07 13:44:39
3
  * @Date: 2024-03-07 13:44:39
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-06-21 16:50:43
5
+ * @LastEditTime: 2024-07-15 17:54:16
6
 -->
6
 -->
7
 
7
 
8
 <template>
8
 <template>
61
                 </el-descriptions>
61
                 </el-descriptions>
62
               </el-form-item>
62
               </el-form-item>
63
               <el-form-item label="设备选择:">
63
               <el-form-item label="设备选择:">
64
-                <el-select style="width: 90%;" v-model="form.devices" filterable multiple placeholder="请选择" clearable
64
+                <!-- <el-select style="width: 90%;" v-model="form.devices" filterable multiple placeholder="请选择" clearable
65
                   disabled>
65
                   disabled>
66
                   <el-option v-for="item in deviceList" :key="item.deviceId" :disabled="item.status != 1" :label="item.name + '【' + (item.brand != null ? item.brand : '') + (item.series != null ? '-' + item.series + '】' : '')
66
                   <el-option v-for="item in deviceList" :key="item.deviceId" :disabled="item.status != 1" :label="item.name + '【' + (item.brand != null ? item.brand : '') + (item.series != null ? '-' + item.series + '】' : '')
67
-      + (item.code != null ? '(设备编号:' + item.code + ')' : '') + '📍' + item.place" :value="item.deviceId">
67
+      + (item.code != null ? '(设备编号:' + item.code + ')' : '')" :value="item.deviceId">
68
                   </el-option>
68
                   </el-option>
69
-                </el-select>
69
+                </el-select> -->
70
                 <el-button type="primary" icon="el-icon-plus" size="mini" @click="openDevice = true"
70
                 <el-button type="primary" icon="el-icon-plus" size="mini" @click="openDevice = true"
71
                   :disabled="taskName != '设备申请'">选择设备</el-button>
71
                   :disabled="taskName != '设备申请'">选择设备</el-button>
72
+                <el-table :data="deviceList">
73
+                  <el-table-column label="序号" type="index" />
74
+                  <el-table-column label="设备品牌" align="center" prop="brand" />
75
+                  <el-table-column label="设备名称" align="center" prop="name" />
76
+                  <el-table-column label="规格型号" align="center" prop="series" />
77
+                  <el-table-column label="出厂编号" align="center" prop="code" />
78
+                  <el-table-column label="存放地址" align="center" prop="place" />
79
+                </el-table>
72
               </el-form-item>
80
               </el-form-item>
73
               <el-form-item label="申领事由:" prop="applyReason">
81
               <el-form-item label="申领事由:" prop="applyReason">
74
                 <el-input type="textarea" :rows="3" placeholder="请输入申领事由" v-model="form.applyReason"
82
                 <el-input type="textarea" :rows="3" placeholder="请输入申领事由" v-model="form.applyReason"
99
               <!-- 安排设备意见 -->
107
               <!-- 安排设备意见 -->
100
               <el-divider></el-divider>
108
               <el-divider></el-divider>
101
               <el-form-item label-width="120px" label="拟发放设备:">
109
               <el-form-item label-width="120px" label="拟发放设备:">
102
-                <el-select style="width: 90%;" v-model="form.modifyDevices" filterable multiple placeholder="请选择"
110
+                <!-- <el-select style="width: 90%;" v-model="form.modifyDevices" filterable multiple placeholder="请选择"
103
                   clearable disabled>
111
                   clearable disabled>
104
                   <el-option v-for="item in deviceList" :key="item.deviceId" :disabled="item.status != 1" :label="item.name + '【' + (item.brand != null ? item.brand : '') + (item.series != null ? '-' + item.series + '】' : '')
112
                   <el-option v-for="item in deviceList" :key="item.deviceId" :disabled="item.status != 1" :label="item.name + '【' + (item.brand != null ? item.brand : '') + (item.series != null ? '-' + item.series + '】' : '')
105
       + (item.code != null ? '(设备编号:' + item.code + ')' : '') + '📍' + item.place" :value="item.deviceId">
113
       + (item.code != null ? '(设备编号:' + item.code + ')' : '') + '📍' + item.place" :value="item.deviceId">
106
                   </el-option>
114
                   </el-option>
107
-                </el-select>
115
+                </el-select> -->
108
                 <el-button type="primary" icon="el-icon-plus" size="mini" @click="openDevice = true"
116
                 <el-button type="primary" icon="el-icon-plus" size="mini" @click="openDevice = true"
109
                   :disabled="taskName != '安排设备'">选择设备</el-button>
117
                   :disabled="taskName != '安排设备'">选择设备</el-button>
118
+                <el-table :data="modifyDeviceList">
119
+                  <el-table-column label="序号" type="index" />
120
+                  <el-table-column label="设备品牌" align="center" prop="brand" />
121
+                  <el-table-column label="设备名称" align="center" prop="name" />
122
+                  <el-table-column label="规格型号" align="center" prop="series" />
123
+                  <el-table-column label="出厂编号" align="center" prop="code" />
124
+                  <el-table-column label="存放地址" align="center" prop="place" />
125
+                </el-table>
110
               </el-form-item>
126
               </el-form-item>
111
               <el-form-item label="安排设备意见:" prop="dispatchComment" label-width="125px">
127
               <el-form-item label="安排设备意见:" prop="dispatchComment" label-width="125px">
112
                 <el-input type="textarea" :rows="3" placeholder="请输入安排设备意见" v-model="form.dispatchComment"
128
                 <el-input type="textarea" :rows="3" placeholder="请输入安排设备意见" v-model="form.dispatchComment"
115
               </el-form-item>
131
               </el-form-item>
116
               <el-row>
132
               <el-row>
117
                 <el-col :span="6" :xs="24" :offset="12">
133
                 <el-col :span="6" :xs="24" :offset="12">
118
-                  <el-form-item label="签名:" label-width="120px"
119
-                    v-if="taskName != '设备申请'">
134
+                  <el-form-item label="签名:" label-width="120px" v-if="taskName != '设备申请'">
120
                     <span class="auditor"> {{ form.dispatchUser ? form.dispatchUser.nickName : dispatchUser }} </span>
135
                     <span class="auditor"> {{ form.dispatchUser ? form.dispatchUser.nickName : dispatchUser }} </span>
121
                   </el-form-item>
136
                   </el-form-item>
122
                 </el-col>
137
                 </el-col>
123
                 <el-col :span="6">
138
                 <el-col :span="6">
124
-                  <el-form-item label="日期:" label-width="120px"
125
-                    v-if="taskName != '设备申请'">
139
+                  <el-form-item label="日期:" label-width="120px" v-if="taskName != '设备申请'">
126
                     <span> {{ form.dispatchTime ? form.dispatchTime : dispatchTime }} </span>
140
                     <span> {{ form.dispatchTime ? form.dispatchTime : dispatchTime }} </span>
127
                   </el-form-item>
141
                   </el-form-item>
128
                 </el-col>
142
                 </el-col>
232
       default: true
246
       default: true
233
     }
247
     }
234
   },
248
   },
249
+  watch: {
250
+    'taskForm.formId'() {
251
+      this.initForm();
252
+    }
253
+  },
235
   created() {
254
   created() {
236
     if (this.taskName == '分管审核') {
255
     if (this.taskName == '分管审核') {
237
       this.managerUser = this.$store.getters.name;
256
       this.managerUser = this.$store.getters.name;
244
     this.form.user.nickName = this.$store.getters.name;
263
     this.form.user.nickName = this.$store.getters.name;
245
     this.form.dept.deptName = this.$store.getters.deptName;
264
     this.form.dept.deptName = this.$store.getters.deptName;
246
     this.getProjectList();
265
     this.getProjectList();
247
-    this.getDeviceList();
248
-    if(this.flowDisabled)
249
-    flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
250
-      this.flowData = res.data;
251
-    })
266
+    // this.getDeviceList();
267
+    if (this.flowDisabled)
268
+      flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
269
+        this.flowData = res.data;
270
+      })
252
   },
271
   },
253
   data() {
272
   data() {
254
     return {
273
     return {
277
       rules: {
296
       rules: {
278
       },
297
       },
279
       deviceList: [],
298
       deviceList: [],
299
+      grantDeviceList: [],
280
       modifyDeviceList: [],
300
       modifyDeviceList: [],
281
       formTotal: 0
301
       formTotal: 0
282
     }
302
     }
339
           } else {
359
           } else {
340
             data.devices = data.devices.split(',');
360
             data.devices = data.devices.split(',');
341
             let arr = []
361
             let arr = []
362
+            this.deviceList = []
342
             for (let d of data.devices) {
363
             for (let d of data.devices) {
343
-              arr.push(parseInt(d))
364
+              arr.push(parseInt(d));
365
+              getDevice(d).then(result => {
366
+                this.deviceList.push(result.data);
367
+              })
344
             }
368
             }
345
             data.devices = arr;
369
             data.devices = arr;
346
           }
370
           }
416
         });
440
         });
417
       } else if (this.taskName == '安排设备') {
441
       } else if (this.taskName == '安排设备') {
418
         getUsersManageLeader({ userId: this.form.applier }).then(res => {
442
         getUsersManageLeader({ userId: this.form.applier }).then(res => {
419
-          let userId = res.data.userId;
420
-          this.$set(this.taskForm.variables, "approval", userId);
443
+          let userId = [];
444
+          console.log(res);
445
+          res.data.forEach(user => {
446
+            userId.push(user.userId)
447
+          })
448
+          this.$set(this.taskForm.variables, "approvalList", userId);
421
           complete(this.taskForm).then(response => {
449
           complete(this.taskForm).then(response => {
422
             this.$modal.msgSuccess(response.msg);
450
             this.$modal.msgSuccess(response.msg);
423
             this.$emit('goBack')
451
             this.$emit('goBack')
524
         for (let v of val) {
552
         for (let v of val) {
525
           list.push(v.deviceId)
553
           list.push(v.deviceId)
526
         }
554
         }
527
-
528
         if (this.taskName == '设备申请') {
555
         if (this.taskName == '设备申请') {
529
           this.form.devices = list
556
           this.form.devices = list
557
+          this.deviceList = val;
530
         } else if (this.taskName == '安排设备') {
558
         } else if (this.taskName == '安排设备') {
531
           this.form.modifyDevices = list
559
           this.form.modifyDevices = list
560
+          this.modifyDeviceList = val;
532
         }
561
         }
533
       }
562
       }
534
       this.openDevice = false;
563
       this.openDevice = false;
539
 
568
 
540
 <style lang="scss" scoped>
569
 <style lang="scss" scoped>
541
 @import "@/assets/styles/element-reset.scss";
570
 @import "@/assets/styles/element-reset.scss";
571
+
542
 ::v-deep .el-input.is-disabled .el-input__inner {
572
 ::v-deep .el-input.is-disabled .el-input__inner {
543
   color: #121212 !important;
573
   color: #121212 !important;
544
 }
574
 }
546
 ::v-deep .el-textarea.is-disabled .el-textarea__inner {
576
 ::v-deep .el-textarea.is-disabled .el-textarea__inner {
547
   color: #121212 !important;
577
   color: #121212 !important;
548
 }
578
 }
549
-
550
 </style>
579
 </style>

Loading…
Zrušit
Uložit