Blame view

src/main/resources/templates/shipment/shipmentHeader/edit.html 14.7 KB
tangying authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-shipmentHeader-edit" th:object="${shipmentHeader}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label">出库单号:</label>
                <div class="col-sm-8">
                    <input id="code" name="code" th:field="*{code}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">货主:</label>
                <div class="col-sm-8">
mahuandong authored
18
                    <select id="companyCode"  name="companyCode" class="form-control" th:with="list=${@companyService.selectCompanyByCurrentUserId()}" th:field="*{companyCode}"  readonly="readonly" disabled="disabled">
tangying authored
19
20
21
22
23
                        <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['id']}" th:attr="code = ${item['code']}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">	
mahuandong authored
24
                <label class="col-sm-3 control-label">上游订单号:</label>
tangying authored
25
                <div class="col-sm-8">
mahuandong authored
26
                    <input id="referCode" name="referCode" th:field="*{referCode}" class="form-control" type="text" readonly="readonly">
tangying authored
27
28
29
                </div>
            </div>
            <div class="form-group">	
mahuandong authored
30
                <label class="col-sm-3 control-label">订单平台:</label>
tangying authored
31
                <div class="col-sm-8">
mahuandong authored
32
                    <input id="referPlatform" name="referPlatform" th:field="*{referPlatform}" class="form-control" type="text" readonly="readonly">
tangying authored
33
34
35
36
37
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">出库单类型:</label>
                <div class="col-sm-8">
mahuandong authored
38
39
                    <select id="shipmentType" class="form-control" th:with="shipmentType=${@ShipmentTypeService.getType()}" th:field="*{shipmentType}" readonly="readonly" disabled="disabled">
                        <option  th:each="dict : ${shipmentType}" th:text="${dict['name']}" th:value="${dict['code']}"></option>
tangying authored
40
41
42
43
44
45
                    </select>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">客户编码:</label>
                <div class="col-sm-8">
mahuandong authored
46
                    <input id="customerCode" name="customerCode" th:field="*{customerCode}" class="form-control" type="text">
tangying authored
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
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">优先级:</label>
                <div class="col-sm-8">
                    <input id="priority" name="priority" th:field="*{priority}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">总数量:</label>
                <div class="col-sm-8">
                    <input id="totalQty" name="totalQty" th:field="*{totalQty}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">总行数:</label>
                <div class="col-sm-8">
                    <input id="totalLines" name="totalLines" th:field="*{totalLines}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">上传备注:</label>
                <div class="col-sm-8">
                    <input id="uploadremark" name="uploadremark" th:field="*{uploadremark}" class="form-control" type="text">
                </div>
            </div>-->
            <div class="form-group">	
mahuandong authored
74
                <label class="col-sm-3 control-label">要求到货时间:</label>
tangying authored
75
                <div class="col-sm-8">
mahuandong authored
76
                    <input id="requestedDeliveryDate" name="requestedDeliveryDate" th:field="*{requestedDeliveryDate}" class="form-control" type="text">
tangying authored
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">头状态:</label>
                <div class="col-sm-8">
                    <select id="firstStatus" class="form-control" th:with="shipmentStatus=${@dict.getType('shipmentHeaderStatus')}" th:field="*{firstStatus}"disabled="disabled">
                        <option  th:each="dict : ${shipmentStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}" ></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">尾状态:</label>
                <div class="col-sm-8">
                    <select id="lastStatus" class="form-control" th:with="shipmentStatus=${@dict.getType('shipmentHeaderStatus')}" th:field="*{lastStatus}" disabled="disabled">
                        <option  th:each="dict : ${shipmentStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}" ></option>
                    </select>
                </div>
            </div>
mahuandong authored
95
96
97
98
            <!--<div class="form-group">-->
                <!--<label class="col-sm-3 control-label">上传状态:</label>-->
                <!--<div class="col-sm-8">-->
                    <!--&lt;!&ndash;<input id="uploadStatus" name="uploadStatus" th:field="*{uploadStatus}" class="form-control" type="text" readonly="readonly">&ndash;&gt;-->
tangying authored
99
mahuandong authored
100
101
102
103
104
                    <!--<select id="uploadStatus" class="form-control" th:with="uploadStatus=${@dict.getType('uploadStatus')}" th:field="*{uploadStatus}" disabled="disabled">-->
                        <!--<option  th:each="dict : ${uploadStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}" ></option>-->
                    <!--</select>-->
                <!--</div>-->
            <!--</div>-->
tangying authored
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
            <!--<div class="form-group">	-->
                <!--<label class="col-sm-3 control-label">创建时间:</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input id="created" name="created" th:field="*{created}" class="form-control" type="text" readonly="readonly">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">	-->
                <!--<label class="col-sm-3 control-label">创建用户:</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input id="createdBy" name="createdBy" th:field="*{createdBy}" class="form-control" type="text" readonly="readonly">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">	-->
                <!--<label class="col-sm-3 control-label">最后修改时间:</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input id="lastUpdated" name="lastUpdated" th:field="*{lastUpdated}" class="form-control" type="text" readonly="readonly">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">	-->
                <!--<label class="col-sm-3 control-label">更新用户:</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input id="lastUpdatedBy" name="lastUpdatedBy" th:field="*{lastUpdatedBy}" class="form-control" type="text" readonly="readonly">-->
                <!--</div>-->
            <!--</div>-->
mahuandong authored
129
130
131
132
133
134
135
            <!--<div class="form-group">	-->
                <!--&lt;!&ndash;<label class="col-sm-3 control-label">是否有效:</label>&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="col-sm-8">&ndash;&gt;-->
                    <!--&lt;!&ndash;&lt;!&ndash;<input id="enable" name="enable" th:field="*{enable}" class="form-control" type="text">&ndash;&gt;&ndash;&gt;-->
                    <!--&lt;!&ndash;<input type="radio" name="enable" value="true" th:checked="*{enable}" >是&ndash;&gt;-->
                    <!--&lt;!&ndash;<input type="radio" name="enable" value="false" th:checked="*{enable}">否&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
tangying authored
136
137
                <!--<label class="col-sm-3 control-label">是否有效:</label>-->
                <!--<div class="col-sm-8">-->
mahuandong authored
138
139
140
141
142
143
144
                    <!--<div class="onoffswitch">-->
                        <!--<input type="checkbox" th:checked="${shipmentHeader.enable}" class="onoffswitch-checkbox" id="enable" name="enable">-->
                        <!--<label class="onoffswitch-label" for="enable">-->
                            <!--<span class="onoffswitch-inner"></span>-->
                            <!--<span class="onoffswitch-switch"></span>-->
                        <!--</label>-->
                    <!--</div>-->
tangying authored
145
                <!--</div>-->
mahuandong authored
146
            <!--</div>-->
tangying authored
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
            <!--<div class="form-group">-->
                <!--<label class="col-sm-3 control-label">扩展属性1:</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input id="userDef1" name="userDef1" th:field="*{userDef1}" class="form-control" type="text">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label class="col-sm-3 control-label">扩展属性2:</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input id="userDef2" name="userDef2" th:field="*{userDef2}" class="form-control" type="text">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label class="col-sm-3 control-label">扩展属性3:</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input id="userDef3" name="userDef3" th:field="*{userDef3}" class="form-control" type="text">-->
                <!--</div>-->
            <!--</div>-->
			<div class="form-group">
				<div class="form-control-static col-sm-offset-9">
                    <button type="submit" class="btn btn-primary">提交</button>
					<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
        var prefix = ctx + "shipment/shipmentHeader";

        $("#form-shipmentHeader-edit").validate({
            submitHandler: function(form) {
                // var tableValue = $.common.getTableValue("#form-shipmentHeader-edit");
                var tableValue = $("#form-shipmentHeader-edit").serialize();
mahuandong authored
181
                tableValue = formValueReplace(tableValue, "companyCode", $("#companyCode option:selected").attr("code"));
tangying authored
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
                $.operate.save(prefix + "/edit", tableValue);
            }
        });

        $(function () {
            layui.use('laydate', function() {
                var laydate = layui.laydate;
                laydate.render({ elem: '#appointmentTime', min:0 ,theme: 'molv' ,type: 'datetime'});
            });
        })

        // $("#form-shipmentHeader-edit").validate({
        //     rules:{
        //         // companyId:{
        //         //     required:true,
        //         // },
        //         companyCode:{
        //             required:true,
        //         },
        //         // priority:{
        //         //     required:true,
        //         //     digits:true,
        //         // },
        //         // totalQty:{
        //         //     required:false,
        //         //     digits:true,
        //         // },
        //         totalLines:{
        //             required:false,
        //             digits:true,
        //         },
        //     },
        //     submitHandler: function(form) {
        //         $.ajax({
        //             cache: true,
        //             type: "POST",
        //             url: prefix + "/edit",
        //             data: {
        //                 "id":$("#id").val(),
        //                 "code":$("#code").val(),
        //                 "companyId": $("#company option:selected").val(),
        //                 "companyCode": $("#company option:selected").attr("code"),
        //                 "sourceCode": $("input[name='sourceCode']").val(),
        //                 "sourcePlatform": $("input[name='sourcePlatform']").val(),
        //                 "type": $("#type option:selected").val(),
        //                 "shipTo": $("input[name='shipTo']").val(),
        //                 "priority": $("input[name='priority']").val(),
        //                 "station": $("input[name='station']").val(),
        //                 "totalQty": $("input[name='totalQty']").val(),
        //                 "totalLines": $("input[name='totalLines']").val(),
        //                 "remark": $("input[name='remark']").val(),
        //                 "uploadremark":$("#uploadremark").val(),
        //                 "uploadTime":$("#uploadTime").val(),
        //                 "appointmentTime": $("input[name='appointmentTime']").val(),
        //                 "firstStatus":$("#firstStatus").val(),
        //                 "lastStatus":$("#lastStatus").val(),
        //                 "uploadStatus":$("#uploadStatus").val(),
        //                 "enable": $("input[name='enable']").is(':checked'),
        //                 "userDef1": $("input[name='userDef1']").val(),
        //                 "userDef2": $("input[name='userDef2']").val(),
        //                 "userDef3": $("input[name='userDef3']").val(),
        //             },
        //             async: false,
        //             error: function (request) {
        //                 $.modal.alertError("请求失败!");
        //             },
        //             success: function (data) {
        //                 // $.operate.saveSuccess(data);
        //                 if (data.code == web_status.SUCCESS) {
        //                     layer.msg("保存成功,正在刷新数据请稍后……", {icon: $.modal.icon(modal_status.SUCCESS), time: 500, shade: [0.1, "#8F8F8F"]}, function () {
        //                         window.parent.detail(window.parent.shipmentid,window.parent.shipmentcode)
        //                     })
        //                 } else {
        //                     $.modal.alertError(data.msg)
        //                 }
        //             }
        //         });
        //     }
        // });
    </script>
</body>
</html>