Blame view

HHECS.Web/src/views/taskManage/taskModel_host.vue 53.9 KB
陈嘉新 authored
1
2
3
4
<template>
  <div class="app-container">
    <div class="app-container-father">
      <div class="dv-container-left">
陈嘉新 authored
5
6
7
        <el-form
          ref="form"
          :model="form"
陈嘉新 authored
8
9
          label-width="90px"
          style="width: 90%; margin-top: 20px"
陈嘉新 authored
10
        >
陈嘉新 authored
11
          <el-form-item :label="$t('taskManage.taskNumber')">
陈嘉新 authored
12
13
            <el-input
              v-model="queryConfig.taskNumber"
14
15
16
              :placeholder="
                $t('taskManage.PleaseEnter') + $t('taskManage.taskNumber')
              "
陈嘉新 authored
17
            ></el-input>
陈嘉新 authored
18
          </el-form-item>
陈嘉新 authored
19
          <el-form-item :label="$t('taskManage.remoteTask')">
陈嘉新 authored
20
21
            <el-input
              v-model="queryConfig.remoteTask"
22
23
24
              :placeholder="
                $t('taskManage.PleaseEnter') + $t('taskManage.remoteTask')
              "
陈嘉新 authored
25
            ></el-input>
陈嘉新 authored
26
          </el-form-item>
27
          <el-form-item :label="$t('taskManage.container')">
陈嘉新 authored
28
29
            <el-input
              v-model="queryConfig.barcode"
30
31
32
              :placeholder="
                $t('taskManage.PleaseEnter') + $t('taskManage.container')
              "
陈嘉新 authored
33
            ></el-input>
陈嘉新 authored
34
          </el-form-item>
35
          <el-form-item :label="$t('taskManage.form')">
陈嘉新 authored
36
37
            <el-input
              v-model="queryConfig.from"
38
39
40
              :placeholder="
                $t('taskManage.PleaseEnter') + $t('taskManage.form')
              "
陈嘉新 authored
41
            ></el-input>
陈嘉新 authored
42
          </el-form-item>
43
          <el-form-item :label="$t('taskManage.to')">
陈嘉新 authored
44
45
            <el-input
              v-model="queryConfig.to"
46
              :placeholder="$t('taskManage.PleaseEnter') + $t('taskManage.to')"
陈嘉新 authored
47
            ></el-input>
陈嘉新 authored
48
          </el-form-item>
49
50
51
52
53
54
55
          <el-form-item :label="$t('taskManage.status')">
            <el-select
              v-model="value"
              :placeholder="
                $t('taskManage.PleaseSelect') + $t('taskManage.status')
              "
            >
陈嘉新 authored
56
57
58
59
60
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
61
              />
陈嘉新 authored
62
            </el-select>
陈嘉新 authored
63
          </el-form-item>
64
          <el-form-item :label="$t('taskManage.startTime')">
陈嘉新 authored
65
            <el-date-picker
陈嘉新 authored
66
              v-model="form.startTime"
陈嘉新 authored
67
              type="datetime"
68
69
70
              :placeholder="
                $t('taskManage.PleaseSelect') + $t('taskManage.startTime')
              "
陈嘉新 authored
71
              style="width: 99%"
72
            />
陈嘉新 authored
73
          </el-form-item>
74
          <el-form-item :label="$t('taskManage.endTime')">
陈嘉新 authored
75
            <el-date-picker
陈嘉新 authored
76
              v-model="form.endTime"
陈嘉新 authored
77
              type="datetime"
78
79
80
              :placeholder="
                $t('taskManage.PleaseSelect') + $t('taskManage.endTime')
              "
陈嘉新 authored
81
              style="width: 99%"
82
            />
陈嘉新 authored
83
          </el-form-item>
陈嘉新 authored
84
陈嘉新 authored
85
86
87
          <el-form-item>
            <el-row>
              <el-col :span="8">
陈嘉新 authored
88
89
90
                <el-button
                  type="primary"
                  size="small"
陈嘉新 authored
91
                  icon="el-icon-search"
陈嘉新 authored
92
                  @click="btnAction()"
93
                  >{{ $t("taskManage.query") }}</el-button
陈嘉新 authored
94
95
96
                >
              </el-col>
              <el-col :span="8">
陈嘉新 authored
97
98
99
100
101
                <el-button
                  type="success"
                  size="small"
                  icon="el-icon-plus"
                  @click="btnAdd()"
102
                  >{{ $t("taskManage.Add") }}</el-button
陈嘉新 authored
103
                >
陈嘉新 authored
104
105
              </el-col>
              <el-col :span="8">
陈嘉新 authored
106
107
108
109
110
                <el-button
                  type="danger"
                  size="small"
                  icon="el-icon-delete"
                  @click="deleteData()"
111
                  >{{ $t("taskManage.delete") }}</el-button
陈嘉新 authored
112
                >
陈嘉新 authored
113
114
115
116
              </el-col>
            </el-row>
          </el-form-item>
          <el-form-item>
陈嘉新 authored
117
118
119
120
121
            <el-button
              type="success"
              size="small"
              icon="el-icon-upload"
              @click="issued()"
122
              >{{ $t("taskManage.Issued") }}</el-button
陈嘉新 authored
123
            >
陈嘉新 authored
124
125
126
127
128
            <el-button
              class="T1"
              icon="el-icon-download"
              size="small"
              @click="ExportList()"
129
              >{{ $t("taskManage.export") }}</el-button
陈嘉新 authored
130
            >
陈嘉新 authored
131
132
          </el-form-item>
          <el-form-item>
陈嘉新 authored
133
134
135
136
137
            <el-button
              class="T1"
              size="small"
              type="danger"
              @click="forceComplete()"
138
              >{{ $t("taskManage.ForcedCompletion") }}</el-button
陈嘉新 authored
139
            >
陈嘉新 authored
140
141
142
143
144
            <el-button
              class="T1"
              size="small"
              type="warning"
              @click="maintenance()"
145
              >{{ $t("taskManage.maintenance") }}</el-button
陈嘉新 authored
146
147
148
            >
          </el-form-item>
          <el-form-item>
149
150
151
            <el-button class="T1" size="small" @click="logoReset()">{{
              $t("taskManage.LogoReset")
            }}</el-button>
陈嘉新 authored
152
153
          </el-form-item>
        </el-form>
陈嘉新 authored
154
155
156
157
      </div>
      <div class="dv-container-right">
        <el-table
          v-loading="listLoading"
陈嘉新 authored
158
          :data="sysTable"
陈嘉新 authored
159
160
          element-loading-text="Loading"
          border
陈嘉新 authored
161
          highlight-current-row
陈嘉新 authored
162
          :height="TableHeight"
陈嘉新 authored
163
          @selection-change="handleSelectionChange"
陈嘉新 authored
164
165
          @row-click="handleRowClick"
          ref="multipleTable"
陈嘉新 authored
166
          :header-cell-style="{ color: '#000000' }"
陈嘉新 authored
167
        >
陈嘉新 authored
168
169
          <el-table-column type="selection" align="center" width="55">
          </el-table-column>
170
          <el-table-column align="center" :label="$t('taskManage.internal')">
陈嘉新 authored
171
            <template slot-scope="scope">
陈嘉新 authored
172
              {{ scope.row.id }}
陈嘉新 authored
173
174
            </template>
          </el-table-column>
175
          <el-table-column :label="$t('taskManage.remoteTask')" width="100">
陈嘉新 authored
176
            <template slot-scope="scope">
陈嘉新 authored
177
              {{ scope.row.remoteTask }}
陈嘉新 authored
178
179
            </template>
          </el-table-column>
180
          <el-table-column :label="$t('taskManage.RemotePreTask')" width="130">
