Explorar el Código

修改生产考核表选项的值不能传递的问题

余思翰 hace 1 año
padre
commit
6ccf5895b8

+ 2
- 3
oa-ui/src/views/flowable/form/cwForm.vue Ver fichero

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-01-19 16:29:01
3
  * @Date: 2024-01-19 16:29:01
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-02-21 10:54:40
5
+ * @LastEditTime: 2024-02-23 09:48:28
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div>
8
   <div>
127
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
127
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
128
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
128
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
129
         tableForm.disabled = true;
129
         tableForm.disabled = true;
130
-        console.log(tableForm);
131
         let formData = new FormData();
130
         let formData = new FormData();
132
         let form = JSON.stringify(tableForm);
131
         let form = JSON.stringify(tableForm);
133
         formData.append("form", form);
132
         formData.append("form", form);
134
         submitAssess(formData).then(res => {
133
         submitAssess(formData).then(res => {
135
-        debugger
134
+        
136
           this.taskOpen = false;
135
           this.taskOpen = false;
137
           this.$emit('submit', tableForm);
136
           this.$emit('submit', tableForm);
138
         });
137
         });

+ 65
- 34
oa-ui/src/views/flowable/form/cwTable.vue Ver fichero

60
       </tr>
60
       </tr>
61
       <tr>
61
       <tr>
62
         <td class="table-title">入职年月</td>
62
         <td class="table-title">入职年月</td>
63
-        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate != null ? tableForm.entryDate.substring(0,10):tableForm.entryDate }}</td>
63
+        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate != null ?
64
+          tableForm.entryDate.substring(0, 10) : tableForm.entryDate }}</td>
64
         <td class="table-title">年龄</td>
65
         <td class="table-title">年龄</td>
65
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
66
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
66
       </tr>
67
       </tr>
89
         </td>
90
         </td>
90
         <td rowspan="8">
91
         <td rowspan="8">
91
           <el-radio-group v-model="tableForm.familiar01" :disabled="!isStaff">
92
           <el-radio-group v-model="tableForm.familiar01" :disabled="!isStaff">
92
-            <div><el-radio :label="0">生疏</el-radio></div>
93
-            <div><el-radio :label="2">熟练</el-radio></div>
94
-            <div><el-radio :label="3">精通</el-radio></div>
93
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar01',!isStaff)">生疏</el-radio></div>
94
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar01',!isStaff)">熟练</el-radio></div>
95
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar01',!isStaff)">精通</el-radio></div>
95
           </el-radio-group>
96
           </el-radio-group>
96
         </td>
97
         </td>
97
 
98
 
98
         <td rowspan="8">
99
         <td rowspan="8">
99
           <div v-if="!isStaff">{{ tableForm.remark01 }}</div>
100
           <div v-if="!isStaff">{{ tableForm.remark01 }}</div>
100
-          <el-input v-if="isStaff" v-model="tableForm.remark01"  type="textarea" :rows="4"></el-input>
101
+          <el-input v-if="isStaff" v-model="tableForm.remark01" type="textarea" :rows="4"></el-input>
101
         </td>
102
         </td>
102
         <td rowspan="8">
103
         <td rowspan="8">
103
           <el-radio-group v-model="tableForm.workload01" :disabled="!isPiLeader">
104
           <el-radio-group v-model="tableForm.workload01" :disabled="!isPiLeader">
194
         </td>
195
         </td>
195
         <td rowspan="3">
196
         <td rowspan="3">
196
           <el-radio-group v-model="tableForm.familiar02" :disabled="!isStaff">
197
           <el-radio-group v-model="tableForm.familiar02" :disabled="!isStaff">
197
-            <div><el-radio :label="0">生疏</el-radio></div>
198
-            <div><el-radio :label="2">熟练</el-radio></div>
199
-            <div><el-radio :label="3">精通</el-radio></div>
198
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar02',!isStaff)">生疏</el-radio></div>
199
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar02',!isStaff)">熟练</el-radio></div>
200
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar02',!isStaff)">精通</el-radio></div>
200
           </el-radio-group>
201
           </el-radio-group>
201
         </td>
202
         </td>
202
         <td rowspan="3">
203
         <td rowspan="3">
203
           <div v-if="!isStaff">{{ tableForm.remark02 }}</div>
204
           <div v-if="!isStaff">{{ tableForm.remark02 }}</div>
204
-          <el-input v-if="isStaff" v-model="tableForm.remark02"  type="textarea" :rows="4"></el-input>
205
+          <el-input v-if="isStaff" v-model="tableForm.remark02" type="textarea" :rows="4"></el-input>
205
         </td>
206
         </td>
206
         <td rowspan="3">
207
         <td rowspan="3">
207
           <el-radio-group v-model="tableForm.workload02" :disabled="!isPiLeader">
208
           <el-radio-group v-model="tableForm.workload02" :disabled="!isPiLeader">
257
         </td>
258
         </td>
258
         <td rowspan="7">
259
         <td rowspan="7">
259
           <el-radio-group v-model="tableForm.familiar03" :disabled="!isStaff">
260
           <el-radio-group v-model="tableForm.familiar03" :disabled="!isStaff">
260
-            <div><el-radio :label="0">生疏</el-radio></div>
261
-            <div><el-radio :label="2">熟练</el-radio></div>
262
-            <div><el-radio :label="3">精通</el-radio></div>
261
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar03',!isStaff)">生疏</el-radio></div>
262
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar03',!isStaff)">熟练</el-radio></div>
263
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar03',!isStaff)">精通</el-radio></div>
263
           </el-radio-group>
264
           </el-radio-group>
264
         </td>
265
         </td>
265
         <td rowspan="7">
266
         <td rowspan="7">
266
           <div v-if="!isStaff">{{ tableForm.remark03 }}</div>
267
           <div v-if="!isStaff">{{ tableForm.remark03 }}</div>
267
-          <el-input v-if="isStaff" v-model="tableForm.remark03"  type="textarea" :rows="4"></el-input>
268
+          <el-input v-if="isStaff" v-model="tableForm.remark03" type="textarea" :rows="4"></el-input>
268
         </td>
269
         </td>
269
         <td rowspan="7">
270
         <td rowspan="7">
270
           <el-radio-group v-model="tableForm.workload03" :disabled="!isPiLeader">
271
           <el-radio-group v-model="tableForm.workload03" :disabled="!isPiLeader">
350
         </td>
351
         </td>
351
         <td rowspan="8">
352
         <td rowspan="8">
352
           <el-radio-group v-model="tableForm.familiar04" :disabled="!isStaff">
353
           <el-radio-group v-model="tableForm.familiar04" :disabled="!isStaff">
353
-            <div><el-radio :label="0">生疏</el-radio></div>
354
-            <div><el-radio :label="2">熟练</el-radio></div>
355
-            <div><el-radio :label="3">精通</el-radio></div>
354
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar04',!isStaff)">生疏</el-radio></div>
355
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar04',!isStaff)">熟练</el-radio></div>
356
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar04',!isStaff)">精通</el-radio></div>
356
           </el-radio-group>
357
           </el-radio-group>
357
         </td>
358
         </td>
358
         <td rowspan="8">
359
         <td rowspan="8">
359
           <div v-if="!isStaff">{{ tableForm.remark04 }}</div>
360
           <div v-if="!isStaff">{{ tableForm.remark04 }}</div>
360
-          <el-input v-if="isStaff" v-model="tableForm.remark04"  type="textarea" :rows="4"></el-input>
361
+          <el-input v-if="isStaff" v-model="tableForm.remark04" type="textarea" :rows="4"></el-input>
361
         </td>
