From 03e68b2be24ea024eae645c47da1d4cb1773302a Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 13 十月 2023 19:47:13 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/lift.html |  287 +++++++++++++++++++++++++++++---------------------------
 1 files changed, 148 insertions(+), 139 deletions(-)

diff --git a/src/main/webapp/views/lift.html b/src/main/webapp/views/lift.html
index b8f5ea6..29fdfe0 100644
--- a/src/main/webapp/views/lift.html
+++ b/src/main/webapp/views/lift.html
@@ -29,20 +29,17 @@
                         <th>鎻愬崌鏈�</th>
                         <th>宸ヤ綔鍙�</th>
                         <th>浠诲姟鐘舵��</th>
-                        <th>鎻愬崌鏈洪攣瀹�</th>
-                        <th>浣嶇疆鍒拌揪鍙嶉</th>
-                        <th>鍑嗗灏辩华</th>
-                        <th>杩愯涓�</th>
-                        <th>鑱旀満/鍗曟満</th>
-                        <th>骞冲彴浣嶇疆鍋忓樊鎶ヨ</th>
-                        <th>骞冲彴鎵煩鍋忓樊鎶ヨ</th>
-                        <th>骞冲彴鍥涘悜杞︽娴�</th>
-                        <th>鏈氨缁姸鎬�</th>
-                        <th>浼烘湇1閿欒</th>
-                        <th>浼烘湇2閿欒</th>
-                        <th>浼烘湇3閿欒</th>
-                        <th>浼烘湇4閿欒</th>
-                        <th>鎻愬崌鏈哄疄闄呴�熷害鍙嶉</th>
+                        <th>妯″紡</th>
+                        <th>蹇欓棽</th>
+                        <th>鏈夋墭鐩�</th>
+                        <th>鏈夊皬杞�</th>
+                        <th>璁惧鏁呴殰</th>
+                        <th>鍓嶈秴闄�</th>
+                        <th>鍚庤秴闄�</th>
+                        <th>宸﹁秴闄�</th>
+                        <th>鍙宠秴闄�</th>
+                        <th>瓒呴珮</th>
+                        <th>瓒呴噸</th>
                     </tr>
                     </thead>
                     <tbody>
@@ -57,15 +54,13 @@
                 <tr>
                     <th>鎻愬崌鏈�</th>
                     <th>宸ヤ綔鍙�</th>
-                    <th>杈撻�佺嚎鍓嶇鍏夌數鏈夎揣</th>
-                    <th>杈撻�佺嚎姝h浆鍙嶉</th>
-                    <th>杈撻�佺嚎鍙嶈浆鍙嶉</th>
-                    <th>杈撻�佺嚎鐢垫満杩囪浇</th>
-                    <th>杈撻�佺嚎鏈鍏夌數鏈夎揣</th>
-                    <th>杩涜緭閫佺嚎鍗℃墭鐩樻姤璀�</th>
-                    <th>鍑鸿緭閫佺嚎鍗℃墭鐩樻姤璀�</th>
+                    <th>浠诲姟鍦板潃</th>
+                    <th>鐩殑鍦板潃</th>
+                    <th>宸插畬鎴愮殑浠诲姟鍙�</th>
+                    <th>灞�</th>
                     <th>浣滀笟鏍囪</th>
                     <th>绌挎杞﹀彿</th>
+                    <th>浠ょ墝</th>
                 </tr>
                 </thead>
                 <tbody>
@@ -98,17 +93,27 @@
                     <div class="button-group">
                         <select id="liftLev">
                             <option value="1" selected>1F</option>
-                            <option value="3">2F</option>
-                            <option value="4">3F</option>
-                            <option value="5">4F</option>
-                            <option value="2">杈撻�佺嚎浣嶇疆</option>
+                            <option value="2">2F</option>
+                            <option value="3">3F</option>
+                            <option value="4">4F</option>
+                            <option value="5">5F</option>
+                            <option value="6">6F</option>
+                            <option value="7">7F</option>
+                            <option value="8">8F</option>
+                            <option value="9">9F</option>
+                            <option value="10">10F</option>
                         </select>
                         <button class="item" onclick="liftOperator(1)">绉诲姩鎻愬崌鏈�</button>
-                        <button class="item" onclick="liftOperator(3)">鏃犺揣姝h浆</button>
-                        <button class="item" onclick="liftOperator(4)">鏃犺揣鍙嶈浆</button>
-                        <button class="item" onclick="liftOperator(5)">鏈夎揣姝h浆</button>
-                        <button class="item" onclick="liftOperator(6)">鏈夎揣鍙嶈浆</button>
-                        <button class="item" onclick="liftOperator(7)">閾炬潯鍋滄</button>
+
+                        <div class="select-container-item">
+                            <span>婧愮珯</span>
+                            <label><input id="sourceStaNo" type="text" name="sourceStaNo" /></label>
+                        </div>
+                        <div class="select-container-item">
+                            <span>鐩爣绔�</span>
+                            <label><input id="staNo" type="text" name="staNo" /></label>
+                        </div>
+                        <button class="item" onclick="liftOperator(2)">绉诲姩鎵樼洏</button>
                         <button class="item" onclick="liftOperator(0)">澶嶄綅</button>
                     </div>
                 </fieldset>
@@ -118,6 +123,39 @@
         <!-- 鎻愬崌鏈烘棩蹇楄緭鍑� -->
         <div class="lift-output-board">
             <textarea id="lift-output"></textarea>
+        </div>
+
+        <div id="lift-detl" style="display: none">
+            <div>
+                <div class="form-item">
+                    <label class="form-label">绔欏彿:</label>
+                    <div class="form-input">
+                        <input id="liftNo" name="liftNo" class="layui-input" lay-verify="required|number" autocomplete="off" disabled="disabled">
+                    </div>
+                </div>
+                <div class="form-item">
+                    <label class="form-label">宸ヤ綔鍙�:</label>
+                    <div class="form-input">
+                        <input id="workNo" name="workNo" type="number" class="layui-input" lay-verify="number" autocomplete="off">
+                    </div>
+                </div>
+                <div class="form-item">
+                    <label class="form-label">浣滀笟鏍囪:</label>
+                    <div class="form-input">
+                        <input id="pakMk" name="pakMk" type="text" class="layui-input" autocomplete="off">
+                    </div>
+                </div>
+                <div class="form-item">
+                    <label class="form-label">浠ょ墝:</label>
+                    <div class="form-input">
+                        <input id="token" name="token" type="text" class="layui-input" autocomplete="off">
+                    </div>
+                </div>
+                <div class="form-item form-button-container">
+                    <button class="form-button" id="save">淇濆瓨</button>
+                    <button class="form-button" id="cancel" style="background-color: #D0D0D0">鍙栨秷</button>
+                </div>
+            </div>
         </div>
     </div>
 </div>
@@ -163,82 +201,6 @@
         }
     }
 