陈嘉新 authored
181
            <template slot-scope="scope">
陈嘉新 authored
182
              {{ scope.row.preRemoteTask }}
陈嘉新 authored
183
184
            </template>
          </el-table-column>
185
          <el-table-column :label="$t('taskManage.container')" width="100">
陈嘉新 authored
186
            <template slot-scope="scope">
陈嘉新 authored
187
              {{ scope.row.barcode }}
陈嘉新 authored
188
189
            </template>
          </el-table-column>
190
          <el-table-column :label="$t('taskManage.TaskType')" width="100">
陈嘉新 authored
191
            <template slot-scope="scope">
陈嘉新 authored
192
              {{ scope.row.type }}
陈嘉新 authored
193
194
            </template>
          </el-table-column>
195
          <el-table-column :label="$t('taskManage.status')">
陈嘉新 authored
196
            <template slot-scope="scope">
陈嘉新 authored
197
              {{ scope.row.status }}
陈嘉新 authored
198
199
            </template>
          </el-table-column>
200
          <el-table-column :label="$t('taskManage.form')">
陈嘉新 authored
201
            <template slot-scope="scope">
陈嘉新 authored
202
              {{ scope.row.from }}
陈嘉新 authored
203
204
            </template>
          </el-table-column>
205
          <el-table-column :label="$t('taskManage.to')">
陈嘉新 authored
206
            <template slot-scope="scope">
陈嘉新 authored
207
              {{ scope.row.to }}
陈嘉新 authored
208
209
            </template>
          </el-table-column>
210
          <el-table-column :label="$t('taskManage.RoutePoint')" width="120">
陈嘉新 authored
211
            <template slot-scope="scope">
陈嘉新 authored
212
              {{ scope.row.approachPoint }}
陈嘉新 authored
213
214
            </template>
          </el-table-column>
215
          <el-table-column :label="$t('taskManage.currentNode')" width="120">
陈嘉新 authored
216
            <template slot-scope="scope">
陈嘉新 authored
217
              {{ scope.row.current }}
陈嘉新 authored
218
219
            </template>
          </el-table-column>
220
          <el-table-column :label="$t('taskManage.priority')">
陈嘉新 authored
221
            <template slot-scope="scope">
陈嘉新 authored
222
              {{ scope.row.priority }}
陈嘉新 authored
223
224
            </template>
          </el-table-column>
225
          <el-table-column :label="$t('taskManage.stage')">
陈嘉新 authored
226
            <template slot-scope="scope">
陈嘉新 authored
227
              {{ scope.row.mStage }}
陈嘉新 authored
228
229
            </template>
          </el-table-column>
230
          <el-table-column :label="$t('taskManage.TaskFeedback')" width="120">
陈嘉新 authored
231
            <template slot-scope="scope">
陈嘉新 authored
232
              {{ scope.row.commit }}
陈嘉新 authored
233
234
            </template>
          </el-table-column>
235
          <el-table-column :label="$t('taskManage.length')">
陈嘉新 authored
236
            <template slot-scope="scope">
陈嘉新 authored
237
              {{ scope.row.length }}
陈嘉新 authored
238
239
            </template>
          </el-table-column>
240
          <el-table-column :label="$t('taskManage.width')">
陈嘉新 authored
241
            <template slot-scope="scope">
陈嘉新 authored
242
              {{ scope.row.width }}
陈嘉新 authored
243
244
            </template>
          </el-table-column>
245
          <el-table-column :label="$t('taskManage.height')">
陈嘉新 authored
246
            <template slot-scope="scope">
陈嘉新 authored
247
              {{ scope.row.height }}
陈嘉新 authored
248
249
            </template>
          </el-table-column>
250
          <el-table-column :label="$t('taskManage.weight')">
陈嘉新 authored
251
            <template slot-scope="scope">
陈嘉新 authored
252
              {{ scope.row.weight }}
陈嘉新 authored
253
254
            </template>
          </el-table-column>
255
          <el-table-column :label="$t('taskManage.goodsType')" width="100">
陈嘉新 authored
256
            <template slot-scope="scope">
陈嘉新 authored
257
              {{ scope.row.goodsType }}
陈嘉新 authored
258
259
            </template>
          </el-table-column>
260
          <el-table-column :label="$t('taskManage.warehouseCode')" width="100">
陈嘉新 authored
261
            <template slot-scope="scope">
陈嘉新 authored
262
              {{ scope.row.warehouseCode }}
陈嘉新 authored
263
264
            </template>
          </el-table-column>
265
          <el-table-column :label="$t('taskManage.completeTime')" width="160">
陈嘉新 authored
266
            <template slot-scope="scope">
267
              {{ scope.row.completeTime }}
陈嘉新 authored
268
269
            </template>
          </el-table-column>
270
          <el-table-column :label="$t('taskManage.createdTime')" width="160">
陈嘉新 authored
271
            <template slot-scope="scope">
272
              {{ scope.row.created }}
陈嘉新 authored
273
274
            </template>
          </el-table-column>
275
          <el-table-column :label="$t('taskManage.founder')">
陈嘉新 authored
276
            <template slot-scope="scope">
277
              {{ scope.row.createdBy }}
陈嘉新 authored
278
279
            </template>
          </el-table-column>
280
          <el-table-column :label="$t('taskManage.updateTime')" width="160">
陈嘉新 authored
281
            <template slot-scope="scope">
282
              {{ scope.row.updated }}
陈嘉新 authored
283
284
            </template>
          </el-table-column>
285
          <el-table-column :label="$t('taskManage.UpdatePerson')">
陈嘉新 authored
286
            <template slot-scope="scope">
287
              {{ scope.row.updatedBy }}
陈嘉新 authored
288
289
            </template>
          </el-table-column>
陈嘉新 authored
290
        </el-table>
陈嘉新 authored
291
292
293
        <!-- 分页 -->
        <div class="pagination-container">
          <el-pagination
陈嘉新 authored
294
295
296
297
            style="margin-top: 15px"
            align="center"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
陈嘉新 authored
298
            :current-page="queryConfig.currentPage"
陈嘉新 authored
299
            :page-sizes="[20, 50, 100]"
陈嘉新 authored
300
            :page-size="queryConfig.pageSize"
陈嘉新 authored
301
            layout="total, sizes, prev, pager, next, jumper"
陈嘉新 authored
302
            :total="total"
陈嘉新 authored
303
          />
陈嘉新 authored
304
        </div>
陈嘉新 authored
305
      </div>
陈嘉新 authored
306
      <!-- 新增弹框 -->
陈嘉新 authored
307
      <el-dialog
308
        :title="$t('taskManage.mainTaskAdd')"
陈嘉新 authored
309
        :visible.sync="dialogFormVisible"
陈嘉新 authored
310
        width="30%"
陈嘉新 authored
311
      >
陈嘉新 authored
312
        <el-form label-width="120px">
陈嘉新 authored
313
314
          <el-row :gutter="20">
            <el-col :span="12">
315
              <el-form-item :label="$t('taskManage.TaskType')">
陈嘉新 authored
316
317
                <el-select
                  v-model="elAddDialog.type"
318
319
320
                  :placeholder="
                    $t('taskManage.PleaseSelect') + $t('taskManage.TaskType')
                  "
陈嘉新 authored
321
                >
陈嘉新 authored
322
323
324
325
326
327
328
329
330
331
                  <el-option
                    v-for="item in optionsAdd"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
332
              <el-form-item :label="$t('taskManage.priority')">
陈嘉新 authored
333
334
                <el-input
                  v-model="elAddDialog.priority"
335
336
337
                  :placeholder="
                    $t('taskManage.PleaseEnter') + $t('taskManage.priority')
                  "
陈嘉新 authored
338
                />
