lch
2024-08-23 d9c12a72cbff5ac73e72611e7fc7c06bc6ac177b
盘点单,销售出库 优化
已修改5个文件
已添加2个文件
230 ■■■■ 文件已修改
.vs/slnx.sqlite 补丁 | 查看 | 原始文档 | blame | 历史
js/CangKuManage_js/GS_CKPDD.js 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/CangKuManage_js/GS_HBLLD.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/CangKuManage/CK_XSCK.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/CangKuManage/GS_CKPDD.html 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/release/H546D0BA6.wgt 补丁 | 查看 | 原始文档 | blame | 历史
.vs/slnx.sqlite
Binary files differ
js/CangKuManage_js/GS_CKPDD.js
@@ -8,6 +8,7 @@
var WLBM = "";//物料编码
var matterTable = null;
var PopPicker = new mui.PopPicker();
var pici = '1';
// mui.ready(function() {
//                 console.log("盘点单获取测试!");
@@ -15,7 +16,11 @@
//                 fetchData();
                
//             });
// mui.ready(function() {
//     fetchData();
//     console.log("连接测试!");
// });
//初始化,默认焦点
mui.plusReady(function(){    
    
@@ -25,7 +30,8 @@
    console.log("连接测试!");
    initBluetooth();
    //SetBillNo();
    $('#info').height($(window).height()- $("#row001").height() - $("#div001").height()- $("#div002").height() - 70);
    $('#info').height($(window).height() - $("#row001").height() - $("#div001").height() - $("#div002")
    .height() - 70);
});        
// $(function(){
 //    billNo= GetMaxBillNO("1201",GetSysDateTime());//调拨单号,只要不离开界面,单号不变
@@ -77,7 +83,11 @@
  // 循环遍历数据,生成表格行
  for (let i = 0; i < data["条码编号"].length; i++) {
    let tr = document.createElement("tr");
        pici = data["批次"][0];
        let td7 = document.createElement("td");
        td7.textContent = data["序号"][i];
        tr.appendChild(td7);
    // 创建表格单元格,并将数据填入
    let td1 = document.createElement("td");
    td1.textContent = data["条码编号"][i];
@@ -235,6 +245,25 @@
                            return;
                        } else {
                            populateTable(data.data);
                    var selectElement = document.getElementById("spici");
                    console.log(pici);
                    // 清空 <select> 元素的现有选项
                    selectElement.innerHTML = "";
                    // 从1开始到 pici 为止的数,添加到 <select> 元素中
                    for (var i = 1; i <= parseInt(pici); i++) {
                        // 创建一个新的 <option> 元素
                        var option = document.createElement("option");
                        // 设置 <option> 元素的 value 和 text 属性
                        option.value = i;
                        option.text = i;
                        // 将 <option> 元素添加到 <select> 元素中
                        selectElement.appendChild(option);
                    }
                    selectElement.value = pici;
                    GetInfopici();
                            mui("#MBA001")[0].focus();
                        
                        }
@@ -364,13 +393,125 @@
                         }
                     });
                    
                    if(document.getElementById('barcheck').checked)
                    {
        if (document.getElementById('barcheck').checked) {
                        confirmQuantity();
                    }
                
                 }
             };
