qushaowei
2024-04-11 1c71b73047a8120df6777e255d1c8f2da7555b73
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
<template>
  <a-card
    :bordered="false"
    title="三级保养"
  >
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="统一编号">
              <a-input
                placeholder="请输入统一编号"
                v-model="queryParam.equipmentNum"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="保养工单编码">
              <a-input
                placeholder="请输入保养工单编码"
                v-model="queryParam.num"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="6">
            <a-form-item label="使用部门">
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请输入使用部门"
                v-model="queryParam.useDepartId"
              />
            </a-form-item>
          </a-col>
          <a-col :span="6">
            <a-form-item label="状态">
              <j-dict-select-tag
                dictCode="daily_maintenance_order_status"
                placeholder="请选择状态"
                v-model="queryParam.status"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="6">
            <a-form-item label="责任班组">
              <j-dict-select-tag
                dictCode="mom_base_team,name,id,status='1' and del_flag='0'"
                placeholder="请选择责任班组"
                v-model="queryParam.teamId"
              />
            </a-form-item>
          </a-col>
          <a-col :span="7">
            <a-form-item label="完工时间">
              <a-range-picker
                style="width: 100%;"
                format="YYYY-MM-DD HH:mm:ss"
                v-model="finishTime"
                @change="timeChange"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
 
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
        v-has="'daily3MaintenanceOrder:add'"
      >新增</a-button>
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
        style="margin-left: 8px"
      >查询</a-button>
      <a-button
        type="primary"
        @click="searchReset"
        icon="reload"
        style="margin-left: 8px"
      >重置</a-button>
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status === '5' && selectionRows[0].isNotStoveCategoryFlag == false && selectionRows[0].precisionParameters == '1' "
        @click="handlePrintPrecision(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >精度检验单打印
      </a-button>
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status === '5'"
        @click="handlePrintCheck(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >验收单打印
      </a-button>
      <!-- v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '8'" -->
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '8'"
        @click="handlePrintInfo(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >移交单打印
      </a-button>
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '5' && selectionRows[0].isNotStoveCategoryFlag == false && selectionRows[0].precisionParameters != '1'"
        @click="handlePrintTechnology(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >技术状态鉴定打印
      </a-button>
      <a-button
        v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '5' && selectionRows[0].isNotStoveCategoryFlag == true"
        @click="handlePrintStove(selectionRows[0])"
        type="primary"
        style="margin-left: 8px"
      >炉类检测打印
      </a-button>
      <!-- <a-button
        v-if="selectedRowKeys.length > 0"
        type="primary"
        @click="batchAssign"
        style="margin-left: 8px"
      >工单派工</a-button> -->
      <!-- <a-button
        type="primary"
        icon="download"
        @click="handleExportXls('mom_eam_inspection_order')"
      >导出</a-button>
      <a-upload
        name="file"
        :showUploadList="false"
        :multiple="false"
        :headers="tokenHeader"
        :action="importExcelUrl"
        @change="handleImportExcel"
      >
        <a-button
          type="primary"
          icon="import"
        >导入</a-button>
      </a-upload> -->
      <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item
            key="1"
            @click="batchDel"
          ><a-icon type="delete" />删除</a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
      </a-dropdown> -->
    </div>
 
    <div>
      <a-table
        ref="table"
        size="middle"
        :scroll="{ x: 'calc(3500px + 50%)', y: 900 }"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        @change="handleTableChange"
        :rowSelection="rowSelection"
        :rowClassName="tableRowClass"
      >
 
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a-popconfirm
            title="确定接收工单吗?"
            @confirm="() => handleOrderIssue(record)"
            v-has="'daily3MaintenanceOrder:issue'"
          >
            <a v-show="record.status == '1'">接收</a>
          </a-popconfirm>
          <a-divider
            v-show="record.status == '1'"
            type="vertical"
          />
          <!-- <a
            v-if="record.status === '2'"
            @click="handleOrderChange(record)"
          >计划变更</a>
          <a-divider
            v-if="record.status == '2'"
            type="vertical"
          /> -->
          <a-popconfirm
            title="确定撤回工单吗?"
            @confirm="() => handleOrderReset(record)"
            v-has="'daily3MaintenanceOrder:issue'"
          >
            <a v-show="record.status == '2'">撤回</a>
          </a-popconfirm>
          <a-divider
            v-show="record.status == '2'"
            type="vertical"
          />
          <!-- <a-popconfirm
            title="确定恢复工单吗?"
            @confirm="() => handleOrderRecover(record)"
            v-has="'dailyMaintenanceOrder:recover'"
          >
            <a v-if="record.status == '7'">恢复</a>
          </a-popconfirm>
          <a-divider
            v-if="record.status == '7'"
            type="vertical"
          /> -->
          <!-- <a-popconfirm
            title="确定作废工单吗?"
            @confirm="() => handleOrderCancel(record)"
            v-has="'dailyMaintenanceOrder:recover'"
          >
            <a v-if="record.status == '2'">作废</a>
          </a-popconfirm>
          <a-divider
            v-if="record.status == '2'"
            type="vertical"
          /> -->
          <a-popconfirm
            title="确定领取工单吗?"
            @confirm="() => handleOrderGet(record)"
            v-has="'daily3MaintenanceOrder:get'"
          >
            <a v-show="record.status == '2' && record.assignMode == '1'">领取</a>
          </a-popconfirm>
          <!-- <a
            v-if="record.status == '2' && record.assignMode == '2'  "
            @click="handleAssignOrder(record)"
            v-has="'dailyMaintenanceOrder:assign'"
          >派工</a>
          <a
            v-if="record.status == '3'&& record.assignMode == '2'  && record.maintenanceUserName != null  "
            @click="handleAssignOrder(record)"
            v-has="'dailyMaintenanceOrder:assign'"
          >改派</a> -->
          <!-- <a
            v-if="record.status == '3'"
            @click="handleAssignOrder(record)"
          >改派</a> -->
          <!-- <a-divider
            v-if="record.status == '2'"
            type="vertical"
          />-->
          <a-divider
            v-show="record.status === '2'"
            type="vertical"
          />
          <a
            v-show="record.status === '3' || record.status === '4'  "
            @click="handleOrderExe(record)"
            v-has="'daily3MaintenanceOrder:exe'"
          >执行</a>
          <a-divider
            v-if="record.status === '3' || record.status === '4' "
            type="vertical"
          />
          <a
            v-show="record.status === '1'"
            @click="handleEdit(record)"
            v-has="'daily3MaintenanceOrder:edit'"
          >编辑</a>
          <a-divider
            v-show="record.status === '1'"
            type="vertical"
          />
          <!-- <a
            v-if="record.status === '5'"
            @click="handleFinish(record)"
          >确认</a>
          <a-divider
            v-if="record.status === '5'"
            type="vertical"
          /> -->
          <!-- 精度检验者操作精度检验单 -->
          <a
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' && (record.precisionInspectionStatus == '0' )"
            @click="handlePrecisionCheckOrder(record)"
            v-has="'daily3MaintenanceOrder:precisionInspectionUser'"
          >精度检验</a>
          <!-- 维修室主任操作精度检验单 -->
          <a
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' && (record.precisionInspectionStatus == '1' )"
            @click="handlePrecisionCheckOrder(record)"
            v-has="'daily3MaintenanceOrder:repairDirectorUser'"
          >精度检验</a>
          <!-- 设备检验员操作精度检验单 -->
          <a
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' && (record.precisionInspectionStatus == '2'  )"
            @click="handlePrecisionCheckOrder(record)"
            v-has="'daily3MaintenanceOrder:equipmentInspectorUser'"
          >精度检验</a>
          <!-- 使用单位技术主管操作精度检验单 -->
          <a
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' && (record.precisionInspectionStatus == '3' )"
            @click="handlePrecisionCheckOrder(record)"
            v-has="'daily3MaintenanceOrder:useUnitDirectorUser'"
          >精度检验</a>
          <!-- 设备检验员签字 操作精度检验单 -->
          <a
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' && (record.precisionInspectionStatus == '4')"
            @click="handlePrecisionCheckOrder(record)"
            v-has="'daily3MaintenanceOrder:equipmentInspectorSignUser'"
          >精度检验</a>
          <!-- 精度检验单 查看 -->
          <a
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' && (record.precisionInspectionStatus == '5')"
            @click="handlePrecisionCheckOrder(record)"
          >精度检验</a>
          <!--管理员操作精度检验单 -->
          <a
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' && (record.precisionInspectionStatus == '0' ||record.precisionInspectionStatus == '1' ||record.precisionInspectionStatus == '2' ||record.precisionInspectionStatus == '3' ||record.precisionInspectionStatus == '4' )"
            @click="handlePrecisionCheckOrder(record)"
            v-has="'daily3MaintenanceOrder:admin'"
          >精度检验</a>
          <a-divider
            v-show="record.status === '5'&& record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' "
            type="vertical"
          />
          <a
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == true "
            @click="handleStoveDetection(record)"
            v-has="'daily3MaintenanceOrder:StoveCategory'"
          >炉类检测</a>
          <!-- v-show="record.status === '5' && record.isNotStoveCategoryFlag == true && (record.stoveExemptStatus == '0' ||record.stoveExemptStatus == '1' ||record.stoveExemptStatus == '2')" -->
          <a-divider
            v-show=" record.status === '5' && record.isNotStoveCategoryFlag == true "
            type="vertical"
          />
          <a
            v-show=" record.status === '5' && record.isNotStoveCategoryFlag == true "
            @click="handleStoveReport(record)"
            v-has="'daily3MaintenanceOrder:StoveCategoryReport'"
          >炉类报告</a>
          <a-divider
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == true "
            type="vertical"
          />
          <a
            v-show="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters != '1'"
            @click="handleTechnologyStatus(record)"
            v-has="'daily3MaintenanceOrder:TechnologyStatus'"
          >技术状态鉴定</a>
          <a-divider
            v-show="record.status === '5'&& record.isNotStoveCategoryFlag == false && record.precisionParameters != '1'"
            type="vertical"
          />
          <a
            v-show="record.status === '5'  "
            @click="handleMaintenance3Receipt(record)"
            v-has="'daily3MaintenanceOrder:Receipt'"
          >验收单</a>
          <a-divider
            v-show="record.status === '5'  "
            type="vertical"
          />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(record.id)"
                  v-has="'daily3MaintenanceOrder:delete'"
                >
                  <a v-show="record.status === '1'">删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
 
        <span
          slot="num"
          slot-scope="text, record"
        >
          <a
            v-if="record.status === '3' || record.status === '4' ||record.status === '5'  ||record.status === '7' "
            class="lot"
            @click="handleOrderExe(record)"
          >{{record.num}}</a>
          <span v-else>{{record.num}}</span>
        </span>
 
        <span
          slot="notPassReason"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="15"
          />
        </span>
 
      </a-table>
    </div>
 
    <maintenance-order3-modal
      ref="modalForm"
      @ok="modalFormOk"
    ></maintenance-order3-modal>
    <finish-devolution-modal
      ref="FinishDevolutionModal"
      @ok="modalFormOk"
    ></finish-devolution-modal>
    <maintenance-order-change-modal
      ref="MaintenanceOrderChangeModal"
      @ok="modalFormOk"
    ></maintenance-order-change-modal>
    <equipment-precision-check-order-modal
      ref="EquipmentPrecisionCheckOrderModal"
      @ok="modalFormOk"
    ></equipment-precision-check-order-modal>
    <stove-category-modal
      ref="StoveCategoryModal"
      @ok="modalFormOk"
    ></stove-category-modal>
    <stove-category-report-modal
      ref="StoveCategoryReportModal"
      @ok="modalFormOk"
    ></stove-category-report-modal>
    <maintenance-order-assign-modal
      ref="MaintenanceOrderAssignModal"
      @ok="modalFormOk"
    ></maintenance-order-assign-modal>
    <daily-maintenance-order-exe-drawer
      ref="DailyMaintenanceOrderExeDrawer"
      @ok="modalFormOk"
    ></daily-maintenance-order-exe-drawer>
    <equipment-technology-status-modal
      ref="EquipmentTechnologyStatusModal"
      @ok="modalFormOk"
    ></equipment-technology-status-modal>
    <technology-status-authenticate-modal
      ref="TechnologyStatusAuthenticateModal"
      @ok="modalFormOk"
    ></technology-status-authenticate-modal>
    <maintenance-3-receipt-modal
      ref="Maintenance3ReceiptModal"
      @ok="modalFormOk"
    ></maintenance-3-receipt-modal>
  </a-card>
