zhaowc
2025-02-28 157abc191c34e57c1b958ae74fc3de6518ca8a30
HTML/views/QualityControl/QualityInformation.html
@@ -73,6 +73,22 @@
                        <i class="layui-icon layui-icon-add layuiadmin-button-btn"></i>添加
                     </button>
                  </div>
                  <div class="layui-inline" id="divFinish" style="display: none; padding-top: 10px;">
                     <div class="layui-inline">
                        <label class="layui-form-label">账号</label>
                        <div class="layui-input-inline" style="width: 220px;">
                           <input type="text" id="admin" name="admin" placeholder="账号" autocomplete="off"
                           class="layui-input">
                        </div>
                     </div>
                     <div class="layui-inline DivLoadingArea" style="margin-top: 10px;">
                        <label class="layui-form-label">密码</label>
                        <div class="layui-input-inline" style="width: 220px;">
                           <input type="password" id="password" name="password" placeholder="密码" autocomplete="off"
                           class="layui-input">
                        </div>
                     </div>
                  </div>
               </div>
            </div>
            <div id="center"></div>
@@ -96,6 +112,15 @@
                   </div> 
                  
                  <script type="text/html" id="IsStatus">
                     {{#  if(d.Status=='0'){ }}
                        <p>等待审核</p>
                     {{#  } else if(d.Status=='1'){ }}
                        <p>通过</p>
                     {{#  } else if(d.Status=='2'){ }}
                        <p>不通过</p>
                     {{#  } }}
                  </script>
                  <script type="text/html" id="IsQualifiedButton">
                     {{#  if(d.IsQualified=='0'){ }}
                        <p>不合格</p>
@@ -107,6 +132,23 @@
                     {{# console.log(d.CreateTime);
                           return formatDate(d.CreateTime);
                     }}
                  </script>
                  <script type="text/html" id="CaoZuoList">
                     {{# function GetBtn(d){
                           var html = '';
                           console.log(d);
                           switch (d.Status) {
                              case "0" :
                              html += `<a class="layui-btn layui-btn-normal layui-btn-xs editClass" lay-event="edit">
                                       <i class="layui-icon layui-icon-edit"></i>复核</a>`;
                                 break;
                              default :
                              break;
                           }
                           return html;
                        }
                     }}
                     {{ GetBtn(d) }}
                  </script>
               
            </div>
@@ -137,6 +179,7 @@
                  {
                     field: 'InspectNo',title: '检验号',align: 'center'
                  }, 
                  {
                     field: 'SkuNo',title: '物料编码',align: 'center'
                  }, 
@@ -166,6 +209,9 @@
                  },
                  {
                     field: 'CreateTime',title: '创建时间',align: 'center', templet: '#CreateTimeButton',
                  },
                  {
                     field: 'caozuo', title: '操作', fixed: 'right', width: 100, align: 'center', toolbar: '#CaoZuoList', "disabled": true
                  },
               ]];
            var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码
@@ -291,6 +337,7 @@
            function setRight() {
               $(function() {
                  $("#approvalBtn").hide();
                  $("#editClass").hide();
               });
               sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
                  if (res.code == 0) { //成功 
@@ -299,6 +346,12 @@
                        {
                           $(function() {
                              $("#approvalBtn").show();
                           });
                        }
                        if (res.data[k].MenuName == "复核质检结果")
                        {
                           $(function() {
                              $(".editClass").show();
                           });
                        }
                     }
@@ -406,6 +459,98 @@
               });
            })
            
            table.on('tool(LAY-app-content-list)', function (obj) {
               var data = obj.data;
               switch(obj.event)
               {
                  case "edit" :
                     layer.open({
                        type: 1,
                        title: '复核确认',
                        content: $('#divFinish'),
                        maxmin: true,
                        area: ['350px','215px'],
                        btn: ['确定', '取消'],
                        yes: function(index, layero) {
                           var pa = $('#PickingArea').val();
                           console.log(pa)
                           if (doing== true) {
                              doing= false;
                              if($('#admin').val()==''){
                                 layer.msg("请输入账号", {
                                    icon: 2,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                 });
                                 doing= true;
                                 return;
                              }
                              if($("#password").val() == '')
                              {
                                 layer.msg("请输入密码", {
                                    icon: 2,
                                    time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                 });
                                 doing= true;
                                 return;
                              }
                              var param = {
                                 Id:data.Id,
                                 UserNo:$('#admin').val(),
                                 Password:$('#password').val(),
                              };
                              console.log(param);
                              sendData(IP + "/BllQuality/InsertFuHe", param, 'post', function (res) {
                                 if (res.code == 0) { //成功
                                    layer.msg(res.msg, {
                                       icon: 1,
                                       time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function () {
                                       refreshTable
                                       (
                                          // $("#ASNNo").val(),
                                          $("#LotNo").val(),
                                          $("#SkuNo").val(),
                                          $("#SkuName").val(),
                                          $("#InsertQuality").val(),
                                       );
                                       $('#admin').val("");
                                       $('#password').val("");
                                       doing = true
                                    });
                                 } else { //不成功
                                    layer.msg(res.msg, {
                                       icon: 2,
                                       time: 2000 //2秒关闭(如果不配置,默认是3秒)
                                    }, function () {
                                       doing = true ;
                                       $('#admin').val("");
                                       $('#password').val("")
                                    });
                                 }
                                 layer.close(index);
                              });
                           }else{
                              layer.msg("请勿重复点击", {
                                 icon: 2,
                                 time: 2000 //2秒关闭(如果不配置,默认是3秒)
                              });
                           }
                        }
                     });
                     break;
                  default:break;
               }
            });
            var element = layui.element;
            var houseId = 0;
            var param = {