function GetInfopici() {
    //用户ID
    var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION);
    var user_id = currentSession.user_id; //currentSession.user_id;
    //        var user_id = "admin";
    $.ajax({
        url: app.API_URL_HEADER + "/WARBABChag/GetInfopici",
        data: {
            DAB001: $("#order").val(),
            PICI: $("#spici").val(),
        },
        DataType: "json",
        type: "post",
        async: false,
        //timeout: 15000,
        success: function(data) {
            //console.log(JSON.stringify(data));
            if (data.status != 0) {
                playerAudio("NG");
                mui.alert(data.message, "", "", function() {
                });
                return;
            } else {
                $("#info").val(data.data.info); //填入汇总信息
            }
        },
        error: function(xhr, type, errorThrown) {
            alert("获取数据异常:" + JSON.stringify(errorThrown));
        }
    });
    if (document.getElementById('barcheck').checked) {
        confirmQuantity();
    }
}
function huizong() {
    //用户ID
    var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION);
    var user_id = currentSession.user_id; //currentSession.user_id;
    //        var user_id = "admin";
    $.ajax({
        url: app.API_URL_HEADER + "/WARBABChag/huizong",
        data: {
            DAB001: $("#order").val(),
        },
        DataType: "json",
        type: "post",
        async: false,
        //timeout: 15000,
        success: function(data) {
            //console.log(JSON.stringify(data));
            if (data.status != 0) {
                playerAudio("NG");
                mui.alert(data.message, "", "", function() {
                });
                return;
            } else {
GetInfopici();
            mui.toast("汇总成功!");
            }
        },
        error: function(xhr, type, errorThrown) {
            alert("获取数据异常:" + JSON.stringify(errorThrown));
        }
    });
    if (document.getElementById('barcheck').checked) {
        confirmQuantity();
    }
}
function showdetail() {
    console.log('133');
    var element = document.getElementById("divdetail");
    var element1 = document.getElementById("info");
    var element2 = document.getElementById("myTable2");
    if (element.style.display === "none") {
        element.style.display = "block";
    } else {
        element.style.display = "none";
    }
    if (element1.style.display === "none") {
        element1.style.display = "block";
    } else {
        element1.style.display = "none";
    }
    if (element2.style.display === "none") {
        element2.style.display = "block";
    } else {
        element2.style.display = "none";
    }
}
            function confirmQuantity() {
@@ -403,6 +544,7 @@
                            TAC007: $("#SPSL").val(),
                            MBA001: $("#MBA001").val(),
                             logID: user_id,//Admin //先写死,便于调试
            PICI: $("#spici").val(),
                             
                         },
                         DataType: "json",
@@ -460,8 +602,7 @@
                                    }
                                });
                                
                                if(document.getElementById('checkdefault').checked)
                                {
                if (document.getElementById('checkdefault').checked) {
                                    return;
                                }
                                $("#MBA001").val("");//先清空一下数据源
@@ -471,7 +612,7 @@
                             alert("获取数据异常:" + JSON.stringify(errorThrown));
                         }
                     });
    GetInfopici();
             };
            
js/CangKuManage_js/GS_HBLLD.js
@@ -478,7 +478,7 @@
     
                             var str = data.data.BARID.toString();
                             console.log(str); // 将BARID转换为字符串并打印输出
                          $("#DAB001").val($("#DAB001").val()+'-'+str);
                          $("#DAB001").val($("#DAB001").val()+'-'+str.slice(-4));
                             printByIds(str);
                             console.log("打印成功!!");
                              playerAudio("OK");
manifest.json
@@ -3,7 +3,7 @@
    "id" : "H546D0BA6", /*应用的标识*/
    "name" : "YKD_MES", /*应用名称,程序桌面图标名称*/
    "version" : {
        "name" : "3.58", /*应用版本名称*/
        "name" : "3.61", /*应用版本名称*/
        "code" : "100"
    },
    "description" : "", /*应用描述信息*/
