YYC
2025-05-15 2df906a447195f9786dd468512ea895d6cc18532
igds-app/js/admin/work-audit.js
@@ -1,6 +1,7 @@
var url = null;
var auditList = null;
var workAuditData = null;
var dateTime;
//工单审核列表
var data = {
   "interfaceId": "5703",
@@ -26,14 +27,29 @@
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/v35/gateway";
   data.tokenAuth = user.tokenAuth;
   data1.tokenAuth = user.tokenAuth;
   data.data.deptId = selectDeptId;
   dateTime = getDate(new Date());
   getAuditList();
}
//日期格式化yyyy-MM-dd
function getDate(date) {
   var year = date.getFullYear();
   var month, day,hour,minute;
   month = date.getMonth() + 1;
   if (month > 0 && month <= 9) {
      month = "0" + month;
   }
   day = date.getDate()
   if (day > 0 && day <= 9) {
      day = "0" + day
   }
   hour = date.getHours();
   minute = date.getMinutes();
   return year + "-" + month + "-" + day + " "+ hour + ":" + minute
}
//获取工单审核列表
function getAuditList() {
   console.log(JSON.stringify(data.data),"work-aduit","工单审核列表")
@@ -59,55 +75,6 @@
      }
   })
   auditList = [{
         "id": "59",
         "deptName": "1号仓",
         "applyUser": "in anim exercitation",
         "applyUserName": "郝军",
         "type": "exercitation reprehenderit sint",
         "startTime": "1974-07-05 21:56",
         "endTime": "2013-08-19 05:43",
         "info": "sed adipisicing quis irure",
         "depotId": "90",
         "depotName": "即传状新五际"
      },
      {
         "id": "39",
         "deptName": "1号仓",
         "applyUser": "dolor laboris",
         "applyUserName": "袁强",
         "type": "sed et sit irure eu",
         "startTime": "2015-10-25 12:30",
         "endTime": "1971-04-18 19:34",
         "info": "reprehenderit qui quis pariatur anim",
         "depotId": "89",
         "depotName": "当入物还算"
      },
      {
         "id": "55",
         "deptName": "3号仓",
         "applyUser": "quis",
         "applyUserName": "宋丽",
         "type": "in",
         "startTime": "1994-10-12 18:25",
         "endTime": "2008-01-19 00:26",
         "info": "ex ullamco id dolor",
         "depotId": "42",
         "depotName": "新常技位中"
      },
      {
         "id": "50",
         "deptName": "2号仓",
         "applyUser": "dolor",
         "applyUserName": "黄超",
         "type": "nostrud elit",
         "startTime": "2018-07-07 10:25",
         "endTime": "2000-11-07 10:02",
         "info": "et minim",
         "depotId": "53",
         "depotName": "人离它军题"
      }
   ]
}
function renderAuditList() {
@@ -115,26 +82,32 @@
   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>';
         html += '<div class="line"><div class="t">所属分库:</div><div class="v">' + (item.deptName == null ?
            "" : item.deptName) + '</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.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="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 += '<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="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></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 +=
         '<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding: 18px;">暂无工单审核信息</div></div></li>';
         '<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>';
   }
   $("#handleList").html(html);
}
@@ -194,7 +167,7 @@
}
mui('.mui-scroll-wrapper').scroll({
   indicators: false, //是否显示滚动条
   indicators: true, //是否显示滚动条
   deceleration: 0.0006, //阻尼系数,系数越小滑动越灵敏
   bounce: false, //是否启用回弹
   deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006