362
         </td>
362
         <td rowspan="8">
363
         <td rowspan="8">
363
           <el-radio-group v-model="tableForm.workload04" :disabled="!isPiLeader">
364
           <el-radio-group v-model="tableForm.workload04" :disabled="!isPiLeader">
451
         </td>
452
         </td>
452
         <td rowspan="3">
453
         <td rowspan="3">
453
           <el-radio-group v-model="tableForm.familiar05" :disabled="!isStaff">
454
           <el-radio-group v-model="tableForm.familiar05" :disabled="!isStaff">
454
-            <div><el-radio :label="0">生疏</el-radio></div>
455
-            <div><el-radio :label="2">熟练</el-radio></div>
456
-            <div><el-radio :label="3">精通</el-radio></div>
455
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(3, 'familiar05',!isStaff)">生疏</el-radio></div>
456
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(3, 'familiar05',!isStaff)">熟练</el-radio></div>
457
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar05',!isStaff)">精通</el-radio></div>
457
           </el-radio-group>
458
           </el-radio-group>
458
         </td>
459
         </td>
459
         <td rowspan="3">
460
         <td rowspan="3">
460
           <div v-if="!isStaff">{{ tableForm.remark05 }}</div>
461
           <div v-if="!isStaff">{{ tableForm.remark05 }}</div>
461
-          <el-input v-if="isStaff" v-model="tableForm.remark05"  type="textarea" :rows="4"></el-input>
462
+          <el-input v-if="isStaff" v-model="tableForm.remark05" type="textarea" :rows="4"></el-input>
462
         </td>
463
         </td>
463
         <td rowspan="3">
464
         <td rowspan="3">
464
           <el-radio-group v-model="tableForm.workload05" :disabled="!isPiLeader">
465
           <el-radio-group v-model="tableForm.workload05" :disabled="!isPiLeader">
535
       type: Object,
536
       type: Object,
536
       required: true
537
       required: true
537
     },
538
     },
538
-    taskName:{
539
-      type:String
539
+    taskName: {
540
+      type: String
540
     }
541
     }
541
   },
542
   },
542
   watch: {
543
   watch: {
565
   },
566
   },
566
   methods: {
567
   methods: {
567
     initForm() {
568
     initForm() {
568
-      console.log(this.tableForm);
569
+
569
     },
570
     },
570
     formatForm() {
571
     formatForm() {
571
-      debugger
572
+
572
       if (this.taskName == '负责人审核') {
573
       if (this.taskName == '负责人审核') {
573
         this.isPiLeader = true;
574
         this.isPiLeader = true;
574
         this.isDeptLeader = false;
575
         this.isDeptLeader = false;
592
       }
593
       }
593
     },
594
     },
594
     submit() {
595
     submit() {
596
+      this.formValidate(this.tableForm)
595
       this.$emit('submit', this.tableForm);
597
       this.$emit('submit', this.tableForm);
596
     },
598
     },
597
-    cancelSelect(value, name) {
598
-      debugger
599
-      if (!this.isPiLeader) {
599
+    formValidate(form) {
600
+      let flag = [];
601
+      for (let f in form) {
602
+        
603
+        if (f.startsWith('familiar') && form[f] != null) {
604
+          flag.push(f.slice(-2));
605
+        } else if (f.length == 5 && f.startsWith('f')) {
606
+          if (form[f] != "" && form[f] != undefined && form[f] != null)
607
+            flag.push(f.substring(1, 3));
608
+        }
609
+      }
610
+      let isF = false;
611
+      if (flag.length == 0) {
612
+        this.$modal.msgError("表格未填写,请填写表格");
600
         return
613
         return
601
       }
614
       }
602
-      if (this.tableForm[name] == value) {
603
-        this.tableForm[name] = null
604
-      } else {
605
-
606
-        if (this.tableForm[name] !== undefined)
607
-          this.tableForm[name] = value
615
+    },
616
+    cancelSelect(value, name, disabled) {
617
+      
618
+      if (this.isStaff) {
619
+        if (this.tableForm[name] == value) {
620
+          this.tableForm[name] = null
621
+        } else {
622
+          if (this.tableForm[name] !== undefined)
623
+            this.tableForm[name] = value
624
+          else {
625
+            this.$set(this.tableForm, name, value)
626
+          }
627
+        }
628
+      }
629
+      if (this.isPiLeader) {
630
+        if (disabled) {
631
+          return
632
+        }
633
+        if (this.tableForm[name] == value) {
634
+          this.tableForm[name] = null
635
+        } else {
636
+          if (this.tableForm[name] !== undefined)
637
+            this.tableForm[name] = value
638
+        }
608
       }
639
       }
609
     }
640
     }
610
   },
641
   },

+ 1
- 2
oa-ui/src/views/flowable/form/jsForm.vue Ver fichero

128
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
128
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
129
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
129
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
130
         tableForm.disabled = true;
130
         tableForm.disabled = true;
131
-        console.log(tableForm);
132
         let formData = new FormData();
131
         let formData = new FormData();
133
         let form = JSON.stringify(tableForm);
132
         let form = JSON.stringify(tableForm);
134
         formData.append("form", form);
133
         formData.append("form", form);
135
         submitAssess(formData).then(res => {
134
         submitAssess(formData).then(res => {
136
-        debugger
135
+        
137
           this.taskOpen = false;
136
           this.taskOpen = false;
138
           this.$emit('submit', tableForm);
137
           this.$emit('submit', tableForm);
139
         });
138
         });

+ 55
- 30
oa-ui/src/views/flowable/form/jsTable.vue Ver fichero

89
         </td>
89
         </td>
90
         <td rowspan="6">
90
         <td rowspan="6">
91
           <el-radio-group v-model="tableForm.familiar01" :disabled="!isStaff">
91
           <el-radio-group v-model="tableForm.familiar01" :disabled="!isStaff">
92
-            <div><el-radio :label="0">生疏</el-radio></div>
93
-            <div><el-radio :label="2">熟练</el-radio></div>
94
-            <div><el-radio :label="3">精通</el-radio></div>
92
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar01',!isStaff)">生疏</el-radio></div>
93
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar01',!isStaff)">熟练</el-radio></div>
94
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar01',!isStaff)">精通</el-radio></div>
95
           </el-radio-group>
95
           </el-radio-group>
96
         </td>
96
         </td>
97
         
97
         
187
         </td>
187
         </td>
188
         <td rowspan="4">
188
         <td rowspan="4">
189
           <el-radio-group v-model="tableForm.familiar02" :disabled="!isStaff">
189
           <el-radio-group v-model="tableForm.familiar02" :disabled="!isStaff">
190
-            <div><el-radio :label="0">生疏</el-radio></div>
191
-            <div><el-radio :label="2">熟练</el-radio></div>
192
-            <div><el-radio :label="3">精通</el-radio></div>
190
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar02',!isStaff)">生疏</el-radio></div>
191
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar02',!isStaff)">熟练</el-radio></div>
192
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar02',!isStaff)">精通</el-radio></div>
193
           </el-radio-group>
193
           </el-radio-group>
194
         </td>
194
         </td>
195
         <td rowspan="4">
195
         <td rowspan="4">
267
         </td>
267
         </td>
268
         <td rowspan="13">
268
         <td rowspan="13">
269
           <el-radio-group v-model="tableForm.familiar03" :disabled="!isStaff">
269
           <el-radio-group v-model="tableForm.familiar03" :disabled="!isStaff">
