Authored by qinchao

工单处理防止重复生成

... ... @@ -149,7 +149,7 @@
</c:when>
<c:when test="${pendingJob.currentStatus == 10}"><%--待审核状态--%>
<button type="button" class="btn btn-success"
onclick="editWork(${pendingJob.id},'${pendingJob.type}',4)">审核通过
onclick="editWork(${pendingJob.id},'${pendingJob.type}',4,this)">审核通过
</button>
<%--<button type="button" class="btn btn-primary"
onclick="editWork(${pendingJob.id},'${pendingJob.type}',3)">拒绝
... ... @@ -157,7 +157,7 @@
</c:when>
<c:otherwise>
<button type="button" class="btn btn-success"
onclick="editWork(${pendingJob.id},'${pendingJob.type}',2)">通过
onclick="editWork(${pendingJob.id},'${pendingJob.type}',2,this)">通过
</button>
<%--<button type="button" class="btn btn-primary"
onclick="editWork(${pendingJob.id},'${pendingJob.type}',3)">拒绝
... ... @@ -203,7 +203,11 @@
* @param id
* @param handleType
*/
function editWork(id, type, handleType) {
function editWork(id, type, handleType,obj) {
if(obj){
$(obj).prop('disabled', true);
}
var needTest = false;
var dbTestName = "";
if ($('input:radio[name="needTest"]').length != 0) {
... ...
... ... @@ -131,7 +131,7 @@
$("<button onclick=\"editWork(\'" + rowData.id + "\',\'" + rowData.type + "\',2)\">").addClass("btn btn-xs btn-success").html("发起").appendTo(div);
div.append("&nbsp;");
}else if(rowData.currentStatus == 10){//待审核状态,审核通过--与dba通过相区分
$("<button onclick=\"editWork(\'" + rowData.id + "\',\'" + rowData.type + "\',4)\">").addClass("btn btn-xs btn-success").html("审核通过").appendTo(div);
$("<button onclick=\"editWork(\'" + rowData.id + "\',\'" + rowData.type + "\',4,this)\">").addClass("btn btn-xs btn-success").html("审核通过").appendTo(div);
/*div.append("&nbsp;");
$("<button onclick=\"editWork(\'" + rowData.id + "\',\'" + rowData.type + "\',3)\">").addClass("btn btn-xs btn-primary").html("拒绝").appendTo(div);*/
div.append("&nbsp;");
... ... @@ -141,14 +141,14 @@
$( "<a href=\'" + contextPath + "workSystem/toWorkJob/?workid=" + rowData.workId + "&type=" + rowData.type + "\'>" + value + "</a>").addClass("btn btn-xs btn-success").html("进入发布").appendTo(div);
div.append("&nbsp;");
}else{
$("<button onclick=\"editWork(\'" + rowData.id + "\',\'" + rowData.type + "\',2)\">").addClass("btn btn-xs btn-success").html("通过").appendTo(div);
$("<button onclick=\"editWork(\'" + rowData.id + "\',\'" + rowData.type + "\',2,this)\">").addClass("btn btn-xs btn-success").html("通过").appendTo(div);
div.append("&nbsp;");
}
/*$("<button onclick=\"editWork(\'" + rowData.id + "\',\'" + rowData.type + "\',3)\">").addClass("btn btn-xs btn-primary").html("拒绝").appendTo(div);
div.append("&nbsp;");*/
}
$("<button onclick=\"editWork(\'" + rowData.id + "\',\'" + rowData.type + "\',-1)\">").addClass("btn btn-xs btn-danger").html("关闭").appendTo(div);
$("<button onclick=\"editWork(\'" + rowData.id + "\',\'" + rowData.type + "\',-1,this)\">").addClass("btn btn-xs btn-danger").html("关闭").appendTo(div);
return div;
}
}
... ... @@ -161,7 +161,11 @@
* @param id
* @param handleType
*/
function editWork(id,type, handleType) {
function editWork(id,type, handleType,obj) {
if(obj){
$(obj).prop('disabled', true);
}
var param = {
id: id,
type:type,
... ...
... ... @@ -198,7 +198,7 @@
</c:when>
<c:otherwise>
<button type="button" class="btn btn-success" onclick="editWork(${pendingJob.id},'${pendingJob.type}',2)">通过</button>
<button type="button" class="btn btn-success" onclick="editWork(${pendingJob.id},'${pendingJob.type}',2,this)">通过</button>
<%--<button type="button" class="btn btn-primary" onclick="editWork(${pendingJob.id},'${pendingJob.type}',3)">拒绝</button>--%>
</c:otherwise>
</c:choose>
... ... @@ -253,7 +253,11 @@
* @param id
* @param handleType
*/
function editWork(id,type, handleType) {
function editWork(id,type, handleType,obj) {
if(obj){
$(obj).prop('disabled', true);
}
var param = {
id: id,
type:type,
... ...