InventoryView.js
2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
layui.config({
base: "/js/"
}).use(['form', 'element', 'vue', 'layer', 'laydate', 'jquery', 'hhweb', 'table', 'utils', 'Universal'], function () {
var form = layui.form,
layer = layui.layer,
element = layui.element,
laydate = layui.laydate,
$ = layui.jquery,
table = layui.table,
Universal = layui.Universal;
var AreaName = 'task';
var TableName = 'TaskDetail';
var vm = new Vue({
el: '#PalletForm'
});
var PalletIn = new Vue({
data: {}
});
var mainList = {
//NoData: function () {
// return "<div id='background' style='width:100%;height:100%;background-image:url(../../images/NoData.png);background-repeat:no-repeat;background-size:cover;'>.</div>"
//},
mainList: function (vm) {
table.reload('mainList', {
url: "/" + "task" + "/" + "Task" + "/StationToInventory"
, where: { stationCode: vm }
, method: "post"
, text: { none: "暂无数据,请扫码容器编号!" }
// , text: { none: this.NoData() }
});
}
};
var selector = {
'TaskType': {
SelType: "FromDict",
SelFrom: "taskType",
SelModel: "TaskType",
SelLabel: "DictLabel",
SelValue: "DictValue",
Dom: [$("[name='TaskType']")]
},
'ContainerStatus': {
SelType: "FromDict",
SelFrom: "containerStatus",
SelModel: "ContainerStatus",
SelLabel: "DictLabel",
SelValue: "DictValue",
Dom: [$("[name='ContainerStatus']")]
},
'Type': {
SelType: "FromDict",
SelFrom: "containerType",
SelModel: "Type",
SelLabel: "DictLabel",
SelValue: "DictValue",
Dom: [$("[name='Type']")]
}
};
var vml = new Array({
vm: vm,
});
Universal.BindSelector($, form, vml, selector);
//站台选择
$(document).on("click", "#btnstation", function () {
layer.open({
title: '站台选择',
area: ["800px", "400px"],
type: 1,
content: $('#station'),
btn: ['确认'],
yes: function (index) {
$('#btnstation').text($('[name = "IsShou"]:checked').parent().text());
layer.close(index);
}
});
});
var time;
//打开页面聚焦“容器管理”
$(document).ready(function () {
time = setInterval(mainList.mainList($('[name = "IsShou"]:checked').val()),5000);
});
$('[name = "IsShou"]').change(function () {
clearInterval(time);
time = setInterval(mainList.mainList($('[name = "IsShou"]:checked').val()),5000);
});
});