| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æµè½¬å¡æ°é</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HProcExchQty" id="HProcExchQty" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HProcExchQty" id="HProcExchQty" style="background-color:#efefef4d;" readonly value="1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <!--<table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>--> |
| | | <div class="layui-tab layui-tab-card"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">æ£éªé¡¹ç®</li> |
| | | <li>æ½æ ·æ£éª</li> |
| | | <li>æ£æµå¼</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <!--æ£éªé¡¹ç®--> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <!--æ½æ ·æ£éª--> |
| | | <div class="layui-row" style="margin-bottom:15px;margin-left:30px"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_FirstRow" id="btn_FirstRow"><span style="font-weight:bold">é¦è¡</span></button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_PreviousRow" id="btn_PreviousRow"><i class="layui-icon layui-icon-prev"></i></button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_NextRow" id="btn_NextRow"><i class="layui-icon layui-icon-next"></i></button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_LastRow" id="btn_LastRow"><span style="font-weight:bold">æ«è¡</span></button> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">项ç®åºå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HEntryID" id="HEntryID" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">æ£éªé¡¹ç®</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" name="HQCCheckItemName" id="HQCCheckItemName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchCheckItemID" id="btnSearchCheckItemID" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <input type="hidden" name="HQCCheckItemID" id="HQCCheckItemID" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline" style="border-bottom:2px solid #9C9C9C;width:260px;margin-left:30px"> |
| | | <label class="layui-form-label" style="width: 65px;height:5px;box-shadow:inset 95px 0px 5px 1px #9C9C9C;"> |
| | | <span style="text-align:center;margin-right:2.8px;color:white">æ½æ ·æ¹æ¡</span> |
| | | </label> |
| | | </div> |
| | | <div class="layui-inline" style="border-bottom:2px solid #9C9C9C;width:260px;margin-left:70px"> |
| | | <label class="layui-form-label" style="width: 65px;height:5px;box-shadow:inset 95px 0px 5px 1px #9C9C9C;"> |
| | | <span style="text-align:center;margin-right:2.8px;color:white">æ½æ ·æ£éª</span> |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">æ½æ ·æ¹æ¡</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" name="HSampleSchemeName" id="HSampleSchemeName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchCheckSampleScheme" id="btnSearchCheckSampleScheme" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <input type="hidden" name="HSampleSchemeID" id="HSampleSchemeID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æ ·æ¬é</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HSampleQty" id="HSampleQty" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æ ·æ¬ç ´åæ°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HSampleDamageQty" id="HSampleDamageQty" style=""> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æ½æ ·ç±»å</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HSamplingType" id="HSamplingType" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å
许æ°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HAcceptQty" id="HAcceptQty" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æ£éªç»æ</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HResult" lay-filter="HResult" style="width:190px;"> |
| | | <option value="åæ ¼" selected="selected">åæ ¼</option> |
| | | <option value="ä¸åæ ¼">ä¸åæ ¼</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æ£éªæ°´å¹³</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HInspectionLevel" id="HInspectionLevel" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æç»æ°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HRejectQty" id="HRejectQty" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">éç¹æ£æ¥</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="checkbox" name="HKeyInspect" id="HKeyInspect" value="false" lay-skin="primary" lay-filter="HKeyInspect"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ä¸¥æ ¼åº¦</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HStrictness" id="HStrictness" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æ ·æ¬ä¸åæ ¼æ°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HSampleUnRightQty" id="HSampleUnRightQty" style=""> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">AQL</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HAQL" id="HAQL" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--<table class="layui-hide" id="samplingTable" lay-filter="samplingTable"></table>--> |
| | | </div> |
| | | <div class="layui-tab-item" style="height:590px"> |
| | | <!--æ£æµå¼--> |
| | | <div class="layui-row" style="margin-bottom:15px;margin-left:30px"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_FirstRow" id="btn_FirstRow"><span style="font-weight:bold">é¦è¡</span></button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_PreviousRow" id="btn_PreviousRow"><i class="layui-icon layui-icon-prev"></i></button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_NextRow" id="btn_NextRow"><i class="layui-icon layui-icon-next"></i></button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="btn_LastRow" id="btn_LastRow"><span style="font-weight:bold">æ«è¡</span></button> |
| | | </div> |
| | | <div class="left" style="width:50%;height:450px;float:left;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">项ç®åºå·</label> |
| | | <div class="layui-input-block" style="margin-left: 100px;"> |
| | | <input type="text" class="layui-input" name="HEntryID" id="HEntryID" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">æ ·æ¬é</label> |
| | | <div class="layui-input-block" style="margin-left: 100px;"> |
| | | <input type="text" class="layui-input" name="HSampleQty" id="HSampleQty" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">æ£éªé¡¹ç®</label> |
| | | <div class="layui-input-block" style="margin-left: 45px;"> |
| | | <input type="text" class="layui-input" name="HQCCheckItemName" id="HQCCheckItemName" style="background-color:#efefef4d;width: 53%;float:left;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchCheckItemID" id="btnSearchCheckItemID" style="float: left;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <input type="hidden" name="HQCCheckItemID" id="HQCCheckItemID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px !important;">æ£éªç»æ</label> |
| | | <div class="layui-input-block" style="margin-left: 100px; width: 182px"> |
| | | <select name="HInspectResult" lay-filter="HInspectResult"> |
| | | <option value="åæ ¼" selected="selected">åæ ¼</option> |
| | | <option value="ä¸åæ ¼">ä¸åæ ¼</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">æ ·æ¬ä¸åæ ¼æ°</label> |
| | | <div class="layui-input-block" style="margin-left: 100px;"> |
| | | <input type="text" class="layui-input" name="HSampleUnRightQty" id="HSampleUnRightQty" value="0" style=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">éç¹æ£æ¥</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="checkbox" name="HKeyInspect" id="HKeyInspect2" value="false" lay-skin="primary" lay-filter="HKeyInspect"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline" style="border-bottom:2px solid #9C9C9C;width:290px;margin-left:10px"> |
| | | <label class="layui-form-label" style="width: 65px;height:5px;box-shadow:inset 95px 0px 5px 1px #9C9C9C;"> |
| | | <span style="text-align:center;margin-right:2.8px;color:white">ææ </span> |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px !important;">åææ¹æ³</label> |
| | | <div class="layui-input-block" style="margin-left: 100px; width: 182px"> |
| | | <select name="HAnalysisMethod" lay-filter="HAnalysisMethod"> |
| | | <option value="åæ ¼" selected="selected">åæ ¼</option> |
| | | <option value="ä¸åæ ¼">ä¸åæ ¼</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px !important;">ç¶æ</label> |
| | | <div class="layui-input-block" style="margin-left: 100px; width: 182px"> |
| | | <select name="HStatus" lay-filter="HStatus"> |
| | | <option value="åæ ¼" selected="selected">åæ ¼</option> |
| | | <option value="ä¸åæ ¼">ä¸åæ ¼</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px !important;">æ¯è¾ç¬¦</label> |
| | | <div class="layui-input-block" style="margin-left: 100px; width: 182px"> |
| | | <select name="HComparator" lay-filter="HComparator"> |
| | | <option value="çäº" selected="selected">=</option> |
| | | <option value="大äº">></option> |
| | | <option value="å°äº"><</option> |
| | | <option value="大äºçäº">>=</option> |
| | | <option value="å°äºçäº"><=</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">åä½</label> |
| | | <div class="layui-input-block" style="margin-left: 45px;"> |
| | | <input type="text" class="layui-input" name="HUnit" id="HUnit" style="background-color:#efefef4d;width: 53%;float:left;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchUnit" id="btnSearchUnit" style="float: left;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <input type="hidden" name="HUnitID" id="HUnitID" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">*æ£éªå¼</label> |
| | | <div class="layui-input-block" style="margin-left: 45px;"> |
| | | <input type="text" class="layui-input" name="HInspectValBName" id="HInspectValBName" style="background-color:#efefef4d;width: 53%;float:left;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchInspectValB" id="btnSearchInspectValB" style="float: left;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <input type="hidden" name="HInspectValB" id="HInspectValB" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">*ç®æ å¼</label> |
| | | <div class="layui-input-block" style="margin-left: 45px;"> |
| | | <input type="text" class="layui-input" name="HTargetValBName" id="HTargetValBName" style="background-color:#efefef4d;width: 53%;float:left;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchTargetValB" id="btnSearchTargetValB" style="float: left;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <input type="hidden" name="HTargetValB" id="HTargetValB" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">ä¸éå¼</label> |
| | | <div class="layui-input-block" style="margin-left: 100px;"> |
| | | <input type="text" class="layui-input" name="HUpLimit" id="HUpLimit" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">ä¸éå¼</label> |
| | | <div class="layui-input-block" style="margin-left: 100px;"> |
| | | <input type="text" class="layui-input" name="HDownLimit" id="HDownLimit" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">ä¸åå·®</label> |
| | | <div class="layui-input-block" style="margin-left: 100px;"> |
| | | <input type="text" class="layui-input" name="HUpOffSet" id="HUpOffSet" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">ä¸åå·®</label> |
| | | <div class="layui-input-block" style="margin-left: 100px;"> |
| | | <input type="text" class="layui-input" name="HDownOffSet" id="HDownOffSet" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="right" style="width:50%;height:450px;float:left;"> |
| | | <table class="layui-hide" id="ValueTable" lay-filter="ValueTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>å¢å ä¸è¡</button> |
| | |
| | | <script type="text/html" id="HResult"> |
| | | <select name="HResult" lay-filter="HResult" id="HResult{{d.LAY_TABLE_INDEX+1}}"> |
| | | <option value="">è¯·éæ©</option> |
| | | <option value="1">åæ ¼</option> |
| | | <option value="2">ä¸åæ ¼</option> |
| | | </select> |
| | | </script> |
| | | <!--è¡ä¸æéæ©(æ£éªç»æ)--> |
| | | <script type="text/html" id="HInSpectResult"> |
| | | <select name="HInSpectResult" lay-filter="HInSpectResult" id="HInSpectResult{{d.LAY_TABLE_INDEX+1}}"> |
| | | <option value="">è¯·éæ©</option> |
| | | <option value="åæ ¼">åæ ¼</option> |
| | | <option value="ä¸åæ ¼">ä¸åæ ¼</option> |
| | | </select> |
| | | </script> |
| | | <!--è¡ä¸æéæ©(åææ¹æ³)--> |
| | | <script type="text/html" id="HAnalysisMethod"> |
| | | <select name="HAnalysisMethod" lay-filter="HAnalysisMethod" id="HAnalysisMethod{{d.LAY_TABLE_INDEX+1}}"> |
| | | <option value="">è¯·éæ©</option> |
| | | <option value="1">宿§åæ</option> |
| | | <option value="2">å®éåæ</option> |
| | | <option value="3">å
¶ä»åæ</option> |
| | | </select> |
| | | </script> |
| | | <!--å¤éæ¡ï¼éç¹æ£æ¥ï¼--> |
| | | <script type="text/html" id="HKeyInspect_Sub"> |
| | | <!-- è¿éç checked çç¶æåªæ¯æ¼ç¤º --> |
| | | <input type="checkbox" name="HKeyInspect" value="{{d.HKeyInspect}}" lay-skin="primary" id="HKeyInspect{{d.LAY_TABLE_INDEX+1}}" lay-filter="HKeyInspect" {{ d.HKeyInspect == 1 ? 'checked' : '' }}> |
| | | </script> |
| | | <script> |
| | | |
| | |
| | | //å
¬ç¨åé |
| | | var rowdata = []; |
| | | var option = []; |
| | | var rowdata_Value = []; |
| | | var option_Value = []; |
| | | |
| | | var option_Check = [];//ç¨æ¥å卿£éªé¡¹ç® |
| | | var Array = []; //å
¨å±åéï¼æå¤é¢çä¸å±æ°ç»,å卿£æµå¼ |
| | | var checkobj = ""; //å¤éæ¡ |
| | | |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | //if (sessionStorage.login != "login") { |
| | |
| | | if (OperationType == 1) { |
| | | $("#HInterID").val(""); |
| | | $("#HBillNo").val(""); |
| | | $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);//ææºåæ¶ä¿åæé®ç¦ç¨ |
| | | //$('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);//ææºåæ¶ä¿åæé®ç¦ç¨ |
| | | //è·åæå¤§åæ®å· |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cj_StationInBill/get_Display', |
| | | type: "GET", |
| | | data: { "sWhere": "and HInterID = " + linterid, "user": sessionStorage["HUserName"]}, |
| | | data: { "sWhere": "and HInterID = " + linterid, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | var data = result.data[0]; |
| | | if (result.count == 1) { |
| | |
| | | , data = checkStatus.data; |
| | | //æ°å¢è¡è¡¨æ ¼æ°æ® |
| | | var NewRow = { |
| | | "HQCCheckItemID": "", "æ£éªé¡¹ç®": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HResult": "", |
| | | "HQCCheckItemID": "", "æ£éªé¡¹ç®": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "", |
| | | "HMax": "", "HMin": "", "HAvg": "", "HRemark": "" |
| | | }; |
| | | switch (obj.event) { |
| | |
| | | table.render(option); |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HResult' + i + '').find("option[value='" + option.data[i - 1].HResult + "']").attr("selected", true); |
| | | $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | break; |
| | |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HResult' + i + '').find("option[value='" + option.data[i - 1].HResult + "']").attr("selected", true); |
| | | $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | } |
| | |
| | | |
| | | //æ°å¢æé® |
| | | form.on('submit(btn-AddNew)', function (data) { |
| | | window.location.reload(); |
| | | layer.confirm('æ°å¢å页颿°æ®å°æ¶å¤±ï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | location.replace('QC_Add_Edit_FirstPieceCheckBill.html?OperationType=1&linterid=&HSouceBillType=0&closeType=2'); |
| | | }); |
| | | }); |
| | | |
| | | //é¦è¡æé® |
| | | form.on('submit(btn_FirstRow)', function (data) { |
| | | if ($("#HEntryID").val() == 1) { |
| | | layer.msg("å½åå·²æ¯é¦è¡"); |
| | | } |
| | | |
| | | if (option_Check.length > 0) { |
| | | $("[name='HEntryID']").attr("value", 1); |
| | | $("[name='HQCCheckItemID']").attr("value", option_Check[0].HQCCheckItemID); |
| | | $("[name='HQCCheckItemName']").attr("value", option_Check[0].æ£éªé¡¹ç®); |
| | | } else { |
| | | layer.msg("å½åå·²æ¯é¦è¡"); |
| | | } |
| | | }); |
| | | |
| | | //æ«è¡æé® |
| | | form.on('submit(btn_LastRow)', function (data) { |
| | | if ($("#HEntryID").val() == option_Check.length) { |
| | | layer.msg("å½åå·²æ¯æ«è¡"); |
| | | return; |
| | | } |
| | | |
| | | if (option_Check.length > 0) { |
| | | $("[name='HEntryID']").attr("value", option_Check.length); |
| | | $("[name='HQCCheckItemID']").attr("value", option_Check[option_Check.length - 1].HQCCheckItemID); |
| | | $("[name='HQCCheckItemName']").attr("value", option_Check[option_Check.length - 1].æ£éªé¡¹ç®); |
| | | } else { |
| | | layer.msg("å½åå·²æ¯æ«è¡"); |
| | | return; |
| | | } |
| | | }); |
| | | |
| | | //ä¸ä¸è¡æé® |
| | | form.on('submit(btn_PreviousRow)', function (data) { |
| | | if ($("#HEntryID").val() == 1 || $("#HEntryID").val() == 0) { |
| | | layer.msg("å½åå·²æ¯é¦è¡"); |
| | | return; |
| | | } |
| | | |
| | | if (option_Check.length > 0) { |
| | | $("[name='HEntryID']").attr("value", $("#HEntryID").val() - 1); |
| | | $("[name='HQCCheckItemID']").attr("value", option_Check[$("#HEntryID").val() - 1].HQCCheckItemID); |
| | | $("[name='HQCCheckItemName']").attr("value", option_Check[$("#HEntryID").val() - 1].æ£éªé¡¹ç®); |
| | | } |
| | | }); |
| | | |
| | | //ä¸ä¸è¡æé® |
| | | form.on('submit(btn_NextRow)', function (data) { |
| | | if ($("#HEntryID").val() == option_Check.length) { |
| | | layer.msg("å½åå·²æ¯æ«è¡"); |
| | | return; |
| | | } |
| | | |
| | | if (option_Check.length > 0) { |
| | | $("[name='HEntryID']").attr("value", Number($("#HEntryID").val()) + 1); |
| | | $("[name='HQCCheckItemID']").attr("value", option_Check[$("#HEntryID").val() - 1].HQCCheckItemID); |
| | | $("[name='HQCCheckItemName']").attr("value", option_Check[$("#HEntryID").val() - 1].æ£éªé¡¹ç®); |
| | | } |
| | | }); |
| | | |
| | | //éåº |
| | | function get_Exit() { |
| | | if (OperationType == 1) { |
| | | parent.layui.admin.events.closeThisTabs(); |
| | | } else if (OperationType == 2) { |
| | | var index = parent.layer.getFrameIndex(window.name); |
| | | parent.layer.close(index); |
| | | } else if (OperationType == 3) { |
| | | var index = parent.layer.getFrameIndex(window.name); |
| | | parent.layer.close(index); |
| | | } |
| | | Pub_Close(1); |
| | | |
| | | //if (OperationType == 1) { |
| | | // parent.layui.admin.events.closeThisTabs(); |
| | | //} else if (OperationType == 2) { |
| | | // var index = parent.layer.getFrameIndex(window.name); |
| | | // parent.layer.close(index); |
| | | //} else if (OperationType == 3) { |
| | | // var index = parent.layer.getFrameIndex(window.name); |
| | | // parent.layer.close(index); |
| | | //} |
| | | } |
| | | |
| | | //è¡å
äºä»¶ |
| | |
| | | |
| | | //ä¿å |
| | | function set_SaveBill(data) { |
| | | console.log($("#HKeyInspect").val()); |
| | | console.log($("#HKeyInspect2").val()); |
| | | return; |
| | | if ($("#HICMOQty").val() == "" || $("#HICMOQty").val() <= 0) { |
| | | layer.msg("ä»»å¡åæ°éä¸è½ä¸ºç©ºä¸ä¸è½å°äºçäº0ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | |
| | | } |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"] ; |
| | | var sSubValue = JSON.stringify(table.cache['ValueTable']); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"] + ';' + sSubValue; |
| | | |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | |
| | | |
| | | //ç¼è¾æ¶å 载表头 |
| | | function RoadBillMain(linterid) { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetPonderationBill", |
| | | url: GetWEBURL() + "/GetQC_FirstPieceCheckDetail", |
| | | type: "GET", |
| | | data: { "HInterID": linterid }, |
| | | success: function (d) { |
| | | // console.log(d.data); |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | data: { "HID": linterid }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data.h_v_QC_Edit_FirstPieceCheckBillList[0]; |
| | | |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HBillNo": data.åæ®å· |
| | | , "HDate": formatDate(data.æ¥æ) |
| | | , "HSourceID": data.çäº§èµæºID |
| | | , "HSourceName": data.çäº§èµæºåç§° |
| | | , "HICMOBillNo": data.HICMOBillNo |
| | | , "HICMOQty": data.HICMOQty |
| | | , "HICMOInterID": data.HICMOInterID |
| | | , "HICMOEntryID": data.HICMOEntryID |
| | | , "HMaterID": data.产åID |
| | | , "HProcExchQty": data.HProcExchQty |
| | | , "HProcExchBillNo": data.HProcExchBillNo |
| | | , "HProcExchInterID": data.HProcExchInterID |
| | | , "HProcExchEntryID": data.HProcExchEntryID |
| | | , "HFirstCheckEmp": data.æ£éªåID |
| | | , "HFirstCheckEmpName": data.æ£éªååç§° |
| | | |
| | | //, "HQCCheckProjectID": data.HManagerID |
| | | //, "HPSStyleID": data.HPSStyleID |
| | | |
| | | , "HRemark": data.è¡¨å¤´å¤æ³¨ |
| | | //, "HSSID": data.HSSID |
| | | |
| | | , "HMaker": data.å¶å人 |
| | | , "HMakeDate": data.å¶åæ¥æ |
| | | , "HChecker": data.å®¡æ ¸äºº |
| | | , "HCheckDate": data.å®¡æ ¸æ¥æ |
| | | , "HCloseMan": data.å
³é人 |
| | | , "HCloseDate": data.å
³éæ¥æ |
| | | , "HUpDateDate": data.ä¿®æ¹æ¥æ |
| | | , "HDeleteDate": data.ä½åºæ¥æ |
| | | }); |
| | | data = result.data.h_v_QC_Edit_FirstPieceCheckBillList; |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | "HQCCheckItemID": data[i].HQCCheckItemID, "æ£éªé¡¹ç®": data[i].æ£éªé¡¹ç®åç§°, "HQCStd": data[i].HQCStd, "HUnit": data[i].HUnit, "HQCNote": data[i].HQCNote, "HResult": data[i].HResult, |
| | | "HMax": data[i].HMax, "HMin": data[i].HMin, "HAvg": data[i].HAvg, "HRemark": data[i].HRemark |
| | | } |
| | | ) |
| | | } |
| | | |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | for (let j = 0; j < data.length; j++) { |
| | | $("#HResult" + (j + 1)).val(data[j].HResult) |
| | | } |
| | | form.render('select'); |
| | | |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //#region æ¶é´è½¬æ¢ |
| | | function formatDate(date) { |
| | | var d = new Date(date), |
| | | month = '' + (d.getMonth() + 1), |
| | | day = '' + d.getDate(), |
| | | year = d.getFullYear(); |
| | | |
| | | if (month.length < 2) month = '0' + month; |
| | | if (day.length < 2) day = '0' + day; |
| | | |
| | | return [year, month, day].join('-'); |
| | | } |
| | | //#endregion |
| | | |
| | | //è¡¨å¤´ä¿¡æ¯æ£éªæ¹æ¡å¼¹çª |
| | | form.on('submit(btnSearchCheckProject)', function () { |
| | |
| | | }); |
| | | }); |
| | | |
| | | //表ä½ä¿¡æ¯æ£éªé¡¹ç®å¼¹çª |
| | | form.on('submit(btnSearchCheckItemID)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ£éªé¡¹ç®å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_CheckItem.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HQCCheckProjectID").val(checkStatus.data[0].HItemID); |
| | | $("#HQCCheckProjectName").val(checkStatus.data[0].æ¹æ¡åç§°); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //表ä½ä¿¡æ¯åä½å¼¹çª |
| | | form.on('submit(btnSearchUnit)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'åä½å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_UnitList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HUnitID").val(checkStatus.data[0].HItemID); |
| | | $("#HUnit").val(checkStatus.data[0].HName); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //表ä½ä¿¡æ¯åä½å¼¹çª |
| | | form.on('submit(btnSearchInspectValB)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ£éªå¼å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_InspectValueList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HInspectValB").val(checkStatus.data[0].hmainid); |
| | | $("#HInspectValBName").val(checkStatus.data[0].æ£éªå¼åç§°); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //表ä½ä¿¡æ¯åä½å¼¹çª |
| | | form.on('submit(btnSearchTargetValB)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ç®æ å¼å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_InspectValueList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HTargetValB").val(checkStatus.data[0].hmainid); |
| | | $("#HTargetValBName").val(checkStatus.data[0].æ£éªå¼åç§°); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //表ä½ä¿¡æ¯æ½æ ·æ¹æ¡å¼¹çª |
| | | form.on('submit(btnSearchCheckSampleScheme)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ½æ ·æ¹æ¡å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_SampleSchemeListView.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HSampleSchemeID").val(checkStatus.data[0].hmainid); |
| | | $("#HSampleSchemeName").val(checkStatus.data[0].æ½æ ·æ¹æ¡åç§°); |
| | | $("#HSamplingType").val(checkStatus.data[0].æ½æ ·ç±»å); |
| | | $("#HInspectionLevel").val(checkStatus.data[0].æ£éªæ°´å¹³); |
| | | $("#HStrictness").val(checkStatus.data[0].ä¸¥æ ¼åº¦); |
| | | $("#HAQL").val(checkStatus.data[0].AQL); |
| | | $("#HSampleQty").val(checkStatus.data[0].æ ·æ¬é); |
| | | $("#HAcceptQty").val(checkStatus.data[0].å
许æ°); |
| | | |
| | | $("#HRejectQty").val(checkStatus.data[0].æç»æ°); |
| | | $("#HUpLimit").val(checkStatus.data[0].ä¸éå¼); |
| | | $("#HDownLimit").val(checkStatus.data[0].ä¸éå¼); |
| | | |
| | | rowdata_Value = []; |
| | | for (let i = 1; i <= checkStatus.data[0].æ ·æ¬é; i++) { |
| | | rowdata_Value.push({ |
| | | "HSEQ": i, "HInSpectResult": "", "HInSpectValueB": "", "HInSpectValueT": "", "HInSpectValue": "", "rowNum": $("#HEntryID").val() |
| | | }); |
| | | } |
| | | option_Value.data = rowdata_Value; |
| | | table.render(option_Value); |
| | | console.log($("#HEntryID").val()); |
| | | console.log(checkStatus.data); |
| | | console.log(option.data); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | function get_CheckItem() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetCheckItemByCheckProjectID", |
| | |
| | | success: function (result) { |
| | | option.data = result.data; |
| | | table.render(option); |
| | | |
| | | for (var i = 1; i <= result.data.length; i++) { |
| | | $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true); |
| | | $('#HResult' + i + '').find("option[value='" + option.data[i - 1].HResult + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | |
| | | option_Check = result.data; |
| | | |
| | | $("[name='HEntryID']").attr("value", result.data.length); |
| | | $("[name='HQCCheckItemID']").attr("value", result.data[result.data.length - 1].HQCCheckItemID); |
| | | $("[name='HQCCheckItemName']").attr("value", result.data[result.data.length - 1].æ£éªé¡¹ç®); |
| | | //é»è®¤é䏿åä¸è¡ |
| | | $("tr[data-index = " + (result.data.length - 1) + "] .layui-form-checkbox").click(); |
| | | //$("tr[data-index = " + (result.data.length - 1) + "] .layui-form-checkbox").addClass('layui-form-checked'); |
| | | $("tr[data-index = " + (result.data.length - 1) + "] ").attr({ "style": "background:#ceedfa;color:black" }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§è¡¨æ ¼æ°æ® |
| | | rowdata = [{ |
| | | "HQCCheckItemID": "", "æ£éªé¡¹ç®": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HResult": "", |
| | | "HMax": "", "HMin": "", "HAvg": "", "HRemark": "" |
| | | "HQCCheckItemID": "", "æ£éªé¡¹ç®": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "", |
| | | "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": false |
| | | }]; |
| | | option = { |
| | | elem: '#mainTable' |
| | |
| | | , cellMinWidth: 150 |
| | | , cols: [[ //表头 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', totalRow: true } |
| | | , { field: 'HQCCheckItemID', title: 'HQCCheckItemID', hide: true } |
| | | , { field: 'æ£éªé¡¹ç®', title: 'æ£éªé¡¹ç®', edit: 'text', event: 'HQCCheckItemID' } |
| | | , { field: 'HResult', title: 'ç»è®º', templet: '#HResult' } |
| | | , { field: 'HAnalysisMethod', title: 'åææ¹æ³', templet: '#HAnalysisMethod' } |
| | | , { field: 'HKeyInspect', title: 'éç¹æ£æ¥', templet: '#HKeyInspect_Sub', unresize: false } |
| | | , { field: 'HQCStd', title: 'æ£éªæ å', edit: 'text' } |
| | | , { field: 'HUnit', title: 'åä½', edit: 'text' } |
| | | , { field: 'HQCNote', title: 'æ£éªè®°å½', edit: 'text' } |
| | | , { field: 'HResult', title: 'ç»è®º', templet: '#HResult' } |
| | | , { field: 'HMax', title: 'æå¤§å¼', edit: 'text' } |
| | | , { field: 'HMin', title: 'æå°å¼', edit: 'text' } |
| | | , { field: 'HAvg', title: 'å¹³åå¼', edit: 'text', totalRow: true } |
| | |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TNDEX == dataIndex) { |
| | | $cr.find('input').val(value.HResult); |
| | | $cr.find('input').val(value.HAnalysisMethod); |
| | | } |
| | | }); |
| | | }); |
| | |
| | | //å è½½ç©ºè¡¨æ ¼ |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | |
| | | //åå§è¡¨æ ¼æ°æ® |
| | | rowdata_Value = [{ |
| | | "HSEQ": "0", "HInSpectResult": "", "HInSpectValueB": "", "HInSpectValueT": "", "HInSpectValue": "" |
| | | }]; |
| | | option_Value = { |
| | | elem: '#ValueTable' |
| | | //, toolbar: '#toolbarDemo_Value' |
| | | , limit: 500 //æ¯é¡µé»è®¤æ¾ç¤ºçæ°é |
| | | , height: 'full-50' |
| | | , cellMinWidth: 150 |
| | | , cols: [[ //表头 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { field: 'HSEQ', title: 'åºå·' } |
| | | , { field: 'HInSpectResult', title: 'æ£éªç»æ', templet: '#HInSpectResult' } |
| | | , { field: 'HInSpectValueB', title: 'æ£æµå¼ï¼å®æ§ï¼', edit: 'text' } |
| | | , { field: 'HInSpectValue', title: 'æ£æµå¼ï¼å®éï¼', edit: 'text' } |
| | | , { field: 'HInSpectValueT', title: 'æ£æµå¼ï¼å
¶ä»ï¼', edit: 'text' } |
| | | //, { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]] |
| | | , done: function (res, curr, count) { |
| | | option_Value.data = res.data; |
| | | //廿䏿æ¡å¤±ç¦äºä»¶å¦åå¨ä¸ææ¡éè¾å
¥å¼ |
| | | $('.layui-form-select').find('input').unbind("blur"); |
| | | //è¡¨æ ¼éè½½åæ¾ä¸ææ¡éçæ°æ® |
| | | $('tr').each(function (e) { |
| | | var $cr = $(this); |
| | | var dataIndex = $cr.attr("data-index"); |
| | | $.each(option_Value.data, function (index, value) { |
| | | if (value.LAY_TNDEX == dataIndex) { |
| | | $cr.find('input').val(value.HInSpectResult); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | , text: { |
| | | none: 'æ æ°æ®ï¼' |
| | | } |
| | | }; |
| | | //å è½½ç©ºè¡¨æ ¼ |
| | | option_Value.data = rowdata_Value; |
| | | table.render(option_Value); |
| | | } |
| | | |
| | | //è¡éæ©å¤çï¼ç»è®ºï¼ |
| | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //è¡éæ©å¤çï¼æ£éªç»æï¼ |
| | | form.on('select(HInSpectResult)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HInSpectResult = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //è¡éæ©å¤çï¼åææ¹æ³ï¼ |
| | | form.on('select(HAnalysisMethod)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HAnalysisMethod = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | |
| | | if (data.value == 1) { //妿éä¸å®æ§åæï¼åéèå®éãå
¶ä»åæ |
| | | option_Value.cols[0][3].hide = false; //宿§ |
| | | option_Value.cols[0][4].hide = true; //å®é |
| | | option_Value.cols[0][5].hide = true; //å
¶ä» |
| | | } else if (data.value == 2) { //妿éä¸å®éåæï¼åéè宿§ãå
¶ä»åæ |
| | | option_Value.cols[0][4].hide = false; //å®é |
| | | option_Value.cols[0][3].hide = true; //宿§ |
| | | option_Value.cols[0][5].hide = true; //å
¶ä» |
| | | } else if (data.value == 3) { //妿éä¸å
¶ä»åæï¼åéèå®éã宿§åæ |
| | | option_Value.cols[0][5].hide = false; //å
¶ä» |
| | | option_Value.cols[0][3].hide = true; //宿§ |
| | | option_Value.cols[0][4].hide = true; //å®é |
| | | } |
| | | table.render(option_Value); |
| | | }); |
| | | |
| | | |
| | | //çå¬ä¸ææ¡ç¼è¾ |
| | | form.on('select(HResult)', function (data) { |
| | | //è·åå½åè¡tr对象 |
| | | var elem = data.othis.parents('tr'); |
| | | //第ä¸åç弿¯Guidï¼åguidæ¥å¤æ |
| | | var Guid = elem.first().find('td').eq(1).text(); |
| | | //éæ©çselect对象å¼ï¼ |
| | | var selectValue = data.value; |
| | | //$("#HInSpectResult" + Guid).val(selectValue); |
| | | $("[name='HResult']").val(selectValue); |
| | | $("[name='HInspectResult']").val(selectValue); |
| | | form.render('select'); |
| | | }) |
| | | |
| | | //çå¬ä¸ææ¡ç¼è¾ |
| | | form.on('select(HInspectResult)', function (data) { |
| | | //è·åå½åè¡tr对象 |
| | | var elem = data.othis.parents('tr'); |
| | | //第ä¸åç弿¯Guidï¼åguidæ¥å¤æ |
| | | var Guid = elem.first().find('td').eq(1).text(); |
| | | //éæ©çselect对象å¼ï¼ |
| | | var selectValue = data.value; |
| | | //$("#HInSpectResult" + Guid).val(selectValue); |
| | | $("[name='HResult']").val(selectValue); |
| | | form.render('select'); |
| | | }) |
| | | |
| | | //æ¯å¦éç¹æ£æ¥ |
| | | form.on('checkbox(HKeyInspect)', function (data) { |
| | | //$("#HKeyInspect").val(data.elem.checked); |
| | | $("[name='HKeyInspect']").attr("value", data.elem.checked); |
| | | |
| | | if ($("#HKeyInspect").val() == 'true') { |
| | | //$("[name='HKeyInspect']").attr("checked", true); |
| | | $("[name='HKeyInspect']").prop("checked", true); |
| | | } else { |
| | | //$("[name='HKeyInspect']").attr("checked", false); |
| | | $("[name='HKeyInspect']").prop("checked", false); |
| | | } |
| | | form.render('checkbox');//å·æ°å¼ |
| | | }); |
| | | |
| | | //ç¹å»æ£éªé¡¹ç®è¡äºä»¶ |
| | | table.on('row(mainTable)', function (obj) { |
| | | //éä¸è¡æ¹åé¢è² |
| | | check_row(obj); |
| | | //è·åå½åéä¸è¡å· |
| | | var rowIndex = Number($(obj.tr).attr("data-index")) + Number(1); |
| | | //ææ£éªå¼æ°æ®åå°æ°ç» |
| | | createArr(rowIndex); |
| | | |
| | | //è·ååå
æ ¼æ£éªå¼æ°æ® |
| | | var table_value = table.cache['ValueTable']; |
| | | |
| | | Array.some(item => { |
| | | console.log("==============item==============="); |
| | | console.log(item); |
| | | }) |
| | | |
| | | for (let i = 0; i < table_value.length; i++) { |
| | | |
| | | } |
| | | |
| | | //console.log(arr_value_add); |
| | | console.log(Array); |
| | | console.log(table_value); |
| | | }); |
| | | |
| | | //æ¹åéä¸è¡é¢è² |
| | | function check_row(obj) { |
| | | if (checkobj != "") { |
| | | checkobj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//åæ¶å¤éæ¡é䏿 ·å¼ |
| | | checkobj.tr.find(':checkbox:first').prop('checked', false);//åæ¶å¤éæ¡é䏿 ·å¼ |
| | | $(checkobj.tr.selector).attr({ "style": "background:" });//åæ¶å½åtré¢è² |
| | | } |
| | | //$('#HKeyInspect2').attr("checked", false); |
| | | var num = []; |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | var a = $('#HKeyInspect' + (i + 1)).prop("checked"); |
| | | num.push(a); |
| | | } |
| | | |
| | | var flag = !obj.tr.find(':checkbox:first').prop('checked'); |
| | | obj.tr.find(':checkbox').prop('checked', flag); |
| | | if (flag) { |
| | | obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //设置å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | checkobj = obj; |
| | | } else { |
| | | obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//åæ¶å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:" });//åæ¶å½åtré¢è² |
| | | } |
| | | //mainTable ä¸ºè¡¨æ ¼ID æ³¨ææ¤å¤å¦æID䏿£ç¡®å°å¯¼è´ä½ å¨çå¬å¤éæ¡æ¶è·åä¸å°ä½ éæ©çæ°æ®ï¼åé¢çåªæ¯æ·»å æå é¤é䏿ªé䏿 ·å¼ä»¥åè®¾ç½®èæ¯è²ï¼åä½é¢è² |
| | | layui.each(table.cache.mainTable, function (i, l) { |
| | | if (obj.tr.index() == l.LAY_TABLE_INDEX) { |
| | | l.LAY_CHECKED = flag; |
| | | } |
| | | }); |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | |
| | | if (num[i]) { |
| | | $('#HKeyInspect' + (i + 1)).prop("checked", true); |
| | | } else { |
| | | $('#HKeyInspect' + (i + 1)).prop("checked", false); |
| | | } |
| | | } |
| | | form.render('checkbox'); |
| | | } |
| | | |
| | | function createArr(rowIndex) { |
| | | var arr_value = table.cache['ValueTable']; //è·åæ£æµå¼åå
æ ¼æ°æ® |
| | | |
| | | arr_value_add = []; //æ°å¢è¡å·å段 |
| | | arr_value.map((item, index) => { |
| | | arr_value_add.push(Object.assign({}, item, { rowNum: rowIndex })) |
| | | }) |
| | | |
| | | if (Array.length > 0) {//妿æ°ç»ä¸ä¸ºç©ºåéåæ°ç» |
| | | var whetherAdd = false; //æ¯å¦å·²ç»æ·»å è¿å½åè¡å·çæ°ç» |
| | | //éåæ°ç» |
| | | Array.some(item => { |
| | | if (item[0].rowNum == rowIndex) { |
| | | whetherAdd = true; |
| | | return true;//è·³åºéå |
| | | } else { |
| | | whetherAdd = false; |
| | | } |
| | | }) |
| | | //æ²¡ææ·»å è¿å½åè¡å·çæ°ç»åæ·»å è¿å» |
| | | if (whetherAdd == false) { |
| | | Array.push(arr_value_add); |
| | | } |
| | | } else { |
| | | Array.push(arr_value_add);//æ°ç»ä¸ºç©ºåä¸å夿ï¼ç´æ¥ææ°æ®æ·»å è¿æ°ç» |
| | | } |
| | | } |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | }); |
| | | |