Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/whp/liquidWasteDispose/WhpLiquidWasteDisposeEditInput.jsp

1 line
16 KiB
Plaintext
Raw Normal View History

2026-01-16 14:13:44 +08:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ page language="java" pageEncoding="utf-8" %> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <style type="text/css"> .select2-container .select2-selection--single { height: 34px; line-height: 34px; } .select2-selection__arrow { margin-top: 3px; } .foot { display: flex; padding-left: 50px; } /*.layout{*/ /* display: flex;*/ /* padding-left: 15px;*/ /*}*/ .form-horizontal { padding-top: 20px; } .right { margin-left: 50px; } </style> <script type="text/javascript"> $(function () { var nowDate=new Date() var year=nowDate.getFullYear() var month=nowDate.getMonth()+1 var day=nowDate.getDate() if('${bean.inputTime}'=='') { var fullYear=year+'-'+month+'-'+day $("#inputTime").val(fullYear) } //登记时间 $("#inputTime").datepicker({ language: 'zh-CN', autoclose: true, todayHighlight: true, format: 'yyyy-mm-dd', }); typeConditionDropDownList(); }); //下拉范例,不用删掉 function typeConditionDropDownList() { var select_Data = jQuery.parseJSON('${typeConditionDropDownList}'); console.log(select_Data); var select_3 = $("#liquidWasteType").select2({ data: select_Data, cache: false, placeholder: '请选择',//默认文字提示 // allowClear: true,//允许清空 escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入 language: "zh-CN", minimumInputLength: 0, minimumResultsForSearch: 10,//数据超过十个启用搜索框 formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果 formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择 }); $(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'}); //单选赋值 select_3.val('${bean.liquidWasteType}').trigger("change"); } //保存 function updateFun() { //console.log($("#editForm").serialize()); $("#editForm").bootstrapValidator('validate');//提交验证 if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码 var formData = new FormData($("#editForm")[0]); $.ajax({ url: ext.contextPath + '/whp/liquidWasteDispose/WhpLiquidWasteDispose/update.do', type: 'POST', data: formData, async: false, cache: false, contentType: false, processData: false, dataType: 'json', success: function (data) { // console.log(data) if (data.code == 1) { $("#table").bootstrapTable('refresh'); closeModal('subModal'); } else { showAlert('d', '保存失败!' + data.msg); } }, error: function (data) { } }); } } //入库 function updateSaveFun() { $("#editForm").data("bootstrapValidator").updateStatus("createUserName","NOT_VALIDATED", null).validateField("createUserName"); $("#editForm").data("bootstrapValidator").updateStatus("transportUserName","NOT_VALIDATED", null).validateField("transportUserName"); $("#editForm").data("bootstrapValidator").updateStatus("repositionUserName","NOT_VALIDATE