#
luxiaotao1123
2021-06-03 958b12cccc9e0043eb0c6b9bb84ebdf554ebe1a1
src/main/webapp/views/pda/combAgv.html
@@ -30,7 +30,6 @@
            <!-- 工作区 -->
            <div class="layui-inline" style="width: 100px; margin-left: 10px">
                <select id="devpSelect">
                    <option value="">工作区</option>
                </select>
            </div>
        </div>
@@ -81,12 +80,13 @@
    // 获取工作区
    function getDevp(){
        $.ajax({
            url: baseUrl+"/available/put/site",
            url: baseUrl+"/agv/put/site",
            headers: {'token': localStorage.getItem('token')},
            method: 'POST',
            async: false,
            success: function (res) {
                if (res.code === 200){
                    $('#devpSelect').html('');
                    var tpl = $("#devpSelectTemplate").html();
                    var template = Handlebars.compile(tpl);
                    var html = template(res);
@@ -177,28 +177,28 @@
            tips("请选择工作区", true);
            return;
        }
        alert("小车组托入库完成(功能还未实现)");
//        $.ajax({
//            url: baseUrl+"/mobile/comb/auth",
//            headers: {'token': localStorage.getItem('token')},
//            data: JSON.stringify({
//                barcode: barcode,
//                combMats: matData
//            }),
//            contentType:'application/json;charset=UTF-8',
//            method: 'POST',
//            async: false,
//            success: function (res) {
//                if (res.code === 200) {
//                    reset();
//                    tips("组托成功")
//                } else if (res.code === 403) {
//                    top.location.href = baseUrl + "/pda";
//                } else {
//                    tips(res.msg, true)
//                }
//            }
//        })
       $.ajax({
           url: baseUrl+"/mobile/comb/auth",
           headers: {'token': localStorage.getItem('token')},
           data: JSON.stringify({
               barcode: barcode,
               combMats: matData,
               agvSite: devp
           }),
           contentType:'application/json;charset=UTF-8',
           method: 'POST',
           async: false,
           success: function (res) {
               if (res.code === 200) {
                   reset();
                   tips("组托成功")
               } else if (res.code === 403) {
                   top.location.href = baseUrl + "/pda";
               } else {
                   tips(res.msg, true)
               }
           }
       })
    }
    /**
@@ -232,6 +232,7 @@
</script>
<script type="text/template" id="devpSelectTemplate">
    <option value="">工作区</option>
    {{#each data}}
    <option value="{{this}}">{{this}}</option>
    {{/each}}