bug
This commit is contained in:
@ -492,24 +492,24 @@ public class ActivitiController {
|
||||
}
|
||||
|
||||
}
|
||||
// 当 passFlag=false 过滤后返回空列表(即未识别到退回路径),则作为备用方案返回全部路径
|
||||
if (list.isEmpty() && !pFlag && totalCount > 0) {
|
||||
// 当过滤后返回空列表,则作为备用方案返回全部路径
|
||||
if (list.isEmpty() && totalCount > 0) {
|
||||
list = workflowProcessDefinitionService.getNextWorkTasks(task.getProcessDefinitionId(), task.getTaskDefinitionKey());
|
||||
}
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
if (list != null && list.size() > 0) {
|
||||
for (WorkTask workTask : list) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("id", workTask.getRouteNum());
|
||||
jsonObject.put("text", workTask.getName());
|
||||
jsonObject.put("resourceId", workTask.getId());
|
||||
jsonObject.put("modelKEY", workTask.getPd_key());
|
||||
jsonArray.add(jsonObject);
|
||||
}
|
||||
|
||||
}
|
||||
model.addAttribute("result", jsonArray.toString());
|
||||
}
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
if (list != null && list.size() > 0) {
|
||||
for (WorkTask workTask : list) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("id", workTask.getRouteNum());
|
||||
jsonObject.put("text", workTask.getName());
|
||||
jsonObject.put("resourceId", workTask.getId());
|
||||
jsonObject.put("modelKEY", workTask.getPd_key());
|
||||
jsonArray.add(jsonObject);
|
||||
}
|
||||
|
||||
}
|
||||
model.addAttribute("result", jsonArray.toString());
|
||||
return "result";
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,18 @@ import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
//curl --location 'http://127.0.0.1:8090/dh-netsdk/attendance/getDailyRecordList' \
|
||||
// header 'Content-Type: application/json' \
|
||||
// header 'Dh-Device-Ip: 192.168.1.108' \
|
||||
// header 'Dh-Device-User: admin' \
|
||||
// header 'Dh-Device-Port: 37777' \
|
||||
// header 'Dh-Device-Timestamp: {{dhTs}}' \
|
||||
// header 'Dh-Device-Password: {{dhEncPwd}}' \
|
||||
// data '{
|
||||
// "day": "2026-04-28",
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 20
|
||||
// }'
|
||||
@Controller
|
||||
@RequestMapping("/administration/attendance")
|
||||
public class AttendanceController {
|
||||
|
||||
@ -404,14 +404,20 @@ public class RptCreateController {
|
||||
@RequestMapping("/doaddMore.do")
|
||||
public String doaddMore(HttpServletRequest request, Model model) {
|
||||
User cu = (User) request.getSession().getAttribute("cu");
|
||||
if (cu == null) {
|
||||
model.addAttribute("result", "{\"res\":\"用户未登录\",\"msg\":\"用户未登录\"}");
|
||||
return "result";
|
||||
}
|
||||
request.setAttribute("userId", cu.getId());
|
||||
request.setAttribute("userName", cu.getCaption());
|
||||
request.setAttribute("id", CommUtil.getUUID());
|
||||
String rpttype = request.getParameter("rpttype");
|
||||
if (RptInfoSet.RptType_Day.equals(rpttype)) {
|
||||
request.setAttribute("dateD", CommUtil.nowDate().substring(0, 10));
|
||||
} else if (RptInfoSet.RptType_Month.equals(rpttype) || RptInfoSet.RptType_Quarterly.equals(rpttype) || RptInfoSet.RptType_HalfYear.equals(rpttype)) {
|
||||
request.setAttribute("dateD", CommUtil.nowDate().substring(0, 7));
|
||||
} else if (RptInfoSet.RptType_Month.equals(rpttype) || RptInfoSet.RptType_HalfYear.equals(rpttype)) {
|
||||
request.setAttribute("dateM", CommUtil.nowDate().substring(0, 7));
|
||||
} else if (RptInfoSet.RptType_Quarterly.equals(rpttype)) {
|
||||
request.setAttribute("dateQ", CommUtil.nowDate().substring(0, 7));
|
||||
} else if (RptInfoSet.RptType_Year.equals(rpttype)) {
|
||||
request.setAttribute("dateY", CommUtil.nowDate().substring(0, 4));
|
||||
}
|
||||
|
||||
@ -114,6 +114,8 @@ public class SafetyCheckComprehensiveController {
|
||||
model.addAttribute("checkItemList", SafetyCheckItemComprehensiveEnum.getAllEnableType4JSON());
|
||||
//检查结果下拉
|
||||
model.addAttribute("checkResultList", SafetyCheckResultEnum.getAllEnableType4JSON());
|
||||
// 预生成ID,用于附件上传
|
||||
model.addAttribute("preId", UUID.randomUUID().toString());
|
||||
return "safety/SafetyCheckComprehensiveAdd";
|
||||
}
|
||||
|
||||
@ -126,13 +128,10 @@ public class SafetyCheckComprehensiveController {
|
||||
@RequestMapping("/save.do")
|
||||
@ResponseBody
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result save(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile[] multipartFiles) throws Exception {
|
||||
public Result save(HttpServletRequest request, SafetyCheckComprehensive bean) throws Exception {
|
||||
User cu = (User) request.getSession().getAttribute("cu");
|
||||
bean.setId(UUID.randomUUID().toString());
|
||||
if (multipartFiles != null) {
|
||||
for (MultipartFile file : multipartFiles) {
|
||||
safetyFilesService.upload(request, file, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE.getId(), SafetyCheckStatusEnum.APPLY.getId(), bean.getId());
|
||||
}
|
||||
if (StringUtils.isEmpty(bean.getId())) {
|
||||
bean.setId(UUID.randomUUID().toString());
|
||||
}
|
||||
bean.setCheckCode(safetySeqService.code(request, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE));
|
||||
if (bean.getCheckResult() == SafetyCheckResultEnum.OK.getId()) {
|
||||
@ -156,12 +155,12 @@ public class SafetyCheckComprehensiveController {
|
||||
@RequestMapping("/saveApply.do")
|
||||
@ResponseBody
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result saveApply(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile[] file) throws Exception {
|
||||
public Result saveApply(HttpServletRequest request, SafetyCheckComprehensive bean) throws Exception {
|
||||
if (StringUtils.isEmpty(bean.getDutyUserId())) {
|
||||
return Result.failed("整改负责人不能为空!");
|
||||
}
|
||||
|
||||
save(request, bean, file);
|
||||
save(request, bean);
|
||||
// 不相符的才提交申请
|
||||
if (bean.getCheckResult() == SafetyCheckResultEnum.NOT_OK.getId()) {
|
||||
safetyCheckActivityService.apply(bean.getCreateUserId(), bean.getDutyUserId(), ProcessType.SAFETY_CHECK_COMPREHENSIVE, bean.getId());
|
||||
|
||||
@ -284,22 +284,8 @@ public class WorkflowProcessDefinitionService {
|
||||
String id = activityImpl.getId();
|
||||
if(taskDefinitionKey.toLowerCase().equals(id.toLowerCase())){
|
||||
System.out.println("当前执行的任务:"+activityImpl.getProperty("name"));
|
||||
//获取从某个节点出来的所有子节点-网关
|
||||
List<PvmTransition> outTransitions_gw = activityImpl.getOutgoingTransitions();
|
||||
for(PvmTransition tr_gw:outTransitions_gw){
|
||||
//获取线路的终点节点-网关
|
||||
PvmActivity ac_gw = tr_gw.getDestination();
|
||||
if(ac_gw.getProperty("type").equals("userTask") || ac_gw.getProperty("type").equals("endEvent")){
|
||||
activityImpls.add((ActivityImpl)ac_gw);
|
||||
}else{
|
||||
List<PvmTransition> outTransitions =ac_gw.getOutgoingTransitions();
|
||||
for(PvmTransition tr:outTransitions){
|
||||
PvmActivity ac = tr.getDestination();
|
||||
ActivityImpl itemActivityImpl =(ActivityImpl)ac;
|
||||
activityImpls.add(itemActivityImpl);
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取从某个节点出来的所有子节点(递归处理多层网关嵌套)
|
||||
collectNextActivities(activityImpl.getOutgoingTransitions(), activityImpls);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -318,27 +304,37 @@ public class WorkflowProcessDefinitionService {
|
||||
if (taskDefinitionKey.toLowerCase().equals(id.toLowerCase()) || (StringUtil.isBlank(taskDefinitionKey) &&
|
||||
activityImpl.getProperty("type").equals("startEvent"))) {
|
||||
System.out.println("当前执行的任务:" + activityImpl.getProperty("name"));
|
||||
//获取从某个节点出来的所有子节点-网关
|
||||
List<PvmTransition> outTransitions_gw = activityImpl.getOutgoingTransitions();
|
||||
for (PvmTransition tr_gw : outTransitions_gw) {
|
||||
//获取线路的终点节点-网关
|
||||
PvmActivity ac_gw = tr_gw.getDestination();
|
||||
if (ac_gw.getProperty("type").equals("userTask") || ac_gw.getProperty("type").equals("endEvent")) {
|
||||
activityImpls.add((ActivityImpl) ac_gw);
|
||||
} else {
|
||||
List<PvmTransition> outTransitions = ac_gw.getOutgoingTransitions();
|
||||
for (PvmTransition tr : outTransitions) {
|
||||
PvmActivity ac = tr.getDestination();
|
||||
ActivityImpl itemActivityImpl = (ActivityImpl) ac;
|
||||
activityImpls.add(itemActivityImpl);
|
||||
}
|
||||
}
|
||||
}
|
||||
//获取从某个节点出来的所有子节点
|
||||
collectNextActivities(activityImpl.getOutgoingTransitions(), activityImpls);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return activityImpls;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归收集后续节点,处理多层网关嵌套
|
||||
* @param transitions 当前层的流出路径
|
||||
* @param result 收集结果的列表
|
||||
*/
|
||||
private void collectNextActivities(List<PvmTransition> transitions, List<ActivityImpl> result) {
|
||||
if (transitions == null || transitions.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (PvmTransition tr : transitions) {
|
||||
PvmActivity dest = tr.getDestination();
|
||||
String destType = String.valueOf(dest.getProperty("type"));
|
||||
if ("userTask".equals(destType) || "endEvent".equals(destType)) {
|
||||
// 目标是用户任务或结束事件,直接收集
|
||||
result.add((ActivityImpl) dest);
|
||||
} else if ("exclusiveGateway".equals(destType) || "parallelGateway".equals(destType)
|
||||
|| "inclusiveGateway".equals(destType)) {
|
||||
// 目标是网关,递归遍历其流出路径
|
||||
collectNextActivities(dest.getOutgoingTransitions(), result);
|
||||
}
|
||||
// 其他类型(如serviceTask、scriptTask等)忽略
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 查找含routeNum的workTask
|
||||
* @param processDefId
|
||||
@ -395,12 +391,12 @@ public class WorkflowProcessDefinitionService {
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 获取两节点的路径条件--20190710-王贤平
|
||||
* 递归查找从sourceTaskDefId到destTaskDefId的路径条件,处理多层网关嵌套
|
||||
* @param processDefId
|
||||
* @param sourceTaskDefId
|
||||
* @param destTaskDefId
|
||||
* @param processDefId
|
||||
* @param pvmTransitionId 出现多路径时,避免重复
|
||||
* @return
|
||||
* @param pvmTransitionId 出现多路径时,避免重复
|
||||
* @return 带条件文本的路径(优先返回第一个含有条件的路径)
|
||||
*/
|
||||
public PvmTransition getTransition(String processDefId,String sourceTaskDefId,String destTaskDefId,String pvmTransitionId) {
|
||||
|
||||
@ -410,28 +406,52 @@ public class WorkflowProcessDefinitionService {
|
||||
for(ActivityImpl activityImpl:activitiList){
|
||||
String id = activityImpl.getId();
|
||||
if(sourceTaskDefId.toLowerCase().equals(id.toLowerCase())){
|
||||
//获取从某个节点出来的所有子节点-网关
|
||||
List<PvmTransition> outTransitions_gw = activityImpl.getOutgoingTransitions();
|
||||
for(PvmTransition tr_gw:outTransitions_gw){
|
||||
//获取线路的终点节点-网关
|
||||
PvmActivity ac_gw = tr_gw.getDestination();
|
||||
if(ac_gw.getId().equals(destTaskDefId) && !tr_gw.getId().equals(pvmTransitionId)){
|
||||
return tr_gw;
|
||||
}else{
|
||||
List<PvmTransition> outTransitions =ac_gw.getOutgoingTransitions();
|
||||
for(PvmTransition tr:outTransitions){
|
||||
PvmActivity ac = tr.getDestination();
|
||||
if(ac.getId().equals(destTaskDefId) && !tr.getId().equals(pvmTransitionId)){
|
||||
return tr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
PvmTransition result = findTransitionToDestination(activityImpl.getOutgoingTransitions(), destTaskDefId, pvmTransitionId, null);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归遍历路径,查找目标节点,处理多层网关嵌套
|
||||
* @param transitions 当前层的流出路径
|
||||
* @param destTaskDefId 目标节点ID
|
||||
* @param pvmTransitionId 需要跳过的路径ID
|
||||
* @param firstConditionTransition 第一个含有条件文本的路径(优先返回)
|
||||
* @return 带条件文本的路径,或直接到达目标的路径
|
||||
*/
|
||||
private PvmTransition findTransitionToDestination(List<PvmTransition> transitions, String destTaskDefId, String pvmTransitionId, PvmTransition firstConditionTransition) {
|
||||
if (transitions == null || transitions.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
for (PvmTransition tr : transitions) {
|
||||
if (tr.getId().equals(pvmTransitionId)) {
|
||||
continue;
|
||||
}
|
||||
PvmActivity dest = tr.getDestination();
|
||||
// 记录第一个含有条件文本的路径
|
||||
PvmTransition conditionTransition = firstConditionTransition;
|
||||
String conditionText = String.valueOf(tr.getProperty("conditionText"));
|
||||
if (conditionTransition == null && conditionText != null && !conditionText.isEmpty() && !"null".equals(conditionText)) {
|
||||
conditionTransition = tr;
|
||||
}
|
||||
// 直接找到目标节点
|
||||
if (dest.getId().equals(destTaskDefId)) {
|
||||
return conditionTransition != null ? conditionTransition : tr;
|
||||
}
|
||||
// 目标是网关,递归遍历
|
||||
String destType = String.valueOf(dest.getProperty("type"));
|
||||
if ("exclusiveGateway".equals(destType) || "parallelGateway".equals(destType)
|
||||
|| "inclusiveGateway".equals(destType)) {
|
||||
PvmTransition found = findTransitionToDestination(dest.getOutgoingTransitions(), destTaskDefId, pvmTransitionId, conditionTransition);
|
||||
if (found != null) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* 根据任务单编号获取流程定义
|
||||
|
||||
@ -238,6 +238,10 @@ var processSelectNode = function(taskId){
|
||||
//选择下一节点,先选择审核结果,再选择节点
|
||||
$.post(ext.contextPath + "/activiti/workflow/getRoutesForSelect2.do", {taskId:taskId,passFlag:passFlag}, function(data) {
|
||||
$("#routeNum").empty();
|
||||
if (!data || data.length === 0) {
|
||||
console.warn('getRoutesForSelect2: no routes found for passFlag=' + passFlag);
|
||||
return;
|
||||
}
|
||||
var selelct = $("#routeNum").select2({
|
||||
data: data,
|
||||
placeholder:'请先选择审核结果',//默认文字提示
|
||||
|
||||
@ -551,6 +551,8 @@
|
||||
if($(".file-preview-thumbnails").html() == null || $(".file-preview-thumbnails").html().length==0 || $.trim($(".file-preview-thumbnails").html())==''){
|
||||
showAlert('d','上传的文件不能为空!','alertFileEditDiv');
|
||||
} else {
|
||||
var editorText = editor.txt.html();
|
||||
$("#wContent").val(editorText);
|
||||
$.post(ext.contextPath + "/documentData/doupdate.do", $("#fileInputModalForm").serialize(), function (data) {
|
||||
if (data.res == 1){
|
||||
$("#fileTable").bootstrapTable('refresh');
|
||||
|
||||
@ -72,6 +72,18 @@
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('rptdtM_Start', 'NOT_VALIDATED', null).validateField('rptdtM_Start');
|
||||
});
|
||||
$('#rptdtQ_Start').datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
format: 'yyyy-mm',
|
||||
language: "zh-CN",
|
||||
autoclose: true,
|
||||
startView: 1,
|
||||
minViewMode: 1,
|
||||
maxViewMode: 2,
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('rptdtQ_Start', 'NOT_VALIDATED', null).validateField('rptdtQ_Start');
|
||||
});
|
||||
$('#rptdtY_Start').datepicker({
|
||||
format: 'yyyy',
|
||||
language: "zh-CN",
|
||||
@ -105,6 +117,18 @@
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('rptdtM_End', 'NOT_VALIDATED', null).validateField('rptdtM_End');
|
||||
});
|
||||
$('#rptdtQ_End').datepicker({
|
||||
changeYear: true,
|
||||
changeMonth: true,
|
||||
format: 'yyyy-mm',
|
||||
language: "zh-CN",
|
||||
autoclose: true,
|
||||
startView: 1,
|
||||
minViewMode: 1,
|
||||
maxViewMode: 2,
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('rptdtQ_End', 'NOT_VALIDATED', null).validateField('rptdtQ_End');
|
||||
});
|
||||
$('#rptdtY_End').datepicker({
|
||||
format: 'yyyy',
|
||||
language: "zh-CN",
|
||||
@ -146,6 +170,8 @@
|
||||
value="${dateD}">
|
||||
<input type="text" class="form-control" id="rptdtM_Start" name="rptdt_start" style="width: 132px;"
|
||||
value="${dateM}">
|
||||
<input type="text" class="form-control" id="rptdtQ_Start" name="rptdt_start" style="width: 132px;"
|
||||
value="${dateQ}">
|
||||
<input type="text" class="form-control" id="rptdtY_Start" name="rptdt_start" style="width: 132px;"
|
||||
value="${dateY}">
|
||||
</div>
|
||||
@ -160,6 +186,8 @@
|
||||
value="${dateD}">
|
||||
<input type="text" class="form-control" id="rptdtM_End" name="rptdt_end" style="width: 132px;"
|
||||
value="${dateM}">
|
||||
<input type="text" class="form-control" id="rptdtQ_End" name="rptdt_end" style="width: 132px;"
|
||||
value="${dateQ}">
|
||||
<input type="text" class="form-control" id="rptdtY_End" name="rptdt_end" style="width: 132px;"
|
||||
value="${dateY}">
|
||||
</div>
|
||||
|
||||
@ -16,16 +16,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
.form-horizontal {
|
||||
padding-top: 20px;
|
||||
}
|
||||
.DDD{
|
||||
list-style: none;
|
||||
line-height: 30px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var fileList = []
|
||||
// 初始化
|
||||
$(function () {
|
||||
$('#test').outerHTML = initFileInputView()
|
||||
//初始化 检查日期
|
||||
$("#checkDate").datepicker({
|
||||
language: 'zh-CN',
|
||||
@ -45,7 +39,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
}
|
||||
});
|
||||
|
||||
// 初始化‘提交’按钮
|
||||
// 初始化'提交'按钮
|
||||
$("#submitBt").hide();
|
||||
$("#checkResult").change(function () {
|
||||
var type = $("#checkResult option:selected").val();
|
||||
@ -72,37 +66,11 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
|
||||
// 初始化 检查项目下拉
|
||||
checkItemDropDownInit()
|
||||
|
||||
// 初始化 附件列表
|
||||
initFileList();
|
||||
});
|
||||
|
||||
// 点击文件
|
||||
var fileinput = function () {
|
||||
$('#file').click();
|
||||
};
|
||||
// 清空文件
|
||||
var filedel = function () {
|
||||
fileList.splice(index,1)
|
||||
$('#test').html(initFileInputView())
|
||||
};
|
||||
// 选中文件
|
||||
var fileSelected = function () {
|
||||
var filename = $('#file').val();
|
||||
fileList.push(...$('#file')[0].files)
|
||||
$('#test').html(initFileInputView())
|
||||
};
|
||||
function initFileInputView() {
|
||||
let button = (index) => {
|
||||
return `<button type="button" class="btn btn-default btn-file" onclick="filedel(`+index+`)"
|
||||
style="position: fixed;right: 193px;height: 24px;width:24px;padding-top:2px;margin-top: 3px" id="btn_save1"><i class="fa fa-trash-o" style="margin-left: -5px"></i></button>`
|
||||
}
|
||||
let temp = `<ul class="DDD">`
|
||||
fileList.forEach((item, index) => {
|
||||
temp += `<li>`+item.name+button(index)+`</li>`
|
||||
})
|
||||
temp += `<ul>`
|
||||
temp += `<input type="hidden" class="form-control" name="fileName" id="fileName" readonly
|
||||
style="width:650px;border:none;background-color: white"/>`
|
||||
return temp
|
||||
}
|
||||
// 处理 检查类型 前缀拼接
|
||||
function handleCheckType(formData) {
|
||||
let checktype = $('input[type=radio][name=checkType]:checked').val();
|
||||
@ -112,6 +80,19 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
}
|
||||
}
|
||||
|
||||
// 加载附件
|
||||
function initFileList() {
|
||||
// SAFETY_CHECK_COMPREHENSIVE(9, "综合安全检查","ZH"),
|
||||
$.post(ext.contextPath + '/safety/SafetyFiles/fileListShow.do',
|
||||
{
|
||||
bizId: '${preId}',
|
||||
functionCode: 9,
|
||||
statusCode: 1
|
||||
}, function (data) {
|
||||
$("#fileList").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
// 保存
|
||||
function saveFun() {
|
||||
$("#addForm").bootstrapValidator('validate');//提交验证
|
||||
@ -128,7 +109,6 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
// console.log(data)
|
||||
if (data.code == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
@ -303,6 +283,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
<!-- 新增界面formid强制为addForm -->
|
||||
<form class="form-horizontal" id="addForm" enctype="multipart/form-data">
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name="id" value="${preId}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">检查类型</label>
|
||||
@ -415,26 +396,12 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label ">附件资料:</label>
|
||||
<div class="col-sm-1" style="display: flex">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()"
|
||||
id="btn_save"><i class="fa fa-paperclip"></i></button>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div id="test" ></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="file" id="file" multiple class="file-loading"
|
||||
onchange="fileSelected()"/>
|
||||
<div class="form-group" style="margin-left: 20px">
|
||||
<div class="col-sm-10" id="fileList"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-foo
|
||||
|
||||
ter">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary " style="margin-left: 10px" onclick="saveFun()">
|
||||
保存
|
||||
|
||||
Reference in New Issue
Block a user