陈嘉新 authored
339
340
341
342
343
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
344
              <el-form-item :label="$t('taskManage.container')">
陈嘉新 authored
345
346
                <el-input
                  v-model="elAddDialog.barcode"
347
348
349
                  :placeholder="
                    $t('taskManage.PleaseEnter') + $t('taskManage.container')
                  "
陈嘉新 authored
350
                />
陈嘉新 authored
351
352
353
              </el-form-item>
            </el-col>
            <el-col :span="12">
354
355
356
357
358
359
360
              <el-form-item :label="$t('taskManage.form')">
                <el-input
                  v-model="elAddDialog.from"
                  :placeholder="
                    $t('taskManage.PleaseEnter') + $t('taskManage.form')
                  "
                />
陈嘉新 authored
361
362
363
364
365
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
366
              <el-form-item :label="$t('taskManage.RoutePoint')">
陈嘉新 authored
367
368
                <el-input
                  v-model="elAddDialog.approachPoint"
369
370
371
                  :placeholder="
                    $t('taskManage.PleaseEnter') + $t('taskManage.RoutePoint')
                  "
陈嘉新 authored
372
                />
陈嘉新 authored
373
374
375
              </el-form-item>
            </el-col>
            <el-col :span="12">
376
377
378
379
380
381
382
              <el-form-item :label="$t('taskManage.to')">
                <el-input
                  v-model="elAddDialog.to"
                  :placeholder="
                    $t('taskManage.PleaseEnter') + $t('taskManage.to')
                  "
                />
陈嘉新 authored
383
384
385
386
387
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
388
              <el-form-item :label="$t('taskManage.warehouseCode')">
陈嘉新 authored
389
390
391
                <el-input
                  v-model="elAddDialog.warehouseCode"
                  :disabled="true"
392
393
394
395
                  :placeholder="
                    $t('taskManage.PleaseEnter') +
                    $t('taskManage.warehouseCode')
                  "
396
                />
陈嘉新 authored
397
398
399
400
401
402
403
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label=""> </el-form-item>
            </el-col>
          </el-row>
        </el-form>
陈嘉新 authored
404
        <div slot="footer" class="dialog-footer">
405
406
407
408
          <el-button type="primary" @click="taskAdd()">{{
            $t("taskManage.create")
          }}</el-button>
          <el-button @click="close()">{{ $t("taskManage.cancel") }}</el-button>
陈嘉新 authored
409
410
        </div>
      </el-dialog>
陈嘉新 authored
411
      <!-- 维护弹框 -->
412
      <el-dialog
413
        :title="$t('taskManage.mainTaskMaintenance')"
414
415
416
        :visible.sync="dialogFormVisibleTwo"
        :showClose="false"
      >
陈嘉新 authored
417
418
        <div class="containerTwo">
          <div class="box1">
陈嘉新 authored
419
            <div class="dv-title" style="margin-left: 10px">
陈嘉新 authored
420
421
              当前任务号:{{ elMaintenance.id
              }}<el-button @click="reset()" class="T1" style="margin-left: 10px"
陈嘉新 authored
422
423
424
425
                >重置所有</el-button
              >
            </div>
            <div></div>
陈嘉新 authored
426
427
428
          </div>
          <div class="box2">
            <div class="small-box">
429
430
431
              <div class="dv-title">
                {{ $t("taskManage.RemoteTaskMaintenance") }}
              </div>
陈嘉新 authored
432
433
              <div class="inner-box2">
                <div class="inner-inner-box1">
434
435
436
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.remoteTask") }}
                  </div>
陈嘉新 authored
437
                  <div class="dv-maintenance-text2">
陈嘉新 authored
438
439
                    <el-input
                      v-model="elMaintenance.remoteTask"
440
441
442
443
                      :placeholder="
                        $t('taskManage.PleaseEnter') +
                        $t('taskManage.remoteTask')
                      "
陈嘉新 authored
444
                    />
陈嘉新 authored
445
                  </div>
陈嘉新 authored
446
                  <div class="dv-maintenance-text3">
447
448
449
                    <el-button class="T1" @click="remoteTaskModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
450
451
452
                  </div>
                </div>
                <div class="inner-inner-box2">
453
454
455
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.RemotePreTask") }}
                  </div>
陈嘉新 authored
456
                  <div class="dv-maintenance-text2">
陈嘉新 authored
457
458
                    <el-input
                      v-model="elMaintenance.preRemoteTask"
459
460
461
462
                      :placeholder="
                        $t('taskManage.PleaseEnter') +
                        $t('taskManage.RemotePreTask')
                      "
陈嘉新 authored
463
                    />
陈嘉新 authored
464
                  </div>
陈嘉新 authored
465
                  <div class="dv-maintenance-text3">
466
467
468
                    <el-button class="T1" @click="preRemoteTaskModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
469
470
471
472
473
                  </div>
                </div>
              </div>
            </div>
            <div class="small-box">
474
475
476
              <div class="dv-title">
                {{ $t("taskManage.positionMaintenance") }}
              </div>
陈嘉新 authored
477
478
              <div class="inner-box2">
                <div class="inner-inner-box1">
479
480
481
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.form") }}
                  </div>
陈嘉新 authored
482
                  <div class="dv-maintenance-text2">
陈嘉新 authored
483
484
                    <el-input
                      v-model="elMaintenance.from"
485
486
487
                      :placeholder="
                        $t('taskManage.PleaseEnter') + $t('taskManage.form')
                      "
陈嘉新 authored
488
                    />
陈嘉新 authored
489
                  </div>
陈嘉新 authored
490
                  <div class="dv-maintenance-text3">
491
492
493
                    <el-button class="T1" @click="formModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
494
495
496
                  </div>
                </div>
                <div class="inner-inner-box2">
497
498
499
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.to") }}
                  </div>
陈嘉新 authored
500
                  <div class="dv-maintenance-text2">
陈嘉新 authored
501
502
                    <el-input
                      v-model="elMaintenance.to"
503
504
505
                      :placeholder="
                        $t('taskManage.PleaseEnter') + $t('taskManage.to')
                      "
陈嘉新 authored
506
                    />
陈嘉新 authored
507
                  </div>
陈嘉新 authored
508
                  <div class="dv-maintenance-text3">
509
510
511
                    <el-button class="T1" @click="toModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
512
513
514
515
516
                  </div>
                </div>
              </div>
            </div>
            <div class="small-box">
517
518
519
              <div class="dv-title">
                {{ $t("taskManage.stageMaintenance") }}
              </div>
陈嘉新 authored
520
521
              <div class="inner-box2">
                <div class="inner-inner-box1">
522
523
524
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.stage") }}
                  </div>
陈嘉新 authored
525
                  <div class="dv-maintenance-text2">
陈嘉新 authored
526
527
                    <el-select
                      v-model="elMaintenance.mStage"
528
529
530
                      :placeholder="
                        $t('taskManage.PleaseSelect') + $t('taskManage.stage')
                      "
陈嘉新 authored
531
532
533
534
535
536
537
538
                    >
                      <el-option
                        v-for="item in optionsStage"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
陈嘉新 authored
539
                  </div>
陈嘉新 authored
540
                  <div class="dv-maintenance-text3">
541
542
543
                    <el-button class="T1" @click="mStageModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
544
545
546
547
548
549
                  </div>
                </div>
                <div class="inner-inner-box2"></div>
              </div>
            </div>
            <div class="small-box">
550
551
552
              <div class="dv-title">
                {{ $t("taskManage.RoutePointMaintenance") }}
              </div>
陈嘉新 authored
553
554
              <div class="inner-box2">
                <div class="inner-inner-box1">
555
556
557
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.RoutePoint") }}
                  </div>
陈嘉新 authored
558
                  <div class="dv-maintenance-text2">
