Blame view

ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue 20.9 KB
李泰瑜 authored
1
<template>
xcq authored
2
  <a-card :bordered="false">
谭毅彬 authored
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
      <form id="container-form">
        <div class="select-list">
          <ul id="select_info">
            <li>
              <a-select
                show-search
                placeholder="请选择库区"
                option-filter-prop="children"
                v-model="zoneCode"
                @change="refresh"
                style="width: 200px">
                <a-select-option selected="0" id="zoneCode" v-for="item in zoneList" :key="item.name" :value="item.code">{{ item.name }}
                </a-select-option>
              </a-select>
            </li>
            <li>第
              <a-select
                show-search
                option-filter-prop="children"
                v-model="num"
                style="width: 70px">
                <a-select-option id="num" v-for="num in nums" :key="num" :value="num">{{ num }}
                </a-select-option>
              </a-select>
            </li>
            <li>
              <a-select
                show-search
                option-filter-prop="children"
                v-model="col"
                @change="refresh"
                style="width: 70px">
                <a-select-option id="col" v-for="item in colList" :key="item.name" :value="item.code">{{ item.name }}
                </a-select-option>
              </a-select>
            </li>
            <li>
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                <a-button type="primary" @click="search()" icon="search" style="margin-left: 8px;">查询</a-button>
42
                <a-button @click='expressDelivery()' type='primary' v-if="expressDeliveryVisible" style="margin-left: 8px;">平库出库</a-button>
肖超群 authored
43
                <a-button @click="expressStorage()" type="primary" v-if="expressStorageVisible" style="margin-left: 8px;">平库入库</a-button>
谭毅彬 authored
44
45
46
              </span>
            </li>
          </ul>
谭毅彬 authored
47
        </div>
谭毅彬 authored
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
      </form>
    <div class="col-sm-12 select-info">
      <form id="receiptHeader-form">
        <div class="select-list">
          <ul id="img_list">
            <li style="font-size: 12px">空柜空闲:<img src="~@/assets/icon/grid_rest.png"></li>
            <li style="font-size: 12px">空盘空闲:<img src="~@/assets/icon/grid_empty.png" alt=""></li>
            <li style="font-size: 12px">整盘空闲:<img src="~@/assets/icon/grid_all.png"></li>
            <li style="font-size: 12px">空柜锁定:<img src="~@/assets/icon/grid_emp_lock.png"></li>
            <li style="font-size: 12px">空盘锁定:<img src="~@/assets/icon/grid_empty_lock.png"></li>
            <li style="font-size: 12px">整盘锁定:<img src="~@/assets/icon/grid_all_lock.png"></li>
          </ul>
          <ul id="info_list">
            <li>
              <span style="font-size: 12px">库位统计情况:</span>
              <input style="width: 600px; font-size: 12px; border: none;" type="text" id="zone" disabled/>
            </li><br><br>
            <li><span>库位:</span><input type="text" style="width: 100px; font-size: 12px; border: none;" id="code" disabled/></li><br><br>
            <li><span>容器:</span><input type="text" style="width: 200px; font-size: 12px; border: none;" id="containerCode" disabled/></li><br><br>
            <li style="width: 100%;">
谭毅彬 authored
68
69
              <span style="height: 32px; line-height:26px;">物料:</span>
              <a-textarea v-model="materialInfo" auto-size style="padding: 4px 5px; width: 80%; font-size: 12px; resize: none; vertical-align:top; border: none;  box-shadow: none; outline:none;" readonly />
谭毅彬 authored
70
71
            </li>
          </ul>
李泰瑜 authored
72
        </div>
谭毅彬 authored
73
74
75
76
77
      </form>
    </div>
    <div class="col-sm-12 select-info">
      <div id="borderCol" style="overflow-y: auto;white-space:nowrap" v-show="showPrise">
        <div class="location" id="location"></div>
李泰瑜 authored
78
      </div>
