| | |
| | | <apex:page Controller="ConsumEquipmentSetShipmentController" showHeader="false" sidebar="false" id="allPage" action="{!init}" > |
| | | <apex:page Controller="ConsumEquipmentSetShipmentController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true" > |
| | | <head> |
| | | <meta name="format-detection" content="telephone=no"/> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1"/> |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/> |
| | | <apex:includeScript value="/soap/ajax/46.0/connection.js"/> |
| | | <apex:includeScript value="/soap/ajax/46.0/apex.js"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.apex20)}"/> |
| | | <apex:stylesheet value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.css')}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/> |
| | | <style type="text/css"> |
| | |
| | | height: 100px; |
| | | width: 30px; |
| | | } |
| | | /* add by rentx 2021-10-21 start 设置展示框 |
| | | /* add by rentx 2021-10-21 start 设置展示框 */ |
| | | .col_EquipmentManagementCode__c {display: none;} |
| | | .col_Scroll{display: none;} |
| | | .dataRow.col_Scroll{display: none;} |
| | | .col_ManagementCode__c{display: none;} |
| | | */ |
| | | .col_boxbarcodeforReceipt__c{display: none;} |
| | | |
| | | .modal |
| | | { |
| | | display:none; |
| | |
| | | <apex:commandButton onclick="qrsacn(0);return false;" value="扫一扫耗材" rerender="allForm"/> |
| | | <apex:commandButton onclick="qrsacn(1);return false;" value="扫一扫物流单" rerender="allForm"/> |
| | | <apex:commandButton onclick="blockme();" action="{!send}" value="发货" rerender="message" oncomplete="unblockUI();checkMessage();checEventFrame()"/> |
| | | <!-- add wangweipeng 2021/01/10 start --> |
| | | <apex:commandButton onclick="window.open('/apex/ConsumTrialPDF?id={!parentId}');" value="试用表" rerender="allForm"/> |
| | | <!-- add wangweipeng 2021/01/10 /apex/ConsumTrialPDF?id={!parentId} ConsumEquipmentSetShipmentPDF start --> |
| | | <apex:commandButton onclick="window.open('ConsumTrialPDF?id={!parentId}');" value="试用表" rerender="allForm"/> |
| | | <!--<a href="openSafri/apex/ConsumTrialPDF?id={!parentId}">试用表</a> --> |
| | | <!-- add wangweipeng 2021/01/10 end --> |
| | | <!-- add by rentx 2021-10-21 start 新增码枪扫描 --> |
| | | <apex:commandButton onclick="document.getElementById('maqCode').focus();return false" id="maqCodeBtn" value="码枪扫描:" style="padding: 6px;font-size: 110%;margin-right: 1px;"/> |
| | |
| | | <td > |
| | | <apex:outputLabel for="slipNo" value="发货-运输单号:" /> |
| | | <apex:inputField id="slipNo" value="{!slip.Name}"/> |
| | | <apex:commandButton action="{!searchSlip}" value="检索" style="padding: 6px;font-size: 110%;" rerender="allForm" oncomplete="checEventFrame()"/> |
| | | <!-- <apex:commandButton action="{!searchSlip}" value="检索" style="padding: 6px;font-size: 110%;" rerender="allForm" oncomplete="checEventFrame()"/> --> |
| | | <apex:commandButton action="{!searchSlip}" value="检索" style="padding: 6px;font-size: 110%;" rerender="searchBlock" oncomplete="checEventFrame()"/> |
| | | </td> |
| | | <td width="10px"></td> |
| | | <td > |
| | |
| | | |
| | | j$("#tableData input[type=text]").on('change', function() { |
| | | let rownum = j$(this)[0].id.match(/oppTable\:(\d*)/)[1]; |
| | | alert('====rownum=='+rownum); |
| | | j$('input[name$="oppTable_L:'+rownum+':rowCheck"]').prop('checked', true).trigger("change"); |
| | | }) |
| | | |
| | |
| | | } |
| | | } |
| | | //20220215 字段集中的输入框变成只读,不能直接变成span,否则后台取不到值 |
| | | j$("#tableData input[type=text]").attr("readonly",true); |
| | | j$("#tableData input[type=text]").attr("disabled","disabled"); |
| | | //j$("#tableData input[type=text]").attr("readonly",true); 先隐藏掉 |
| | | //j$("#tableData input[type=text]").attr("disabled","disabled"); |
| | | </script> |
| | | </apex:outputPanel> |
| | | </apex:outputPanel> |
| | |
| | | return false; |
| | | } |
| | | //判断这个小码code 是否符合要求 1:长度是否正确 2:是否重复输入 3:输入的是否为3位数字 |
| | | // var regNeg = /^[1-9]+[0-9]*]*$/; // 负整数 |
| | | //z<0||!(/^\d+$/.test(z)) |
| | | // && nowCode>=0 && (/^\d+$/.test(nowCode)) |
| | | if(nowCode != null && nowCode.length == 3 && !isNaN(nowCode)){ |
| | | //获取扫描过的小码 |
| | | var tableId = document.getElementById("detailTb"); |
| | |
| | | document.getElementById("bianma").innerHTML = bianma; |
| | | //给明细行赋管理编码 |
| | | //paobj[0].children[10].children[0].value = bianma; |
| | | |
| | | j$("#havCode").val(maqCode); |
| | | c = bianma; |
| | | }else if(content250 !='' && content250 !=undefined && content250.substring(content250.length - 8,content250.length - 5) == '250'){ |
| | | //设置管理编码 |
| | |
| | | document.getElementById("bianma").innerHTML = bianma; |
| | | //给明细行赋管理编码 |
| | | //paobj[0].children[10].children[0].value = bianma; |
| | | c = bianma; |
| | | |
| | | j$("#havCode").val(content250); |
| | | c = bianma; |
| | | } |
| | | //判断当前扫描是否换盒了 |
| | | if(c != null && c != '' && c != undefined){ |
| | |
| | | |
| | | var code = paobj[0].children[9].children[0].value; //.innerText; |
| | | var hecode = paobj[0].children[10].children[0].value; //.innerText; |
| | | alert('xiaoma'+code); |
| | | //alert('xiaoma'+code); |
| | | if (code != null && code.length > 0) { |
| | | //向弹出框里添加明细行 |
| | | var arr = code.split(','); |
| | |
| | | //j$(".modal").hide(); |
| | | j$("#myModal1").hide(); |
| | | scanType = null; |
| | | |
| | | j$("#maqCode").focus(); |
| | | if(numflag == 0 ){ |
| | | //用户点击保存 1.设置数量到发货件数上 2.设置小码到明细的备品管理码上 |
| | | if(numObj != null){ |
| | |
| | | if(rowObj != null){ |
| | | //获取当前扫的盒 |
| | | var newHe = document.getElementById("bianma").innerHTML; |
| | | var newHe1 = document.getElementById("havCode").value; |
| | | //取得所有小码 放到备品管理码上 |
| | | //注意:有两种情况,如果此次扫的小米的盒是已经扫过的,那么直接加就行,如果此次的盒没有扫过,而原来也有已经扫过的盒,那么就需要特殊处理 |
| | | var tableId = document.getElementById("detailTb"); |
| | | var str = ''; |
| | | var str1 = ''; |
| | | var str2 = ''; |
| | | var numstr = 0; |
| | | var he = rowObj[0].children[10].children[0].value; |
| | | var xiaoma = rowObj[0].children[9].children[0].value; |
| | | var he1 = rowObj[0].children[11].children[0].value; |
| | | if(tableId.rows.length > 0){//判断此次扫的盒是否有小码 |
| | | //首先判断当前明细原来是否已经扫过码 |
| | | //如果没扫过 那么在原来的 备品管理码、管理编码和发货件数的值上都需要加上此次扫的小码 |
| | |
| | | if(he != null && he != '' && he != undefined && xiaoma != null && xiaoma != '' && xiaoma != undefined){ |
| | | var linshistr = '';//临时小码值 |
| | | var linshistr1 = '';//临时盒的值 |
| | | var linshistr2 = ''; |
| | | |
| | | var oldheArray = he.split(',');//获取原来的所有盒 |
| | | var oldxiaomaArray = xiaoma.split(',');//获取原来的所有小码 |
| | | var oldhe1Array = he1.split(','); |
| | | //循环原来明细的盒 |
| | | for(var i = 0;i < oldheArray.length;i++){ |
| | | if(oldheArray[i] != null && oldheArray[i] != '' && oldheArray[i] != undefined){ |
| | |
| | | //如果原来的盒不等于当前操作的盒,那么不需要做变化,值把现在循环的盒放到临时变量里面 |
| | | linshistr += oldxiaomaArray[i] + ','; |
| | | linshistr1 += oldheArray[i] + ','; |
| | | linshistr2 += oldhe1Array[i] + ','; |
| | | } |
| | | if(oldHe == '3'){ |
| | | linshistr += oldxiaomaArray[i] + ','; |
| | | linshistr1 += oldheArray[i] + ','; |
| | | linshistr2 += oldhe1Array[i] + ','; |
| | | } |
| | | } |
| | | } |
| | | str = linshistr; |
| | | str1 = linshistr1; |
| | | str2 = linshistr2; |
| | | //由于以上的操作只能找到原来的盒和小码是否删除,那么一下的操作就是把最新操作的盒和小码追加到字符串的最后面 |
| | | //循环弹出框的小码 |
| | | for(var j=1;j<tableId.rows.length;j++) { |
| | |
| | | //追加新的盒和小码 |
| | | str += tableId.rows[j].cells[1].innerHTML + ','; |
| | | str1 += newHe + ','; |
| | | str2 += newHe1 + ','; |
| | | } |
| | | } |
| | | if(str != '' && str1 != null){ |
| | | str = str.substring(0,str.length-1); |
| | | str1 = str1.substring(0,str1.length-1); |
| | | } |
| | | if(str2 != '' ){ |
| | | str2 = str2.substring(0,str2.length-1); |
| | | } |
| | | |
| | | numstr = str == '' ? null : str.split(',').length; |
| | |
| | | for(var i=1;i<tableId.rows.length;i++) { |
| | | str += tableId.rows[i].cells[1].innerHTML + ','; |
| | | str1 += document.getElementById("bianma").innerHTML + ',';//盒 |
| | | str2 += document.getElementById("havCode").value + ','; |
| | | } |
| | | if(str != '' && str1 != null){ |
| | | str = str.substring(0,str.length-1); |
| | | str1 = str1.substring(0,str1.length-1); |
| | | } |
| | | if(str2 != '' ){ |
| | | str2 = str2.substring(0,str2.length-1); |
| | | } |
| | | numstr = j$("#detailTb").find("tr").length-1;//发货件数 |
| | | |
| | |
| | | if(he != null && he != '' && he != undefined && xiaoma != null && xiaoma != '' && xiaoma != undefined){ |
| | | var oldheArray = he.split(','); |
| | | var oldxiaomaArray = xiaoma.split(','); |
| | | var oldhe1Array = he1.split(','); |
| | | for(var i = 0;i < oldheArray.length;i++){ |
| | | if(oldheArray[i] != newHe){ |
| | | str += oldxiaomaArray[i] + ','; |
| | | str1 += oldheArray[i] + ','; |
| | | str2 += oldhe1Array[i] + ','; |
| | | } |
| | | } |
| | | |
| | | if(str != '' && str1 != null){ |
| | | str = str.substring(0,str.length-1); |
| | | str1 = str1.substring(0,str1.length-1); |
| | | } |
| | | if(str2 != '' ){ |
| | | str2 = str2.substring(0,str2.length-1); |
| | | } |
| | | |
| | | numstr = str == '' ? null : str.split(',').length;//发货件数 |
| | |
| | | rowObj[0].children[9].children[0].value = str; //备品管理码 |
| | | rowObj[0].children[10].children[0].value = str1;//管理编码 |
| | | numObj[0].innerText = numstr;//发货件数 |
| | | rowObj[0].children[11].children[0].value =str2; |
| | | } |
| | | //update wangweipeng 2022/02/21 end |
| | | } |
| | |
| | | checkObj.prop('checked', false); |
| | | } |
| | | var maqCode = j$( '#maqCode' ).val(); |
| | | alert('==='+j$( '#maqCode' ).val()); |
| | | if (maqCode !='' && maqCode !=undefined){ |
| | | //alert('==='+j$( '#maqCode' ).val()); |
| | | //if (maqCode !='' && maqCode !=undefined){ |
| | | j$("#maqCode").val(""); |
| | | j$("#maqCode").focus(); |
| | | } |
| | | setTimeout(function(){j$("#maqCode").focus();},300); |
| | | //} |
| | | } |
| | | // <!-- add by qiuyj 2021-11-30 start pc端扫码支持--> |
| | | j$(document).ready(function(){ |
| | |
| | | return false; |
| | | } |
| | | }); |
| | | setTimeout(function(){j$("#maqCode").focus();},300); |
| | | |
| | | }); |
| | | // add by qiuyj 2021-11-30 end pc端扫码支持 |
| | | // add by rentx 2021-10-19 end 耗材追溯 -码枪扫码之后展示弹出框 |
| | |
| | | try{ |
| | | if (scanType == 1) { |
| | | j$("input[name$='slipNo']").val(content); |
| | | scanType = null; |
| | | }else if(scanType == 2){//add by youc 2021-12-01 弹出框中ipad扫描小码 |
| | | checkipadXiaoMa(content); |
| | | scanType = null; |
| | | } else { |
| | | |
| | | var tracingCode = content.substr(-8);//截取后8位 |
| | |
| | | j$("#qrcode").focus(); |
| | | //add by qiuyj 2021-11-30 end pc端扫码支持--> |
| | | //alert('扫描条形码请使用App'); |
| | | |
| | | } |
| | | } |
| | | |