New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml" style="background-color:white;"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>产线å
è£
å</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/grwebapp.js"></script> |
| | | <style> |
| | | .layui-form-label { |
| | | font-size: 14px; |
| | | width: 85px; |
| | | text-align: inherit; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <!--<div class="layui-card-header"></div>--> |
| | | <div class="layui-card-body" style="padding: 15px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div class="layui-form-item" style="margin-bottom: 20px;"> |
| | | <button type="button" lay-submit="" lay-filter="HAddBT" class="layui-btn layui-btn-radius">æ°å¢</button> |
| | | <!--<button type="button" lay-submit="" lay-filter="" class="layui-btn layui-btn-radius">æ¸
空</button>--> |
| | | <button type="button" lay-submit="" lay-filter="Saver" class="layui-btn layui-btn-radius">ä¿å</button> |
| | | <button type="button" lay-submit="" lay-filter="Close" class="layui-btn layui-btn-radius layui-btn-danger">éåº</button> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-block"> |
| | | <select name="city" lay-verify="required" id="dymb"> |
| | | <!--<option value="æªéæ©">è¯·éæ©æå°æ¨¡æ¿</option>--> |
| | | <option value="HBarCodePrint">ç©ææ¡ç 模æ¿</option> |
| | | <!--<option value="HPOInStockBill">éè´§å</option>--> |
| | | <!--<option value="HPOInStockBill">éè´§å(æ ç¾çº¸)</option>--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <button type="button" lay-submit="" lay-filter="Print" id="Print" class="layui-btn layui-btn-radius">æå°</button> |
| | | <button type="button" lay-submit="" lay-filter="Print2" id="Print2" hidden="hidden" ></button> |
| | | <div class="layui-inline" style="width: 200px;"> |
| | | <div class="layui-input-block"> |
| | | <select name="PrintName" lay-verify="required" id="PrintName"> |
| | | <option value="æ¯è«å°" selected>æ¯è«å°</option> |
| | | <option value="æ®è²ç¹">æ®è²ç¹</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-block"> |
| | | <select name="LDM" lay-verify="required" id="LDM"> |
| | | <option value="DU3" selected>DU3</option> |
| | | <option value="QDR">QDR</option> |
| | | <option value="AAA">15车é´</option> |
| | | <option value="å
¶ä»">å
¶ä»</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-block"> |
| | | <select name="BBM" lay-verify="required" id="BBM"> |
| | | <option value="1099081-00-E">1099081-00-E</option> |
| | | <option value="1786947-00-B">1786947-00-B</option> |
| | | <option value="1607222-00-B">1607222-00-B</option> |
| | | <option value="1943600-00-B">1943600-00-B</option> |
| | | <option value="1941600-00-B">1941600-00-B</option> |
| | | <option value="1941600-00-C">1941600-00-C</option> |
| | | <option value="1943600-00-C">1943600-00-C</option> |
| | | <option value="å
¶ä»" selected>å
¶ä»</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row" style="padding:10px 0"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <fieldset class="layui-elem-field layui-field-title" style="text-align:center;"> |
| | | <legend>产线å
è£
å</legend> |
| | | </fieldset> |
| | | </div> |
| | | <div class="layui-col-xs1 layui-inline"> |
| | | <img src="222.jpg" style="width:70%;height:50%;" /> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <div class=""> |
| | | <label class="layui-inline" style="width:60px;">æµè½¬å¡å·</label> |
| | | <div class="layui-inline"> |
| | | <input type="text" style="border-radius: 50px;width: 140%;" name="æµè½¬å¡å·" id="HFbarcode" placeholder="请è¾å
¥æµè½¬å¡å·" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class=""> |
| | | <label class="layui-inline" style="width:60px;">åä»¶æ¡ç æ°é</label> |
| | | <div class="layui-inline"> |
| | | <input type="text" lay-verify="verifyPcmQty" style="border-radius: 50px;width: 140%;" name="åä»¶æ¡ç æ°é" id="pcmQty" autocomplete="off" placeholder="请è¾å
¥åä»¶æ¡ç æ°é" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class=""> |
| | | <label class="layui-inline" style="width:60px;">åä»¶æ¡ç </label> |
| | | <div class="layui-inline"> |
| | | <input type="text" style="border-radius: 50px;width: 140%;" name="åä»¶æ¡ç " id="SubBarcode" autocomplete="off" placeholder="请è¾å
¥åä»¶æ¡ç " class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class=""> |
| | | <label class="layui-inline" style="width:60px;">æ¯å¦æ··ç®±</label> |
| | | <div class="layui-inline"> |
| | | <input type="checkbox" id="HMixedBox" name="HMixedBox" lay-skin="primary" value="" lay-filter="HMixedBox"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class=""> |
| | | <label class="layui-inline" style="width:60px;">è£
ç®±æ°é</label> |
| | | <div class="layui-inline"> |
| | | <input type="text" style="border-radius: 50px;" name="" id="zxQty" placeholder="请è¾å
¥è£
ç®±æ°é" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class=""> |
| | | <label class="layui-inline" style="width:60px;">䏿»¡ç®±æ è¯</label> |
| | | <div class="layui-inline"> |
| | | <input type="text" style="border-radius: 50px;" name="" id="HRemark" autocomplete="off" placeholder="请è¾å
¥ä¸æ»¡ç®±æ è¯" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class=""> |
| | | <label class="layui-inline" style="width:60px;">ç½æ å·</label> |
| | | <div class="layui-inline"> |
| | | <input type="text" style="border-radius: 50px;" name="" id="HBarCode_White" autocomplete="off" placeholder="ç½æ å·" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--å¾
æ¥æ¶å·¥å&仿¥è¿ç«--> |
| | | <div class="layui-card layui-form-item"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-tab"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li data-status="" class="layui-this">æ«ç è®°å½</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs12"> |
| | | <table class="layui-hide" id="smjl-table" lay-filter="smjl-table"></table> |
| | | <script type="text/html" id="smjl-toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>é¢è§</button>--> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>å·æ°</button>--> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>å è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>çæéè´§å</button>--> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button>--> |
| | | </div> |
| | | </script> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--å½åå·¥å&å
¶ä»ä¿¡æ¯--> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-col-md8 layui-card-body layui-inline"> |
| | | <div class="layui-tab"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li data-status="" class="layui-this">å
è£
ä¿¡æ¯</li> |
| | | <li data-status="2">å
¶ä»ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show" style="height:250px;"> |
| | | <table> |
| | | <tbody> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">æµè½¬å¡å·</th> |
| | | <td> |
| | | <input type="text" name="æµè½¬å¡å·" id="HProcExchBillNo" lay-verify="" autocomplete="off" placeholder="æµè½¬å¡å·" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | <input type="hidden" name="æµè½¬å¡ID" id="HFbarcodeID"> |
| | | </td> |
| | | <th style="width:80px;padding:10px">ç»è£
æ¶é´</th> |
| | | <td> |
| | | <input type="text" name="ç»è£
æ¶é´" class="layui-input" id="HDateNow" placeholder="ç»è£
æ¶é´" style="background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">ç产订åå·</th> |
| | | <td> |
| | | <input type="text" name="ç产订åå·" id="HSourceBillNo" lay-verify="" autocomplete="off" placeholder="ç产订åå·" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | </td> |
| | | <th style="width:80px;padding:10px">产å代ç </th> |
| | | <td> |
| | | <input type="text" name="产å代ç " class="layui-input" id="HNumber" placeholder="产å代ç " style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="ç©æå
ç " id="HMaterID"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">产ååç§°</th> |
| | | <td> |
| | | <input type="text" name="产ååç§°" id="HMaterName" lay-verify="" autocomplete="off" placeholder="产ååç§°" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | </td> |
| | | <th style="width:80px;padding:10px">è§æ ¼åå·</th> |
| | | <td> |
| | | <input type="text" name="è§æ ¼åå·" class="layui-input" id="HModel" placeholder="è§æ ¼åå·" style="background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">计éåä½</th> |
| | | <td> |
| | | <input type="text" name="计éåä½" id="" lay-verify="" autocomplete="off" placeholder="计éåä½" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | </td> |
| | | <th style="width:80px;padding:10px">æµè½¬å¡æ°é</th> |
| | | <td> |
| | | <input type="text" name="æµè½¬å¡æ°é" class="layui-input" id="" placeholder="æµè½¬å¡æ°é" style="background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">çäº§è®¢åæ°é</th> |
| | | <td> |
| | | <input type="text" name="çäº§è®¢åæ°é" id="" lay-verify="" autocomplete="off" placeholder="çäº§è®¢åæ°é" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | </td> |
| | | <th style="width:80px;padding:10px">åæ®å·</th> |
| | | <td> |
| | | <input type="text" name="åæ®å·" class="layui-input" id="HBillNo2" placeholder="åæ®å·" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="åæ®å·ID" id="HInterID"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">订åè·è¸ªå·</th> |
| | | <td> |
| | | <input type="text" name="订åè·è¸ªå·" id="" lay-verify="" autocomplete="off" placeholder="订åè·è¸ªå·" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | </td> |
| | | <th style="width:80px;padding:10px">ææ¡ç </th> |
| | | <td> |
| | | <input type="text" name="ææ¡ç " class="layui-input" id="HBarCode_wym" placeholder="ææ¡ç " style="background-color:#efefef4d;" readonly> |
| | | <!--éèåæ®µ--> |
| | | <input type="hidden" name="HUnitID" id="HUnitID"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">项ç®å·</th> |
| | | <td> |
| | | <input type="text" name="项ç®å·" id="HProjectNum" lay-verify="" autocomplete="off" placeholder="项ç®å·" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <div class="layui-tab-item" style="height:250px;"> |
| | | <table> |
| | | <tbody> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">å¶å人</th> |
| | | <td> |
| | | <input type="text" name="å¶å人" id="" lay-verify="" autocomplete="off" placeholder="å¶å人" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | </td> |
| | | <th style="width:80px;padding:10px">å¶åæ¥æ</th> |
| | | <td> |
| | | <input type="text" name="å¶åæ¥æ" class="layui-input" id="" placeholder="å¶åæ¥æ" style="background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">ä¿®æ¹äºº</th> |
| | | <td> |
| | | <input type="text" name="ä¿®æ¹äºº" id="" lay-verify="" autocomplete="off" placeholder="ä¿®æ¹äºº" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | </td> |
| | | <th style="width:80px;padding:10px">ä¿®æ¹æ¥æ</th> |
| | | <td> |
| | | <input type="text" name="ä¿®æ¹æ¥æ" class="layui-input" id="" placeholder="ä¿®æ¹æ¥æ" style="background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th style="width:80px;padding:10px">å®¡æ ¸äºº</th> |
| | | <td> |
| | | <input type="text" name="å®¡æ ¸äºº" id="" lay-verify="" autocomplete="off" placeholder="å®¡æ ¸äºº" class="layui-input" style="background-color:#efefef4d" readonly> |
| | | </td> |
| | | <th style="width:80px;padding:10px">å®¡æ ¸æ¥æ</th> |
| | | <td> |
| | | <input type="text" name="å®¡æ ¸æ¥æ" class="layui-input" id="" placeholder="å®¡æ ¸æ¥æ" style="background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--失败æç¤ºé³--> |
| | | <div id="" style="display:none;"> |
| | | <audio id="cs" hidden controls> |
| | | <source src="../../video/jingbao.wav" type="audio/ogg"> |
| | | </audio> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolBar"> |
| | | <a class="layui-btn layui-btn-xs" lay-event="del" style="background-color: red;">å é¤</a> |
| | | </script> |
| | | |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig2.js"></script> |
| | | <script src="../../CreateControl.js"></script> |
| | | <script> |
| | | //CreateReport("Report"); |
| | | function getUrlVars() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | | for (var i = 0; i < hashes.length; i++) { |
| | | hash = hashes[i].split('='); |
| | | vars.push(hash[0]); |
| | | vars[hash[0]] = hash[1]; |
| | | } |
| | | return vars; |
| | | } |
| | | var params = getUrlVars(); |
| | | var BillStatusjson = params[params[0]]; |
| | | var InterID = params[params[1]]; |
| | | |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , element = layui.element |
| | | , layer = layui.layer |
| | | , laydate = layui.laydate |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , util = layui.util; |
| | | |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | if (sessionStorage.login != "login") { |
| | | layer.confirm("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼", { |
| | | icon: 4, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['éæ°ç»å½'] |
| | | }, function () { parent.location.href = "../user/login.html"; }); |
| | | return; |
| | | } |
| | | var option = []; |
| | | set_InitGrid(); |
| | | |
| | | //åå§åæç»è¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | columns = [ |
| | | { type: 'numbers', title: 'åºå·' } |
| | | , { |
| | | field: time, title: 'æ«ç æ¥æ', width: 110, templet: function (d) { |
| | | return util.toDateString(time, "yyyy-MM-dd"); |
| | | } |
| | | } |
| | | //, { field: 'HBarCode_Pack', title: 'æ¡å½¢ç ', width: 145 } |
| | | , { field: 'HSourceBillNo', title: 'æ¡å½¢ç ', width: 145 } |
| | | , { field: 'HBillNo', title: 'æºååå·', width: 125 } |
| | | , { field: 'HBarCode', title: 'å¯ä¸ç ', width: 125 } |
| | | , { field: 'HNumber', title: 'ç©æç¼ç ', width: 105 } |
| | | , { field: 'HName', title: 'ç©æåç§°', width: 105 } |
| | | , { field: 'HModel', title: 'è§æ ¼åå·', width: 105 } |
| | | , { field: 'HQty', title: 'æ°é', width: 80 } |
| | | //, { field: 'HWhID', title: 'ä»åº', width: 80 } |
| | | , { field: 'HMaker', title: 'å¶å人', width: 80 } |
| | | , { field: 'HMakeDate', title: 'å¶åæ¥æ', width: 195 } |
| | | , { toolbar: '#toolBar', width: 65, fixed: 'right' } |
| | | ]; |
| | | option = { |
| | | id: 'smjl-table' |
| | | , elem: '#smjl-table' |
| | | //, toolbar: '#toolbarDemo' |
| | | , page: false |
| | | //, cellMinWidth: 120 |
| | | //, height: 500 |
| | | , cols: [columns] |
| | | //, limit: 500 //æ¯é¡µé»è®¤æ¾ç¤ºçæ°é |
| | | , done: function (res, curr, count) { |
| | | } |
| | | }; |
| | | } |
| | | //å
¨å±åé |
| | | var ZJTMFlag = false;//åä»¶æ¡ç è¾å
¥æ è®° |
| | | //è·åå½åæ¶é´å¤ç |
| | | var data = new Date(); |
| | | var year = data.getFullYear(); //è·åå¹´ |
| | | var month = data.getMonth() + 1; //è·åæ |
| | | var day = data.getDate(); //è·åæ¥ |
| | | var time = year + "-" + month + "-" + day; |
| | | |
| | | var sMaker = sessionStorage["HMaker"]; |
| | | var zxQty;//è¾å
¥çè£
ç®±æ°é |
| | | var zxQtyFlag = 0; |
| | | var pcmQty;//è¾å
¥çæ¹æ¬¡ç æ°é |
| | | var pcmQtyFlag = 0; |
| | | var icmoQty = 0;//æµè½¬å¡æ°é |
| | | var icmoQtyNow = 0;//æµè½¬å¡å©ä½æ°é |
| | | //console.log(sessionStorage); |
| | | |
| | | //页é¢åå§åèµå¼ |
| | | layer.load(3); |
| | | //è·ååæ®å· |
| | | getBillno(); |
| | | |
| | | $("#HDateNow").val(time);//å è½½å½åæ¶é´ |
| | | $("#zxQty").focus(); |
| | | //$("#HFbarcode").css("box-shadow", "0 0 0 1px #00ff00"); |
| | | $("#SubBarcode").attr("readonly", "readonly");//åä»¶æ¡ç åªè¯» |
| | | $("#SubBarcode").css("background-color", "#efefef4d"); |
| | | //$("#zxQty").attr("readonly", "readonly");//æ°éåªè¯» |
| | | //$("#zxQty").css("background-color", "#efefef4d"); |
| | | $("#HFbarcode").attr("readonly", "readonly"); |
| | | $("#HFbarcode").css("background-color", "#efefef4d"); |
| | | $("#pcmQty").attr("readonly", "readonly");//æ°éåªè¯» |
| | | $("#pcmQty").css("background-color", "#efefef4d"); |
| | | |
| | | |
| | | //å¡«åè£
ç®±æ°éåå
æ 跳走 |
| | | $('#zxQty').on('keydown', function (event) { |
| | | zxQty = $("#zxQty").val(); |
| | | if (event.keyCode == 13) { |
| | | if (!(/(^[1-9]\d*$)/.test(zxQty))) { |
| | | playSound(); |
| | | layer.msg("请è¾å
¥æ£ç¡®çæ´æ°ï¼"); |
| | | return; |
| | | } |
| | | |
| | | if (zxQty == "" || zxQty <= 0) { |
| | | playSound(); |
| | | layer.msg("请è¾å
¥æ£ç¡®çæ°éï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } else { |
| | | $("#zxQty").attr("readonly", "readonly");//æ°éåªè¯» |
| | | $("#zxQty").css("background-color", "#efefef4d"); |
| | | $("#zxQty").css("box-shadow", "none"); |
| | | |
| | | pcmQty = zxQty; |
| | | $("#pcmQty").val(zxQty);//åä»¶æ¡ç æ°é é»è®¤ä¸º = è£
ç®±æ°é |
| | | $("#SubBarcode").removeAttr("readonly");//ç§»é¤åä»¶æ¡ç åªè¯» |
| | | $("#SubBarcode").css("background-color", "white"); |
| | | $("#SubBarcode").focus(); |
| | | $("#SubBarcode").css("box-shadow", "0 0 0 1px #00ff00"); |
| | | HFbarcodeKeydown(); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | //å¡«ååä»¶æ¡ç æ°éåå
æ 跳走 |
| | | $('#pcmQty').on('keydown', function (event) { |
| | | pcmQty = $("#pcmQty").val(); |
| | | if (event.keyCode == 13) { |
| | | if (!(/(^[1-9]\d*$)/.test(pcmQty))) { |
| | | playSound(); |
| | | layer.msg("请è¾å
¥æ£ç¡®çæ´æ°ï¼"); |
| | | return; |
| | | } |
| | | //å¤æææ¬æ¡æ¯å¦ææ°æ® new |
| | | if (pcmQty > icmoQty) { |
| | | playSound(); |
| | | layer.msg("åä»¶æ¡ç æ°éä¸å
è®¸å¤§äºæµè½¬å¡æ°éï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | if (pcmQty == "" || pcmQty <= 0) { |
| | | playSound(); |
| | | layer.msg("请è¾å
¥æ£ç¡®çæ°éï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } else { |
| | | $("#pcmQty").attr("readonly", "readonly");//æ°éåªè¯» |
| | | $("#pcmQty").css("background-color", "#efefef4d"); |
| | | $("#pcmQty").css("box-shadow", "none"); |
| | | $("#SubBarcode").removeAttr("readonly");//ç§»é¤åä»¶æ¡ç åªè¯» |
| | | $("#SubBarcode").css("background-color", "white"); |
| | | $("#SubBarcode").focus(); |
| | | $("#SubBarcode").css("box-shadow", "0 0 0 1px #00ff00"); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | form.on('checkbox(HMixedBox)', function (obj) { |
| | | if (icmoQtyNow == 0) { |
| | | playSound(); |
| | | layer.msg("å©ä½æ°é为" + icmoQtyNow + ",ä¸å
许混箱ï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | $("input[name='HMixedBox']").prop("checked", false); |
| | | form.render('checkbox'); |
| | | return; |
| | | } |
| | | if (obj.value == "") { |
| | | $("#HMixedBox").val("1"); |
| | | } else { |
| | | $("#HMixedBox").val(""); |
| | | } |
| | | |
| | | }); |
| | | |
| | | |
| | | //åä»¶æ¡ç åè½¦æ¹æ³ |
| | | $('#SubBarcode').on('keydown', function (event) { //æ«æ¡å½¢ç |
| | | |
| | | var SubBarcode = $('#SubBarcode').val(); |
| | | var HBillNo = $('#HFbarcode').val(); |
| | | var HInterID = $("#HInterID").val(); |
| | | var HBillNo2 = $("#HBillNo2").val(); |
| | | var HBillType = "3783"; |
| | | var LDM = $("#LDM").val();//æ¡ç 车é´ç±»å DU3/QDR/å
¶å® |
| | | var BBM = $("#BBM").val();// |
| | | var reg = /[a-z]/; |
| | | |
| | | if (event.keyCode == 13) { |
| | | if (LDM != "å
¶ä»" && BBM != "å
¶ä»" && SubBarcode.length != 29) { |
| | | playSound(); |
| | | layer.alert("åä»¶æ¡ç é¿åº¦ä¸ä¸º29ä½!", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | |
| | | if (LDM == "AAA" && SubBarcode.length != 50) { |
| | | playSound(); |
| | | layer.alert("åä»¶æ¡ç é¿åº¦ä¸ä¸º50ä½!", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | |
| | | if (SubBarcode.match(/[^\x00-\xff]/g) != null) { |
| | | playSound(); |
| | | layer.alert("å¿
é¡»æ¯åè§å符!", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | |
| | | if (SubBarcode.length == 50) { |
| | | if (LDM != "å
¶ä»" && reg.test(SubBarcode)) { |
| | | playSound(); |
| | | layer.alert("请æ¥çåä»¶æ¡ç 大忝妿£ç¡®!", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | } else { |
| | | if (LDM != "å
¶ä»" && BBM != "å
¶ä»" && reg.test(SubBarcode)) { |
| | | playSound(); |
| | | layer.alert("请æ¥çåä»¶æ¡ç 大忝妿£ç¡®!", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if (LDM != "å
¶ä»" && BBM != "å
¶ä»" && SubBarcode.indexOf(BBM) == -1) { |
| | | playSound(); |
| | | layer.alert("è¯·æ«ææ£ç¡®çåä»¶æ¡ç !", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | |
| | | if (LDM != "å
¶ä»") { |
| | | if (SubBarcode.indexOf(LDM) == -1) { |
| | | playSound(); |
| | | layer.alert("å½åæ¡ç ä¸å±äº" + LDM + "车é´", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | } |
| | | if (SubBarcode == "") { |
| | | playSound(); |
| | | layer.alert("åä»¶æ¡ç 为空ï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | if (zxQty == zxQtyFlag) { |
| | | playSound(); |
| | | layer.alert("è£
ç®±æ°éå·²æ«å®ï¼è¯·ç¹å»ä¿åï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | $("#HRemark").attr("readonly", "readonly");//䏿»¡ç®±æ è¯åªè¯» |
| | | $("#HRemark").css("background-color", "#efefef4d"); |
| | | return; |
| | | } |
| | | if (pcmQty == pcmQtyFlag) { |
| | | playSound(); |
| | | layer.alert("åä»¶æ¡ç æ°éå·²æ«å®ï¼è¯·ç¹å»ä¿åï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | //var a = 0; |
| | | |
| | | //$.ajax({//夿æ¡ç çç¶æ |
| | | // url: GetWEBURL() + "/LEMS/HbadStaus", |
| | | // type: "GET", |
| | | // async: false, |
| | | // data: { "SubBarcode": SubBarcode }, |
| | | // success: function (result) { |
| | | // if (result.count == 0) { |
| | | // a = 1; |
| | | // playSound(); |
| | | // layer.alert(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | // return false; |
| | | // } |
| | | // } |
| | | //}) |
| | | //if (a == 1) { |
| | | // a = 0; |
| | | // return false; |
| | | //} |
| | | //var HProcExchBillNo = $("#HProcExchBillNo").val(); |
| | | ////夿æ¡ç ä¹åçå·¥åºæ¯å¦åºç« |
| | | //$.ajax({ |
| | | // url: GetWEBURL() + "/LEMS/SNBarcodeProcCtrl", |
| | | // type: "GET", |
| | | // async: false, |
| | | // data: { "SubBarcode": SubBarcode, "HProcExchBillNo": HProcExchBillNo, "HMixedBox": $("#HMixedBox").val(), "HBillNo": HBillNo2 }, |
| | | // success: function (result) { |
| | | // if (result.count == 0) { |
| | | // a = 1; |
| | | // playSound(); |
| | | // layer.alert(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | // return false; |
| | | // } |
| | | // } |
| | | //}) |
| | | |
| | | //if (a == 1) { |
| | | // a = 0; |
| | | // return false; |
| | | //} |
| | | |
| | | $.ajax({//æ¥è¯¢åä»¶æ¡ç çå计æ°é |
| | | url: GetWEBURL() + "/LEMS/Select_Gy_BarCodeBill_HQty", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HBarCode": $("#HBarCode_wym").val() |
| | | }, |
| | | success: function (result) { |
| | | var AllHqty = result.data[0].HQty; |
| | | if (AllHqty >= icmoQty) { |
| | | playSound(); |
| | | layer.alert("å
è£
æ°éå·²çäºæµè½¬å¡æ°éï¼ä¸å
许æ«ç ï¼", { icon: 1 }); |
| | | return; |
| | | } else { |
| | | //夿è£
ç®±æ°éä¸è½å¤§äºå©ä½æ°é |
| | | if (AllHqty > icmoQtyNow && $("#HMixedBox").val() == "") { |
| | | playSound(); |
| | | layer.msg("è£
ç®±æ°éä¸å
è®¸å¤§äºæµè½¬å¡å©ä½æ°éï¼å©ä½æ°é为" + icmoQtyNow, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } else { |
| | | $.ajax({//表ä½åtemp表 |
| | | url: GetWEBURL() + "/LEMS/SaveSubBarcode_Json_MXG", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HBillNo": HBillNo |
| | | , "SubBarcode": SubBarcode |
| | | , "HInterID": HInterID |
| | | , "HBillNo2": HBillNo2 |
| | | , "HBillType": HBillType |
| | | , "sMaker": sMaker |
| | | , "HBarCode": $("#HBarCode_wym").val() |
| | | , "HNumber": $("#HNumber").val() |
| | | , "HName": $("#HMaterName").val() |
| | | , "HModel": $("#HModel").val() |
| | | }, |
| | | success: function (result) { |
| | | var data = result.data; |
| | | if (result.Message == "该åä»¶æ¡ç å·²åå¨") { |
| | | playSound(); |
| | | layer.alert("该åä»¶æ¡ç å·²åå¨", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } else { |
| | | if (data[0].Column1 == 1) { // 说æéªè¯æåäºï¼ |
| | | $('#SubBarcode').val(""); |
| | | $("#SubBarcode").focus(); |
| | | table.reload('smjl-table', { |
| | | url: GetWEBURL1() + '/LEMS/Update_HBillNo_SubBarcodeList_Json' |
| | | , where: { |
| | | HBillNo: HBillNo2 |
| | | , HBarCode: HBillNo |
| | | } |
| | | }); |
| | | zxQtyFlag++; |
| | | pcmQtyFlag++ |
| | | $("#zxQty").val("" + zxQtyFlag + "/" + zxQty + ""); |
| | | $("#pcmQty").val("" + pcmQtyFlag + "/" + pcmQty + ""); |
| | | layer.msg("æ«ææå", { time: 5000, icon: 6 }); |
| | | $.ajax({//æ¥è¯¢æ¡ç æ¡£æ¡è¡¨éçééæ¡ç çå计æ°éæ¹æ³ |
| | | url: GetWEBURL() + "/LEMS/Select_Gy_BarCodeBill_HQty", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HBarCode": $("#HBarCode_wym").val() |
| | | }, |
| | | success: function (result) { |
| | | var HQty = result.data[0].HQty; |
| | | HQty++; |
| | | $.ajax({//æ´æ°æ¡ç æ¡£æ¡è¡¨éçééæ¡ç çå计æ°éæ¹æ³ |
| | | url: GetWEBURL() + "/LEMS/Update_Gy_BarCodeBill_HQty", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HBarCode": $("#HBarCode_wym").val(), |
| | | "HQty": HQty |
| | | }, |
| | | success: function (result) { |
| | | var HQty = result.data; |
| | | ZJTMFlag = true; |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æ´æ°æ¡ç æ¡£æ¡è¡¨éçééæ¡ç çå计æ°éæ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æ¥è¯¢æ¡ç æ¡£æ¡è¡¨éçééæ¡ç çå计æ°éæ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } else { |
| | | playSound(); |
| | | // $("#verifycode").click(); |
| | | //layer.msg(result.Message, { icon: 5 }); |
| | | layer.alert("æå
¥ç¼å表失败", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | } |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("åä»¶æ¡ç æ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æ¥è¯¢æ¡ç æ¡£æ¡è¡¨éçééæ¡ç çå计æ°éæ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | //ä¿åæé® |
| | | form.on('submit(Saver)', function (data) {//æäº¤ |
| | | //debugger; |
| | | if (parseInt(zxQty) > zxQtyFlag) { |
| | | var HRemark = $('#HRemark').val(); |
| | | if (!HRemark) { |
| | | playSound(); |
| | | layer.alert("è£
ç®±æ°éæªæ«å®ï¼è¯·æ«å®è£
ç®±æ°éæå¡«å䏿»¡ç®±æ è¯ï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | } |
| | | if (!ZJTMFlag) { |
| | | playSound(); |
| | | layer.alert("åä»¶æ¡ç æªæ«æï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | //å¢å æ ¡éªç½æ å· |
| | | var LDM = $("#LDM").val();// |
| | | var BBM = $("#BBM").val();// |
| | | var HBarCode_White = $("#HBarCode_White").val();//ç½æ å· |
| | | |
| | | if (HBarCode_White == "") { |
| | | playSound(); |
| | | layer.alert("ç½æ å·ä¸è½ä¸ºç©º!", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | |
| | | //var BBMs = BBM.replace(/-/g, ""); |
| | | //if (LDM != "å
¶ä»" && BBM != "å
¶ä»" && HBarCode_White.indexOf(BBMs) == -1) { |
| | | // playSound(); |
| | | // layer.alert("è¯·æ«ææ£ç¡®ç½æ å·", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | // return; |
| | | //} |
| | | if ($('#dymb').val() == "æªéæ©") { |
| | | playSound(); |
| | | layer.alert("è¯·éæ©æå°æ¨¡æ¿", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var datas = table.cache["smjl-table"]; |
| | | var HBillNo = $('#HBillNo2').val(); |
| | | var lenth = datas.length; |
| | | var HRemark = $("#HRemark").val(); |
| | | if (!HRemark) { |
| | | HRemark = "æ "; |
| | | } |
| | | //var HProjectNum = $("#HProjectNum").val(); |
| | | var HProjectNum = "æµè¯"; |
| | | if (!HProjectNum) { |
| | | playSound(); |
| | | layer.alert("项ç®å·ä¸ºç©ºï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | $.ajax({//æå
¥ä¸»è¡¨ |
| | | url: GetWEBURL() + "/LEMS/SaveToSc_PackUnionBillMain_MXG", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HBillNo": HBillNo |
| | | , "HRemark": HRemark |
| | | , "HProjectNum": HProjectNum |
| | | , "HBarCode_White": HBarCode_White |
| | | , "zxQty": zxQty |
| | | , "BBM": BBM |
| | | , "LDM": LDM |
| | | , "HMaterNumber": $("#HNumber").val() |
| | | }, |
| | | success: function (result) { |
| | | var data = result.data; |
| | | if (result.count == 1) { |
| | | playSound(); |
| | | layer.msg("æ«ææå", { time: 5000, icon: 6 }); |
| | | } else { |
| | | playSound(); |
| | | // $("#verifycode").click(); |
| | | //layer.msg(result.Message, { icon: 5 }); |
| | | layer.alert("æå
¥ä¸»è¡¨å¤±è´¥", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æµæ°´å·æ¹æ³åçé误!", { icon: 5 }); |
| | | return; |
| | | } |
| | | }); |
| | | for (var i = 0; i < datas.length; i++) { |
| | | var HitemID = datas[i].HitemID; |
| | | var HBillType = datas[i].HBillType; |
| | | if (HBillType != 3772) { |
| | | var HRemark = $("#HRemark").val(); |
| | | if (!HRemark) { |
| | | HRemark = "æ "; |
| | | } |
| | | $.ajax({//æå
¥å表 |
| | | url: GetWEBURL() + "/LEMS/SaveToSc_PackUnionBillSub", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HitemID": HitemID |
| | | , "HRemark": HRemark |
| | | }, |
| | | success: function (result) { |
| | | var data = result.data; |
| | | if (result.count == 1) { |
| | | //layer.msg("æ«ææå", { time: 5000, icon: 6 }); |
| | | } else { |
| | | playSound(); |
| | | // $("#verifycode").click(); |
| | | //layer.msg(result.Message, { icon: 5 }); |
| | | layer.alert("æå
¥å表失败", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æå
¥åè¡¨æ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | for (var i = 0; i < datas.length; i++) { |
| | | var HitemID = datas[i].HitemID |
| | | $.ajax({//æ´æ°temp表æ è®°åæ®µ |
| | | url: GetWEBURL() + "/LEMS/Update_Flag_HRelationInterID", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HitemID": HitemID |
| | | }, |
| | | success: function (result) { |
| | | var data = result.data; |
| | | if (result.count == 1) { |
| | | //layer.msg("æ«ææå", { time: 5000, icon: 6 }); |
| | | } else { |
| | | playSound(); |
| | | layer.alert("æå
¥ä¸»è¡¨å¤±è´¥", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æ´æ°æ è®°æ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | $("#HBarCode_White").val(""); |
| | | //åä»¶æ¡ç æ°éå·²æ«å® æ¡ç æ«å®å |
| | | if (pcmQty == pcmQtyFlag) { |
| | | $.ajax({//æ¥è¯¢åä»¶æ¡ç çå计æ°é |
| | | url: GetWEBURL() + "/LEMS/Select_Gy_BarCodeBill_HQty", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HBarCode": $("#HBarCode_wym").val() |
| | | }, |
| | | success: function (result) { |
| | | var AllHqty = result.data[0].HQty; |
| | | if (AllHqty == icmoQty) { |
| | | location.reload(); |
| | | return; |
| | | } |
| | | } |
| | | }) |
| | | //æ¸
ç©ºæ«æè®°å½çè£
ç®±æ°é |
| | | zxQtyFlag = 0; |
| | | pcmQtyFlag = 0; |
| | | $("#HMixedBox").val(""); |
| | | $("input[name='HMixedBox']").prop("checked", false); |
| | | form.render('checkbox'); |
| | | |
| | | //åæ¶æµè½¬å¡å·åªè¯»(åæ¶å伿°æ®éå¤) |
| | | //$("#HFbarcode").removeAttr("readonly", "readonly");//æµè½¬å¡å·åªè¯» |
| | | //$("#HFbarcode").css("background-color", "white"); |
| | | //$("#HFbarcode").css("box-shadow", "0 0 0 1px #00ff00"); |
| | | //è£
ç®±æ°é åå
æ ¼ 卿µè½¬å¡å·å车æ¶å å·²è¢«åæ¶åªè¯»ä»¥åæ·»å æ ·å¼ |
| | | //éæ°èµå¼è£
ç®±æ°éååä»¶æ¡ç æ°é å¼ä¸ºåæ¥çå¼ |
| | | $("#zxQty").val(pcmQty); |
| | | //åä»¶æ¡ç æ°é é»è®¤ä¸º = è£
ç®±æ°é ç¶åå
æ ç§»å¨å° "åä»¶æ¡ç " åå
æ ¼ |
| | | $("#pcmQty").val(pcmQty);//åä»¶æ¡ç æ°é é»è®¤ä¸º = è£
ç®±æ°é |
| | | //ç§»é¤åä»¶æ¡ç åªè¯» |
| | | $("#SubBarcode").removeAttr("readonly"); |
| | | $("#SubBarcode").css("background-color", "white"); |
| | | $("#SubBarcode").focus(); |
| | | $("#SubBarcode").css("box-shadow", "0 0 0 1px #00ff00"); |
| | | } |
| | | layer.confirm( |
| | | 'ä¿åæåï¼è¯·ç»§ç»éæ©æä½ï¼', |
| | | { |
| | | skin: 'layui-layer-lan', |
| | | closeBtn: 0, |
| | | btn: ['æ°å¢', 'å
³é'], |
| | | btn2: function () {//æ°å¢ |
| | | parent.layui.admin.events.closeThisTabs(); |
| | | } |
| | | }, function () {//å
³é |
| | | window.location.reload(); |
| | | } |
| | | ); |
| | | }); |
| | | |
| | | //失败æç¤ºé³ |
| | | function playSound() { |
| | | console.log("playSound"); |
| | | var audio = document.getElementById("cs"); |
| | | audio.play(); |
| | | } |
| | | |
| | | //éåºæé® |
| | | form.on('submit(Close)', function (data) {//éåº |
| | | layer.confirm('æ¨ç¡®å®è¦å
³éæ¬é¡µåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.layui.admin.events.closeThisTabs(); |
| | | }); |
| | | }); |
| | | |
| | | //æ°å¢æé® |
| | | form.on('submit(HAddBT)', function (data) {//éåº |
| | | layer.confirm('æ¨ç¡®å®è¦æ°å¢åï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | window.location.reload(); |
| | | }); |
| | | }); |
| | | |
| | | //æå°æé® |
| | | form.on('submit(Print2)', function (data) {//éåº |
| | | //æå¼æå°æ¨¡æ¿ |
| | | var linterid = $("#HInterID").val(); |
| | | //var linterid = "28973"; |
| | | //var Type = "HBarCodePrint"; |
| | | //var OpenTmp = "å
è£
åç©ææ è¯å¡(ç½é¡µç)"; |
| | | //var ReportViewer = document.getElementById("ReportViewer"); |
| | | //window.open("../../views/BaseSet/HBarPlanPrint.html?linterid=" + linterid.toString() + "&Type=" + Type.toString() + "&OpenTmp=" + OpenTmp.toString()); |
| | | |
| | | var sWhere = "select * from h_v_SRM_BarCodeBillList where HItemID in(" + linterid + ") order by ç©æä»£ç "; |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | |
| | | if (data.data.length != 0) { |
| | | var dataPrint = []; |
| | | dataPrint.push({ "产ååç§°": data.data[0]["产ååç§°"], "æ¡ç ç¼å·": data.data[0]["æ¡ç ç¼å·"], "æ°é": data.data[0]["æ°é"], "æ¥æ": data.data[0]["æ¥æ"], "ç产任å¡å": data.data[0]["ç产任å¡å"], "æµè½¬å¡ç¼å·": data.data[0]["æµè½¬å¡ç¼å·"], "èªå®ä¹å段": data.data[0]["èªå®ä¹å段"], "项ç®ç¼å·": data.data[0]["项ç®ç¼å·"] } |
| | | ); |
| | | |
| | | var Customer = { |
| | | "Table": dataPrint |
| | | } |
| | | |
| | | var report1 = ""; |
| | | var parintName = $("#PrintName").val(); |
| | | if (parintName == "æ¯è«å°") { |
| | | report1 = urlAddRandomNo("../../grf/å
è£
åç©ææ è¯å¡(ç½é¡µç).grf"); |
| | | } else { |
| | | report1 = urlAddRandomNo("../../grf/å
è£
åç©ææ è¯å¡(ç½é¡µç)2.grf"); |
| | | } |
| | | |
| | | var args = { |
| | | type: "print", |
| | | showOptionDlg: false, //妿䏿¾ç¤ºæå°å¯¹è¯æ¡èç´æ¥æå°ï¼å°æ¤è¡æ³¨é廿å³å¯ |
| | | report: report1, |
| | | data: Customer |
| | | }; |
| | | //var args = { |
| | | // report: urlAddRandomNo("../../views/grf/å
è£
åç©ææ è¯å¡(ç½é¡µç).grf"), |
| | | // data: Customer |
| | | //}; |
| | | webapp_ws_ajax_run(args); |
| | | } else { |
| | | layer.msg("æ¥æ æ°æ®!"); |
| | | } |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5 }); |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //æå°æé® |
| | | form.on('submit(Print)', function (data) {//éåº |
| | | //æå¼æå°æ¨¡æ¿ |
| | | var linterid = $("#HInterID").val(); |
| | | var Type = "HBarCodePrint"; |
| | | var OpenTmp = "ç½æ æå°1"; |
| | | //var ReportViewer = document.getElementById("ReportViewer"); |
| | | window.open("../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/HBarPlanPrint.html?linterid=" + linterid.toString() + "&Type=" + Type.toString() + "&OpenTmp=" + OpenTmp.toString()); |
| | | $("#Print2").click(); |
| | | }); |
| | | |
| | | //çå¬è¡¨æ ¼ä¸è¡å·¥å
·äºä»¶ |
| | | table.on('tool(smjl-table)', function (obj) { //注ï¼tool æ¯å·¥å
·æ¡äºä»¶åï¼test æ¯ table åå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | var data = obj.data //è·å¾å½åè¡æ°æ® |
| | | , layEvent = obj.event; //è·å¾ lay-event 对åºçå¼ |
| | | if (layEvent === 'detail') { |
| | | layer.msg('æ¥çæä½'); |
| | | } else if (layEvent === 'del') { |
| | | if (data.HBillType == "3772") { |
| | | layer.msg("æµè½¬å¡å·ä¸å
许å é¤ï¼"); |
| | | return; |
| | | } |
| | | layer.confirm('ççå é¤è¡ä¹', function (index) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/LEMS/DelProductionLinePackagingTable', |
| | | type: "GET", |
| | | data: { "sHInterID": data.HInterID, "HSourceBillNo": data.HSourceBillNo }, |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | zxQtyFlag--; |
| | | pcmQtyFlag-- |
| | | $("#zxQty").val("" + zxQtyFlag + "/" + zxQty + ""); |
| | | $("#pcmQty").val("" + pcmQtyFlag + "/" + pcmQty + ""); |
| | | layer.close(index); |
| | | obj.del(); //å é¤å¯¹åºè¡ï¼trï¼çDOMç»æ |
| | | $.ajax({//æ¥è¯¢æ¡ç æ¡£æ¡è¡¨éçééæ¡ç çå计æ°éæ¹æ³ |
| | | url: GetWEBURL() + "/LEMS/Select_Gy_BarCodeBill_HQty", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HBarCode": $("#HBarCode_wym").val() |
| | | }, |
| | | success: function (result) { |
| | | var HQty = result.data[0].HQty; |
| | | HQty--; |
| | | $.ajax({//æ´æ°æ¡ç æ¡£æ¡è¡¨éçééæ¡ç çå计æ°éæ¹æ³ |
| | | url: GetWEBURL() + "/LEMS/Update_Gy_BarCodeBill_HQty", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HBarCode": $("#HBarCode_wym").val(), |
| | | "HQty": HQty |
| | | }, |
| | | success: function (result) { |
| | | var HQty = result.data; |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æ´æ°æ¡ç æ¡£æ¡è¡¨éçééæ¡ç çå计æ°éæ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æ¥è¯¢æ¡ç æ¡£æ¡è¡¨éçééæ¡ç çå计æ°éæ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } else { |
| | | playSound(); |
| | | layer.alert(data.code + data.msg, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.msg("æ¥å£è¯·æ±å¤±è´¥!", { |
| | | icon: 5, btn: ['确认'], time: 100000, offset: 't', |
| | | skin: 'layui-layer-lan', title: "温馨æç¤º" |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | } else if (layEvent === 'edit') { |
| | | layer.msg('ç¼è¾æä½'); |
| | | } |
| | | }); |
| | | |
| | | //æµè½¬å¡å· å车äºä»¶ |
| | | function HFbarcodeKeydown() { |
| | | var HFbarcode = $('#HFbarcode').val(); |
| | | var HInterID = $("#HInterID").val(); |
| | | var HBillNo2 = $("#HBillNo2").val();//åæ®å· |
| | | |
| | | icmoQty = 20; |
| | | icmoQtyNow = 20; |
| | | // |
| | | $.ajax({//çæå¯ä¸ç |
| | | url: GetWEBURL() + "/LEMS/SaveBarCode_json", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "sHBarcodeNo": $("#HSourceBillNo").val(), |
| | | "sHMaterID": $("#HMaterID").val(), |
| | | "sHUnitID": $("#HUnitID").val(), |
| | | "sHMaterName": $("#HMaterName").val() |
| | | }, |
| | | success: function (result) { |
| | | var data = result.data; |
| | | if (data[0].HBarCode) { |
| | | $("#HBarCode_wym").val(data[0].HBarCode); |
| | | } else { |
| | | playSound(); |
| | | // $("#verifycode").click(); |
| | | //layer.msg(result.Message, { icon: 5 }); |
| | | layer.alert("æå
¥ä¸»è¡¨å¤±è´¥", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æ´æ°æ è®°æ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | // |
| | | $.ajax({//表头åtemp表 |
| | | url: GetWEBURL() + "/LEMS/SaveCirculationCard_Json_MXG", |
| | | type: "GET", |
| | | async: false, |
| | | data: { |
| | | "HBillNo": HFbarcode |
| | | , "HInterID": HInterID |
| | | , "HBillNo2": HBillNo2 |
| | | , "HBarCode": $("#HBarCode_wym").val() |
| | | , "HNumber": $("#HNumber").val() |
| | | , "HName": $("#HMaterName").val() |
| | | , "HModel": $("#HModel").val() |
| | | }, |
| | | success: function (result) { |
| | | var data = result.data; |
| | | if (data[0].Column1 == 1) { // 说æéªè¯æåäºï¼ |
| | | $("#HFbarcode").attr("readonly", "readonly");//æµè½¬å¡å·åªè¯» |
| | | $("#HFbarcode").css("background-color", "#efefef4d"); |
| | | $("#HFbarcode").css("box-shadow", "none"); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/LEMS/Update_HBillNo_SubBarcodeList_Json', |
| | | type: "GET", |
| | | data: { "HBillNo": HBillNo2 }, |
| | | async: false, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.data; |
| | | table.render(option); |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | } |
| | | , error: function () { |
| | | playSound(); |
| | | layer.close(index0); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } else { |
| | | playSound(); |
| | | // $("#verifycode").click(); |
| | | //layer.msg(result.Message, { icon: 5 }); |
| | | layer.alert("æ æ¤æµè½¬å¡å·ï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.alert("æ«æµè½¬å¡å·æ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //è·ååæ®å· |
| | | function getBillno() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HBillType": '3783' }, |
| | | success: function (d) { |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo2").val(d.data[0].HBillNo); |
| | | layer.closeAll("loading"); |
| | | }, error: function () { |
| | | playSound(); |
| | | layer.closeAll("loading"); |
| | | layer.alert("è·ååæ®å·å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //以ä¸ä¸ºlayui模å |
| | | }); |
| | | |
| | | function GetHWorkerValue(obj) { //è¿åæ¥æ¶äºº |
| | | $("#Operator").val(obj[0].HName); |
| | | $("#OperatorID").val(obj[0].HNumber); |
| | | $("#Operator").css("box-shadow", "none"); |
| | | if ($("#ProductionTeam").val()) { |
| | | $("#ProductionTeam").css("box-shadow", "none"); |
| | | } else { |
| | | $("#ProductionTeam").css("box-shadow", "0 0 1px 2px #00ff00"); |
| | | } |
| | | } |
| | | |
| | | function GetProductionTeamValue(obj) { //è¿åç产çç» |
| | | $("#ProductionTeam").val(obj[0].çç»); |
| | | $("#ProductionTeamID").val(obj[0].çç»ä»£ç ); |
| | | $("#ProductionTeam").css("box-shadow", "none"); |
| | | if ($("#ProductionResources").val()) { |
| | | $("#ProductionResources").css("box-shadow", "none"); |
| | | } else { |
| | | $("#ProductionResources").css("box-shadow", "0 0 1px 2px #00ff00"); |
| | | } |
| | | } |
| | | |
| | | function GetProductionResourcesValue(obj) { //è¿åçäº§èµæº |
| | | if ($("#ProductionResources").val()) { |
| | | $("#ProductionResources").css("box-shadow", "none"); |
| | | } |
| | | $("#ProductionResources").val(obj[0].çäº§èµæº); |
| | | $("#ProductionResourcesID").val(obj[0].çäº§èµæºä»£ç ); |
| | | $("#ProductionResources").css("box-shadow", "none"); |
| | | } |
| | | |
| | | |
| | | function GetOrgValue(obj) //è¿åç产ç»ç» |
| | | { |
| | | $("#HOrganization").val(obj[0].HName); |
| | | $("#HOrganizationID").val(obj[0].HNumber); |
| | | } |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |