| | |
| | | </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" class="form-control" type="text"> |
| | | <input name="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"> |
| | | <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" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | <input id="outboundDateId" name="outboundDate" 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" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | <input id="inboundDateId" name="inboundDate" 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" class="form-control" type="text"> |
| | | <input name="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" class="form-control" type="text"> |
| | | <input name="number" 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"> |
| | | <input name="unit" class="form-control" type="text"> |
| | | <input name="unit" 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"> |
| | | <textarea id="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> |
| | |
| | | var projectId = [[${projectId}]]; |
| | | var code = [[${code}]]; |
| | | |
| | | |
| | | $("#form-TubLog-add").validate({ |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | function submitHandler() { |
| | | 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 (!$.common.isEmpty(inboundDateValue) && !$.common.isEmpty(outboundDateValue)) { |
| | | $.modal.alertWarning("出入库时间,请选择一条记录"); |
| | | return; |
| | | } |
| | | |
| | | if ($.validate.form()) { |
| | | let formData = $('#form-TubLog-add').serialize(); |
| | | let data = formData + "&projectId=" + projectId + "&code=" + code; |
| | | let data = formData + "&projectId=" + projectId + "&code=" + code +"&fileUrl="+documentFile; |
| | | $.operate.save(prefix + "/add", 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({ |
| | |
| | | minView: "month", |
| | | autoclose: true |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |