#
luxiaotao1123
2020-08-19 ec37295a8adbb8a6a850e1fddf5957ae5ad662e3
src/main/webapp/views/crn.html
@@ -27,11 +27,11 @@
            <span>&nbsp;</span>
            <input id="crn1" disabled="disabled">
        </div>
        <div class="crn-command-item">
            <label>2#</label>
            <span>&nbsp;</span>
            <input id="crn2" disabled="disabled">
        </div>
<!--        <div class="crn-command-item">-->
<!--            <label>2#</label>-->
<!--            <span>&nbsp;</span>-->
<!--            <input id="crn2" disabled="disabled">-->
<!--        </div>-->
    </div>
    <!-- 堆垛机状态位信息 -->
    <div class="crn-state">
@@ -39,18 +39,15 @@
            <thead>
                <tr>
                    <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>任务号</th>
                    <th>状态</th>
                    <th>报警码</th>
                    <th>载货台位置</th>
                </tr>
            </thead>
            <tbody>
@@ -64,15 +61,12 @@
        <thead>
            <tr>
                <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>
@@ -96,7 +90,7 @@
            <span class="select-title">堆垛机号</span>
            <div class="select-container">
                <label><input type="radio" name="crnSelect" value="1" checked>&nbsp;1号堆垛机</label>
                <label><input type="radio" name="crnSelect" value="2">&nbsp;2号堆垛机</label>
<!--                <label><input type="radio" name="crnSelect" value="2">&nbsp;2号堆垛机</label>-->
            </div>
        </div>
        <!-- 源站/源库位 选择 -->
@@ -154,12 +148,14 @@
                <button class="item" onclick="take()">出库</button>
                <button class="item" onclick="stockMove()">库位转移</button>
                <button class="item" onclick="siteMove()">站到站</button>
                <button class="item" onclick="coorMove()">坐标移动</button>
                <button class="item" onclick="bacOrigin()">回原点</button>
                <button class="item" onclick="reverseOrigin()">反原点</button>
                <button class="item" onclick="coorMove()">坐标移行</button>
                <button class="item" onclick="taskComplete()">任务完成</button>
                <button class="item" onclick="pause()">暂停</button>
                <button class="item" onclick="boot()">启动</button>
<!--                <button class="item" onclick="pause()">暂停</button>-->
<!--                <button class="item" onclick="boot()">启动</button>-->
                <button class="item" onclick="clearCommand()">清除命令</button>
                <button class="item" onclick="handleReset()">复位</button>
            </div>
        </fieldset>
    </div>
@@ -249,18 +245,15 @@
                    for (var i=1;i<=table.length;i++){
                        var tr = tableEl.find("tr").eq(i);
                        setVal(tr.children("td").eq(0), table[i-1].crnNo);
                        setVal(tr.children("td").eq(1), table[i-1].type);
                        setVal(tr.children("td").eq(2), table[i-1].warn);
                        setVal(tr.children("td").eq(3), table[i-1].loading);
                        setVal(tr.children("td").eq(4), table[i-1].bay);
                        setVal(tr.children("td").eq(5), table[i-1].lev);
                        setVal(tr.children("td").eq(6), table[i-1].forkOffset);
                        setVal(tr.children("td").eq(7), table[i-1].bayCoor);
                        setVal(tr.children("td").eq(8), table[i-1].levCoor);
                        setVal(tr.children("td").eq(9), table[i-1].complete);
                        setVal(tr.children("td").eq(10), table[i-1].workNo);
                        setVal(tr.children("td").eq(11), table[i-1].status);
                        setVal(tr.children("td").eq(12), table[i-1].warnCode);
                        setVal(tr.children("td").eq(1), table[i-1].workNo);
                        setVal(tr.children("td").eq(2), table[i-1].statusType);
                        setVal(tr.children("td").eq(3), table[i-1].status);
                        setVal(tr.children("td").eq(4), table[i-1].warn);
                        setVal(tr.children("td").eq(5), table[i-1].loading);
                        setVal(tr.children("td").eq(6), table[i-1].bay);
                        setVal(tr.children("td").eq(7), table[i-1].lev);
                        setVal(tr.children("td").eq(8), table[i-1].forkOffset);
                        setVal(tr.children("td").eq(9), table[i-1].liftPos);
                    }
                } else if (res.code === 403){
                    window.location.href = baseUrl+"/login";
@@ -288,15 +281,12 @@
                    for (var i=1;i<=table.length;i++){
                        var tr = tableEl.find("tr").eq(i);
                        setVal(tr.children("td").eq(0), table[i-1].crnNo);
                        setVal(tr.children("td").eq(1), table[i-1].status);
                        setVal(tr.children("td").eq(2), table[i-1].workNo);
                        setVal(tr.children("td").eq(1), table[i-1].workNo);
                        setVal(tr.children("td").eq(2), table[i-1].status);
                        setVal(tr.children("td").eq(3), table[i-1].sourceStaNo);
                        setVal(tr.children("td").eq(4), table[i-1].staNo);
                        setVal(tr.children("td").eq(5), table[i-1].sourceLocNo);
                        setVal(tr.children("td").eq(6), table[i-1].locNo);
                        setVal(tr.children("td").eq(7), table[i-1].error);
                        setVal(tr.children("td").eq(8), table[i-1].origin);
                        setVal(tr.children("td").eq(9), table[i-1].command);
                    }
                } else if (res.code === 403){
                    window.location.href = baseUrl+"/login";
@@ -374,6 +364,13 @@
        });
    }
    // 回原点
    function reverseOrigin() {
        http.post(baseUrl+"/crn/operator/reverseOrigin", getReqParam(), function (res) {
            layer.msg(res.msg);
        });
    }
    // 任务完成
    function taskComplete() {
        http.post(baseUrl+"/crn/operator/taskComplete", getReqParam(), function (res) {
@@ -397,6 +394,13 @@
    // 清除命令
    function clearCommand() {
        http.post(baseUrl+"/crn/operator/clearCommand", getReqParam(), function (res) {
            layer.msg(res.msg);
        });
    }
    // 手动复位
    function handleReset() {
        http.post(baseUrl+"/crn/operator/clearCommand", getReqParam(), function (res) {
            layer.msg(res.msg);
        });
@@ -448,9 +452,6 @@
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "     </tr>\n";
        }
        $('#crn-state-table tbody').after(html);
@@ -472,9 +473,6 @@
        var html = "";
        for (var i = 0; i < line; i ++){
            html += " <tr>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +
                "       <td></td>\n" +