谭毅彬 authored
79
80
81
      <a-spin tip="库位视图生成中..." :spinning="spinning">
        <a-skeleton active :loading="loading" :paragraph="{ rows: 5 }"/>
      </a-spin>
李泰瑜 authored
82
    </div>
谭毅彬 authored
83
84
    <ExpressStorageModal ref="ExpressStorageModal" @ok="search"></ExpressStorageModal>
    <ExpressDeliveryModal ref="ExpressDeliveryModal" @ok="search"></ExpressDeliveryModal>
xcq authored
85
  </a-card>
李泰瑜 authored
86
</template>
李泰瑜 authored
87
李泰瑜 authored
88
<script>
李泰瑜 authored
89
谭毅彬 authored
90
import huahengUI from '@/assets/css/huahengUI.css'
李泰瑜 authored
91
import $ from '../../../assets/js/jquery-1.11.1.min'
92
93
94
95
96
97
98
99
100
101
102
103
104
import grid_rest from '@/assets/icon/grid_rest.png'
import grid_empty from '@/assets/icon/grid_empty.png'
import grid_half from '@/assets/icon/grid_half.png'
import grid_all from '@/assets/icon/grid_all.png'
import grid_emp_waing from '@/assets/icon/grid_emp_waing.png'
import grid_empty_waring from '@/assets/icon/grid_empty_waring.png'
import grid_half_waring from '@/assets/icon/grid_half_waring.png'
import grid_all_waring from '@/assets/icon/ContainerDisabled.png'
import grid_emp_lock from '@/assets/icon/grid_emp_lock.png'
import grid_empty_lock from '@/assets/icon/grid_empty_lock.png'
import grid_half_lock from '@/assets/icon/grid_half_lock.png'
import grid_all_lock from '@/assets/icon/grid_all_lock.png'
import rel_empty from '@/assets/icon/rel_empty.png'
xcq authored
105
106
import {getInventoryDetailByLocationCode, getZoneList} from '@/api/api'
import ExpressDeliveryModal from "@views/system/monitor/modules/ExpressDeliveryModal";
107
import ExpressStorageModal from "@views/system/monitor/modules/ExpressStorageModal";
xcq authored
108
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
谭毅彬 authored
109
import {getAction, postAction} from "@api/manage";
xcq authored
110
李泰瑜 authored
111
112
113