270
-            <div><el-radio :label="0">生疏</el-radio></div>
271
-            <div><el-radio :label="2">熟练</el-radio></div>
272
-            <div><el-radio :label="3">精通</el-radio></div>
270
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar03',!isStaff)">生疏</el-radio></div>
271
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar03',!isStaff)">熟练</el-radio></div>
272
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar03',!isStaff)">精通</el-radio></div>
273
           </el-radio-group>
273
           </el-radio-group>
274
         </td>
274
         </td>
275
         <td rowspan="13">
275
         <td rowspan="13">
420
         </td>
420
         </td>
421
         <td rowspan="5">
421
         <td rowspan="5">
422
           <el-radio-group v-model="tableForm.familiar04" :disabled="!isStaff">
422
           <el-radio-group v-model="tableForm.familiar04" :disabled="!isStaff">
423
-            <div><el-radio :label="0">生疏</el-radio></div>
424
-            <div><el-radio :label="2">熟练</el-radio></div>
425
-            <div><el-radio :label="3">精通</el-radio></div>
423
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar04',!isStaff)">生疏</el-radio></div>
424
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar04',!isStaff)">熟练</el-radio></div>
425
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar04',!isStaff)">精通</el-radio></div>
426
           </el-radio-group>
426
           </el-radio-group>
427
         </td>
427
         </td>
428
         <td rowspan="5">
428
         <td rowspan="5">
509
         </td>
509
         </td>
510
         <td rowspan="3">
510
         <td rowspan="3">
511
           <el-radio-group v-model="tableForm.familiar05" :disabled="!isStaff">
511
           <el-radio-group v-model="tableForm.familiar05" :disabled="!isStaff">
512
-            <div><el-radio :label="0">生疏</el-radio></div>
513
-            <div><el-radio :label="2">熟练</el-radio></div>
514
-            <div><el-radio :label="3">精通</el-radio></div>
512
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(3, 'familiar05',!isStaff)">生疏</el-radio></div>
513
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(3, 'familiar05',!isStaff)">熟练</el-radio></div>
514
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar05',!isStaff)">精通</el-radio></div>
515
           </el-radio-group>
515
           </el-radio-group>
516
         </td>
516
         </td>
517
         <td rowspan="3">
517
         <td rowspan="3">
658
       }
658
       }
659
     },
659
     },
660
     submit() {
660
     submit() {
661
-      if(!this.isStaff){
662
-        this.$emit('submit', this.tableForm);
663
-      }else{
664
-        this.$emit('submit', this.tableForm);
665
-      }
666
-      
661
+      this.formValidate(this.tableForm)
662
+      this.$emit('submit', this.tableForm);
667
     },
663
     },
668
-    cancelSelect(value, name) {
669
-      debugger
670
-      if (!this.isPiLeader) {
664
+    formValidate(form) {
665
+      let flag = [];
666
+      for (let f in form) {
667
+        
668
+        if (f.startsWith('familiar') && form[f] != null) {
669
+          flag.push(f.slice(-2));
670
+        } else if (f.length == 5 && f.startsWith('f')) {
671
+          if (form[f] != "" && form[f] != undefined && form[f] != null)
672
+            flag.push(f.substring(1, 3));
673
+        }
674
+      }
675
+      let isF = false;
676
+      if (flag.length == 0) {
677
+        this.$modal.msgError("表格未填写,请填写表格");
671
         return
678
         return
672
       }
679
       }
673
-      if (this.tableForm[name] == value) {
674
-        this.tableForm[name] = null
675
-      } else {
676
-
677
-        if (this.tableForm[name] !== undefined)
678
-          this.tableForm[name] = value
680
+    },
681
+    cancelSelect(value, name, disabled) {
682
+      
683
+      if (this.isStaff) {
684
+        if (this.tableForm[name] == value) {
685
+          this.tableForm[name] = null
686
+        } else {
687
+          if (this.tableForm[name] !== undefined)
688
+            this.tableForm[name] = value
689
+          else {
690
+            this.$set(this.tableForm, name, value)
691
+          }
692
+        }
693
+      }
694
+      if (this.isPiLeader) {
695
+        if (disabled) {
696
+          return
697
+        }
698
+        if (this.tableForm[name] == value) {
699
+          this.tableForm[name] = null
700
+        } else {
701
+          if (this.tableForm[name] !== undefined)
702
+            this.tableForm[name] = value
703
+        }
679
       }
704
       }
680
     }
705
     }
681
   },
706
   },

+ 1
- 2
oa-ui/src/views/flowable/form/jyForm.vue Ver fichero

127
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
127
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
128
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
128
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
129
         tableForm.disabled = true;
129
         tableForm.disabled = true;
130
-        console.log(tableForm);
131
         let formData = new FormData();
130
         let formData = new FormData();
132
         let form = JSON.stringify(tableForm);
131
         let form = JSON.stringify(tableForm);
133
         formData.append("form", form);
132
         formData.append("form", form);
134
         submitAssess(formData).then(res => {
133
         submitAssess(formData).then(res => {
135
-        debugger
134
+        
136
           this.taskOpen = false;
135
           this.taskOpen = false;
137
           this.$emit('submit', tableForm);
136
           this.$emit('submit', tableForm);
138
         });
137
         });

+ 49
- 24
oa-ui/src/views/flowable/form/jyTable.vue Ver fichero

93
         </td>
93
         </td>
94
         <td rowspan="6">
94
         <td rowspan="6">
95
           <el-radio-group v-model="tableForm.familiar01" :disabled="!isStaff">
95
           <el-radio-group v-model="tableForm.familiar01" :disabled="!isStaff">
96
-            <div><el-radio :label="0">生疏</el-radio></div>
97
-            <div><el-radio :label="2">熟练</el-radio></div>
98
-            <div><el-radio :label="3">精通</el-radio></div>
96
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar01',!isStaff)">生疏</el-radio></div>
97
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar01',!isStaff)">熟练</el-radio></div>
98
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar01',!isStaff)">精通</el-radio></div>
99
           </el-radio-group>
99
           </el-radio-group>
100
         </td>
100
         </td>
101
         
101
         
178
         </td>
178
         </td>
179
         <td rowspan="3">
179
         <td rowspan="3">
180
           <el-radio-group v-model="tableForm.familiar02" :disabled="!isStaff">
180
           <el-radio-group v-model="tableForm.familiar02" :disabled="!isStaff">
181
-            <div><el-radio :label="0">生疏</el-radio></div>
182
-            <div><el-radio :label="2">熟练</el-radio></div>
183
-            <div><el-radio :label="3">精通</el-radio></div>
181
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar02',!isStaff)">生疏</el-radio></div>
182
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar02',!isStaff)">熟练</el-radio></div>
183
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar02',!isStaff)">精通</el-radio></div>
184
           </el-radio-group>
184
           </el-radio-group>
185
         </td>
185
         </td>
186
         <td rowspan="3">
186
         <td rowspan="3">
237
         </td>
237
         </td>
238
         <td rowspan="3">
238
         <td rowspan="3">
239
           <el-radio-group v-model="tableForm.familiar03" :disabled="!isStaff">
239
           <el-radio-group v-model="tableForm.familiar03" :disabled="!isStaff">
240
-            <div><el-radio :label="0">生疏</el-radio></div>
241
-            <div><el-radio :label="2">熟练</el-radio></div>
242
-            <div><el-radio :label="3">精通</el-radio></div>
240
+            <div><el-radio :label="0" @click.native.prevent="cancelSelect(0, 'familiar03',!isStaff)">生疏</el-radio></div>
241
+            <div><el-radio :label="2" @click.native.prevent="cancelSelect(2, 'familiar03',!isStaff)">熟练</el-radio></div>
242
+            <div><el-radio :label="3" @click.native.prevent="cancelSelect(3, 'familiar03',!isStaff)">精通</el-radio></div>
243
           </el-radio-group>