pages/CangKuManage/CK_XSCK.html
@@ -153,6 +153,7 @@
            mui.init(); // 初始化 MUI
            //app.init();
            //初始化
            mui.plusReady(function() {
                app.init();
                fetchData();
pages/CangKuManage/GS_CKPDD.html
@@ -1,11 +1,11 @@
<!doctype html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>仓库盘点</title>
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <meta name="viewport"
            content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <!-- <link rel="stylesheet" href="../../lib/base_js/css/common.css" /> -->
@@ -24,9 +24,6 @@
        
        <link rel="stylesheet" href="../../lib/base_js/css/common.css" />
        <style>
            #info {
                /*查询信息属性*/
                background-color: #FFE48D;
@@ -66,7 +63,8 @@
            </div>
            <div class="mui-input-row" id="row001">
                <label>物料条码</label>
                <input id="DAB001" type="text" value="" class="mui-input-clear text-color" placeholder="请扫描条码" onkeypress="GetBarInfoTAA()" />
                <input id="DAB001" type="text" value="" class="mui-input-clear text-color" placeholder="请扫描条码"
                    onkeypress="GetBarInfoTAA()" />
            </div>
            <div class="mui-input-row" id="row001">
                <label>物料编码</label>
@@ -93,6 +91,35 @@
              </td>
            </tr>
        </div>
            <div class="mui-content" id="contentId">
                <div class="mui-input-group">
                </div>
                <div class="mui-input-row">
                    <ul class="mui-table-view">
                        <li class="mui-table-view-cell mui-collapse mui-active">
                            <a class="mui-navigate-right font" href="#" style="font-size: 20px; text-align: center;"
                                onclick="showdetail()">汇总明细</a>
                            <div class="mui-collapse-content" id="collapseId">
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="mui-input-row" id="divdetail" style="display:none">
                <div style="width:20%;float: left;">
                    <label style="width: 100%;float: left;">批次</label>
                </div>
                <select id="spici" style="width:20%" onchange="GetInfopici()">
                </select>
                <button style="width: 60%;float: right;" class="confirm-button" onclick="huizong()">汇总</button>
            </div>
<textarea readonly="readonly" id='info' style="height:200px;display:none"></textarea>
            <div id="txtInfo"><!--<div class="mui-input-row" style="height: 350px; margin-top: 10px;">-->
                <div class="link-area" id="div001">
                    <h4 style="color: #008000; text-align: center;">
@@ -102,6 +129,8 @@
                    </h4>
                </div>
            </div>
            <div class="data-table-container" style="height: 100%; width: 100%;">
              <table class="data-table" id="myTable" style="height: 100%; width: 100%;">
                <!-- 表格代码 -->
@@ -134,7 +163,8 @@
          .data-table {
            width: 100%;
            border-collapse: collapse;
            overflow-x: auto; /* 水平滚动条 */
        overflow-x: auto;
        /* 水平滚动条 */
          }
          
        
@@ -145,7 +175,8 @@
            text-align: left;
            word-wrap: break-word;
            white-space: pre-wrap;
            text-overflow: ellipsis; /* 文本截断和省略号 */
        text-overflow: ellipsis;
        /* 文本截断和省略号 */
            overflow: hidden;
            font-size: 10px;
          }
@@ -158,17 +189,25 @@
          }
          
           option {
               font-size: 30px; /* 调整下拉选项的字体大小 */
               padding: 20px; /* 调整下拉选项的内边距 */
        font-size: 30px;
        /* 调整下拉选项的字体大小 */
        padding: 20px;
        /* 调整下拉选项的内边距 */
             }
             
             .confirm-button {
               margin-top: 5px; /* 设置按钮与数量文本的垂直距离 */
               font-size: 15px; /* 设置按钮的字体大小 */
               padding: 5px 10px; /* 设置按钮的内边距 */
               background-color: #f0f0f0; /* 设置按钮的背景颜色 */
               border: none; /* 移除按钮的边框 */
               cursor: pointer; /* 设置鼠标样式为手型 */
        margin-top: 5px;
        /* 设置按钮与数量文本的垂直距离 */
        font-size: 15px;
        /* 设置按钮的字体大小 */
        padding: 5px 10px;
        /* 设置按钮的内边距 */
        background-color: #f0f0f0;
        /* 设置按钮的背景颜色 */
        border: none;
        /* 移除按钮的边框 */
        cursor: pointer;
        /* 设置鼠标样式为手型 */
                width: 150px;
             }
             
@@ -178,5 +217,4 @@
               align-items: center;
               height: 100%;
             }
        </style>
unpackage/release/H546D0BA6.wgt
Binary files differ