YYC
2023-05-09 716ce196a6360cd0729d20723d7d49894bfbbc28
igds-app/js/admin/warn-list.js
@@ -4,8 +4,7 @@
var data = {
   "interfaceId": "5801",
   "tokenAuth": "",
   "sign": "10003",
   "outId": "10003",
   "outId": "58011",
   "reqDateTime": new Date(),
   "data": {
      "deptId": "",
@@ -15,8 +14,7 @@
var dataPop = {
   "interfaceId": "5802",
   "tokenAuth": "",
   "sign": "10003",
   "outId": "10003",
   "outId": "58021",
   "reqDateTime": new Date(),
   "data": {
      "id":"",
@@ -71,7 +69,53 @@
         mui.alert("系统繁忙,请重试!", "提示", ["确定"], function() {}, "div")
      }
   })
   // warnData ={
   //    "data": [
   //        {
   //            "id": "88",
   //            "name": "拉目些调",
   //            "type": "nostrud",
   //            "eventType": "cillumreprehenderitest",
   //            "level": "1",
   //            "status": "40",
   //            "time": "2006-11-01 14:01:36",
   //            "info": "dolor",
   //            "depotId": "6",
   //            "depotName": "矿共和中过",
   //       "remark":"00000"
   //        },
   //        {
   //            "id": "56",
   //            "name": "法都象叫与局",
   //            "type": "cillumreprehenderitUt",
   //            "eventType": "in",
   //            "level": "2",
   //            "status": "20",
   //            "time": "1981-02-18 22:28:23",
   //            "info": "deserunt Excepteur aliqua veniam commodo",
   //            "depotId": "28",
   //            "depotName": "龙用改素",
   //       "remark":"1111"
   //        },{
   //     "id": "72",
   //     "name": "华林九别",
   //     "type": "exdeseruntcillumeu",
   //     "eventType": "aliqua sint dolor aute",
   //     "level": "1",
   //     "status": "10",
   //     "time": "1978-07-23 12:17:27",
   //     "info": "deserunt nostrud id tempor",
   //     "depotId": "70",
   //     "depotName": "县志选只",
   //    "remark":""
   //   }
   //    ]
   // }
   renderWarn();
}
//默认获取当天日期(yyyy-MM-dd)
function getDate() {
@@ -137,7 +181,8 @@
      var warnList = warnData.data;
      if (warnList && warnList.length > 0) {
         $.each(warnList, function(index, item) {
            html += '<li><div class="con myfancy" onclick="openPop('+item.id+')">';
            html += '<li><div class="con myfancy" onclick="openPop(\'' + item.id + '\',\'' + (item.remark ==
               null ? "" : item.remark) + '\',\'' + item.status + '\')">';
            if (item.status == '10') {
               html += '<span class="type">未处理</span>';
            }
@@ -154,7 +199,8 @@
            html += '<div class="txt">';
            html += '<div class="box"><div class="group c"><div class="desc">' + item.type +
               '</div><div class="ort">警告类型</div></div></div>';
            html += '<div class="box"><div class="group c1"><div class="desc">' + item.depotName +
            html += '<div class="box"><div class="group c1"><div class="desc">' + (item.depotName == null ||
                  item.depotName == "" ? "--" : item.depotName) +
               '</div><div class="ort">仓库名称</div></div></div>';
            if (item.level == '1') {
               html +=
@@ -183,8 +229,15 @@
//打开弹窗
function openPop(warnId) {
function openPop(warnId, remark, status) {
   dataPop.data.id = warnId;
   var html = ''
   if (status == '10') {
      html += '<button type="button" class="mui-btn cancel"  onclick="handleWarn("1")">忽略</button>'
      html += '<button type="button" class="mui-btn confirm" onclick="handleWarn("2")">处理</button>'
   }
   $("#handleWarn").html(html);
   $("#textareaPop").val(remark)
   $('#m-pop').css('display', 'flex');
}
//警告处理