243
           </el-radio-group>
244
         </td>
244
         </td>
245
         <td rowspan="3">
245
         <td rowspan="3">
373
       }
373
       }
374
     },
374
     },
375
     submit() {
375
     submit() {
376
-      if(!this.isStaff){
377
-        this.$emit('submit', this.tableForm);
378
-      }else{
379
-        this.$emit('submit', this.tableForm);
380
-      }
381
-      
376
+      this.formValidate(this.tableForm)
377
+      this.$emit('submit', this.tableForm);
382
     },
378
     },
383
-    cancelSelect(value, name) {
384
-      debugger
385
-      if (!this.isPiLeader) {
379
+    formValidate(form) {
380
+      let flag = [];
381
+      for (let f in form) {
382
+        
383
+        if (f.startsWith('familiar') && form[f] != null) {
384
+          flag.push(f.slice(-2));
385
+        } else if (f.length == 5 && f.startsWith('f')) {
386
+          if (form[f] != "" && form[f] != undefined && form[f] != null)
387
+            flag.push(f.substring(1, 3));
388
+        }
389
+      }
390
+      let isF = false;
391
+      if (flag.length == 0) {
392
+        this.$modal.msgError("表格未填写,请填写表格");
386
         return
393
         return
387
       }
394
       }
388
-      if (this.tableForm[name] == value) {
389
-        this.tableForm[name] = null
390
-      } else {
391
-
392
-        if (this.tableForm[name] !== undefined)
393
-          this.tableForm[name] = value
395
+    },
396
+    cancelSelect(value, name, disabled) {
397
+      
398
+      if (this.isStaff) {
399
+        if (this.tableForm[name] == value) {
400
+          this.tableForm[name] = null
401
+        } else {
402
+          if (this.tableForm[name] !== undefined)
403
+            this.tableForm[name] = value
404
+          else {
405
+            this.$set(this.tableForm, name, value)
406
+          }
407
+        }
408
+      }
409
+      if (this.isPiLeader) {
410
+        if (disabled) {
411
+          return
412
+        }
413
+        if (this.tableForm[name] == value) {
414
+          this.tableForm[name] = null
415
+        } else {
416
+          if (this.tableForm[name] !== undefined)
417
+            this.tableForm[name] = value
418
+        }
394
       }
419
       }
395
     }
420
     }
396
   },
421
   },

+ 0
- 1
oa-ui/src/views/flowable/form/scForm.vue Ver fichero

150
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
150
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
151
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
151
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
152
         tableForm.disabled = true;
152
         tableForm.disabled = true;
153
-        console.log(tableForm);
154
         let formData = new FormData();
153
         let formData = new FormData();
155
         let form = JSON.stringify(tableForm);
154
         let form = JSON.stringify(tableForm);
156
         formData.append("form", form);
155
         formData.append("form", form);

+ 123
- 60
oa-ui/src/views/flowable/form/scTable.vue Ver fichero

5
       <tr>
5
       <tr>
6
         <td class="table-title">项目编号</td>
6
         <td class="table-title">项目编号</td>
7
         <td colspan="1" style="text-align:left;padding-left:10px;">
7
         <td colspan="1" style="text-align:left;padding-left:10px;">
8
-          {{ tableForm.projectNumber }}
8
+          <div v-if="!isStaff">{{ tableForm.projectNumber }}</div>
9
+          <div v-if="isStaff">
10
+            <el-select v-model="tableForm.projectNumber" @change="getProjectById(tableForm.projectNumber)">
11
+              <el-option v-for="item in projectList" :key="item.projectId" :label="item.projectNumber"
12
+                :value="item.projectId">
13
+              </el-option>
14
+            </el-select>
15
+          </div>
9
         </td>
16
         </td>
10
         <td class="table-title">项目名称</td>
17
         <td class="table-title">项目名称</td>
11
         <td colspan="9" style="text-align:left;padding-left:10px;">
18
         <td colspan="9" style="text-align:left;padding-left:10px;">
12
-          {{ tableForm.projectName }}
19
+          <div v-if="!isStaff">{{ tableForm.projectName }}</div>
20
+          <div v-if="isStaff">{{ tableForm.projectName }}</div>
13
         </td>
21
         </td>
14
       </tr>
22
       </tr>
15
       <tr>
23
       <tr>
42
         <td class="table-title">部门职务</td>
50
         <td class="table-title">部门职务</td>
43
         <td colspan="3" style="text-align:left;padding-left:10px;">{{ tableForm.postGroup }}</td>
51
         <td colspan="3" style="text-align:left;padding-left:10px;">{{ tableForm.postGroup }}</td>
44
         <td colspan="3" rowspan="5">
52
         <td colspan="3" rowspan="5">
45
-          <el-input type="textarea" :rows="4" placeholder="请输入考核意见" v-model="tableForm.deptAdvice" :disabled="!isDeptLeader">
53
+          <el-input type="textarea" :rows="4" placeholder="请输入考核意见" v-model="tableForm.deptAdvice"
54
+            :disabled="!isDeptLeader">
46
           </el-input>
55
           </el-input>
47
           <el-row justify="center" type="flex">
56
           <el-row justify="center" type="flex">
48
-            <el-col :span="12">考核人:<el-input v-model="tableForm.deptAssesser" style="width:150px;" placeholder="请输入考核人" :disabled="!isDeptLeader"></el-input> </el-col>
49
-            <el-col :span="12">日期:<el-date-picker type="date"  placeholder="请选择考核日期" v-model="tableForm.deptTime" style="width:150px;" :disabled="!isDeptLeader"></el-date-picker> </el-col>
57
+            <el-col :span="12">考核人:<el-input v-model="tableForm.deptAssesser" style="width:150px;" placeholder="请输入考核人"
58
+                :disabled="!isDeptLeader"></el-input> </el-col>
59
+            <el-col :span="12">日期:<el-date-picker type="date" placeholder="请选择考核日期" v-model="tableForm.deptTime"
60
+                style="width:150px;" :disabled="!isDeptLeader"></el-date-picker> </el-col>
50
           </el-row>
61
           </el-row>
51
         </td>
62
         </td>
52
         <td colspan="3" rowspan="5">
63
         <td colspan="3" rowspan="5">
53
-          <el-input type="textarea" :rows="4" placeholder="请输入考核意见" v-model="tableForm.managerAdvice" :disabled="!isManager">
64
+          <el-input type="textarea" :rows="4" placeholder="请输入考核意见" v-model="tableForm.managerAdvice"
65
+            :disabled="!isManager">
54
           </el-input>
66
           </el-input>
55
           <el-row justify="center">
67
           <el-row justify="center">
56
-            <el-col :span="12">考核人:<el-input v-model="tableForm.managerAssesser" style="width:150px;" placeholder="请输入考核人" :disabled="!isManager"></el-input></el-col>
57
-            <el-col :span="12">日期:<el-date-picker type="date"  placeholder="请选择考核日期" v-model="tableForm.managerTime" style="width:150px;" :disabled="!isManager"></el-date-picker></el-col>
68
+            <el-col :span="12">考核人:<el-input v-model="tableForm.managerAssesser" style="width:150px;" placeholder="请输入考核人"
69
+                :disabled="!isManager"></el-input></el-col>
70
+            <el-col :span="12">日期:<el-date-picker type="date" placeholder="请选择考核日期" v-model="tableForm.managerTime"
71
+                style="width:150px;" :disabled="!isManager"></el-date-picker></el-col>
58
           </el-row>
72
           </el-row>