陈嘉新 authored
559
                    <el-select
陈嘉新 authored
560
561
                      v-model="elMaintenance.approachPoint"
                      multiple
562
563
564
565
                      :placeholder="
                        $t('taskManage.PleaseSelect') +
                        $t('taskManage.RoutePoint')
                      "
陈嘉新 authored
566
567
568
569
570
571
                    >
                      <el-option
                        v-for="item in optionsPick"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
陈嘉新 authored
572
573
                      >
                      </el-option>
陈嘉新 authored
574
                    </el-select>
陈嘉新 authored
575
                  </div>
陈嘉新 authored
576
                  <div class="dv-maintenance-text3">
577
578
579
                    <el-button class="T1" @click="approachPointModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
580
581
582
583
584
                  </div>
                </div>
              </div>
            </div>
            <div class="small-box">
585
586
587
              <div class="dv-title">
                {{ $t("taskManage.statusMaintenance") }}
              </div>
陈嘉新 authored
588
589
              <div class="inner-box2">
                <div class="inner-inner-box1">
590
591
592
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.status") }}
                  </div>
陈嘉新 authored
593
                  <div class="dv-maintenance-text2">
陈嘉新 authored
594
595
                    <el-select
                      v-model="elMaintenance.status"
596
597
598
                      :placeholder="
                        $t('taskManage.PleaseSelect') + $t('taskManage.status')
                      "
陈嘉新 authored
599
600
601
602
603
604
605
606
                    >
                      <el-option
                        v-for="item in optionsStatus"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
陈嘉新 authored
607
                  </div>
陈嘉新 authored
608
                  <div class="dv-maintenance-text3">
609
610
611
                    <el-button class="T1" @click="statusModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
612
613
614
615
616
                  </div>
                </div>
              </div>
            </div>
            <div class="small-box">
617
618
619
              <div class="dv-title">
                {{ $t("taskManage.priorityMaintenance") }}
              </div>
陈嘉新 authored
620
621
              <div class="inner-box2">
                <div class="inner-inner-box1">
622
623
624
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.priority") }}
                  </div>
陈嘉新 authored
625
                  <div class="dv-maintenance-text2">
陈嘉新 authored
626
627
                    <el-input
                      v-model="elMaintenance.priority"
628
629
630
                      :placeholder="
                        $t('taskManage.PleaseEnter') + $t('taskManage.priority')
                      "
陈嘉新 authored
631
                    />
陈嘉新 authored
632
                  </div>
陈嘉新 authored
633
                  <div class="dv-maintenance-text3">
634
635
636
                    <el-button class="T1" @click="priorityModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
637
638
639
640
641
                  </div>
                </div>
              </div>
            </div>
            <div class="small-box">
642
643
644
              <div class="dv-title">
                {{ $t("taskManage.CurrentDeviceMaintenance") }}
              </div>
陈嘉新 authored
645
646
              <div class="inner-box2">
                <div class="inner-inner-box1">
647
648
649
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.currentNode") }}
                  </div>
陈嘉新 authored
650
                  <div class="dv-maintenance-text2">
陈嘉新 authored
651
652
                    <el-select
                      v-model="elMaintenance.current"
653
654
655
656
                      :placeholder="
                        $t('taskManage.PleaseSelect') +
                        $t('taskManage.currentNode')
                      "
陈嘉新 authored
657
658
659
660
661
662
663
664
                    >
                      <el-option
                        v-for="item in optionsDevice"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
陈嘉新 authored
665
                  </div>
陈嘉新 authored
666
                  <div class="dv-maintenance-text3">
667
668
669
                    <el-button class="T1" @click="currentModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
670
671
672
673
674
                  </div>
                </div>
              </div>
            </div>
            <div class="small-box">
675
676
677
              <div class="dv-title">
                {{ $t("taskManage.TaskFeedbackMaintenance") }}
              </div>
陈嘉新 authored
678
679
              <div class="inner-box2">
                <div class="inner-inner-box1">
680
681
682
                  <div class="dv-maintenance-text">
                    {{ $t("taskManage.TaskFeedback") }}
                  </div>
陈嘉新 authored
683
                  <div class="dv-maintenance-text2">
陈嘉新 authored
684
685
                    <el-select
                      v-model="elMaintenance.commit"
686
687
688
689
                      :placeholder="
                        $t('taskManage.PleaseEnter') +
                        $t('taskManage.TaskFeedback')
                      "
陈嘉新 authored
690
691
692
693
694
695
696
697
                    >
                      <el-option
                        v-for="item in optionsCommitd"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
陈嘉新 authored
698
                  </div>
陈嘉新 authored
699
                  <div class="dv-maintenance-text3">
700
701
702
                    <el-button class="T1" @click="commitModify()">{{
                      $t("taskManage.modify")
                    }}</el-button>
陈嘉新 authored
703
704
705
706
707
                  </div>
                </div>
              </div>
            </div>
          </div>
陈嘉新 authored
708
          <div class="box3">
709
710
711
            <div class="dv-title">
              {{ $t("taskManage.goodsCategoryMaintenance") }}
            </div>
陈嘉新 authored
712
713
            <div class="dv-maintenance2">
              <div class="dv-maintenance2-left">
714
715
716
                <div class="dv-maintenance-text">
                  {{ $t("taskManage.length") }}
                </div>
陈嘉新 authored
717
                <div class="dv-maintenance-text2">
陈嘉新 authored
718
719
                  <el-input
                    v-model="elMaintenance.length"
720
721
722
                    :placeholder="
                      $t('taskManage.PleaseEnter') + $t('taskManage.length')
                    "
陈嘉新 authored
723
                  />
陈嘉新 authored
724
725
                </div>
                <div class="dv-maintenance-text3">
726
727
728
                  <el-button class="T1" @click="lengthModify()">{{
                    $t("taskManage.modify")
                  }}</el-button>
陈嘉新 authored
729
730
731
                </div>
              </div>
              <div class="dv-maintenance2-right">
732
733
734
                <div class="dv-maintenance-text">
                  {{ $t("taskManage.width") }}
                </div>
陈嘉新 authored
735
                <div class="dv-maintenance-text2">
陈嘉新 authored
736
737
                  <el-input
                    v-model="elMaintenance.width"
738
739
740
                    :placeholder="
                      $t('taskManage.PleaseEnter') + $t('taskManage.width')
                    "
陈嘉新 authored
741
                  />
陈嘉新 authored
742
743
                </div>
                <div class="dv-maintenance-text3">
744
745
746
                  <el-button class="T1" @click="widthModify()">{{
                    $t("taskManage.modify")
                  }}</el-button>
陈嘉新 authored
747
748
749
750
751
                </div>
              </div>
            </div>
            <div class="dv-maintenance3">
              <div class="dv-maintenance3-left">
752
753
754
                <div class="dv-maintenance-text">
                  {{ $t("taskManage.height") }}
                </div>
陈嘉新 authored
755
                <div class="dv-maintenance-text2">
陈嘉新 authored
756
757
                  <el-input
                    v-model="elMaintenance.height"
758
759
760
                    :placeholder="
                      $t('taskManage.PleaseEnter') + $t('taskManage.height')
                    "
陈嘉新 authored
761
                  />
陈嘉新 authored
762
763
                </div>
                <div class="dv-maintenance-text3">
764
765
766
                  <el-button class="T1" @click="heightModify()">{{
                    $t("taskManage.modify")
                  }}</el-button>
陈嘉新 authored
767
768
769
                </div>
              </div>
              <div class="dv-maintenance3-right">
770
771
772
                <div class="dv-maintenance-text">
                  {{ $t("taskManage.weight") }}
                </div>
陈嘉新 authored
773
                <div class="dv-maintenance-text2">
