| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出入库单子号:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="code" th:field="*{code}" class="form-control" type="text"> |
| | | <input name="code" th:field="*{code}" class="form-control" type="text" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">管材名称:</label> |
| | | <label class="col-sm-3 control-label">材料名称:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="tubName" th:field="*{tubName}" class="form-control" type="text"> |
| | | <input name="tubName" th:field="*{tubName}" class="form-control" type="text" placeholder="请填写材料名称" required> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">类型:</label> |
| | | <div class="col-sm-8"> |
| | | <select name="type" class="form-control m-b"> |
| | | <option value="">所有</option> |
| | | </select> |
| | | <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="form-group"> --> |
| | | <!-- <label class="col-sm-3 control-label">类型:</label>--> |
| | | <!-- <div class="col-sm-8">--> |
| | | <!-- <select name="type" class="form-control m-b">--> |
| | | <!-- <option value="">所有</option>--> |
| | | <!-- </select>--> |
| | | <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出库时间:</label> |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | | <span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
| | | <input name="outboundDate" th:value="${#dates.format(tubLog.outboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | <input id="outboundDateId" name="outboundDate" th:value="${#dates.format(tubLog.outboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | | <span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
| | | <input name="inboundDate" th:value="${#dates.format(tubLog.inboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | <input id="inboundDateId" name="inboundDate" th:value="${#dates.format(tubLog.inboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经办人:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="optUser" th:field="*{optUser}" class="form-control" type="text"> |
| | | <input name="optUser" th:field="*{optUser}" class="form-control" type="text" required> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出入库数量:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="number" th:field="*{number}" class="form-control" type="text"> |
| | | <input name="number" th:field="*{number}" class="form-control" type="text" placeholder="请输入出入库数量,数字类型"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">数据单位:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="unit" th:field="*{unit}" class="form-control" type="text"> |
| | | <input name="unit" th:field="*{unit}" class="form-control" type="text" placeholder="例如:吨、件、个等"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">时间:</label> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">备注:</label> |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | | <span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
| | | <input name="createDate" th:value="${#dates.format(tubLog.createDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | </div> |
| | | <textarea id="remark" th:field="*{remark}" name="remark" class="form-control"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">上传图片/扫描件:</label> |
| | | <div class="col-sm-8"> |
| | | <input type="file" name= "file" id="file"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <th:block th:include="include :: datetimepicker-js" /> |
| | | <script type="text/javascript"> |
| | | var prefix = ctx + "geo/TubLog"; |
| | | |
| | | $("#form-TubLog-edit").validate({ |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/edit", $('#form-TubLog-edit').serialize()); |
| | | var result = doSubmitFile(); |
| | | var documentFile =null; |
| | | if(result !=null){ |
| | | if(result.code == web_status.SUCCESS){ |
| | | documentFile= result.fileName; |
| | | } |
| | | } |
| | | |
| | | let inboundDateValue = $("#inboundDateId").val(); |
| | | let outboundDateValue = $("#outboundDateId").val(); |
| | | if ($.common.isEmpty(inboundDateValue) && $.common.isEmpty(outboundDateValue)) { |
| | | $.modal.alertWarning("出入库时间,请选择一条记录"); |
| | | return; |
| | | } |
| | | if ($.validate.form()) { |
| | | let formData = $('#form-TubLog-edit').serialize(); |
| | | let data = formData +"&fileUrl="+documentFile; |
| | | $.operate.save(prefix + "/edit", data); |
| | | } |
| | | } |
| | | |
| | | //上传文件 |
| | | function doSubmitFile(){ |
| | | var file = $('#file').val(); |
| | | if (file == '' || file ==null){ |
| | | return null; |
| | | } |
| | | var formData = new FormData(); |
| | | formData.append("file", $('#file')[0].files[0]); |
| | | var data = null; |
| | | $.ajax({ |
| | | url: ctx + "geo/TubLog/uploadTubLogFile", |
| | | data: formData, |
| | | cache: false, |
| | | contentType: false, |
| | | processData: false, |
| | | type: 'POST', |
| | | async:false, |
| | | success: function (result) { |
| | | data= result; |
| | | } |
| | | }); |
| | | return data; |
| | | } |
| | | |
| | | $("input[name='outboundDate']").datetimepicker({ |
| | |
| | | }); |
| | | |
| | | $("input[name='inboundDate']").datetimepicker({ |
| | | format: "yyyy-mm-dd", |
| | | minView: "month", |
| | | autoclose: true |
| | | }); |
| | | |
| | | $("input[name='createDate']").datetimepicker({ |
| | | format: "yyyy-mm-dd", |
| | | minView: "month", |
| | | autoclose: true |