59
         </td>
73
         </td>
60
       </tr>
74
       </tr>
116
           </el-checkbox-group>
130
           </el-checkbox-group>
117
         </td>
131
         </td>
118
         <td rowspan="5">
132
         <td rowspan="5">
119
-          <div>{{ tableForm.remark01 }}</div>
120
-          <el-input v-if="isStaff" v-model="tableForm.remark01"  type="textarea" :rows="4"></el-input>
133
+          <div v-if="!isStaff">{{ tableForm.remark01 }}</div>
134
+          <el-input v-if="isStaff" v-model="tableForm.remark01" type="textarea" :rows="4"></el-input>
121
         </td>
135
         </td>
122
         <td rowspan="5">
136
         <td rowspan="5">
123
           <el-radio-group v-model="tableForm.quality01" :disabled="!isPiLeader">
137
           <el-radio-group v-model="tableForm.quality01" :disabled="!isPiLeader">
203
           </el-checkbox-group>
217
           </el-checkbox-group>
204
         </td>
218
         </td>
205
         <td rowspan="10">
219
         <td rowspan="10">
206
-          <div>{{ tableForm.remark02 }}</div>
207
-          <el-input v-if="isStaff" v-model="tableForm.remark02"  type="textarea" :rows="4"></el-input>
220
+          <div v-if="!isStaff">{{ tableForm.remark02 }}</div>
221
+          <el-input v-if="isStaff" v-model="tableForm.remark02" type="textarea" :rows="4"></el-input>
208
         </td>
222
         </td>
209
         <td rowspan="10">
223
         <td rowspan="10">
210
           <el-radio-group v-model="tableForm.quality02" :disabled="!isPiLeader">
224
           <el-radio-group v-model="tableForm.quality02" :disabled="!isPiLeader">
327
           </el-checkbox-group>
341
           </el-checkbox-group>
328
         </td>
342
         </td>
329
         <td rowspan="5">
343
         <td rowspan="5">
330
-          <div>{{ tableForm.remark03 }}</div>
331
-          <el-input v-if="isStaff" v-model="tableForm.remark03"  type="textarea" :rows="4"></el-input>
344
+          <div v-if="!isStaff">{{ tableForm.remark03 }}</div>
345
+          <el-input v-if="isStaff" v-model="tableForm.remark03" type="textarea" :rows="4"></el-input>
332
         </td>
346
         </td>
333
         <td rowspan="5">
347
         <td rowspan="5">
334
           <el-radio-group v-model="tableForm.quality03" :disabled="!isPiLeader">
348
           <el-radio-group v-model="tableForm.quality03" :disabled="!isPiLeader">
411
           </el-checkbox-group>
425
           </el-checkbox-group>
412
         </td>
426
         </td>
413
         <td rowspan="4">
427
         <td rowspan="4">
414
-          <div>{{ tableForm.remark04 }}</div>
415
-          <el-input v-if="isStaff" v-model="tableForm.remark04"  type="textarea" :rows="4"></el-input>
428
+          <div v-if="!isStaff">{{ tableForm.remark04 }}</div>
429
+          <el-input v-if="isStaff" v-model="tableForm.remark04" type="textarea" :rows="4"></el-input>
416
         </td>
430
         </td>
417
         <td rowspan="4">
431
         <td rowspan="4">
418
           <el-radio-group v-model="tableForm.quality04" :disabled="!isPiLeader">
432
           <el-radio-group v-model="tableForm.quality04" :disabled="!isPiLeader">
484
           </el-checkbox-group>
498
           </el-checkbox-group>
485
         </td>
499
         </td>
486
         <td rowspan="6">
500
         <td rowspan="6">
487
-          <div>{{ tableForm.remark05 }}</div>
488
-          <el-input v-if="isStaff" v-model="tableForm.remark05"  type="textarea" :rows="4"></el-input>
501
+          <div v-if="!isStaff">{{ tableForm.remark05 }}</div>
502
+          <el-input v-if="isStaff" v-model="tableForm.remark05" type="textarea" :rows="4"></el-input>
489
         </td>
503
         </td>
490
         <td rowspan="6">
504
         <td rowspan="6">
491
           <el-radio-group v-model="tableForm.quality05" :disabled="!isPiLeader">
505
           <el-radio-group v-model="tableForm.quality05" :disabled="!isPiLeader">
572
           </el-checkbox-group>
586
           </el-checkbox-group>
573
         </td>
587
         </td>
574
         <td rowspan="6">
588
         <td rowspan="6">
575
-          <div>{{ tableForm.remark06 }}</div>
576
-          <el-input v-if="isStaff" v-model="tableForm.remark06"  type="textarea" :rows="4"></el-input>
589
+          <div v-if="!isStaff">{{ tableForm.remark06 }}</div>
590
+          <el-input v-if="isStaff" v-model="tableForm.remark06" type="textarea" :rows="4"></el-input>
577
         </td>
591
         </td>
578
         <td rowspan="6">
592
         <td rowspan="6">
579
           <el-radio-group v-model="tableForm.quality06" :disabled="!isPiLeader">
593
           <el-radio-group v-model="tableForm.quality06" :disabled="!isPiLeader">
660
           </el-checkbox-group>
674
           </el-checkbox-group>
661
         </td>
675
         </td>
662
         <td rowspan="4">
676
         <td rowspan="4">
663
-          <div>{{ tableForm.remark07 }}</div>
664
-          <el-input v-if="isStaff" v-model="tableForm.remark07"  type="textarea" :rows="4"></el-input>
677
+          <div v-if="!isStaff">{{ tableForm.remark07 }}</div>
678
+          <el-input v-if="isStaff" v-model="tableForm.remark07" type="textarea" :rows="4"></el-input>
665
         </td>
679
         </td>
666
         <td rowspan="4">
680
         <td rowspan="4">
667
           <el-radio-group v-model="tableForm.quality07" :disabled="!isPiLeader">
681
           <el-radio-group v-model="tableForm.quality07" :disabled="!isPiLeader">
733
           </el-checkbox-group>
747
           </el-checkbox-group>
734
         </td>
748
         </td>
735
         <td rowspan="3">
749
         <td rowspan="3">
736
-          <div>{{ tableForm.remark08 }}</div>
737
-          <el-input v-if="isStaff" v-model="tableForm.remark08"  type="textarea" :rows="4"></el-input>
750
+          <div v-if="!isStaff">{{ tableForm.remark08 }}</div>
751
+          <el-input v-if="isStaff" v-model="tableForm.remark08" type="textarea" :rows="4"></el-input>
738
         </td>
752
         </td>
739
         <td rowspan="3">
753
         <td rowspan="3">
740
           <el-radio-group v-model="tableForm.quality08" :disabled="!isPiLeader">
754
           <el-radio-group v-model="tableForm.quality08" :disabled="!isPiLeader">
799
           </el-checkbox-group>
813
           </el-checkbox-group>
800
         </td>
814
         </td>
801
         <td rowspan="6">
815
         <td rowspan="6">
802
-          <div>{{ tableForm.remark09 }}</div>
803
-          <el-input v-if="isStaff" v-model="tableForm.remark09"  type="textarea" :rows="4"></el-input>
816
+          <div v-if="!isStaff">{{ tableForm.remark09 }}</div>
817
+          <el-input v-if="isStaff" v-model="tableForm.remark09" type="textarea" :rows="4"></el-input>
804
         </td>
818
         </td>
805
         <td rowspan="6">
819
         <td rowspan="6">
806
           <el-radio-group v-model="tableForm.quality09" :disabled="!isPiLeader">
820
           <el-radio-group v-model="tableForm.quality09" :disabled="!isPiLeader">