</template>
 
<script>
 
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MaintenanceOrder3Modal from './modules/daily3MaintenanceOrder/MaintenanceOrder3Modal'
import FinishDevolutionModal from './modules/dailyMaintenanceOrder/FinishDevolutionModal'
import MaintenanceOrderChangeModal from './modules/dailyMaintenanceOrder/MaintenanceOrderChangeModal'
import EquipmentPrecisionCheckOrderModal from './modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal'
import StoveCategoryModal from './modules/daily3MaintenanceOrder/StoveCategoryModal'
import StoveCategoryReportModal from './modules/daily3MaintenanceOrder/StoveCategoryReportModal'
import MaintenanceOrderAssignModal from './modules/dailyMaintenanceOrder/MaintenanceOrderAssignModal'
import DailyMaintenanceOrderExeDrawer from './modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer'
import EquipmentTechnologyStatusModal from './modules/daily3MaintenanceOrder/EquipmentTechnologyStatusModal'
import TechnologyStatusAuthenticateModal from './modules/daily3MaintenanceOrder/TechnologyStatusAuthenticateModal'
import Maintenance3ReceiptModal from './modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue'
import { getAction, postAction, requestPut } from '@/api/manage'
import JEllipsis from "@/components/jeecg/JEllipsis";
import moment from 'moment'
 
export default {
  name: 'DailyMaintenanceOrderList',
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    MaintenanceOrder3Modal,
    FinishDevolutionModal,
    MaintenanceOrderAssignModal,
    EquipmentPrecisionCheckOrderModal,
    DailyMaintenanceOrderExeDrawer,
    MaintenanceOrderChangeModal,
    StoveCategoryModal,
    StoveCategoryReportModal,
    EquipmentTechnologyStatusModal,
    TechnologyStatusAuthenticateModal,
    Maintenance3ReceiptModal,
    JEllipsis
  },
  data() {
    return {
      description: '三级保养工单',
      queryParam: { maintenanceType: '3' },
      finishTime: [],
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
          title: '保养工单号',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' }
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'equipmentNum',
        },
        {
          title: '状态',
          align: "center",
          dataIndex: 'statusName',
          width: 100,
        },
        {
          title: '保养周期',
          align: "center",
          dataIndex: 'maintenanceCycleName',
          width: 100,
        },
        // {
        //   title: '派工方式',
        //   align: "center",
        //   dataIndex: 'assignModeName',
        //   width: 100,
        // },
 
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'equipmentName',
        },
        {
          title: '型号',
          align: "center",
          dataIndex: 'equipmentModel',
        },
        {
          title: '验收状态',
          align: "center",
          dataIndex: 'checkStatusName',
        },
        {
          title: '验收未通过原因',
          align: "center",
          dataIndex: 'notPassReason',
          scopedSlots: { customRender: 'notPassReason' }
        },
        // {
        //   title: '保养标准编码',
        //   align: "center",
        //   dataIndex: 'maintenanceStandardNum',
        // },
 
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'departName'
        },
        {
          title: '责任班组',
          align: "center",
          dataIndex: 'teamName'
        },
        // {
        //   title: '工时定额',
        //   align: "center",
        //   dataIndex: 'workingHourQuota'
        // },
        {
          title: '计划开始时间',
          align: "center",
          dataIndex: 'planStartTime',
          //width: '120px',
        },
        // {
        //   title: '计划结束时间',
        //   align: "center",
        //   dataIndex: 'planEndTime',
        //   //width: '120px',
        // },
        {
          title: '执行时间',
          align: "center",
          dataIndex: 'actualStartTime',
          //width: '120px',
        },
        {
          title: '完工时间',
          align: "center",
          dataIndex: 'actualEndTime',
          //width: '120px',
        },
        // {
        //   title: '实际用时',
        //   align: "center",
        //   dataIndex: 'actualWorkingHourQuota',
        // },
        // {
        //   title: '报工人',
        //   align: "center",
        //   dataIndex: 'maintenanceUserId'
        // },
        {
          title: '问题及相应处理措施描述',
          align: "center",
          dataIndex: 'description'
        },
        {
          title: '创建人',
          align: "center",
          dataIndex: 'createBy'
        },
        {
          title: '创建日期',
          align: "center",
          dataIndex: 'createTime',
          //width: '120px',
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: "center",
          fixed: "right",
          width: 300,
          scopedSlots: { customRender: 'action' }
        }
      ],
      url: {
        list: "/eam/dailyMaintenanceOrder/getDailyMaintenanceOrder3List",
        delete: "/eam/dailyMaintenanceOrder/delete",
        deleteBatch: "/eam/dailyMaintenanceOrder/deleteBatch",
        exportXlsUrl: "/eam/dailyMaintenanceOrder/exportXls",
        importExcelUrl: "eam/dailyMaintenanceOrder/importExcel",
        edit: "/eam/dailyMaintenanceOrder/editStatus",
        orderGet: "/eam/dailyMaintenanceOrder/orderGet",
      },
    }
  },
 
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    },
    rowSelection() {
      return {
        type: 'checkbox',
        onChange: (selectedRowKeys, selectedRows) => {
          this.selectedRowKeys = selectedRowKeys;
          this.onSelectChange(selectedRows);
        },
        getCheckboxProps: record => ({
          props: {
            disabled: record.distable
          },
        }),
        selectedRowKeys: this.selectedRowKeys,
      };
    },
  },
 
  methods: {
 
    // batchAssign() {
    //   this.$refs.MaintenanceOrderAssignModal.visible = true
    //   this.$refs.MaintenanceOrderAssignModal.title = '工单派工'
    //   this.$refs.MaintenanceOrderAssignModal.selectionRows
    //   this.$refs.MaintenanceOrderAssignModal.handleShow()
    //   this.$bus.$emit('selectionRows', this.selectionRows);
    // },
    onSelectChange(selectionRows) {
      this.selectionRows = selectionRows;
    },
 
    handlePrintPrecision(record) {
      let href = `${window._CONFIG['domianURL']}/jmreport/view/938231672512131072?id=` + record.id; //网站链接
      window.open(href, "_blank");
    },
 
    handlePrintCheck(record) {
      let href = `${window._CONFIG['domianURL']}/jmreport/view/934647514367975424?id=` + record.id; //网站链接
      window.open(href, "_blank");
    },
 
 
    handlePrintInfo(record) {
      let href = `${window._CONFIG['domianURL']}/jmreport/view/858930685061042176?id=` + record.id; //网站链接
      window.open(href, "_blank");
    },
 
    handlePrintTechnology(record) {
      let href = `${window._CONFIG['domianURL']}/jmreport/view/938226141894488064?id=` + record.id; //网站链接
      window.open(href, "_blank");
    },
 
    handlePrintStove(record) {
      let href = `${window._CONFIG['domianURL']}/jmreport/view/934611893956042752?id=` + record.id; //网站链接
      window.open(href, "_blank");
    },
 
    handleOrderExe(record) {
      this.$refs.DailyMaintenanceOrderExeDrawer.visible = true
      this.$refs.DailyMaintenanceOrderExeDrawer.title = '三级保养工单执行'
      this.$refs.DailyMaintenanceOrderExeDrawer.handleShow(record)
      if (record.status === '3') {
        this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true//保存、暂存、报工
        this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = true//撤销按钮
        this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = false//开工按钮
      } else if (record.status === '4') {
        this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = false
        this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = true
        this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = true
      } else if (record.status === '5') {
        this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true
        this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = false
        this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = true
      } else if (record.status === '7') {
        this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true
        this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = true
        this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = true
      }
    },
 
    handleFinish: function (record) {
      this.$refs.FinishDevolutionModal.edit(record);
      this.$refs.FinishDevolutionModal.title = "生产设备二级保养完工移交单";
      this.$refs.FinishDevolutionModal.disableSubmit = false;
    },
 
    handlePrecisionCheckOrder: function (record) {
      this.$refs.EquipmentPrecisionCheckOrderModal.edit(record);
      this.$refs.EquipmentPrecisionCheckOrderModal.title = "生产设备精度检验单";
      this.$refs.EquipmentPrecisionCheckOrderModal.disableSubmit = false;
    },
 
    handleTechnologyStatus: function (record) {
      // this.$refs.EquipmentTechnologyStatusModal.edit(record);
      // this.$refs.EquipmentTechnologyStatusModal.title = "技术状态编辑";
      // this.$refs.EquipmentTechnologyStatusModal.disableSubmit = false;
      this.$refs.TechnologyStatusAuthenticateModal.edit(record);
      this.$refs.TechnologyStatusAuthenticateModal.title = "技术状态编辑";
      this.$refs.TechnologyStatusAuthenticateModal.disableSubmit = false;
 
    },
 
    handleStoveDetection: function (record) {
      this.$refs.StoveCategoryModal.edit(record);
      this.$refs.StoveCategoryModal.title = "温度均匀性检测条件确认表";
      this.$refs.StoveCategoryModal.disableSubmit = false;
    },
    handleStoveReport: function (record) {
      this.$refs.StoveCategoryReportModal.add();
      this.$refs.StoveCategoryReportModal.title = "炉类设备报告上传";
      this.$refs.StoveCategoryReportModal.disableSubmit = false;
      this.$refs.StoveCategoryReportModal.maintenanceStandardId = record.id
      this.$refs.StoveCategoryReportModal.equipmentId = record.equipmentId
    },
 
    handleOrderChange: function (record) {
      this.$refs.MaintenanceOrderChangeModal.edit(record);
      this.$refs.MaintenanceOrderChangeModal.title = "温度均匀性检测条件确认表";
      this.$refs.MaintenanceOrderChangeModal.disableSubmit = false;
    },
 
    handleMaintenance3Receipt: function (record) {
      this.$refs.Maintenance3ReceiptModal.edit(record);
      this.$refs.Maintenance3ReceiptModal.title = "生产设备三级保养验收单";
      this.$refs.Maintenance3ReceiptModal.disableSubmit = false;
    },
 
    handleOrderIssue(record) {
      const that = this;
      requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => {
        if (res.success) {
          that.$message.success("工单下发成功!")
          that.loadData()
        } else {
          that.$message.warning("工单下发失败!")
        }
      })
    },
    //撤回
    handleOrderReset(record) {
      const that = this;
      requestPut(that.url.edit, { id: record.id, status: '1' }).then((res) => {
        if (res.success) {
          that.$message.success("工单撤回成功!")
          that.loadData()
        } else {
          that.$message.warning("工单撤回失败!")
        }
      })
    },
    handleOrderGet(record) {
      const that = this;
      requestPut(that.url.orderGet, { id: record.id, status: '1' }).then((res) => {
        if (res.success) {
          that.$message.success("工单领取成功!")
          that.loadData()
        } else {
          that.$message.warning("工单领取失败!")
        }
      })
    },
    //作废
    handleOrderCancel(record) {
      const that = this;
      requestPut(that.url.edit, { id: record.id, status: '7' }).then((res) => {
        if (res.success) {
          that.$message.success("工单作废成功!")
          that.loadData()
        } else {
          that.$message.warning("工单作废失败!")
        }
      })
    },
 
    //恢复
    handleOrderRecover(record) {
      const that = this;
      requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => {
        if (res.success) {
          that.$message.success("工单恢复成功!")
          that.loadData()
        } else {
          that.$message.warning("工单恢复失败!")
        }
      })
    },
 
    //改派
    handleAssignOrder: function (record) {
      this.$refs.MaintenanceOrderAssignModal.edit(record)
      this.$refs.MaintenanceOrderAssignModal.title = '工单改派'
      this.$refs.MaintenanceOrderAssignModal.disableSubmit = false
    },
 
    searchReset() {
      this.onClearSelected();
      this.queryParam = { maintenanceType: '3' }
      this.loadData(1);
      this.finishTime = []
    },
    // modalFormOk() {
    //   alert(0)
    //   // 新增/修改 成功时,重载列表
    //   this.loadData();
    //   //清空列表选中
    //   this.onClearSelected()
    // },
    timeChange() {
      this.queryParam.finishStartTime = moment(this.finishTime[0]).format("YYYY-MM-DD HH:mm:ss")
      this.queryParam.finishEndTime = moment(this.finishTime[1]).format("YYYY-MM-DD HH:mm:ss")
    },
 
    //预警颜色
    tableRowClass(record, index) {
      if ("1" == record.status || "2" == record.status) {
        if (record.yellowWarningTime < record.currentDateTime && record.currentDateTime < record.redWarningTime) {
          return 'yellow'
        } else if (record.redWarningTime < record.currentDateTime && record.currentDateTime < record.planStartTime) {
          return 'error'
        } else if (record.planStartTime < record.currentDateTime) {
          return 'frozenRowClass'
        }
      }
    },
  }
}
</script>
<style >
@import '~@assets/less/common.less';
.frozenRowClass {
  color: #c9c9c9;
  font-weight: bold;
}
.success {
  color: green;
}
.error {
  color: red;
  font-weight: bold;
}
.yellow {
  color: yellow;
  font-weight: bold;
}
.fontweight {
  font-weight: bold;
}
 
.ant-table-tbody .red {
  background-color: red !important;
}
</style>