陈嘉新 authored
774
775
                  <el-input
                    v-model="elMaintenance.weight"
776
777
778
                    :placeholder="
                      $t('taskManage.PleaseEnter') + $t('taskManage.weight')
                    "
陈嘉新 authored
779
                  />
陈嘉新 authored
780
781
                </div>
                <div class="dv-maintenance-text3">
782
783
784
                  <el-button class="T1" @click="weightModify()">{{
                    $t("taskManage.modify")
                  }}</el-button>
陈嘉新 authored
785
786
787
788
                </div>
              </div>
            </div>
            <div class="dv-maintenance4">
789
790
791
              <div class="dv-maintenance-text">
                {{ $t("taskManage.goodsType") }}
              </div>
陈嘉新 authored
792
              <div class="dv-maintenance-text2">
陈嘉新 authored
793
794
                <el-input
                  v-model="elMaintenance.goodsType"
795
796
797
                  :placeholder="
                    $t('taskManage.PleaseEnter') + $t('taskManage.goodsType')
                  "
陈嘉新 authored
798
                />
陈嘉新 authored
799
800
              </div>
              <div class="dv-maintenance-text3">
801
802
803
                <el-button class="T1" @click="goodsTypeModify()">{{
                  $t("taskManage.modify")
                }}</el-button>
陈嘉新 authored
804
805
806
              </div>
            </div>
          </div>
陈嘉新 authored
807
808
        </div>
        <div slot="footer" class="dialog-footer">
809
          <el-button @click="close()">{{ $t("taskManage.cancel") }}</el-button>
陈嘉新 authored
810
811
        </div>
      </el-dialog>
陈嘉新 authored
812
813
814
815
816
    </div>
  </div>
</template>