888
           </el-checkbox-group>
902
           </el-checkbox-group>
889
         </td>
903
         </td>
890
         <td rowspan="5">
904
         <td rowspan="5">
891
-          <div>{{ tableForm.remark10 }}</div>
892
-          <el-input v-if="isStaff" v-model="tableForm.remark10"  type="textarea" :rows="4"></el-input>
905
+          <div v-if="!isStaff">{{ tableForm.remark10 }}</div>
906
+          <el-input v-if="isStaff" v-model="tableForm.remark10" type="textarea" :rows="4"></el-input>
893
         </td>
907
         </td>
894
         <td rowspan="5">
908
         <td rowspan="5">
895
           <el-radio-group v-model="tableForm.quality10" :disabled="!isPiLeader">
909
           <el-radio-group v-model="tableForm.quality10" :disabled="!isPiLeader">
969
           </el-checkbox-group>
983
           </el-checkbox-group>
970
         </td>
984
         </td>
971
         <td rowspan="6">
985
         <td rowspan="6">
972
-          <div>{{ tableForm.remark11 }}</div>
973
-          <el-input v-if="isStaff" v-model="tableForm.remark11"  type="textarea" :rows="4"></el-input>
986
+          <div v-if="!isStaff">{{ tableForm.remark11 }}</div>
987
+          <el-input v-if="isStaff" v-model="tableForm.remark11" type="textarea" :rows="4"></el-input>
974
         </td>
988
         </td>
975
         <td rowspan="6">
989
         <td rowspan="6">
976
           <el-radio-group v-model="tableForm.quality11" :disabled="!isPiLeader">
990
           <el-radio-group v-model="tableForm.quality11" :disabled="!isPiLeader">
1058
           </el-checkbox-group>
1072
           </el-checkbox-group>
1059
         </td>
1073
         </td>
1060
         <td rowspan="5">
1074
         <td rowspan="5">
1061
-          <div>{{ tableForm.remark12 }}</div>
1062
-          <el-input v-if="isStaff" v-model="tableForm.remark12"  type="textarea" :rows="4"></el-input>
1075
+          <div v-if="!isStaff">{{ tableForm.remark12 }}</div>
1076
+          <el-input v-if="isStaff" v-model="tableForm.remark12" type="textarea" :rows="4"></el-input>
1063
         </td>
1077
         </td>
1064
         <td rowspan="5">
1078
         <td rowspan="5">
1065
           <el-radio-group v-model="tableForm.quality12" :disabled="!isPiLeader">
1079
           <el-radio-group v-model="tableForm.quality12" :disabled="!isPiLeader">
1139
           </el-checkbox-group>
1153
           </el-checkbox-group>
1140
         </td>
1154
         </td>
1141
         <td rowspan="6">
1155
         <td rowspan="6">
1142
-          <div>{{ tableForm.remark13 }}</div>
1143
-          <el-input v-if="isStaff" v-model="tableForm.remark13"  type="textarea" :rows="4"></el-input>
1156
+          <div v-if="!isStaff">{{ tableForm.remark13 }}</div>
1157
+          <el-input v-if="isStaff" v-model="tableForm.remark13" type="textarea" :rows="4"></el-input>
1144
         </td>
1158
         </td>
1145
         <td rowspan="6">
1159
         <td rowspan="6">
1146
           <el-radio-group v-model="tableForm.quality13" :disabled="!isPiLeader">
1160
           <el-radio-group v-model="tableForm.quality13" :disabled="!isPiLeader">
1228
           </el-checkbox-group>
1242
           </el-checkbox-group>
1229
         </td>
1243
         </td>
1230
         <td rowspan="6">
1244
         <td rowspan="6">
1231
-          <div>{{ tableForm.remark14 }}</div>
1232
-          <el-input v-if="isStaff" v-model="tableForm.remark14"  type="textarea" :rows="4"></el-input>
1245
+          <div v-if="!isStaff">{{ tableForm.remark14 }}</div>
1246
+          <el-input v-if="isStaff" v-model="tableForm.remark14" type="textarea" :rows="4"></el-input>
1233
         </td>
1247
         </td>
1234
         <td rowspan="6">
1248
         <td rowspan="6">
1235
           <el-radio-group v-model="tableForm.quality14" :disabled="!isPiLeader">
1249
           <el-radio-group v-model="tableForm.quality14" :disabled="!isPiLeader">
1317
           </el-checkbox-group>
1331
           </el-checkbox-group>
1318
         </td>
1332
         </td>
1319
         <td rowspan="6">
1333
         <td rowspan="6">
1320
-          <div>{{ tableForm.remark15 }}</div>
1321
-          <el-input v-if="isStaff" v-model="tableForm.remark15"  type="textarea" :rows="4"></el-input>
1334
+          <div v-if="!isStaff">{{ tableForm.remark15 }}</div>
1335
+          <el-input v-if="isStaff" v-model="tableForm.remark15" type="textarea" :rows="4"></el-input>
1322
         </td>
1336
         </td>
1323
         <td rowspan="6">
1337
         <td rowspan="6">
1324
           <el-radio-group v-model="tableForm.quality15" :disabled="!isPiLeader">
1338
           <el-radio-group v-model="tableForm.quality15" :disabled="!isPiLeader">
1406
           </el-checkbox-group>
1420
           </el-checkbox-group>
1407
         </td>
1421
         </td>
1408
         <td rowspan="4">
1422
         <td rowspan="4">
1409
-          <div>{{ tableForm.remark16 }}</div>
1410
-          <el-input v-if="isStaff" v-model="tableForm.remark16"  type="textarea" :rows="4"></el-input>
1423
+          <div v-if="!isStaff">{{ tableForm.remark16 }}</div>
1424
+          <el-input v-if="isStaff" v-model="tableForm.remark16" type="textarea" :rows="4"></el-input>
1411
         </td>
1425
         </td>
1412
         <td rowspan="4">
1426
         <td rowspan="4">
1413
           <el-radio-group v-model="tableForm.quality16" :disabled="!isPiLeader">
1427
           <el-radio-group v-model="tableForm.quality16" :disabled="!isPiLeader">
1478
           </el-checkbox-group>
1492
           </el-checkbox-group>
1479
         </td>
1493
         </td>
1480
         <td rowspan="5">
1494
         <td rowspan="5">
1481
-          <div>{{ tableForm.remark17 }}</div>
1482
-          <el-input v-if="isStaff" v-model="tableForm.remark17"  type="textarea" :rows="4"></el-input>
1495
+          <div v-if="!isStaff">{{ tableForm.remark17 }}</div>
1496
+          <el-input v-if="isStaff" v-model="tableForm.remark17" type="textarea" :rows="4"></el-input>
1483
         </td>
1497
         </td>
1484
         <td rowspan="5">
1498
         <td rowspan="5">
1485
           <el-radio-group v-model="tableForm.quality17" :disabled="!isPiLeader">
1499
           <el-radio-group v-model="tableForm.quality17" :disabled="!isPiLeader">
1563
 <script>
1577
 <script>
1564
 import { SCContent } from '@/assets/datas/SCContent'
1578
 import { SCContent } from '@/assets/datas/SCContent'
1565
 import { getDicts as getDicts } from '@/api/system/dict/data'
1579
 import { getDicts as getDicts } from '@/api/system/dict/data'
1580
+import { listProject } from '@/api/oa/project/project.js'
1581
+import { getProject } from '@/api/oa/project/project'
1582
+
1566
 export default {
1583
 export default {
1567
   dicts: ['cmc_role', 'cmc_skill', 'cmc_accessment'],
1584
   dicts: ['cmc_role', 'cmc_skill', 'cmc_accessment'],
1568
   props: {
1585
   props: {
1587
       isPiLeader: false,
1604
       isPiLeader: false,
1588
       isManager: false,
1605
       isManager: false,
1589
       isStaff: false,
1606
       isStaff: false,
1607
+      projectList: [],
1590
     }
1608
     }
1591
   },
1609
   },
1592
   created() {
1610
   created() {
1597
   },
1615
   },
1598
   methods: {
1616
   methods: {
1599
     initForm() {
1617
     initForm() {
1618
+      listProject({ pageSize: 200 }).then(res => {
1619
+        this.projectList = res.rows;
1620
+      })
1600
       for (let i = 0; i < SCContent.length + 1; i++) {
1621
       for (let i = 0; i < SCContent.length + 1; i++) {
1601
         if (i.toString().length == 1) {
1622
         if (i.toString().length == 1) {
1602
           this.$set(this.form, 'role' + '0' + i, []);
1623
           this.$set(this.form, 'role' + '0' + i, []);
1639
         this.isStaff = true;
1660
         this.isStaff = true;
1640
       }
1661
       }
1641
     },
1662
     },
1642
-    // 员工填报之后传值
1663
+    // 员工修改之后传值
1643
     assignmentToTableForm() {
1664
     assignmentToTableForm() {
1644
-      debugger
1645
-      for(let i in this.tableForm){
1646
-        if(i.includes('role')){
1665
+      for (let i in this.tableForm) {
1666
+        if (i.includes('role')) {
1647
           this.tableForm[i] = this.form[i]
1667
           this.tableForm[i] = this.form[i]
1648
         }
1668
         }
1649
       }
1669
       }
1650
     },
1670
     },
1671
+    // 初始化tableForm,得到承担角色的值
1672
+    initTableFormFromForm(){
1673
+      for(let f in this.form){
1674
+        if(this.form[f] != "" && this.form[f] != undefined && this.form[f] != null){
1675
+          this.tableForm[f]  = this.form[f];
1676
+        }
1677
+      }
1678
+    },
1679
+    getProjectById(id) {
1680
+      getProject(id).then(res => {
1681
+        if (res.data != undefined) {
1682
+          this.tableForm.projectName = res.data.projectName;
1683
+          this.tableForm.projectNumber = res.data.projectNumber;
1684
+          this.tableForm.projectId = id
1685
+        }
1686
+      })
1687
+    },
1651
     submit() {
1688
     submit() {
1652
-      if(!this.isStaff){
1653
-        this.$emit('submit', this.tableForm);
1654
-      }else{
1689
+        this.formValidate(this.tableForm)
1655
         this.assignmentToTableForm();
1690
         this.assignmentToTableForm();
1691
+        this.initTableFormFromForm();
1692
+        console.log(this.tableForm);
1656
         this.$emit('submit', this.tableForm);
1693
         this.$emit('submit', this.tableForm);
1657
-      }
1658
-      
1659
     },
1694
     },
1660
-    cancelSelect(value, name) {
1661
-      debugger
1662
-      if (!this.isPiLeader) {
1695
+    formValidate(form) {
1696
+      let flag = [];
1697
+      for (let f in form) {
1698
+        if (f.startsWith('familiar') && form[f] != null) {
1699
+          flag.push(f.slice(-2));
1700
+        } else if (f.length == 5 && f.startsWith('f')) {
1701
+          if (form[f] != "" && form[f] != undefined && form[f] != null)
1702
+            flag.push(f.substring(1, 3));
1703
+        }
1704
+      }
1705
+      let isF = false;
1706
+      if (flag.length == 0) {
1707
+        this.$modal.msgError("表格未填写,请填写表格");
1663
         return
1708
         return
1664
       }
1709
       }
1665
-      if (this.tableForm[name] == value) {
1666
-        this.tableForm[name] = null
1667
-      } else {
1668
-
1669
-        if (this.tableForm[name] !== undefined)
1670
-          this.tableForm[name] = value
1710
+    },
1711
+    cancelSelect(value, name, disabled) {
1712
+      
1713
+      if (this.isStaff) {
1714
+        if (this.tableForm[name] == value) {
1715
+          this.tableForm[name] = null
1716
+        } else {
1717
+          if (this.tableForm[name] !== undefined)
1718
+            this.tableForm[name] = value
1719
+          else {
1720
+            this.$set(this.tableForm, name, value)
1721
+          }
1722
+        }
1723
+      }
1724
+      if (this.isPiLeader) {
1725
+        if (disabled) {
1726
+          return
1727
+        }
1728
+        if (this.tableForm[name] == value) {
1729
+          this.tableForm[name] = null
1730
+        } else {
1731
+          if (this.tableForm[name] !== undefined)
1732
+            this.tableForm[name] = value
1733
+        }
1671
       }
1734
       }
1672
     }
1735
     }
1673
   },
1736
   },

+ 1
- 2
oa-ui/src/views/flowable/form/xmForm.vue Ver fichero

127
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
127
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
128
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
128
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
129
         tableForm.disabled = true;
129
         tableForm.disabled = true;
130
-        console.log(tableForm);
131
         let formData = new FormData();
130
         let formData = new FormData();
132
         let form = JSON.stringify(tableForm);
131
         let form = JSON.stringify(tableForm);
133
         formData.append("form", form);
132
         formData.append("form", form);
134
         submitAssess(formData).then(res => {
133
         submitAssess(formData).then(res => {
135
-        debugger
134
+        
136
           this.taskOpen = false;
135
           this.taskOpen = false;
137
           this.$emit('submit', tableForm);
136
           this.$emit('submit', tableForm);
138
         });
137
         });

+ 1
- 1
oa-ui/src/views/flowable/form/xmTable.vue Ver fichero

401
       
401
       
402
     },
402
     },