export default {
  name: "locationStatus",
xcq authored
114
115
  mixins: [JeecgListMixin],
  components: {
116
    ExpressStorageModal,
xcq authored
117
118
    ExpressDeliveryModal
  },
李泰瑜 authored
119
120
121
122
123
  data() {
    return {
      spinning: true,
      loading: true,
      showPrise: false,
124
      expressDeliveryVisible: false,
谭毅彬 authored
125
126
      expressStorageVisible: false,
      col: "row",
谭毅彬 authored
127
      materialInfo: "",
谭毅彬 authored
128
129
130
131
132
      colList: [
        {code: "row", name: "行"},
        {code: "line", name: "列"},
        {code: "layer", name: "层"}
      ],
李泰瑜 authored
133
      zoneCode: '',
谭毅彬 authored
134
      zoneList: [],
谭毅彬 authored
135
136
      num: 1,
      nums: [],
李泰瑜 authored
137
      model: {},
谭毅彬 authored
138
139
140
141
142
143
144
145
146
147
      url: {
        getStatus: "/location/locationMonitor/getStatus",
        getLocationInfo: "/location/locationMonitor/getLocationInfo",
        getAllLocation: "/location/locationMonitor/getAllLocation"
      },
      grid_row: null,
      grid_line: null,
      grid_layer: null,
      list_info: null,
      currentLocationCode: 0,
李泰瑜 authored
148
149
150
    }
  },
  created() {
谭毅彬 authored
151
152
153
154
    this.loadFrom()
    window.gridMsg = this.gridMsg
    window.mClose = this.mClose
    window.lays = this.lays
李泰瑜 authored
155
156
  },
  mounted() {
谭毅彬 authored
157
158
159
160
161
162
163
164
165
166
167
168
169
    // 方法一:确保 .location 元素存在且已渲染
    const locationElement = document.querySelector('.location');
    if (locationElement) {
      const resizeObserver = new ResizeObserver(entries => {
        for (let entry of entries) {
          this.changeMargin();
        }
      });
      resizeObserver.observe(locationElement);
      setTimeout(() => {
        this.refresh(); // 使用箭头函数,this 指向 Vue 组件实例
      }, 1000);
    }
李泰瑜 authored
170
171
  },
  methods: {
谭毅彬 authored
172
173
174
    loadData() {
      // 空方法,为了覆盖混入文件中的方法,解决报错
    },
李泰瑜 authored
175
    loadFrom() {
李泰瑜 authored
176
      getZoneList().then((res) => {
李泰瑜 authored
177
        if (res.success) {
谭毅彬 authored
178
179
180
          this.zoneList = res.result;
          if (this.zoneList.length > 0) {
            this.zoneCode = this.zoneList[0].code;
李泰瑜 authored
181
182
183
          }
        }
      })
谭毅彬 authored
184
    },
谭毅彬 authored
185
186
187
188
189
190
191
192
193
194
    handleNumsSelect() {
      let col = this.col;
      if (col === "row") {
        this.nums = this.grid_row;
      } else if (col === "line") {
        this.nums = this.grid_line;
      } else if (col === "layer") {
        this.nums = this.grid_layer;
      } else {
        this.$message.warning("错误");
李泰瑜 authored
195
      }
李泰瑜 authored
196
    },
谭毅彬 authored
197
198
199
200
201
202
203
204
205
    refresh() {
      let url = this.url.getAllLocation
      getAction(url, {zoneCode: this.zoneCode}).then(res => {
        if (res.success) {
          this.grid_row = res.result.maxRow;
          this.grid_line = res.result.maxLine;
          this.grid_layer = res.result.maxLayer;
        } else {
          this.$message.warning(res.message)
李泰瑜 authored
206
        }
谭毅彬 authored
207
208
209
210
211
      }).finally(() => {
        this.handleNumsSelect();
        this.search();
      })
      this.locationStatistics();
李泰瑜 authored
212
213
214
    },
    //格子宽度
    changeMargin() {
215
216
217
218
      let box_width = 0;
      if (document.getElementById("location") != null) {
        box_width = document.getElementById("location").offsetWidth;
      }
李泰瑜 authored
219
      box_width = box_width - 80;
谭毅彬 authored
220
      let num = this.col;
李泰瑜 authored
221
222
      let grid_width;
      if (num === "layer" || num === "row") {
谭毅彬 authored
223
        grid_width = box_width / this.grid_line;
李泰瑜 authored
224
      } else if (num === "line") {
谭毅彬 authored
225
        grid_width = box_width / this.grid_row;
李泰瑜 authored
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
      }
      if (grid_width >= 50) {
        $(".grid").css({"width": "50px", "height": "50px"});
      } else if (grid_width <= 20) {
        $(".grid").css({"width": "20px", "height": "20px"});
      } else {
        $(".grid").css({"width": grid_width, "height": grid_width});
      }
    },
    //tips信息
    lays(x) {
      let $j = $(x);
      let row = $j.attr("data-i");
      let line = $j.attr("data-j");
      let layers = $j.attr("data-k");
      row = parseInt(row);
      line = parseInt(line);
      layers = parseInt(layers);
谭毅彬 authored
244
245
246
      if (this.list_info) {
        for (const element of this.list_info) {
          if (element.row === row && element.icolumn === line && element.layer === layers) {
李泰瑜 authored
247
248
            let str_info = '';
            let container_code = '';
谭毅彬 authored
249
250
251
252
253
254
255
            if (element.containerCode) {
              container_code = "\n容器编码:" + element.containerCode + "";
              if (element.materialName) {
                for (let j = 0; j < element.materialName.length; j++) {
                  let list_batch = element.batch[j].length == 0 ? "无" : element.batch[j];
                  let list_qty = element.qty[j];
                  str_info += "\n物料信息:批次->" + list_batch + ",物料名称->" + element.materialName[j] + ",物料编码->" + element.materialCode[j] + ",数量->" + list_qty + ""
李泰瑜 authored
256
257
258
                }
              }
            }
谭毅彬 authored
259
            let code = element.code === null ? "无" : element.code;
260
            $("[data-i='" + row + "']" + "[data-j='" + line + "']" + "[data-k='" + layers + "']").attr({"title": "第" + row + "行,第" + line + "列,第" + layers + "层\n库位:" + code + container_code + str_info});
李泰瑜 authored
261
          }
李泰瑜 authored
262
263
264
265
266
        }
      } else {
        return ""
      }
    },
xcq authored
267
    // 快速入库
谭毅彬 authored
268
    expressStorage() {
269
      let json = {
谭毅彬 authored
270
271
        "containerCode": this.currentContainerCode,
        "locationCode": this.currentLocationCode
272
273
      }
      this.$refs.ExpressStorageModal.edit(json);
xcq authored
274
275
    },
    // 获取库存信息
谭毅彬 authored
276
    getInventory(locationCode) {
xcq authored
277
278
279
280
281
282
283
      let params = {
        locationCode: locationCode
      }
      getInventoryDetailByLocationCode(params).then((res) => {
        if (res.success) {
          let parameter = [];
          let newArr = res.result.records;
谭毅彬 authored
284
285
          for (let i of newArr) {
            let param = {
xcq authored
286
              materialCode: i.materialCode,
287
              qty:i.qty,
肖超群 authored
288
              shipQty: 0,
xcq authored
289
              inventoryDetailId: i.id,
290
              containerCode: i.containerCode
xcq authored
291
292
293
294
295
296
297
298
299
300
            }
            parameter.push(param);
          }
          this.$refs.ExpressDeliveryModal.edit(parameter);
        } else {
          this.$message.error(res.message);
        }
      });
    },
    //快速出库
谭毅彬 authored
301
302
    expressDelivery() {
      this.getInventory(this.currentLocationCode);
xcq authored
303
    },
304
    // 显示快速出库
谭毅彬 authored
305
306
    revealExpressDelivery(code, materialCode) {
      this.expressDeliveryVisible = !!materialCode;
肖超群 authored
307
308
309
      if (this.zoneCode != 'P') {
        this.expressDeliveryVisible = false;
      }
310
311
    },
    // 显示快速入库
谭毅彬 authored
312
313
    revealExpressStorage(code) {
      this.expressStorageVisible = !!code;
肖超群 authored
314
315
316
      if (this.zoneCode != 'P') {
        this.expressStorageVisible = false;
      }
xcq authored
317
    },
李泰瑜 authored
318
    //关闭tips
谭毅彬 authored
319
    mClose(x) {
李泰瑜 authored
320
321
322
323
324
325
      //关闭
      // Vue.prototype.$Jnotification.error({message: '系统提示', description: "鼠标拿走了", duration: 4})
    },
    //库位信息请求和状态显示
    ajaxGrid(x, info) {
      let _this = this
谭毅彬 authored
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
      let url = this.url.getLocationInfo;
      postAction(url, info).then(res => {
        if (res.success) {
          if (x === "row") {
            for (let i = 0; i < res.result.length; i++) {
              let index = res.result[i].icolumn + ((res.result[i].layer - 1) * this.grid_line);
              index = index - 1;
              _this.resShow(res, index, i);
            }
            _this.clearLocation(this.grid_line, this.grid_layer);
          } else if (x === "line") {
            for (let i = 0; i < res.result.length; i++) {
              let index = res.result[i].row + ((res.result[i].layer - 1) * this.grid_row);
              index = index - 1;
              _this.resShow(res, index, i);
李泰瑜 authored
341
            }
谭毅彬 authored
342
343
344
345
346
347
348
349
            _this.clearLocation(this.grid_row, this.grid_layer);
          } else if (x === "layer") {
            for (let i = 0; i < res.result.length; i++) {
              let index = res.result[i].icolumn + ((res.result[i].row - 1) * this.grid_line);
              index = index - 1;
              _this.resShow(res, index, i);
            }
            _this.clearLocation(this.grid_line, this.grid_row);
李泰瑜 authored
350
          }
谭毅彬 authored
351
352
        } else {
          this.$message.error(res.message);
李泰瑜 authored
353
        }
谭毅彬 authored
354
355
356
        this.list_info = res.result;
      }).finally(() => {
李泰瑜 authored
357
358
359
360
      })
    },
    //库位请求的结果显示
    resShow(res, index, i) {
谭毅彬 authored
361
362
363
      let row = res.result[i].row;
      let jColumn = res.result[i].icolumn;
      let kLayer = res.result[i].layer;
李泰瑜 authored
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
      if (res.result[i].locationAttribute === "1") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_rest,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "2") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_empty,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "3") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_half,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "4") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_all,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "5") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_emp_lock,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "6") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_empty_lock,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "7") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_half_lock,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "8") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_all_lock,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "9") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_emp_waing,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "10") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_empty_waring,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "11") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_half_waring,
          "isTrue": 1
        });
      } else if (res.result[i].locationAttribute === "12") {
        $("[data-i='" + row + "']" + "[data-j='" + jColumn + "']" + "[data-k='" + kLayer + "']").attr({
          "src": grid_all_waring,
          "isTrue": 1
        });
      }
    },
    //清除将数据库中没有的库位
    clearLocation(x, y) {
      for (let j = 0; j < x * y; j++) {
谭毅彬 authored
429
430
        let $grid = $(".grid");
        let sta = $grid.eq(j).attr("isTrue");
李泰瑜 authored
431
        if (sta !== "1") {
谭毅彬 authored
432
          $grid.eq(j).attr({"src": rel_empty, "onmouseover": "", "onclick": ""});
李泰瑜 authored
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
        }
      }
      this.spinning = false;
      this.showPrise = true;
      this.loading = false;
    },
    //点击显示当前库位信息
    gridMsg(msg) {
      let $j = $(msg);
      let row = $j.attr("data-i");
      let line = $j.attr("data-j");
      let layers = $j.attr("data-k");
      row = parseInt(row);
      line = parseInt(line);
      layers = parseInt(layers);
谭毅彬 authored
448
449
450
      if (this.list_info) {
        for (const element of this.list_info) {
          if (element.row === row && element.icolumn === line && element.layer === layers) {
xcq authored
451
            let materialCode = '';
谭毅彬 authored
452
            //let $material = $("#material");
谭毅彬 authored
453
            if (element.materialName) {
谭毅彬 authored
454
              //$material.children().remove();
谭毅彬 authored
455
456
457
458
              let str_info = '';
              for (let j = 0; j < element.materialName.length; j++) {
                let list_batch = element.batch[j].length === 0 ? "无" : element.batch[j];
                let list_qty = element.qty[j];
谭毅彬 authored
459
                str_info += "批次->" + list_batch + ",物料名称->" + element.materialName[j] + ",物料编码->" + element.materialCode[j] + ",数量->" + list_qty;
谭毅彬 authored
460
                materialCode = element.materialCode[j];
谭毅彬 authored
461
462
463
                if (j !== element.materialName.length -1) {
                  str_info += "\r\n"
                }
李泰瑜 authored
464
              }
谭毅彬 authored
465
              this.materialInfo = str_info
李泰瑜 authored
466
            } else {
谭毅彬 authored
467
              this.materialInfo = "无"
李泰瑜 authored
468
            }
谭毅彬 authored
469
470
471
472
473
474
475
            let $code = $("#code");
            $code.val(element.code);
            $("#containerCode").val(element.containerCode === "" ? "无" : element.containerCode);
            this.currentContainerCode = element.containerCode;
            this.currentLocationCode = $code.val()
            this.revealExpressDelivery(element.code, materialCode);
            this.revealExpressStorage(element.code);
xcq authored
476
            break;
李泰瑜 authored
477
          }
李泰瑜 authored
478
479
480
481
482
483
        }
      } else {
        return ""
      }
    },
    //搜索平面库位
