Blame view

src/main/resources/templates/inventory/inventoryDetail/lockingWorkOrder.html 3.72 KB
易文鹏 authored
1
2
3
4
5
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body>
周鸿 authored
6
    <table width="100%" border="1" cellspacing="0" cellpadding="0"  class="dy-report"  align="center" borderColor="blue">
易文鹏 authored
7
8
        <tbody>
        <tr height="30px" align="center" valign="center">
周鸿 authored
9
10
11
12
13
14
            <th width="70px">库存id</th>
            <th width="120px">存货编码</th>
            <th width="120px">库位编码</th>
            <th width="100px">托盘编码</th>
            <th width="80px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
            <th width="200px">工作令</th>
易文鹏 authored
15
        </tr>
周鸿 authored
16
17
        </tbody>
        <tbody>
xumiao authored
18
        <tr th:each="row,rowStat : ${inventoryDetails}">
易文鹏 authored
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
            <td  scope="col" style="text-align:center">
                <input  name="id" th:value="*{row.id}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/>
            </td>
            <td  scope="col" style="text-align:center">
                <input  name="materialCode" th:value="*{row.materialCode}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/>
            </td>
            <td  scope="col" style="text-align:center">
                <input  name="locationCode" th:value="*{row.locationCode}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/>
            </td>
            <td  scope="col" style="text-align:center">
                <input  name="containerCode" th:value="*{row.containerCode}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/>
            </td>
            <td style="text-align:center; padding: 0">
                <input  name="lockingNum" th:value="*{row.qty}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/>
            </td>
            <td style="text-align:center; padding: 0">
                <input  name="workOrder"  class="form-control" type="text" style="text-align:center;height:30px;border: none" placeholder="请输入工作令"  required/>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="btn-group hidden-xs" id="toolbar-detail" role="group" style="padding:20px 0;" float="right">
        <a class="btn btn-outline btn-primary btn-rounded" onclick="yes()" >
            <i class="fa fa-plus"></i> 提交
        </a>
    </div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    function yes() {
        debugger
        var id = [];
        var workOrder = [];
        var lockingNum = [];
        $("input[name='id']").each(function () {
            id.push($(this).val());
        })
        $("input[name='workOrder']").each(function () {
            workOrder.push($(this).val());
        })
        $("input[name='lockingNum']").each(function () {
            lockingNum.push($(this).val());
        })
        no(id,workOrder,lockingNum)
    }
    function no(id,workOrder,lockingNum){
        var list=[];
        console.log(id);
        console.log(id.length);
        for(var i=0;i<id.length;i++){
            let a = id[i];
            let b = workOrder[i];
            let c = lockingNum[i];
            var data= {
                "id":a,
                "moCode":b,
               // "qty":c
            }
            list.push(data);
        }
        var data2 = JSON.stringify(list);
        $.ajax({
周鸿 authored
80
            url:ctx + 'inventory/inventoryDetail/lockingWorkOrders',
易文鹏 authored
81
82
83
84
85
86
87
88
89
90
91
92
93
94
            type: 'post',
            datatype: "json",
            data:{
                "json":data2
            },
            success : function (value) {
                debugger
                $.operate.saveSuccess(value);
            }
        });
    }
</script>
</body>
</html>