403
     cancelSelect(value, name) {
403
     cancelSelect(value, name) {
404
-      debugger
404
+      
405
       if (!this.isPiLeader) {
405
       if (!this.isPiLeader) {
406
         return
406
         return
407
       }
407
       }

+ 1
- 2
oa-ui/src/views/flowable/form/zhForm.vue Ver fichero

127
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
127
       MessageBox.confirm('确认提交?', '任务提交', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
128
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
128
         tableForm.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
129
         tableForm.disabled = true;
129
         tableForm.disabled = true;
130
-        console.log(tableForm);
131
         let formData = new FormData();
130
         let formData = new FormData();
132
         let form = JSON.stringify(tableForm);
131
         let form = JSON.stringify(tableForm);
133
         formData.append("form", form);
132
         formData.append("form", form);
134
         submitAssess(formData).then(res => {
133
         submitAssess(formData).then(res => {
135
-        debugger
134
+        
136
           this.taskOpen = false;
135
           this.taskOpen = false;
137
           this.$emit('submit', tableForm);
136
           this.$emit('submit', tableForm);
138
         });
137
         });

+ 1
- 1
oa-ui/src/views/flowable/form/zhTable.vue Ver fichero

821
 
821
 
822
     },
822
     },
823
     cancelSelect(value, name) {
823
     cancelSelect(value, name) {
824
-      debugger
824
+      
825
       if (!this.isPiLeader) {
825
       if (!this.isPiLeader) {
826
         return
826
         return
827
       }
827
       }

+ 0
- 2
oa-ui/src/views/flowable/task/finished/index.vue Ver fichero

174
     },
174
     },
175
     /** 流程流转记录 */
175
     /** 流程流转记录 */
176
     handleFlowRecord(row) {
176
     handleFlowRecord(row) {
177
-      console.log(row);
178
-
179
       getProcessVariables(row.taskId).then(res => {
177
       getProcessVariables(row.taskId).then(res => {
180
         this.$router.push({
178
         this.$router.push({
181
           path: '/flowable/task/finished/detail/index',
179
           path: '/flowable/task/finished/detail/index',

+ 3
- 3
oa-ui/src/views/flowable/task/myProcess/index.vue Ver fichero

266
     handleStartProcess(row) {
266
     handleStartProcess(row) {
267
       if (row.category == "assess") {
267
       if (row.category == "assess") {
268
         getNextFlowNodeByStart({ deploymentId: row.deploymentId, variables: {} }).then(res => {
268
         getNextFlowNodeByStart({ deploymentId: row.deploymentId, variables: {} }).then(res => {
269
-          let data = res.data
269
+          let data = res.data;
270
           if (data.dataType === 'dynamic') {
270
           if (data.dataType === 'dynamic') {
271
             if (data.type === 'assignee') { // 指定人员
271
             if (data.type === 'assignee') { // 指定人员
272
               this.checkSendUser = true;
272
               this.checkSendUser = true;
289
             const formData = {};
289
             const formData = {};
290
             formData.disabled = true;
290
             formData.disabled = true;
291
             formData.formBtns = false;
291
             formData.formBtns = false;
292
+            
292
             formData.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
293
             formData.formId = new Snowflake(1n, 1n, 0n).nextId().toString();
293
             if (row.id) {
294
             if (row.id) {
294
               variables.variables = formData;
295
               variables.variables = formData;
295
               // 启动流程并将表单数据加入流程变量
296
               // 启动流程并将表单数据加入流程变量
296
               definitionStart(row.id, JSON.stringify(variables)).then(res => {
297
               definitionStart(row.id, JSON.stringify(variables)).then(res => {
297
-                debugger
298
+                
298
                 this.$modal.msgSuccess(res.msg);
299
                 this.$modal.msgSuccess(res.msg);
299
                 let procInstanceId = res.data;
300
                 let procInstanceId = res.data;
300
                 todoList({
301
                 todoList({
305
                   if(records.length == 1){
306
                   if(records.length == 1){
306
                     records = records[0]
307
                     records = records[0]
307
                   }
308
                   }
308
-                  console.log(records);
309
                   this.$router.push({
309
                   this.$router.push({
310
                     path: '/flowable/task/todo/detail/index',
310
                     path: '/flowable/task/todo/detail/index',
311
                     query: {
311
                     query: {

+ 1
- 3
oa-ui/src/views/flowable/task/myProcess/send/index.vue Ver fichero

122
     submits(form) {
122
     submits(form) {
123
       getNextFlowNodeByStart({ deploymentId: this.deployId, variables: {} }).then(res => {
123
       getNextFlowNodeByStart({ deploymentId: this.deployId, variables: {} }).then(res => {
124
         let data = res.data
124
         let data = res.data
125
-        debugger
126
-        console.log(form);
127
         if (data.dataType === 'dynamic') {
125
         if (data.dataType === 'dynamic') {
128
           if (data.type === 'assignee') { // 指定人员
126
           if (data.type === 'assignee') { // 指定人员
129
             this.checkSendUser = true;
127
             this.checkSendUser = true;
255
     },
253
     },
256
     /** 提交流程 */
254
     /** 提交流程 */
257
     submitTask() {
255
     submitTask() {
258
-      debugger
256
+      
259
       if (!this.checkValues && this.checkSendUser) {
257
       if (!this.checkValues && this.checkSendUser) {
260
         this.$modal.msgError("请选择任务接收!");
258
         this.$modal.msgError("请选择任务接收!");
261
         return;
259
         return;

+ 4
- 4
oa-ui/src/views/flowable/task/todo/detail/index.vue Ver fichero

253
       if (this.taskForm.taskId) {
253
       if (this.taskForm.taskId) {
254
         this.processVariables(this.taskForm.taskId)
254
         this.processVariables(this.taskForm.taskId)
255
         this.getFlowTaskForm(this.taskForm.taskId)
255
         this.getFlowTaskForm(this.taskForm.taskId)
256
-        console.log(this.taskForm.formId);
257
         this.getAssessByAssessId(this.taskForm.formId)
256
         this.getAssessByAssessId(this.taskForm.formId)
258
       }
257
       }
259
       this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
258
       this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
347
     },
346
     },
348
     // 获取需要处理的表单表格信息
347
     // 获取需要处理的表单表格信息
349
     getAssessByAssessId(formId) {
348
     getAssessByAssessId(formId) {
349
+      
350
       getAssess(formId).then(res => {
350
       getAssess(formId).then(res => {
351
         let data = res.data;
351
         let data = res.data;
352
-        debugger
352
+        
353
         for (let d in data) {
353
         for (let d in data) {
354
           if (d.includes('role')) {
354
           if (d.includes('role')) {
355
             if (data[d] != "" && data[d] != undefined && data[d] != null)
355
             if (data[d] != "" && data[d] != undefined && data[d] != null)
370
       // this.completeOpen = true;
370
       // this.completeOpen = true;
371
       // this.completeTitle = "流程审批";
371
       // this.completeTitle = "流程审批";
372
       // this.submitForm(null);
372
       // this.submitForm(null);
373
-      debugger
373
+      
374
       let formData = new FormData();
374
       let formData = new FormData();
375
       this.tableForm.formId = this.tableForm.assessId;
375
       this.tableForm.formId = this.tableForm.assessId;
376
       let form = JSON.stringify(this.tableForm);
376
       let form = JSON.stringify(this.tableForm);
485
     },
485
     },
486
     /** 申请流程表单数据提交 */
486
     /** 申请流程表单数据提交 */
487
     submitForm(formData, assessId) {
487
     submitForm(formData, assessId) {
488
-      debugger
489
       listAssess({ assessId }).then(result => {
488
       listAssess({ assessId }).then(result => {
489
+        
490
         let list = result;
490
         let list = result;
491
         if (list.total != 0) {
491
         if (list.total != 0) {
492
           modifyAssess(formData).then(res => {
492
           modifyAssess(formData).then(res => {

+ 0
- 2
oa-ui/src/views/flowable/task/todo/index.vue Ver fichero

119
     // 跳转到处理页面
119
     // 跳转到处理页面
120
     handleProcess(row) {
120
     handleProcess(row) {
121
       getProcessVariables(row.taskId).then(res => {
121
       getProcessVariables(row.taskId).then(res => {
122
-        console.log(row);
123
-        console.log(res);
124
         this.$router.push({
122
         this.$router.push({
125
           path: '/flowable/task/todo/detail/index',
123
           path: '/flowable/task/todo/detail/index',
126
           query: {
124
           query: {

+ 1
- 1
oa-ui/src/views/system/user/index.vue Ver fichero

513
         this.roleOptions = response.roles;
513
         this.roleOptions = response.roles;
514
         this.$set(this.form, "postIds", response.postIds);
514
         this.$set(this.form, "postIds", response.postIds);
515
         this.$set(this.form, "roleIds", response.roleIds);
515
         this.$set(this.form, "roleIds", response.roleIds);
516
-        debugger
516
+        
517
         if (response.data.titles != "" && response.data.titles != undefined && response.data.titles != null) {
517
         if (response.data.titles != "" && response.data.titles != undefined && response.data.titles != null) {
518
           for (let i = 0; i < response.data.titles.split(",").length; i++)
518
           for (let i = 0; i < response.data.titles.split(",").length; i++)
519
             this.titles[i] = response.data.titles.split(",")[i]
519
             this.titles[i] = response.data.titles.split(",")[i]

Loading…
Cancelar
Guardar