| | |
| | | var dateTime; |
| | | //工单审核列表 |
| | | var data = { |
| | | "interfaceId": "5703", |
| | | "outId": "10703", |
| | | "interfaceId": "5101", |
| | | "outId": "10101", |
| | | "reqDateTime": new Date(), |
| | | "tokenAuth": "", |
| | | "data": { |
| | |
| | | }; |
| | | //工单审核 |
| | | var data1 = { |
| | | "interfaceId": "5704", |
| | | "outId": "10704", |
| | | "interfaceId": "5102", |
| | | "outId": "10102", |
| | | "reqDateTime": new Date(), |
| | | "tokenAuth": "", |
| | | "data": { |
| | |
| | | function init() { |
| | | var user = JSON.parse(localStorage.getItem('user')); |
| | | var selectDeptId = JSON.parse(localStorage.getItem('selectDeptId')); |
| | | url = user.url + "/api-phone/v35/gateway"; |
| | | url = user.url + "/api/phone/v1/gateway"; |
| | | data.tokenAuth = user.tokenAuth; |
| | | data1.tokenAuth = user.tokenAuth; |
| | | data.data.deptId = selectDeptId; |
| | | |
| | | deptId = selectDeptId; |
| | | if(deptId == null){ |
| | | deptId = user.deptId |
| | | } |
| | | data.data.deptId = deptId; |
| | | data1.data.deptId = deptId; |
| | | |
| | | dateTime = getDate(new Date()); |
| | | getAuditList(); |
| | | } |
| | |
| | | success: function(result) { |
| | | if (result.code == "0000") { |
| | | auditList = result.data; |
| | | // console.log(JSON.stringify(auditList)) |
| | | renderAuditList(); |
| | | } else { |
| | | auditList = '' |
| | | renderAuditList(); |
| | | mui.alert(result.msg, '提示', ["确定"], function() {}, "div"); |
| | | } |
| | | }, |
| | | error: function() { |
| | | auditList = '' |
| | | renderAuditList(); |
| | | mui.alert('系统繁忙,请重新登录尝试!', '提示', ["确定"], function() {}, "div"); |
| | | |
| | |
| | | if (auditList && auditList.length > 0) { |
| | | $.each(auditList, function(index, item) { |
| | | html += '<li><div class="con"><div class="top"><div class="left">'; |
| | | html += '<div class="line"><div class="t">申请人: </div><div class="v">' + item.applyUserName +'</div></div></div>'; |
| | | html += '<div class="right"><div class="icon" info="' + item.info + '"><img src="images/icons/g-i26.png" alt=""></div></div></div>'; |
| | | html += '<div class="line"><div class="t">申请人: </div><div class="v">'+item.createBy+'</div></div>'; |
| | | html += '<div class="line"><div class="t">所属分库: </div><div class="v">'+item.deptName+'</div></div>'; |
| | | html += '<div class="line"><div class="t">工单名称: </div><div class="v">'+item.title+'</div></div></div>'; |
| | | html += '<div class="right"><div class="icon" info="' + ((item.description==null)?"":item.description) + '"><img src="images/icons/g-i26.png" alt=""></div></div></div>'; |
| | | html += |
| | | '<div class="box"><ul class="gd-list"><li><a href="" class="con" style="background-image: url(images/icons/a-bg12.png);">'; |
| | | html += '<div class="tit">业务类型:</div><div class="name">' + item.type + '</div></a></li>'; |
| | | html += '<div class="tit">业务类型:</div><div class="name">' + item.bizTypeName + '</div></a></li>'; |
| | | html += '<li><a href="" class="con" style="background-image: url(images/icons/a-bg13.png);">'; |
| | | html += '<div class="tit">关联仓库:</div><div class="name">' + (item.depotName == null ? "--" : item.depotName) + '</div></a></li></ul>'; |
| | | html += '<div class="time">有效期: ' + item.startTime + '至' + item.endTime + ' </div>'; |
| | | html += '<div class="btns"><a href="" id = "' + item.id + |
| | | '" class="btn refuse">拒绝</a><a href="" id = "' + item.id + '" class="btn adopt">通过</a></div>'; |
| | | html += '<div class="tit">当前处理人:</div><div class="name">' +( (item.assigneeName==null)?"--":item.assigneeName )+ '</div></a></li></ul>'; |
| | | html += '<div class="time">工单创建时间: '+item.createTime+'</div>'; |
| | | html += '<div class="time">当前环节接受时间: '+item.receiveTime+'</div>'; |
| | | html += '<div class="btns"><a href="" node = "' + item.node + '" id = "' + item.id + |
| | | '" class="btn refuse">拒绝</a><a href="" node = "' + item.node + '" id = "' + item.id + '" class="btn adopt">通过</a></div>'; |
| | | html += '</div></div></div></li>'; |
| | | }) |
| | | } else { |
| | | html += '<li><div class="con"><div class="top"><div class="left">'; |
| | | html += '<div class="line"><div class="t">申请人: </div><div class="v">暂无工单审核</div></div></div>'; |
| | | html += '<div class="right"><div class="icon" info="暂无工单审核信息"><img src="images/icons/g-i26.png" alt=""></div></div></div>'; |
| | | html += |
| | | '<div class="box"><ul class="gd-list"><li><a href="" class="con" style="background-image: url(images/icons/a-bg12.png);">'; |
| | | html += '<div class="tit">业务类型:</div><div class="name">--</div></a></li>'; |
| | | html += '<li><a href="" class="con" style="background-image: url(images/icons/a-bg13.png);">'; |
| | | html += '<div class="tit">关联仓库:</div><div class="name">--</div></a></li></ul>'; |
| | | html += '<div class="time">有效期: ' + dateTime + ' 至 ' + dateTime + ' </div>'; |
| | | html += '</div></div></div></li>'; |
| | | |
| | | // html += |
| | | // '<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding: 18px;">暂无工单审核信息</div></div></li>'; |
| | | '<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding: 18px;">暂无工单审核信息</div></div></li>'; |
| | | } |
| | | $("#handleList").html(html); |
| | | } |
| | |
| | | success: function(result) { |
| | | if (result.code == "0000") { |
| | | workAuditData = result.data; |
| | | // console.log(JSON.stringify(auditList)) |
| | | getAuditList(); |
| | | } else { |
| | | mui.alert(result.msg, '提示', ["确定"], function() {}, "div"); |
| | | } |
| | |
| | | //拒绝 |
| | | mui(".mui-scroll").on("tap", ".wp ul li .refuse", function() { |
| | | var id = this.getAttribute("id"); |
| | | var node = this.getAttribute("node"); |
| | | console.log(id) |
| | | data1.data.id = id |
| | | data1.data.status = '10' |
| | | data1.data.orderId = id |
| | | data1.data.status = 'refuse' |
| | | data1.data.node = node |
| | | workAudit(); |
| | | }) |
| | | |
| | | //通过 |
| | | mui(".mui-scroll").on("tap", ".wp ul li .adopt", function() { |
| | | var id = this.getAttribute("id"); |
| | | var node = this.getAttribute("node"); |
| | | console.log(id) |
| | | data1.data.id = id |
| | | data1.data.status = '20' |
| | | data1.data.orderId = id |
| | | data1.data.status = 'pass' |
| | | data1.data.node = node |
| | | workAudit(); |
| | | }) |
| | | //查看申请内容 |