谭毅彬 authored
484
    search() {
李泰瑜 authored
485
486
487
      this.spinning = true;
      this.showPrise = false;
      this.loading = true;
谭毅彬 authored
488
489
      let col = this.col;
      let num = this.num;
李泰瑜 authored
490
      let data;
谭毅彬 authored
491
492
493
494

      $("#location").children().remove();
      let $location = $(".location");
      if (col === "row") {
谭毅彬 authored
495
        data = {zoneCode: this.zoneCode, row: num};
谭毅彬 authored
496
        for (let i = this.grid_layer; i > 0; i--) {
谭毅彬 authored
497
498
499
500
          if (i != this.grid_layer) {
            $location.append("<br>")
          }
          $location.append("<span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + i + "层</span>");
谭毅彬 authored
501
502
          for (let j = 1; j <= this.grid_line; j++) {
            $location.append("<img data-i=" + num + " data-j=" + j + " data-k=" + i + " class='grid' onmouseover='lays(this)' onmouseout='mClose(this)' onclick='gridMsg(this)'>");
李泰瑜 authored
503
504
          }
        }
谭毅彬 authored
505
      } else if (col === "line") {
谭毅彬 authored
506
        data = {zoneCode: this.zoneCode, line: num};
谭毅彬 authored
507
        for (let k = this.grid_layer; k > 0; k--) {
谭毅彬 authored
508
509
510
511
          if (k != this.grid_layer) {
            $location.append("<br>")
          }
          $location.append("<span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + k + "层</span>");
谭毅彬 authored
512
513
          for (let l = 1; l <= this.grid_row; l++) {
            $location.append("<img data-i=" + l + " data-j=" + num + " data-k=" + k + " class='grid' onmouseover='lays(this)' onmouseout='mClose(this)' onclick='gridMsg(this)'>");
李泰瑜 authored
514
515
          }
        }
谭毅彬 authored
516
      } else if (col === "layer") {
谭毅彬 authored
517
        data = {zoneCode: this.zoneCode, layer: num};
谭毅彬 authored
518
        for (let m = 1; m <= this.grid_row; m++) {
谭毅彬 authored
519
520
521
522
          if (m != 1) {
            $location.append("<br>")
          }
          $location.append("<span style='display: inline-block;text-align: right;width: 50px; margin-right: 10px;'>第" + m + "行</span>");
谭毅彬 authored
523
524
          for (let n = 1; n <= this.grid_line; n++) {
            $location.append("<img data-i=" + m + " data-j=" + n + " data-k=" + num + " class='grid' onmouseover='lays(this)' onmouseout='mClose(this)' onclick='gridMsg(this)'>");
李泰瑜 authored
525
526
          }
        }
李泰瑜 authored
527
      }
谭毅彬 authored
528
      this.ajaxGrid(col, data);
李泰瑜 authored
529
    },
谭毅彬 authored
530
531
532
533
534
535
536
537
    locationStatistics() {
      let url = this.url.getStatus;
      getAction(url, {zoneCode: this.zoneCode}).then(res => {
        if (res.success) {
          $("#zone").val("库位总数:" + res.result.location + ",空库位:" + res.result.emptyLocation +
            ",空托盘库位:" + res.result.haveContainLocation + ",有货库位:" + res.result.haveInventoryLocation)
        } else {
          this.$message.warning(res.message)
李泰瑜 authored
538
        }
谭毅彬 authored
539
540
      }).finally()
    }
李泰瑜 authored
541
  }
李泰瑜 authored
542
}
谭毅彬 authored
543
</script>