<script>
陈嘉新 authored
817
818
819
820
821
822
823
import {
  getHostType,
  getTableList,
  AddMTask,
  DeleteTaskByIds,
  SendTaskToWCS,
  CompleteTask,
陈嘉新 authored
824
  GetMTaskById,
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
  RemoteTaskEdit,
  PreRemoteTaskEdit,
  FromEdit,
  ToEdit,
  PriorityEdit,
  LengthEdit,
  WidthEdit,
  HeightEdit,
  WeightEdit,
  GoodsTypeEdit,
  MStageEdit,
  ApproachPointEdit,
  StatusEdit,
  CurrentEdit,
  CommitEdit,
陈嘉新 authored
840
  ResetTaskCommitFlag,
841
} from "@/api/taskManagement/host";
陈嘉新 authored
842
import downloadFile from "@/api/user";
陈嘉新 authored
843
844
845
export default {
  data() {
    return {
陈嘉新 authored
846
847
848
849
      sysTable: [],
      //   查询条件
      queryConfig: {
        currentPage: 1,
陈嘉新 authored
850
        pageSize: 20,
陈嘉新 authored
851
852
853
854
855
        taskNumber: "",
        remoteTask: "",
        barcode: "",
        from: "",
        to: "",
陈嘉新 authored
856
      },
陈嘉新 authored
857
858
859
860
      //新增参数
      elAddDialog: {
        remoteTask: "",
        preRemoteTask: "",
陈嘉新 authored
861
        type: "",
陈嘉新 authored
862
        from: "",
陈嘉新 authored
863
        to: "",
陈嘉新 authored
864
        approachPoint: "",
陈嘉新 authored
865
866
        barcode: "",
        priority: 0,
陈嘉新 authored
867
        warehouseCode: "CS0001",
陈嘉新 authored
868
869
        platform: "WCS",
      },
陈嘉新 authored
870
      //维护弹出层条件
陈嘉新 authored
871
      elMaintenance: {},
陈嘉新 authored
872
      total: 0,
陈嘉新 authored
873
      listLoading: false,
陈嘉新 authored
874
      dialogFormVisible: false,
陈嘉新 authored
875
876
      dialogFormVisibleTwo: false,
      name: "",
陈嘉新 authored
877
878
      options: [
        {
陈嘉新 authored
879
          value: "",
880
          label: "",
陈嘉新 authored
881
        },
陈嘉新 authored
882
      ],
陈嘉新 authored
883
      optionsAdd: [],
陈嘉新 authored
884
885
886
887
888
      optionsCommitd: [],
      optionsStatus: [],
      optionsStage: [],
      optionsDevice: [],
      optionsPick: [],
陈嘉新 authored
889
      value: "",
陈嘉新 authored
890
891
      form: {
        startTime: this.$moment()
陈嘉新 authored
892
893
894
          .subtract(7, "days")
          .format("YYYY-MM-DD 00:00:00"),
        endTime: this.$moment().add(1, "days").format("YYYY-MM-DD 23:59:59"),
陈嘉新 authored
895
      },
陈嘉新 authored
896
      multipleSelection: [],
897
      userCode: "",
陈嘉新 authored
898
      export: "api/MTask/ExportMTask",
陈嘉新 authored
899
    };
陈嘉新 authored
900
901
  },
  created() {
902
    this.options[0].label = this.$t("taskManage.all");
陈嘉新 authored
903
    this.dictionary("MTaskStatus", 1);
陈嘉新 authored
904
    this.getTableList();
905
    this.userCode = this.$store.state.user.name;
陈嘉新 authored
906
  },
陈嘉新 authored
907
908
909
910
911
  computed: {
    TableHeight() {
      return `calc(100vh - 200px )`;
    },
  },
陈嘉新 authored
912
  methods: {
陈嘉新 authored
913
914
915
    handleRowClick(row) {
      this.$refs.multipleTable.toggleRowSelection(row);
    },
陈嘉新 authored
916
917
    //字典表数据
    dictionary(data, key) {
陈嘉新 authored
918
919
920
921
922
      this.optionsCommitd = [];
      this.optionsStatus = [];
      this.optionsStage = [];
      this.optionsDevice = [];
      this.optionsPick = [];
陈嘉新 authored
923
      this.optionsAdd = [];
陈嘉新 authored
924
925
926
927
928
929
      let params = { Code: data };
      getHostType(params).then((response) => {
        response.data.dictDetails.forEach((x) => {
          if (data == "CommitFlags") {
            this.optionsCommitd.push({ value: x.code, label: x.name });
          } else if (data == "MTaskStatus") {
陈嘉新 authored
930
931
932
933
934
            if (key == 1) {
              this.options.push({ value: x.code, label: x.name });
            } else {
              this.optionsStatus.push({ value: x.code, label: x.name });
            }
陈嘉新 authored
935
936
937
938
939
940
941
942
943
944
945
946
947
948
          } else if (data == "MTaskStage") {
            this.optionsStage.push({ value: x.code, label: x.name });
          } else if (data == "SRM") {
            this.optionsDevice.push({ value: x.code, label: x.name });
          } else if (data == "SRMInStation") {
            this.optionsDevice.push({ value: x.code, label: x.name });
          } else if (data == "SRMOutStation") {
            this.optionsDevice.push({ value: x.code, label: x.name });
          } else if (data == "SRMInOrOutStation") {
            this.optionsDevice.push({ value: x.code, label: x.name });
          } else if (data == "PickPort") {
            this.optionsPick.push({ value: x.code, label: x.name });
          } else if (data == "OutPort") {
            this.optionsPick.push({ value: x.code, label: x.name });
陈嘉新 authored
949
950
951
952
953
          } else if (data == "MTaskType") {
            this.optionsAdd.push({ value: x.code, label: x.name });
            if (this.optionsAdd.length > 0) {
              this.elAddDialog.type = this.optionsAdd[0].value;
            }
陈嘉新 authored
954
955
956
957
          }
        });
      });
    },
陈嘉新 authored
958
    //查询按钮
陈嘉新 authored
959
    btnAction() {
陈嘉新 authored
960
      this.getTableList();
陈嘉新 authored
961
    },
陈嘉新 authored
962
    //新增按钮
陈嘉新 authored
963
    btnAdd() {
陈嘉新 authored
964
      this.dictionary("MTaskType");
陈嘉新 authored
965
      this.dialogFormVisible = true;
陈嘉新 authored
966
    },
陈嘉新 authored
967
968
969
970
    //新增创建按钮
    taskAdd() {
      const params = this.elAddDialog;
      this.listLoading = true;
陈嘉新 authored
971
972
973
974
      AddMTask(params).then((response) => {
        if (response.code == "Success") {
          this.getTableList();
          this.$message({
陈嘉新 authored
975
            message: this.$t("deviceManage.dataOperationSuccessful"),
陈嘉新 authored
976
977
978
979
980
981
982
983
            type: "success",
          });
        }
      });
    },
    //删除按钮
    deleteData() {
      if (this.multipleSelection.length == 0) {
陈嘉新 authored
984
985
986
987
988
989
990
        this.$alert(
          this.$t("deviceManage.PleaseSelectAtLeastOnePieceOfData"),
          this.$t("deviceManage.deleteOperation"),
          {
            confirmButtonText: this.$t("deviceManage.sure"),
          }
        );
陈嘉新 authored
991
      } else {
陈嘉新 authored
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
        this.$alert(
          this.$t("deviceManage.areYouSureToDeleteTheData"),
          this.$t("deviceManage.deleteOperation"),
          {
            confirmButtonText: this.$t("deviceManage.sure"),
            callback: (action) => {
              if (action === "confirm") {
                let prams = [];
                this.multipleSelection.forEach((x) => {
                  prams.push(x.id);
                });
                DeleteTaskByIds(prams).then((response) => {
                  if (response.code == "Success") {
                    this.getTableList();
                    this.messge(response);
                  }
                });
陈嘉新 authored
1009
              }
陈嘉新 authored
1010
1011
1012
            },
          }
        );
陈嘉新 authored
1013
1014
1015
1016
1017
      }
    },
    //下发按钮
    issued() {
      if (this.multipleSelection.length == 0) {
陈嘉新 authored
1018
1019
1020
1021
1022
1023
1024
        this.$alert(
          this.$t("deviceManage.PleaseSelectAtLeastOnePieceOfData"),
          this.$t("deviceManage.issueOperation"),
          {
            confirmButtonText: this.$t("deviceManage.sure"),
          }
        );
陈嘉新 authored
1025
1026
1027
1028
1029
1030
1031
1032
      } else {
        let prams = [];
        this.multipleSelection.forEach((x) => {
          prams.push(x.id);
        });
        SendTaskToWCS(prams).then((response) => {
          if (response.code == "Success") {
            this.getTableList();
陈嘉新 authored
1033
            this.messge(response);
陈嘉新 authored
1034
1035
1036
1037
1038
1039
1040
1041
1042
          }
        });
      }
    },
    //导出按钮
    ExportList() {
      const params = {
        pageNumber: this.queryConfig.currentPage,
        perPageCount: this.queryConfig.pageSize,
陈嘉新 authored
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
        queryConfig: {
          taskNo: this.queryConfig.taskNumber,
          remoteTask: this.queryConfig.remoteTask,
          barcode: this.queryConfig.barcode,
          from: this.queryConfig.from,
          to: this.queryConfig.to,
          taskStatus: this.value,
          begin: this.form.startTime,
          end: this.form.endTime,
        },
陈嘉新 authored
1053
      };
陈嘉新 authored
1054
      let text = this.$t("taskManage.mainTaskData") + ".xlsx";
陈嘉新 authored
1055
1056
      // 调用下载函数
      downloadFile(this.export, params, text);
陈嘉新 authored
1057
1058
    },
    //获取表格行数据
陈嘉新 authored
1059
1060
    handleSelectionChange(val) {
      this.multipleSelection = val;
陈嘉新 authored
1061
1062
1063
    },
    // 表格数据
    getTableList() {
1064
      const params = {
陈嘉新 authored
1065
1066
        pageNumber: this.queryConfig.currentPage,
        perPageCount: this.queryConfig.pageSize,
陈嘉新 authored
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
        queryConfig: {
          taskNo: this.queryConfig.taskNumber,
          remoteTask: this.queryConfig.remoteTask,
          barcode: this.queryConfig.barcode,
          from: this.queryConfig.from,
          to: this.queryConfig.to,
          taskStatus: this.value,
          begin: this.form.startTime,
          end: this.form.endTime,
        },
陈嘉新 authored
1077
      };
陈嘉新 authored
1078
      this.listLoading = true;
陈嘉新 authored
1079
      getTableList(params).then((response) => {
陈嘉新 authored
1080
        this.total = response.data.totalCount;
陈嘉新 authored
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
        response.data.data.forEach((x) => {
          switch (x.mStage) {
            case 0:
              x.mStage = "入库";
              break;
            case 1:
              x.mStage = "出库";
              break;
            case 2:
              x.mStage = "库内";
              break;
            default:
              break;
          }
          switch (x.type) {
            case 0:
              x.type = "入库";
              break;
            case 1:
              x.type = "出库";
              break;
            case 2:
              x.type = "移库";
              break;
            case 4:
              x.type = "换站";
              break;
            case 8:
              x.type = "分拣";
              break;
            default:
              break;
          }
          switch (x.commit) {
            case 0:
              x.commit = "未提交";
              break;
            case 1:
              x.commit = "已提交";
              break;
            case 2:
              x.commit = "无需提交";
              break;
            case 3:
              x.commit = "提交失败";
              break;
            default:
              break;
          }
          switch (x.status) {
            case 0:
              x.status = "任务创建";
              break;
            case 10:
              x.status = "任务下发";
              break;
            case 20:
              x.status = "堆垛机任务创建";
              break;
            case 30:
              x.status = "堆垛机任务完成";
              break;
            case 40:
              x.status = "响应接出口请求";
              break;
            case 50:
              x.status = "到达分拣口";
              break;
            case 60:
              x.status = "分拣回库中";
              break;
            case 70:
              x.status = "响应接入位置到达";
              break;
            case 100:
              x.status = "任务完成";
              break;
            case 130:
              x.status = "任务异常结束";
              break;
            case "UnCompleted":
              x.status = "任务未完成";
              break;
            default:
              break;
          }
        });
陈嘉新 authored
1168
        this.sysTable = response.data.data;
陈嘉新 authored
1169
        this.listLoading = false;
陈嘉新 authored
1170
1171
1172
1173
1174
      });
    },
    // 强制完成按钮
    forceComplete() {
      if (this.multipleSelection.length == 1) {
陈嘉新 authored
1175
1176
1177
1178
1179
1180
        let prams = {
          id: this.multipleSelection[0].id,
        };
        CompleteTask(prams).then((response) => {
          if (response.code == "Success") {
            this.getTableList();
陈嘉新 authored
1181
            this.messge(response);
陈嘉新 authored
1182
1183
          }
        });
陈嘉新 authored
1184
1185
1186
1187
      } else {
        this.elAlert();
      }
    },
陈嘉新 authored
1188
1189
    //回传标志重置
    logoReset() {
陈嘉新 authored
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
      this.$alert(
        this.$t("taskManage.taskFlag"),
        this.$t("taskManage.resetTheReturnFlag"),
        {
          confirmButtonText: this.$t("deviceManage.sure"),
          callback: (action) => {
            if (action === "confirm") {
              let prams = {
                warehouseCode: this.elAddDialog.warehouseCode,
              };
              ResetTaskCommitFlag(prams).then((response) => {
                if (response.code == "Success") {
                  this.$message({
                    type: "info",
                    message: this.$t("deviceManage.resetSuccessful"),
                  });
                }
陈嘉新 authored
1207
1208
              });
            }
陈嘉新 authored
1209
1210
1211
          },
        }
      );
陈嘉新 authored
1212
    },
陈嘉新 authored
1213
    // 维护按钮
陈嘉新 authored
1214
    maintenance() {
陈嘉新 authored
1215
      if (this.multipleSelection.length == 1) {
陈嘉新 authored
1216
1217
1218
        this.dictionary("CommitFlags");
        this.dictionary("MTaskStatus");
        this.dictionary("MTaskStage");
陈嘉新 authored
1219
陈嘉新 authored
1220
1221
1222
1223
        this.dictionary("SRM");
        this.dictionary("SRMInStation");
        this.dictionary("SRMOutStation");
        this.dictionary("SRMInOrOutStation");
陈嘉新 authored
1224
陈嘉新 authored
1225
1226
        this.dictionary("PickPort");
        this.dictionary("OutPort");
陈嘉新 authored
1227
1228
1229
1230
1231
        let params = {
          id: this.multipleSelection[0].id,
        };
        GetMTaskById(params).then((response) => {
          if (response.code == "Success") {
陈嘉新 authored
1232
1233
1234
1235
            if (
              response.data.approachPoint == "" ||
              response.data.approachPoint == null
            ) {
陈嘉新 authored
1236
1237
1238
1239
1240
1241
1242
              response.data.approachPoint = [];
            } else {
              response.data.approachPoint = response.data.approachPoint
                .split(", ")
                .map((item) => item.trim());
            }
陈嘉新 authored
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
            switch (response.data.mStage) {
              case 0:
                response.data.mStage = "In";
                break;
              case 1:
                response.data.mStage = "Out";
                break;
              case 2:
                response.data.mStage = "InStore";
                break;
              default:
                break;
            }
            switch (response.data.commit) {
              case 0:
                response.data.commit = "Uncommited";
                break;
              case 1:
                response.data.commit = "Commited";
                break;
              case 2:
                response.data.commit = "UnNeedCommit";
                break;
              case 3:
                response.data.commit = "CommitFailure";
                break;
              default:
                break;
            }
            switch (response.data.status) {
              case 0:
                response.data.status = "Create";
                break;
              case 10:
                response.data.status = "TaskSend";
                break;
              case 20:
                response.data.status = "SRMTaskCreated";
                break;
              case 30:
                response.data.status = "SRMTaskCompleted";
                break;
              case 40:
                response.data.status = "OutStationRequest";
                break;
              case 50:
                response.data.status = "ArrivePickStation";
                break;
              case 60:
                response.data.status = "PickStationToStore";
                break;
              case 70:
                response.data.status = "InStationArrived";
                break;
              case 100:
                response.data.status = "TaskCompleted";
                break;
              case 130:
                response.data.status = "TaskErrorCompleted";
                break;
              case "UnCompleted":
                response.data.status = "UnCompleted";
                break;
              default:
                break;
            }
            this.elMaintenance = response.data;
            this.dialogFormVisibleTwo = true;
          }
        });
陈嘉新 authored
1313
1314
1315
      } else {
        this.elAlert();
      }
陈嘉新 authored
1316
    },
陈嘉新 authored
1317
    //分页
陈嘉新 authored
1318
1319
    handleSizeChange(val) {
      this.queryConfig.pageSize = val;
陈嘉新 authored
1320
      this.queryConfig.currentPage = 1;
陈嘉新 authored
1321
1322
1323
1324
1325
      this.getTableList();
    },

    handleCurrentChange(val) {
      this.queryConfig.currentPage = val;
陈嘉新 authored
1326
1327
      this.getTableList();
    },
陈嘉新 authored
1328
    //提示数据
陈嘉新 authored
1329
    elAlert() {
陈嘉新 authored
1330
1331
      this.$alert(this.$t("deviceManage.PleaseSelectApieceOfData"), "", {
        confirmButtonText: this.$t("deviceManage.sure"),
陈嘉新 authored
1332
1333
      });
    },
陈嘉新 authored
1334
    //维护重置
陈嘉新 authored
1335
    reset() {
1336
      this.maintenance();
陈嘉新 authored
1337
    },
1338
1339
    //远程任务号
    remoteTaskModify() {
陈嘉新 authored
1340
      let prams = this.pramsData(this.elMaintenance.remoteTask, 0);
1341
1342
1343
1344
1345
1346
1347
1348
      RemoteTaskEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //前置远程任务号
    preRemoteTaskModify() {
陈嘉新 authored
1349
      let prams = this.pramsData(this.elMaintenance.preRemoteTask, 0);
1350
1351
1352
1353
1354
1355
1356
1357
      PreRemoteTaskEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //起点
    formModify() {
陈嘉新 authored
1358
      let prams = this.pramsData(this.elMaintenance.from, 0);
1359
1360
1361
1362
1363
1364
1365
1366
      FromEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //终点
    toModify() {
陈嘉新 authored
1367
      let prams = this.pramsData(this.elMaintenance.to, 0);
1368
1369
1370
1371
1372
1373
1374
1375
      ToEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //优先级
    priorityModify() {
陈嘉新 authored
1376
      let prams = this.pramsData(this.elMaintenance.priority, 0);
1377
1378
1379
1380
1381
1382
1383
1384
      PriorityEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //长
    lengthModify() {
陈嘉新 authored
1385
      let prams = this.pramsData(this.elMaintenance.length, 0);
1386
1387
1388
1389
1390
1391
1392
1393
      LengthEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //宽
    widthModify() {
陈嘉新 authored
1394
      let prams = this.pramsData(this.elMaintenance.width, 0);
1395
1396
1397
1398
1399
1400
1401
1402
      WidthEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //高
    heightModify() {
陈嘉新 authored
1403
      let prams = this.pramsData(this.elMaintenance.height, 0);
1404
1405
1406
1407
1408
1409
1410
1411
      HeightEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //重
    weightModify() {
陈嘉新 authored
1412
      let prams = this.pramsData(this.elMaintenance.weight, 0);
1413
1414
1415
1416
1417
1418
1419
1420
      WeightEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //货物类型
    goodsTypeModify() {
陈嘉新 authored
1421
      let prams = this.pramsData(this.elMaintenance.goodsType, 0);
1422
1423
1424
1425
1426
1427
1428
1429
      GoodsTypeEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //阶段
    mStageModify() {
陈嘉新 authored
1430
      let prams = this.pramsData(this.elMaintenance.mStage, 0);
1431
1432
1433
1434
1435
1436
1437
1438
      MStageEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //途径点
    approachPointModify() {
陈嘉新 authored
1439
      let prams = this.pramsData(this.elMaintenance.approachPoint, 1);
1440
1441
1442
1443
1444
1445
1446
1447
      ApproachPointEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //任务状态
    statusModify() {
陈嘉新 authored
1448
      let prams = this.pramsData(this.elMaintenance.status, 0);
1449
1450
1451
1452
1453
1454
1455
1456
      StatusEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //当前设备
    currentModify() {
陈嘉新 authored
1457
      let prams = this.pramsData(this.elMaintenance.current, 0);
陈嘉新 authored
1458
      console.log(prams, "prams");
1459
1460
1461
1462
1463
1464
1465
1466
      CurrentEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
    //任务回传
    commitModify() {
陈嘉新 authored
1467
      let prams = this.pramsData(this.elMaintenance.commit, 0);
1468
1469
1470
1471
1472
1473
      CommitEdit(prams).then((response) => {
        if (response.code == "Success") {
          this.messge(response);
        }
      });
    },
陈嘉新 authored
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
    //维护修改参数
    pramsData(data, key) {
      let item;
      if (key == 1) {
        let lst = data,
          result = lst.join(", ");
        item = {
          id: this.multipleSelection[0].id,
          data: result,
          userCode: this.userCode,
        };
      } else {
        item = {
          id: this.multipleSelection[0].id,
          data: data,
          userCode: this.userCode,
        };
      }
      return item;
    },
1494
1495
1496
1497
1498
1499
    messge(response) {
      this.$message({
        message: response.msg,
        type: "success",
      });
    },
陈嘉新 authored
1500
1501
    close() {
      this.getTableList();
陈嘉新 authored
1502
      this.dialogFormVisible = false;
陈嘉新 authored
1503
1504
      this.dialogFormVisibleTwo = false;
    },
陈嘉新 authored
1505
1506
  },
};
陈嘉新 authored
1507
</script>
陈嘉新 authored
1508
<style lang="scss">
陈嘉新 authored
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
::v-deep.el-table thead {
  color: #101010;
  font-weight: 600;
}
/* 自定义滚动条样式 */
.el-table__body-wrapper {
  overflow: auto; /* 使表格内容可滚动 */
}

.el-table__body-wrapper::-webkit-scrollbar {
  height: 8px; /* 设置滚动条高度 */
}

.el-table__body-wrapper::-webkit-scrollbar-thumb {
  background-color: #c0c4cc; /* 滚动条颜色 */
  border-radius: 4px; /* 滚动条圆角 */
}

.el-table__body-wrapper::-webkit-scrollbar-track {
  background: #f5f7fa; /* 滚动条轨道颜色 */
}
陈嘉新 authored
1530
1531
1532
1533
1534
1535
1536
1537
.app-container-father {
  width: 100%;
  height: 100%;
  margin: 0px;
  padding: 0px;
  display: flex;
  .dv-container-left {
    width: 20%;
陈嘉新 authored
1538
    // background-color: #eeeeee;
陈嘉新 authored
1539
    height: 85vh;
1540
    // border-radius: 7px;
陈嘉新 authored
1541
    box-shadow: 5px 0 10px rgba(0, 0, 0, 0.3);
陈嘉新 authored
1542
    overflow: auto;
陈嘉新 authored
1543
  }
陈嘉新 authored
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
  /* 自定义滚动条样式 */
  .dv-container-left::-webkit-scrollbar {
    width: 8px; /* 设置滚动条的宽度 */
  }

  .dv-container-left::-webkit-scrollbar-thumb {
    background-color: #c0c4cc; /* 滚动条的颜色 */
    border-radius: 4px; /* 滚动条的圆角 */
  }

  .dv-container-left::-webkit-scrollbar-track {
    background: #f5f7fa; /* 滚动条轨道的颜色 */
  }
陈嘉新 authored
1557
1558
1559
1560
  .dv-container-right {
    width: 79%;
    height: 88vh;
    margin-left: 1%;
陈嘉新 authored
1561
    .pagination-container {
陈嘉新 authored
1562
      text-align: center; /* 使分页组件靠右 */
陈嘉新 authored
1563
1564
1565
      margin-top: 20px; /* 添加顶部间距 */
    }
  }
陈嘉新 authored
1566
1567
1568
1569
1570

  .containerTwo {
    width: 100%;
    border: 1px solid #ccc; /* 大 div 的边框 */
    overflow: auto;
陈嘉新 authored
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
    margin-top: -30px;
    .dv-title {
      height: 30px; /* 第一个子 div 的高度 */
      display: flex; /* 使用 Flexbox */
      justify-content: center; /* 水平居中 */
      align-items: center; /* 垂直居中 */
      font-weight: 700;
    }
    .dv-maintenance-text {
      width: 35%;
      height: 100%;
      display: flex;
      justify-content: flex-end; /* 内容靠右 */
      align-items: center; /* 垂直居中 */
    }
    .dv-maintenance-text2 {
      width: 35%;
      height: 100%;
      display: flex;
      justify-content: center; /* 内容靠右 */
      align-items: center; /* 垂直居中 */
    }
    .dv-maintenance-text3 {
      width: 30%;
      height: 100%;
      display: flex;
      justify-content: center; /* 内容靠右 */
      align-items: center; /* 垂直居中 */
    }
陈嘉新 authored
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
  }
  .box1 {
    width: 100%;
    height: 50px; /* 修改后的高度 */
    display: flex; /* 使用 Flexbox */
    flex-wrap: wrap; /* 超出换行 */
    align-items: center; /* 垂直居中对齐 */
  }
  .box2 {
    width: 100%;
    display: flex; /* 使用 Flexbox */
    flex-wrap: wrap; /* 超出换行 */
    align-items: center; /* 垂直居中对齐 */
陈嘉新 authored
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
    .small-box {
      width: 50%; /* 每个小 div 的宽度 */
      box-sizing: border-box; /* 包含边框和内边距 */
      border: 1px solid #ccc; /* 大 div 的边框 */
    }
    .inner-box2 {
      height: 100px; /* 第二个子 div 的高度 */
      display: flex; /* 使用 Flexbox */
      flex-direction: column; /* 垂直排列子 div */
    }
    .inner-inner-box1 {
      height: 45%; /* 第一个内层子 div 的高度 */
      display: flex; /* 使用 Flexbox */
      justify-content: center; /* 水平居中 */
      align-items: center; /* 垂直居中 */
    }
    .inner-inner-box2 {
      height: 50%; /* 第二个内层子 div 的高度 */
      display: flex; /* 使用 Flexbox */
      justify-content: center; /* 水平居中 */
      align-items: center; /* 垂直居中 */
    }
    .inner-inner-box3 {
      height: 100%; /* 第三个内层子 div 的高度 */
      display: flex; /* 使用 Flexbox */
    }
陈嘉新 authored
1639
1640
  }
  .box3 {
陈嘉新 authored
1641
    width: 70%;
陈嘉新 authored
1642
    height: 100px;
陈嘉新 authored
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
    margin: auto;
    .dv-maintenance1 {
      width: 100%;
      height: 30px;
      display: flex;
      justify-content: center; /* 水平居中 */
      align-items: center; /* 垂直居中 */
      border: 1px solid #ccc; /* 大 div 的边框 */
    }
    .dv-maintenance2 {
      width: 100%;
      height: 50px;
      display: flex;
      border: 1px solid #ccc; /* 大 div 的边框 */
      .dv-maintenance2-left {
        width: 50%;
        height: 100%;
        display: flex;
      }
      .dv-maintenance2-right {
        width: 50%;
        height: 100%;
        display: flex;
      }
    }
    .dv-maintenance3 {
      width: 100%;
      height: 50px;
      display: flex;
      border: 1px solid #ccc; /* 大 div 的边框 */
      .dv-maintenance3-left {
        width: 50%;
        height: 100%;
        display: flex;
      }
      .dv-maintenance3-right {
        width: 50%;
        height: 100%;
        display: flex;
      }
    }
    .dv-maintenance4 {
      width: 50%;
      height: 50px;
      margin: auto;
      display: flex; /* 使用 Flexbox */
      justify-content: center; /* 内容靠左 */
      align-items: center; /* 垂直居中对齐 */
      border: 1px solid #ccc; /* 大 div 的边框 */
    }
陈嘉新 authored
1693
  }
陈嘉新 authored
1694
1695
1696
1697
1698
  /* 修改复选框大小 */
  .el-table .el-checkbox {
    transform: scale(1.8) !important; /* 调整大小 */
    margin-top: 5px;
  }
陈嘉新 authored
1699
1700
1701
  .T1 {
    border: 1px solid #b3d8ff;
  }
陈嘉新 authored
1702
1703
1704
1705
  .button-col {
    display: flex;
    justify-content: flex-end; /* 按钮靠右对齐 */
  }
陈嘉新 authored
1706
1707
}
</style>