From 5ce969ed34e91c931cce38e2feb5d2c208633a96 Mon Sep 17 00:00:00 2001 From: chengsc <Demo@DESKTOP-CPA90BF> Date: 星期日, 03 十一月 2024 18:34:53 +0800 Subject: [PATCH] 修改问题 --- HTML/views/QualityControl/QualityInformation.html | 153 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 149 insertions(+), 4 deletions(-) diff --git a/HTML/views/QualityControl/QualityInformation.html b/HTML/views/QualityControl/QualityInformation.html index 7ba4310..dbb65f2 100644 --- a/HTML/views/QualityControl/QualityInformation.html +++ b/HTML/views/QualityControl/QualityInformation.html @@ -32,11 +32,11 @@ <input type="text" id="ASNNo" name="ASNNo" placeholder="璇疯緭鍏ュ叆搴撳崟鎹�" autocomplete="off" class="layui-input"> </div> </div> --> - <!-- 鎵规 --> + <!-- 杩涘巶缂栧彿 --> <div class="layui-inline"> - <label class="layui-form-label" style="width: 60px;">鎵规鍙�</label> + <label class="layui-form-label" style="width: 60px;">杩涘巶缂栧彿</label> <div class="layui-input-inline"> - <input type="text" id="LotNo" name="LotNo" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" autocomplete="off" class="layui-input"> + <input type="text" id="LotNo" name="LotNo" placeholder="璇疯緭鍏ヨ繘鍘傜紪鍙�" autocomplete="off" class="layui-input"> </div> </div> <!-- 鐗╂枡鍙� --> @@ -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="text" 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' }, @@ -147,7 +190,7 @@ field: 'Standard',title: '鐗╂枡瑙勬牸',align: 'center' }, { - field: 'LotNo',title: '鎵规鍙�',align: 'center' + field: 'LotNo',title: '杩涘巶缂栧彿',align: 'center' }, { field: 'IsQualified',title: '妫�楠岀粨鏋�',align: 'center',templet: '#IsQualifiedButton', @@ -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)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 @@ -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 = { -- Gitblit v1.8.0