-    var layerIdx;
-    $(document).on('click ','.pos-btn', function () {
-        let liftNo = Number($(this).parent().attr("data-liftNo"));
-        layerIdx = layer.open({
-            type: 1,
-            title: false,
-            shadeClose: true,
-            offset: [$(this).offset().top + 30 + 'px', $(this).offset().left + 'px'],
-            anim: 5,
-            shade: [0],
-            area: ['310px', '370px'],
-            closeBtn: 0,
-            content: $("#lift-detl"),
-            success: function(layero, index){
-                http.get(baseUrl+ "/lift/detl/"+liftNo, null, function (res) {
-                    $('#liftNo').val(liftNo);
-                    $('#workNo').val(res.data.workNo);
-                    $('#row').val(res.data.row);
-                    $('#bay').val(res.data.bay);
-                    $('#lev').val(res.data.lev);
-                    $('#crnNo').val(res.data.crnNo);
-                    $('#pakMk').val(res.data.pakMk);
-                })
-            },
-            end: function () {
-                $('#liftNo').val("");
-                $('#workNo').val("");
-                $('#row').val("");
-                $('#bay').val("");
-                $('#lev').val("");
-                $('#crnNo').val("");
-                $('#pakMk').val("");
-            }
-        })
-    })
-
-    var layerIdx0;
-    $(document).on('click ','.mode-btn', function () {
-        let liftNo = Number($(this).parent().attr("data-liftNo"));
-        layerIdx0 = layer.open({
-            type: 1,
-            title: false,
-            shadeClose: true,
-            offset: [$(this).offset().top + 30 + 'px', $(this).offset().left + 'px'],
-            anim: 5,
-            shade: [0],
-            area: ['70%', '85%'],
-            closeBtn: 0,
-            content: $("#lift-detl2"),
-            success: function(layero, index){
-                console.log(liftNo)
-                http.get(baseUrl+ "/lift/sensor/detl/"+liftNo, null, function (res) {
-                    $('#liftNo1').val(res.data.liftNo);
-                    getColor(res.data.pakInTask,'#pakInTask');
-                    getColor(res.data.pakOutTask,'#pakOutTask');
-                    getColor(res.data.pakMoveTask,'#pakMoveTask');
-                    getColor(res.data.goHpTask,'#goHpTask');
-                    getColor(res.data.goOHpTask,'#goOHpTask');
-                    getColor(res.data.goHpAvoid,'#goHpAvoid');
-                    getColor(res.data.goOHpAvoid,'#goOHpAvoid');
-                    getColor(res.data.pakInEmpty,'#pakInEmpty');
-                    getColor(res.data.pakInFinish,'#pakInFinish');
-                    getColor(res.data.pakOutEmpty,'#pakOutEmpty');
-                    getColor(res.data.pakOutFinish,'#pakOutFinish');
-                    getColor(res.data.goHpAvoidFinish,'#goHpAvoidFinish');
-                    getColor(res.data.goOHpAvoidFinish,'#goOHpAvoidFinish');
-                    getColor(res.data.goHpAvoidErr,'#goHpAvoidErr');
-                    getColor(res.data.goOHpAvoidErr,'#goOHpAvoidErr');
-                })
-            },
-            end: function () {
-                $('#liftNo').val("");
-            }
-        })
-    })
-
     function getColor(res,e){
         $(e).val(res?"鉁�":"鈥�");
         if (res){
@@ -252,19 +214,12 @@
         http.post(baseUrl+ "/lift/detl/update", {
             liftNo: $('#liftNo').val(),
             workNo: $('#workNo').val(),
-            row:  $('#row').val(),
-            bay: $('#bay').val(),
-            lev:  $('#lev').val(),
-            crnNo: $('#crnNo').val(),
             pakMk: $('#pakMk').val(),
+            token: $('#token').val(),
         }, function (res) {
             layer.msg("淇敼鎴愬姛", {icon: 1,});
-            layer.close(layerIdx);
+            layer.close(layerDetl);
         })
-    })
-
-    $(document).on('click ','#cancel', function () {
-        layer.close(layerIdx);
     })
 
     function setliftRadio() {
@@ -320,20 +275,17 @@
                         setVal(tr.children("td").eq(0), table[i-1].liftNo);
                         setVal(tr.children("td").eq(1), table[i-1].taskNo);
                         setVal(tr.children("td").eq(2), table[i-1].protocolStatus$);
-                        setVal(tr.children("td").eq(3), table[i-1].liftLock$);
-                        setVal(tr.children("td").eq(4), table[i-1].positionArrivalFeedback);
-                        setVal(tr.children("td").eq(5), table[i-1].ready$);
-                        setVal(tr.children("td").eq(6), table[i-1].running$);
-                        setVal(tr.children("td").eq(7), table[i-1].mode$);
-                        setVal(tr.children("td").eq(8), table[i-1].platPositionDeviationAlarm$);
-                        setVal(tr.children("td").eq(9), table[i-1].platTorqueDeviationAlarm$);
-                        setVal(tr.children("td").eq(10), table[i-1].platShuttleCheck$);
-                        setVal(tr.children("td").eq(11), table[i-1].notReady$);
-                        setVal(tr.children("td").eq(12), table[i-1].servoError1);
-                        setVal(tr.children("td").eq(13), table[i-1].servoError2);
-                        setVal(tr.children("td").eq(14), table[i-1].servoError3);
-                        setVal(tr.children("td").eq(15), table[i-1].servoError4);
-                        setVal(tr.children("td").eq(16), table[i-1].liftActualSpeed);
+                        setVal(tr.children("td").eq(3), table[i-1].model$);
+                        setVal(tr.children("td").eq(4), table[i-1].busy$);
+                        setVal(tr.children("td").eq(5), table[i-1].hasTray$);
+                        setVal(tr.children("td").eq(6), table[i-1].hasCar$);
+                        setVal(tr.children("td").eq(7), table[i-1].deviceError$);
+                        setVal(tr.children("td").eq(8), table[i-1].frontOverrun$);
+                        setVal(tr.children("td").eq(9), table[i-1].backOverrun$);
+                        setVal(tr.children("td").eq(10), table[i-1].leftOverrun$);
+                        setVal(tr.children("td").eq(11), table[i-1].rightOverrun$);
+                        setVal(tr.children("td").eq(12), table[i-1].overHeight$);
+                        setVal(tr.children("td").eq(13), table[i-1].overWeight$);
                     }
                 } else if (res.code === 403){
                     window.location.href = baseUrl+"/login";
@@ -362,15 +314,13 @@
                         var tr = tableEl.find("tr").eq(i);
                         setVal(tr.children("td").eq(0), table[i-1].liftNo);
                         setVal(tr.children("td").eq(1), table[i-1].workNo);
-                        setVal(tr.children("td").eq(2), table[i-1].lineFrontHasStock$);
-                        setVal(tr.children("td").eq(3), table[i-1].forwardRotationFeedback$);
-                        setVal(tr.children("td").eq(4), table[i-1].reverseFeedback$);
-                        setVal(tr.children("td").eq(5), table[i-1].motorOverload$);
-                        setVal(tr.children("td").eq(6), table[i-1].lineEndHasStock$);
-                        setVal(tr.children("td").eq(7), table[i-1].inConveyLineCardTrayAlarm$);
-                        setVal(tr.children("td").eq(8), table[i-1].outConveyLineCardTrayAlarm$);
-                        setVal(tr.children("td").eq(9), table[i-1].pakMk);
-                        setVal(tr.children("td").eq(10), table[i-1].shuttleNo);
+                        setVal(tr.children("td").eq(2), table[i-1].taskAddress);
+                        setVal(tr.children("td").eq(3), table[i-1].distAddress);
+                        setVal(tr.children("td").eq(4), table[i-1].completeTaskNo);
+                        setVal(tr.children("td").eq(5), table[i-1].lev);
+                        setVal(tr.children("td").eq(6), table[i-1].pakMk);
+                        setVal(tr.children("td").eq(7), table[i-1].shuttleNo);
+                        setVal(tr.children("td").eq(8), table[i-1].token);
                     }
                 } else if (res.code === 403){
                     window.location.href = baseUrl+"/login";
@@ -404,7 +354,9 @@
         http.post(baseUrl+"/lift/operator/lift", {
             liftNo: $('input[name="liftSelect"]:checked').val(),
             liftTaskMode: liftTaskMode,
-            lev: $("#liftLev").val()
+            lev: $("#liftLev").val(),
+            sourceStaNo: $("#sourceStaNo").val(),
+            staNo: $("#staNo").val()
         }, function (res) {
             layer.msg(res.msg, {icon: 1});
         });
@@ -493,4 +445,61 @@
         liftOutputDom.scrollTop = liftOutputDom.scrollHeight;
     }
 
