From d83ec156be3c869153b7d4e8d97934d0676ecf2c Mon Sep 17 00:00:00 2001 From: cdk <2441919651@qq.com> Date: 星期三, 30 七月 2025 08:31:13 +0800 Subject: [PATCH] 增加iqc,销售核对的pda页面 --- pages/CangKuManage/IQC_check_add.html | 259 +++++++++ pages/CangKuManage/GS_XSHD.html | 151 +++++ pages/CangKuManage/IQC_check_input.html | 432 ++++++++++++++++ pages/CangKuManage/IQC_check.html | 691 ++++++++++++++++++++++++++ 4 files changed, 1,533 insertions(+), 0 deletions(-) diff --git a/pages/CangKuManage/GS_XSHD.html b/pages/CangKuManage/GS_XSHD.html new file mode 100644 index 0000000..cdbd671 --- /dev/null +++ b/pages/CangKuManage/GS_XSHD.html @@ -0,0 +1,151 @@ + +<!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="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" /> --> + <script type="text/javascript" src="../../lib/jquery/js/jquery.min.js"></script> + <script type="text/javascript" src="../../lib/easyui/js/jquery.easyui.min.js" ></script> + <script src="../../lib/mui/js/mui.min.js"></script> + <link href="../../lib/mui/css/mui.min.css" rel="stylesheet" /> + <link href="../../lib/mui/css/mui.picker.min.css" rel="stylesheet" /> + <link href="../../lib/mui/css/mui.poppicker.css" rel="stylesheet" /> + <script src="../../lib/mui/js/mui.picker.min.js"></script> + <script src="../../lib/mui/js/mui.poppicker.js"></script> + <!--<script type="text/SetInputFoucsjavascript" src="../../lib/base_js/js/common.js" ></script>--> + <script type="text/javascript" src="../../lib/base_js/js/app.js"></script> + + <script type="text/javascript" src="../../lib/base_js/js/common.js" ></script> + + <link rel="stylesheet" href="../../lib/base_js/css/common.css" /> + <style> + #info { + /*鏌ヨ淇℃伅灞炴��*/ + background-color: #FFE48D; + } + </style> + + </head> + + <body> + <div class="mui-input-group mui-content"> + <div class="mui-input-row"> + <label>瀹㈡埛鏌ヨ</label> + <input type="text" id="searchInput" placeholder="璇疯緭鍏ユ煡璇㈡潯浠�"> + </div> + <div class="mui-input-row" id="row001"> + <label>瀹㈡埛</label> + <select id="GYS" style="margin:auto; color:#000;font-size: 18px" onchange="GetInfoDFA()" > + <option value="">璇烽�夋嫨瀹㈡埛</option> + </select> + </div> + <div class="mui-input-row"> + <label>閫氱煡鍗曟煡璇�</label> + <input type="text" id="searchInput1" placeholder="璇疯緭鍏ユ煡璇㈡潯浠�" onblur="GetInfoDFA()"> + </div> + <div class="mui-input-row" id="row002"> + <label>鍙戣揣閫氱煡鍗�</label> + <select id="DFA001" style="margin:auto; color:#000;font-size: 18px" onchange="GetInfoITEMNO()" > + <option value="">璇烽�夋嫨鍙戣揣閫氱煡鍗�</option> + </select> + </div> + <div class="mui-input-row" id="row003"> + <label>鐗╂枡缂栫爜</label> + <select id="ITEMNO" style="margin:auto; color:#000;font-size: 18px" > + <option value="">璇烽�夋嫨鐗╂枡缂栫爜</option> + </select> + </div> + <div class="mui-input-row" id="row001"> + <label>鏉$爜</label> + <input id="DAB001" type="text" value="" class="mui-input-clear text-color" placeholder="璇锋壂鎻忔潯鐮�" onkeypress="CheckBarInfo()" /> + </div> + + + </div> + <script type="text/javascript" src="../../js/CangKuManage_js/XSHD.js" ></script> + <script type="text/javascript" src="../../js/CangKuManage_js/print_template.js" ></script> + <script type="text/javascript" src="../../js/api.js" ></script> + <script>//妯$硦鏌ヨ + // 妯$硦鏌ヨ鍑芥暟 + function searchItems() { + var input, filter, select, option, i, txtValue; + input = document.getElementById("searchInput"); + filter = input.value.toUpperCase(); + select = document.getElementById("GYS"); + option = select.getElementsByTagName("option"); + + // 閬嶅巻鎵�鏈夐�夐」锛岄殣钘忎笉鍖归厤鐨勯」骞舵樉绀哄尮閰嶇殑椤� + for (i = 0; i < option.length; i++) { + txtValue = option[i].text || option[i].innerText; + if (txtValue.toUpperCase().indexOf(filter) > -1) { + option[i].style.display = ""; + } else { + option[i].style.display = "none"; + } + } + } + + + function searchItems1() { + var input, filter, select, option, i, txtValue; + input = document.getElementById("searchInput1"); + filter = input.value.toUpperCase(); + select = document.getElementById("DFA001"); + option = select.getElementsByTagName("option"); + + // 閬嶅巻鎵�鏈夐�夐」锛岄殣钘忎笉鍖归厤鐨勯」骞舵樉绀哄尮閰嶇殑椤� + for (i = 0; i < option.length; i++) { + txtValue = option[i].text || option[i].innerText; + if (txtValue.toUpperCase().indexOf(filter) > -1) { + option[i].style.display = ""; + } else { + option[i].style.display = "none"; + } + } + } + + // 鐩戝惉杈撳叆妗嗙殑杈撳叆浜嬩欢锛岃Е鍙戞ā绯婃煡璇� + document.getElementById("searchInput").addEventListener("input", searchItems); + //document.getElementById("searchInput1").addEventListener("input", searchItems1); + </script> + </body> + +</html> +<style> + /* 娣诲姞琛ㄦ牸鏍峰紡 */ + .data-table { + width: 100%; + border-collapse: collapse; + overflow-x: auto; /* 姘村钩婊氬姩鏉� */ + } + + + .data-table th, + .data-table td { + border: 1px solid #ccc; + padding: 3px; + text-align: left; + word-wrap: break-word; + white-space: pre-wrap; + text-overflow: ellipsis; /* 鏂囨湰鎴柇鍜岀渷鐣ュ彿 */ + overflow: hidden; + font-size: 10px; + } + + /* 濯掍綋鏌ヨ */ + @media (max-width: 768px) { + .data-table { + /* 璋冩暣琛ㄦ牸鏍峰紡浠ラ�傚簲灏忓睆骞� */ + } + } + + option { + font-size: 25px; /* 璋冩暣涓嬫媺閫夐」鐨勫瓧浣撳ぇ灏� */ + padding: 20px; /* 璋冩暣涓嬫媺閫夐」鐨勫唴杈硅窛 */ + } + </style> \ No newline at end of file diff --git a/pages/CangKuManage/IQC_check.html b/pages/CangKuManage/IQC_check.html new file mode 100644 index 0000000..7632286 --- /dev/null +++ b/pages/CangKuManage/IQC_check.html @@ -0,0 +1,691 @@ +<!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" /> + <script src="../../js/mui.min.js"></script> + <script src="../../js/api.js"></script> + <script src="../../js/common.js"></script> + <script src="../../js/jquery.js"></script> + <script src="../../js/jquery-1.11.1.js"></script> + <script src="../../js/jquery.xml2json.js.js"></script> + <script src="../../js/template-web.js"></script> + <link href="../../css/mui.min.css" rel="stylesheet" /> + <script type="text/javascript" src="../../lib/base_js/js/app.js"></script> + <script type="text/javascript" src="../../lib/base_js/js/common.js"></script> + <link rel="stylesheet" type="text/css" href="../../css/iconfont.css" /> + <link rel="stylesheet" type="text/css" href="../../css/common_s.css" /> + <style> + .mui-input-row label { + background-color: #ededed; + width: 25%; + } + + .mui-input-row label~select, + .mui-input-row label~textarea { + float: right; + width: 74%; + /*background-color: #94f0ed;*/ + } + + .mui-input-row label~textarea { + border: #e3e3e3 2px solid; + /*background-color: #94f0ed;*/ + } + + .mui-input-row label~input { + float: left; + width: 72%; + background-color: #f6f6f6; + } + + .mui-input-row { + margin-top: 0.15rem; + } + + .full-width-button { + display: block; + /* 璁╂寜閽樉绀轰负鍧楃骇鍏冪礌 */ + width: 100%; + /* 瀹藉害璁剧疆涓�100%浠ラ�傚簲鐖跺厓绱犲搴� */ + text-align: center; + /* 鏂囨湰灞呬腑鏄剧ず锛堝彲閫夛級 */ + padding: 10px; + /* 鍐呰竟璺濓紙鍙�夛級 */ + margin-bottom: 5px; + /* 搴曢儴澶栬竟璺濓紙鍙�夛級锛岀敤浜庝笌鍥剧墖鍒嗛殧寮� */ + } + + .icon-wrapper { + position: relative; + display: inline-block; + } + + .icon { + position: absolute; + top: 0; + left: 0; + } + + .icon-wrapper::before { + content: ""; + position: absolute; + top: 10px; + /* 璋冩暣涓婅竟璺� */ + left: 10px; + /* 璋冩暣宸﹁竟璺� */ + right: 10px; + /* 璋冩暣鍙宠竟璺� */ + bottom: 10px; + /* 璋冩暣涓嬭竟璺� */ + border: 100px solid transparent; + /* 璋冩暣杈规澶у皬 */ + } + + select { + background: url(../img/right-arrow.png) no-repeat right center; + background-size: 1.2rem 1.2rem; + } + </style> + </head> + + <body class="mui-fullscreen"> + <header class="mui-bar mui-bar-nav"> + <button type="button" class="mui-left mui-action-back mui-btn mui-btn-link mui-btn-nav mui-pull-left"> + <span class="mui-icon mui-icon-left-nav"></span> + </button> + <h1 class="mui-title">鍏ュ簱妫�楠�</h1> + + <span class="title-right mui-icon mui-icon-camera" style="color:#0062CC;font-size:50px;" + id="cameraId"></span> + + </header> + <div class="mui-content"> + <div class="mui-input-group"> + + + <div class="mui-input-row"> + <label>鏌ヨ</label> + <input type="text" id="searchInput" placeholder="璇疯緭鍏ユ煡璇㈡潯浠�"> + </div> + + <div class="mui-input-row"> + <!-- <label>鍏ュ簱妫�鐢宠鍗�</label> --> + <label id="saomiaolb" style="color:#0062CC">鐐瑰嚮鍚姩鎵弿</label> + <!-- <input type="text" class="mui-input" style="width:10%;float:left;background-color: #ffffff;" + id="selectModeNo"> --> + <!-- <a class="mui-navigate-right1"> --> + <select class="mui-select" id="selectModeNoT"> + <option value=""></option> + </select> + <!-- </a> --> + </div> + + <div class="mui-input-row"> + <label>妫�楠屽崟鍙�</label> + <input id="checkNo" type="text" class="mui-input" disabled="disabled"> + <!-- <a class="mui-navigate-right"> + <span class="mui-icon mui-icon-camera"></span> + </a> --> + </div> + <div class="mui-input-row"> + <label>妫�楠屾棩鏈�</label> + <input id="checkDate" type="text" class="mui-input" disabled="disabled"> + + </div> + <div class="mui-input-row"> + <label>浜у搧缂栫爜</label> + <input id="productNo" type="text" class="mui-input" disabled="disabled"> + </div> + <div class="mui-input-row"> + <label>浜у搧鍚嶇О</label> + <input id="productName" type="text" class="mui-input" disabled="disabled"> + </div> + <div class="mui-input-row"> + <label>瑙勬牸鍨嬪彿</label> + <input id="ptype" type="text" class="mui-input" disabled="disabled"> + </div> + <!-- <div class="mui-input-row"> + <label>璁″垝鏁伴噺</label> + <input id="planNum" type="text" class="mui-input" disabled="disabled"> + </div> --> + <div class="mui-input-row"> + <label>鍥惧彿</label> + <input id="tuhao" type="text" class="mui-input" disabled="disabled"> + </div> + + <div class="mui-input-row"> + <label>鎶ユ鏁伴噺</label> + <input id="BJSL" type="text" class="mui-input" disabled="disabled"> + </div> + <div> + <!-- 鍋囪杩欐槸浣犵殑鎸夐挳锛岀偣鍑诲悗浼氳Е鍙慉JAX璇锋眰 --> + <button id="fetchImageButton" class="full-width-button" data-image-id="123">浜у搧鍥剧焊鏌ョ湅</button> + <!-- 杩欐槸鐢ㄤ簬灞曠ず鍥剧墖鐨刬mg鍏冪礌 --> + <img id="imageDisplay" src="#" alt="Image Placeholder" style="display: none;"> + </div> + <!-- <div class="mui-input-row"> + <label>鐢熶骇宸ュ簭:</label> + <input id="process" type="text" class="mui-input" disabled="disabled"> + </div> --> + <div class="mui-input-row"> + <label>妫�楠屽憳</label> + <input id="checkMan" type="text" class="mui-input" disabled="disabled"> + </div> + <div class="mui-input-row"> + <label>澶囨敞</label> + <textarea id='remark' type="text" class='input-text'></textarea> + </div> + <div class="mui-input-row" id="dealDiv"> + <label><span class="mui-icon iconfont icon-jieguo" style="color: #FF8C00;"></span>鏈�缁堢粨鏋�</label> + <span class="noodles" id="deal1" data-code='鍚堟牸' + style="width: 18%;float: left;background-color: green;color: #FFFFFF;text-align: center;">鍚堟牸</span> + <span class="noodles" id="deal2" data-code='涓嶅悎鏍�' + style="width: 18%;float: left;background-color: red;color: #FFFFFF;text-align: center">涓嶅悎鏍�</span> + </div> + <!-- <div class="mui-input-row"> + <ul class="mui-table-view"> + <li class="mui-table-view-cell acss" id="doAppearance" + style="width:100%;background-color: rgb(255, 145, 0);"> + <a>澶栬涓�閿悎鏍�</a> + </li> + </ul> + </div> --> + <div class="mui-input-row"> + <ul class="mui-table-view" id="submitBtn"> + <li class="mui-table-view-cell acss" + style="width:50%;float: left;background-color: rgb(153,204,153)"> + <a data-code='鎻愪氦'>鎻愪氦</a> + </li> + <li class="mui-table-view-cell acss" style="width:50%;background-color: rgb(255,153,102)"> + <a data-code='鎾ら攢鎻愪氦'>鎾ら攢鎻愪氦</a> + </li> + </ul> + </div> + </div> + <script id='ui-template' type="text/template"> + <% for(var i in record){ var item=record[i];var n = i>10?i%10:i; var colors=['99CCFF','FFCC33','FFFF33','FFCC00','66CC00','FFFF99','FF9900','FFFF00','0099CC','FFCC00','CCCC00'];var c=colors[n]; %> + <li class="mui-table-view-cell mui-media"> + <a href="javascript:;" class="mui-navigate-right" id="<%=(item.id)%>" require="<%=(item.瑙勬牸瑕佹眰)%>" project="<%=(item.妫�楠岄」鐩�)%>" res="<%=(item.鍒ゅ畾缁撴灉)%>" apperance="<%=(item.椤圭洰璇存槑)%>" note="<%=(item.澶囨敞)%>" up="<%=(item.涓婇檺)%>" down="<%=(item.涓嬮檺)%>" nums="<%=(item.鎶芥鏁伴噺)%>" pid="<%=(item.pid)%>" did="<%=(item.did)%>" standard="<%=(item.鏍囧噯鍊�)%>" Method="<%=(item.妫�楠屾柟寮�)%>"> + {{if item.鍒ゅ畾缁撴灉=='鍚堟牸'}} + <div class="font-seal" style="color: #4CD964;border: 1px solid #4CD964"><%=(item.鍒ゅ畾缁撴灉)%></div> + {{else if item.鍒ゅ畾缁撴灉=='涓嶅悎鏍�'}} + <div class="font-seal"><%=(item.鍒ゅ畾缁撴灉)%></div> + {{else if item.鍒ゅ畾缁撴灉=='闈炴楠岄」鐩�'}} + <div class="font-seal" style="color: #A67D3D;border: 1px solid #A67D3D"><%=(item.鍒ゅ畾缁撴灉)%></div> + {{/if}} + <span class="mui-media-object mui-pull-left" style="border-radius: 50%; height: 20px; width: 20px; display: inline-block; background: #<%=(c)%>; vertical-align: top;"> + <span style="display: block; color: #FFFFFF; height: 20px; line-height: 20px; text-align: center"><%=(++i)%></span> + </span> + <div class="mui-media-body"> + <%=(item.妫�楠岄」鐩�)%> + <p class='mui-ellipsis'><%=(item.鍒ゅ畾缁撴灉)%></p> + </div> + </a> + </li> + <% } %> + </script> + <input type="hidden" id="mid" value="" /> + <ul class="mui-table-view" id="ulId"> + </ul> + </div> + <script type="text/javascript" charset="utf-8"> + window.addEventListener('refresh', function(e) { //鐩戝惉椤甸潰杩斿洖浜嬩欢 + changeTaskNo() + // getprocessT() + }); + // var user_id = app.userid; + mui.init({}); + mui.plusReady(function() { + app.init(); + $("#deal1").hide(); + $("#deal2").hide(); + + document.getElementById('cameraId').addEventListener('click', function(event) { + console.log(2); + var mid = $("#checkNo").val() + console.log(mid); + if (mid == '' || mid == 'undefined' || mid == null) { + mui.alert("璇峰厛閫夋嫨妫�楠屽崟鍙�"); + return false; + } + mui.openWindow({ + id: 'pictrue_add', + url: 'pictrue_add.html?mid=' + mid, + waiting: { + autoShow: true, + title: '鍔犺浇涓�' + } + }); + }); + getData() + //doAppearance() + + }) + + document.getElementById('saomiaolb').addEventListener('tap', function() { + console.log(12); + var url = 'getScanCode1.html'; + mui.openWindow({ + + url: url, + extras: {}, + waiting: { + autoShow: true, + title: '鍔犺浇涓�' + } + }); + + }, false) + + + function getData() { + //console.log("杩炴帴娴嬭瘯锛�"); + //console.log(user_id); + $.ajax({ + url: app.API_URL_HEADER + "/IQCCheck/IQC_GETAPP", + + data: { + logID: "admin" //user_id,//Admin //鍏堝啓姝伙紝渚夸簬璋冭瘯 + }, + DataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + console.log(data.data.matterTable); + if (data.status != 0) { + mui.alert(data.message, "", "", function() { + $("#selectModeNoT").empty() + }); + return; + } else { + + matterTable = data.data.matterTable; + // console.log(matterTable); + $("#selectModeNoT").empty() + var list = data.data; + /* 鍔ㄦ�佹坊鍔犱笅鎷夋鏁版嵁 */ + $("#selectModeNoT").append("<option value=''>璇烽�夋嫨鐢宠鍗曞彿</option>"); + for (var i = 0; i < matterTable.length; i++) { + $("#selectModeNoT").append("<option value=" + matterTable[i].SQD + ">" + + matterTable[i].SQD + + "</option>"); + } + } + }, + error: function(xhr, type, errorThrown) { + alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown)); + } + }); + } + + //妯$硦鏌ヨ + // 妯$硦鏌ヨ鍑芥暟 + function searchItems() { + var input, filter, select, option, i, txtValue; + input = document.getElementById("searchInput"); + filter = input.value.toUpperCase(); + select = document.getElementById("selectModeNoT"); + option = select.getElementsByTagName("option"); + + // 閬嶅巻鎵�鏈夐�夐」锛岄殣钘忎笉鍖归厤鐨勯」骞舵樉绀哄尮閰嶇殑椤� + for (i = 0; i < option.length; i++) { + txtValue = option[i].text || option[i].innerText; + if (txtValue.toUpperCase().indexOf(filter) > -1) { + option[i].style.display = ""; + } else { + option[i].style.display = "none"; + } + } + } + + + // 鐩戝惉杈撳叆妗嗙殑杈撳叆浜嬩欢锛岃Е鍙戞ā绯婃煡璇� + document.getElementById("searchInput").addEventListener("input", searchItems); + + + $("#selectModeNoT").on("change", function() { + var ModeNo = $("#selectModeNoT").val() + //getTaskNo(ModeNo, ''); + + console.log(1); + + changeTaskNo(); + }) + + + + function scaned(t, r, f) { + console.log(r); + $("#saomiao").val(r); + var selectElementD = document.getElementById('selectModeNoT'); + selectElementD.innerHTML = ""; + var option = document.createElement("option"); + option.value = r; + option.text = r; + + selectElementD.appendChild(option); + changeTaskNo(); + } + + $('#fetchImageButton').on('click', function() { + // 鑾峰彇鎸夐挳鐨刣ata-image-id灞炴�у�� + var imageId = $("#tuhao").val(); + console.log(1); + $.ajax({ + url: app.API_URL_HEADER + "/XKYDHD/GET_YUNTU", + + data: { + tuhao: imageId //user_id,//Admin //鍏堝啓姝伙紝渚夸簬璋冭瘯 + }, + dataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + //console.log(data.data); + if (data.status != 0) { + console.log("鑾峰彇澶辫触"); + mui.alert(data.message, "", "", function() { + return; + }); + } else { + console.log("鑾峰彇鍥剧焊淇℃伅"); + console.log(data.data); + + var imageDataUrl = data.data.image; // 浠庡悗绔繑鍥炵殑data涓幏鍙杋mage灞炴�� + console.log(imageDataUrl); + // 娓呴櫎sessionStorage涓殑鏃у�硷紙濡傛灉鏈夌殑璇濓級 + sessionStorage.removeItem('imageDataUrl'); + + // 瀛樺偍鏂扮殑imageDataUrl鍒皊essionStorage + sessionStorage.setItem('imageDataUrl', imageDataUrl); + var newId = 'window_' + Math.random().toString(36).substr(2, 10); + + + var url = 'picture.html?image=' + imageDataUrl; + console.log(url); + mui.openWindow({ + id: newId, + url: url, + extras: {}, + waiting: { + autoShow: true, + title: '鍔犺浇涓�' + } + }); + + + + } + }, + error: function(xhr, type, errorThrown) { + alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown)); + } + }); + }); + + + $("#selectModeNo").bind('keyup', function(event) { + var lineNo = $("#selectLineNo").val() + if (lineNo == "") { + mui.toast("璇峰厛閫夋嫨杞﹂棿") + return false; + } + //var keyword = $("#task_no").val() + //getDataMODE(lineNo) + }) + + + //鑾峰彇瑙勬牸 + function getDataMODE(lineNo) { + //console.log("鑾峰彇宸ュ崟锛�"); + //console.log(user_id); + $.ajax({ + url: app.API_URL_HEADER + "/XKYDHD/FQC_GETWORKNO", + + data: { + LINENO: lineNo + }, + DataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + // console.log(data.data); + if (data.status != 0) { + mui.alert(data.message, "", "", function() { + $("#selectModeNoT").empty() + }); + return; + } else { + + var data = data.data.matterTable; + $("#selectModeNoT").empty(); + $("#selectModeNoT").append("<option value=''></option>") + for (var i = 0; i < data.length; i++) { + + $("#selectModeNoT").append("<option value=" + data[i].DAA001 + ">" + data[i].DAA001 + + "</option>") + } + } + }, + error: function(xhr, type, errorThrown) { + alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown)); + } + }); + } + //鑾峰彇宸ュ崟妫�楠岄」鐩� + + + + function changeTaskNo() { + console.log(1); + var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); + var user_id = currentSession.user_id; + var workno = $('#selectModeNoT option:selected').text().split('--')[0]; + var itemNo = $('#selectModeNoT option:selected').text().split('--')[1]; + // console.log(workno); + // console.log(user_id); + $.ajax({ + url: app.API_URL_HEADER + "/IQCCheck/IQC_GETBILLINFO", + + data: { + USERNAME: user_id, + WORKNO: workno, + ITEMNO:itemNo + }, + DataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + // console.log(data.data); + if (data.status === 0) { + var pdata = data.data.matterTable + $("#checkNo").val(pdata[0].QCNO) + $("#checkDate").val(pdata[0].QCDATE) + $("#productNo").val(pdata[0].ITEMNO) + $("#productName").val(pdata[0].ITEMNAME) + $("#ptype").val(pdata[0].ITEMMODEL) + $("#tuhao").val(pdata[0].WL008) + $("#BJSL").val(pdata[0].BJNUM) + //$("#process").val(pdata[0].鐢熶骇宸ュ簭) + $("#checkMan").val(user_id) + + var cursor2 = checkZero(data.data.matterTableT) + + console.log(JSON.stringify(cursor2, null, 2)); + document.getElementById('ulId').innerHTML = template('ui-template', { + "record": cursor2 + }); + + $("#deal1").hide() + $("#deal2").hide() + } else { + console.log(cursor2); + $("#checkNo").val("") + $("#checkDate").val("") + $("#productNo").val("") + $("#productName").val("") + $("#ptype").val("") + $("#tuhao").val("") + $("#ulId").empty() + //$("#process").val(pdata[0].鐢熶骇宸ュ簭) + $("#checkMan").val("") + mui.alert(data.message, "", "", function() { + $("#checkNo").empty() + $("#checkDate").empty() + $("#productNo").empty() + $("#productName").empty() + $("#ptype").empty() + $("#tuhao").empty() + //$("#process").val(pdata[0].鐢熶骇宸ュ簭) + $("#checkMan").empty() + }); + return; + } + }, + + error: function(xhr, type, errorThrown) { + alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown)); + } + }); + //getBill(selectItem) + } + + + mui("#ulId").on("tap", "a", function() { + var id = this.getAttribute('id'); + var r = this.getAttribute('require'); + var p = this.getAttribute('project') + var pid = this.getAttribute('pid') + var did = this.getAttribute('did') + var res = this.getAttribute('res') + var note = this.getAttribute('note') + var u = this.getAttribute('up') + var d = this.getAttribute('down') + var n = this.getAttribute('nums') + var s = this.getAttribute('standard') + var method = this.getAttribute('method') + console.log(this.outerHTML) + console.log(id) + console.log(pid) + console.log(did) + //console.log(id); + //console.log(did); + // console.log($("#checkNo").val()); + // var url = 'first_check_add.html?did=' + id + "&req=" + r + "&res=" + encodeURI(res) + '¬e=' + encodeURI(note) + + // '&pro=' + encodeURI(p) + '&order=' + $("#checkNo").val(); + var url = 'IQC_check_add.html?did=' + id + '&ddid=' + did + '&pro=' + pid + '&order=' + $("#checkNo") + .val(); + + console.log(url); + mui.openWindow({ + id: id, + url: url, + extras: {}, + waiting: { + autoShow: true, + title: '鍔犺浇涓�' + } + }); + }) + mui("#submitBtn").on("tap", "a", function(event) { + var code = this.getAttribute('data-code'); + console.log(11); + doSubmit(code); + }) + + function doSubmit(opertype) { + var checkNo = document.getElementById('checkNo').value; + var type = ''; + if (checkNo == '' || checkNo == 'undefined') { + mui.toast('璇峰厛鐢熸垚妫�楠屽崟鍙凤紒') + return; + } + if (opertype == '鎻愪氦') { + type = 0 + } else { + type = 1 + + } + console.log(111); + $.ajax({ + url: app.API_URL_HEADER + "/IQCCheck/IQC_SUBMIT", + + data: { + QCNO: $("#checkNo").val(), + REMARK: $("#remark").val(), + TYPE: type + + }, + DataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + if (data.status === 0) { + + if (data.data.matterTable[0].RST == '1') { + alert("寮傚父锛�" + data.data.matterTable[0].MSG); + return + } + + if (data.data.matterTable[0].MSG == '鍚堟牸') { + $("#deal1").show() + $("#deal2").hide() + } else if (data.data.matterTable[0].MSG == '涓嶅悎鏍�') { + $("#deal1").hide() + $("#deal2").show() + } else { + $("#deal1").hide() + $("#deal2").hide() + } + mui.alert("鎿嶄綔鎴愬姛"); + } else { + plus.ui.toast(data.msg); + } + }, + error: function(xhr, type, errorThrown) { + alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown)); + } + }); + } + + function checkZero(cursor) { + for (var j = 0; j < cursor.length; j++) { + if (cursor[j].FLOWER != null) { + var f = cursor[j].FLOWER.substr(0, 1) + if (f == ".") { + var t = cursor[j].FLOWER.split(""); + t.splice(0, 0, "0"); + t = t.join("") + cursor[j].FLOWER = t + } + } + if (cursor[j].FUPPER != null) { + var f = cursor[j].FUPPER.substr(0, 1) + if (f == ".") { + var t = cursor[j].FUPPER.split(""); + t.splice(0, 0, "0"); + t = t.join("") + cursor[j].FUPPER = t + } + } + } + return cursor; + } + + function clicked(url, f1, urlId) { + OpenWindow(f1, url, { + urlId: urlId, + inputId: f1 + }); + }; + </script> + </body> +</html> \ No newline at end of file diff --git a/pages/CangKuManage/IQC_check_add.html b/pages/CangKuManage/IQC_check_add.html new file mode 100644 index 0000000..c2e1dfe --- /dev/null +++ b/pages/CangKuManage/IQC_check_add.html @@ -0,0 +1,259 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" + content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> + <title></title> + <script src="../../js/mui.min.js"></script> + <script src="../../js/api.js"></script> + <script src="../../js/common.js"></script> + <script src="../../js/jquery.js"></script> + <script src="../../js/jquery-1.11.1.js"></script> + <script src="../../js/jquery.xml2json.js.js"></script> + <script src="../../js/template-web.js"></script> + <link href="../../css/mui.min.css" rel="stylesheet" /> + <link rel="stylesheet" type="text/css" href="../../css/iconfont.css" /> + <script type="text/javascript" src="../../lib/base_js/js/app.js"></script> + + <script type="text/javascript" src="../../lib/base_js/js/common.js" ></script> + <style type="text/css"> + label { + font-size: 1.20rem; + } + </style> + </head> + <body> + <header class="mui-bar mui-bar-nav"> + <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> + <h1 class="mui-title font">棣栦欢褰曞叆 + </h1> + </header> + + <div class="mui-content"> + <div class="mui-input-group"> + <div class="mui-input-row"> + <label>妫�楠岄」鐩�</label> + <input id="checkName" type="text" disabled="disabled" style="background-color: #F5F5F5;" + class="mui-input-clear"> + </div> + + <div class="mui-input-row"> + <label>鎶芥璇存槑</label> + <input id="UcheckNUM" type="text" disabled="disabled" style="background-color: #F5F5F5;" + class="mui-input-clear"> + </div> + <div class="mui-input-row"> + <label>鎶芥鏁伴噺</label> + <input id="checkNUM" type="text" disabled="disabled" style="background-color: #F5F5F5;" + class="mui-input-clear"> + </div> + <div class="mui-input-row"> + <label>妫�楠岀粨鏋�</label> + <select id="result" class="mui-select" onchange="getselect()"> + <option value="鍚堟牸">鍚堟牸</option> + <option value="涓嶅悎鏍�">涓嶅悎鏍�</option> + </select> + </div> + <div class="mui-input-row" id="nqd" style="display:none;"> + <label>涓嶅悎鏍兼暟</label> + <input id="NQNUM" type="text" + class="mui-input-clear"> + </div> + <div class="mui-input-row"> + <label>涓婇檺</label> + <input id="UPNUM" type="text" + class="mui-input-clear"> + </div> + <div class="mui-input-row"> + <label>鏍囧噯鍊�</label> + <input id="MIDNUM" type="text" + class="mui-input-clear"> + </div> + <div class="mui-input-row"> + <label>涓嬮檺</label> + <input id="DOWNNUM" type="text" + class="mui-input-clear"> + </div> + <div class="mui-input-row"> + <label>澶囨敞</label> + <textarea id='remark' type="text" class='input-text'></textarea> + </div> + <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: 16px;">瑙勬牸瑕佹眰</a> + <div class="mui-collapse-content" style="height:200px"> + <!-- <p id="model" style="font-size: 1.0625rem;color: #000000;"></p> --> + <textarea id='model' type="text" class='input-text' style="height:200px"></textarea> + </div> + + </li> + </ul> + <div class="mui-input-row" style="margin-top: 20px;"> + <button type="button" class="mui-btn mui-btn-green mui-icon mui-icon-checkmarkempty" + style="font-size:1.3rem;width: 100%;" id="doSure">纭</button> + </div> + </div> + + </div> + + <script type="text/javascript" charset="utf-8"> + mui.init({ + beforeback: function() { + var list = plus.webview.currentWebview().opener(); + mui.fire(list, 'refresh'); + return true; + } + }); + window.addEventListener("changeBar", function(e) { + var inputId = e.detail.inputId + document.getElementById(inputId).value = e.detail.barcode; + }); + var fdid = GetQueryString('ddid') + var order = GetQueryString('order') + var ffid ="" + var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); + var user_id = currentSession.user_id; + mui.plusReady(function() { + app.init(); + var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); + var user_id = currentSession.user_id; + // var pro = GetQueryStringCn('pro') + // var req = GetQueryStringCn('req') + // var res = GetQueryStringCn('res') + // var note = GetQueryStringCn('note') + var id=GetQueryString("ddid") + var checkNo=GetQueryString("order") + var QCXM=GetQueryString("pro") + console.log(id); + //console.log(checkNo); + $.ajax({ + url: app.API_URL_HEADER + "/IQCCheck/IQC_GETBILL", + + data: { + USERID:user_id, + QCNO: checkNo , + id:id + }, + DataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + if (data.status === 0) { + var datad = data.data.matterTable + ffid=datad[0].ID + //console.log(ffid); + $("#checkName").val(datad[0].DBB001) + $("#model").val(datad[0].DBB003) + $("#result").val(datad[0].DBB012) + $("#remark").val(datad[0].DBB009) + $("#checkNUM").val(datad[0].DBB008) + $("#UcheckNUM").val(datad[0].DBB008) + $("#NQNUM").val(datad[0].DBB011) + $("#UPNUM").val(datad[0].DBB005) + $("#MIDNUM").val(datad[0].DBB006) + $("#DOWNNUM").val(datad[0].DBB007) + + + + + } else { + // mui.alert(data.message,"","",function(){ + + // }); + // return; + } + }, + }); + + + // $("#result").val(res.res) + // $("#remark").val(note.note) + }) + + $("#doSure").click(function() { + var id=GetQueryString("ddid") + var order = GetQueryString('order') + console.log(id); + var re = /^(\-|\+)?\d+(\.\d+)?$/ ///^\d+(?=\.{0,1}\d+$|$)/ + if($("#UPNUM").val() != "" && !re.test($("#UPNUM").val())){ + document.getElementById("UPNUM").value = ''; + console.log(1); + mui.alert("璇疯緭鍏ユ纭殑鏁板瓧锛�") + return ; + } + + if($("#MIDNUM").val() != "" && !re.test($("#MIDNUM").val())){ + document.getElementById("MIDNUM").value = ''; + console.log(2); + mui.alert("璇疯緭鍏ユ纭殑鏁板瓧锛�") + return ; + } + + if($("#DOWNNUM").val() != "" && !re.test($("#DOWNNUM").val())){ + document.getElementById("DOWNNUM").value = ''; + console.log(3); + mui.alert("璇疯緭鍏ユ纭殑鏁板瓧锛�") + return ; + } + + if($("#result").val()=="涓嶅悎鏍�"){ + if(re.test($("#NQNUM").val()) && $("#NQNUM").val() > "0"){ + + } + else{ + mui.alert("璇疯緭鍏ユ纭殑鏁板瓧锛�"); + console.log(4); + return ; + } + } + + $.ajax({ + url: app.API_URL_HEADER + "/IQCCheck/IQC_SUBMITNUM",//鎻愪氦涓婁笅闄愬�� + + data: { + userid:user_id, + ID:id, + UPNUM: $("#UPNUM").val() , + MIDNUM: $("#MIDNUM").val(), + DOWNNUM:$("#DOWNNUM").val(), + result:$("#result").val(), + NQNUM:$("#NQNUM").val() + }, + DataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + if(data.status === 0) { + mui.alert("鎿嶄綔鎴愬姛") + } else { + mui.alert(data.message,"","",function(){ + document.getElementById("UPNUM").value = ''; + document.getElementById("MIDNUM").value = ''; + document.getElementById("DOWNNUM").value = ''; + }); + return; + } + }, + }) + + }) + function getselect(){ + if ($("#result").val()=="涓嶅悎鏍�") + document.getElementById("nqd").style.display = ""; + if ($("#result").val()=="鍚堟牸") + document.getElementById("nqd").style.display = "none"; + } + + + function clicked(url, f1, urlId) { + OpenWindow(f1, url, { + urlId: urlId, + inputId: f1 + }); + }; + </script> + </body> +</html> diff --git a/pages/CangKuManage/IQC_check_input.html b/pages/CangKuManage/IQC_check_input.html new file mode 100644 index 0000000..ed76d05 --- /dev/null +++ b/pages/CangKuManage/IQC_check_input.html @@ -0,0 +1,432 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> + <title></title> + <script src="../../js/mui.min.js"></script> + <script src="../../js/api.js"></script> + <script src="../../js/jquery.js"></script> + <script src="../../js/jquery-1.11.1.js"></script> + <script src="../../js/template-web.js"></script> + <link href="../../css/mui.min.css" rel="stylesheet" /> + <link rel="stylesheet" type="text/css" href="../../css/iconfont.css" /> + <script type="text/javascript" src="../../lib/base_js/js/app.js"></script> + + <script type="text/javascript" src="../../lib/base_js/js/common.js" ></script> + <style type="text/css"> + .mui-content { + margin-top: 2px; + } + .ulcss { + padding: 5px 5px; + } + + .ulcss a { + border: solid 1px #FFFFF; + background-color: #E6E6FA; + --border-radius: 30px; + border-top-left-radius: 20px; + border-bottom-left-radius: 20px; + border-bottom-right-radius: 20px; + } + + .close { + position: absolute; + top: 0; + right: 0; + z-index: 99; + color: red; + } + + .search { + border: 1px solid #e0e0e0; + border-radius: 5px; + display: flex; + width: 100%; + align-items: center; + margin-top: 10px; + /* padding:0px 10px 0;*/ + background-color: rgba(255, 255, 255, 1); + padding-left: 10px; + margin-bottom: 10px; + height: 40px; + } + + .search input { + margin-bottom: 2px; + padding: 0px 0px; + --background: none; + border-radius: 5px; + font-size: 1.6rem; + } + + .mui-input-group .mui-input-row { + height: 2.2rem; + } + + .font { + font-size: 1.6rem; + color: #000000; + } + + .mui-input-row label { + font-size: 1.125rem; + } + + .mui-input-row input { + font-size: 1.0625rem; + } + + </style> + </head> + <body> + <header class="mui-bar mui-bar-nav"> + <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> + <h1 class="mui-title font"> + 棣栦欢妫�楠岄」鐩綍鍏� + <span class="mui-badge mui-badge-primary" style="font-size: 1.6rem; display: none;" id='num'>0</span> + </h1> + + </header> + <div class="mui-content" id="contentId"> + <div class="mui-input-group"> + </div> + <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;">璇︾粏淇℃伅</a> + <div class="mui-collapse-content" id="collapseId"> + + </div> + </li> + <li class="mui-table-view-cell mui-collapse mui-active"> + <a class="mui-navigate-right font" href="#" style="font-size: 20px;">瑙勬牸瑕佹眰</a> + <div class="mui-collapse-content" id="collapseId1"> + + </div> + </li> + </ul> + <div class="search"> + <span class="mui-icon iconfont icon-jianyan" style="color:#0062CC"></span> + <input type="search" 慰nkeyup="value=value.replace(/[^\d\.]/g,'')" class="mui-input-clear" placeholder="璇疯緭鍏ユ楠屽��" id="values" style="font-size: 1.0625rem;"> + <button type="button" class="mui-btn mui-btn-green mui-icon mui-icon-checkmarkempty" style="font-size:1.0625rem;" id="addBtn">纭</button> + </div> + <ul class="mui-table-view mui-grid-view mui-grid-9 ulcss" id="list"> + </ul> + </div> + + <script id='col-template' type="text/template"> + <form class="mui-input-group" > + <div class="mui-input-row"> + <label>妫�楠岄」鐩�:</label> + <input type="text" class="mui-input-clear font" value="<%=(item.妫�楠岄」鐩�)%>" disabled="disabled"> + </div> + {{if item.鏍囧噯鍊� !=null}} + <div class="mui-input-row"> + <label>鏍囧噯鍊�:</label> + <input type="text" class="mui-input-clear" value="<%=(item.鏍囧噯鍊�)%>" disabled="disabled"> + </div> + {{/if}} + {{if item.涓婇檺 !=null}} + <div class="mui-input-row"> + <label>涓婇檺:</label> + <input type="text" class="mui-input-clear" value="<%=(item.涓婇檺)%>" disabled="disabled"> + </div> + {{/if}} + {{if item.涓嬮檺 !=null}} + <div class="mui-input-row"> + <label>涓嬮檺:</label> + <input type="text" class="mui-input-clear" value="<%=(item.涓嬮檺)%>" disabled="disabled"> + </div> + {{/if}} + {{if item.鎶芥鏁伴噺 !=null}} + <div class="mui-input-row"> + <label>鎶芥鏁伴噺:</label> + <input type="text" class="mui-input-clear" value="<%=(item.鎶芥鏁伴噺)%>" disabled="disabled"> + </div> + {{/if}} + + <div class="mui-input-row"> + <label>澶囨敞</label> + <textarea id='remark' type="text" class='input-text' ><%=(item.澶囨敞)%></textarea> + </div> + + </form> + </script> + <script id='col-template1' type="text/template"> + {{if item.瑙勬牸瑕佹眰 !=null}} + <div class="mui-input-row"> + <p style="font-size: 1rem;color: #000000;"> <%=(item.瑙勬牸瑕佹眰)%></p> + </div> + {{/if}} + </script> + <script id='ui-template' type="text/template"> + <% for(var i in record){ var item=record[i]; %> + <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 list-li"> + <span class="mui-icon mui-icon-closeempty li-remove" onclick="closeLi()" style="color: red; position: absolute; top: 0px; right: 0px; z-index: 100"></span> + <p style="display: none;"><%=item.妫�楠屽��%></p> + <label style=" display: none; "><%=item.ID%></label> + <a style="height: 5.675rem;" > + <div class="mui-media-body" style="text-align: center;"><p style="position: absolute;width:100%;" class="font"> + <%=item.妫�楠屽��%></p> + </div> + <HR style= " border: 1 dashed #987cb9" width ="80%" color =#987 cb 9 SIZE = 1> + <%if(item.妫�楠岀粨鏋�=='鍚堟牸'){%> + <span class="mui-icon iconfont icon-hege1 font" style="color:#A0BF7C;font-size: 30px;">鍚堟牸</span> + <%}else{%> + <span class="mui-icon iconfont icon-buhege1 font" style="color:#FD8383;font-size: 27px;">涓嶅悎鏍�</span> + <%}%> + </a> + </li> + <% } %> + </script> + </div> + <script type="text/javascript" charset="utf-8"> + + var count = 0; + var barcodeList=[] + mui.init({ + beforeback: function() { + + var list = plus.webview.currentWebview().opener(); + mui.fire(list, 'refresh'); + return true; + } + }); + var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); + var user_id = currentSession.user_id; + var fmid = GetQueryString('mid'); + var fdid = GetQueryString('did'); + var lineType = ""; + var fboard_model=""; + mui.plusReady(function() { + app.init(); + // count = GetQueryString('num'); + // alert(count); + // document.getElementById("num").innerHTML = count; + // var i = GetQueryStringCn() + // lineType = i.lineType + // fboard_model=i.fboard_model + // alert('7'); + // console.log(fdid); + getData() + + document.getElementById("values").addEventListener("keydown", function(e) { + if (13 == e.keyCode) { + document.activeElement.blur(); + addUi(0, -1); + } + }, false); + + + mui('.search').on('tap', '#addBtn', function(event) { + addUi(0, -1) + }) + //鐐瑰嚮浜嬩欢 + var btnArray = ['纭', '鍙栨秷']; + mui("#list").on("tap", ".list-li", function(event) { + console.log(21); + var checkResult = $(this).find('p').text(); + var checkId = $(this).find('label').text(); + mui.confirm('纭畾鍒犻櫎姝ゆ潯璁板綍锛�', '鎻愮ず', btnArray, function(e) { + if (e.index == 0) { + console.log(checkId); + delLi(checkId,checkResult); + } else { + setTimeout(function() { + /* mui.swipeoutClose(li); */ + }, 0); + } + }); + }) + }); + + function delLi(checkId,checkResult){ + + var order= GetQueryString('order') + var id=GetQueryString("did") + $.ajax({ + url: app.API_URL_HEADER + "/XKYDHD/FQC_CHECKDEL", + + data: { + PID:checkId + }, + DataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + if (data.status === 0) { + getData() + } else { + getData() + mui.alert(data.message,"","",function(){ + + }); + } + }, + }); + } + + function getData() { + + var id=GetQueryString("did") + + // var pro=GetQueryStringCn("pro") + // var standard=GetQueryString('st') + // var up=GetQueryString("up") + // var down=GetQueryString("down") + // var require=GetQueryString("req") + var checkNo=GetQueryString("order") + var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); + var user_id = currentSession.user_id; + + // aj.post("/ho_patrol/getDetails", { + // "userNo": api_localStorageGet("code"), + // "checkNo": checkNo, + // "pid": id, + // }, function(data) { + // if (data.result) { + // console.log(user_id); + // console.log(checkNo); + // console.log(id); + $.ajax({ + url: app.API_URL_HEADER + "/XKYDHD/FQC_GETDATA", + + data: { + USERID:user_id, + QCNO: checkNo , + PID:id + }, + DataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + console.log(data); + if (data.status === 0) { + var cursor1 = data.data.matterTable[0] + console.log(cursor1); + if(cursor1==null) + { + mui.alert("娌℃湁妫�楠岄」鐩�","","",function(){ + + }); + return; + } + document.getElementById('collapseId').innerHTML = template('col-template', { + "item": cursor1 + }); + document.getElementById('collapseId1').innerHTML = template('col-template1', { + "item": cursor1 + }); + var cursor2 = data.data.matterTableT + document.getElementById('list').innerHTML = template('ui-template', { + "record": cursor2 , + + }); + + + } else { + mui.alert(data.message,"","",function(){ + + }); + } + }, + }); + } + + + function addUi(type, id1) { + + var input_check = $('#values').val(); + var re = /^(\-|\+)?\d+(\.\d+)?$/ ///^\d+(?=\.{0,1}\d+$|$)/ + if (re.test(input_check)) { + // mui.alert("鎿嶄綔鎴愬姛锛�") + } + else { + document.getElementById("values").value = ''; + document.getElementById("values").focus(); + mui.alert("璇疯緭鍏ユ纭殑鏁板瓧锛�") + return ; + } + + var order= GetQueryString('order') + var id=GetQueryString("did") + + // aj.post("/ho_patrol/checkSave", { + // "userNo": api_localStorageGet("code"), + // "checkNo": order, + // "pid": id, + // "checkResult": $('#values').val(), + // "checkDemo": $("#remark").val() + // }, function(data) { + $.ajax({ + url: app.API_URL_HEADER + "/XKYDHD/FQC_CHECKSAVE", + + data: { + USERID:user_id, + DID: id , + CNUM:input_check + }, + DataType: "json", + type: "post", + async: false, + //timeout: 15000, + success: function(data) { + console.log(data); + if (data.status === 0) { + + getData() + document.getElementById("values").value = ''; + document.getElementById("values").focus(); //鑾峰彇鐒︾偣 + + } else { + getData() //鏇存柊椤甸潰 + document.getElementById("values").value = ''; + document.getElementById("values").focus(); //鑾峰彇鐒︾偣 + mui.alert(data.message,"","",function(){ + + }); + } + }, + }); + } + + function checkZero(cursor) { + if (cursor.FLOWER != null) { + var f = cursor.FLOWER.substr(0, 1) + if (f == ".") { + var t = cursor.FLOWER.split(""); + t.splice(0, 0, "0"); + t = t.join("") + cursor.FLOWER = t + } + } + if (cursor.FUPPER != null) { + var f = cursor.FUPPER.substr(0, 1) + if (f == ".") { + var t = cursor.FUPPER.split(""); + t.splice(0, 0, "0"); + t = t.join("") + cursor.FUPPER = t + } + } + if (cursor.FST != null) { + var f = cursor.FST.substr(0, 1) + if (f == ".") { + var t = cursor.FST.split(""); + t.splice(0, 0, "0"); + t = t.join("") + cursor.FST = t + } + } + return cursor; + } + + function close(){ + plus.webview.currentWebview().close(); + } + </script> + </body> +</html> -- Gitblit v1.9.3