Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
| | |
| | | <File Include="views/Baseset/åºç¡èµæ/Gy_GetProductionTeamList.html"> |
| | | <publishTime>09/21/2022 08:13:57</publishTime> |
| | | </File> |
| | | <File Include="views/Baseset/åºç¡èµæ/Gy_InspectValueList.html"> |
| | | <publishTime>07/12/2023 10:20:03</publishTime> |
| | | </File> |
| | | <File Include="views/Baseset/åºç¡èµæ/Gy_LineCenter.html"> |
| | | <publishTime>02/25/2022 09:01:10</publishTime> |
| | | </File> |
| | |
| | | </File> |
| | | <File Include="views/Baseset/åºç¡èµæ/Gy_RoutingGroup.html"> |
| | | <publishTime>02/25/2022 09:01:10</publishTime> |
| | | </File> |
| | | <File Include="views/Baseset/åºç¡èµæ/Gy_SampleSchemeListView.html"> |
| | | <publishTime>07/05/2023 17:29:49</publishTime> |
| | | </File> |
| | | <File Include="views/Baseset/åºç¡èµæ/Gy_ScrapReasonList.html"> |
| | | <publishTime>02/25/2022 09:01:10</publishTime> |
| | |
| | | <publishTime>06/25/2023 13:14:53</publishTime> |
| | | </File> |
| | | <File Include="views/home/console_KaiBeiNaiTe.html"> |
| | | <publishTime>07/18/2023 08:41:33</publishTime> |
| | | <publishTime>07/24/2023 08:58:05</publishTime> |
| | | </File> |
| | | <File Include="views/home/console_Mobile.html"> |
| | | <publishTime>05/04/2023 08:13:44</publishTime> |
| | | </File> |
| | | <File Include="views/home/console_Mobile_KaiBeiNaiTe.html"> |
| | | <publishTime>07/18/2023 08:41:08</publishTime> |
| | | <publishTime>07/24/2023 08:58:05</publishTime> |
| | | </File> |
| | | <File Include="views/home/console_Mobile_QiaoYi.html"> |
| | | <publishTime>04/04/2023 15:47:51</publishTime> |
| | |
| | | <publishTime>07/17/2023 13:28:40</publishTime> |
| | | </File> |
| | | <File Include="views/index_KaiBeiNaiTe.html"> |
| | | <publishTime>07/18/2023 08:41:53</publishTime> |
| | | <publishTime>07/24/2023 08:58:05</publishTime> |
| | | </File> |
| | | <File Include="views/index_Mobile.html"> |
| | | <publishTime>06/19/2023 13:29:56</publishTime> |
| | | </File> |
| | | <File Include="views/index_Mobile_KaiBeiNaiTe.html"> |
| | | <publishTime>07/18/2023 08:40:58</publishTime> |
| | | <publishTime>07/24/2023 08:58:05</publishTime> |
| | | </File> |
| | | <File Include="views/index_Mobile_QiaoYi.html"> |
| | | <publishTime>04/13/2023 15:41:02</publishTime> |
| | |
| | | <publishTime>04/13/2021 10:12:44</publishTime> |
| | | </File> |
| | | <File Include="views/人äºç®¡ç/å
¥èç³è¯·/HR_EmpEngageRequestBill.html"> |
| | | <publishTime>07/21/2023 15:45:41</publishTime> |
| | | <publishTime>07/24/2023 08:58:05</publishTime> |
| | | </File> |
| | | <File Include="views/人äºç®¡ç/å
¥èç³è¯·/HR_EmpEngageRequestBillList.html"> |
| | | <publishTime>07/21/2023 08:25:45</publishTime> |
| | | <publishTime>07/24/2023 08:58:05</publishTime> |
| | | </File> |
| | | <File Include="views/人äºç®¡ç/离èç³è¯·/HR_EmpDimissionBill.html"> |
| | | <publishTime>07/21/2023 10:46:11</publishTime> |
| | | <publishTime>07/24/2023 08:58:05</publishTime> |
| | | </File> |
| | | <File Include="views/人äºç®¡ç/离èç³è¯·/HR_EmpDimissionBillList.html"> |
| | | <publishTime>07/21/2023 10:15:10</publishTime> |
| | | <publishTime>07/24/2023 08:58:05</publishTime> |
| | | </File> |
| | | <File Include="views/ä»å管ç/ä»åºè°æ¨/Cc_LookingForBill.html"> |
| | | <publishTime>04/13/2021 10:12:44</publishTime> |
| | |
| | | <File Include="views/车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcessExchangeBillList_LookDown.html"> |
| | | <publishTime>06/28/2023 16:08:50</publishTime> |
| | | </File> |
| | | <File Include="views/车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcessExchangeBillQuery_Mobile.html"> |
| | | <publishTime>07/24/2023 08:58:05</publishTime> |
| | | </File> |
| | | <File Include="views/车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcessExchangeBill_CF.html"> |
| | | <publishTime>04/21/2023 08:41:17</publishTime> |
| | | </File> |
| | |
| | | <Content Include="views\车é´ç®¡ç\å·¥åºæµè½¬å¡\Sc_ProcessExchangeBillQuery_Mobile.html" /> |
| | | <Content Include="views\车é´ç®¡ç\å·¥åºæµè½¬å¡\Sc_ProcessExchangeBill_Change.html" /> |
| | | <Content Include="views\车é´ç®¡ç\å·¥åºæµè½¬å¡\Sc_ProcessExchangeBill_Copy_PL.html" /> |
| | | <Content Include="views\车é´ç®¡ç\å·¥åºæµè½¬å¡\WW_EntrustWorkOrderBillEdit.html" /> |
| | | <Content Include="views\车é´ç®¡ç\å·¥åºæµè½¬å¡\WW_EntrustWorkOrderBillList.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Kf_ProdProcessEntryReport_DyeColor.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Kf_ProdProcessSumReport_DyeColor.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Kf_ProdProcessSumReport_DyeColor_third.html" /> |
| | |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Sc_StationInBillList.html" /> |
| | | <Content Include="views\车é´ç®¡ç\æ¥è¡¨åæ\Sc_StationOutSumReport.html" /> |
| | | <Content Include="views\车é´ç®¡ç\è½¦é´æ¶æ\JIT_SendGoodsBillList.html" /> |
| | | <Content Include="views\éè´ç®¡ç\æ¥ä»·å\Sup_QuotePriceBillEdit.html" /> |
| | | <Content Include="views\éè´ç®¡ç\æ¥ä»·å\Sup_QuotePriceBillList.html" /> |
| | | <Content Include="views\éè´ç®¡ç\æ¶æéç¥å\Add_Edit_Cg_POInStockBillList.html" /> |
| | | <Content Include="views\éè´ç®¡ç\询价å\Sup_AskPriceBillEdit.html" /> |
| | | <Content Include="views\éè´ç®¡ç\询价å\Sup_AskPriceBillList.html" /> |
| | | <Content Include="views\éè´ç®¡ç\éæéç¥å\Add_Edit_Cg_POInStockBackBillList.html" /> |
| | | <Content Include="views\éè´ç®¡ç\éè´è®¢å\Cg_POOrderBillEdit.html" /> |
| | | <Content Include="views\éè´ç®¡ç\éè´è®¢å\Cg_POOrderBillList.html" /> |
| | |
| | | , { field: 'HNumber', title: 'ç©æä»£ç ' } |
| | | , { field: 'HName', title: 'ç©æåç§°', sort: true } |
| | | , { field: 'HModel', title: 'è§æ ¼åå·' } |
| | | , { field: 'HUnitID', title: '计éåä½ID', hide: true } |
| | | , { field: 'HUnitNumber', title: '计éåä½ä»£ç ' } |
| | | , { field: 'HUnitName', title: '计éåä½åç§°' } |
| | | ]] |
| | | , page: true |
| | | , limits: [50, 500, 5000, 50000], |
| | |
| | | <!--<dd><a lay-href="车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcExchWorkBackBillEdit.html">å·¥åºè¿å·¥ç³è¯·</a></dd>--> |
| | | <dd><a lay-href="车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcessSendWorkList.html">å·¥åºæ´¾å·¥å表</a></dd> |
| | | <dd><a lay-href="车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcessSendWorkEdit.html">å·¥åºæ´¾å·¥</a></dd> |
| | | <dd><a lay-href="车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcessWWSendWorkEdit.html">å·¥åºå§å¤æ´¾å·¥</a></dd> |
| | | <!--<dd><a lay-href="车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcExchWorkBackBillEdit.html">å·¥åºè¿å·¥ç³è¯·åç¼è¾</a></dd>--> |
| | | <dd><a lay-href="车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcExchRecordBackBillList.html">å·¥åºè¿å·¥è®°å½å</a></dd> |
| | | <!--<dd><a lay-href="车é´ç®¡ç/å·¥åºæµè½¬å¡/Sc_ProcExchRecordBackBillEdit.html">å·¥åºè¿å·¥è®°å½åç¼è¾</a></dd>--> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get-print" id="print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_export" id="export"><i class="layui-icon layui-icon-export"></i>导åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>æé®è®¾ç½®</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-FirstPieceCheck" id="btn-FirstPieceCheck">馿£</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | var btns = document.getElementsByTagName("button"); //è·åæ¬é¡µæææé®å¯¹è±¡ |
| | | var HBillType = "3710"; |
| | | get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); |
| | | break; |
| | | //馿£ |
| | | case 'btn-FirstPieceCheck': set_FirstPieceCheck(); |
| | | break; |
| | | }; |
| | | }); |
| | |
| | | } |
| | | } |
| | | |
| | | //馿£ |
| | | function set_FirstPieceCheck() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var linterid = data[0].hmainid.toString(); |
| | | var OperationType = 2; |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'é¦ä»¶æ£éªå-ç¼è¾' |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['../../è´¨é管ç/é¦ä»¶æ£éªå/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=' + OperationType + '&linterid=' + linterid + '&HSouceBillType=3710&HICMOEntryID=0', 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | btnIs(); |
| | | } |
| | | , end: function () { |
| | | get_FastQuery(table, option); |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | |
| | | // å¤å¶ |
| | | function set_copy() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | |
| | | <input type="text" class="layui-input" name="HICMOQty" id="HICMOQty" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline" style="display: none"> |
| | | <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="HICMOInterID" id="HICMOInterID" value="0" style="background-color:#efefef4d;" readonly> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline" id="hidediv1"> |
| | | <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 value="1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline" id="hidediv2"> |
| | | <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="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label" style="width: 85px;">æµè½¬å¡ID</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HProcExchInterID" id="HProcExchInterID" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label" style="width: 85px;">æµè½¬å¡åID</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HProcExchEntryID" id="HProcExchEntryID" 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="HMaterName" id="HMaterName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: none;" readonly> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <input type="hidden" name="HFirstCheckEmp" id="HFirstCheckEmp" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="hidden" name="HQCCheckProjectID" id="HQCCheckProjectID" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline" style="width: 50%;"> |
| | |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <!--æ½æ ·æ£éª--> |
| | | <div class="layui-row" style="margin-bottom:15px;margin-left:30px"> |
| | | <!--<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>--> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">项ç®åºå·</label> |
| | |
| | | <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;"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchCheckItemID" id="btnSearchCheckItemID" name="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 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> |
| | | <input type="text" class="layui-input" name="HAcceptQty" id="HAcceptQty" style="background-color:#efefef4d;" value="0" 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="HInspectResultToSee" id="HInspectResultToSee" value="" style="" 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="ä¸åæ ¼">ä¸åæ ¼</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | |
| | | <input type="text" class="layui-input" name="HRejectQty" id="HRejectQty" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!--<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> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | |
| | | <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=""> |
| | | <input type="text" class="layui-input" name="HSampleUnRightQty" id="HSampleUnRightQty" style="" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-tab-item" style="height:590px"> |
| | | <!--æ£æµå¼--> |
| | | <div class="layui-row" style="margin-bottom:15px;margin-left:30px"> |
| | | <!--<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>--> |
| | | <div class="left" style="width:50%;height:450px;float:left;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | |
| | | <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> |
| | | <input type="text" class="layui-input" name="HSampleQty2" id="HSampleQty2" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <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;"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchCheckItemID" id="btnSearchCheckItemID" name="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;">æ£éªç»æ</label> |
| | | <div class="layui-input-block" style="margin-left: 100px;"> |
| | | <input type="text" class="layui-input" name="HInspectResultToSee2" id="HInspectResultToSee2" value="" style="" readonly> |
| | | </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="ä¸åæ ¼">ä¸åæ ¼</option> |
| | | </select> |
| | | </div> |
| | | </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=""> |
| | | <input type="text" class="layui-input" name="HSampleUnRightQty2" id="HSampleUnRightQty2" value="0" style=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!--<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> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline" style="border-bottom:2px solid #9C9C9C;width:290px;margin-left:10px"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <!--<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="ä¸åæ ¼">ä¸åæ ¼</option> |
| | | </select> |
| | | </div> |
| | | </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 name="HStatus" lay-filter="HStatus" id="HStatus"> |
| | | <option value="1" selected="selected">åæ ¼</option> |
| | | <option value="2">ä¸åæ ¼</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="HComparator" lay-filter="HComparator"> |
| | | <option value="çäº" selected="selected">=</option> |
| | | <option value="大äº">></option> |
| | | <option value="å°äº"><</option> |
| | | <option value="大äºçäº">>=</option> |
| | | <option value="å°äºçäº"><=</option> |
| | | <select name="HComparator" lay-filter="HComparator" id="HComparator"> |
| | | <option value="=" selected="selected">=</option> |
| | | <option value=">">></option> |
| | | <option value=">=">>=</option> |
| | | <option value="<"><</option> |
| | | <option value="<="><=</option> |
| | | <option value="<>"><></option> |
| | | <option value="between">between</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> |
| | | <input type="text" class="layui-input" name="HUnit" id="HUnit" style="background-color:white;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> |
| | |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">*æ£éªå¼</label> |
| | | <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> |
| | | <input type="text" class="layui-input" name="HInspectVal" id="HInspectVal" style="background-color:white;width: 53%;float:left;" onfocus="this.select();" 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> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 70px;">*ç®æ å¼</label> |
| | | <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> |
| | | <input type="text" class="layui-input" name="HTargetVal" id="HTargetVal" style="background-color:white;width: 53%;float:left;" onfocus="this.select();" 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> |
| | |
| | | <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> |
| | | <input type="text" class="layui-input" name="HUpLimit" id="HUpLimit" value="0" style="background-color:#efefef4d;" onfocus="this.select();" 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> |
| | | <input type="text" class="layui-input" name="HDownLimit" id="HDownLimit" value="0" style="background-color:#efefef4d;" onfocus="this.select();" readonly> |
| | | </div> |
| | | </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="HUpOffSet" id="HUpOffSet" value="0" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HUpOffSet" id="HUpOffSet" value="0" style="background-color:#efefef4d;" onfocus="this.select();" 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> |
| | | <input type="text" class="layui-input" name="HDownOffSet" id="HDownOffSet" value="0" style="background-color:#efefef4d;" onfocus="this.select();" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <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> |
| | | <option value="1">åæ ¼</option> |
| | | <option value="2">ä¸åæ ¼</option> |
| | | </select> |
| | | </script> |
| | | <!--è¡ä¸æéæ©(åææ¹æ³)--> |
| | |
| | | </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' : '' }}> |
| | | <input type="checkbox" value="{{d.HKeyInspect}}" lay-skin="primary" id="HKeyInspect{{d.LAY_TABLE_INDEX+1}}" lay-filter="HKeyInspect" {{ d.HKeyInspect == 1 ? 'checked' : '' }}> |
| | | </script> |
| | | <script> |
| | | //æè·¯ |
| | | //1.æ£éªé¡¹ç®è¡¨ä½æ°æ®å¼åå¨ï¼åç¨ç¹å»è¡äºä»¶ï¼å½åæ¢è¡æ¶æä¸æ¬¡æå¨è¡çæ°æ®åå°option.dataä¸ï¼ |
| | | //è¿ä¸ªæè·¯ä¼æä¸ªé®é¢ï¼æå䏿¬¡ç¹å»çé£è¡æ°æ®å°ä¸ä¼å¨å»è§¦åç¹å»è¡äºä»¶åå¨å¼ï¼ç®åæ³å°çæ¯å¨æ§è¡ä¿åæ¹æ³æ¶å¨ææåç¹å»çé£ä¸è¡æ°æ®åå
¥option.dataä¸ |
| | | |
| | | |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | |
| | | var option_Check = [];//ç¨æ¥å卿£éªé¡¹ç® |
| | | var Array = []; //å
¨å±åéï¼æå¤é¢çä¸å±æ°ç»,å卿£æµå¼ |
| | | var checkobj = ""; //å¤éæ¡ |
| | | var trindex = ""; //é»è®¤éä¸è¡ä¸æ |
| | | var SummaryIndex = []; //éä¸è¡ä¸æ æ±æ» |
| | | var LastIndex = 0; //æåéä¸ä¸è¡ç䏿 |
| | | var isFristClick = true; |
| | | var isHavingCount = false; |
| | | |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | //if (sessionStorage.login != "login") { |
| | |
| | | //æ ¹æ®æºåidè·åæºåä¿¡æ¯ |
| | | LoadingInformation3(); |
| | | } |
| | | //ç产订ååè¡¨é¦æ£ |
| | | else if (HSouceBillType == 3710) { |
| | | //æ ¹æ®æºåidè·åæºåä¿¡æ¯ |
| | | LoadingInformation_ICMO(); |
| | | } |
| | | else { |
| | | layer.alert("æºåç±»åæ æï¼", { icon: 5 }); |
| | | } |
| | |
| | | RoadBillMain(linterid); |
| | | //RoadBillSub(linterid); |
| | | } |
| | | |
| | | $("[name='btnSearchCheckItemID']").addClass("layui-btn-disabled").attr("disabled", true);//ç¦ç¨æ£éªé¡¹ç®æ¾å¤§é |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | |
| | |
| | | $("#HSourceName").val(data.çäº§èµæº); |
| | | $("#HSourceID").val(data.HSourceID); |
| | | $("#HMaterID").val(data.HMaterID); |
| | | $("#HMaterName").val(data.产ååç§°); |
| | | $("#HMainSourceBillNo").val(data.åæ®å·); |
| | | $("#HMainSourceBillType").val(data.HBillType); |
| | | $("#HMainSourceInterID").val(data.HInterID); |
| | | $("#HICMOEntryID").val(data.HICMOEntryID); |
| | | } else { |
| | | layer.alert(result.Message, { icon: 5 }); |
| | | } |
| | | layer.close(wait); |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //æ ¹æ®æºåidè·åæºåä¿¡æ¯--ç产订å |
| | | function LoadingInformation_ICMO() { |
| | | $("#hidediv1").attr({ "style": "display:none" }); |
| | | $("#hidediv2").attr({ "style": "display:none" }); |
| | | |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json', |
| | | type: "GET", |
| | | data: { "sWhere": "and hmainid = " + linterid, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | var data = result.data[0]; |
| | | if (result.count == 1) { |
| | | //$("#HProcExchBillNo").val(data.æµè½¬å¡å·); |
| | | //$("#HProcExchInterID").val(data.HProcExchInterID); |
| | | //$("#HProcExchEntryID").val(data.HProcExchEntryID); |
| | | //$("#HProcExchQty").val(data.æµè½¬å¡æ°é); |
| | | $("#HICMOBillNo").val(data.åæ®å·); |
| | | $("#HICMOInterID").val(data.hmainid); |
| | | $("#HICMOQty").val(data.ç产任å¡åæ°é); |
| | | $("#HSourceName").val(data.çäº§èµæº); |
| | | $("#HSourceID").val(data.HSourceID); |
| | | $("#HMaterID").val(data.HMaterID); |
| | | $("#HMaterName").val(data.产ååç§°); |
| | | $("#HMainSourceBillNo").val(data.åæ®å·); |
| | | $("#HMainSourceBillType").val(data.åæ®ç±»å); |
| | | $("#HMainSourceInterID").val(data.hmainid); |
| | | $("#HICMOEntryID").val(data.HEntryID); |
| | | } else { |
| | | layer.alert(result.Message, { icon: 5 }); |
| | | } |
| | |
| | | $("#HSourceName").val(data.HSourceName); |
| | | $("#HSourceID").val(data.HSourceID); |
| | | $("#HMaterID").val(data.HMaterID); |
| | | $("#HMaterName").val(data.HMaterName); |
| | | $("#HMainSourceBillNo").val(""); |
| | | $("#HMainSourceBillType").val(data.HBillType); |
| | | $("#HMainSourceInterID").val(data.HInterID); |
| | |
| | | $("#HSourceName").val(data.çäº§èµæº); |
| | | $("#HSourceID").val(data.HSourceID); |
| | | $("#HMaterID").val(data.HMaterID); |
| | | $("#HMaterName").val(data.产ååç§°); |
| | | $("#HMainSourceBillNo").val(data.åæ®å·); |
| | | $("#HMainSourceBillType").val(data.HBillType); |
| | | $("#HMainSourceInterID").val(data.HInterID); |
| | |
| | | //éåº |
| | | function get_Exit() { |
| | | 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; |
| | | //èµå¼æåä¸ä¸ªéä¸è¡çæ°æ®ç»option.data |
| | | Assignment(LastIndex, LastIndex); |
| | | //ä¿åæå䏿¬¡ç¹å»è¡çæ£éªå¼ |
| | | set_SaveValue($("#HEntryID").val()); |
| | | |
| | | if ($("#HICMOQty").val() == "" || $("#HICMOQty").val() <= 0) { |
| | | layer.msg("ä»»å¡åæ°éä¸è½ä¸ºç©ºä¸ä¸è½å°äºçäº0ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | |
| | | layer.msg("第" + indexRow + "è¡ï¼æ£éªé¡¹ç®ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | console.log(sSubTable); |
| | | if (sSubTable[i].HSampleSchemeID == '') { |
| | | sSubTable[i].HSampleSchemeID = 0 |
| | | } |
| | | if (sSubTable[i].HSampleQty == '') { |
| | | sSubTable[i].HSampleQty = 0 |
| | | } |
| | | if (sSubTable[i].HSampleDamageQty == '') { |
| | | sSubTable[i].HSampleDamageQty = 0 |
| | | } |
| | | if (sSubTable[i].HAcceptQty == '') { |
| | | sSubTable[i].HAcceptQty = 0 |
| | | } |
| | | if (sSubTable[i].HRejectQty == '') { |
| | | sSubTable[i].HRejectQty = 0 |
| | | } |
| | | if (sSubTable[i].HSampleUnRightQty == '') { |
| | | sSubTable[i].HSampleUnRightQty = 0 |
| | | } |
| | | if (sSubTable[i].HUnitID == '') { |
| | | sSubTable[i].HUnitID = 0 |
| | | } |
| | | } |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | var sSubValue = JSON.stringify(table.cache['ValueTable']); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"] + ';' + sSubValue; |
| | | |
| | | console.log(sSubStr); |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | |
| | | , "HDate": formatDate(data.æ¥æ) |
| | | , "HSourceID": data.çäº§èµæºID |
| | | , "HSourceName": data.çäº§èµæºåç§° |
| | | , "HICMOBillNo": data.HICMOBillNo |
| | | , "HICMOQty": data.HICMOQty |
| | | , "HICMOBillNo": data.ä»»å¡åå· |
| | | , "HICMOQty": data.ä»»å¡åæ°é |
| | | , "HICMOInterID": data.HICMOInterID |
| | | , "HICMOEntryID": data.HICMOEntryID |
| | | , "HMaterID": data.产åID |
| | | , "HMaterID": data.HMaterID |
| | | , "HMaterName": data.ç©æåç§° |
| | | , "HProcExchQty": data.HProcExchQty |
| | | , "HProcExchBillNo": data.HProcExchBillNo |
| | | , "HProcExchInterID": data.HProcExchInterID |
| | | , "HProcExchEntryID": data.HProcExchEntryID |
| | | , "HFirstCheckEmp": data.æ£éªåID |
| | | , "HFirstCheckEmpName": data.æ£éªååç§° |
| | | |
| | | //, "HQCCheckProjectID": data.æ£éªæ¹æ¡ID |
| | | //, "HQCCheckProjectName": data.æ£éªæ¹æ¡åç§° |
| | | //, "HQCCheckProjectID": data.HManagerID |
| | | //, "HPSStyleID": data.HPSStyleID |
| | | |
| | |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ£éªå¼ä¿å |
| | | function set_SaveValue(dataindex) { |
| | | for (let i = 0; i < table.cache['ValueTable'].length; i++) { |
| | | if (table.cache['ValueTable'][i].HInSpectValueB == "") { |
| | | table.cache['ValueTable'][i].HInSpectValueB = 0 |
| | | } |
| | | if (table.cache['ValueTable'][i].HInSpectValueT == "") { |
| | | table.cache['ValueTable'][i].HInSpectValueT = 0 |
| | | } |
| | | if (table.cache['ValueTable'][i].HInSpectValue == "") { |
| | | table.cache['ValueTable'][i].HInSpectValue = 0 |
| | | } |
| | | } |
| | | var sValueTable = JSON.stringify(table.cache['ValueTable']); |
| | | var HInterID = $("#HInterID").val(); |
| | | var HEntryID = dataindex; |
| | | |
| | | var msg = sValueTable + ";" + HInterID + ";" + HEntryID |
| | | |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/QC_FirstPieceCheckBill/set_SaveValue", |
| | | async: true, |
| | | data: { "msg": msg }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | layer.close(index); |
| | | //$('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);//ä¿åæé® |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg("æ£éªå¼ä¿åé误ï¼" + data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.close(index); |
| | | layer.msg("æ£éªå¼ä¿åé误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //#region æ¶é´è½¬æ¢ |
| | |
| | | }); |
| | | }); |
| | | |
| | | //#regionãè¡¨ä½æ¾å¤§éã |
| | | //表ä½ä¿¡æ¯æ£éªé¡¹ç®å¼¹çª |
| | | form.on('submit(btnSearchCheckItemID)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | |
| | | }); |
| | | }); |
| | | |
| | | //表ä½ä¿¡æ¯åä½å¼¹çª |
| | | //表ä½ä¿¡æ¯æ£éªå¼å¼¹çª |
| | | form.on('submit(btnSearchInspectValB)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HInspectValB").val(checkStatus.data[0].hmainid); |
| | | $("#HInspectValBName").val(checkStatus.data[0].æ£éªå¼åç§°); |
| | | $("#HInspectVal").val(checkStatus.data[0].æ£éªå¼åç§°); |
| | | |
| | | //==================================å¤å®æ¯å¦åæ ¼,åªæå®æ§åæå¯ä»¥éæ©æ£éªå¼ãç®æ å¼================================== |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | |
| | | Qualified(HComparator, HEntryID, HAnalysisMethod); |
| | | |
| | | form.render('select'); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | |
| | | }); |
| | | }); |
| | | |
| | | //表ä½ä¿¡æ¯åä½å¼¹çª |
| | | //表ä½ä¿¡æ¯ç®æ å¼å¼¹çª |
| | | form.on('submit(btnSearchTargetValB)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HTargetValB").val(checkStatus.data[0].hmainid); |
| | | $("#HTargetValBName").val(checkStatus.data[0].æ£éªå¼åç§°); |
| | | $("#HTargetVal").val(checkStatus.data[0].æ£éªå¼åç§°); |
| | | $("#HUpLimit").val(checkStatus.data[0].æ£éªå¼åç§°); |
| | | $("#HDownLimit").val(checkStatus.data[0].æ£éªå¼åç§°); |
| | | |
| | | //==================================å¤å®æ¯å¦åæ ¼,åªæå®æ§åæå¯ä»¥éæ©æ£éªå¼ãç®æ å¼================================== |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | |
| | | Qualified(HComparator, HEntryID, HAnalysisMethod); |
| | | |
| | | form.render('select'); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | |
| | | $("#HStrictness").val(checkStatus.data[0].ä¸¥æ ¼åº¦); |
| | | $("#HAQL").val(checkStatus.data[0].AQL); |
| | | $("#HSampleQty").val(checkStatus.data[0].æ ·æ¬é); |
| | | $("#HSampleQty2").val(checkStatus.data[0].æ ·æ¬é); |
| | | $("#HAcceptQty").val(checkStatus.data[0].å
许æ°); |
| | | |
| | | $("#HRejectQty").val(checkStatus.data[0].æç»æ°); |
| | |
| | | } |
| | | 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) { |
| | |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#regionãéæ£éªæ¹æ¡è·åè¡¨ä½æ£éªé¡¹ç®ä¿¡æ¯ã |
| | | function get_CheckItem() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetCheckItemByCheckProjectID", |
| | |
| | | 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); |
| | | //$('#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'); |
| | |
| | | $("[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").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" }); |
| | | |
| | | trindex = result.data.length - 1; |
| | | $("#HEntryID").val() - 1 |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#regionã表头æ¾å¤§éã |
| | | //表头信æ¯å·¥åºæµè½¬å¡å¼¹çª |
| | | form.on('submit(btnSearchProcExch)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | |
| | | //éåº |
| | | form.on('submit(Cancel)', function () { |
| | | //sessionStorage["SourceFlag"] = false; |
| | | parent.location.href = "../../../views/index.html" |
| | |
| | | //åå§è¡¨æ ¼æ°æ® |
| | | rowdata = [{ |
| | | "HQCCheckItemID": "", "æ£éªé¡¹ç®": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "", |
| | | "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": false |
| | | "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": false, "HStatus": 0, "HSampleSchemeID": 0, "HUnitID": 0, |
| | | "HInspectVal": '', "HTargetVal": '', "HUpLimit": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": '', |
| | | "HSampleSchemeName": "", "HSampleQty": "", "HSampleDamageQty": "", "HAcceptQty": "", "HInspectionLevel": "", "HRejectQty": "", |
| | | "HStrictness": "", "HSampleUnRightQty": "", "HAQL": "", "HSamplingType": "" |
| | | }]; |
| | | option = { |
| | | elem: '#mainTable' |
| | |
| | | , { 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: 'HResult', title: 'ç»è®º', templet: '#HResult', event: 'HResult' } |
| | | , { field: 'HAnalysisMethod', title: 'åææ¹æ³', templet: '#HAnalysisMethod', event: 'HAnalysisMethod' } |
| | | , { field: 'HKeyInspect', title: 'éç¹æ£æ¥', templet: '#HKeyInspect_Sub', unresize: false } |
| | | , { field: 'HQCStd', title: 'æ£éªæ å', edit: 'text' } |
| | | , { field: 'HUnit', title: 'åä½', edit: 'text' } |
| | |
| | | , { field: 'HMax', title: 'æå¤§å¼', edit: 'text' } |
| | | , { field: 'HMin', title: 'æå°å¼', edit: 'text' } |
| | | , { field: 'HAvg', title: 'å¹³åå¼', edit: 'text', totalRow: true } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text' } |
| | | |
| | | , { field: 'HSampleSchemeID', title: 'æ½æ ·æ¹æ¡ID', edit: 'text', hide: true } |
| | | , { field: 'HSampleSchemeName', title: 'æ½æ ·æ¹æ¡', edit: 'text', hide: true } |
| | | , { field: 'HSampleQty', title: 'æ ·æ¬é', edit: 'text', hide: true } |
| | | , { field: 'HSampleDamageQty', title: 'æ ·æ¬ç ´åæ°', edit: 'text', hide: true } |
| | | , { field: 'HSamplingType', title: 'æ½æ ·ç±»å', edit: 'text', hide: true } |
| | | , { field: 'HAcceptQty', title: 'å
许æ°', edit: 'text', hide: true } |
| | | , { field: 'HInspectionLevel', title: 'æ£éªæ°´å¹³', edit: 'text', hide: true } |
| | | , { field: 'HRejectQty', title: 'æç»æ°', edit: 'text', hide: true } |
| | | , { field: 'HStrictness', title: 'ä¸¥æ ¼åº¦', edit: 'text', hide: true } |
| | | , { field: 'HSampleUnRightQty', title: 'æ ·æ¬ä¸åæ ¼æ°', edit: 'text', hide: true } |
| | | , { field: 'HAQL', title: 'AQL', edit: 'text', hide: true } |
| | | , { field: 'HStatus', title: 'ç¶æ', edit: 'text', hide: true } |
| | | , { field: 'xxx', title: 'æ¯è¾ç¬¦', edit: 'text', hide: true } |
| | | , { field: 'HUnitID', title: 'åä½ID', edit: 'text', hide: true } |
| | | , { field: 'HUnit', title: 'åä½', edit: 'text', hide: true } |
| | | , { field: 'HInspectVal', title: 'æ£éªå¼', edit: 'text', hide: true } |
| | | , { field: 'HTargetVal', title: 'ç®æ å¼', edit: 'text', hide: true } |
| | | , { field: 'HUpLimit', title: 'ä¸éå¼', edit: 'text', hide: true } |
| | | , { field: 'HDownLimit', title: 'ä¸éå¼', edit: 'text', hide: true } |
| | | , { field: 'HUpOffSet', title: 'ä¸åå·®', edit: 'text', hide: true } |
| | | , { field: 'HDownOffSet', title: 'ä¸åå·®', edit: 'text', hide: true } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]] |
| | | , done: function (res, curr, count) { |
| | |
| | | }); |
| | | }); |
| | | |
| | | ////è¡éæ©å¤çï¼æ£éªç»æï¼-- å¤ä»½ |
| | | //form.on('select(HInSpectResult)', function (data) { |
| | | // //è·å䏿æ¡éä¸çå¼ |
| | | // var elem = data.othis.parents('tr'); |
| | | // var dataindex = elem.attr("data-index"); |
| | | // $.each(option_Value.data, function (index, value) { |
| | | // if (value.LAY_TABLE_INDEX == dataindex) { |
| | | // value.HInSpectResult = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | // } |
| | | // }); |
| | | //}); |
| | | |
| | | //è¡éæ©å¤çï¼æ£éªç»æï¼ |
| | | form.on('select(HInSpectResult)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | $.each(option_Value.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HInSpectResult = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | |
| | | //å¾ªç¯æ£éªå¼è¡¨æ ¼æ°æ®ï¼è·åä¸åæ ¼æ°é |
| | | var HValueTable = table.cache["ValueTable"]; |
| | | var UnRightQty = 0; |
| | | for (let i = 0; i < HValueTable.length; i++) { |
| | | if (HValueTable[i].HInSpectResult == 2) { |
| | | UnRightQty++; |
| | | } |
| | | } |
| | | $("#HSampleUnRightQty").val(UnRightQty); |
| | | $("#HSampleUnRightQty2").val(UnRightQty); |
| | | var HAcceptQty = $("#HAcceptQty").val();//å
è®¸æ° |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | if (UnRightQty > HAcceptQty) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | $("#HInspectResultToSee").val('ä¸åæ ¼'); |
| | | $("#HInspectResultToSee2").val('ä¸åæ ¼'); |
| | | $("#HInspectResultToSee").css("background-color", "#F0D6E3");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | $("#HInspectResultToSee2").css("background-color", "#F0D6E3");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | $("#HInspectResultToSee").val('åæ ¼'); |
| | | $("#HInspectResultToSee2").val('åæ ¼'); |
| | | $("#HInspectResultToSee").css("background-color", "#CEE3F2");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | $("#HInspectResultToSee2").css("background-color", "#CEE3F2");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | } |
| | | form.render('select'); |
| | | }); |
| | | |
| | | //è¡éæ©å¤çï¼åææ¹æ³ï¼ |
| | |
| | | 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); |
| | | //éèæ£æµå¼å段 |
| | | IsHide(data.value); |
| | | }); |
| | | |
| | | |
| | | //çå¬ä¸ææ¡ç¼è¾ |
| | | //çå¬ä¸ææ¡ç¼è¾--ç»è®º |
| | | form.on('select(HResult)', function (data) { |
| | | //è·åå½åè¡tr对象 |
| | | var elem = data.othis.parents('tr'); |
| | |
| | | var Guid = elem.first().find('td').eq(1).text(); |
| | | //éæ©çselect对象å¼ï¼ |
| | | var selectValue = data.value; |
| | | |
| | | if (selectValue == 1) { |
| | | selectValue = "åæ ¼" |
| | | $("#HInspectResultToSee").css("background-color", "#CEE3F2");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | $("#HInspectResultToSee2").css("background-color", "#CEE3F2");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | } else { |
| | | selectValue = "ä¸åæ ¼" |
| | | $("#HInspectResultToSee").css("background-color", "#F0D6E3");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | $("#HInspectResultToSee2").css("background-color", "#F0D6E3");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | } |
| | | $("#HInspectResultToSee").val(selectValue); |
| | | $("#HInspectResultToSee2").val(selectValue); |
| | | //$("#HInSpectResult" + Guid).val(selectValue); |
| | | $("[name='HResult']").val(selectValue); |
| | | $("[name='HInspectResult']").val(selectValue); |
| | | //$("[name='HResult']").val(selectValue); |
| | | |
| | | //$("[name='HInspectResult']").val(selectValue); |
| | | form.render('select'); |
| | | }) |
| | | |
| | | //çå¬ä¸ææ¡ç¼è¾ |
| | | form.on('select(HInspectResult)', function (data) { |
| | | //è¡éæ©å¤çï¼ç¶æï¼ |
| | | form.on('select(HStatus)', function (data) { |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | |
| | | Qualified(HComparator, HEntryID, HAnalysisMethod) |
| | | }); |
| | | |
| | | ////çå¬ä¸ææ¡ç¼è¾ |
| | | //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('select(HComparator)', 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); |
| | | |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | //å¤å®å¦ææ¯å®éåæ |
| | | if (HAnalysisMethod == 2) { |
| | | if (selectValue.toString() != '=' && selectValue.toString() != 'between') { |
| | | $("#HUpLimit").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸éå¼è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HDownLimit").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸éå¼è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HUpOffSet").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸åå·®è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HDownOffSet").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸åå·®è¾å
¥æ¡èæ¯é¢è² |
| | | } else if (selectValue.toString() == 'between') { |
| | | $("#HUpOffSet").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸åå·®è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HDownOffSet").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸åå·®è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HTargetVal").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åç®æ å¼è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HUpLimit").attr("readOnly", false).css("background-color", ""); //ä¸é弿¹ä¸ºå¯ç¼è¾ |
| | | $("#HDownLimit").attr("readOnly", false).css("background-color", ""); //ä¸é弿¹ä¸ºå¯ç¼è¾ |
| | | } else if (selectValue.toString() == '=') { |
| | | $("#HUpLimit").attr("readOnly", false).css("background-color", ""); //ä¸é弿¹ä¸ºå¯ç¼è¾ |
| | | $("#HDownLimit").attr("readOnly", false).css("background-color", ""); //ä¸é弿¹ä¸ºå¯ç¼è¾ |
| | | $("#HUpOffSet").attr("readOnly", false).css("background-color", ""); //ä¸åå·®æ¹ä¸ºå¯ç¼è¾ |
| | | $("#HDownOffSet").attr("readOnly", false).css("background-color", ""); //ä¸åå·®æ¹ä¸ºå¯ç¼è¾ |
| | | $("#HInspectVal").attr("readOnly", false).css("background-color", ""); //æ£éªå¼æ¹ä¸ºå¯ç¼è¾ |
| | | $("#HTargetVal").attr("readOnly", false).css("background-color", ""); //ç®æ 弿¹ä¸ºå¯ç¼è¾ |
| | | $('#btnSearchInspectValB').addClass("layui-btn-disabled").attr("disabled", true);//æ£éªå¼æé® |
| | | $('#btnSearchTargetValB').addClass("layui-btn-disabled").attr("disabled", true);//ç®æ å¼æé® |
| | | $("#HComparator").attr("disabled", false); //æ¯è¾ç¬¦æ¹ä¸ºå¯ç¼è¾ |
| | | form.render("select"); |
| | | } |
| | | } |
| | | |
| | | |
| | | form.render('select'); |
| | | }) |
| | | |
| | |
| | | $("[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) { |
| | | //#regionãç¹å»æ£éªé¡¹ç®è¡äºä»¶ã |
| | | table.on('rowDouble(mainTable)', function (obj) { |
| | | //è·å䏿¬¡æå¨è¡ä¸æ |
| | | var dataindex = $("#HEntryID").val() - 1; |
| | | |
| | | //è·åå½åç¹å»è¡ä¸æ |
| | | var nowindex = $(obj.tr).attr("data-index"); |
| | | LastIndex = nowindex; |
| | | |
| | | $("[name='HEntryID']").attr("value", Number(nowindex) + Number(1)); |
| | | $("[name='HQCCheckItemID']").attr("value", option_Check[nowindex].HQCCheckItemID); |
| | | $("[name='HQCCheckItemName']").attr("value", option_Check[nowindex].æ£éªé¡¹ç®); |
| | | |
| | | //éä¸è¡æ¹åé¢è² |
| | | check_row(obj); |
| | | //è·åå½åéä¸è¡å· |
| | | var rowIndex = Number($(obj.tr).attr("data-index")) + Number(1); |
| | | //ææ£éªå¼æ°æ®åå°æ°ç» |
| | | createArr(rowIndex); |
| | | //createArr(rowIndex); |
| | | |
| | | //è·ååå
æ ¼æ£éªå¼æ°æ® |
| | | var table_value = table.cache['ValueTable']; |
| | | |
| | | Array.some(item => { |
| | | console.log("==============item==============="); |
| | | console.log(item); |
| | | }) |
| | | //èµå¼ä¸åæ¾ |
| | | Assignment(nowindex, dataindex); |
| | | if (isFristClick != true) { |
| | | //if ($(this).parents('.layui-table').prevObject.context.cells[5].getAttribute('data-field') == 'HAnalysisMethod') { |
| | | //console.log('aaa'); |
| | | |
| | | for (let i = 0; i < table_value.length; i++) { |
| | | // return; |
| | | //} |
| | | //ä¿åæ£éªå¼ |
| | | } else { |
| | | isFristClick = false; |
| | | } |
| | | set_SaveValue(dataindex + 1); |
| | | if (isHavingCount == false) { |
| | | //å·æ°æ£éªå¼è¡¨æ ¼ |
| | | option_Value.data = [{ |
| | | "HSEQ": "0", "HInSpectResult": "", "HInSpectValueB": "", "HInSpectValueT": "", "HInSpectValue": "" |
| | | }]; |
| | | table.render(option_Value); |
| | | } |
| | | //console.log(maindata); |
| | | //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); |
| | | }); |
| | | //#endregion |
| | | |
| | | |
| | | //#regionãææ¬æ¡çå¬ï¼å
æ ç§»å¼æ¶è§¦åã |
| | | |
| | | //[ å¤å®æ£éªæ¯å¦åæ ¼ ]çå¬ææ¬æ¡ç¼è¾--æ£éªå¼ |
| | | $("#HInspectVal").blur(function () { |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | //å®éåæ |
| | | if (HAnalysisMethod == 2) { |
| | | Qualified(HComparator, HEntryID, HAnalysisMethod); //夿æ¯å¦åæ ¼ |
| | | } |
| | | //å
¶ä»åæ |
| | | if (HAnalysisMethod == 3) { |
| | | Qualified(HComparator, HEntryID, HAnalysisMethod); //夿æ¯å¦åæ ¼ |
| | | } |
| | | }) |
| | | |
| | | //[ å¤å®æ£éªæ¯å¦åæ ¼ ]çå¬ææ¬æ¡ç¼è¾--ç®æ å¼ |
| | | $("#HTargetVal").blur(function () { |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | //====================èµå¼/ä¼ å¼=========================== |
| | | var HTargetVal = $("#HTargetVal").val();//ç®æ å¼ |
| | | |
| | | //å®éåæ |
| | | if (HAnalysisMethod == 2) { |
| | | $("#HUpLimit").val(HTargetVal) //ä¸éå¼ |
| | | $("#HDownLimit").val(HTargetVal) //ä¸éå¼ |
| | | Qualified(HComparator, HEntryID); //夿æ¯å¦åæ ¼ |
| | | } |
| | | //å
¶ä»åæ |
| | | if (HAnalysisMethod == 3) { |
| | | Qualified(HComparator, HEntryID, HAnalysisMethod); //夿æ¯å¦åæ ¼ |
| | | } |
| | | }) |
| | | |
| | | //[ å¤å®æ£éªæ¯å¦åæ ¼ ]çå¬ææ¬æ¡ç¼è¾--ä¸éå¼ |
| | | $("#HUpLimit").blur(function () { |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | //====================èµå¼/ä¼ å¼=========================== |
| | | var HTargetVal = $("#HTargetVal").val();//ç®æ å¼ |
| | | var HUpLimit = $("#HUpLimit").val();//ä¸éå¼ |
| | | |
| | | //å®éåæ |
| | | if (HAnalysisMethod == 2) { |
| | | $("#HUpOffSet").val(Number(HUpLimit) - Number(HTargetVal)) //ä¸åå·® |
| | | Qualified(HComparator, HEntryID); //夿æ¯å¦åæ ¼ |
| | | } |
| | | }) |
| | | |
| | | //[ å¤å®æ£éªæ¯å¦åæ ¼ ]çå¬ææ¬æ¡ç¼è¾--ä¸éå¼ |
| | | $("#HDownLimit").blur(function () { |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | //====================èµå¼/ä¼ å¼=========================== |
| | | var HTargetVal = $("#HTargetVal").val();//ç®æ å¼ |
| | | var HDownLimit = $("#HDownLimit").val();//ä¸éå¼ |
| | | |
| | | //å®éåæ |
| | | if (HAnalysisMethod == 2) { |
| | | $("#HDownOffSet").val(Number(HDownLimit) - Number(HTargetVal)) //ä¸åå·® |
| | | Qualified(HComparator, HEntryID); //夿æ¯å¦åæ ¼ |
| | | } |
| | | }) |
| | | |
| | | //[ å¤å®æ£éªæ¯å¦åæ ¼ ]çå¬ææ¬æ¡ç¼è¾--ä¸åå·® |
| | | $("#HUpOffSet").blur(function () { |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | //====================èµå¼/ä¼ å¼=========================== |
| | | var HTargetVal = $("#HTargetVal").val();//ç®æ å¼ |
| | | var HUpOffSet = $("#HUpOffSet").val();//ä¸åå·® |
| | | |
| | | //å®éåæ |
| | | if (HAnalysisMethod == 2) { |
| | | $("#HUpLimit").val(Number(HUpOffSet) + Number(HTargetVal)) //ä¸éå¼ |
| | | Qualified(HComparator, HEntryID); //夿æ¯å¦åæ ¼ |
| | | } |
| | | }) |
| | | |
| | | //[ å¤å®æ£éªæ¯å¦åæ ¼ ]çå¬ææ¬æ¡ç¼è¾--ä¸åå·® |
| | | $("#HDownOffSet").blur(function () { |
| | | var HEntryID = $("#HEntryID").val() - 1;//æ°ç»ä¸æ |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | //====================èµå¼/ä¼ å¼=========================== |
| | | var HTargetVal = $("#HTargetVal").val();//ç®æ å¼ |
| | | var HDownOffSet = $("#HDownOffSet").val();//ä¸åå·® |
| | | |
| | | //å®éåæ |
| | | if (HAnalysisMethod == 2) { |
| | | Qualified(HComparator, HEntryID); //夿æ¯å¦åæ ¼ |
| | | $("#HDownLimit").val(Number(HDownOffSet) + Number(HTargetVal)) //ä¸éå¼ |
| | | } |
| | | }) |
| | | |
| | | //#endregion |
| | | |
| | | //#regionã夿æ¯å¦åæ ¼æ¹æ³ã |
| | | function Qualified(HComparator, HEntryID, HAnalysisMethod) { |
| | | var HInspectVal = $("#HInspectVal").val(); //æ£éªå¼ |
| | | var HTargetVal = $("#HTargetVal").val(); //ç®æ å¼ |
| | | var HUpLimit = $("#HUpLimit").val() //ä¸éå¼ |
| | | var HDownLimit = $("#HDownLimit").val() //ä¸éå¼ |
| | | var HUpOffSet = $("#HUpOffSet").val() //ä¸åå·® |
| | | var HDownOffSet = $("#HDownOffSet").val() //ä¸åå·® |
| | | var HStatus = $("#HStatus").val() //ç¶æ |
| | | |
| | | //#regionã宿§åææ¹æ³ã |
| | | if (HAnalysisMethod == 1) { |
| | | //ç¶æä¸ºåæ ¼ |
| | | if (HStatus == 1) { |
| | | switch (HComparator) { |
| | | //宿§åæ:éè¿æ£éªå¼åç®æ å¼è¿è¡å¤å®ï¼1.两个å¼é½ç¸çï¼å¹¶ä¸ç¶ææ¯åæ ¼åå¤å®åæ ¼ï¼2.两个å¼é½ç¸çï¼ä½ç¶æä¸ºä¸åæ ¼åå¤å®ä¸åæ ¼ï¼ |
| | | case '=': |
| | | if (HInspectVal == HTargetVal) { //夿æ£éªå¼ï¼ç®æ 弿¯å¦ç¸ç |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } |
| | | break; |
| | | default: break; |
| | | } |
| | | } |
| | | else { |
| | | switch (HComparator) { |
| | | //宿§åæ:éè¿æ£éªå¼åç®æ å¼è¿è¡å¤å®ï¼1.两个å¼é½ç¸çï¼å¹¶ä¸ç¶ææ¯åæ ¼åå¤å®åæ ¼ï¼2.两个å¼é½ç¸çï¼ä½ç¶æä¸ºä¸åæ ¼åå¤å®ä¸åæ ¼ï¼ |
| | | case '=': |
| | | if (HInspectVal == HTargetVal) { //夿æ£éªå¼ï¼ç®æ 弿¯å¦ç¸ç |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } |
| | | break; |
| | | default: break; |
| | | } |
| | | } |
| | | } |
| | | //#endregion |
| | | //#regionãå®éåææ¹æ³ã |
| | | else if (HAnalysisMethod == 2) { |
| | | //ç¶æä¸ºåæ ¼ |
| | | if (HStatus == 1) { |
| | | switch (HComparator) { |
| | | case '=': |
| | | //æ¯è¾ç¬¦ä¸º'='ä¸ç¶æä¸ºåæ ¼æ¶ï¼å¦ææ£éªå¼<=ä¸é弿¶æè
æ£éªå¼=ç®æ 弿¶å¤å®åæ ¼ï¼ |
| | | //ä¸éå¼ä¸º0æ¶ï¼æ£éªå¼=ç®æ å¼å¤å®åæ ¼ï¼ |
| | | //ä¸éå¼ä¸ä¸º0ï¼æ£éªå¼=ç®æ å¼&&ä¸éå¼>=ç®æ å¼&&ä¸éå¼<=ç®æ å¼ å¤å®åæ ¼ |
| | | if (((Number(HInspectVal) <= Number(HUpLimit) && Number(HInspectVal) >= Number(HDownLimit)) || Number(HUpLimit) == 0) && Number(HInspectVal) == Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } |
| | | break; |
| | | case '>': |
| | | //æ¯è¾ç¬¦ä¸º'>'ä¸ç¶æä¸ºåæ ¼æ¶ï¼å¦ææ£éªå¼>ä¸éå¼å¤å®åæ ¼ï¼å¦åä¸åæ ¼ |
| | | if (Number(HInspectVal) > Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } |
| | | break; |
| | | case '>=': |
| | | //æ¯è¾ç¬¦ä¸º'>='ä¸ç¶æä¸ºåæ ¼æ¶ï¼å¦ææ£éªå¼>=ä¸éå¼å¤å®åæ ¼ï¼å¦åä¸åæ ¼ |
| | | if (Number(HInspectVal) >= Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } |
| | | break; |
| | | case '<': |
| | | //æ¯è¾ç¬¦ä¸º'<'ä¸ç¶æä¸ºåæ ¼æ¶ï¼å¦ææ£éªå¼<ä¸éå¼å¤å®åæ ¼ï¼å¦åä¸åæ ¼ |
| | | if (Number(HInspectVal) < Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } |
| | | break; |
| | | case '<=': |
| | | //æ¯è¾ç¬¦ä¸º'<='ä¸ç¶æä¸ºåæ ¼æ¶ï¼å¦ææ£éªå¼<=ä¸éå¼å¤å®åæ ¼ï¼å¦åä¸åæ ¼ |
| | | if (Number(HInspectVal) <= Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } |
| | | break |
| | | case '<>': |
| | | //æ¯è¾ç¬¦ä¸º'<>'ä¸ç¶æä¸ºåæ ¼æ¶ï¼å¦ææ£éªå¼<>ä¸éå¼å¤å®åæ ¼ï¼å¦åä¸åæ ¼ |
| | | if (Number(HInspectVal) < Number(HTargetVal) || Number(HInspectVal) > Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } |
| | | break; |
| | | case 'between': |
| | | //æ¯è¾ç¬¦ä¸º'between'ä¸ç¶æä¸ºåæ ¼æ¶ï¼å¦ææ£éªå¼å¨ä¸éå¼ä¸ä¸éå¼ä¹é´å¤å®åæ ¼ï¼å¦åä¸åæ ¼ |
| | | if (Number(HInspectVal) >= Number(HDownLimit) || Number(HInspectVal) <= Number(HUpLimit)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } |
| | | break; |
| | | default: break; |
| | | } |
| | | } |
| | | else { //ç¶æä¸ºä¸åæ ¼ |
| | | switch (HComparator) { |
| | | case '=': |
| | | //æ¯è¾ç¬¦ä¸º'='ä¸ç¶æä¸ºä¸åæ ¼æ¶ï¼å¦ææ£éªå¼<=ä¸é弿¶æè
æ£éªå¼=ç®æ 弿¶å¤å®ä¸åæ ¼ï¼ |
| | | //ä¸éå¼ä¸º0æ¶ï¼æ£éªå¼=ç®æ å¼å¤å®ä¸åæ ¼ï¼ |
| | | //ä¸éå¼ä¸ä¸º0ï¼æ£éªå¼=ç®æ å¼&&ä¸éå¼>=ç®æ å¼&&ä¸éå¼<=ç®æ å¼ å¤å®ä¸åæ ¼ |
| | | if (((Number(HInspectVal) <= Number(HUpLimit) && Number(HInspectVal) >= Number(HDownLimit)) || Number(HUpLimit) == 0) && Number(HInspectVal) == Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } |
| | | break; |
| | | case '>': |
| | | //æ¯è¾ç¬¦ä¸º'>'ä¸ç¶æä¸ºä¸åæ ¼æ¶ï¼å¦ææ£éªå¼>ä¸éå¼å¤å®ä¸åæ ¼ï¼å¦ååæ ¼ |
| | | if (Number(HInspectVal) > Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } |
| | | break; |
| | | case '>=': |
| | | //æ¯è¾ç¬¦ä¸º'>='ä¸ç¶æä¸ºä¸åæ ¼æ¶ï¼å¦ææ£éªå¼>=ä¸éå¼å¤å®ä¸åæ ¼ï¼å¦ååæ ¼ |
| | | if (Number(HInspectVal) >= Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } |
| | | break; |
| | | case '<': |
| | | //æ¯è¾ç¬¦ä¸º'<'ä¸ç¶æä¸ºä¸åæ ¼æ¶ï¼å¦ææ£éªå¼<ä¸éå¼å¤å®ä¸åæ ¼ï¼å¦ååæ ¼ |
| | | if (Number(HInspectVal) < Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } |
| | | break; |
| | | case '<=': |
| | | //æ¯è¾ç¬¦ä¸º'<='ä¸ç¶æä¸ºä¸åæ ¼æ¶ï¼å¦ææ£éªå¼<=ä¸éå¼å¤å®ä¸åæ ¼ï¼å¦ååæ ¼ |
| | | if (Number(HInspectVal) <= Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } |
| | | break |
| | | case '<>': |
| | | //æ¯è¾ç¬¦ä¸º'<>'ä¸ç¶æä¸ºä¸åæ ¼æ¶ï¼å¦ææ£éªå¼<>ä¸éå¼å¤å®ä¸åæ ¼ï¼å¦ååæ ¼ |
| | | if (Number(HInspectVal) < Number(HTargetVal) || Number(HInspectVal) > Number(HTargetVal)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } |
| | | break; |
| | | case 'between': |
| | | //æ¯è¾ç¬¦ä¸º'between'ä¸ç¶æä¸ºä¸åæ ¼æ¶ï¼å¦ææ£éªå¼å¨ä¸éå¼ä¸ä¸éå¼ä¹é´å¤å®ä¸åæ ¼ï¼å¦ååæ ¼ |
| | | if (Number(HInspectVal) >= Number(HDownLimit) || Number(HInspectVal) <= Number(HUpLimit)) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } |
| | | break; |
| | | default: break; |
| | | } |
| | | } |
| | | } |
| | | //#endregion |
| | | //#regionãå
¶ä»åææ¹æ³ã |
| | | else if (HAnalysisMethod == 3) { |
| | | //ç¶æä¸ºåæ ¼ |
| | | if (HStatus == 1) { |
| | | switch (HComparator) { |
| | | case '=': |
| | | //æ¯è¾ç¬¦ä¸º'='ä¸ç¶æä¸ºåæ ¼æ¶ï¼å¦ææ£éªå¼å
容ä¸ç®æ å¼å
容ä¸è´å¤å®åæ ¼ï¼ |
| | | if (HInspectVal.toString() == HTargetVal.toString()) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } |
| | | break; |
| | | default: break; |
| | | } |
| | | } |
| | | else { //ç¶æä¸ºä¸åæ ¼ |
| | | switch (HComparator) { |
| | | case '=': |
| | | //æ¯è¾ç¬¦ä¸º'='ä¸ç¶æä¸ºåæ ¼æ¶ï¼å¦ææ£éªå¼å
容ä¸ç®æ å¼å
容ä¸è´å¤å®ä¸åæ ¼ï¼ |
| | | if (HInspectVal.toString() == HTargetVal.toString()) { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(2); //ä¸åæ ¼ |
| | | } else { |
| | | $("#HResult" + (Number(HEntryID) + Number(1))).val(1); //åæ ¼ |
| | | } |
| | | break; |
| | | default: break; |
| | | } |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | form.render('select'); |
| | | //è·å表ä½ç»è®ºæ°æ®èµå¼ç»æ£éªç»æ |
| | | var HEntryID = $('#HEntryID').val(); |
| | | var HInspectResultToSee = $("#HResult" + HEntryID).val() |
| | | if (HInspectResultToSee == 1) { |
| | | HInspectResultToSee = "åæ ¼" |
| | | $("#HInspectResultToSee").css("background-color", "#CEE3F2");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | $("#HInspectResultToSee2").css("background-color", "#CEE3F2");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | } else { |
| | | HInspectResultToSee = "ä¸åæ ¼" |
| | | $("#HInspectResultToSee").css("background-color", "#F0D6E3");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | $("#HInspectResultToSee2").css("background-color", "#F0D6E3");//æ¹åæ£éªç»æè¾å
¥æ¡èæ¯é¢è² |
| | | } |
| | | $("#HInspectResultToSee").val(HInspectResultToSee); |
| | | $("#HInspectResultToSee2").val(HInspectResultToSee); |
| | | }; |
| | | //#endregion |
| | | |
| | | //#regionãèµå¼ä¸åæ¾ã |
| | | function Assignment(nowindex, dataindex) { |
| | | if (SummaryIndex.indexOf(nowindex) == -1) { |
| | | var dataobj = { |
| | | HEntryID: $("#HEntryID").val(), //è¡å· |
| | | HStatus: $("#HStatus").val(), //ç¶æ |
| | | HSampleSchemeID: $("#HSampleSchemeID").val(), //æ½æ ·æ¹æ¡ID |
| | | HSampleSchemeName: $("#HSampleSchemeName").val(), //æ½æ ·æ¹æ¡ |
| | | //xxx: $("#xxx").val(), |
| | | HUnitID: $("#HUnitID").val(), //åä½ID |
| | | HUnit: $("#HUnit").val(), //åä½ |
| | | HInspectVal: $("#HInspectVal").val(), //æ£éªå¼ |
| | | HTargetVal: $("#HTargetVal").val(), //ç®æ å¼ |
| | | HUpLimit: $("#HUpLimit").val(), //ä¸éå¼ |
| | | HDownLimit: $("#HDownLimit").val(), //ä¸éå¼ |
| | | HUpOffSet: $("#HUpOffSet").val(), //ä¸åå·® |
| | | HDownOffSet: $("#HDownOffSet").val(), //ä¸åå·® |
| | | HSampleDamageQty: $("#HSampleDamageQty").val(), //æ ·æ¬ç ´åæ° |
| | | HSampleQty: $("#HSampleQty").val(), //æ ·æ¬é |
| | | HAcceptQty: $("#HAcceptQty").val(), //å
è®¸æ° |
| | | HInspectionLevel: $("#HInspectionLevel").val(), //æ£éªæ°´å¹³ |
| | | HRejectQty: $("#HRejectQty").val(), //æç»æ° |
| | | HStrictness: $("#HStrictness").val(), //ä¸¥æ ¼åº¦ |
| | | HSampleUnRightQty: $("#HSampleUnRightQty").val(), //æ ·æ¬ä¸åæ ¼æ° |
| | | HAQL: $("#HAQL").val(), //AQL |
| | | HSamplingType: $("#HSamplingType").val(), |
| | | |
| | | HSampleQty: $("#HSampleQty").val(), //æ ·æ¬é |
| | | HInspectResultToSee: $("#HInspectResultToSee").val(), //æ£éªç»æ |
| | | HInspectResultToSee2: $("#HInspectResultToSee2").val(), //æ£éªç»æ2 |
| | | HSampleUnRightQty: $("#HSampleUnRightQty").val(), //æ ·æ¬ä¸åæ ¼æ° |
| | | HUnitID: $("#HUnitID").val(), //åä½ID |
| | | HUnitName: $("#HUnitName").val(), //åä½ |
| | | HInspectValB: $("#HInspectValB").val(), //æ£éªå¼ID |
| | | HInspectVal: $("#HInspectVal").val(), //æ£éªå¼ |
| | | HTargetValB: $("#HTargetValB").val(), //ç®æ å¼ID |
| | | HTargetVal: $("#HTargetVal").val(), //ç®æ å¼ |
| | | HUpLimit: $("#HUpLimit").val(), //ä¸éå¼ |
| | | HDownLimit: $("#HDownLimit").val(), //ä¸éå¼ |
| | | HUpOffSet: $("#HUpOffSet").val(), //ä¸åå·® |
| | | HDownOffSet: $("#HDownOffSet").val(), //ä¸åå·® |
| | | }; |
| | | |
| | | //è·åææ¬æ¡å¼ |
| | | var maindata = table.cache['mainTable']; |
| | | //èµå¼ï¼å¨åæ°æ® |
| | | maindata[dataindex].HStatus = dataobj.HStatus; |
| | | maindata[dataindex].HSampleSchemeID = dataobj.HSampleSchemeID; |
| | | maindata[dataindex].HUnitID = dataobj.HUnitID; |
| | | maindata[dataindex].HInspectVal = dataobj.HInspectVal; |
| | | maindata[dataindex].HTargetVal = dataobj.HTargetVal; |
| | | maindata[dataindex].HUpLimit = dataobj.HUpLimit; |
| | | maindata[dataindex].HDownLimit = dataobj.HDownLimit; |
| | | maindata[dataindex].HUpOffSet = dataobj.HUpOffSet; |
| | | maindata[dataindex].HDownOffSet = dataobj.HDownOffSet; |
| | | maindata[dataindex].HSampleDamageQty = dataobj.HSampleDamageQty; |
| | | maindata[dataindex].HSampleSchemeName = dataobj.HSampleSchemeName; |
| | | maindata[dataindex].HUnit = dataobj.HUnit; |
| | | maindata[dataindex].HSampleQty = dataobj.HSampleQty; |
| | | maindata[dataindex].HAcceptQty = dataobj.HAcceptQty; |
| | | maindata[dataindex].HInspectionLevel = dataobj.HInspectionLevel; |
| | | maindata[dataindex].HRejectQty = dataobj.HRejectQty; |
| | | maindata[dataindex].HStrictness = dataobj.HStrictness; |
| | | maindata[dataindex].HSampleUnRightQty = dataobj.HSampleUnRightQty; |
| | | maindata[dataindex].HAQL = dataobj.HAQL; |
| | | maindata[dataindex].HSamplingType = dataobj.HSamplingType; |
| | | |
| | | maindata[dataindex].HSampleQty = dataobj.HSampleQty; |
| | | maindata[dataindex].HInspectResultToSee = dataobj.HInspectResultToSee; |
| | | maindata[dataindex].HInspectResultToSee2 = dataobj.HInspectResultToSee2; |
| | | maindata[dataindex].HSampleUnRightQty = dataobj.HSampleUnRightQty; |
| | | maindata[dataindex].HUnitID = dataobj.HUnitID; |
| | | maindata[dataindex].HUnitName = dataobj.HUnitName; |
| | | maindata[dataindex].HInspectValB = dataobj.HInspectValB; |
| | | maindata[dataindex].HInspectVal = dataobj.HInspectVal; |
| | | maindata[dataindex].HTargetValB = dataobj.HTargetValB; |
| | | maindata[dataindex].HTargetVal = dataobj.HTargetVal; |
| | | maindata[dataindex].HUpLimit = dataobj.HUpLimit; |
| | | maindata[dataindex].HDownLimit = dataobj.HDownLimit; |
| | | maindata[dataindex].HUpOffSet = dataobj.HUpOffSet; |
| | | maindata[dataindex].HDownOffSet = dataobj.HDownOffSet; |
| | | |
| | | SummaryIndex.push(nowindex); |
| | | |
| | | $("#HSampleSchemeID").val(0); |
| | | $("#HSampleSchemeName").val(""); |
| | | //xxx: $("#xxx").val(); |
| | | $("#HUnitID").val(0); |
| | | $("#HUnit").val(""); |
| | | $("#HInspectVal").val(""); |
| | | $("#HTargetVal").val(""); |
| | | $("#HUpLimit").val(0); |
| | | $("#HDownLimit").val(0); |
| | | $("#HUpOffSet").val(0); |
| | | $("#HDownOffSet").val(0); |
| | | $("#HSampleDamageQty").val("") |
| | | $("#HSampleQty").val("") |
| | | $("#HSampleQty2").val("") |
| | | $("#HAcceptQty").val("") |
| | | $("#HInspectionLevel").val("") |
| | | $("#HRejectQty").val("") |
| | | $("#HStrictness").val("") |
| | | $("#HSampleUnRightQty").val("") |
| | | $("#HSampleUnRightQty2").val("") |
| | | $("#HAQL").val("") |
| | | $("#HSamplingType").val("") |
| | | $("#HSampleQty").val("") |
| | | $("#HInspectResultToSee").val("") |
| | | $("#HInspectResultToSee2").val("") |
| | | $("#HSampleUnRightQty").val("") |
| | | $("#HUnitID").val("0") |
| | | $("#HUnitName").val("") |
| | | $("#HInspectValB").val("0") |
| | | $("#HInspectVal").val("") |
| | | $("#HTargetValB").val("0") |
| | | $("#HTargetVal").val("") |
| | | $("#HUpLimit").val("0") |
| | | $("#HDownLimit").val("0") |
| | | $("#HUpOffSet").val("0") |
| | | $("#HDownOffSet").val("0") |
| | | |
| | | } else { //è¡¨ä½ææ¬æ¡å¼åæ¾ |
| | | //è·åææ¬æ¡å¼ |
| | | var maindata = table.cache['mainTable']; |
| | | |
| | | var dataobj = { |
| | | HEntryID: $("#HEntryID").val(), //è¡å· |
| | | HStatus: $("#HStatus").val(), //ç¶æ |
| | | HSampleSchemeID: $("#HSampleSchemeID").val(), //æ½æ ·æ¹æ¡ID |
| | | HSampleSchemeName: $("#HSampleSchemeName").val(), //æ½æ ·æ¹æ¡ |
| | | //xxx: $("#xxx").val(), |
| | | HUnitID: $("#HUnitID").val(), //åä½ID |
| | | HUnit: $("#HUnit").val(), //åä½ |
| | | HInspectVal: $("#HInspectVal").val(), //æ£éªå¼ |
| | | HTargetVal: $("#HTargetVal").val(), //ç®æ å¼ |
| | | HUpLimit: $("#HUpLimit").val(), //ä¸éå¼ |
| | | HDownLimit: $("#HDownLimit").val(), //ä¸éå¼ |
| | | HUpOffSet: $("#HUpOffSet").val(), //ä¸åå·® |
| | | HDownOffSet: $("#HDownOffSet").val(), //ä¸åå·® |
| | | HSampleDamageQty: $("#HSampleDamageQty").val(), //æ ·æ¬ç ´åæ° |
| | | HSampleQty: $("#HSampleQty").val(), //æ ·æ¬é |
| | | HAcceptQty: $("#HAcceptQty").val(), //å
è®¸æ° |
| | | HInspectionLevel: $("#HInspectionLevel").val(), //æ£éªæ°´å¹³ |
| | | HRejectQty: $("#HRejectQty").val(), //æç»æ° |
| | | HStrictness: $("#HStrictness").val(), //ä¸¥æ ¼åº¦ |
| | | HSampleUnRightQty: $("#HSampleUnRightQty").val(), //æ ·æ¬ä¸åæ ¼æ° |
| | | HAQL: $("#HAQL").val(), //AQL |
| | | HSamplingType: $("#HSamplingType").val(), |
| | | |
| | | HSampleQty: $("#HSampleQty").val(), //æ ·æ¬é |
| | | HInspectResultToSee: $("#HInspectResultToSee").val(), //æ£éªç»æ |
| | | HInspectResultToSee2: $("#HInspectResultToSee2").val(), //æ£éªç»æ2 |
| | | HSampleUnRightQty: $("#HSampleUnRightQty").val(), //æ ·æ¬ä¸åæ ¼æ° |
| | | HUnitID: $("#HUnitID").val(), //åä½ID |
| | | HUnitName: $("#HUnitName").val(), //åä½ |
| | | HInspectValB: $("#HInspectValB").val(), //æ£éªå¼ID |
| | | HInspectVal: $("#HInspectVal").val(), //æ£éªå¼ |
| | | HTargetValB: $("#HTargetValB").val(), //ç®æ å¼ID |
| | | HTargetVal: $("#HTargetVal").val(), //ç®æ å¼ |
| | | HUpLimit: $("#HUpLimit").val(), //ä¸éå¼ |
| | | HDownLimit: $("#HDownLimit").val(), //ä¸éå¼ |
| | | HUpOffSet: $("#HUpOffSet").val(), //ä¸åå·® |
| | | HDownOffSet: $("#HDownOffSet").val(), //ä¸åå·® |
| | | }; |
| | | //èµå¼ï¼å¨åæ°æ® |
| | | maindata[dataindex].HStatus = dataobj.HStatus; |
| | | maindata[dataindex].HSampleSchemeID = dataobj.HSampleSchemeID; |
| | | maindata[dataindex].HUnitID = dataobj.HUnitID; |
| | | maindata[dataindex].HInspectVal = dataobj.HInspectVal; |
| | | maindata[dataindex].HTargetVal = dataobj.HTargetVal; |
| | | maindata[dataindex].HUpLimit = dataobj.HUpLimit; |
| | | maindata[dataindex].HDownLimit = dataobj.HDownLimit; |
| | | maindata[dataindex].HUpOffSet = dataobj.HUpOffSet; |
| | | maindata[dataindex].HDownOffSet = dataobj.HDownOffSet; |
| | | maindata[dataindex].HSampleDamageQty = dataobj.HSampleDamageQty; |
| | | maindata[dataindex].HSampleSchemeName = dataobj.HSampleSchemeName; |
| | | maindata[dataindex].HUnit = dataobj.HUnit; |
| | | maindata[dataindex].HSampleQty = dataobj.HSampleQty; |
| | | maindata[dataindex].HAcceptQty = dataobj.HAcceptQty; |
| | | maindata[dataindex].HInspectionLevel = dataobj.HInspectionLevel; |
| | | maindata[dataindex].HRejectQty = dataobj.HRejectQty; |
| | | maindata[dataindex].HStrictness = dataobj.HStrictness; |
| | | maindata[dataindex].HSampleUnRightQty = dataobj.HSampleUnRightQty; |
| | | maindata[dataindex].HAQL = dataobj.HAQL; |
| | | maindata[dataindex].HSamplingType = dataobj.HSamplingType; |
| | | |
| | | maindata[dataindex].HSampleQty = dataobj.HSampleQty; |
| | | maindata[dataindex].HInspectResultToSee = dataobj.HInspectResultToSee; |
| | | maindata[dataindex].HInspectResultToSee2 = dataobj.HInspectResultToSee2; |
| | | maindata[dataindex].HSampleUnRightQty = dataobj.HSampleUnRightQty; |
| | | maindata[dataindex].HUnitID = dataobj.HUnitID; |
| | | maindata[dataindex].HUnitName = dataobj.HUnitName; |
| | | maindata[dataindex].HInspectValB = dataobj.HInspectValB; |
| | | maindata[dataindex].HInspectVal = dataobj.HInspectVal; |
| | | maindata[dataindex].HTargetValB = dataobj.HTargetValB; |
| | | maindata[dataindex].HTargetVal = dataobj.HTargetVal; |
| | | maindata[dataindex].HUpLimit = dataobj.HUpLimit; |
| | | maindata[dataindex].HDownLimit = dataobj.HDownLimit; |
| | | maindata[dataindex].HUpOffSet = dataobj.HUpOffSet; |
| | | maindata[dataindex].HDownOffSet = dataobj.HDownOffSet; |
| | | |
| | | //åæ¾ |
| | | $("#HSampleSchemeID").val(maindata[nowindex].HSampleSchemeID); |
| | | $("#HSampleSchemeName").val(maindata[nowindex].HSampleSchemeName); |
| | | //xxx: $("#xxx").val(); |
| | | $("#HUnitID").val(maindata[nowindex].HUnitID); |
| | | $("#HUnit").val(maindata[nowindex].HUnit); |
| | | $("#HInspectVal").val(maindata[nowindex].HInspectVal); |
| | | $("#HTargetVal").val(maindata[nowindex].HTargetVal); |
| | | $("#HUpLimit").val(maindata[nowindex].HUpLimit); |
| | | $("#HDownLimit").val(maindata[nowindex].HDownLimit); |
| | | $("#HUpOffSet").val(maindata[nowindex].HUpOffSet); |
| | | $("#HDownOffSet").val(maindata[nowindex].HDownOffSet); |
| | | $("#HSampleDamageQty").val(maindata[nowindex].HSampleDamageQty); |
| | | $("#HSampleQty").val(maindata[nowindex].HSampleQty); |
| | | $("#HSampleQty2").val(maindata[nowindex].HSampleQty); |
| | | $("#HAcceptQty").val(maindata[nowindex].HAcceptQty); |
| | | $("#HInspectionLevel").val(maindata[nowindex].HInspectionLevel); |
| | | $("#HRejectQty").val(maindata[nowindex].HRejectQty); |
| | | $("#HStrictness").val(maindata[nowindex].HStrictness); |
| | | $("#HSampleUnRightQty").val(maindata[nowindex].HSampleUnRightQty); |
| | | $("#HSampleUnRightQty2").val(maindata[nowindex].HSampleUnRightQty); |
| | | $("#HAQL").val(maindata[nowindex].HAQL); |
| | | $("#HSamplingType").val(maindata[nowindex].HSamplingType); |
| | | $("#HSampleQty").val(maindata[nowindex].HSampleQty); |
| | | $("#HInspectResultToSee").val(maindata[nowindex].HInspectResultToSee); |
| | | $("#HInspectResultToSee2").val(maindata[nowindex].HInspectResultToSee2); |
| | | $("#HSampleUnRightQty").val(maindata[nowindex].HSampleUnRightQty); |
| | | $("#HUnitID").val(maindata[nowindex].HUnitID); |
| | | $("#HUnitName").val(maindata[nowindex].HUnitName); |
| | | $("#HInspectValB").val(maindata[nowindex].HInspectValB); |
| | | $("#HInspectVal").val(maindata[nowindex].HInspectVal); |
| | | $("#HTargetValB").val(maindata[nowindex].HTargetValB); |
| | | $("#HTargetVal").val(maindata[nowindex].HTargetVal); |
| | | $("#HUpLimit").val(maindata[nowindex].HUpLimit); |
| | | $("#HDownLimit").val(maindata[nowindex].HDownLimit); |
| | | $("#HUpOffSet").val(maindata[nowindex].HUpOffSet); |
| | | $("#HDownOffSet").val(maindata[nowindex].HDownOffSet); |
| | | |
| | | |
| | | var HInterID = $("#HInterID").val(); |
| | | var HEntryID = $("#HEntryID").val(); |
| | | isHavingCount = false; |
| | | //åæ¾æ£éªå¼ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/QC_ValueTable/getValueList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HInterID": HInterID, "HEntryID": HEntryID, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | isHavingCount = true |
| | | |
| | | var data = result.data; |
| | | |
| | | var rowdata = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | //å表 èµå¼ |
| | | rowdata.push({ |
| | | "HSEQ": data[i]["HSEQ"], "HInSpectResult": data[i]["HInSpectResult"], "HInSpectValueB": data[i]["HInSpectValueB"], "HInSpectValueT": data[i]["HInSpectValueT"], "HInSpectValue": data[i]["HInSpectValue"] |
| | | }); |
| | | } |
| | | |
| | | option_Value.data = rowdata; |
| | | table.render(option_Value); |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | $('#HInSpectResult' + (i + 1)).find("option[value='" + result.data[i].HInSpectResult + "']").attr("selected", true); |
| | | } |
| | | |
| | | //IsHide(table.cache["mainTable"][HEntryID - 1].HAnalysisMethod); //éèæ£æµå¼å段 |
| | | form.render('select'); |
| | | } else { |
| | | //layer.msg(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#regionãéèæ£æµå¼å段ã |
| | | function IsHide(HAnalysisMethod_Value) { |
| | | if (HAnalysisMethod_Value == 1) { //妿éä¸ã宿§åæãï¼åéèå®éãå
¶ä»åæ |
| | | option_Value.cols[0][3].hide = false; //宿§ |
| | | option_Value.cols[0][4].hide = true; //å®é |
| | | option_Value.cols[0][5].hide = true; //å
¶ä» |
| | | |
| | | $("#HComparator").attr("disabled", true); //æ¯è¾ç¬¦æ¹ä¸ºä¸å¯ç¼è¾ |
| | | $("#HUpLimit").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸éå¼è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HDownLimit").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸éå¼è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HUpOffSet").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸åå·®è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HDownOffSet").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸åå·®è¾å
¥æ¡èæ¯é¢è² |
| | | form.render("select"); |
| | | $('#btnSearchInspectValB').removeClass("layui-btn-disabled").attr("disabled", false);//æ£éªå¼æé®å¯ç¨ |
| | | $('#btnSearchTargetValB').removeClass("layui-btn-disabled").attr("disabled", false);//ç®æ 弿é®å¯ç¨ |
| | | |
| | | } else if (HAnalysisMethod_Value == 2) { //妿éä¸ãå®éåæãï¼åéè宿§ãå
¶ä»åæ |
| | | option_Value.cols[0][4].hide = false; //å®é |
| | | option_Value.cols[0][3].hide = true; //宿§ |
| | | option_Value.cols[0][5].hide = true; //å
¶ä» |
| | | |
| | | $("#HUpLimit").attr("readOnly", false).css("background-color", ""); //ä¸é弿¹ä¸ºå¯ç¼è¾ |
| | | $("#HDownLimit").attr("readOnly", false).css("background-color", ""); //ä¸é弿¹ä¸ºå¯ç¼è¾ |
| | | $("#HUpOffSet").attr("readOnly", false).css("background-color", ""); //ä¸åå·®æ¹ä¸ºå¯ç¼è¾ |
| | | $("#HDownOffSet").attr("readOnly", false).css("background-color", ""); //ä¸åå·®æ¹ä¸ºå¯ç¼è¾ |
| | | $("#HInspectVal").attr("readOnly", false).css("background-color", ""); //æ£éªå¼æ¹ä¸ºå¯ç¼è¾ |
| | | $("#HTargetVal").attr("readOnly", false).css("background-color", ""); //ç®æ 弿¹ä¸ºå¯ç¼è¾ |
| | | $('#btnSearchInspectValB').addClass("layui-btn-disabled").attr("disabled", true);//æ£éªå¼æé® |
| | | $('#btnSearchTargetValB').addClass("layui-btn-disabled").attr("disabled", true);//ç®æ å¼æé® |
| | | $("#HComparator").attr("disabled", false); //æ¯è¾ç¬¦æ¹ä¸ºå¯ç¼è¾ |
| | | form.render("select"); |
| | | |
| | | } else if (HAnalysisMethod_Value == 3) { //妿éä¸ãå
¶ä»åæãï¼åéèå®éã宿§åæ |
| | | option_Value.cols[0][5].hide = false; //å
¶ä» |
| | | option_Value.cols[0][3].hide = true; //宿§ |
| | | option_Value.cols[0][4].hide = true; //å®é |
| | | |
| | | $('#btnSearchInspectValB').addClass("layui-btn-disabled").attr("disabled", true);//æ£éªå¼æé® |
| | | $('#btnSearchTargetValB').addClass("layui-btn-disabled").attr("disabled", true);//ç®æ å¼æé® |
| | | $("#HUpOffSet").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸åå·®è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HDownOffSet").css("background-color", "#E8E8E8").attr("readOnly", true);//æ¹åä¸åå·®è¾å
¥æ¡èæ¯é¢è² |
| | | $("#HUpLimit").attr("readOnly", false).css("background-color", ""); //ä¸é弿¹ä¸ºå¯ç¼è¾ |
| | | $("#HDownLimit").attr("readOnly", false).css("background-color", ""); //ä¸é弿¹ä¸ºå¯ç¼è¾ |
| | | $("#HInspectVal").attr("readOnly", false).css("background-color", ""); //æ£éªå¼æ¹ä¸ºå¯ç¼è¾ |
| | | $("#HTargetVal").attr("readOnly", false).css("background-color", ""); //ç®æ 弿¹ä¸ºå¯ç¼è¾ |
| | | $('#btnSearchInspectValB').addClass("layui-btn-disabled").attr("disabled", true);//æ£éªå¼æé® |
| | | $('#btnSearchTargetValB').addClass("layui-btn-disabled").attr("disabled", true);//ç®æ å¼æé® |
| | | $("#HComparator").attr("disabled", true); //æ¯è¾ç¬¦æ¹ä¸ºä¸å¯ç¼è¾ |
| | | form.render("select"); |
| | | } |
| | | table.render(option_Value); |
| | | } |
| | | //#endregion |
| | | |
| | | //#regionãæ¹åéä¸è¡é¢è²ã |
| | | function check_row(obj) { |
| | | if (trindex != "") { |
| | | $("tr[data-index = " + (trindex) + "] ").attr({ "style": "background:" });//åæ¶å½åtré¢è² |
| | | trindex = ""; |
| | | } |
| | | |
| | | //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);//åæ¶å¤éæ¡é䏿 ·å¼ |
| | |
| | | } |
| | | form.render('checkbox'); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region ãåºå¼ä»£ç ã |
| | | table.on('edit(mainTable)', function (obj) { |
| | | // åå
æ ¼ç¼è¾ä¹åçå¼ |
| | | var oldText = $(this).prev().text(); |
| | | var value = obj.value //å¾å°ä¿®æ¹åçå¼ |
| | | , data = obj.data //å¾å°æå¨è¡ææé®å¼ |
| | | , field = obj.field; //å¾å°å段 |
| | | //layer.msg('[ID: ' + data.id + '] ' + field + ' åæ®µæ´æ¹ä¸ºï¼' + value); |
| | | |
| | | var HInspectVal = $("#HInspectVal").val(); //æ£éªå¼ |
| | | var HTargetVal = $("#HTargetVal").val(); //ç®æ å¼ |
| | | var HComparator = $("#HComparator").val(); //æ¯è¾ç¬¦ |
| | | var HEntryID = $("#HEntryID").val() - 1; |
| | | var HAnalysisMethod = table.cache["mainTable"][HEntryID].HAnalysisMethod; //åææ¹æ³ |
| | | console.log(HAnalysisMethod); |
| | | switch (field) { |
| | | case "HInspectVal": //æ£éªå¼ |
| | | value = isNaN(value) ? 0 : value; |
| | | if (HInspectVal) { |
| | | |
| | | } |
| | | |
| | | break; |
| | | case "HTargetVal": //ç®æ å¼ |
| | | value = isNaN(value) ? 0 : value; |
| | | |
| | | |
| | | break; |
| | | default: |
| | | } |
| | | }); |
| | | |
| | | function createArr(rowIndex) { |
| | | var arr_value = table.cache['ValueTable']; //è·åæ£æµå¼åå
æ ¼æ°æ® |
| | |
| | | Array.push(arr_value_add);//æ°ç»ä¸ºç©ºåä¸å夿ï¼ç´æ¥ææ°æ®æ·»å è¿æ°ç» |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | }); |
| | | |
| | | |
| | | //å®ä¹å
¨å±åéHMainMaterID |
| | | var subProcName, subProcNumber, subProcID, |
| | | subWorkCenterName, subWorkCenterNumber, subWorkCenterID, |
| | | subSupName, subSupNumber, subSupID, |
| | | HReasonName, ReasonID, EmpName, |
| | | ZRProcName, QRName; |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Issue"><i class="layui-icon layui-icon-file-b"></i>ä¸è¾¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CancelIssue"><i class="layui-icon layui-icon-file-b"></i>åä¸è¾¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SendWork"><i class="layui-icon layui-icon-file-b"></i>å·¥åºæ´¾å·¥</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_WWSendWork"><i class="layui-icon layui-icon-file-b"></i>å·¥åºå§å¤æ´¾å·¥</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_PlanDate"><i class="layui-icon layui-icon-file-b"></i>ææ´¾æ¥æ</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-file-b"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | |
| | | break; |
| | | //å·¥åºæ´¾å·¥ |
| | | case 'set_SendWork': set_SendWork(); |
| | | break; |
| | | //å·¥åºå§å¤æ´¾å·¥ |
| | | case 'set_WWSendWork': set_WWSendWork(); |
| | | break; |
| | | //ææ´¾æ¥æ |
| | | case 'set_PlanDate': set_PlanDate(); |
| | |
| | | layer.msg('è¯·éæ©æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | |
| | | //å·¥åºå§å¤æ´¾å·¥ |
| | | function set_WWSendWork() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | var array = []; |
| | | var interid = []; |
| | | var ieid = []; |
| | | for (let i = 0; i < data.length; i++) { |
| | | array.push(checkStatus.data[i]["HEntryID"]); //è·åæµè½¬å¡å表ID |
| | | interid.push(checkStatus.data[i]["hmainid"]); |
| | | ieid.push(checkStatus.data[i]["hmainid"].toString() + checkStatus.data[i]["HEntryID"].toString()); |
| | | //夿忮巿¯å¦ç¸å |
| | | //if (checkStatus.data[0]["åæ®å·"] != checkStatus.data[i]["åæ®å·"]) { |
| | | // layer.msg("å¾éäºä¸åæµè½¬å¡å·ï¼è¯·ç¡®è®¤"); |
| | | // return; |
| | | //} |
| | | } |
| | | var HEntryID = array.join(",");//ç¨éå·å岿°ç» |
| | | var HInterID = interid.join(","); |
| | | var HIeID = ieid.join(","); |
| | | if (checkStatus.data.length >= 1) { |
| | | if (checkStatus.data[0]["æµæ°´å·"] != "9999") { |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "å·¥åºå§å¤æ´¾å·¥åç¼è¾" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["100%", "100%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../车é´ç®¡ç/å·¥åºæµè½¬å¡/WW_EntrustWorkOrderBillEdit.html?OperationType=1&linterid=' + HInterID.toString() + '&HEntryID=' + HEntryID.toString() + '&HIeID=' + HIeID, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('派工工åºä¸è½æ¯è½¬å·¥åºï¼'); |
| | | } |
| | | } else { |
| | | layer.msg('è¯·éæ©æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | |
| | | //#region ææ´¾æ¥æ |
| | | function set_PlanDate() { |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æç¼ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterName" id="HMaterName"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | var HDate = $("#HDate").val();;//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | var HMaterName = $("#HMaterName").val();//ç©æ |
| | | var HMaterNumber = $("#HMaterNumber").val();//ç©æ |
| | | var HDeptName = $("#HDeptName").val();//è½¦é´ |
| | | var HProcExchBillNo = $("#HProcExchBillNo").val();//æµè½¬å¡å· |
| | | var ColName = $("#ColName").val();//å¤éæ¡ |
| | |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (HMaterName) { |
| | | sWhere += " and 产å代ç like '%" + HMaterName + "%'"; |
| | | if (HMaterNumber) { |
| | | sWhere += " and 产å代ç like '%" + HMaterNumber + "%'"; |
| | | } |
| | | if (HDeptName && HDeptName != "0") { |
| | | sWhere += " and ç产车é´ID = '" + HDeptName + "'"; |
| | |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));;//ç»ææ¥æ |
| | | $("#HBillNo").val("");//åæ®å· |
| | | $("#HMaterName").val("");//ç©æ |
| | | $("#HMaterNumber").val("");//ç©æ |
| | | $("#HDeptName").val("0");//è½¦é´ |
| | | $("#HProcExchBillNo").val("");//æµè½¬å¡å· |
| | | $("#ColContent").val(""); |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>å·¥åºå§å¤æ´¾å·¥ç¼è¾</title> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style> |
| | | .main-btn { /*头é¨ä¸»æé®*/ |
| | | padding: 0 2px; /*è°æ´æé®å·¦å³ç©ºé大å°*/ |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | .btn-title { |
| | | font-size: 16px; |
| | | } |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | .layui-table-cell { |
| | | overflow: visible !important; |
| | | } |
| | | /* 使å¾ä¸ææ¡ä¸åå
æ ¼å好åé */ |
| | | td .layui-form-select { |
| | | margin-top: -10px; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | } |
| | | |
| | | .layui-form-item .layui-inline { |
| | | margin-top: 5px; |
| | | margin-bottom: 5px; |
| | | margin-right: 0px; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | width: 25%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card" style="padding: 15px;"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" lay-filter="component-form-group" action=""> |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="btnSave" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">éåº</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print">æå°</button>--> |
| | | <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">éèå设置</button>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;" class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;">å
¶ä»ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--åºæ¬ä¿¡æ¯--> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">ç³è¯·é¨é¨</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HDeptName" id="HDeptName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchDept" id="btnSearchDept" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">å¤åä¾åºå</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HSupName" id="HSupName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HSupID" id="HSupID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchSup" id="btnSearchSup" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline"> |
| | | <label class="layui-form-label">æ´¾å·¥æ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" name="HDate" id="HDate"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs6 layui-inline"> |
| | | <label class="layui-form-label" style="width:12.5%">夿³¨</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HRemark" id="HRemark" style="width:600px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3 layui-inline" style="display:none"> |
| | | <label class="layui-form-label">æºåä¿¡æ¯</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" value="0"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" value="0"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" value="0"> |
| | | <input type="hidden" name="HMainSourceBillNo" id="HMainSourceBillNo" value=""> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--å
¶ä»ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item"> |
| | | <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="HMaker" id="HMaker" 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="HChecker" id="HChecker" 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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HMakeDate" id="HMakeDate" 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="HCheckDate" id="HCheckDate" 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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HUpDater" id="HUpDater" 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="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HUpDateDate" id="HUpDateDate" 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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <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> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
| | | <script type="text/html" id="barDemo"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | //#region å
Œ
±åé |
| | | |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | var option; |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | var params = get_UrlVars(); |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | var OperationType = -1;//æä½ç±»å |
| | | } else { |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HEntryID = params[params[2]];//æºååid |
| | | var HIeID = params[params[3]]; //æºåid + æºååid |
| | | } |
| | | |
| | | //å·¥åºå§å¤æ´¾å·¥æ°å¢ |
| | | if (OperationType == 1) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3740' }, |
| | | success: function (d) { |
| | | //$("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | } |
| | | }); |
| | | //æ¥è¯¢å·¥åºæµè½¬å¡ |
| | | get_ProcessExchange(); |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | } else if (OperationType == 3) { |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | RoadBillMain(linterid); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | //æ°å¢è¡è¡¨æ ¼æ°æ® |
| | | var NewRow = { |
| | | "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HSourceBillType": "", |
| | | "HOrderBillNo": '', "HMaterID": 0, "HMaterNumber": '', "HMaterName": "", "HMaterModel": "", "HQty": 0, "HEntrustType": "", "HNextProcName": "", |
| | | "HPrice": 0, "HOutQty": 0, "HInQty": 0, "HInDate": new Date(), "HWorkProcFlow": '', "HMaterLenModel": "", "HMaterQty": 0, "HRemark": '' |
| | | }; |
| | | |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | break; |
| | | case 'btn-CopyLine': |
| | | var copydata = JSON.stringify(data); |
| | | if (data.length <= 0) { |
| | | layer.msg("è¯·éæ©éè¦å¤å¶çä¸è¡ï¼"); |
| | | } |
| | | else if (data.length > 1) { |
| | | layer.msg("åªè½éæ©å¤å¶ä¸è¡ï¼"); |
| | | } |
| | | else { |
| | | var copydata2 = copydata.substring(1, copydata.length);//å»é¤é¦è¡å符'[' |
| | | var copyrow = copydata2.substring(0, copydata2.length - 1);//å»é¤æ«å°¾å符']' |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | } |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | //è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | var data = obj.data; |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | if (obj.event === 'del') { |
| | | layer.confirm('ççå é¤è¡åï¼', function (index) { |
| | | if (rowIndex === '0') { |
| | | layer.msg('é¦è¡æ æ³å é¤ï¼ï¼ï¼'); |
| | | } else { |
| | | obj.del(); |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | var data = obj.data; |
| | | if (obj.event == 'HInDate') { |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild |
| | | , show: true //ç´æ¥æ¾ç¤º |
| | | , closeStop: this |
| | | , done: function (nowDate) { |
| | | //æ¶é´éæ©å®æï¼è¡æ°æ®æ´æ° |
| | | data[field] = nowDate; |
| | | obj.update(data); |
| | | //å·æ°å¤éæ¡ |
| | | //checkRefresh(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //#region [ 表ä½F7äºä»¶ ] |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | if (obj.event == 'HMaterCheck') { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: '产åå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index]; |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HMaterName: checkStatus.data[0].HName |
| | | , HMaterID: checkStatus.data[0].HItemID |
| | | , HMaterNumber: checkStatus.data[0].HNumber |
| | | , HMaterModel: checkStatus.data[0].HModel |
| | | }); |
| | | |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | obj.event = ""; |
| | | return false; |
| | | } |
| | | }) |
| | | //#endregion |
| | | |
| | | }); |
| | | |
| | | //ä¿åæäº¤ |
| | | form.on('submit(btnSave)', function (data) {//æäº¤ |
| | | //if (AllowLoadData(data)) { |
| | | set_AddNew(data); |
| | | //} |
| | | }); |
| | | |
| | | //éåº |
| | | form.on('submit(Cancel)', function (data) { |
| | | if (OperationType != "") { |
| | | Pub_Close(1); |
| | | } |
| | | }); |
| | | |
| | | //æå° |
| | | form.on('submit(btn_print)', function (data) { |
| | | get_print(data); |
| | | }); |
| | | |
| | | //éæ©ç³è¯·é¨é¨å¼¹çª |
| | | form.on('submit(btnSearchDept)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'ç³è¯·é¨é¨' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_DepartmentList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HDeptName").val(checkStatus.data[0].HName); |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©å¤åä¾åºåå¼¹çª |
| | | form.on('submit(btnSearchSup)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'å¤åä¾åºå' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../åºç¡èµæ/éè´åºç¡èµæ/Gy_Supplier.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HSupName").val(checkStatus.data[0].ä¾åºååç§°); |
| | | $("#HSupID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | $("#HDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | //表头 |
| | | columns = [ //表头 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', totalRow: true } |
| | | , { field: 'HMainID', title: 'å§å¤æ´¾å·¥å主ID', hide: true }// ç¨äºæå°æ¶è·åæ°æ® |
| | | , { field: 'HEntryID', title: 'å§å¤æ´¾å·¥ååID', hide: true }// ç¨äºæå°æ¶è·åæ°æ® |
| | | , { field: 'HOrderBillNo', title: '订åå·' } |
| | | , { field: 'HSourceBillNo', title: 'æµè½¬å¡å·', width: 165 } |
| | | , { field: 'HMaterID', title: 'å 工产å', hide: true } |
| | | , { field: 'HMaterNumber', title: 'å 工产å代ç ' } |
| | | , { field: 'HMaterName', title: 'å 工产ååç§°', width:220 } |
| | | , { field: 'HMaterModel', title: 'å 工产åè§æ ¼' } |
| | | , { field: 'HQty', title: 'å§å¤æ°é', edit: 'text', width:90 } |
| | | , { field: 'HEntrustType', title: 'å§å¤å 工类å', edit: 'text' } |
| | | , { field: 'HNextProcName', title: 'å§å¤ä¸éå·¥åº', edit: 'text' } |
| | | , { field: 'HPrice', title: 'å å·¥åä»·', edit: 'text', width: 90 } |
| | | , { field: 'HOutQty', title: 'è½¬åºæ°é', edit: 'text', width: 90 } |
| | | , { field: 'HInQty', title: 'æ¥æ¶æ°é', edit: 'text', width: 90} |
| | | , { field: 'HInDate', title: 'ååæ¶é´', width: 120, templet: "<div>{{d.HInDate ==null ?'':layui.util.toDateString(d.HInDate, 'yyyy-MM-dd')}}</div>", event: 'HInDate' } |
| | | , { field: 'HWorkProcFlow', title: '产åå·¥èº', edit: 'text' } |
| | | , { field: 'HMaterLenModel', title: 'æä»¶å°ºå¯¸', edit: 'text'} |
| | | , { field: 'HMaterQty', title: 'æ¿æå¼ æ°', edit: 'text' } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text'} |
| | | , { field: 'HSourceInterID', title: 'æµè½¬å¡ID', hide: true } |
| | | , { field: 'HSourceEntryID', title: 'æµè½¬å¡åID', hide: true } |
| | | , { field: 'HSourceBillType', title: 'åæ®ç±»å', hide: true } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]; |
| | | option = { |
| | | id: 'mainTable' |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , cellMinWidth: 120 |
| | | , height: 400 |
| | | , cols: [columns] |
| | | , limit: Number.MAX_VALUE//é»è®¤æ¾ç¤ºå
¨é¨ |
| | | , done: function (res, curr, count) { |
| | | option.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.data, function (index, value) { |
| | | if (value.LAY_TNDEX == dataIndex) { |
| | | $cr.find('input').val(value.HSupFlag); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | option.data = [{ |
| | | "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HSourceBillType": "", |
| | | "HOrderBillNo": '', "HMaterID": 0, "HMaterNumber": '', "HMaterName": "", "HMaterModel": "", "HQty": 0, "HEntrustType": "", "HNextProcName": "", |
| | | "HPrice": 0, "HOutQty": 0, "HInQty": 0, "HInDate": new Date(),"HWorkProcFlow": '', "HMaterLenModel": "", "HMaterQty": 0, "HRemark": '' |
| | | }]; |
| | | table.render(option); |
| | | |
| | | } |
| | | |
| | | //æ¥è¯¢å·¥åºæµè½¬å¡ |
| | | function get_ProcessExchange() { |
| | | var sWhere = " where hmainid in (" + linterid + ") and HEntryID in (" + HEntryID + ") and ieid in (" + HIeID + ")"; |
| | | //ç¼è¾å è½½æ°æ® |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sc_ProcExchSendWorkBill/GetProcessExchangeBillSub', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $("#HWorkShopName").val(result.data[0]["ç产车é´"]); |
| | | $("#HWorkShopID").val(result.data[0]["HWorkShopID"]); |
| | | $("#HPRDORGName").val(result.data[0]["ç»ç»"]); |
| | | $("#HPRDORGID").val(result.data[0]["HPRDORGID"]); |
| | | //$("#HICMOBillNo").val(result.data[0]["ä»»å¡åå·"]); |
| | | //$("#HICMOInterID").val(result.data[0]["hicmointerid"]); |
| | | //$("#HICMOEntryID").val(result.data[0]["HICMOEntryID"]); |
| | | $("#HMainSourceBillType").val(result.data[0]["æºåç±»å"]); |
| | | $("#HMainSourceInterID").val(result.data[0]["æºå主å
ç "]); |
| | | $("#HMainSourceEntryID").val(result.data[0]["æºååå
ç "]); |
| | | $("#HMainSourceBillNo").val(result.data[0]["æµè½¬å¡å·"]); |
| | | //$("#HExplanation").val(result.data[0]["æè¦"]); |
| | | //$("#HRemark").val(result.data[0]["è¡¨å¤´å¤æ³¨"]); |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | "HSourceInterID": result.data[i]["hmainid"], "HSourceEntryID": result.data[i]["HEntryID"], "HSourceBillNo": result.data[i]["åæ®å·"], "HSourceBillType": result.data[i]["HBillType"], |
| | | "HOrderBillNo": result.data[i]["ä»»å¡åå·"], "HMaterID": result.data[i]["HMaterID"], "HMaterNumber": result.data[i]["产å代ç "], "HMaterName": result.data[i]["产ååç§°"], "HMaterModel": result.data[i]["è§æ ¼åå·"], "HQty": 0, "HEntrustType": "", "HNextProcName": "", |
| | | "HPrice": 0, "HOutQty": 0, "HInQty": 0, "HInDate": new Date(), "HWorkProcFlow": '', "HMaterLenModel": "", "HMaterQty": 0, "HRemark": '' |
| | | } |
| | | ) |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | form.render('select'); |
| | | } else { |
| | | layer.msg(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index0); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(data) { |
| | | |
| | | } |
| | | |
| | | //ä¿åHMaker |
| | | function set_AddNew(data) { |
| | | var num_1 = []; |
| | | for (var i = 0; i < table.cache["mainTable"].length; i++) { |
| | | if (table.cache["mainTable"][i] != "") { |
| | | table.cache["mainTable"][i].LAY_TABLE_INDEX = i; |
| | | num_1.push(table.cache["mainTable"][i]) |
| | | } |
| | | } |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(num_1); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"]; |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/WW_EntrustWorkOrderBill/SaveEntrustWorkOrderBill", |
| | | async: true, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true); |
| | | layer.close(index); |
| | | layer.msg("æäº¤æå"); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.close(index); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ç¼è¾ 页é¢èµå¼ |
| | | function RoadBillMain(linterid)//å 载表头 |
| | | { |
| | | var sWhere = " and hmainid=" + linterid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/WW_EntrustWorkOrderBill/WW_EntrustWorkOrderBillList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | //主表 |
| | | $("#HBillNo").val(result.data[0]["åæ®å·"]); |
| | | $("#HInterID").val(result.data[0]["hmainid"]); |
| | | $("#HDeptName").val(result.data[0]["é¨é¨åç§°"]); |
| | | $("#HDeptID").val(result.data[0]["HDeptID"]); |
| | | $("#HSupName").val(result.data[0]["ä¾åºååç§°"]); |
| | | $("#HSupID").val(result.data[0]["HSupID"]); |
| | | $("#HRemark").val(result.data[0]["è¡¨å¤´å¤æ³¨"]); |
| | | |
| | | var rowdata = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | //å表 èµå¼ |
| | | rowdata.push({ |
| | | "HSourceInterID": result.data[i]["hmainid"], "HSourceEntryID": result.data[i]["HEntryID"], "HSourceBillNo": result.data[i]["æµè½¬å¡å·"], "HSourceBillType": result.data[i]["HBillType"], |
| | | "HOrderBillNo": result.data[i]["订åå·"], "HMaterID": result.data[i]["HMaterID"], "HMaterNumber": result.data[i]["å 工产å代ç "], "HMaterName": result.data[i]["å 工产ååç§°"], "HMaterModel": result.data[i]["è§æ ¼åå·"], "HQty": result.data[i]["å§å¤æ°é"], "HEntrustType": result.data[i]["å§å¤å 工类å"], "HNextProcName": result.data[i]["å§å¤ä¸éå·¥åº"], |
| | | "HPrice": result.data[i]["å å·¥åä»·"], "HOutQty": result.data[i]["è½¬åºæ°é"], "HInQty": result.data[i]["æ¥æ¶æ°é"], "HInDate": result.data[i]["ååæ¶é´"],"HWorkProcFlow": result.data[i]["产åå·¥èº"], "HMaterLenModel": result.data[i]["æä»¶å°ºå¯¸"], "HMaterQty": result.data[i]["æ¿æå¼ æ°"], "HRemark": result.data[i]["表ä½å¤æ³¨"] |
| | | }); |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | } else { |
| | | layer.msg(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æå° |
| | | function get_print(data) { |
| | | |
| | | } |
| | | |
| | | function get_UrlVars() { |
| | | 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; |
| | | } |
| | | |
| | | //#endregion |
| | | }) |
| | | </script> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>å·¥åºå§å¤æ´¾å·¥å表</title> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div class="layui-collapse"> |
| | | <div class="layui-colla-item"> |
| | | <div class="layui-colla-title layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>æ´å¤</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <div class="layui-colla-content"> |
| | | <div class="layui-row" style=" margin-bottom: 10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç³è¯·é¨é¨</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HDeptName" id="HDeptName" lay-verify="required" lay-search class="layui-input"> |
| | | <!--å¨ææ¸²æè½¦é´--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产å代ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æµè½¬å¡å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | | <option value=">">></option> |
| | | <option value="<="><=</option> |
| | | <option value="<"><</option> |
| | | <option value="<>"><></option> |
| | | <option value="7">å
å«</option> |
| | | <option value="8">å·¦å
å«</option> |
| | | <option value="9">å³å
å«</option> |
| | | <option value="10">ä¸å
å«</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill"><i class="layui-icon layui-icon-delete"></i>å®¡æ ¸</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>å
³é</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>åå
³é</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | var sWhere = ""; |
| | | var titleData = ["hmainid", "hentryid", "HEntryID", "HDeptID", "HMaterID", "HSupID"]; |
| | | var option = []; |
| | | var HModName = "WW_EntrustWorkOrderBillList"; |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //æ°å¢ |
| | | case 'set_AddNew': set_AddNew(); |
| | | break; |
| | | //ç¼è¾ |
| | | case 'set_Edit': set_Edit(); |
| | | break; |
| | | //å é¤ |
| | | case 'set_DeleteBill': set_DeleteBill(); |
| | | break; |
| | | ////å®¡æ ¸ |
| | | //case 'set_CheckBill': set_CheckBill(); |
| | | // break; |
| | | //å·æ° |
| | | case 'get_Refresh': get_Refresh(); |
| | | break; |
| | | //å®¡æ ¸ |
| | | case 'set_CheckBill': set_CheckBill(1); |
| | | break; |
| | | //åå®¡æ ¸ |
| | | case 'set_AbandonCheck': set_CheckBill(2); |
| | | break; |
| | | //å
³é |
| | | case 'set_CloseBill': set_CloseBill(1); |
| | | break; |
| | | //åå
³é |
| | | case 'set_CancelCloseBill': set_CloseBill(2); |
| | | break; |
| | | //æå° |
| | | case 'btn_print': get_print(); |
| | | break; |
| | | //éåºæé® |
| | | case 'get_Exit': Pub_Close(2); |
| | | //å设置 |
| | | case 'set_HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));;//ç»ææ¥æ |
| | | //æ¥è¯¢ |
| | | get_Display(""); |
| | | //车é´å表 |
| | | getDept(); |
| | | //åå§åè¡¨æ ¼ |
| | | DisPlay_HideColumn(); |
| | | } |
| | | |
| | | //è·å车é´å表 |
| | | function getDept() { |
| | | var HDeptName = '<option value="0" style="color:red;" selected>å
¨é¨é¨é¨</option>'; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/Sc_ICMOBill/GetHDeptList", |
| | | data: { "HOrgID": sessionStorage["OrganizationID"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | HDeptName += '<option style="color:blue;" value="' + data[i].HItemID + '">' + data[i].HName + '</option>'; |
| | | } |
| | | $("#HDeptName").append(HDeptName); |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ |
| | | function get_Display(sWhere) { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/WW_EntrustWorkOrderBill/WW_EntrustWorkOrderBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.close(ajaxLoad); |
| | | |
| | | var data = []; |
| | | var col = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | } |
| | | } |
| | | } |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true //å¼å¯å页 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , cols: [col] |
| | | , data: data1.data |
| | | }; |
| | | table.render(option); |
| | | |
| | | if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | | ColFilter(); |
| | | } |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.msg(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | // å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HDate = $("#HDate").val();;//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | var HMaterNumber = $("#HMaterNumber").val();//ç©æ |
| | | var HDeptName = $("#HDeptName").val();//é¨é¨ |
| | | var HProcExchBillNo = $("#HProcExchBillNo").val();//æµè½¬å¡å· |
| | | var ColName = $("#ColName").val();//å¤éæ¡ |
| | | var Comparator = $("#Comparator").val() |
| | | var ColContent = $("#ColContent").val(); |
| | | |
| | | if (ColName != 0 && Comparator != 0) { |
| | | var com = ""; |
| | | switch (Comparator) { |
| | | case "7": |
| | | com = "like'%" + ColContent + "%'"; |
| | | break; |
| | | case "8": |
| | | com = "like'%" + ColContent + "'"; |
| | | break; |
| | | case "9": |
| | | com = "like'" + ColContent + "%'"; |
| | | break; |
| | | case "10": |
| | | com = "not like'%" + ColContent + "%'"; |
| | | break; |
| | | default: |
| | | com = "" + Comparator + "'" + ColContent + "'"; |
| | | break; |
| | | } |
| | | sWhere += " and " + ColName + " " + com; |
| | | } |
| | | |
| | | |
| | | |
| | | if (HDate) { |
| | | sWhere += " and æ¥æ >= '" + HDate + "'"; |
| | | } |
| | | if (HDate1) { |
| | | sWhere += " and æ¥æ <= '" + HDate1 + "'"; |
| | | } |
| | | |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (HMaterNumber) { |
| | | sWhere += " and å 工产å代ç like '%" + HMaterNumber + "%'"; |
| | | } |
| | | if (HDeptName && HDeptName != "0") { |
| | | sWhere += " and HDeptID = '" + HDeptName + "'"; |
| | | } |
| | | if (HProcExchBillNo) { |
| | | sWhere += " and æµè½¬å¡å· = '" + HProcExchBillNo + "'"; |
| | | } |
| | | |
| | | get_Display(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | |
| | | // éç½®è¿æ»¤æ¡ä»¶æ¹æ³ |
| | | function set_ClearQuery() { |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));;//ç»ææ¥æ |
| | | $("#HBillNo").val("");//åæ®å· |
| | | $("#HMaterNumber").val("");//ç©æ |
| | | $("#HDeptName").val("0");//è½¦é´ |
| | | $("#HProcExchBillNo").val("");//æµè½¬å¡å· |
| | | $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | | form.render('select'); |
| | | $("#btnSearch").click(); |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //æ°å¢ |
| | | function set_AddNew() { |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['100%', '100%'] |
| | | , title: 'çäº§è®¢åæ°å¢' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../ç产任å¡å/Sc_ICMOBillEdit.html?OperationType=1&linterid=' |
| | | , end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // ç¼è¾ |
| | | function set_Edit() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var linterid = data[0].hmainid; |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'å·¥åºæ´¾å·¥åç¼è¾' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../å·¥åºæµè½¬å¡/WW_EntrustWorkOrderBillEdit.html?OperationType=3&linterid=' + linterid + '&HEntryID=-1' |
| | | , end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | |
| | | // å é¤ |
| | | function set_DeleteBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hmainid = data[0].hmainid; |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | var wait = layer.load(); |
| | | //é»è¾å 餿¹æ³ |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/WW_EntrustWorkOrderBill/DelEntrustWorkOrder', |
| | | type: "GET", |
| | | data: { "HInterID": hmainid, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | //å
³éå½åframe |
| | | layer.close(wait); |
| | | layer.msg(result.Message); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | get_FastQuery(); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | |
| | | } |
| | | |
| | | //æå° |
| | | function get_print() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length >= 1) { |
| | | var rows = []; |
| | | var arr = []; |
| | | var ieid = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | rows.push(data[i].hmainid.toString()); |
| | | arr.push(data[i].hentryid.toString()); |
| | | ieid.push(data[i].hmainid.toString() + data[i].hentryid.toString()) |
| | | } |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList_GXPG.html?linterid=' + rows.toString() + '&MyMsg=' + rows.toString() + '&Type=HProcSendWork' + '&ieid=' + ieid.toString(), 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | | // å·æ° |
| | | function get_Refresh() { |
| | | set_ClearQuery(); |
| | | get_Display(sWhere); |
| | | } |
| | | |
| | | //å®¡æ ¸ [1 å®¡æ ¸ã2 åå®¡æ ¸] |
| | | function set_CheckBill(num) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | |
| | | if (data.length == 1) { |
| | | layer.confirm("确认è¦å®¡æ ¸å?", function (index) { |
| | | var wait = layer.load(); |
| | | var HInterID = data[0].hmainid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_ProcExchSendWorkBill/CheckSc_ProcExchSendWorkBill', |
| | | type: "GET", |
| | | data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | get_FastQuery(); |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } else { |
| | | layer.msg("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | //å
³é [1 å
³éã2 åå
³é] |
| | | function set_CloseBill(num) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | |
| | | if (data.length == 1) { |
| | | layer.confirm("确认è¦å
³éå?", function (index) { |
| | | var wait = layer.load(); |
| | | var HInterID = data[0].hmainid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_ProcExchSendWorkBill/CloseSc_ProcExchSendWorkBill', |
| | | type: "GET", |
| | | data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | var contentUrl = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | var urlLen = urlStr.split('/'); |
| | | for (var i = 0; i < urlLen.length - 4; i++) { |
| | | contentUrl += "../"; |
| | | } |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | |
| | | contentUrl += 'åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName; |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: [contentUrl, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = ["hmainid", "HEntryID", "HDeptID", "HMaterID", "HSupID"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 2; i++) { |
| | | if (dataCol[i]) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | } |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | //if (data1.data[0].HColumnWidth != 0) { |
| | | // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; |
| | | //} else { |
| | | // option.cols[0][i + 1]["width"] = ""; |
| | | //} |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //åææ¾ç¤ºä¸ææ¡ |
| | | function ColFilter() { |
| | | var Organization = '<option value="0" selected="selected" ></option>'; |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | if (option.cols[0][i].hide != true) { |
| | | Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>'; |
| | | } |
| | | } |
| | | $("#ColName").empty(); |
| | | $("#ColName").append(Organization); |
| | | form.render('select'); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //以䏿¯layui模å |
| | | }); |
| | | |
| | | </script> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>ä¾åºå询价åç¼è¾</title> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style> |
| | | .main-btn { /*头é¨ä¸»æé®*/ |
| | | padding: 0 2px; /*è°æ´æé®å·¦å³ç©ºé大å°*/ |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | .btn-title { |
| | | font-size: 16px; |
| | | } |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | .layui-table-cell { |
| | | overflow: visible !important; |
| | | } |
| | | /* 使å¾ä¸ææ¡ä¸åå
æ ¼å好åé */ |
| | | td .layui-form-select { |
| | | margin-top: -10px; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | } |
| | | |
| | | .layui-form-item .layui-inline { |
| | | margin-top: 5px; |
| | | margin-bottom: 5px; |
| | | margin-right: 0px; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | width: 25%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card" style="padding: 15px;"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" lay-filter="component-form-group" action=""> |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="btnSave" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">éåº</button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;" class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;">å
¶ä»ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--åºæ¬ä¿¡æ¯--> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¾åºå</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HSupName" id="HSupName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HSupID" id="HSupID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchSup" id="btnSearchSup" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">æ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" name="HDate" id="HDate"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">æ¥ä»·äºº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HQuoteEmp" id="HQuoteEmp" style=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">æ¥ä»·é¨é¨</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HQuoteDept" id="HQuoteDept" style=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">å¸å«</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HCurName" id="HCurName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HCurID" id="HCurID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchCur" id="btnSearchCur" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">仿¬¾æ¡ä»¶</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HPayConditionID" id="HPayConditionID" style="background-color:#efefef4d;" value="0" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">çææ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" name="HBeginDate" id="HBeginDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">å¤±ææ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" name="HEndDate" id="HEndDate"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs6 layui-inline"> |
| | | <label class="layui-form-label" style="width:12.5%">夿³¨</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HRemark" id="HRemark" style="width:500px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6 layui-inline"> |
| | | <label class="layui-form-label" style="width:12.5%">æè¦</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HExplanation" id="HExplanation" style="width:500px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none"> |
| | | <label class="layui-form-label">æºåä¿¡æ¯</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" value="0"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" value="0"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" value="0"> |
| | | <input type="hidden" name="HMainSourceBillNo" id="HMainSourceBillNo" value=""> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--å
¶ä»ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item"> |
| | | <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="HMaker" id="HMaker" 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="HChecker" id="HChecker" 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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HMakeDate" id="HMakeDate" 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="HCheckDate" id="HCheckDate" 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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HUpDater" id="HUpDater" 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="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HUpDateDate" id="HUpDateDate" 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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <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> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
| | | <script type="text/html" id="barDemo"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | //#region å
Œ
±åé |
| | | |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | var option; |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | var params = get_UrlVars(); |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | var OperationType = -1;//æä½ç±»å |
| | | } else { |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HEntryID = params[params[2]];//æºååid |
| | | var HIeID = params[params[3]]; //æºåid + æºååid |
| | | } |
| | | |
| | | //ä¾åºåæ¥ä»·åæ°å¢ |
| | | if (OperationType == 1) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '1121' }, |
| | | success: function (d) { |
| | | //$("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | } |
| | | }); |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | } else if (OperationType == 3) { |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | RoadBillMain(linterid); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | //æ°å¢è¡è¡¨æ ¼æ°æ® |
| | | var NewRow = { |
| | | "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HUnitID": 0, "HUnitNumber": "", |
| | | "HUnitName": "", "HQty": 0, "HPrice": 0, "HMoney": 0, "HTaxPrice": 0, "HTaxRate": 0, "HTaxMoney": 0, |
| | | "HlineTotal": 0, "HlineTotalBB": 0, "HDate": new Date(), "HBagType": "", "HCarryType": "", "HAddress": "", "HRemark": "" |
| | | }; |
| | | |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | break; |
| | | case 'btn-CopyLine': |
| | | var copydata = JSON.stringify(data); |
| | | if (data.length <= 0) { |
| | | layer.msg("è¯·éæ©éè¦å¤å¶çä¸è¡ï¼"); |
| | | } |
| | | else if (data.length > 1) { |
| | | layer.msg("åªè½éæ©å¤å¶ä¸è¡ï¼"); |
| | | } |
| | | else { |
| | | var copydata2 = copydata.substring(1, copydata.length);//å»é¤é¦è¡å符'[' |
| | | var copyrow = copydata2.substring(0, copydata2.length - 1);//å»é¤æ«å°¾å符']' |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | } |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | //è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | var data = obj.data; |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | if (obj.event === 'del') { |
| | | layer.confirm('ççå é¤è¡åï¼', function (index) { |
| | | if (rowIndex === '0') { |
| | | layer.msg('é¦è¡æ æ³å é¤ï¼ï¼ï¼'); |
| | | } else { |
| | | obj.del(); |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | var data = obj.data; |
| | | if (obj.event == 'HDate') { |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild |
| | | , show: true //ç´æ¥æ¾ç¤º |
| | | , closeStop: this |
| | | , done: function (nowDate) { |
| | | //æ¶é´éæ©å®æï¼è¡æ°æ®æ´æ° |
| | | data[field] = nowDate; |
| | | obj.update(data); |
| | | //å·æ°å¤éæ¡ |
| | | //checkRefresh(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | if (obj.event == 'inputHQty' || obj.event == 'inputHPrice' || obj.event == 'inputHMoney' || obj.event == 'inputHTaxPrice' || obj.event == 'inputHTaxRate' || obj.event == 'inputHTaxMoney' || obj.event == 'inputHlineTotal' || obj.event == 'inputHlineTotalBB') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/[^\d*\.?\d*]/g, '')); |
| | | }); |
| | | } |
| | | |
| | | //#region [ 表ä½F7äºä»¶ ] |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | if (obj.event == 'HMaterID') { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: '产åå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index]; |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HMaterName: checkStatus.data[0].HName |
| | | , HMaterID: checkStatus.data[0].HItemID |
| | | , HMaterNumber: checkStatus.data[0].HNumber |
| | | , HMaterModel: checkStatus.data[0].HModel |
| | | , HUnitID: checkStatus.data[0].HUnitID |
| | | , HUnitNumber: checkStatus.data[0].HUnitNumber |
| | | , HUnitName: checkStatus.data[0].HUnitName |
| | | }); |
| | | |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event == 'HUnitID') { |
| | | 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'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HUnitID: checkStatus.data[0].HItemID |
| | | , HUnitNumber: checkStatus.data[0].HNumber |
| | | , HUnitName: checkStatus.data[0].HName |
| | | }); |
| | | |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | obj.event = ""; |
| | | return false; |
| | | } |
| | | }) |
| | | //#endregion |
| | | |
| | | }); |
| | | |
| | | table.on('edit(mainTable)', function (obj) { //注ï¼editæ¯åºå®äºä»¶åï¼testæ¯tableåå§å®¹å¨ç屿§ lay-filter="对åºçå¼" |
| | | var value = obj.value //å¾å°ä¿®æ¹åçå¼ |
| | | , data = obj.data //å¾å°æå¨è¡ææé®å¼ |
| | | , field = obj.field; //å¾å°å段 |
| | | |
| | | var HQty = 0; //æ°é |
| | | var HPrice = 0; //åä»· |
| | | var HMoney = 0; //éé¢ |
| | | var HTaxRate = 0; //ç¨ç |
| | | var HTaxMoney = 0; //ç¨é¢ |
| | | var HTaxPrice = 0; //å«ç¨åä»· |
| | | var HlineTotal = 0; //ä»·ç¨å计 |
| | | var HlineTotalBB = 0; //æ¬ä½å¸ä»·ç¨å计 |
| | | |
| | | if (obj.data.HQty != undefined) { |
| | | HQty = parseFloat(obj.data.HQty); |
| | | } |
| | | if (obj.data.HPrice != undefined) { |
| | | HPrice = parseFloat(obj.data.HPrice); |
| | | } |
| | | if (obj.data.HMoney != undefined) { |
| | | HMoney = parseFloat(obj.data.HMoney); |
| | | } |
| | | |
| | | switch (field) { |
| | | case "HQty": |
| | | console.log(obj.data.HMoney); |
| | | obj.update({ |
| | | HMoney: Math.ceil(parseFloat(obj.value) * parseFloat(obj.data.HPrice)), |
| | | }); |
| | | console.log(obj.data.HMoney); |
| | | obj.update({ |
| | | HTaxMoney: Math.ceil(parseFloat(obj.value) / 100 * parseFloat(obj.data.HMoney)), |
| | | }); |
| | | break; |
| | | case "HPrice": |
| | | obj.update({ |
| | | HMoney: Math.ceil(parseFloat(obj.value) * parseFloat(obj.data.HQty)), |
| | | }); |
| | | obj.update({ |
| | | HTaxMoney: Math.ceil(parseFloat(obj.value) / 100 * parseFloat(obj.data.HMoney)), |
| | | }); |
| | | break; |
| | | case "HTaxRate": |
| | | obj.update({ |
| | | HTaxMoney: Math.ceil(parseFloat(obj.value) / 100 * parseFloat(obj.data.HMoney)), |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | //ä¿åæäº¤ |
| | | form.on('submit(btnSave)', function (data) {//æäº¤ |
| | | var sSubStr = table.cache['mainTable']; |
| | | if (AllowLoadData(sSubStr)) { |
| | | set_AddNew(data); |
| | | } |
| | | }); |
| | | |
| | | //éåº |
| | | form.on('submit(Cancel)', function (data) { |
| | | if (OperationType != "") { |
| | | Pub_Close(1); |
| | | } |
| | | }); |
| | | |
| | | //æå° |
| | | form.on('submit(btn_print)', function (data) { |
| | | get_print(data); |
| | | }); |
| | | |
| | | //#region [表头æ¾å¤§é] |
| | | //éæ©ä¾åºåå¼¹çª |
| | | form.on('submit(btnSearchSup)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'ä¾åºåå表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../åºç¡èµæ/éè´åºç¡èµæ/Gy_Supplier.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HSupName").val(checkStatus.data[0].ä¾åºååç§°); |
| | | $("#HSupID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©å¸å«å¼¹çª |
| | | form.on('submit(btnSearchCur)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'å¸å«å表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Currency.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HCurName").val(checkStatus.data[0].è´§å¸åç§°); |
| | | $("#HCurID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | $("#HDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//æ¥æ |
| | | $("#HBeginDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//çææ¥æ |
| | | $("#HEndDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//å¤±ææ¥æ |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | //表头 |
| | | columns = [ //表头 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', totalRow: true } |
| | | , { field: 'HMaterID', title: 'ç©æID', hide: true } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', edit: 'text', event: "HMaterID", width: 165 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 220 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 165 } |
| | | , { field: 'HUnitID', title: 'åä½ID', hide: true } |
| | | , { field: 'HUnitNumber', title: 'åä½ä»£ç ', edit: 'text', event: "HUnitID", width: 165 } |
| | | , { field: 'HUnitName', title: 'åä½åç§°', width: 165 } |
| | | , { field: 'HQty', title: 'æ°é', edit: 'text', event:'inputHQty', width: 90 } |
| | | , { field: 'HPrice', title: 'åä»·', edit: 'text', event: 'inputHPrice', width:90 } |
| | | , { field: 'HMoney', title: 'éé¢', event: 'inputHMoney', width:90 } |
| | | , { field: 'HTaxPrice', title: 'å«ç¨åä»·', edit: 'text', event: 'inputHTaxPrice', width:90 } |
| | | , { field: 'HTaxRate', title: 'ç¨ç%', edit: 'text', event: 'inputHTaxRate', width:90 } |
| | | , { field: 'HTaxMoney', title: 'ç¨é¢', edit: 'text', event: 'inputHTaxMoney', width:90 } |
| | | , { field: 'HlineTotal', title: 'ä»·ç¨å计', edit: 'text', event: 'inputHlineTotal', width:90 } |
| | | , { field: 'HlineTotalBB', title: 'æ¬ä½å¸ä»·ç¨å计', edit: 'text', event: 'inputHlineTotalBB', width:125 } |
| | | , { field: 'HDate', title: 'é¢è®¡äº¤è´§æ¥æ', width: 120, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd')}}</div>", event: 'HDate' } |
| | | , { field: 'HBagType', title: 'å
è£
æ¹å¼', edit: 'text', width: 120 } |
| | | , { field: 'HCarryType', title: 'è¿è¾æ¹å¼', edit: 'text', width: 120 } |
| | | , { field: 'HAddress', title: '交货å°ç¹', edit: 'text', width: 120 } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text' } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 65 } |
| | | ]; |
| | | option = { |
| | | id: 'mainTable' |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , cellMinWidth: 120 |
| | | , height: 400 |
| | | , cols: [columns] |
| | | , limit: Number.MAX_VALUE//é»è®¤æ¾ç¤ºå
¨é¨ |
| | | , done: function (res, curr, count) { |
| | | option.data = res.data; |
| | | //廿䏿æ¡å¤±ç¦äºä»¶å¦åå¨ä¸ææ¡éè¾å
¥å¼ |
| | | $('.layui-form-select').find('input').unbind("blur"); |
| | | //è¡¨æ ¼éè½½åæ¾ä¸ææ¡éçæ°æ® |
| | | $('tr').each(function (e) { |
| | | var $cr = $(this); |
| | | var dataIndex = $cr.attr("data-index"); |
| | | }); |
| | | } |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | option.data = [{ |
| | | "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HUnitID": 0, "HUnitNumber": "", |
| | | "HUnitName": "", "HQty": 0, "HPrice": 0, "HMoney": 0, "HTaxPrice": 0, "HTaxRate": 0, "HTaxMoney": 0, |
| | | "HlineTotal": 0, "HlineTotalBB": 0, "HDate": new Date(), "HBagType": "", "HCarryType": "", "HAddress": "", "HRemark": "" |
| | | }]; |
| | | table.render(option); |
| | | |
| | | } |
| | | |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(sSubStr) { |
| | | //å é¤åè¡¨æ°æ®æ¶ ä¼å ç¨æ°ç»çä½ç½®,éè¦éæ°æä¸ä¸é¡ºåº |
| | | var sSubTable = []; |
| | | for (var i = 0; i < sSubStr.length; i++) { |
| | | if (sSubStr[i] != "") { |
| | | sSubStr[i].LAY_TABLE_INDEX = i; |
| | | sSubTable.push(sSubStr[i]) |
| | | } |
| | | } |
| | | |
| | | var Result = true; |
| | | |
| | | for (var i = 0; i < sSubTable.length; i++) { |
| | | if (sSubTable[i].HMaterID == 0) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,ç©æä¿¡æ¯ä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 5000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubTable[i].HUnitID == 0) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,计éåä½ä¿¡æ¯ä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 5000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | } |
| | | |
| | | return Result |
| | | } |
| | | |
| | | //ä¿åHMaker |
| | | function set_AddNew(data) { |
| | | var num_1 = []; |
| | | for (var i = 0; i < table.cache["mainTable"].length; i++) { |
| | | if (table.cache["mainTable"][i] != "") { |
| | | table.cache["mainTable"][i].LAY_TABLE_INDEX = i; |
| | | num_1.push(table.cache["mainTable"][i]) |
| | | } |
| | | } |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(num_1); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"]; |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sup_QuotePriceBill/SaveQuotePriceBill", |
| | | async: true, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true); |
| | | layer.close(index); |
| | | layer.msg("æäº¤æå"); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.close(index); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ç¼è¾ 页é¢èµå¼ |
| | | function RoadBillMain(linterid)//å 载表头 |
| | | { |
| | | var sWhere = " and hmainid=" + linterid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sup_QuotePriceBill/Sup_QuotePriceBillList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | var data = result.data; |
| | | //主表 |
| | | $("#HBillNo").val(data[0]["åæ®å·"]); |
| | | $("#HInterID").val(data[0]["hmainid"]); |
| | | $("#HSupName").val(data[0]["ä¾åºååç§°"]); |
| | | $("#HSupID").val(data[0]["HSupID"]); |
| | | $("#HQuoteEmp").val(data[0]["æ¥ä»·äºº"]); |
| | | $("#HQuoteDept").val(data[0]["æ¥ä»·é¨é¨"]); |
| | | $("#HCurName").val(data[0]["å¸å«"]); |
| | | $("#HCurID").val(data[0]["HCurID"]); |
| | | $("#HPayConditionID").val(data[0]["HPayConditionID"]); |
| | | $("#HBeginDate").val(Format(new Date(data[0]["çææ¥æ"]), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(data[0]["å¤±ææ¥æ"]), "yyyy-MM-dd")); |
| | | $("#HExplanation").val(data[0]["æè¦"]); |
| | | $("#HRemark").val(data[0]["è¡¨å¤´å¤æ³¨"]); |
| | | |
| | | var rowdata = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | //å表 èµå¼ |
| | | rowdata.push({ |
| | | "HMaterID": data[i]["HMaterID"], "HMaterNumber": data[i]["ç©æä»£ç "], "HMaterName": data[i]["ç©æåç§°"], "HMaterModel": data[i]["è§æ ¼åå·"], "HUnitID": data[i]["HUnitID"], "HUnitNumber": data[i]["åä½ä»£ç "], |
| | | "HUnitName": data[i]["åä½"], "HQty": data[i]["æ°é"], "HPrice": data[i]["åä»·"], "HMoney": data[i]["éé¢"], "HTaxPrice": data[i]["å«ç¨åä»·"], "HTaxRate": data[i]["ç¨ç"], "HTaxMoney": data[i]["ç¨é¢"], "HlineTotal": data[i]["ä»·ç¨å计"], "HlineTotalBB": data[i]["æ¬ä½å¸ä»·ç¨å计"], "HDate": data[i]["é¢è®¡äº¤è´§æ¥æ"], "HBagType": data[i]["å
è£
æ¹å¼"], "HCarryType": data[i]["è¿è¾æ¹å¼"], "HAddress": data[i]["交货å°ç¹"], "HRemark": data[i]["表ä½å¤æ³¨"] |
| | | }); |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | form.render('select'); |
| | | } else { |
| | | layer.msg(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æå° |
| | | function get_print(data) { |
| | | |
| | | } |
| | | |
| | | function get_UrlVars() { |
| | | 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; |
| | | } |
| | | |
| | | //#endregion |
| | | }) |
| | | </script> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>ä¾åºå询价åå表</title> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div class="layui-collapse"> |
| | | <div class="layui-colla-item"> |
| | | <div class="layui-colla-title layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>æ´å¤</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <div class="layui-colla-content"> |
| | | <div class="layui-row" style=" margin-bottom: 10px;"> |
| | | <label class="layui-form-label">ä¸å¡ç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="HProcType" name="HProcType" lay-filter=""> |
| | | <option value="" selected>è¯·éæ©</option> |
| | | <option value="å¤è´å
¥åº">å¤è´å
¥åº</option> |
| | | <option value="å§å¤å å·¥">å§å¤å å·¥</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æåç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterName" id="HMaterName"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | | <option value=">">></option> |
| | | <option value="<="><=</option> |
| | | <option value="<"><</option> |
| | | <option value="<>"><></option> |
| | | <option value="7">å
å«</option> |
| | | <option value="8">å·¦å
å«</option> |
| | | <option value="9">å³å
å«</option> |
| | | <option value="10">ä¸å
å«</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | var sWhere = ""; |
| | | var titleData = ["hmainid", "hentryid", "HEntryID", "HDeptID", "HMaterID", "HSupID", "HEmpID", "HPayConditionID", "HCurID","HUnitID"]; |
| | | var option = []; |
| | | var HModName = "Sup_QuotePriceBillList"; |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //æ°å¢ |
| | | case 'set_AddNew': set_AddNew(); |
| | | break; |
| | | //ç¼è¾ |
| | | case 'set_Edit': set_Edit(); |
| | | break; |
| | | //å é¤ |
| | | case 'set_DeleteBill': set_DeleteBill(); |
| | | break; |
| | | //å·æ° |
| | | case 'get_Refresh': get_Refresh(); |
| | | break; |
| | | //éåºæé® |
| | | case 'get_Exit': Pub_Close(2); |
| | | //å设置 |
| | | case 'set_HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));;//ç»ææ¥æ |
| | | //æ¥è¯¢ |
| | | get_Display(""); |
| | | //åå§åè¡¨æ ¼ |
| | | //DisPlay_HideColumn(); |
| | | } |
| | | |
| | | // æ¥è¯¢ |
| | | function get_Display(sWhere) { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sup_QuotePriceBill/Sup_QuotePriceBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.close(ajaxLoad); |
| | | |
| | | var data = []; |
| | | var col = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | } |
| | | } |
| | | } |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true //å¼å¯å页 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , cols: [col] |
| | | , data: data1.data |
| | | }; |
| | | //åå§åè¡¨æ ¼ |
| | | DisPlay_HideColumn(); |
| | | table.render(option); |
| | | |
| | | if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | | ColFilter(); |
| | | } |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.msg(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | // å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HDate = $("#HDate").val();;//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | var HProcType = $("#HProcType").val();//ä¸å¡ç±»å |
| | | var HMaterNumber = $("#HMaterNumber").val();//ç©æä»£ç |
| | | var HMaterName = $("#HMaterName").val();//ç©æåç§° |
| | | var ColName = $("#ColName").val();//å¤éæ¡ |
| | | var Comparator = $("#Comparator").val() |
| | | var ColContent = $("#ColContent").val(); |
| | | |
| | | if (ColName != 0 && Comparator != 0) { |
| | | var com = ""; |
| | | switch (Comparator) { |
| | | case "7": |
| | | com = "like'%" + ColContent + "%'"; |
| | | break; |
| | | case "8": |
| | | com = "like'%" + ColContent + "'"; |
| | | break; |
| | | case "9": |
| | | com = "like'" + ColContent + "%'"; |
| | | break; |
| | | case "10": |
| | | com = "not like'%" + ColContent + "%'"; |
| | | break; |
| | | default: |
| | | com = "" + Comparator + "'" + ColContent + "'"; |
| | | break; |
| | | } |
| | | sWhere += " and " + ColName + " " + com; |
| | | } |
| | | |
| | | |
| | | |
| | | if (HDate) { |
| | | sWhere += " and æ¥æ >= '" + HDate + "'"; |
| | | } |
| | | if (HDate1) { |
| | | sWhere += " and æ¥æ <= '" + HDate1 + "'"; |
| | | } |
| | | |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (HProcType && HProcType != "") { |
| | | sWhere += " and ä¸å¡ç±»å = '" + HProcType + "'"; |
| | | } |
| | | if (HMaterNumber) { |
| | | sWhere += " and ç©æä»£ç like '%" + HMaterNumber + "%'"; |
| | | } |
| | | if (HMaterName) { |
| | | sWhere += " and ç©æåç§° like '%" + HMaterName + "%'"; |
| | | } |
| | | |
| | | get_Display(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | |
| | | // éç½®è¿æ»¤æ¡ä»¶æ¹æ³ |
| | | function set_ClearQuery() { |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));;//ç»ææ¥æ |
| | | $("#HBillNo").val("");//åæ®å· |
| | | $("#HProcType").val("");//ä¸å¡ç±»å |
| | | $("#HMaterNumber").val("");//ç©æä»£ç |
| | | $("#HMaterName").val("");//ç©æåç§° |
| | | $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | | form.render('select'); |
| | | $("#btnSearch").click(); |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //æ°å¢ |
| | | function set_AddNew() { |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['100%', '100%'] |
| | | , title: 'ä¾åºåè¯¢ä»·åæ°å¢' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../æ¥ä»·å/Sup_QuotePriceBillEdit.html?OperationType=1&linterid=' |
| | | , end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // ç¼è¾ |
| | | function set_Edit() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var linterid = data[0].hmainid; |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ä¾åºå询价åç¼è¾' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../æ¥ä»·å/Sup_QuotePriceBillEdit.html?OperationType=3&linterid=' + linterid + '&HEntryID=-1' |
| | | , end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | |
| | | // å é¤ |
| | | function set_DeleteBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hmainid = data[0].hmainid; |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | var wait = layer.load(); |
| | | //é»è¾å 餿¹æ³ |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sup_QuotePriceBill/DelQuotePriceBill', |
| | | type: "GET", |
| | | data: { "HInterID": hmainid, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | //å
³éå½åframe |
| | | layer.close(wait); |
| | | layer.msg(result.Message); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | get_FastQuery(); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | |
| | | } |
| | | |
| | | // å·æ° |
| | | function get_Refresh() { |
| | | set_ClearQuery(); |
| | | get_Display(sWhere); |
| | | } |
| | | |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | var contentUrl = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | var urlLen = urlStr.split('/'); |
| | | for (var i = 0; i < urlLen.length - 4; i++) { |
| | | contentUrl += "../"; |
| | | } |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | |
| | | contentUrl += 'åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName; |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: [contentUrl, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = ["hmainid", "hentryid", "HEntryID", "HDeptID", "HMaterID", "HSupID", "HEmpID", "HPayConditionID", "HCurID", "HUnitID"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 2; i++) { |
| | | if (dataCol[i]) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | } |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | |
| | | switch (option.cols[0][i + 1]["field"]) { |
| | | case 'æ¥æ': |
| | | option.cols[0][i + 1]["width"] = 110; |
| | | break; |
| | | case 'åæ®å·': |
| | | option.cols[0][i + 1]["width"] = 140; |
| | | break; |
| | | case 'ä¸å¡ç±»å': |
| | | option.cols[0][i + 1]["width"] = 105; |
| | | break; |
| | | case 'éè´å代ç ': |
| | | option.cols[0][i + 1]["width"] = 135; |
| | | break; |
| | | case 'éè´ååç§°': |
| | | option.cols[0][i + 1]["width"] = 135; |
| | | break; |
| | | case 'é¨é¨ä»£ç ': |
| | | option.cols[0][i + 1]["width"] = 140; |
| | | break; |
| | | case 'é¨é¨åç§°': |
| | | option.cols[0][i + 1]["width"] = 160; |
| | | break; |
| | | } |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | //if (data1.data[0].HColumnWidth != 0) { |
| | | // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; |
| | | //} else { |
| | | // option.cols[0][i + 1]["width"] = ""; |
| | | //} |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //åææ¾ç¤ºä¸ææ¡ |
| | | function ColFilter() { |
| | | var Organization = '<option value="0" selected="selected" ></option>'; |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | if (option.cols[0][i].hide != true) { |
| | | Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>'; |
| | | } |
| | | } |
| | | $("#ColName").empty(); |
| | | $("#ColName").append(Organization); |
| | | form.render('select'); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //以䏿¯layui模å |
| | | }); |
| | | |
| | | </script> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>ä¾åºå询价åç¼è¾</title> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style> |
| | | .main-btn { /*头é¨ä¸»æé®*/ |
| | | padding: 0 2px; /*è°æ´æé®å·¦å³ç©ºé大å°*/ |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | .btn-title { |
| | | font-size: 16px; |
| | | } |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | .layui-table-cell { |
| | | overflow: visible !important; |
| | | } |
| | | /* 使å¾ä¸ææ¡ä¸åå
æ ¼å好åé */ |
| | | td .layui-form-select { |
| | | margin-top: -10px; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | } |
| | | |
| | | .layui-form-item .layui-inline { |
| | | margin-top: 5px; |
| | | margin-bottom: 5px; |
| | | margin-right: 0px; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | width: 25%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card" style="padding: 15px;"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" lay-filter="component-form-group" action=""> |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="btnSave" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">éåº</button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;" class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;">å
¶ä»ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--åºæ¬ä¿¡æ¯--> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¸å¡ç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="HProcType" name="HProcType" lay-filter=""> |
| | | <option value="" selected>è¯·éæ©</option> |
| | | <option value="å¤è´å
¥åº">å¤è´å
¥åº</option> |
| | | <option value="å§å¤å å·¥">å§å¤å å·¥</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">æ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" name="HDate" id="HDate"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">éè´å</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HEmpName" id="HEmpName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchEmp" id="btnSearchEmp" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">é¨é¨</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HDeptName" id="HDeptName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchDept" id="btnSearchDept" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">å¸å«</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HCurName" id="HCurName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HCurID" id="HCurID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchCur" id="btnSearchCur" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">仿¬¾æ¡ä»¶</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HPayConditionID" id="HPayConditionID" style="background-color:#efefef4d;" value="0" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">çææ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" name="HBeginDate" id="HBeginDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">å¤±ææ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" name="HEndDate" id="HEndDate"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs6 layui-inline"> |
| | | <label class="layui-form-label" style="width:12.5%">夿³¨</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HRemark" id="HRemark" style="width:500px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs6 layui-inline"> |
| | | <label class="layui-form-label" style="width:12.5%">æè¦</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HExplanation" id="HExplanation" style="width:500px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none"> |
| | | <label class="layui-form-label">æºåä¿¡æ¯</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" value="0"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" value="0"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" value="0"> |
| | | <input type="hidden" name="HMainSourceBillNo" id="HMainSourceBillNo" value=""> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--å
¶ä»ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item"> |
| | | <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="HMaker" id="HMaker" 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="HChecker" id="HChecker" 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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HMakeDate" id="HMakeDate" 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="HCheckDate" id="HCheckDate" 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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HUpDater" id="HUpDater" 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="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HUpDateDate" id="HUpDateDate" 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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <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> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
| | | <script type="text/html" id="barDemo"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | //#region å
Œ
±åé |
| | | |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | var option; |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | var params = get_UrlVars(); |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | var OperationType = -1;//æä½ç±»å |
| | | } else { |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HEntryID = params[params[2]];//æºååid |
| | | var HIeID = params[params[3]]; //æºåid + æºååid |
| | | } |
| | | |
| | | //ä¾åºåè¯¢ä»·åæ°å¢ |
| | | if (OperationType == 1) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '1120' }, |
| | | success: function (d) { |
| | | //$("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | } |
| | | }); |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | } else if (OperationType == 3) { |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | RoadBillMain(linterid); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | //æ°å¢è¡è¡¨æ ¼æ°æ® |
| | | var NewRow = { |
| | | "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HUnitID": 0, "HUnitNumber": "", |
| | | "HUnitName": "", "HQty": 0, "HDate": new Date(), "HBagType": "", "HCarryType": "", "HAddress": "", "HRemark": "" |
| | | }; |
| | | |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | break; |
| | | case 'btn-CopyLine': |
| | | var copydata = JSON.stringify(data); |
| | | if (data.length <= 0) { |
| | | layer.msg("è¯·éæ©éè¦å¤å¶çä¸è¡ï¼"); |
| | | } |
| | | else if (data.length > 1) { |
| | | layer.msg("åªè½éæ©å¤å¶ä¸è¡ï¼"); |
| | | } |
| | | else { |
| | | var copydata2 = copydata.substring(1, copydata.length);//å»é¤é¦è¡å符'[' |
| | | var copyrow = copydata2.substring(0, copydata2.length - 1);//å»é¤æ«å°¾å符']' |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | } |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | //è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | var data = obj.data; |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | if (obj.event === 'del') { |
| | | layer.confirm('ççå é¤è¡åï¼', function (index) { |
| | | if (rowIndex === '0') { |
| | | layer.msg('é¦è¡æ æ³å é¤ï¼ï¼ï¼'); |
| | | } else { |
| | | obj.del(); |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | var data = obj.data; |
| | | if (obj.event == 'HDate') { |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild |
| | | , show: true //ç´æ¥æ¾ç¤º |
| | | , closeStop: this |
| | | , done: function (nowDate) { |
| | | //æ¶é´éæ©å®æï¼è¡æ°æ®æ´æ° |
| | | data[field] = nowDate; |
| | | obj.update(data); |
| | | //å·æ°å¤éæ¡ |
| | | //checkRefresh(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //#region [ 表ä½F7äºä»¶ ] |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | if (obj.event == 'HMaterID') { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: '产åå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../../views/Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index]; |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HMaterName: checkStatus.data[0].HName |
| | | , HMaterID: checkStatus.data[0].HItemID |
| | | , HMaterNumber: checkStatus.data[0].HNumber |
| | | , HMaterModel: checkStatus.data[0].HModel |
| | | , HUnitID: checkStatus.data[0].HUnitID |
| | | , HUnitNumber: checkStatus.data[0].HUnitNumber |
| | | , HUnitName: checkStatus.data[0].HUnitName |
| | | }); |
| | | |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event == 'HUnitID') { |
| | | 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'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HUnitID: checkStatus.data[0].HItemID |
| | | , HUnitNumber: checkStatus.data[0].HNumber |
| | | , HUnitName: checkStatus.data[0].HName |
| | | }); |
| | | |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | obj.event = ""; |
| | | return false; |
| | | } |
| | | }) |
| | | //#endregion |
| | | |
| | | }); |
| | | |
| | | //ä¿åæäº¤ |
| | | form.on('submit(btnSave)', function (data) {//æäº¤ |
| | | var sSubStr = table.cache['mainTable']; |
| | | if (AllowLoadData(sSubStr)) { |
| | | set_AddNew(data); |
| | | } |
| | | }); |
| | | |
| | | //éåº |
| | | form.on('submit(Cancel)', function (data) { |
| | | if (OperationType != "") { |
| | | Pub_Close(1); |
| | | } |
| | | }); |
| | | |
| | | //æå° |
| | | form.on('submit(btn_print)', function (data) { |
| | | get_print(data); |
| | | }); |
| | | |
| | | //#region [表头æ¾å¤§é] |
| | | //éæ©éè´åå¼¹çª |
| | | form.on('submit(btnSearchEmp)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'éè´åå表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_EmployeeList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HEmpName").val(checkStatus.data[0].HName); |
| | | $("#HEmpID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©é¨é¨å¼¹çª |
| | | form.on('submit(btnSearchDept)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'ç³è¯·é¨é¨' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_DepartmentList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HDeptName").val(checkStatus.data[0].HName); |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©å¸å«å¼¹çª |
| | | form.on('submit(btnSearchCur)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'å¸å«å表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Currency.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HCurName").val(checkStatus.data[0].è´§å¸åç§°); |
| | | $("#HCurID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | $("#HDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//æ¥æ |
| | | $("#HBeginDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//çææ¥æ |
| | | $("#HEndDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//å¤±ææ¥æ |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | //表头 |
| | | columns = [ //表头 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', totalRow: true } |
| | | , { field: 'HMaterID', title: 'ç©æID', hide: true } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', edit: 'text', event: "HMaterID", width: 165 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 220 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 165 } |
| | | , { field: 'HUnitID', title: 'åä½ID', hide: true } |
| | | , { field: 'HUnitNumber', title: 'åä½ä»£ç ', edit: 'text', event: "HUnitID", width: 165 } |
| | | , { field: 'HUnitName', title: 'åä½åç§°', width: 165 } |
| | | , { field: 'HQty', title: 'éæ±æ°é', edit: 'text', width:90 } |
| | | , { field: 'HDate', title: 'é¢è®¡äº¤è´§æ¥æ', width: 120, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd')}}</div>", event: 'HDate' } |
| | | , { field: 'HBagType', title: 'å
è£
æ¹å¼', edit: 'text', width: 120 } |
| | | , { field: 'HCarryType', title: 'è¿è¾æ¹å¼', edit: 'text', width: 120 } |
| | | , { field: 'HAddress', title: '交货å°ç¹', edit: 'text', width: 120 } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text' } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 65 } |
| | | ]; |
| | | option = { |
| | | id: 'mainTable' |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , cellMinWidth: 120 |
| | | , height: 400 |
| | | , cols: [columns] |
| | | , limit: Number.MAX_VALUE//é»è®¤æ¾ç¤ºå
¨é¨ |
| | | , done: function (res, curr, count) { |
| | | option.data = res.data; |
| | | //廿䏿æ¡å¤±ç¦äºä»¶å¦åå¨ä¸ææ¡éè¾å
¥å¼ |
| | | $('.layui-form-select').find('input').unbind("blur"); |
| | | //è¡¨æ ¼éè½½åæ¾ä¸ææ¡éçæ°æ® |
| | | $('tr').each(function (e) { |
| | | var $cr = $(this); |
| | | var dataIndex = $cr.attr("data-index"); |
| | | }); |
| | | } |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | option.data = [{ |
| | | "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HUnitID": 0, "HUnitNumber": "", |
| | | "HUnitName": "", "HQty": 0, "HDate": new Date(), "HBagType": "", "HCarryType": "", "HAddress": "", "HRemark": "" |
| | | }]; |
| | | table.render(option); |
| | | |
| | | } |
| | | |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(sSubStr) { |
| | | //å é¤åè¡¨æ°æ®æ¶ ä¼å ç¨æ°ç»çä½ç½®,éè¦éæ°æä¸ä¸é¡ºåº |
| | | var sSubTable = []; |
| | | for (var i = 0; i < sSubStr.length; i++) { |
| | | if (sSubStr[i] != "") { |
| | | sSubStr[i].LAY_TABLE_INDEX = i; |
| | | sSubTable.push(sSubStr[i]) |
| | | } |
| | | } |
| | | |
| | | var Result = true; |
| | | |
| | | for (var i = 0; i < sSubTable.length; i++) { |
| | | if (sSubTable[i].HMaterID == 0) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,ç©æä¿¡æ¯ä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 5000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubTable[i].HUnitID == 0) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,计éåä½ä¿¡æ¯ä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 5000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | } |
| | | |
| | | return Result |
| | | } |
| | | |
| | | //ä¿åHMaker |
| | | function set_AddNew(data) { |
| | | var num_1 = []; |
| | | for (var i = 0; i < table.cache["mainTable"].length; i++) { |
| | | if (table.cache["mainTable"][i] != "") { |
| | | table.cache["mainTable"][i].LAY_TABLE_INDEX = i; |
| | | num_1.push(table.cache["mainTable"][i]) |
| | | } |
| | | } |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(num_1); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"]; |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sup_AskPriceBill/SaveAskPriceBill", |
| | | async: true, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true); |
| | | layer.close(index); |
| | | layer.msg("æäº¤æå"); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.close(index); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ç¼è¾ 页é¢èµå¼ |
| | | function RoadBillMain(linterid)//å 载表头 |
| | | { |
| | | var sWhere = " and hmainid=" + linterid; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sup_AskPriceBill/Sup_AskPriceBillList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | var data = result.data; |
| | | //主表 |
| | | $("#HBillNo").val(data[0]["åæ®å·"]); |
| | | $("#HInterID").val(data[0]["hmainid"]); |
| | | $("#HProcType").val(data[0]["ä¸å¡ç±»å"]); |
| | | $("#HEmpName").val(data[0]["éè´ååç§°"]); |
| | | $("#HEmpID").val(data[0]["HEmpID"]); |
| | | $("#HDeptName").val(data[0]["é¨é¨åç§°"]); |
| | | $("#HDeptID").val(data[0]["HDeptID"]); |
| | | $("#HCurName").val(data[0]["å¸å«"]); |
| | | $("#HCurID").val(data[0]["HCurID"]); |
| | | $("#HPayConditionID").val(data[0]["HPayConditionID"]); |
| | | $("#HBeginDate").val(Format(new Date(data[0]["çææ¥æ"]), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(data[0]["å¤±ææ¥æ"]), "yyyy-MM-dd")); |
| | | $("#HExplanation").val(data[0]["æè¦"]); |
| | | $("#HRemark").val(data[0]["è¡¨å¤´å¤æ³¨"]); |
| | | |
| | | var rowdata = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | //å表 èµå¼ |
| | | rowdata.push({ |
| | | "HMaterID": data[i]["HMaterID"], "HMaterNumber": data[i]["ç©æä»£ç "], "HMaterName": data[i]["ç©æåç§°"], "HMaterModel": data[i]["è§æ ¼åå·"], "HUnitID": data[i]["HUnitID"], "HUnitNumber": data[i]["åä½ä»£ç "], |
| | | "HUnitName": data[i]["åä½"], "HQty": data[i]["éæ±æ°é"], "HDate": data[i]["é¢è®¡äº¤è´§æ¥æ"], "HBagType": data[i]["å
è£
æ¹å¼"], "HCarryType": data[i]["è¿è¾æ¹å¼"], "HAddress": data[i]["交货å°ç¹"], "HRemark": data[i]["表ä½å¤æ³¨"] |
| | | }); |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | form.render('select'); |
| | | } else { |
| | | layer.msg(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æå° |
| | | function get_print(data) { |
| | | |
| | | } |
| | | |
| | | function get_UrlVars() { |
| | | 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; |
| | | } |
| | | |
| | | //#endregion |
| | | }) |
| | | </script> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>ä¾åºå询价åå表</title> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div class="layui-collapse"> |
| | | <div class="layui-colla-item"> |
| | | <div class="layui-colla-title layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>æ´å¤</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <div class="layui-colla-content"> |
| | | <div class="layui-row" style=" margin-bottom: 10px;"> |
| | | <label class="layui-form-label">ä¸å¡ç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="HProcType" name="HProcType" lay-filter=""> |
| | | <option value="" selected>è¯·éæ©</option> |
| | | <option value="å¤è´å
¥åº">å¤è´å
¥åº</option> |
| | | <option value="å§å¤å å·¥">å§å¤å å·¥</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æåç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterName" id="HMaterName"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | | <option value=">">></option> |
| | | <option value="<="><=</option> |
| | | <option value="<"><</option> |
| | | <option value="<>"><></option> |
| | | <option value="7">å
å«</option> |
| | | <option value="8">å·¦å
å«</option> |
| | | <option value="9">å³å
å«</option> |
| | | <option value="10">ä¸å
å«</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | var sWhere = ""; |
| | | var titleData = ["hmainid", "hentryid", "HEntryID", "HDeptID", "HMaterID", "HSupID", "HEmpID", "HPayConditionID", "HCurID","HUnitID"]; |
| | | var option = []; |
| | | var HModName = "Sup_AskPriceBillList"; |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //æ°å¢ |
| | | case 'set_AddNew': set_AddNew(); |
| | | break; |
| | | //ç¼è¾ |
| | | case 'set_Edit': set_Edit(); |
| | | break; |
| | | //å é¤ |
| | | case 'set_DeleteBill': set_DeleteBill(); |
| | | break; |
| | | //å·æ° |
| | | case 'get_Refresh': get_Refresh(); |
| | | break; |
| | | //éåºæé® |
| | | case 'get_Exit': Pub_Close(2); |
| | | //å设置 |
| | | case 'set_HideColumn': |
| | | get_HideColumn(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));;//ç»ææ¥æ |
| | | //æ¥è¯¢ |
| | | get_Display(""); |
| | | //åå§åè¡¨æ ¼ |
| | | //DisPlay_HideColumn(); |
| | | } |
| | | |
| | | // æ¥è¯¢ |
| | | function get_Display(sWhere) { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sup_AskPriceBill/Sup_AskPriceBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.close(ajaxLoad); |
| | | |
| | | var data = []; |
| | | var col = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | } |
| | | } |
| | | } |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true //å¼å¯å页 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , cols: [col] |
| | | , data: data1.data |
| | | }; |
| | | //åå§åè¡¨æ ¼ |
| | | DisPlay_HideColumn(); |
| | | table.render(option); |
| | | |
| | | if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | | ColFilter(); |
| | | } |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.msg(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | // å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HDate = $("#HDate").val();;//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | var HProcType = $("#HProcType").val();//ä¸å¡ç±»å |
| | | var HMaterNumber = $("#HMaterNumber").val();//ç©æä»£ç |
| | | var HMaterName = $("#HMaterName").val();//ç©æåç§° |
| | | var ColName = $("#ColName").val();//å¤éæ¡ |
| | | var Comparator = $("#Comparator").val() |
| | | var ColContent = $("#ColContent").val(); |
| | | |
| | | if (ColName != 0 && Comparator != 0) { |
| | | var com = ""; |
| | | switch (Comparator) { |
| | | case "7": |
| | | com = "like'%" + ColContent + "%'"; |
| | | break; |
| | | case "8": |
| | | com = "like'%" + ColContent + "'"; |
| | | break; |
| | | case "9": |
| | | com = "like'" + ColContent + "%'"; |
| | | break; |
| | | case "10": |
| | | com = "not like'%" + ColContent + "%'"; |
| | | break; |
| | | default: |
| | | com = "" + Comparator + "'" + ColContent + "'"; |
| | | break; |
| | | } |
| | | sWhere += " and " + ColName + " " + com; |
| | | } |
| | | |
| | | |
| | | |
| | | if (HDate) { |
| | | sWhere += " and æ¥æ >= '" + HDate + "'"; |
| | | } |
| | | if (HDate1) { |
| | | sWhere += " and æ¥æ <= '" + HDate1 + "'"; |
| | | } |
| | | |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (HProcType && HProcType != "") { |
| | | sWhere += " and ä¸å¡ç±»å = '" + HProcType + "'"; |
| | | } |
| | | if (HMaterNumber) { |
| | | sWhere += " and ç©æä»£ç like '%" + HMaterNumber + "%'"; |
| | | } |
| | | if (HMaterName) { |
| | | sWhere += " and ç©æåç§° like '%" + HMaterName + "%'"; |
| | | } |
| | | |
| | | get_Display(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | |
| | | // éç½®è¿æ»¤æ¡ä»¶æ¹æ³ |
| | | function set_ClearQuery() { |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//å¼å§æ¥æ |
| | | $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));;//ç»ææ¥æ |
| | | $("#HBillNo").val("");//åæ®å· |
| | | $("#HProcType").val("");//ä¸å¡ç±»å |
| | | $("#HMaterNumber").val("");//ç©æä»£ç |
| | | $("#HMaterName").val("");//ç©æåç§° |
| | | $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | | $("#Comparator").val("0"); |
| | | form.render('select'); |
| | | $("#btnSearch").click(); |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //æ°å¢ |
| | | function set_AddNew() { |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['100%', '100%'] |
| | | , title: 'ä¾åºåè¯¢ä»·åæ°å¢' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../询价å/Sup_AskPriceBillEdit.html?OperationType=1&linterid=' |
| | | , end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // ç¼è¾ |
| | | function set_Edit() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var linterid = data[0].hmainid; |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ä¾åºå询价åç¼è¾' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../询价å/Sup_AskPriceBillEdit.html?OperationType=3&linterid=' + linterid + '&HEntryID=-1' |
| | | , end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | |
| | | // å é¤ |
| | | function set_DeleteBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hmainid = data[0].hmainid; |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | var wait = layer.load(); |
| | | //é»è¾å 餿¹æ³ |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sup_AskPriceBill/DelAskPriceBill', |
| | | type: "GET", |
| | | data: { "HInterID": hmainid, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | //å
³éå½åframe |
| | | layer.close(wait); |
| | | layer.msg(result.Message); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | get_FastQuery(); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | |
| | | } |
| | | |
| | | // å·æ° |
| | | function get_Refresh() { |
| | | set_ClearQuery(); |
| | | get_Display(sWhere); |
| | | } |
| | | |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | var contentUrl = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | var urlLen = urlStr.split('/'); |
| | | for (var i = 0; i < urlLen.length - 4; i++) { |
| | | contentUrl += "../"; |
| | | } |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | |
| | | contentUrl += 'åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName; |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: [contentUrl, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = ["hmainid", "hentryid", "HEntryID", "HDeptID", "HMaterID", "HSupID", "HEmpID", "HPayConditionID", "HCurID", "HUnitID"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 2; i++) { |
| | | if (dataCol[i]) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | } |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | |
| | | switch (option.cols[0][i + 1]["field"]) { |
| | | case 'æ¥æ': |
| | | option.cols[0][i + 1]["width"] = 110; |
| | | break; |
| | | case 'åæ®å·': |
| | | option.cols[0][i + 1]["width"] = 140; |
| | | break; |
| | | case 'ä¸å¡ç±»å': |
| | | option.cols[0][i + 1]["width"] = 105; |
| | | break; |
| | | case 'éè´å代ç ': |
| | | option.cols[0][i + 1]["width"] = 135; |
| | | break; |
| | | case 'éè´ååç§°': |
| | | option.cols[0][i + 1]["width"] = 135; |
| | | break; |
| | | case 'é¨é¨ä»£ç ': |
| | | option.cols[0][i + 1]["width"] = 140; |
| | | break; |
| | | case 'é¨é¨åç§°': |
| | | option.cols[0][i + 1]["width"] = 160; |
| | | break; |
| | | } |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | //if (data1.data[0].HColumnWidth != 0) { |
| | | // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; |
| | | //} else { |
| | | // option.cols[0][i + 1]["width"] = ""; |
| | | //} |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //åææ¾ç¤ºä¸ææ¡ |
| | | function ColFilter() { |
| | | var Organization = '<option value="0" selected="selected" ></option>'; |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | if (option.cols[0][i].hide != true) { |
| | | Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>'; |
| | | } |
| | | } |
| | | $("#ColName").empty(); |
| | | $("#ColName").append(Organization); |
| | | form.render('select'); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //以䏿¯layui模å |
| | | }); |
| | | |
| | | </script> |