+    // 璇︽儏鎿嶄綔 -------------------------------------------------------------------------
+    var layerDetl;
+    $(document).on('dblclick ','#lift-msg-table tr', function () {
+        var liftNo = $(this).children("td").eq(0).html();
+        if (liftNo !== null && liftNo !== "") {
+            layerDetl = layer.open({
+                type: 1,
+                title: false,
+                shadeClose: true,
+                offset: 'rt',
+                anim: 5,
+                shade: [0],
+                area: ['340px', '255px'],
+                closeBtn: 0,
+                content: $("#lift-detl"),
+                success: function(layero, index){
+                    $.ajax({
+                        url: baseUrl+ "/lift/table/lift/msg",
+                        headers: {'token': localStorage.getItem('token')},
+                        method: 'POST',
+                        success: function (res) {
+                            if (res.code === 200){
+                                var table = res.data;
+                                for (var i=1;i<=table.length;i++){
+                                    if (liftNo == table[i-1].liftNo) {
+                                        $('#liftNo').val(liftNo);
+                                        $('#workNo').val(table[i-1].workNo);
+                                        $('#pakMk').val(table[i-1].pakMk);
+                                        $('#token').val(table[i-1].token);
+                                    }
+                                }
+                            } else if (res.code === 403){
+                                window.location.href = baseUrl+"/login";
+                            }  else {
+                                console.log(res.msg);
+                            }
+                        }
+                    });
+                },
+                end: function () {
+                    $('#liftNo').val("");
+                    $('#workNo').val("");
+                    $('#pakMk').val("");
+                    $('#token').val("");
+                }
+            })
+        }
+    });
+
+    $(document).on('click ','#cancel', function () {
+        $('#liftNo').val("");
+        $('#workNo').val("");
+        $('#pakMk').val("");
+        $('#token').val("");
+        layer.close(layerDetl);
+    })
+
 </script>

--
Gitblit v1.9.1