zhangsiqi
9 months ago
19 changed files with 2088 additions and 278 deletions
@ -0,0 +1,123 @@ |
|||
package com.ruoyi.erp.domain; |
|||
|
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* |
|||
* @Description BOM信息Vo |
|||
*/ |
|||
|
|||
public class ErpBomVo extends ErpBom{ |
|||
private static final long serialVersionUID = 1L; |
|||
/** 申请人姓名 */ |
|||
private String applyUserName; |
|||
/** 任务ID */ |
|||
private String taskId; |
|||
/** 任务名称 */ |
|||
private String taskName; |
|||
/** 办理时间 */ |
|||
private Date doneTime; |
|||
/** 创建人 */ |
|||
private String createUserName; |
|||
/** 流程实例状态 1 激活 2 挂起 */ |
|||
private String suspendState; |
|||
/** 待办用户id */ |
|||
private String todoUserId; |
|||
/** 流程实例类型名称 */ |
|||
private String instanceTypeName; |
|||
|
|||
/** |
|||
* 关键词 |
|||
*/ |
|||
private String keyword; |
|||
|
|||
public String getApplyUserName() { |
|||
return applyUserName; |
|||
} |
|||
|
|||
public void setApplyUserName(String applyUserName) { |
|||
this.applyUserName = applyUserName; |
|||
} |
|||
|
|||
public String getTaskId() { |
|||
return taskId; |
|||
} |
|||
|
|||
public void setTaskId(String taskId) { |
|||
this.taskId = taskId; |
|||
} |
|||
|
|||
public String getTaskName() { |
|||
return taskName; |
|||
} |
|||
|
|||
public void setTaskName(String taskName) { |
|||
this.taskName = taskName; |
|||
} |
|||
|
|||
public Date getDoneTime() { |
|||
return doneTime; |
|||
} |
|||
|
|||
public void setDoneTime(Date doneTime) { |
|||
this.doneTime = doneTime; |
|||
} |
|||
|
|||
public String getCreateUserName() { |
|||
return createUserName; |
|||
} |
|||
|
|||
public void setCreateUserName(String createUserName) { |
|||
this.createUserName = createUserName; |
|||
} |
|||
|
|||
public String getSuspendState() { |
|||
return suspendState; |
|||
} |
|||
|
|||
public void setSuspendState(String suspendState) { |
|||
this.suspendState = suspendState; |
|||
} |
|||
|
|||
public String getTodoUserId() { |
|||
return todoUserId; |
|||
} |
|||
|
|||
public void setTodoUserId(String todoUserId) { |
|||
this.todoUserId = todoUserId; |
|||
} |
|||
|
|||
public String getInstanceTypeName() { |
|||
return instanceTypeName; |
|||
} |
|||
|
|||
public void setInstanceTypeName(String instanceTypeName) { |
|||
this.instanceTypeName = instanceTypeName; |
|||
} |
|||
|
|||
public String getKeyword() { |
|||
return keyword; |
|||
} |
|||
|
|||
public void setKeyword(String keyword) { |
|||
this.keyword = keyword; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "ErpMaterialVo{" + |
|||
"applyUserName='" + applyUserName + '\'' + |
|||
", taskId='" + taskId + '\'' + |
|||
", taskName='" + taskName + '\'' + |
|||
", doneTime=" + doneTime + |
|||
", createUserName='" + createUserName + '\'' + |
|||
", suspendState='" + suspendState + '\'' + |
|||
", todoUserId='" + todoUserId + '\'' + |
|||
", instanceTypeName='" + instanceTypeName + '\'' + |
|||
", keyword='" + keyword + '\'' + |
|||
"} " + super.toString(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,258 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('工程经理审核')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUserName" th:field="*{applyUserName}" class="form-control" type="text" readonly> |
|||
</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="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="materialNo" name="materialNo" th:field="*{materialNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" disabled> |
|||
<optgroup> |
|||
<option value="">请选择</option> |
|||
</optgroup> |
|||
<optgroup th:each="child: ${childList}" th:label="${child.name}"> |
|||
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option> |
|||
</optgroup> |
|||
</select> |
|||
</div> |
|||
<input type="text" id="materialType" name="materialType" th:field="*{materialType}" readonly hidden /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">加工方式:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" disabled> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processMethod}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" disabled> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">品牌:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="brand" th:field="*{brand}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">描述:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="describe" class="form-control" readonly>[[*{describe}]]</textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">照片:</label> |
|||
<div class="col-sm-8"> |
|||
<el-upload |
|||
:disabled="true" |
|||
:action="fileUploadUrl" |
|||
:on-success="uploadSuccess" |
|||
:on-remove="uploadRemove" |
|||
:file-list="fileList" |
|||
list-type="picture" |
|||
accept=".jpg,.png" |
|||
multiple> |
|||
<el-button size="small" type="primary">点击上传</el-button> |
|||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div> |
|||
</el-upload> |
|||
</div> |
|||
<input id="photoAttachId" name = "photoAttachId" th:field="*{photoAttachId}" hidden readonly> |
|||
<input id="fileIdStr" type="text" name="fileIdStr" th:field="*{fileIdStr}" hidden readonly> |
|||
<input id="removeFileIdStr" type="text" name="removeFileIdStr" hidden readonly> |
|||
</div> |
|||
<hr /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="gcjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_gcjlVerifyApproved" id="gcjlVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:src="@{/ajax/libs/vue/vue.js}"></script> |
|||
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> |
|||
<script type="text/javascript"> |
|||
new Vue({ |
|||
el: '#app', |
|||
data: function() { |
|||
return { |
|||
fileList: [], |
|||
fileUploadUrl: ctx + "common/uploadSingleFile", |
|||
fileDeleteUrl: ctx + "common/deleteFile", |
|||
getListByAttachIdUrl: ctx + "system/attach/file/getListByAttachId", |
|||
fileIdList:[], |
|||
removeFileIdList:[], |
|||
|
|||
} |
|||
}, |
|||
mounted() { |
|||
|
|||
// 控制下拉框选中 |
|||
var materialType = $("#materialType").val(); |
|||
$("#selectMaterialType").val(materialType).trigger("change"); |
|||
|
|||
var that = this; |
|||
// 页面渲染完成,可以执行需要的操作 |
|||
console.log('页面已渲染完成'); |
|||
console.log($("#id").val()); |
|||
console.log($("#photoAttachId").val()); |
|||
var attachId = $("#photoAttachId").val(); |
|||
if(attachId){ |
|||
$.ajax({ |
|||
type: "get", |
|||
url: that.getListByAttachIdUrl, |
|||
data: {attachId:attachId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
result.data.forEach((item) => { |
|||
that.fileIdList.push(item.id); |
|||
that.fileList.push({name: item.name, url: item.url, attachFileId: item.id,isBind:true}); |
|||
}); |
|||
} else { |
|||
$.modal.msgError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.msgError("获取附件失败。"); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
methods: { |
|||
uploadSuccess(response, file, fileList) { |
|||
console.log(response); |
|||
if(response.code == web_status.SUCCESS){ |
|||
var attachFileId = response.data.id; |
|||
file.attachFileId = attachFileId; |
|||
file.isBind = false; |
|||
this.fileIdList.push(attachFileId); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
$.modal.msgSuccess("上传成功"); |
|||
}else{ |
|||
$.modal.alertError(response.msg); |
|||
} |
|||
}, |
|||
uploadRemove(file, fileList) { |
|||
console.log(file, fileList); |
|||
var attachFileId = file.attachFileId; |
|||
var isBind = file.isBind; |
|||
if(isBind==false){ |
|||
$.ajax({ |
|||
type: "get", |
|||
url: this.fileDeleteUrl, |
|||
data: {id:attachFileId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
} |
|||
$.modal.msgSuccess("删除附件成功。"); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertError("删除附件失败。"); |
|||
} |
|||
}); |
|||
}else{ |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
// 保存的时候才删除 |
|||
this.removeFileIdList.push(attachFileId); |
|||
$("#removeFileIdStr").val(this.removeFileIdList.join(";")); |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
}) |
|||
|
|||
var prefix = ctx + "erp/material"; |
|||
$("#form-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
var materialType = $('#selectMaterialType').select2('val'); |
|||
$('#materialType').val(materialType); |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,266 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('工程主管审核')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUserName" th:field="*{applyUserName}" class="form-control" type="text" readonly> |
|||
</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="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="materialNo" name="materialNo" th:field="*{materialNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" disabled> |
|||
<optgroup> |
|||
<option value="">请选择</option> |
|||
</optgroup> |
|||
<optgroup th:each="child: ${childList}" th:label="${child.name}"> |
|||
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option> |
|||
</optgroup> |
|||
</select> |
|||
</div> |
|||
<input type="text" id="materialType" name="materialType" th:field="*{materialType}" readonly hidden /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">加工方式:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" disabled> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processMethod}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" disabled> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">品牌:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="brand" th:field="*{brand}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">描述:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="describe" class="form-control" readonly>[[*{describe}]]</textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">入库部门:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" disabled> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseDept}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">照片:</label> |
|||
<div class="col-sm-8"> |
|||
<el-upload |
|||
v-if="!isReadOnly" |
|||
:action="fileUploadUrl" |
|||
:on-success="uploadSuccess" |
|||
:on-remove="uploadRemove" |
|||
:file-list="fileList" |
|||
list-type="picture" |
|||
accept=".jpg,.png" |
|||
multiple> |
|||
<el-button size="small" type="primary">点击上传</el-button> |
|||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div> |
|||
</el-upload> |
|||
</div> |
|||
<input id="photoAttachId" name = "photoAttachId" th:field="*{photoAttachId}" hidden readonly> |
|||
<input id="fileIdStr" type="text" name="fileIdStr" th:field="*{fileIdStr}" hidden readonly> |
|||
<input id="removeFileIdStr" type="text" name="removeFileIdStr" hidden readonly> |
|||
</div> |
|||
<hr /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="gczgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_gczgVerifyApproved" id="gczgVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:src="@{/ajax/libs/vue/vue.js}"></script> |
|||
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> |
|||
<script type="text/javascript"> |
|||
new Vue({ |
|||
el: '#app', |
|||
data: function() { |
|||
return { |
|||
fileList: [], |
|||
fileUploadUrl: ctx + "common/uploadSingleFile", |
|||
fileDeleteUrl: ctx + "common/deleteFile", |
|||
getListByAttachIdUrl: ctx + "system/attach/file/getListByAttachId", |
|||
fileIdList:[], |
|||
removeFileIdList:[], |
|||
isReadOnly: true // 设置为 true 则隐藏 el-upload |
|||
} |
|||
}, |
|||
mounted() { |
|||
|
|||
// 控制下拉框选中 |
|||
var materialType = $("#materialType").val(); |
|||
$("#selectMaterialType").val(materialType).trigger("change"); |
|||
|
|||
var that = this; |
|||
// 页面渲染完成,可以执行需要的操作 |
|||
console.log('页面已渲染完成'); |
|||
console.log($("#id").val()); |
|||
console.log($("#photoAttachId").val()); |
|||
var attachId = $("#photoAttachId").val(); |
|||
if(attachId){ |
|||
$.ajax({ |
|||
type: "get", |
|||
url: that.getListByAttachIdUrl, |
|||
data: {attachId:attachId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
result.data.forEach((item) => { |
|||
that.fileIdList.push(item.id); |
|||
that.fileList.push({name: item.name, url: item.url, attachFileId: item.id,isBind:true}); |
|||
}); |
|||
} else { |
|||
$.modal.msgError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.msgError("获取附件失败。"); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
methods: { |
|||
uploadSuccess(response, file, fileList) { |
|||
console.log(response); |
|||
if(response.code == web_status.SUCCESS){ |
|||
var attachFileId = response.data.id; |
|||
file.attachFileId = attachFileId; |
|||
file.isBind = false; |
|||
this.fileIdList.push(attachFileId); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
$.modal.msgSuccess("上传成功"); |
|||
}else{ |
|||
$.modal.alertError(response.msg); |
|||
} |
|||
}, |
|||
uploadRemove(file, fileList) { |
|||
console.log(file, fileList); |
|||
var attachFileId = file.attachFileId; |
|||
var isBind = file.isBind; |
|||
if(isBind==false){ |
|||
$.ajax({ |
|||
type: "get", |
|||
url: this.fileDeleteUrl, |
|||
data: {id:attachFileId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
} |
|||
$.modal.msgSuccess("删除附件成功。"); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertError("删除附件失败。"); |
|||
} |
|||
}); |
|||
}else{ |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
// 保存的时候才删除 |
|||
this.removeFileIdList.push(attachFileId); |
|||
$("#removeFileIdStr").val(this.removeFileIdList.join(";")); |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
}) |
|||
|
|||
var prefix = ctx + "erp/material"; |
|||
$("#form-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
var materialType = $('#selectMaterialType').select2('val'); |
|||
$('#materialType').val(materialType); |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,277 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('驳回调整')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<!--驳回调整允许更新内容--> |
|||
<input type="hidden" name="saveEntity" value="true" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUserName" th:field="*{applyUserName}" class="form-control" type="text" readonly> |
|||
</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="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="materialNo" name="materialNo" th:field="*{materialNo}" 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 name="materialName" th:field="*{materialName}" class="form-control" type="text" > |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" > |
|||
<optgroup> |
|||
<option value="">请选择</option> |
|||
</optgroup> |
|||
<optgroup th:each="child: ${childList}" th:label="${child.name}"> |
|||
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option> |
|||
</optgroup> |
|||
</select> |
|||
</div> |
|||
<input type="text" id="materialType" name="materialType" th:field="*{materialType}" hidden /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">加工方式:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" > |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processMethod}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" > |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">品牌:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="brand" th:field="*{brand}" class="form-control" type="text" > |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">描述:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="describe" class="form-control" >[[*{describe}]]</textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">照片:</label> |
|||
<div class="col-sm-8"> |
|||
<el-upload |
|||
:action="fileUploadUrl" |
|||
:on-success="uploadSuccess" |
|||
:on-remove="uploadRemove" |
|||
:file-list="fileList" |
|||
list-type="picture" |
|||
accept=".jpg,.png" |
|||
multiple> |
|||
<el-button size="small" type="primary">点击上传</el-button> |
|||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div> |
|||
</el-upload> |
|||
</div> |
|||
<input id="photoAttachId" name = "photoAttachId" th:field="*{photoAttachId}" hidden > |
|||
<input id="fileIdStr" type="text" name="fileIdStr" th:field="*{fileIdStr}" hidden > |
|||
<input id="removeFileIdStr" type="text" name="removeFileIdStr" hidden > |
|||
</div> |
|||
<hr /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="reApply">是否继续申请:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="reApply" name="p_B_reApply" class="form-control m-b"> |
|||
<option value="true">重新申请</option> |
|||
<option value="false">结束流程</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:src="@{/ajax/libs/vue/vue.js}"></script> |
|||
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> |
|||
<script type="text/javascript"> |
|||
new Vue({ |
|||
el: '#app', |
|||
data: function() { |
|||
return { |
|||
fileList: [], |
|||
fileUploadUrl: ctx + "common/uploadSingleFile", |
|||
fileDeleteUrl: ctx + "common/deleteFile", |
|||
getListByAttachIdUrl: ctx + "system/attach/file/getListByAttachId", |
|||
fileIdList:[], |
|||
removeFileIdList:[], |
|||
|
|||
} |
|||
}, |
|||
mounted() { |
|||
|
|||
// 控制下拉框选中 |
|||
var materialType = $("#materialType").val(); |
|||
$("#selectMaterialType").val(materialType).trigger("change"); |
|||
|
|||
var that = this; |
|||
// 页面渲染完成,可以执行需要的操作 |
|||
console.log('页面已渲染完成'); |
|||
console.log($("#id").val()); |
|||
console.log($("#photoAttachId").val()); |
|||
var attachId = $("#photoAttachId").val(); |
|||
if(attachId){ |
|||
$.ajax({ |
|||
type: "get", |
|||
url: that.getListByAttachIdUrl, |
|||
data: {attachId:attachId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
result.data.forEach((item) => { |
|||
that.fileIdList.push(item.id); |
|||
that.fileList.push({name: item.name, url: item.url, attachFileId: item.id,isBind:true}); |
|||
}); |
|||
} else { |
|||
$.modal.msgError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.msgError("获取附件失败。"); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
methods: { |
|||
uploadSuccess(response, file, fileList) { |
|||
console.log(response); |
|||
if(response.code == web_status.SUCCESS){ |
|||
var attachFileId = response.data.id; |
|||
file.attachFileId = attachFileId; |
|||
file.isBind = false; |
|||
this.fileIdList.push(attachFileId); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
$.modal.msgSuccess("上传成功"); |
|||
}else{ |
|||
$.modal.alertError(response.msg); |
|||
} |
|||
}, |
|||
uploadRemove(file, fileList) { |
|||
console.log(file, fileList); |
|||
var attachFileId = file.attachFileId; |
|||
var isBind = file.isBind; |
|||
if(isBind==false){ |
|||
$.ajax({ |
|||
type: "get", |
|||
url: this.fileDeleteUrl, |
|||
data: {id:attachFileId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
} |
|||
$.modal.msgSuccess("删除附件成功。"); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertError("删除附件失败。"); |
|||
} |
|||
}); |
|||
}else{ |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
// 保存的时候才删除 |
|||
this.removeFileIdList.push(attachFileId); |
|||
$("#removeFileIdStr").val(this.removeFileIdList.join(";")); |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
}) |
|||
|
|||
var prefix = ctx + "erp/material"; |
|||
$("#form-edit").validate({ |
|||
onkeyup: false, |
|||
rules:{ |
|||
materialNo:{ |
|||
isInteger: true, |
|||
minlength: 10, |
|||
maxlength: 10, |
|||
// remote: { |
|||
// url: prefix + "/checkMaterialNoUnique", |
|||
// type: "post", |
|||
// dataType: "json", |
|||
// data: { |
|||
// "materialNo": function() { |
|||
// console.log($("#materialNo").val()) |
|||
// return $.common.trim($("#materialNo").val()); |
|||
// } |
|||
// }, |
|||
// dataFilter: function(data, type) { |
|||
// return $.validate.unique(data); |
|||
// } |
|||
// } |
|||
}, |
|||
}, |
|||
messages: { |
|||
"materialNo": { |
|||
// remote: "料号已经存在", |
|||
minlength: "请输入10位整数", |
|||
maxlength: "请输入10位整数", |
|||
}, |
|||
}, |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
var materialType = $('#selectMaterialType').select2('val'); |
|||
$('#materialType').val(materialType); |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,258 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('研发总监审核')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUserName" th:field="*{applyUserName}" class="form-control" type="text" readonly> |
|||
</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="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="materialNo" name="materialNo" th:field="*{materialNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" disabled> |
|||
<optgroup> |
|||
<option value="">请选择</option> |
|||
</optgroup> |
|||
<optgroup th:each="child: ${childList}" th:label="${child.name}"> |
|||
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option> |
|||
</optgroup> |
|||
</select> |
|||
</div> |
|||
<input type="text" id="materialType" name="materialType" th:field="*{materialType}" readonly hidden /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">加工方式:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}" disabled> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processMethod}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}" disabled> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">品牌:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="brand" th:field="*{brand}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">描述:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="describe" class="form-control" readonly>[[*{describe}]]</textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">照片:</label> |
|||
<div class="col-sm-8"> |
|||
<el-upload |
|||
:disabled="true" |
|||
:action="fileUploadUrl" |
|||
:on-success="uploadSuccess" |
|||
:on-remove="uploadRemove" |
|||
:file-list="fileList" |
|||
list-type="picture" |
|||
accept=".jpg,.png" |
|||
multiple> |
|||
<el-button size="small" type="primary">点击上传</el-button> |
|||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,第一张图片为主图</div> |
|||
</el-upload> |
|||
</div> |
|||
<input id="photoAttachId" name = "photoAttachId" th:field="*{photoAttachId}" hidden readonly> |
|||
<input id="fileIdStr" type="text" name="fileIdStr" th:field="*{fileIdStr}" hidden readonly> |
|||
<input id="removeFileIdStr" type="text" name="removeFileIdStr" hidden readonly> |
|||
</div> |
|||
<hr /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="yfzjVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_yfzjVerifyApproved" id="yfzjVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:src="@{/ajax/libs/vue/vue.js}"></script> |
|||
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> |
|||
<script type="text/javascript"> |
|||
new Vue({ |
|||
el: '#app', |
|||
data: function() { |
|||
return { |
|||
fileList: [], |
|||
fileUploadUrl: ctx + "common/uploadSingleFile", |
|||
fileDeleteUrl: ctx + "common/deleteFile", |
|||
getListByAttachIdUrl: ctx + "system/attach/file/getListByAttachId", |
|||
fileIdList:[], |
|||
removeFileIdList:[], |
|||
|
|||
} |
|||
}, |
|||
mounted() { |
|||
|
|||
// 控制下拉框选中 |
|||
var materialType = $("#materialType").val(); |
|||
$("#selectMaterialType").val(materialType).trigger("change"); |
|||
|
|||
var that = this; |
|||
// 页面渲染完成,可以执行需要的操作 |
|||
console.log('页面已渲染完成'); |
|||
console.log($("#id").val()); |
|||
console.log($("#photoAttachId").val()); |
|||
var attachId = $("#photoAttachId").val(); |
|||
if(attachId){ |
|||
$.ajax({ |
|||
type: "get", |
|||
url: that.getListByAttachIdUrl, |
|||
data: {attachId:attachId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
result.data.forEach((item) => { |
|||
that.fileIdList.push(item.id); |
|||
that.fileList.push({name: item.name, url: item.url, attachFileId: item.id,isBind:true}); |
|||
}); |
|||
} else { |
|||
$.modal.msgError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.msgError("获取附件失败。"); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
methods: { |
|||
uploadSuccess(response, file, fileList) { |
|||
console.log(response); |
|||
if(response.code == web_status.SUCCESS){ |
|||
var attachFileId = response.data.id; |
|||
file.attachFileId = attachFileId; |
|||
file.isBind = false; |
|||
this.fileIdList.push(attachFileId); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
$.modal.msgSuccess("上传成功"); |
|||
}else{ |
|||
$.modal.alertError(response.msg); |
|||
} |
|||
}, |
|||
uploadRemove(file, fileList) { |
|||
console.log(file, fileList); |
|||
var attachFileId = file.attachFileId; |
|||
var isBind = file.isBind; |
|||
if(isBind==false){ |
|||
$.ajax({ |
|||
type: "get", |
|||
url: this.fileDeleteUrl, |
|||
data: {id:attachFileId}, |
|||
cache: false, |
|||
async: false, // 设置成同步 |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
} |
|||
$.modal.msgSuccess("删除附件成功。"); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertError("删除附件失败。"); |
|||
} |
|||
}); |
|||
}else{ |
|||
var index = this.fileIdList.indexOf(attachFileId); |
|||
if(index!=-1){ |
|||
this.fileIdList.splice(index,1); |
|||
$("#fileIdStr").val(this.fileIdList.join(";")); |
|||
// 保存的时候才删除 |
|||
this.removeFileIdList.push(attachFileId); |
|||
$("#removeFileIdStr").val(this.removeFileIdList.join(";")); |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
}) |
|||
|
|||
var prefix = ctx + "erp/material"; |
|||
$("#form-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
var materialType = $('#selectMaterialType').select2('val'); |
|||
$('#materialType').val(materialType); |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue