PDA添加报工平台,开工停工产量汇报完工功能,欠料报表汇总和明细修改
| | |
| | | <Content Include="views\ç产管ç\å¼å¸¸åé¦å\Sc_MESExecptFeedBackBillType.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å°å·¥åº\å¼å·¥\Sc_SwipeCardStart.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å°å·¥åº\å¾®çåè®°å½å\Sc_SubtleFlawBillList.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°_PDA\IpadIndex_PDA.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°_PDA\IpadSourceIndex_PDA.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°_PDA\LineBind_PDA.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°_PDA\äº§éæ±æ¥\Sc_ProductReportBillList_PDA.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°_PDA\äº§éæ±æ¥\Sc_Add_ProductReportBillList_PDA.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°_PDA\å®å·¥\Sc_Add_MESEndWorkBillList_PDA.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°_PDA\å¼å·¥\Sc_Add_MESBeginWorkBillList_PDA.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°åè½é¡µ\Gy_ButtonList.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°åè½é¡µ\LineBind_Button.html" /> |
| | | <Content Include="views\ç产管ç\æ¬ æè¿ç®\JIT_MaterialLevelShorAnalysis.html" /> |
| | |
| | | <Content Include="views\ç产管ç\çæ¬¡å¼çå\Sc_ShiftsBeginInfoBill_Add_Edit.html" /> |
| | | <Content Include="views\ç产管ç\ææè®¡å\JIT_PickUpCalculate.html" /> |
| | | <Content Include="views\ç产管ç\ç产任å¡å\Sc_ICMOBillOrProcessExchangeResumeList.html" /> |
| | | <Content Include="views\ç产管ç\æ¥å·¥å¹³å°_PDA\åå·¥\Sc_Add_MESStopWorkBillList_PDA.html" /> |
| | | <Content Include="views\ç产管ç\ç产å¼å·¥å\Sc_MESBeginWorkBillList_PDA.html" /> |
| | | <Content Include="views\ç产管ç\ç产æ¥è¡¨\SC_BOMReport.html" /> |
| | | <Content Include="views\ç产管ç\ç产æ¥è¡¨\Sc_ProductionInProgressReport.html" /> |
| | |
| | | å¼å·¥å |
| | | </a> |
| | | </dd> |
| | | <dd> |
| | | <a href="ç产管ç/æ¥å·¥å¹³å°_PDA/IpadSourceIndex_PDA.html" target="main_self_frame" style="color: aqua;"> |
| | | <img src="../layuiadmin/myicon/åæ®å½å¶.svg" alt="åæ®å½å¶" style="width:25px;height:25px;margin-right: 5px;" /> |
| | | 设å¤è¿è¡ç¶ææ¥è¯¢ |
| | | </a> |
| | | </dd> |
| | | <dd> |
| | | <a href="ç产管ç/æ¥å·¥å¹³å°_PDA/äº§éæ±æ¥/Sc_ProductReportBillList_PDA.html" target="main_self_frame" style="color: aqua;"> |
| | | <img src="../layuiadmin/myicon/åæ®å½å¶.svg" alt="åæ®å½å¶" style="width:25px;height:25px;margin-right: 5px;" /> |
| | | äº§éæ±æ¥å表 |
| | | </a> |
| | | </dd> |
| | | <!--<dd> |
| | | <a href="ç产管ç/ç产åå·¥å/Sc_Add_MESStopWorkBillList_PDA.html" target="main_self_frame" style="color: aqua;"> |
| | | <img src="../layuiadmin/myicon/åæ®å½å¶.svg" alt="åæ®å½å¶" style="width:25px;height:25px;margin-right: 5px;" /> |
| | | åå·¥å |
| | | </a> |
| | | </dd>--> |
| | | <dd> |
| | | <a href="车é´ç®¡ç/å·¥åºæµè½¬/MES_StationOutBillList_PDA_QiaoYi.html?type=czd" target="main_self_frame" style="color: aqua;"> |
| | | <img src="../layuiadmin/myicon/åæ®å½å¶.svg" alt="åæ®å½å¶" style="width:25px;height:25px;margin-right: 5px;" /> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>æ¥å·¥å¹³å°</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <!--å¼ç¨layuiæ ·å¼æä»¶--> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <link href="../../../layuiadmin/layui/css/global.css" rel="stylesheet" /> |
| | | <!--èªå®ä¹æ ·å¼--> |
| | | <link href="../../../layuiadmin/layui/css/ReportPlatform.css" rel="stylesheet" /> |
| | | <!--å¼ç¨layui jsæä»¶--> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/echarts.min.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | </head> |
| | | |
| | | <body> |
| | | <!-- 让IE8/9æ¯æåªä½æ¥è¯¢ï¼ä»èå
¼å®¹æ
æ ¼ --> |
| | | <!--[if lt IE 9]> |
| | | <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script> |
| | | <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script> |
| | | <![endif]--> |
| | | |
| | | <div style="margin: 20px 20px;"> |
| | | <!--<blockquote class="layui-elem-quote">注æï¼ä¸è¿°æ¼ç¤ºä¸çé¢è²åªæ¯åä¸ä¸ªåºåä½ç¨ï¼å¹¶éæ
æ ¼å
ç½®ã</blockquote>--> |
| | | <div class="layui-row layui-col-space10"> |
| | | <div class="layui-col-sm12 layui-col-md8"> |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">å·¥åå表</li> |
| | | </ul> |
| | | <div class="layui-tab-content content3"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-row layui-col-space10" id="btomleft" style="height:600px;display:block;overflow-y:auto;"> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4"> |
| | | <fieldset style="border: 1px solid #eee;box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%);"> |
| | | <legend style="color: #5FB878">æä½å°</legend> |
| | | <div class="content4"> |
| | | <!--<div class="layui-row layui-col-space10"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenWork(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-play imgicon"></span> |
| | | <span class="imgtitle">å¼å·¥</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenReport(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-list imgicon"></span> |
| | | <span class="imgtitle">æ±æ¥</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenEnd(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-logout imgicon"></span> |
| | | <span class="imgtitle">å®å·¥</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row layui-col-space10" style="display:none;"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="KSOpenWork(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-pause imgicon"></span> |
| | | <span class="imgtitle">å¿«éå¼å·¥</span> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-row layui-col-space10"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="SOP(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-read imgicon"></span> |
| | | <span class="imgtitle">ä½ä¸æå¯¼ä¹¦</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenFistCheck(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-search imgicon"></span> |
| | | <span class="imgtitle">馿£</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenProcess(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-search imgicon"></span> |
| | | <span class="imgtitle">å·¡æ£</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="ProcessCheck(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-search imgicon"></span> |
| | | <span class="imgtitle">æ«æ£</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row layui-col-space10"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenInSpection(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-release imgicon"></span> |
| | | <span class="imgtitle">æ¥æ£ç³è¯·</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenMaterToSource(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-engine imgicon"></span> |
| | | <span class="imgtitle">䏿é²é</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="BadGather(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-chart imgicon"></span> |
| | | <span class="imgtitle">ä¸è¯éé</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row layui-col-space10"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenStop(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-pause imgicon"></span> |
| | | <span class="imgtitle">åå·¥</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="Abnormal(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-unlink imgicon"></span> |
| | | <span class="imgtitle">å¼å¸¸ç³è¯·</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="Esc(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-close imgicon"></span> |
| | | <span class="imgtitle">éåº</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row layui-col-space10"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="CurrentStatus(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-console imgicon"></span> |
| | | <span class="imgtitle">å½åç¶æ</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="CodingReport(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-console imgicon"></span> |
| | | <span class="imgtitle">å½åå·¥å(æ±æ¥)</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="BeginDotCheck(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-search imgicon"></span> |
| | | <span class="imgtitle">设å¤å¯å¨ç¹æ£</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row layui-col-space10"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="PreventErrMouldCheck(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-engine imgicon"></span> |
| | | <span class="imgtitle">é²ééªè¯</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="TakeSample(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-form imgicon"></span> |
| | | <span class="imgtitle">æ£éªåæ ·</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="TechParam(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-tabs imgicon"></span> |
| | | <span class="imgtitle">å·¥èºåæ°ç¹æ£</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row layui-col-space10"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="SingErrMsg(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-layer imgicon"></span> |
| | | <span class="imgtitle">å¼å¸¸ç¾å°å¤ç</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="ErrMsgBackCheck(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-layer imgicon"></span> |
| | | <span class="imgtitle">å¼å¸¸éªæ¶</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="SubtleFlaw(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-log imgicon"></span> |
| | | <span class="imgtitle">å¾®çåæ±æ¥</span> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <!--æ°æ®æå
¥å¨ææé®SQLï¼ç¶åæ¤é¡µé¢åç¹å»äºä»¶å³å¯ï¼ç½é¡µç»å®æ°æé®å³å¯ä½¿ç¨--> |
| | | <!--insert into Gy_BGButtons (HNumber,HName,HIcno,HOnclick,HSize,HOrder) values ('æé®ä»£ç ','æé®åå','æé®å¾æ ','æé®ç¹å»äºä»¶','æé®é»è®¤å¤§å°ï¼é»è®¤æ¯ä¸ï¼å¤§ï¼ä¸ï¼å°ï¼','æé®é»è®¤æåº é»è®¤0')--> |
| | | |
| | | <div class="layui-row layui-col-space10" id="button-container"> |
| | | |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script> |
| | | var wktag = 0; |
| | | var workcode = ""; //å·¥åå· |
| | | var HDeptID = ""; //车é´ID |
| | | var HDept = ""; //è½¦é´ |
| | | var HSourceID = ""; //çäº§èµæºID |
| | | var HSourceName = ""; //çäº§èµæº |
| | | var HSourceID1 = ""; //çäº§èµæºID1 |
| | | var HSourceName1 = ""; //çäº§èµæº1 |
| | | var HSourceInterID = ""; //æºå主å
ç |
| | | var HProcExchInterID = ""; //æµè½¬å¡id |
| | | var HSourceEntryID = ""; //æºååå
ç |
| | | var HSourceBillNo = ""; //æºååå· |
| | | var HSourceBillType = ""; //æºåç±»å |
| | | var HICMOInterID = ""; //ç产订å主å
ç |
| | | var HICMOEntryID = ""; //ç产订ååå
ç |
| | | var HICMOBillNo = ""; //ä»»å¡åå· |
| | | var HMaterName = ""; //产ååç§° |
| | | var HMaterID = 0; //产åID |
| | | var HProQty = []; //æ¶é´ç¹äº§é |
| | | var HBadQty = []; //ä¸è¯æ°é |
| | | var HBadReason = []; //ä¸è¯åå |
| | | var HEmpName = ""; //æä½å |
| | | var HManagerName = ""; //è´è´£äºº |
| | | var HGroupName = ""; //çç» |
| | | var HProcID = 0; //å·¥åº |
| | | var HSBName = ""; //设å¤åç§° |
| | | |
| | | //注æï¼éé¡¹å¡ ä¾èµ element 模åï¼å¦åæ æ³è¿è¡åè½æ§æä½ |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | var params = get_UrlVars(); |
| | | var OperationType = 0; |
| | | var linterid = 0; |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | parent.location.href = "../../../views/index_Mobile.html"; |
| | | } else { |
| | | OperationType = params[params[0]];//æä½ç±»å |
| | | linterid = params[params[1]];//æºåid |
| | | } |
| | | fetchButtonsData(); |
| | | fetchListData(linterid); |
| | | }); |
| | | var HManagerID = 0; |
| | | var HGroupID = 0; |
| | | |
| | | //å è½½å½åç¨æ·æé® |
| | | function fetchButtonsData() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/ReportPlatForm/getButtonlist', |
| | | type: "GET", |
| | | data: { "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data && data1.data.length > 0) { |
| | | // æ¸
ç©ºç°æå
容 |
| | | $("#button-container").empty(); |
| | | var colClass = ''; // å¨æè®¾ç½®åçæ ·å¼ |
| | | let largestColClass = 'layui-col-xs4'; // é»è®¤æ°å¢æé®å¤§å°ï¼å设æå¤æ¯ 3 个æé®ä¸æï¼ |
| | | |
| | | // éåæ¯ä¸ªæé®æ°æ®å¹¶çæå¯¹åºç HTML |
| | | data1.data.forEach(function (buttonData, index) { |
| | | // æ ¹æ® defaultSize åæ®µéæ©åéçå宽 |
| | | switch (buttonData.æé®å¤§å°) { |
| | | case 'å°': |
| | | colClass = 'layui-col-xs4'; // 䏿4个 |
| | | break; |
| | | case 'ä¸': |
| | | colClass = 'layui-col-xs4'; // 䏿3个 |
| | | break; |
| | | case '大': |
| | | colClass = 'layui-col-xs6'; // 䏿2个 |
| | | break; |
| | | default: |
| | | colClass = 'layui-col-md4'; // é»è®¤è®¾ç½®ä¸ºä¸ç大å°ï¼3ä¸ªä¸æï¼ |
| | | } |
| | | |
| | | // æ´æ°æå¤§å宽ï¼åæå¤§å宽 |
| | | if (colClass === 'layui-col-md6') { |
| | | largestColClass = colClass; // 妿å½ååå®½æ¯ 'layui-col-md6'ï¼è¯´ææ¯æå®½ç |
| | | } else if (colClass === 'layui-col-md4' && largestColClass !== 'layui-col-md6') { |
| | | largestColClass = colClass; // é»è®¤å宽为 'layui-col-md4'ï¼å°äº 'layui-col-md6' |
| | | } else if (colClass === 'layui-col-md3' && largestColClass === 'layui-col-md4') { |
| | | largestColClass = colClass; // 妿å½ååå®½æ¯ 'layui-col-md3'ï¼å°äº 'layui-col-md4' |
| | | } |
| | | |
| | | var html = ''; |
| | | html += '<div class="' + colClass + '" id="btn' + index + '">'; |
| | | html += ' <div class="cnt bottomright" id="button' + index + '" onclick="' + buttonData.äºä»¶åç§° + '(event, this)">'; |
| | | html += ' <span class="layui-icon ' + buttonData.徿 + ' imgicon"></span>'; |
| | | html += ' <span class="imgtitle">' + buttonData.åç§° + '</span>'; |
| | | html += ' </div>'; |
| | | html += ' <span class="layui-icon layui-icon-delete delete" onclick="deleteButton(event, \'' + buttonData.HItemID + '\')"></span>'; // ä¿®æ¹å 餿é®äºä»¶ï¼ä¼ é id1 å id2 |
| | | html += '</div>'; |
| | | // å°çæç HTML 追å å° #button-container |
| | | $("#button-container").append(html); |
| | | }); |
| | | |
| | | // æ·»å ä¸ä¸ªæ°å¢æé® |
| | | var html1 = ''; |
| | | html1 += '<div class="layui-col-sm12 ' + largestColClass + '">'; |
| | | html1 += ' <div class="cnt bottomright">'; |
| | | html1 += ' <span class="layui-icon layui-icon-addition imgtitle" onclick="Add_Buttton(event,this,1)"></span>'; |
| | | html1 += ' </div>'; |
| | | html1 += '</div>'; |
| | | |
| | | $("#button-container").append(html1); |
| | | } else { |
| | | // å¦ææ²¡ææé®æ°æ®ï¼å±ç¤ºé»è®¤çç©ºç½æ°å¢æé® |
| | | var html1 = ''; |
| | | html1 += '<div class="layui-col-sm12 layui-col-xs4">'; |
| | | html1 += ' <div class="cnt bottomright">'; |
| | | html1 += ' <span class="layui-icon layui-icon-addition imgtitle" onclick="Add_Buttton(event,this,1)"></span>'; |
| | | html1 += ' </div>'; |
| | | html1 += '</div>'; |
| | | $("#button-container").append(html1); |
| | | } |
| | | }, |
| | | error: function (error) { |
| | | console.log('è·åæé®æ°æ®å¤±è´¥', error); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å 载工åå表 |
| | | //éä¸èµæº |
| | | function fetchListData(HSourceID) { |
| | | if (HSourceID != "0" && HSourceID != null && HSourceID!="") { |
| | | $('.ctop').removeClass('check'); //å é¤ä¸åç¶çº§clssæ ·å¼ç¸åçææå
ç´ |
| | | //æ§è¡èå¨äºä»¶ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/ReportPlatForm/SearchGetWorkBillList", |
| | | type: "GET", |
| | | data: { "HSourceID": HSourceID }, |
| | | dataType: "json",//æ°æ®ç±»åå¯ä»¥ä¸º text xml json script jsonp |
| | | success: function (data) { |
| | | |
| | | var LoadData1 = data.data.h_p_JIT_GetWorkBillListInfoBySource; |
| | | if (LoadData1.length > 0) //å·¥ååè¡¨æ°æ® |
| | | { |
| | | |
| | | for (var i = 0; i < LoadData1.length; i++) { |
| | | var html1 = ''; |
| | | //æ±æ¥æ»æ°å¤§äºè®¡åæ°éï¼è°æ´èæ¯è²æç¤º |
| | | if (LoadData1[i].HDateFinishQty > LoadData1[i].HDatePlanQty) { |
| | | html1 += '<div class="layui-col-sm12 layui-col-md3" style="background-color:#F595A0;border-radius: 3%;">'; |
| | | } else { |
| | | html1 += '<div class="layui-col-sm12 layui-col-md3">'; |
| | | } |
| | | html1 += '<div class="cns" id="bs' + (i + 1) + '" onclick="CheckBtom(this,' + (i + 1) + ')">'; |
| | | html1 += '<dl>'; |
| | | html1 += '<dd class="tcenter">'; |
| | | html1 += '<h1 style="display:none;"><span>åæ®ç±»åï¼</span><span id="ty' + (i + 1) + '">' + LoadData1[i].HBillType + '</span></h1>'; |
| | | //HSourceInterIDå®é
åå¼ï¼Sc_ICMOBillStatus_Tmp HInterIDï¼åæ®ä¸»IDï¼ |
| | | html1 += '<h1 style="display:none;"><span>æºå主å
ç ï¼</span><span id="sm' + (i + 1) + '">' + LoadData1[i].HSourceInterID + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>æµè½¬å¡ä¸»IDï¼</span><span id="lzk' + (i + 1) + '">' + LoadData1[i].HProcExchInterID + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>æºååå
ç ï¼</span><span id="sb' + (i + 1) + '">' + LoadData1[i].HSourceEntryID + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>æºååå·ï¼</span><span id="sw' + (i + 1) + '">' + LoadData1[i].HSourceBillNo + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>æºåç±»åï¼</span><span id="st' + (i + 1) + '">' + LoadData1[i].HSourceBillType + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>ç产订åå·ä¸»IDï¼</span><span id="df' + (i + 1) + '">' + LoadData1[i].HICMOInterID + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>ç产订ååIDï¼</span><span id="ds' + (i + 1) + '">' + LoadData1[i].HICMOEntryID + '</span></h1>'; |
| | | |
| | | |
| | | html1 += '<h1><span>å·¥åå·ï¼</span><span id="wk' + (i + 1) + '">' + LoadData1[i].HICMOBillNo + '</span><span style="margin-left:25px;">æ¥æï¼</span><span>' + LoadData1[i].è®¡åæ¥æ + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>产åIDï¼</span><span id="materid' + (i + 1) + '">' + LoadData1[i].HMaterID + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>å·¥åºIDï¼</span><span id="procid' + (i + 1) + '">' + LoadData1[i].HProcID + '</span></h1>'; |
| | | html1 += '<h1><span>产ååç§°ï¼</span><span id="ptn' + (i + 1) + '">[' + LoadData1[i].HMaterNumber + ']-[' + LoadData1[i].HMaterName + ']</span></h1>'; |
| | | html1 += '<h1><span>产ååå·ï¼</span><span id="pts' + (i + 1) + '">' + LoadData1[i].HModel + '</span></h1>'; |
| | | html1 += '<h1><span>è®¡åæ°éï¼</span><span>' + LoadData1[i].HDatePlanQty + '</span><span style="margin-left:20px;">æ±æ¥æ»æ°ï¼</span><span>' + LoadData1[i].HDateFinishQty + '</span></h1>'; |
| | | switch (LoadData1[i].HICMOStatus) { |
| | | case "å¾
ç产": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border3"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">é¢æç¶æï¼</span><span>' + LoadData1[i].é¢æç¶æ + '</span></h1>'; |
| | | break; |
| | | case "ç产ä¸": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border2"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">é¢æç¶æï¼</span><span>' + LoadData1[i].é¢æç¶æ + '</span></h1>'; |
| | | break; |
| | | case "æèµ·": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border1"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">é¢æç¶æï¼</span><span>' + LoadData1[i].é¢æç¶æ + '</span></h1>'; |
| | | break; |
| | | case "å®å·¥": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border4"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">é¢æç¶æï¼</span><span>' + LoadData1[i].é¢æç¶æ + '</span></h1>'; |
| | | break; |
| | | } |
| | | html1 += '<span class="prs">ç产è¿åº¦ï¼</span>'; |
| | | html1 += '<div class="layui-progress layui-progress-big" lay-showPercent="yes">'; |
| | | html1 += '<div class="layui-progress-bar" lay-percent="' + ((LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty) * 100).toFixed(2) + '%" style="width:' + ((LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty) * 100).toFixed(2) + '%;">'; |
| | | html1 += '<span class="layui-progress-text">' + ((LoadData1[i].HDateFinishQty / LoadData1[i].HDatePlanQty) * 100).toFixed(2) + '%</span>'; |
| | | html1 += '</div > '; |
| | | html1 += '</div>'; |
| | | html1 += '</dd>'; |
| | | html1 += '</dl>'; |
| | | html1 += '</div>'; |
| | | html1 += '</div>'; |
| | | $("#btomleft").append(html1); |
| | | } |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err.Message, { time: 1 * 2000, icon: 5 }); |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // å 餿é®çäºä»¶å¤ç彿° |
| | | function deleteButton(event, HItemID) { |
| | | event.stopPropagation(); // 鲿¢äºä»¶å泡ï¼é¿å
触åæé®çç¹å»äºä»¶ |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/ReportPlatForm/DeleteButtonlist", |
| | | type: "GET", |
| | | data: { "HItemID": HItemID }, |
| | | dataType: "json",//æ°æ®ç±»åå¯ä»¥ä¸º text xml json script jsonp |
| | | success: function (data) { |
| | | if (data.count > 0) { |
| | | fetchButtonsData(); //æ§è¡æ¥è¯¢è¿ç¨ |
| | | layer.close(index); |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }); |
| | | return false; |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { time: 1 * 2000, icon: 5 }); |
| | | return false; |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err.Message, { time: 1 * 2000, icon: 5 }); |
| | | return false; |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | //æ·»å æé® |
| | | function Add_Buttton(event, obj, i) { |
| | | event.stopPropagation(); //黿¢å泡 |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2 //æ¤å¤ä»¥iframeä¸¾ä¾ |
| | | , title: 'æé®ç»å®' |
| | | , area: ['90%', '90%'] |
| | | , shadeClose: false //å¼å¯é®ç½©å
³é |
| | | , shade: 0.5 |
| | | , maxmin: true |
| | | , content: ['../../ç产管ç/æ¥å·¥å¹³å°åè½é¡µ/LineBind_Button.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero, e) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var body = layer.getChildFrame('body', index); //å¾å°iframe页çbodyå
容 |
| | | |
| | | var HUserName = sessionStorage["HUserName"]; |
| | | var HButtonID = body.find("#HButtonID").val(); |
| | | var HButtonName = body.find("#HName").val(); |
| | | var HButtonSize = body.find("#HButtonSize").val(); |
| | | var HButtonOrder = body.find("#HButtonOrder").val(); |
| | | $.ajax( |
| | | { |
| | | url: GetWEBURL() + "/ReportPlatForm/AddButtonlist", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | dataType: "json", |
| | | type: "Get", |
| | | async: false, |
| | | data: { |
| | | "HUserName": HUserName, |
| | | "HButtonID": HButtonID, |
| | | "HButtonName": HButtonName, |
| | | "HButtonSize": HButtonSize, |
| | | "HButtonOrder": HButtonOrder |
| | | |
| | | }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | fetchButtonsData(); //æ§è¡æ¥è¯¢è¿ç¨ |
| | | layer.close(index); |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }); |
| | | return false; |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | return false; |
| | | |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err.Message, { time: 1 * 2000, icon: 5 }); |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | } |
| | | |
| | | , zIndex: layer.zIndex //éç¹1 |
| | | , success: function (layero, index) { |
| | | |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | //å·¥åå表éä¸ |
| | | function CheckBtom(obj, i) { |
| | | var partid = $(obj).parent().attr("id"); //è·åç¶çº§id |
| | | workcode = $("#wk" + i + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(å·¥åå·) |
| | | HBillType = $("#ty" + i + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(åæ®ç±»å) |
| | | HSourceInterID = $("#sm" + i + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(æºå主å
ç ) |
| | | HProcExchInterID = $("#lzk" + i + "").html(); //æµè½¬å¡ID |
| | | HSourceEntryID = $("#sb" + i + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(æºååå
å) |
| | | HSourceBillNo = $("#sw" + i + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(æºååå·) |
| | | HSourceBillType = $("#st" + i + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(æºåç±»å) |
| | | HICMOInterID = $("#df" + i + "").html(); //ç产订å主å
ç |
| | | HICMOEntryID = $("#ds" + i + "").html(); //ç产订ååå
ç |
| | | HICMOBillNo = $("#wk" + i + "").html(); //ç产订åå· |
| | | HMaterName = $("#ptn" + i + "").html(); //产ååç§° |
| | | HMaterID = $("#materid" + i + "").html(); //产åID |
| | | HProcID = $("#procid" + i + "").html(); //å·¥åºID |
| | | |
| | | if (workcode != "" && workcode != null) { |
| | | $('.cns').removeClass('check1'); //å é¤ä¸åç¶çº§clssæ ·å¼ç¸åçææå
ç´ |
| | | $("#bs" + i + "").addClass('check1'); // æ·»å å½åå
ç´ çæ ·å¼ |
| | | wktag = 1; |
| | | } |
| | | } |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(body) { //é空éªè¯ |
| | | var Result = true; |
| | | if (body.find("#HSourceID").val() == '' || body.find("#HSourceID").val() == null) { |
| | | layer.msg("çäº§èµæºä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (body.find("#HManagerID").val() == '' || body.find("#HManagerID").val() == null) { |
| | | layer.msg("è´è´£äººä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (body.find("#HGroupID").val() == '' || body.find("#HGroupID").val() == null) { |
| | | layer.msg("çç»ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (body.find("#HCreateDate").val() == '' || body.find("#HCreateDate").val() == null) { |
| | | layer.msg("åå»ºæ¥æä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | return Result; |
| | | } |
| | | |
| | | //å°s转å为æ¶åç§æ ¼å¼ h:m:s |
| | | function getSeconds(s) { |
| | | var sTime = parseInt(s);// ç§ |
| | | var mTime = 0;// å |
| | | var hTime = 0;// æ¶ |
| | | if (sTime > 60) {//å¦æç§æ°å¤§äº60ï¼å°ç§æ°è½¬æ¢ææ´æ° |
| | | //è·ååéï¼é¤ä»¥60åæ´æ°ï¼å¾å°æ´æ°åé |
| | | mTime = parseInt(sTime / 60); |
| | | //è·åç§æ°ï¼ç§æ°åä½ï¼å¾å°æ´æ°ç§æ° |
| | | sTime = parseInt(sTime % 60); |
| | | //妿åé大äº60ï¼å°åéè½¬æ¢æå°æ¶ |
| | | if (mTime > 60) { |
| | | //è·åå°æ¶ï¼è·ååéé¤ä»¥60ï¼å¾å°æ´æ°å°æ¶ |
| | | hTime = parseInt(mTime / 60); |
| | | //è·åå°æ¶ååä½çåï¼è·ååéé¤ä»¥60åä½çå |
| | | mTime = parseInt(mTime % 60); |
| | | } |
| | | } |
| | | var result = ''; |
| | | if (sTime >= 0 && sTime < 10) { |
| | | result = "0" + parseInt(sTime) + ""; |
| | | } else { |
| | | result = "" + parseInt(sTime) + ""; |
| | | } |
| | | if (mTime >= 0 && mTime < 10) { |
| | | result = "0" + parseInt(mTime) + ":" + result; |
| | | } else { |
| | | result = "" + parseInt(mTime) + ":" + result; |
| | | } |
| | | if (hTime >= 0 && hTime < 10) { |
| | | result = "0" + parseInt(hTime) + ":" + result; |
| | | } else { |
| | | result = "" + parseInt(hTime) + ":" + result; |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | //å¼å·¥æé®ç¹å»äºä»¶ |
| | | function OpenWork(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "å¼å·¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³å¼å·¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢å¼å·¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../../ç产管ç/æ¥å·¥å¹³å°_PDA/å¼å·¥/Sc_Add_MESBeginWorkBillList_PDA.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //å¿«éå¼å·¥ |
| | | function KSOpenWork(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "å¼å·¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³å¼å·¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | var indexOpen = layer.open({ |
| | | type: 1 |
| | | , title: "确认å¼å·¥å?" |
| | | , closeBtn: false |
| | | , area: '300px;' |
| | | , shade: 0.8 |
| | | , id: 'LAY_layuipro' //设å®ä¸ä¸ªidï¼é²æ¢éå¤å¼¹åº |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btnAlign: 'c' |
| | | , moveType: 1 //ææ½æ¨¡å¼ï¼0æè
1 |
| | | , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">设å¤ç¼å·:' + HSourceName1 + '<br>å·¥åå·:' + workcode + '<br>产ååç§°:' + HMaterName + '<br></div>' |
| | | , btn1: function (index, layero, e) { |
| | | |
| | | //æ°å¢å¼å·¥å |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/SaveGetMESBeginWorkFrom_KS", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "user": sessionStorage["HUserName"], "HSourceBillType": HSourceBillType }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | //window.location.reload(); |
| | | }); |
| | | layer.close(indexOpen); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //SOP ä½ä¸æå¯¼ä¹¦ |
| | | function SOP(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ä½ä¸æå¯¼ä¹¦', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['95%', '95%'], |
| | | maxmin: true, |
| | | content: 'ç产管ç/ä½ä¸æå¯¼ä¹¦/Gy_SOPBill_Video.html?OperationType=5&HMaterID=' + HMaterID + '&HSourceNo=' + workcode + '&HSourceEntryID=' + HSourceEntryID + '&HProcID=' + HProcID, |
| | | end: function () { |
| | | |
| | | }, |
| | | }); |
| | | |
| | | /* window.open("../../../views/ç产管ç/ä½ä¸æå¯¼ä¹¦/Gy_SOPBill_Video.html?OperationType=5&HMaterID=" + HMaterID + "&HSourceNo=" + workcode + "&HSourceEntryID=" + HSourceEntryID);*/ |
| | | } |
| | | |
| | | //æ±æ¥æé®ç¹å»äºä»¶ |
| | | function OpenReport(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "æ±æ¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³æ±æ¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢äº§éæ±æ¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../../ç产管ç/æ¥å·¥å¹³å°_PDA/äº§éæ±æ¥/Sc_Add_ProductReportBillList_PDA.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | //å®å·¥åæé®ç¹å»äºä»¶ |
| | | function OpenEnd(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "å®å·¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³å®å·¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢å®å·¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../../ç产管ç/æ¥å·¥å¹³å°_PDA/å®å·¥/Sc_Add_MESEndWorkBillList_PDA.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | //åå·¥åæé®ç¹å»äºä»¶ |
| | | function OpenStop(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "åå·¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³åå·¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢åå·¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../../ç产管ç/æ¥å·¥å¹³å°_PDA/åå·¥/Sc_Add_MESStopWorkBillList_PDA.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //æ¥æ£ç³è¯·æé®ç¹å»äºä»¶ |
| | | function OpenInSpection(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | |
| | | var IsCheck = false; |
| | | |
| | | //æ ¹æ®ç³»ç»åæ°æ§å¶ï¼å¤æçäº§è®¢åæ¯å¦åäºé¦ä»¶æ£éªååå·¥åºæ£éªåï¼å¦ææå
¶ä¸ä¸ç§æ£éªå没åï¼åä¸è®©åçäº§æ±æ¥å |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/ReportPlatForm/IsCheck", |
| | | type: "GET", |
| | | data: { "HICMOInterID": HICMOInterID, "HICMOEntryID": HICMOEntryID, "HICMOBillNo": HICMOBillNo }, |
| | | async: false, |
| | | success: function (data) { |
| | | if (data.code == 0) { |
| | | layer.alert(data.Message); |
| | | return false; |
| | | } else { |
| | | IsCheck = true; |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(data.Message); |
| | | return false; |
| | | } |
| | | }); |
| | | |
| | | if (IsCheck == true) { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'äº§éæ±æ¥å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: 'ç产管ç/äº§éæ±æ¥å/Sc_ProductReportBillList.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "workcode": workcode, |
| | | "HSourceID": HSourceID1, |
| | | "HSourceName": HSourceName1, |
| | | "HICMOInterID": HICMOInterID, |
| | | "HICMOEntryID": HICMOEntryID, |
| | | "HMaker": sessionStorage["HUserName"], //sessionStorage["HUserName"] |
| | | "Czybm": sessionStorage["Czybm"], |
| | | //"HEmpID": "0", //sessionStorage["HEmpID"] |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //䏿é²éå |
| | | function OpenMaterToSource() { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢ä¸æé²éå', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: 'ç产管ç/䏿é²éå/Sc_Add_MaterToSourceBillList.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //馿£æ£éª |
| | | function OpenFistCheck(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'é¦ä»¶æ£éªå-ç¼è¾' |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['è´¨é管ç/é¦ä»¶æ£éªå/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HProcExchInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID + '&HSourceEntryID=' + HSourceEntryID + '', 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //è¿ç¨æ£éª |
| | | function OpenProcess(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'å·¡æ£æ£éªå-ç¼è¾' |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['è´¨é管ç/å·¡æ£è®°å½å/QC_Add_Edit_PatrolProcCheckOtherill.html?OperationType=2&linterid=' + HProcExchInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID + '&HSourceEntryID=' + HSourceEntryID + '', 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | //æ«æ£ |
| | | function ProcessCheck(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'å·¥åºæ£éªå-ç¼è¾' |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['è´¨é管ç/å·¥åºæ£éªå/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HProcExchInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID + '&HSourceEntryID=' + HSourceEntryID + '', 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //ä¸è¯éé |
| | | function BadGather() { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "ä¸è¯éé")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³ä¸è¯é鿡件!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'è´¨éæ±æ¥å-ç¼è¾' |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['ç产管ç/è´¨éæ±æ¥å/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //å¾®çåæ±æ¥ |
| | | function SubtleFlaw() { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "å¾®çåæ±æ¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³å¾®çåæ±æ¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'å¾®çåæ±æ¥å-ç¼è¾' |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['ç产管ç/è´¨éæ±æ¥å/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID + '&HBillSubType=å¾®çå', 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //å½åå·¥åæé®ç¹å»äºä»¶ |
| | | function CurrentStatus(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å½åå·¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: 'ç产管ç/å·¥å/Sc_CurrentTicket.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HEquipName": $("#HEquipName1").text(), |
| | | "HEquipCode": $("#HEquipCode1").text(), |
| | | "HICMOBillNo": workcode, |
| | | "HICMOInterID": HICMOInterID, |
| | | "HICMOEntryID": HICMOEntryID, |
| | | "HSourceID": HSourceID1, |
| | | "HEmpName": HEmpName, |
| | | "HManagerName": HManagerName, |
| | | "HGroupName": HGroupName, |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | //å½åå·¥å(æ±æ¥)æé®ç¹å»äºä»¶ |
| | | function CodingReport(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "æ¯è«å°æ±æ¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³æ±æ¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å½åå·¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '车é´ç®¡ç/å·¥åºåºç«æ±æ¥å/Cj_StationOutBill_CurrentWork.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HEquipName": $("#HEquipName1").text(), |
| | | "HEquipCode": $("#HEquipCode1").text(), |
| | | "HICMOBillNo": workcode, |
| | | "HICMOInterID": HICMOInterID, |
| | | "HICMOEntryID": HICMOEntryID, |
| | | "HSourceID": HSourceID1, |
| | | "HSourceName": HSourceName1, |
| | | "HEmpName": HEmpName, |
| | | "HManagerID": HManagerID, |
| | | "HManagerName": HManagerName, |
| | | "HGroupName": HGroupName, |
| | | "HGroupID": HGroupID, |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | |
| | | |
| | | }); |
| | | } |
| | | |
| | | //设å¤å¯å¨ç¹æ£æé®ç¹å»äºä»¶ |
| | | function BeginDotCheck(event, obj) { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢è®¾å¤å¯å¨ç¹æ£å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '车é´ç®¡ç/å¯å¨ç¹æ£å/Sc_WorkBeginDotCheckBill.html?OperationType=4&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HMaterID": HMaterID, |
| | | "HProcID": HProcID, |
| | | "HSourceID": HSourceID1, |
| | | "SCOrder": HSourceBillNo |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //å¼å¸¸æé®ç¹å»äºä»¶ |
| | | function Abnormal(event, obj) { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å¼å¸¸åé¦ç±»å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: 'ç产管ç/å¼å¸¸åé¦å/Sc_MESExecptFeedBackBillType.html', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HICMOBillNo": HICMOBillNo,//å·¥åå· |
| | | "HSourceName": HSBName, //è®¾å¤ |
| | | "HSourceBillNo": HSourceBillNo //å·¥åºæµè½¬å¡ |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //é²ééªè¯æ¸
åæé®ç¹å»äºä»¶ |
| | | function PreventErrMouldCheck(event, obj) { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢é²ééªè¯', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '车é´ç®¡ç/é²ééªè¯/Qc_PreventErrMouldCheckBill.html?OperationType=4&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HMaterID": HMaterID, |
| | | "HProcID": HProcID, |
| | | "SCOrder": HSourceBillNo |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //æ£éªåæ ·æé®ç¹å»äºä»¶ |
| | | function TakeSample(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢å¼å·¥å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: 'è´¨é管ç/æ£éªåæ ·è¿æ ·å/QC_Add_TakeSampleCheckBill.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //å·¥èºåæ°ç¹æ£ç¹å»äºä»¶ |
| | | function TechParam(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "å·¥èºåæ°ç¹æ£")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³å·¥èºåæ°ç¹æ£æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢å·¥èºåæ°ç¹æ£å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '设å¤ç®¡ç/设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨/SB_EquipICMOTechParamBillEdit.html?OperationType=4&linterid=&HEntryID=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //å¼å¸¸ç¾å°å¤çç¹å»äºä»¶ |
| | | function SingErrMsg(event, obj) { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢å¼å¸¸ç¾å°å¤çå', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: 'ç产管ç/å¼å¸¸åé¦å/OA_ErrMsgBackSignBill_BrushCard.html?OperationType=2', |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¼å¸¸éªæ¶ç¹å»äºä»¶ |
| | | function ErrMsgBackCheck(event, obj) { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢å¼å¸¸åé¦éªæ¶å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: 'è´¨é管ç/å¼å¸¸åé¦/OA_ErrMsgBackSelfQuery_BGT.html?OperationType=2', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HSourceID": HSourceID1, |
| | | "HSourceName": HSourceName1 |
| | | }); |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //éåº |
| | | function Esc(event, obj) { |
| | | parent.location.href = "index.html" |
| | | |
| | | } |
| | | |
| | | //åæ®ç¶æéªè¯ |
| | | function WorkStaus(HSourceID1, workcode, HSourceInterID, btn) { |
| | | var flag = false; |
| | | var sWhere = ""; |
| | | switch (btn) { |
| | | case "å¼å·¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')"; //æ¯å¦æä¸ä¸ºå¼å·¥å¼å·¥ç¶æãåå·¥ç¶æ |
| | | break; |
| | | case "å®å·¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //æ¯å¦æä¸ä¸ºå¼å·¥ãå®å·¥ç¶æ |
| | | break; |
| | | case "åå·¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')"; //æ¯å¦æä¸ä¸ºåå·¥æèµ·ç¶æ |
| | | break; |
| | | case "æ±æ¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //æ¯å¦æä¸ä¸ºå¼å·¥ãåå·¥æèµ·ç¶æ |
| | | break; |
| | | case "æ¯è«å°æ±æ¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HSourceBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //æ¯å¦æä¸ä¸ºå¼å·¥ãåå·¥æèµ·ç¶æ |
| | | break; |
| | | case "æ¥æ£ç³è¯·": |
| | | |
| | | // break; |
| | | // default: |
| | | //} |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus", |
| | | type: "GET", |
| | | data: { "sWhere": JSON.stringify(sWhere) }, |
| | | dataType: "json",//æ°æ®ç±»åå¯ä»¥ä¸º text xml json script jsonp |
| | | async: false, |
| | | success: function (data) { |
| | | |
| | | if (data.count > 0) { |
| | | flag = true; |
| | | |
| | | } |
| | | else { |
| | | flag = false; |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | flag = false; |
| | | } |
| | | }); |
| | | |
| | | return flag; |
| | | } |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>æ¥å·¥å¹³å°</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <!--å¼ç¨layuiæ ·å¼æä»¶--> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <link href="../../../layuiadmin/layui/css/global.css" rel="stylesheet" /> |
| | | <!--èªå®ä¹æ ·å¼--> |
| | | <link href="../../../layuiadmin/layui/css/ReportPlatform.css" rel="stylesheet" /> |
| | | <!--å¼ç¨layui jsæä»¶--> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/echarts.min.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | |
| | | </head> |
| | | <body> |
| | | <!-- 让IE8/9æ¯æåªä½æ¥è¯¢ï¼ä»èå
¼å®¹æ
æ ¼ --> |
| | | <!--[if lt IE 9]> |
| | | <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script> |
| | | <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script> |
| | | <![endif]--> |
| | | |
| | | <div style="margin: 20px 20px;"> |
| | | <!--<blockquote class="layui-elem-quote">注æï¼ä¸è¿°æ¼ç¤ºä¸çé¢è²åªæ¯åä¸ä¸ªåºåä½ç¨ï¼å¹¶éæ
æ ¼å
ç½®ã</blockquote>--> |
| | | <div class="layui-row layui-col-space10"> |
| | | <div class="layui-col-sm12 layui-col-md8"> |
| | | <div class="layui-form-item" style="margin: 1% 2%;text-align: right;"> |
| | | <button type="button" lay-submit="" lay-filter="Cancel" id="Cancel" class="layui-btn layui-btn-radius layui-btn-danger">éåº</button> |
| | | </div> |
| | | <fieldset style="border: 1px solid #eee;box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%);"> |
| | | <legend style="color: #5FB878">çäº§èµæº</legend> |
| | | <div class="layui-content"> |
| | | <div class="layui-row layui-col-space10" id="topleft"> |
| | | |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script> |
| | | var wktag = 0; |
| | | var workcode = ""; //å·¥åå· |
| | | var HDeptID = ""; //车é´ID |
| | | var HDept = ""; //è½¦é´ |
| | | var HSourceID = ""; //çäº§èµæºID |
| | | var HSourceName = ""; //çäº§èµæº |
| | | var HSourceID1 = ""; //çäº§èµæºID1 |
| | | var HSourceName1 = ""; //çäº§èµæº1 |
| | | var HSourceInterID = ""; //æºå主å
ç |
| | | var HProcExchInterID = ""; //æµè½¬å¡id |
| | | var HSourceEntryID = ""; //æºååå
ç |
| | | var HSourceBillNo = ""; //æºååå· |
| | | var HSourceBillType = ""; //æºåç±»å |
| | | var HICMOInterID = ""; //ç产订å主å
ç |
| | | var HICMOEntryID = ""; //ç产订ååå
ç |
| | | var HICMOBillNo = ""; //ä»»å¡åå· |
| | | var HMaterName = ""; //产ååç§° |
| | | var HMaterID = 0; //产åID |
| | | var HProQty = []; //æ¶é´ç¹äº§é |
| | | var HBadQty = []; //ä¸è¯æ°é |
| | | var HBadReason = []; //ä¸è¯åå |
| | | var HEmpName = ""; //æä½å |
| | | var HManagerName = ""; //è´è´£äºº |
| | | var HGroupName = ""; //çç» |
| | | var HProcID = 0; //å·¥åº |
| | | var HSBName = ""; //设å¤åç§° |
| | | |
| | | //注æï¼éé¡¹å¡ ä¾èµ element 模åï¼å¦åæ æ³è¿è¡åè½æ§æä½ |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | //window å
¨å±åé |
| | | //éåº |
| | | $(document).ready(function () { |
| | | $("#Cancel").on('click', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.location.href = "../../../views/index_Mobile.html"; |
| | | }); |
| | | }); |
| | | }); |
| | | TSLoad(); |
| | | }); |
| | | |
| | | |
| | | function TSLoad() { |
| | | $("#topleft").html(""); |
| | | var HUserName = sessionStorage["HUserName"]; //sessionStorage["HUserName"]; //é»è®¤å½åç»å½äººå |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/ReportPlatForm/SearchGetLineBindBillList", |
| | | type: "GET", |
| | | data: { "HUserName": HUserName }, |
| | | dataType: "json",//æ°æ®ç±»åå¯ä»¥ä¸º text xml json script jsonp |
| | | success: function (data) { |
| | | var LoadData = data.data.h_p_JIT_GetSourceInfoByUser; |
| | | |
| | | if (LoadData.length > 0)// 说æéªè¯æåäºï¼ |
| | | { |
| | | HSBName = LoadData[0].HSourceName; |
| | | for (var i = 1; i <= LoadData.length + 1; i++) { |
| | | if (i <= LoadData.length) { |
| | | var html1 = ''; |
| | | html1 += '<div class="layui-col-sm12 layui-col-md3">'; |
| | | html1 += '<div class="cnt ctop" id="ts' + i + '" onclick="Check(this,' + i + ')">'; |
| | | html1 += '<dl>'; |
| | | html1 += '<dd>'; |
| | | html1 += '<h1 style="display:none;"><span>èµæºIDï¼</span><span id="eqpid' + i + '">' + LoadData[i - 1].HSourceID + '</span></h1>'; |
| | | html1 += '<h1><span>设å¤ç¼å·ï¼</span><span id="eqp' + i + '">' + LoadData[i - 1].HSourceName + '</span></h1>'; |
| | | html1 += '<h1><span>设å¤ä»£ç ï¼</span><span id="eqp' + i + '">' + LoadData[i - 1].HSourceNumber + '</span></h1>'; |
| | | html1 += '<h1><span>æä½åï¼</span><span id="HEmpName' + i + '">' + LoadData[i - 1].HUserName + '</span></h1>'; |
| | | html1 += '<h1><span>ç产çç»ï¼</span><span id="HGroupName' + i + '">' + LoadData[i - 1].GroupName + '</span></h1>'; |
| | | //html1 += '<h1><span>å½åå·¥åï¼</span><span id="po' + i + '">' + (LoadData[i - 1].HSourceBillNo == null ? '' : LoadData[i - 1].HSourceBillNo) + '</span></h1>'; |
| | | //html1 += '<h1><span>产ååç§°ï¼</span><span id="ptn' + i + '">' + (LoadData[i - 1].HName == null ? '' : LoadData[i - 1].HName) + '</span></h1>'; |
| | | //html1 += '<h1><span>产åè§æ ¼ï¼</span><span id="pts' + i + '">' + (LoadData[i - 1].HModel == null ? '' : LoadData[i - 1].HModel) + '</span></h1>'; |
| | | html1 += '<h1><span>è´è´£äººï¼</span><span id="us' + i + '">' + LoadData[i - 1].HEmpName + '</span></h1>'; |
| | | switch (LoadData[i - 1].HStatus) { |
| | | case "空é²": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border6"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "弿º": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border4"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "åæº": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border3"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "ç产": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border2"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "ç»´ä¿®è¿è¡ä¸": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border5"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "ç»´ä¿®ç»æ": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "ç»´ä¿®ç»æ¢": |
| | | html1 += '<h1><span>å½åç¶æï¼</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | default: |
| | | } |
| | | html1 += '<h1 hidden> <span id="HGroupID' + i + '">' + LoadData[i - 1].HGroupID + '</span></h1>'; |
| | | html1 += '<h1 hidden> <span id="HManagerID' + i + '">' + LoadData[i - 1].HManagerID + '</span></h1>'; |
| | | html1 += '</dd>'; |
| | | html1 += '</dl>'; |
| | | html1 += '</div>'; |
| | | html1 += '</div>'; |
| | | $("#topleft").append(html1); |
| | | $("#ts" + i + "").append('<span class="layui-icon layui-icon-delete delete" onclick="Delete(event,this,' + i + ')"></span>'); //å¨å½ådivå追å å ä¸ä¸ªspanå é¤ |
| | | |
| | | |
| | | } |
| | | else { |
| | | var html1 = ''; |
| | | html1 += '<div class="layui-col-sm12 layui-col-md3">'; |
| | | html1 += '<div class="cnt ctop" id="ts' + i + '" onclick="Check(this,' + i + ')">'; |
| | | html1 += '<span class="layui-icon layui-icon-addition imgicon0" onclick="Add(event,this,' + i + ')"></span>'; |
| | | html1 += '</div>'; |
| | | html1 += '</div>'; |
| | | $("#topleft").append(html1); |
| | | |
| | | } |
| | | } |
| | | } |
| | | else { |
| | | var html1 = ''; |
| | | html1 += '<div class="layui-col-sm12 layui-col-md3">'; |
| | | html1 += '<div class="cnt ctop" id="ts1" onclick="Check(this,1)">'; |
| | | html1 += '<span class="layui-icon layui-icon-addition imgicon0" onclick="Add(event,this,1)"></span>'; |
| | | html1 += '</div>'; |
| | | html1 += '</div>'; |
| | | $("#topleft").append(html1); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err.Message, { time: 1 * 2000, icon: 5 }); |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | var HManagerID = 0; |
| | | var HGroupID = 0; |
| | | |
| | | //éä¸èµæº |
| | | function Check(obj, i) { |
| | | wktag = 0; |
| | | HProQty = []; //æ¶é´ç¹äº§é |
| | | HBadQty = []; //ä¸è¯æ°é |
| | | HBadReason = []; //ä¸è¯åå |
| | | var partid = $(obj).parent().attr("id"); //è·åç¶çº§id |
| | | var eqpid = "eqpid" + i; //è·åæå®èµæºæ ·å¼ID |
| | | var HSourceID = $("#" + eqpid + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(èµæºID) |
| | | HSourceID1 = $("#" + eqpid + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(èµæºID) |
| | | var eqp = "eqp" + i; //è·åæå®èµæºæ ·å¼ID |
| | | var HSourceName = $("#" + eqp + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(èµæº) |
| | | HSourceName1 = $("#" + eqp + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(èµæº) |
| | | var emp = "HEmpName" + i; //è·åæå®èµæºæ ·å¼ID |
| | | var us = "us" + i; //è·åæå®èµæºæ ·å¼ID |
| | | var gro = "HGroupName" + i; //è·åæå®èµæºæ ·å¼ID |
| | | HEmpName = $("#" + emp + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(èµæºID) |
| | | HManagerName = $("#" + us + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(èµæºID) |
| | | HGroupName = $("#" + gro + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(èµæºID) |
| | | HManagerID = "HManagerID" + i; |
| | | HGroupID = "HGroupID" + i; |
| | | HManagerID = $("#" + HManagerID + "").html(); |
| | | HGroupID = $("#" + HGroupID + "").html(); |
| | | parent.location.href = "../../../views/ç产管ç/æ¥å·¥å¹³å°_PDA/IpadIndex_PDA.html?Type=1&HSourceID=" + HSourceID; |
| | | //if (HSourceID != "" && HSourceID != null) { |
| | | // $('.ctop').removeClass('check'); //å é¤ä¸åç¶çº§clssæ ·å¼ç¸åçææå
ç´ |
| | | // $("#ts" + i + "").addClass('check'); // æ·»å å½åå
ç´ çæ ·å¼ |
| | | // //æ§è¡èå¨äºä»¶ |
| | | // $.ajax({ |
| | | // url: GetWEBURL() + "/ReportPlatForm/SearchGetWorkBillList", |
| | | // type: "GET", |
| | | // data: { "HSourceID": HSourceID }, |
| | | // dataType: "json",//æ°æ®ç±»åå¯ä»¥ä¸º text xml json script jsonp |
| | | // success: function (data) { |
| | | |
| | | // var LoadData1 = data.data.h_p_JIT_GetWorkBillListInfoBySource; |
| | | // var LoadData2 = data.data.h_p_JIT_GetWorkBillListInfoBySource1; |
| | | // var LoadData3 = data.data.h_p_JIT_GetWorkBillListInfoBySource2; //æ¶é´ç¹äº§é |
| | | // var LoadData4 = data.data.h_p_JIT_GetWorkBillListInfoBySource3; //ä¸è¯åæ |
| | | // }, |
| | | // error: function (err) { |
| | | // layer.alert(err.Message, { time: 1 * 2000, icon: 5 }); |
| | | // return false; |
| | | // } |
| | | // }); |
| | | //} |
| | | } |
| | | |
| | | //æ·»å èµæº |
| | | function Add(event, obj, i) { |
| | | event.stopPropagation(); //黿¢å泡 |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2 //æ¤å¤ä»¥iframeä¸¾ä¾ |
| | | , title: '产线ç»å®' |
| | | , area: ['90%', '90%'] |
| | | , shadeClose: false //å¼å¯é®ç½©å
³é |
| | | , shade: 0.5 |
| | | , maxmin: true |
| | | , content: ['../../ç产管ç/æ¥å·¥å¹³å°_PDA/LineBind_PDA.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero, e) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var body = layer.getChildFrame('body', index); //å¾å°iframe页çbodyå
容 |
| | | //var from = layer.getChildFrame('#from0', index); //å¾å°iframe页çfromå
容 |
| | | if (!AllowLoadData(body))//æ°æ®éªè¯ |
| | | { |
| | | return false; |
| | | } |
| | | var HUserName = sessionStorage["HUserName"]; |
| | | var HSourceID = body.find("#HSourceID").val(); |
| | | var HSourceCode = body.find("#HSourceCode").val(); |
| | | var HSourceName = body.find("#HSourceName").val(); |
| | | var HManagerID = body.find("#HManagerID").val(); |
| | | var HManagerName = body.find("#HManagerName").val(); |
| | | var HGroupID = body.find("#HGroupID").val(); |
| | | var HGroupName = body.find("#HGroupName").val(); |
| | | var HCreateDate = body.find("#HCreateDate").val(); |
| | | var HRemark = body.find("#HRemark").val(); |
| | | if (HSourceID == 0) { |
| | | layer.msg("çäº§èµæºä¸è½ä¸ºç©º", { time: 1 * 2000, icon: 1 }); |
| | | } else { |
| | | $.ajax( |
| | | { |
| | | url: GetWEBURL() + "/ReportPlatForm/SaveGetLineBindBillList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | dataType: "json", |
| | | type: "Get", |
| | | async: false, |
| | | data: { |
| | | "HUserName": HUserName, |
| | | "HSourceID": HSourceID, |
| | | "HSourceName": HSourceName, |
| | | "HManagerID": HManagerID, |
| | | "HManagerName": HManagerName, |
| | | "HGroupID": HGroupID, |
| | | "HGroupName": HGroupName, |
| | | "HCreateDate": HCreateDate, |
| | | "HRemark": HRemark |
| | | }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | TSLoad(); //æ§è¡æ¥è¯¢è¿ç¨ |
| | | layer.close(index); |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }); |
| | | return false; |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | return false; |
| | | |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err.Message, { time: 1 * 2000, icon: 5 }); |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | } |
| | | |
| | | , zIndex: layer.zIndex //éç¹1 |
| | | , success: function (layero, index) { |
| | | |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å é¤èµæº |
| | | function Delete(event, obj, i) { |
| | | event.stopPropagation(); //黿¢å泡 |
| | | //è·åç¶çº§id |
| | | var partid = $(obj).parent().attr("id"); |
| | | var eqpid = "eqpid" + i; //è·åæå®èµæºæ ·å¼ID |
| | | HSourceID = $("#" + eqpid + "").html(); //éè¿æ ·å¼IDè·åhtmlå
容(èµæºID) |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/ReportPlatForm/DeleteGetLineBindBillList", |
| | | type: "GET", |
| | | data: { "HSourceID": HSourceID, "user": sessionStorage["HUserName"] }, |
| | | dataType: "json",//æ°æ®ç±»åå¯ä»¥ä¸º text xml json script jsonp |
| | | success: function (data) { |
| | | if (data.count > 0) { |
| | | TSLoad(); //æ§è¡æ¥è¯¢è¿ç¨ |
| | | layer.close(index); |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }); |
| | | return false; |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { time: 1 * 2000, icon: 5 }); |
| | | return false; |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err.Message, { time: 1 * 2000, icon: 5 }); |
| | | return false; |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(body) { //é空éªè¯ |
| | | var Result = true; |
| | | if (body.find("#HSourceID").val() == '' || body.find("#HSourceID").val() == null) { |
| | | layer.msg("çäº§èµæºä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (body.find("#HManagerID").val() == '' || body.find("#HManagerID").val() == null) { |
| | | layer.msg("è´è´£äººä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (body.find("#HGroupID").val() == '' || body.find("#HGroupID").val() == null) { |
| | | layer.msg("çç»ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (body.find("#HCreateDate").val() == '' || body.find("#HCreateDate").val() == null) { |
| | | layer.msg("åå»ºæ¥æä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | return Result; |
| | | } |
| | | |
| | | //å°s转å为æ¶åç§æ ¼å¼ h:m:s |
| | | function getSeconds(s) { |
| | | var sTime = parseInt(s);// ç§ |
| | | var mTime = 0;// å |
| | | var hTime = 0;// æ¶ |
| | | if (sTime > 60) {//å¦æç§æ°å¤§äº60ï¼å°ç§æ°è½¬æ¢ææ´æ° |
| | | //è·ååéï¼é¤ä»¥60åæ´æ°ï¼å¾å°æ´æ°åé |
| | | mTime = parseInt(sTime / 60); |
| | | //è·åç§æ°ï¼ç§æ°åä½ï¼å¾å°æ´æ°ç§æ° |
| | | sTime = parseInt(sTime % 60); |
| | | //妿åé大äº60ï¼å°åéè½¬æ¢æå°æ¶ |
| | | if (mTime > 60) { |
| | | //è·åå°æ¶ï¼è·ååéé¤ä»¥60ï¼å¾å°æ´æ°å°æ¶ |
| | | hTime = parseInt(mTime / 60); |
| | | //è·åå°æ¶ååä½çåï¼è·ååéé¤ä»¥60åä½çå |
| | | mTime = parseInt(mTime % 60); |
| | | } |
| | | } |
| | | var result = ''; |
| | | if (sTime >= 0 && sTime < 10) { |
| | | result = "0" + parseInt(sTime) + ""; |
| | | } else { |
| | | result = "" + parseInt(sTime) + ""; |
| | | } |
| | | if (mTime >= 0 && mTime < 10) { |
| | | result = "0" + parseInt(mTime) + ":" + result; |
| | | } else { |
| | | result = "" + parseInt(mTime) + ":" + result; |
| | | } |
| | | if (hTime >= 0 && hTime < 10) { |
| | | result = "0" + parseInt(hTime) + ":" + result; |
| | | } else { |
| | | result = "" + parseInt(hTime) + ":" + result; |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | //éåº |
| | | function Esc(event, obj) { |
| | | parent.location.href = "index.html" |
| | | |
| | | } |
| | | |
| | | //åæ®ç¶æéªè¯ |
| | | function WorkStaus(HSourceID1, workcode, HSourceInterID, btn) { |
| | | var flag = false; |
| | | var sWhere = ""; |
| | | switch (btn) { |
| | | case "å¼å·¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')"; //æ¯å¦æä¸ä¸ºå¼å·¥å¼å·¥ç¶æãåå·¥ç¶æ |
| | | break; |
| | | case "å®å·¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //æ¯å¦æä¸ä¸ºå¼å·¥ãå®å·¥ç¶æ |
| | | break; |
| | | case "åå·¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')"; //æ¯å¦æä¸ä¸ºåå·¥æèµ·ç¶æ |
| | | break; |
| | | case "æ±æ¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //æ¯å¦æä¸ä¸ºå¼å·¥ãåå·¥æèµ·ç¶æ |
| | | break; |
| | | case "æ¯è«å°æ±æ¥": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HSourceBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //æ¯å¦æä¸ä¸ºå¼å·¥ãåå·¥æèµ·ç¶æ |
| | | break; |
| | | case "æ¥æ£ç³è¯·": |
| | | |
| | | // break; |
| | | // default: |
| | | //} |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus", |
| | | type: "GET", |
| | | data: { "sWhere": JSON.stringify(sWhere) }, |
| | | dataType: "json",//æ°æ®ç±»åå¯ä»¥ä¸º text xml json script jsonp |
| | | async: false, |
| | | success: function (data) { |
| | | |
| | | if (data.count > 0) { |
| | | flag = true; |
| | | |
| | | } |
| | | else { |
| | | flag = false; |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | flag = false; |
| | | } |
| | | }); |
| | | |
| | | return flag; |
| | | } |
| | | } |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>产线ç»å®</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <!--å¼ç¨layuiæ ·å¼æä»¶--> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <!--å¼ç¨layui jsæä»¶--> |
| | | <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/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | .maintitle { |
| | | background-color: #1492ff; |
| | | color: #fff; |
| | | padding: 5px 10px; |
| | | border: none; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .title { |
| | | border-left: 4px solid #1492ff; |
| | | padding-left: 6px; |
| | | margin: 20px 10px 4px; |
| | | font-size: 16px; |
| | | color: #333; |
| | | } |
| | | |
| | | .buttom_box_little { |
| | | width: 60px; |
| | | height: 36px; |
| | | color: #fff; |
| | | background-color: #1492ff; |
| | | border-radius: 4px; |
| | | border: none; |
| | | margin: 10px; |
| | | } |
| | | |
| | | .layui-input { |
| | | width: 93%; |
| | | } |
| | | |
| | | .layui-inline, img { |
| | | display: block; |
| | | vertical-align: middle |
| | | } |
| | | |
| | | .layui-input, .layui-textarea { |
| | | display: inline-block; |
| | | width: 100%; |
| | | padding-left: 10px; |
| | | } |
| | | |
| | | .laydate-time-list ol { |
| | | overflow-x: hidden !important; |
| | | overflow-y: auto !important; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | padding: 9px 5px; |
| | | } |
| | | |
| | | .layui-input-block { |
| | | margin-left: 85px; |
| | | min-height: 36px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <div id="layout1" class="layui-fluid"> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | | <form id="form0" class="layui-form" lay-filter="component-form-group" action=""> |
| | | <!--<div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">éåº</button> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> |
| | | <h1 style="text-align:center;"><b>产线ç»å®</b></h1> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">ç¨æ·å:</label> |
| | | <div class="layui-input-block" style="margin-left: 85px;"> |
| | | <input type="text" name="HUserName" id="HUserName" class="layui-input" style="background-color:#efefef4d;width:83%;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">çäº§èµæº:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="HSourceName" id="HSourceName" class="layui-input" placeholder="ç¨æ·ç»å®çäº§èµæº" style="width:80%;"> |
| | | <input type="hidden" name="HSourceCode" id="HSourceCode" class="layui-input" style="width:80%;"> |
| | | <input type="hidden" name="HSourceID" id="HSourceID" value="0" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSource" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">è´è´£äºº:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="HManagerName" id="HManagerName" placeholder="ç¨æ·ç»å®ä¿ç®¡å" class="layui-input" style="width:80%;"> |
| | | <input type="hidden" name="HManagerID" id="HManagerID" value="0" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HManager" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">çç»:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="HGroupName" id="HGroupName" class="layui-input" value="" placeholder="ç¨æ·ç»å®çç»" style="width: 80%;"> |
| | | <input type="hidden" name="HGroupID" id="HGroupID" class="layui-input" value="0"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HGroupList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">åå»ºæ¥æ:</label> |
| | | <div class="layui-input-block" style="margin-left: 85px;"> |
| | | <input type="text" name="HCreateDate" id="HCreateDate" class="layui-input" style="background-color:#efefef4d;width:83%;" disabled dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;padding: 9px 5px;">夿³¨:</label> |
| | | <div class="layui-input-block"> |
| | | <textarea placeholder="请è¾å
¥å¤æ³¨" class="layui-textarea" name="HRemark" id="HRemark" style="width:83%;"></textarea> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | |
| | | //æ¥ææ¶é´éæ©å¨ |
| | | laydate.render({ |
| | | elem: '#HCreateDate' |
| | | , type: 'datetime' |
| | | }); |
| | | //åå§åæ°æ® |
| | | $("#HUserName").val(sessionStorage["HUserName"]); //å建人 |
| | | $("#HCreateDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | $("#HSourceID").val(sessionStorage["HSourceID"]); //çäº§èµæºid |
| | | $("#HSourceName").val(sessionStorage["HSource"]); //çäº§èµæº |
| | | $("#HManagerID").val(sessionStorage["HKeeperID"]); //è´è´£äººid |
| | | $("#HManagerName").val(sessionStorage["HKeeper"]); //è´è´£äºº |
| | | $("#HGroupID").val(sessionStorage["HGroupID"]); //ç产çç»id |
| | | $("#HGroupName").val(sessionStorage["HGroup"]); //ç产çç» |
| | | |
| | | //éæ©çäº§èµæºå¼¹çª |
| | | form.on('submit(HSource)', function () {//çäº§èµæº |
| | | console.log($('#HProcNo').val()) |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'çäº§èµæº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_GetProductionResourcesList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©è´è´£äºº |
| | | form.on('submit(HManager)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'èåå表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_EmployeeList.html?Type=HWorker', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©ç产çç»å¼¹çª |
| | | form.on('submit(HGroupList)', function () {//éæ©ç产çç» |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æ¬ç«å·¥åº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_GetProductionTeamList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | }); |
| | | //è¿åç产çç» |
| | | function GetProductionTeamValue(obj) { |
| | | $("#HGroupName").val(obj[0].çç»); |
| | | $("#HGroupID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | //è¿åçäº§èµæº |
| | | function GetProductionResourcesValue(obj) { |
| | | $("#HSourceName").val(obj[0].çäº§èµæº); |
| | | $("#HSourceID").val(obj[0].HItemID); |
| | | } |
| | | //è¿åæä½å |
| | | function GetHWorkerValue(obj) { |
| | | $("#HManagerName").val(obj[0].HName); |
| | | $("#HManagerID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title class="sckgd">äº§éæ±æ¥å</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <!--å¼ç¨layuiæ ·å¼æä»¶--> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all"> |
| | | <!--å¼ç¨layui jsæä»¶--> |
| | | <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> |
| | | .layui-form-label { |
| | | font-size: 14px; |
| | | width: 85px; |
| | | text-align: inherit; |
| | | } |
| | | /*å
¨å±è®¾ç½®è¾å
¥æ¡é«åº¦*/ |
| | | .layui-input { |
| | | height: 30px; |
| | | } |
| | | /*设置表头è¾å
¥æ¡*/ |
| | | .t1_input { |
| | | padding: 1%; |
| | | } |
| | | /*æ¬ç«ä¿¡æ¯td*/ |
| | | .bz_td { |
| | | display: -webkit-box; /*设置æé®ä¸æ¢è¡*/ |
| | | padding: 1%; /*设置è¾å
¥æ¡è¾¹è·*/ |
| | | } |
| | | /*设置æ¬ç«ä¿¡æ¯æé®é«åº¦*/ |
| | | .bz_btu { |
| | | height: 30px; |
| | | width: 60px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | th { |
| | | width: 70px; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="formData" id="formData" style="background-color:white;"> |
| | | <div style="background-color:#0085E8;"> |
| | | <span style="color: white;" class="jzd"><i class="layui-icon layui-icon-form"></i>äº§éæ±æ¥å</span> |
| | | </div> |
| | | <div class="layui-form-item" style="margin: 1% 2%;text-align: right;"> |
| | | <button type="button" lay-submit="" lay-filter="Add" class="layui-btn layui-btn-radius">æ°å¢</button> |
| | | <button type="button" lay-submit="" lay-filter="Saver" id="Saver" class="layui-btn layui-btn-radius">ä¿å</button> |
| | | <button type="button" lay-submit="" lay-filter="Cancel" class="layui-btn layui-btn-radius layui-btn-danger">éåº</button> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>æ¡å½¢ç </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarCode" class="layui-input" id="HBarCode" placeholder="请è¾å
¥æ¡å½¢ç åå车" style="border-radius: 50px;" disabled> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu layui-btn-radius" lay-filter="QueDin" style="line-height: 30px;">ç¡®å®</button> |
| | | </td> |
| | | </tr> |
| | | <!--<tr> |
| | | <th>设å¤</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HEquipName" class="layui-input" id="HEquipName" placeholder="è¯·æ«æè®¾å¤äºç»´ç " style="border-radius: 50px;"> |
| | | <input type="hidden" name="HEquipID" id="HEquipID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr>--> |
| | | <tr> |
| | | <th>æºååå·</th> |
| | | <td class="bz_td"> |
| | | <input type="hidden" name="HProcExchBillNo" id="HProcExchBillNo" class="layui-input" value="" style="border-radius: 50px;"> |
| | | <input type="text" name="HSourceBillNo" id="HSourceBillNo" class="layui-input" value="" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HSourceInterID" id="HSourceInterID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HSourceEntryID" id="HSourceEntryID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HSourceBillType" id="HSourceBillType" class="layui-input" value="" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç产订å</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HICMOBillNo" id="HICMOBillNo" class="layui-input" value="" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HICMOInterID" id="HICMOInterID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>çäº§èµæº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HSourceName" class="layui-input" id="HSourceName" placeholder="éæ©çäº§èµæº" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HSourceID" id="HSourceID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | |
| | | <!--<tr> |
| | | <th>æµæ°´å·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HProcNo" class="layui-input" id="HProcNo" placeholder="éæ©æµæ°´å·" style="background-color:#efefef4d;border-radius: 50px;"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="SerialNum-BT" id="SerialNum-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å½åå·¥åº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HProcName" class="layui-input" id="HProcName" placeholder="å½åå·¥åº" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HProcID" id="HProcID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr>--> |
| | | <tr> |
| | | <th>产å代ç </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaterNumber" class="layui-input" id="HMaterNumber" placeholder="产å代ç " style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>产ååç§°</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaterName" class="layui-input" id="HMaterName" placeholder="产ååç§°" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HMaterID" id="HMaterID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>è®¡åæ°é</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HPlanQty" class="layui-input" id="HPlanQty" style="border-radius: 50px;" value="0"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¸è¯æ°é</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBadQty" class="layui-input" id="HBadQty" style="border-radius: 50px;" value="0"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æ¥åºæ°é</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HWasterQty" class="layui-input" id="HWasterQty" style="border-radius: 50px;" value="0"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æ¥å·¥æ°é</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HQty" class="layui-input" id="HQty" style="border-radius: 50px;" value="0"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç产çç»</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HGroupName" class="layui-input" id="HGroupName" placeholder="éæ©ç产çç»" style="background-color:#efefef4d;border-radius: 50px;"> |
| | | <input type="hidden" name="HGroupID" id="HGroupID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionTeam-BT" id="ProductionTeam-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æä½å</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HEmpName" class="layui-input" id="HEmpName" placeholder="éæ©æ¥æ¶äºº" style="background-color:#efefef4d;border-radius: 50px;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="HEmployeeID-BT" id="HEmployeeID-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>车é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeptName" class="layui-input set_height" id="HDeptName" placeholder="éæ©è½¦é´" style="border-radius: 50px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" value="0" autocomplete="off" class="layui-input set_height"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnHDept" id="btnHDept" style="font-weight:bolder;">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>çäº§çæ¬¡</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HWorkShiftName" class="layui-input set_height" id="HWorkShiftName" placeholder="éæ©çæ¬¡" style="border-radius: 50px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HWorkShiftID" id="HWorkShiftID" value="0" autocomplete="off" class="layui-input set_height"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnHWorkShift" id="btnHWorkShift" style="font-weight:bolder;">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å¼å·¥æ¶é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HWorkBeginDate" class="layui-input" id="HWorkBeginDate" style="border-radius: 50px;" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æ¥å·¥æ¶é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HWorkReportDate" class="layui-input" id="HWorkReportDate" style="border-radius: 50px;" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®æ¥æ</th> |
| | | <td class="t1_input"> |
| | | <input type="text" name="HDate" class="layui-input" id="HDate" style="border-radius: 50px;" placeholder="è¯·éæ©æ¥æ" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®å·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBillNo" class="layui-input" id="HBillNo" placeholder="åæ®å·" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>å¶å人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaker" class="layui-input" id="HMaker" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å¶åæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMakeDate" class="layui-input" id="HMakeDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDater" class="layui-input" id="HUpDater" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDateDate" class="layui-input" id="HUpDateDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HChecker" class="layui-input" id="HChecker" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCheckDate" class="layui-input" id="HCheckDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å
³é人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCloseMan" class="layui-input" id="HCloseMan" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å
³éæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCloseDate" class="layui-input" id="HCloseDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºäºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteMan" class="layui-input" id="HDeleteMan" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteDate" class="layui-input" id="HDeleteDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">åæ®ä¿¡æ¯</li> |
| | | <li>å¶åä¿¡æ¯</li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | <!--éèåæ®µ--> |
| | | <input type="hidden" name="lngProcInterID" id="lngProcInterID"> |
| | | <input type="hidden" name="lngBillKey" id="lngBillKey" value="0"> |
| | | <input type="hidden" name="lngBillSubKey" id="lngBillSubKey" value="0"> |
| | | <!--<input type="hidden" name="HMaker" id="HMaker">--><!--å¶å人--> |
| | | <input type="hidden" name="eventType" id="eventType" value="Add"> |
| | | <input type="hidden" name="HeqSouID" id="HeqSouID" value="0"> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | //è·ååæ° |
| | | var HBillType = ""; //åæ®ç±»å |
| | | var HSourceInterID = ""; //æºå主å
ç |
| | | var HSourceEntryID = ""; //æºååå
ç |
| | | var HSourceBillNo = ""; //æºååå· |
| | | var HSourceBillType = ""; //æºåç±»å |
| | | var refSav = ""; //æäº¤ç±»å |
| | | //è·å页é¢è·³è½¬åæ° //åæ®ç¼è¾ç¶æï¼ 1.æ æºåæ°å¢Â  2.ææºåæ°å¢Â  3.ç¼è¾Â 4.æµè§Â 5.åæ´ |
| | | 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 HSBillType = params[params[2]];//æºåç±»å |
| | | } |
| | | |
| | | var edit = function (data) { |
| | | HBillType = data[0].HBillType; |
| | | HSourceInterID = data[0].HSourceInterID; |
| | | HSourceEntryID = data[0].HSourceEntryID; |
| | | HSourceBillNo = data[0].HSourceBillNo; |
| | | HSourceBillType = data[0].HSourceBillType; |
| | | |
| | | } |
| | | layui.config({ |
| | | base: '../../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element','upload'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | //æµè½¬å¡æ¯å¦æ«ææ è®° |
| | | var HProcExchBillNoFlag = false; |
| | | //æ¥ææ¶é´éæ©å¨ |
| | | laydate.render({ |
| | | elem: '#HWorkBeginDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HWorkReportDate' |
| | | , type: 'datetime' |
| | | }); |
| | | //夿æ¯å¦æ°å¢ |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 5) { |
| | | //è·åæå¤§åæ®å· |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3724' }, |
| | | success: function (d) { |
| | | $("#HInterID").val(0); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | , error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.msg("è·ååæ®å·å¤±è´¥ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | }); |
| | | |
| | | GetDefValByUser(); |
| | | set_AddNew(); |
| | | } |
| | | |
| | | //è¿å
¥é¡µé¢é»è®¤å
æ 卿¡å½¢ç ä¸ |
| | | $("#HBarCode").focus(); |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //#region ç¡®å®æé® |
| | | form.on('submit(QueDin)', function (data) {// |
| | | var HBarCode = $('#HBarCode').val(); |
| | | |
| | | if (!HBarCode) { |
| | | layer.msg("æ¡å½¢ç ä¸è½ä¸ºç©ºï¼") |
| | | return; |
| | | } |
| | | txtHBarCode_KeyDown(HBarCode); |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æ°å¢æé® |
| | | form.on('submit(Add)', function () {//æäº¤ |
| | | layer.confirm('æ°å¢å页颿°æ®å°æ¶å¤±ï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | location.replace('Sc_MESBeginWorkBillList_PDA.html?type=' + params[params[0]]); |
| | | }); |
| | | }) |
| | | //#endregion |
| | | |
| | | //#region ä¿åæé® |
| | | form.on('submit(Saver)', function (data) {//æäº¤ |
| | | var refSav = ""; |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 5) { |
| | | refSav = "Add"; |
| | | } else { |
| | | refSav = "Update"; |
| | | } |
| | | if ($("#HSourceID").val() == '' || $("#HSourceID").val() == null || $("#HSourceID").val() == 0) { |
| | | layer.msg("çäº§èµæºä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HSourceInterID").val() == '' || $("#HSourceInterID").val() == null || $("#HSourceInterID").val() == 0) { |
| | | layer.msg("æºååå·ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HEmpID").val() == '' || $("#HEmpID").val() == null||$("#HEmpID").val() == '0') { |
| | | layer.msg("æä½åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null || $("#HGroupID").val() == '0') { |
| | | layer.msg("çç»ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null || $("#HDeptID").val() == '0') { |
| | | layer.msg("车é´ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HICMOInterID").val() == '' || $("#HICMOInterID").val() == null || $("#HICMOInterID").val() == '0') { |
| | | layer.msg("ç产订åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (!OverStepQty()) { |
| | | return Result = false; |
| | | } |
| | | |
| | | var msg = JSON.stringify(data.field) + ";" + refSav; |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/SaveGetMESProductReportFrom", |
| | | async: true, |
| | | data: { "msg": msg }, |
| | | dataType: "json", |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);//ç¦ç¨ä¿åæé® |
| | | $("#HInterID").val(result.HInterID);//è·åæäº¤æåè¿åç忮䏻ID |
| | | layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | if (result.Verify == "Y") //èªå¨å®¡æ ¸ |
| | | { |
| | | layer.close(index); |
| | | SaveVerify(); //å®¡æ ¸ |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(result.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: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | $('#HBarCode').on('keydown', function (event) { |
| | | var HBarCode = $('#HBarCode').val(); |
| | | if (event.keyCode == 13) { |
| | | if (!HBarCode) { |
| | | layer.msg("空ç½ç ,æ¡å½¢ç ä¸è½ä¸ºç©ºï¼") |
| | | return; |
| | | } |
| | | txtHBarCode_KeyDown(HBarCode); |
| | | } |
| | | }); |
| | | //æµæ°´å·ï¼å·¥åºå·ï¼åè½¦æ¹æ³ |
| | | $('#HProcNo').on('keydown', function (event) { |
| | | var sProcNo = $('#HProcNo').val(); |
| | | var sBillNo = $('#HMainSourceBillNo').val(); |
| | | if (event.keyCode == 13) { |
| | | if (!HProcExchBillNoFlag) { |
| | | layer.msg("æµè½¬å¡æ²¡ææ«æï¼æè
没ææå车é®ï¼è¯·æ«ææµè½¬å¡æè
卿µè½¬å¡ææ¬æ¡ä¸æå车é®ï¼"); |
| | | return; |
| | | } |
| | | txtHProcNo_KeyDown(sBillNo, sProcNo); |
| | | } |
| | | }); |
| | | |
| | | //éæ©ç产çç»å¼¹çª |
| | | form.on('submit(ProductionTeam-BT)', function () {//éæ©ç产çç» |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æ¬ç«å·¥åº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_GetProductionTeamList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©çäº§èµæºå¼¹çª |
| | | form.on('submit(ProductionResources-BT)', function () {//çäº§èµæº |
| | | console.log($('#HProcNo').val()) |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'çäº§èµæº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_GetProductionResourcesList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©æä½äºº |
| | | form.on('submit(HEmployeeID-BT)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'èåå表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_EmployeeList.html?Type=HWorker', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©æµæ°´å·å¼¹çª |
| | | form.on('submit(SerialNum-BT)', function () {//çäº§èµæº |
| | | var value = $("#lngProcInterID").val(); |
| | | // 夿æ¯å¦å·²ç»è¾å
¥æµæ°´å·ï¼æ¯åå¼¹åºæ¨¡ææ¡ï¼å¦åç»åºæç¤º |
| | | if (value) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æµæ°´å·' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: [`../../../Baseset/åºç¡èµæ/Gy_GetProcNoList.html?HInterID=${value}`, 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | , end: function () { |
| | | var sProcNo = $('#HProcNo').val(); |
| | | var sBillNo = $('#HMainSourceBillNo').val(); |
| | | if (sProcNo != "") { |
| | | txtHProcNo_KeyDown(sBillNo, sProcNo); |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | layer.alert('请æ¨ç¡®è®¤è¾å
¥æµè½¬å¡å·åéè¯^_^', { icon: 7 }); |
| | | } |
| | | }); |
| | | |
| | | //éæ©é¨é¨å¼¹çª |
| | | form.on('submit(btnHDept)', function () {//é¨é¨ |
| | | layer.open({ |
| | | type: 2 //ç±»å |
| | | , skin: 'layui-layer-rim'//å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'é¨é¨å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , 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('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID); |
| | | $("#HDeptName").val(checkStatus.data[0].HName); |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éåº--å
¨å±ç |
| | | form.on('submit(Cancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.location.href = "../../../../views/index_Mobile.html"; |
| | | }); |
| | | }) |
| | | |
| | | //æ°å¢ |
| | | form.on('submit(Add)', function () { |
| | | var index = parent.layer.getFrameIndex(window.name); // å
å¾å°å½å iframe å±çç´¢å¼ |
| | | parent.layer.close(index); // åæ§è¡å
³é |
| | | }) |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | | |
| | | //#region éè¿ç»å½ç¨æ·è·åé»è®¤å¼ |
| | | function GetDefValByUser() { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cj_StationInBill/GetDefValByUser", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "Czybm": sessionStorage["Czybm"], "Czymc": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | var data = result.data[0]; |
| | | |
| | | form.val("formData", { |
| | | //"HSourceID": data.HSourceID, |
| | | //"HSourceName": data.çäº§èµæºåç§°, |
| | | "HGroupID": data.HGroupID, |
| | | "HGroupName": data.ç产çç»åç§°, |
| | | "HEmpID": data.HEmpID, |
| | | "HEmpName": data.æä½ååç§° |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | , error: function () { |
| | | layer.close(index); |
| | | layer.msg("æ¥å£è¯·æ±å¤±è´¥"); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | function txtHBarCode_KeyDown(HBarCode) { |
| | | var ajaxLoad = layer.load(); |
| | | var sql = "select * from Sc_ICMOBillStatus_Tmp where HICMOBillNo = '" + HBarCode + "'" ; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sql }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | HSourceInterID = data1.data[0].HInterID; |
| | | HSourceEntryID = data1.data[0].HICMOEntryID; |
| | | HSourceBillNo = HBarCode; |
| | | HSourceBillType = data1.data[0].HBillType; |
| | | } else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }); |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID; |
| | | |
| | | $("#HProcID").val(LoadData[0].HProcID); //å½åå·¥åºID |
| | | $("#HProcName").val(LoadData[0].HProcName); //å½åå·¥åº |
| | | $("#HMaterID").val(LoadData[0].HMaterID); //产åID |
| | | $("#HMaterCode").val(LoadData[0].HMaterNumber); //产å代ç |
| | | $("#HMaterName").val(LoadData[0].HMaterName); //产ååç§° |
| | | $("#HMaterSpec").val(LoadData[0].HModel); //产åè§æ ¼ |
| | | $("#HSourceID").val(LoadData[0].HSourceID); //çäº§èµæºID |
| | | $("#HSourceName").val(LoadData[0].HSourceName); //çäº§èµæº |
| | | $("#HMainSourceBillNo").val(LoadData[0].HICMOBillNo); //æºååå·ï¼ææ¶åå¼è®¢åç¼å·ï¼ |
| | | $("#HMainSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç (åå¼HInterID) |
| | | $("#HMainSourceEntryID").val(LoadData[0].HSourceEntryID); //æºååå
ç (æºåè¡å·) |
| | | $("#HMainSourceBillType").val(HSourceBillType); //æºåç±»å |
| | | $("#HDeptID").val(LoadData[0].HDeptID); //车é´ID |
| | | $("#HDeptName").val(LoadData[0].HDeptName); //è½¦é´ |
| | | $("#HICMOInterID").val(LoadData[0].HICMOInterID); //ç产订åID |
| | | $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //ç产订ååID |
| | | $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //ç产订å |
| | | //HCenterID = LoadData[0].HCenterID == null ? sessionStorage["HWorkCenterID"] : LoadData[0].HCenterID;//å·¥ä½ä¸å¿id |
| | | layer.close(ajaxLoad); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }); |
| | | } |
| | | //æµæ°´å·åè½¦æ¹æ³ |
| | | function txtHProcNo_KeyDown(sBillNo, sProcNo) { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cj_StationInBill/txtHProcNo_KeyDown", |
| | | type: "GET", |
| | | data: { "sBillNo": sBillNo, "sProcNo": sProcNo }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | var data = result.data[0]; |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HProcName": data.å·¥åº, |
| | | "HProcID": data.HProcID, |
| | | "HSourceID": data.HSourceID, |
| | | "HSourceName": data.çäº§èµæº |
| | | }); |
| | | $("#HProcNo").attr("readonly", "readonly"); |
| | | $("#HProcNo").css("background-color", "#efefef4d"); |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(result.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 SaveVerify() { |
| | | var HSourceID = $("#HSourceID").val(); //çäº§èµæºID |
| | | var HSourceInterID = $("#HSourceInterID").val(); //æºå主å
ç |
| | | var HSourceEntryID = $("#HSourceEntryID").val();//æºååå
ç |
| | | var HSourceBillNo = $("#HSourceBillNo").val();//æºååå· |
| | | var HICMOInterID = $("#HICMOInterID").val();//ç产订å主ID |
| | | var HICMOEntryID = $("#HICMOEntryID").val();//ç产订ååID |
| | | var HInterID = $("#HInterID").val();//äº§éæ±æ¥ä¸´æ¶è¡¨ä¸»ID |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/MESProductAuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { |
| | | "HSourceID": HSourceID, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, "HICMOInterID": HICMOInterID, "HICMOEntryID": HICMOEntryID, |
| | | "HInterID": HInterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | //layer.close(layer.index); |
| | | //window.parent.location.reload(); |
| | | }); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }) |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //ææºåæ°å¢ |
| | | function set_AddNew() { |
| | | //åå§åºæ¬ä¿¡æ¯èµå¼ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | $("#HWorkReportDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")) //æ¥å·¥æ¥æ |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //å¶åæ¥æ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å¶å人 |
| | | |
| | | |
| | | //å æºåç±»ååºå(å¯ä»¥åä¸åçæ¹æ³) |
| | | $('#HProcName').attr("disabled", true); |
| | | $('#HSourceName').attr("disabled", true); |
| | | $('#ProductionResources-BT').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HSourceBillNo').attr("disabled", true); |
| | | $('#HICMOBillNo').attr("disabled", true); |
| | | $('#HDeptName').attr("disabled", true); |
| | | $('#btnHDept').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HWorkBeginDate').attr("disabled", true); |
| | | $('#HWorkReportDate').attr("disabled", true); |
| | | $('#HPlanQty').attr("disabled", true); |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HBillType |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID; |
| | | |
| | | $("#HProcID").val(LoadData[0].HProcID); //å½åå·¥åºID |
| | | $("#HProcName").val(LoadData[0].HProcName); //å½åå·¥åº |
| | | $("#HMaterID").val(LoadData[0].HMaterID); //产åID |
| | | $("#HMaterNumber").val(LoadData[0].HMaterNumber); //产å代ç |
| | | $("#HMaterName").val(LoadData[0].HMaterName); //产ååç§° |
| | | $("#HSourceID").val(LoadData[0].HSourceID); //çäº§èµæºID |
| | | $("#HSourceName").val(LoadData[0].HSourceName); //çäº§èµæº |
| | | $("#HSourceBillNo").val(LoadData[0].HICMOBillNo); //æºååå·ï¼ææ¶åå¼è®¢åç¼å·ï¼ |
| | | $("#HSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç (åå¼HInterID) |
| | | $("#HSourceEntryID").val(LoadData[0].HSourceEntryID); //æºååå
ç (æºåè¡å·) |
| | | $("#HSourceBillType").val(HSourceBillType); //æºåç±»å |
| | | $("#HDeptID").val(LoadData[0].HDeptID); //车é´ID |
| | | $("#HDeptName").val(LoadData[0].HDeptName); //è½¦é´ |
| | | $("#HICMOInterID").val(LoadData[0].HICMOInterID); //ç产订åID |
| | | $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //ç产订ååID |
| | | $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //ç产订å |
| | | $("#HWorkBeginDate").val(LoadData[0].HBeginDate); //å¼å·¥æ¶é´ |
| | | $("#HPlanQty").val(LoadData[0].HDatePlanQty); //è®¡åæ°é |
| | | //HCenterID = LoadData[0].HCenterID == null ? sessionStorage["HWorkCenterID"] : LoadData[0].HCenterID;//å·¥ä½ä¸å¿id |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //éªè¯æ±æ¥æ°éæ¯å¦è¶
è¿è®¡åæ°é |
| | | function OverStepQty() { |
| | | var sWhere = ""; |
| | | var flag = true; |
| | | sWhere = " where HSourceID='" + $("#HSourceID").val() + "' and HSourceInterID='" + HSourceInterID + "' and HSourceEntryID='" + HSourceEntryID + "' and HSourceBillNo='" + HSourceBillNo + "' and HSourceBillType='" + HSourceBillType + "' "; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESOverStepQty", |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | dataType: "json",//æ°æ®ç±»åå¯ä»¥ä¸º text xml json script jsonp |
| | | async: false, |
| | | success: function (datas) { |
| | | var LoadData = datas.data.Sc_ICMOBillWorkQtyStatus_Tmp; |
| | | var HQty = LoadData[0].HQty; |
| | | var HBadQty = LoadData[0].HBadQty; |
| | | var HWasterQty = LoadData[0].HWasterQty; |
| | | var yessqty = HQty + HBadQty + HWasterQty; |
| | | var sumqty = parseFloat($("#HQty").val()) + yessqty; |
| | | if (sumqty > parseFloat($("#HPlanQty").val())) { |
| | | layer.confirm("å·²æ±æ¥æ°é:ã" + yessqty + "ã,å½åæ±æ¥æ°é:ã" + parseFloat($("#HQty").val()) + "ãä¸è½å¤§äºè®¡åæ°é:ã" + parseFloat($("#HPlanQty").val()) + "ãï¼", { |
| | | btn: ['确认', 'åæ¶'] |
| | | }, function (index) { |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //Submit(data); |
| | | }, function () { |
| | | |
| | | }); |
| | | flag = false; |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | flag = false; |
| | | } |
| | | }); |
| | | return flag; |
| | | } |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | }); |
| | | //è¿åæµæ°´å· |
| | | function GetProcNoValue(obj) { |
| | | $("#HProcNo").val(obj[0].æµæ°´å·); |
| | | } |
| | | |
| | | //è¿åç产çç» |
| | | function GetProductionTeamValue(obj) { |
| | | $("#HGroupName").val(obj[0].çç»); |
| | | $("#HGroupID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | //è¿åçäº§èµæº |
| | | function GetProductionResourcesValue(obj) { |
| | | $("#HSourceName").val(obj[0].çäº§èµæº); |
| | | $("#HSourceID").val(obj[0].HItemID); |
| | | } |
| | | //è¿åæä½å |
| | | function GetHWorkerValue(obj) { |
| | | $("#HEmpName").val(obj[0].HName); |
| | | $("#HEmpID").val(obj[0].HItemID); |
| | | } |
| | | //è¿åå½åå·¥åº |
| | | function GetHProcValue(obj) { //è¿åå½åå·¥åº |
| | | $("#HProcName").val(obj[0].å·¥åº); |
| | | $("#HProcID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>äº§éæ±æ¥åå表</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../../layuiadmin/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 type="text/css"> |
| | | input.layui-input.layui-unselect { |
| | | padding-right: 0; |
| | | } |
| | | </style> |
| | | </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> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 30px;">æ¥æ</label> |
| | | <input type="date" class="layui-input" id="HBeginDate" style="width:110px;" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width:5px">-</label> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="date" class="layui-input" id="HEndDate" style="width:110px;" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 60px;">ç产订åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 90px;"> |
| | | <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="width:120px"> |
| | | </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> |
| | | </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="btnDel"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <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 |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sc_ProductReportBillList_PDA"; |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | |
| | | //#region åå§åçé¢ |
| | | |
| | | set_ClearBill(); |
| | | |
| | | //#endregion |
| | | |
| | | //#region ç¹å»äºä»¶å
æ¬on formäºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //å®¡æ ¸ |
| | | case 'btnCheck': btnCheck(1); |
| | | break; |
| | | //åå®¡æ ¸ |
| | | case 'btnAdutCheck': btnCheck(2); |
| | | break; |
| | | //å é¤ |
| | | case 'btnDel': btnDel(); |
| | | break; |
| | | //éåº |
| | | case 'btn-exit': parent.location.href = "../../../../views/index_Mobile.html"; |
| | | break; |
| | | }; |
| | | }); |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | }); |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }); |
| | | |
| | | //è¡çå¬äºä»¶-åå» |
| | | table.on('row(mainTable)', function (obj) { |
| | | var flag = !obj.tr.find(':checkbox:first').prop('checked'); |
| | | obj.tr.find(':checkbox').prop('checked', flag); |
| | | if (flag) { |
| | | obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //设置å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | } else { |
| | | obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//åæ¶å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:" });//åæ¶å½åtré¢è² |
| | | } |
| | | //mainTable ä¸ºè¡¨æ ¼ID æ³¨ææ¤å¤å¦æID䏿£ç¡®å°å¯¼è´ä½ å¨çå¬å¤éæ¡æ¶è·åä¸å°ä½ éæ©çæ°æ®ï¼åé¢çåªæ¯æ·»å æå é¤é䏿ªé䏿 ·å¼ä»¥åè®¾ç½®èæ¯è²ï¼åä½é¢è² |
| | | layui.each(table.cache.mainTable, function (i, l) { |
| | | if (obj.tr.index() == l.LAY_TABLE_INDEX) { |
| | | l.LAY_CHECKED = flag; |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | //åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date() - 1000 * 60 * 60 * 24 * 30, "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | } |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , totalRow: true |
| | | , cellMinWidth: 80 |
| | | , limit: 50 |
| | | , cols:[ [ |
| | | //{ |
| | | // "type": "checkbox", |
| | | // "fixed": "left" |
| | | //}, |
| | | { |
| | | "field": "HInterID", |
| | | "title": "HInterID", |
| | | "align": "center", |
| | | |
| | | "hide": true |
| | | }, |
| | | { |
| | | "field": "åæ®å·", |
| | | "title": "åæ®å·", |
| | | "align": "center", |
| | | |
| | | "hide": true |
| | | }, |
| | | { |
| | | "field": "æ¥æ", |
| | | "title": "æ¥æ", |
| | | "align": "center", |
| | | |
| | | "hide": true |
| | | }, |
| | | |
| | | { |
| | | "field": "HBillStatus", |
| | | "title": "HBillStatus", |
| | | "align": "center", |
| | | |
| | | "hide": true |
| | | }, |
| | | |
| | | { |
| | | "field": "产å代ç ", |
| | | "title": "产å代ç ", |
| | | "align": "center", |
| | | "width":100 |
| | | }, |
| | | { |
| | | "field": "产ååç§°", |
| | | "title": "产ååç§°", |
| | | "align": "center", |
| | | "width": 100 |
| | | }, |
| | | { |
| | | "field": "æ±æ¥ç±»å", |
| | | "title": "æ±æ¥ç±»å", |
| | | "align": "center", |
| | | |
| | | "hide": true |
| | | }, |
| | | { |
| | | "field": "æ±æ¥æ°é", |
| | | "title": "æ±æ¥æ°é", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "ä¸è¯æ°é", |
| | | "title": "ä¸è¯æ°é", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "æ¥åºæ°é", |
| | | "title": "æ¥åºæ°é", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "产åè§æ ¼", |
| | | "title": "产åè§æ ¼", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | |
| | | { |
| | | "field": "çäº§èµæºä»£ç ", |
| | | "title": "çäº§èµæºä»£ç ", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "çäº§èµæº", |
| | | "title": "çäº§èµæº", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | |
| | | { |
| | | "field": "ç产çç»ä»£ç ", |
| | | "title": "ç产çç»ä»£ç ", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "ç产çç»", |
| | | "title": "ç产çç»", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | |
| | | { |
| | | "field": "æä½å", |
| | | "title": "æä½å", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "å¼å·¥æ¶é´", |
| | | "title": "å¼å·¥æ¶é´", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "æ¥å·¥æ¶é´", |
| | | "title": "æ¥å·¥æ¶é´", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "å¶å人", |
| | | "title": "å¶å人", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "å¶åæ¥æ", |
| | | "title": "å¶åæ¥æ", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "å®¡æ ¸äºº", |
| | | "title": "å®¡æ ¸äºº", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "å®¡æ ¸æ¥æ", |
| | | "title": "å®¡æ ¸æ¥æ", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "ä¿®æ¹äºº", |
| | | "title": "ä¿®æ¹äºº", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "ä¿®æ¹æ¥æ", |
| | | "title": "ä¿®æ¹æ¥æ", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "å
³é人", |
| | | "title": "å
³é人", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "å
³éæ¥æ", |
| | | "title": "å
³éæ¥æ", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "ä½åºäºº", |
| | | "title": "ä½åºäºº", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "ä½åºæ¥æ", |
| | | "title": "ä½åºæ¥æ", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | |
| | | { |
| | | "field": "ç产订åå·", |
| | | "title": "ç产订åå·", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "HICMOInterID", |
| | | "title": "HICMOInterID", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "HICMOEntryID", |
| | | "title": "HICMOEntryID", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "HSourceInterID", |
| | | "title": "HSourceInterID", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "HSourceEntryID", |
| | | "title": "HSourceEntryID", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "æºååå·", |
| | | "title": "æºååå·", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "æºåç±»å", |
| | | "title": "æºåç±»å", |
| | | "align": "center", |
| | | "sort": true |
| | | }, |
| | | { |
| | | "field": "HRelationInterID", |
| | | "title": "HRelationInterID", |
| | | "align": "center", |
| | | "sort": true |
| | | } |
| | | ]] |
| | | //, limits: [50, 500, 5000, 20000] |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | |
| | | } |
| | | |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | //卿å-ç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_MESProductReportStepBill/Get_Sc_MESProductReportBillList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | |
| | | if (data1.count == 1) { |
| | | |
| | | //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, "") > -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 }); |
| | | // break; |
| | | // default: |
| | | // col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true }); |
| | | // } |
| | | // } |
| | | //} |
| | | //debugger |
| | | //option = { |
| | | // elem: '#mainTable' |
| | | // , toolbar: '#toolbarDemo' |
| | | // , cellMinWidth: 120 |
| | | // , page: true |
| | | // , limit: 50 |
| | | // , limits: [50, 500, 5000, 20000] |
| | | // , height: 'full-70' |
| | | // , totalRow: false //å¼å¯å计 |
| | | // , cols: [col] |
| | | // , data: data1.data |
| | | //}; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.msg('é误' + err, { |
| | | icon: 5, |
| | | time: 20000 |
| | | }, function () { |
| | | //do something |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HBeginDate = $("#HBeginDate").val();//ä¸è¾¾æ¥æ å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | var HICMOBillNo = $("#HICMOBillNo").val(); |
| | | |
| | | if (HBeginDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HBeginDate + "'"; |
| | | } |
| | | if (HEndDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HEndDate + "'"; |
| | | } |
| | | if (HICMOBillNo != "") { |
| | | sWhere += "and ç产订åå· like '" + HICMOBillNo + "'" |
| | | } |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date() - 1000 * 60 * 60 * 24 * 30, "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMaterNumber").val(""); |
| | | $("#HICMOBillNo").val(""); |
| | | |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //å é¤ |
| | | function btnDel() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].HInterID.toString(); |
| | | var HICMOInID = data[0].HSourceInterID.toString(); |
| | | var HICMOEnID = data[0].HSourceEntryID.toString(); |
| | | var HBillStatus = data[0].HBillStatus.toString(); |
| | | if (HBillStatus == 2) { |
| | | layer.msg('åæ®å·²æ¥æ£å®¡æ ¸æ æ³å é¤ï¼'); |
| | | return false; |
| | | } |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sc_MESBeginStepWorkBill/DeltetMESProductReportBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "HICMOInterID": HICMOInID, "HICMOEntryID": HICMOEnID, "UserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | |
| | | } |
| | | |
| | | //#endregion |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title class="sckgd">ç产åå·¥å</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <!--å¼ç¨layuiæ ·å¼æä»¶--> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all"> |
| | | <!--å¼ç¨layui jsæä»¶--> |
| | | <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> |
| | | .layui-form-label { |
| | | font-size: 14px; |
| | | width: 85px; |
| | | text-align: inherit; |
| | | } |
| | | /*å
¨å±è®¾ç½®è¾å
¥æ¡é«åº¦*/ |
| | | .layui-input { |
| | | height: 30px; |
| | | } |
| | | /*设置表头è¾å
¥æ¡*/ |
| | | .t1_input { |
| | | padding: 1%; |
| | | } |
| | | /*æ¬ç«ä¿¡æ¯td*/ |
| | | .bz_td { |
| | | display: -webkit-box; /*设置æé®ä¸æ¢è¡*/ |
| | | padding: 1%; /*设置è¾å
¥æ¡è¾¹è·*/ |
| | | } |
| | | /*设置æ¬ç«ä¿¡æ¯æé®é«åº¦*/ |
| | | .bz_btu { |
| | | height: 30px; |
| | | width: 60px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | th { |
| | | width: 70px; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="formData" id="formData" style="background-color:white;"> |
| | | <div style="background-color:#0085E8;"> |
| | | <span style="color: white;" class="jzd"><i class="layui-icon layui-icon-form"></i>ç产åå·¥å</span> |
| | | </div> |
| | | <div class="layui-form-item" style="margin: 1% 2%;text-align: right;"> |
| | | <button type="button" lay-submit="" lay-filter="Add" class="layui-btn layui-btn-radius">æ°å¢</button> |
| | | <button type="button" lay-submit="" lay-filter="Saver" id="Saver" class="layui-btn layui-btn-radius">ä¿å</button> |
| | | <button type="button" lay-submit="" lay-filter="Cancel" class="layui-btn layui-btn-radius layui-btn-danger">éåº</button> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>æ¡å½¢ç </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarCode" class="layui-input" id="HBarCode" placeholder="请è¾å
¥æ¡å½¢ç åå车" style="border-radius: 50px;" disabled> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu layui-btn-radius" lay-filter="QueDin" style="line-height: 30px;">ç¡®å®</button> |
| | | </td> |
| | | </tr> |
| | | <!--<tr> |
| | | <th>设å¤</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HEquipName" class="layui-input" id="HEquipName" placeholder="è¯·æ«æè®¾å¤äºç»´ç " style="border-radius: 50px;"> |
| | | <input type="hidden" name="HEquipID" id="HEquipID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr>--> |
| | | <tr> |
| | | <th>æºååå·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" class="layui-input" value="" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç产订å</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HICMOBillNo" id="HICMOBillNo" class="layui-input" value="" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HICMOInterID" id="HICMOInterID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>çäº§èµæº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HSourceName" class="layui-input" id="HSourceName" placeholder="éæ©çäº§èµæº" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HSourceID" id="HSourceID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | |
| | | <!--<tr> |
| | | <th>æµæ°´å·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HProcNo" class="layui-input" id="HProcNo" placeholder="éæ©æµæ°´å·" style="background-color:#efefef4d;border-radius: 50px;"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="SerialNum-BT" id="SerialNum-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å½åå·¥åº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HProcName" class="layui-input" id="HProcName" placeholder="å½åå·¥åº" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HProcID" id="HProcID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr>--> |
| | | <tr> |
| | | <th>产å代ç </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaterNumber" class="layui-input" id="HMaterNumber" placeholder="产å代ç " style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>产ååç§°</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaterName" class="layui-input" id="HMaterName" placeholder="产ååç§°" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HMaterID" id="HMaterID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å¼å§æ¶é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HStopBeginWorkTime" class="layui-input" id="HStopBeginWorkTime" style="border-radius: 50px;" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç»ææ¶é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HStopEndWorkTime" class="layui-input" id="HStopEndWorkTime" style="border-radius: 50px;" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å工类å</th> |
| | | <td class="bz_td"> |
| | | <select name="HStopType" id="HStopType" lay-verify="HStopType" style="border-radius: 50px;"> |
| | | <option value="">è¯·éæ©åå·¥åå </option> |
| | | <option value="模å
·ä¿å
»">模å
·ä¿å
»</option> |
| | | <option value="ææ">ææ</option> |
| | | <option value="人åä¸è¶³">人åä¸è¶³</option> |
| | | <option value="åæ°">åæ°</option> |
| | | <option value="åæ°´">åæ°´</option> |
| | | <option value="åçµ">åçµ</option> |
| | | <option value="模å
·æ
é">模å
·æ
é</option> |
| | | <option value="çæ§æ¥è¦">çæ§æ¥è¦</option> |
| | | <option value="èªå¨åæ
é">èªå¨åæ
é</option> |
| | | <option value="æ³¨å¡æºæ
é">æ³¨å¡æºæ
é</option> |
| | | <option value="尺寸å¼å¸¸">尺寸å¼å¸¸</option> |
| | | <option value="计ååæº">计ååæº</option> |
| | | <option value="å¤è§ä¸è¯è°æº">å¤è§ä¸è¯è°æº</option> |
| | | <option value="模å
·æ¸
æ´">模å
·æ¸
æ´</option> |
| | | <option value="æ¨¡æ¸©æºæ
é">æ¨¡æ¸©æºæ
é</option> |
| | | <option value="çææºæ
é">çææºæ
é</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åå·¥åå </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HStopReason" class="layui-input" id="HStopReason" value="" placeholder="" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç产çç»</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HGroupName" class="layui-input" id="HGroupName" placeholder="éæ©ç产çç»" style="background-color:#efefef4d;border-radius: 50px;"> |
| | | <input type="hidden" name="HGroupID" id="HGroupID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionTeam-BT" id="ProductionTeam-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æä½å</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HEmpName" class="layui-input" id="HEmpName" placeholder="éæ©æ¥æ¶äºº" style="background-color:#efefef4d;border-radius: 50px;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="HEmployeeID-BT" id="HEmployeeID-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>车é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeptName" class="layui-input set_height" id="HDeptName" placeholder="éæ©è½¦é´" style="border-radius: 50px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" value="0" autocomplete="off" class="layui-input set_height"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnHDept" id="btnHDept" style="font-weight:bolder;">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>çäº§çæ¬¡</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HWorkShiftName" class="layui-input set_height" id="HWorkShiftName" placeholder="éæ©çæ¬¡" style="border-radius: 50px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HWorkShiftID" id="HWorkShiftID" value="0" autocomplete="off" class="layui-input set_height"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnHWorkShift" id="btnHWorkShift" style="font-weight:bolder;">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>夿³¨</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HRemark" class="layui-input" id="HRemark" placeholder="夿³¨" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®æ¥æ</th> |
| | | <td class="t1_input"> |
| | | <input type="text" name="HDate" class="layui-input" id="HDate" style="border-radius: 50px;" placeholder="è¯·éæ©æ¥æ" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®å·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBillNo" class="layui-input" id="HBillNo" placeholder="åæ®å·" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>å¶å人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaker" class="layui-input" id="HMaker" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å¶åæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMakeDate" class="layui-input" id="HMakeDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDater" class="layui-input" id="HUpDater" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDateDate" class="layui-input" id="HUpDateDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HChecker" class="layui-input" id="HChecker" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCheckDate" class="layui-input" id="HCheckDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å
³é人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCloseMan" class="layui-input" id="HCloseMan" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å
³éæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCloseDate" class="layui-input" id="HCloseDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºäºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteMan" class="layui-input" id="HDeleteMan" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteDate" class="layui-input" id="HDeleteDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">åæ®ä¿¡æ¯</li> |
| | | <li>å¶åä¿¡æ¯</li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | <!--éèåæ®µ--> |
| | | <input type="hidden" name="lngProcInterID" id="lngProcInterID"> |
| | | <input type="hidden" name="lngBillKey" id="lngBillKey" value="0"> |
| | | <input type="hidden" name="lngBillSubKey" id="lngBillSubKey" value="0"> |
| | | <!--<input type="hidden" name="HMaker" id="HMaker">--><!--å¶å人--> |
| | | <input type="hidden" name="eventType" id="eventType" value="Add"> |
| | | <input type="hidden" name="HeqSouID" id="HeqSouID" value="0"> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | var HBillType = ""; //åæ®ç±»å |
| | | var HSourceInterID = ""; //æºå主å
ç |
| | | var HSourceEntryID = ""; //æºååå
ç |
| | | var HSourceBillNo = ""; //æºååå· |
| | | var HSourceBillType = ""; //æºåç±»å |
| | | //è·å页é¢è·³è½¬åæ° //åæ®ç¼è¾ç¶æï¼ 1.æ æºåæ°å¢Â  2.ææºåæ°å¢Â  3.ç¼è¾Â 4.æµè§Â 5.åæ´ |
| | | 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 HSBillType = params[params[2]];//æºåç±»å |
| | | } |
| | | |
| | | var edit = function (data) { |
| | | HBillType = data[0].HBillType; |
| | | HSourceInterID = data[0].HSourceInterID; |
| | | HSourceEntryID = data[0].HSourceEntryID; |
| | | HSourceBillNo = data[0].HSourceBillNo; |
| | | HSourceBillType = data[0].HSourceBillType; |
| | | |
| | | } |
| | | layui.config({ |
| | | base: '../../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element','upload'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | //æµè½¬å¡æ¯å¦æ«ææ è®° |
| | | var HProcExchBillNoFlag = false; |
| | | //å è½½æ¶é´æ§ä»¶ |
| | | laydate.render({ |
| | | elem: '#HStopBeginWorkTime' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HStopEndWorkTime' |
| | | , type: 'datetime' |
| | | }); |
| | | //夿æ¯å¦æ°å¢ |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 5) { |
| | | //è·åæå¤§åæ®å· |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3702' }, |
| | | success: function (d) { |
| | | $("#HInterID").val(0); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | , error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.msg("è·ååæ®å·å¤±è´¥ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | }); |
| | | |
| | | GetDefValByUser(); |
| | | set_AddNew(); |
| | | } |
| | | |
| | | //è¿å
¥é¡µé¢é»è®¤å
æ 卿¡å½¢ç ä¸ |
| | | $("#HBarCode").focus(); |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //#region ç¡®å®æé® |
| | | form.on('submit(QueDin)', function (data) {// |
| | | var HBarCode = $('#HBarCode').val(); |
| | | |
| | | if (!HBarCode) { |
| | | layer.msg("æ¡å½¢ç ä¸è½ä¸ºç©ºï¼") |
| | | return; |
| | | } |
| | | txtHBarCode_KeyDown(HBarCode); |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æ°å¢æé® |
| | | form.on('submit(Add)', function () {//æäº¤ |
| | | layer.confirm('æ°å¢å页颿°æ®å°æ¶å¤±ï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | location.replace('Sc_MESBeginWorkBillList_PDA.html?type=' + params[params[0]]); |
| | | }); |
| | | }) |
| | | //#endregion |
| | | |
| | | //#region ä¿åæé® |
| | | form.on('submit(Saver)', function (data) {//æäº¤ |
| | | var refSav = ""; |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 5) { |
| | | refSav = "Add"; |
| | | } else { |
| | | refSav = "Update"; |
| | | } |
| | | if ($("#HStopEndWorkTime").val() == '' || $("#HStopBeginWorkTime").val() == null) { |
| | | layer.msg("é¢è®¡ç»ææ¶é´ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HSourceID").val() == '' || $("#HSourceID").val() == null || $("#HSourceID").val() == 0) { |
| | | layer.msg("çäº§èµæºä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HMainSourceInterID").val() == '' || $("#HMainSourceInterID").val() == null || $("#HMainSourceInterID").val() == 0) { |
| | | layer.msg("æºååå·ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HEmpID").val() == '' || $("#HEmpID").val() == null||$("#HEmpID").val() == '0') { |
| | | layer.msg("æä½åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null || $("#HGroupID").val() == '0') { |
| | | layer.msg("çç»ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null || $("#HDeptID").val() == '0') { |
| | | layer.msg("车é´ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HICMOInterID").val() == '' || $("#HICMOInterID").val() == null || $("#HICMOInterID").val() == '0') { |
| | | layer.msg("ç产订åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HStopType").val() == '' || $("#HStopType").val() == null) { |
| | | layer.msg("å工类åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HStopReason").val() == '' || $("#HStopReason").val() == null) { |
| | | layer.msg("åå·¥åå ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | |
| | | var msg = JSON.stringify(data.field) + ";" + sessionStorage["HUserName"] + ";" + refSav; |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_MESStopWorkBill/SaveGetMESStopFrom", |
| | | async: true, |
| | | data: { "msg": msg }, |
| | | dataType: "json", |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);//ç¦ç¨ä¿åæé® |
| | | $("#HInterID").val(result.HInterID);//è·åæäº¤æåè¿åç忮䏻ID |
| | | layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | if (result.Verify == "Y") //èªå¨å®¡æ ¸ |
| | | { |
| | | layer.close(index); |
| | | SaveVerify(); //å®¡æ ¸ |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(result.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: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | $('#HBarCode').on('keydown', function (event) { |
| | | var HBarCode = $('#HBarCode').val(); |
| | | if (event.keyCode == 13) { |
| | | if (!HBarCode) { |
| | | layer.msg("空ç½ç ,æ¡å½¢ç ä¸è½ä¸ºç©ºï¼") |
| | | return; |
| | | } |
| | | txtHBarCode_KeyDown(HBarCode); |
| | | } |
| | | }); |
| | | //æµæ°´å·ï¼å·¥åºå·ï¼åè½¦æ¹æ³ |
| | | $('#HProcNo').on('keydown', function (event) { |
| | | var sProcNo = $('#HProcNo').val(); |
| | | var sBillNo = $('#HMainSourceBillNo').val(); |
| | | if (event.keyCode == 13) { |
| | | if (!HProcExchBillNoFlag) { |
| | | layer.msg("æµè½¬å¡æ²¡ææ«æï¼æè
没ææå车é®ï¼è¯·æ«ææµè½¬å¡æè
卿µè½¬å¡ææ¬æ¡ä¸æå车é®ï¼"); |
| | | return; |
| | | } |
| | | txtHProcNo_KeyDown(sBillNo, sProcNo); |
| | | } |
| | | }); |
| | | |
| | | //éæ©ç产çç»å¼¹çª |
| | | form.on('submit(ProductionTeam-BT)', function () {//éæ©ç产çç» |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æ¬ç«å·¥åº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_GetProductionTeamList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©çäº§èµæºå¼¹çª |
| | | form.on('submit(ProductionResources-BT)', function () {//çäº§èµæº |
| | | console.log($('#HProcNo').val()) |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'çäº§èµæº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_GetProductionResourcesList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©æä½äºº |
| | | form.on('submit(HEmployeeID-BT)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'èåå表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_EmployeeList.html?Type=HWorker', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©æµæ°´å·å¼¹çª |
| | | form.on('submit(SerialNum-BT)', function () {//çäº§èµæº |
| | | var value = $("#lngProcInterID").val(); |
| | | // 夿æ¯å¦å·²ç»è¾å
¥æµæ°´å·ï¼æ¯åå¼¹åºæ¨¡ææ¡ï¼å¦åç»åºæç¤º |
| | | if (value) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æµæ°´å·' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: [`../../../Baseset/åºç¡èµæ/Gy_GetProcNoList.html?HInterID=${value}`, 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | , end: function () { |
| | | var sProcNo = $('#HProcNo').val(); |
| | | var sBillNo = $('#HMainSourceBillNo').val(); |
| | | if (sProcNo != "") { |
| | | txtHProcNo_KeyDown(sBillNo, sProcNo); |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | layer.alert('请æ¨ç¡®è®¤è¾å
¥æµè½¬å¡å·åéè¯^_^', { icon: 7 }); |
| | | } |
| | | }); |
| | | |
| | | //éæ©é¨é¨å¼¹çª |
| | | form.on('submit(btnHDept)', function () {//é¨é¨ |
| | | layer.open({ |
| | | type: 2 //ç±»å |
| | | , skin: 'layui-layer-rim'//å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'é¨é¨å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , 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('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID); |
| | | $("#HDeptName").val(checkStatus.data[0].HName); |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éåº--å
¨å±ç |
| | | form.on('submit(Cancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.location.href = "../../../../views/index_Mobile.html"; |
| | | }); |
| | | }) |
| | | |
| | | //æ°å¢ |
| | | form.on('submit(Add)', function () { |
| | | var index = parent.layer.getFrameIndex(window.name); // å
å¾å°å½å iframe å±çç´¢å¼ |
| | | parent.layer.close(index); // åæ§è¡å
³é |
| | | }) |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | | |
| | | //#region éè¿ç»å½ç¨æ·è·åé»è®¤å¼ |
| | | function GetDefValByUser() { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cj_StationInBill/GetDefValByUser", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "Czybm": sessionStorage["Czybm"], "Czymc": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | var data = result.data[0]; |
| | | |
| | | form.val("formData", { |
| | | //"HSourceID": data.HSourceID, |
| | | //"HSourceName": data.çäº§èµæºåç§°, |
| | | "HGroupID": data.HGroupID, |
| | | "HGroupName": data.ç产çç»åç§°, |
| | | "HEmpID": data.HEmpID, |
| | | "HEmpName": data.æä½ååç§° |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | , error: function () { |
| | | layer.close(index); |
| | | layer.msg("æ¥å£è¯·æ±å¤±è´¥"); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | function txtHBarCode_KeyDown(HBarCode) { |
| | | var ajaxLoad = layer.load(); |
| | | var sql = "select * from Sc_ICMOBillStatus_Tmp where HICMOBillNo = '" + HBarCode + "'" ; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sql }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | HSourceInterID = data1.data[0].HInterID; |
| | | HSourceEntryID = data1.data[0].HICMOEntryID; |
| | | HSourceBillNo = HBarCode; |
| | | HSourceBillType = data1.data[0].HBillType; |
| | | } else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }); |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID; |
| | | |
| | | $("#HProcID").val(LoadData[0].HProcID); //å½åå·¥åºID |
| | | $("#HProcName").val(LoadData[0].HProcName); //å½åå·¥åº |
| | | $("#HMaterID").val(LoadData[0].HMaterID); //产åID |
| | | $("#HMaterCode").val(LoadData[0].HMaterNumber); //产å代ç |
| | | $("#HMaterName").val(LoadData[0].HMaterName); //产ååç§° |
| | | $("#HMaterSpec").val(LoadData[0].HModel); //产åè§æ ¼ |
| | | $("#HSourceID").val(LoadData[0].HSourceID); //çäº§èµæºID |
| | | $("#HSourceName").val(LoadData[0].HSourceName); //çäº§èµæº |
| | | $("#HMainSourceBillNo").val(LoadData[0].HICMOBillNo); //æºååå·ï¼ææ¶åå¼è®¢åç¼å·ï¼ |
| | | $("#HMainSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç (åå¼HInterID) |
| | | $("#HMainSourceEntryID").val(LoadData[0].HSourceEntryID); //æºååå
ç (æºåè¡å·) |
| | | $("#HMainSourceBillType").val(HSourceBillType); //æºåç±»å |
| | | $("#HDeptID").val(LoadData[0].HDeptID); //车é´ID |
| | | $("#HDeptName").val(LoadData[0].HDeptName); //è½¦é´ |
| | | $("#HICMOInterID").val(LoadData[0].HICMOInterID); //ç产订åID |
| | | $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //ç产订ååID |
| | | $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //ç产订å |
| | | //HCenterID = LoadData[0].HCenterID == null ? sessionStorage["HWorkCenterID"] : LoadData[0].HCenterID;//å·¥ä½ä¸å¿id |
| | | layer.close(ajaxLoad); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }); |
| | | } |
| | | //æµæ°´å·åè½¦æ¹æ³ |
| | | function txtHProcNo_KeyDown(sBillNo, sProcNo) { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cj_StationInBill/txtHProcNo_KeyDown", |
| | | type: "GET", |
| | | data: { "sBillNo": sBillNo, "sProcNo": sProcNo }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | var data = result.data[0]; |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HProcName": data.å·¥åº, |
| | | "HProcID": data.HProcID, |
| | | "HSourceID": data.HSourceID, |
| | | "HSourceName": data.çäº§èµæº |
| | | }); |
| | | $("#HProcNo").attr("readonly", "readonly"); |
| | | $("#HProcNo").css("background-color", "#efefef4d"); |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(result.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 SaveVerify() { |
| | | var InterID = $("#HInterID").val(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESStopWorkBill/AuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | //layer.close(layer.index); |
| | | //window.parent.location.reload(); |
| | | }); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }) |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //ææºåæ°å¢ |
| | | function set_AddNew() { |
| | | //åå§åºæ¬ä¿¡æ¯èµå¼ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | $("#HStopBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")) //å¼å§æ¶é´ |
| | | $("#HStopEndWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")) //æé¢è®¡ç»ææ¶é´ |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //å¶åæ¥æ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å¶å人 |
| | | |
| | | |
| | | //å æºåç±»ååºå(å¯ä»¥åä¸åçæ¹æ³) |
| | | $('#HProcName').attr("disabled", true); |
| | | $('#HStopBeginWorkTime').attr("disabled", true); |
| | | $('#HSourceName').attr("disabled", true); |
| | | $('#ProductionResources-BT').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HMainSourceBillNo').attr("disabled", true); |
| | | $('#HICMOBillNo').attr("disabled", true); |
| | | $('#HDeptName').attr("disabled", true); |
| | | $('#btnHDept').addClass("layui-btn-disabled").attr("disabled", true); |
| | | |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HBillType |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID; |
| | | |
| | | $("#HProcID").val(LoadData[0].HProcID); //å½åå·¥åºID |
| | | $("#HProcName").val(LoadData[0].HProcName); //å½åå·¥åº |
| | | $("#HMaterID").val(LoadData[0].HMaterID); //产åID |
| | | $("#HMaterNumber").val(LoadData[0].HMaterNumber); //产å代ç |
| | | $("#HMaterName").val(LoadData[0].HMaterName); //产ååç§° |
| | | $("#HSourceID").val(LoadData[0].HSourceID); //çäº§èµæºID |
| | | $("#HSourceName").val(LoadData[0].HSourceName); //çäº§èµæº |
| | | $("#HMainSourceBillNo").val(LoadData[0].HICMOBillNo); //æºååå·ï¼ææ¶åå¼è®¢åç¼å·ï¼ |
| | | $("#HMainSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç (åå¼HInterID) |
| | | $("#HMainSourceEntryID").val(LoadData[0].HSourceEntryID); //æºååå
ç (æºåè¡å·) |
| | | $("#HMainSourceBillType").val(HSourceBillType); //æºåç±»å |
| | | $("#HDeptID").val(LoadData[0].HDeptID); //车é´ID |
| | | $("#HDeptName").val(LoadData[0].HDeptName); //è½¦é´ |
| | | $("#HICMOInterID").val(LoadData[0].HICMOInterID); //ç产订åID |
| | | $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //ç产订ååID |
| | | $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //ç产订å |
| | | //HCenterID = LoadData[0].HCenterID == null ? sessionStorage["HWorkCenterID"] : LoadData[0].HCenterID;//å·¥ä½ä¸å¿id |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | }); |
| | | //è¿åæµæ°´å· |
| | | function GetProcNoValue(obj) { |
| | | $("#HProcNo").val(obj[0].æµæ°´å·); |
| | | } |
| | | |
| | | //è¿åç产çç» |
| | | function GetProductionTeamValue(obj) { |
| | | $("#HGroupName").val(obj[0].çç»); |
| | | $("#HGroupID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | //è¿åçäº§èµæº |
| | | function GetProductionResourcesValue(obj) { |
| | | $("#HSourceName").val(obj[0].çäº§èµæº); |
| | | $("#HSourceID").val(obj[0].HItemID); |
| | | } |
| | | //è¿åæä½å |
| | | function GetHWorkerValue(obj) { |
| | | $("#HEmpName").val(obj[0].HName); |
| | | $("#HEmpID").val(obj[0].HItemID); |
| | | } |
| | | //è¿åå½åå·¥åº |
| | | function GetHProcValue(obj) { //è¿åå½åå·¥åº |
| | | $("#HProcName").val(obj[0].å·¥åº); |
| | | $("#HProcID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title class="sckgd">ç产å®å·¥å</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <!--å¼ç¨layuiæ ·å¼æä»¶--> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all"> |
| | | <!--å¼ç¨layui jsæä»¶--> |
| | | <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> |
| | | .layui-form-label { |
| | | font-size: 14px; |
| | | width: 85px; |
| | | text-align: inherit; |
| | | } |
| | | /*å
¨å±è®¾ç½®è¾å
¥æ¡é«åº¦*/ |
| | | .layui-input { |
| | | height: 30px; |
| | | } |
| | | /*设置表头è¾å
¥æ¡*/ |
| | | .t1_input { |
| | | padding: 1%; |
| | | } |
| | | /*æ¬ç«ä¿¡æ¯td*/ |
| | | .bz_td { |
| | | display: -webkit-box; /*设置æé®ä¸æ¢è¡*/ |
| | | padding: 1%; /*设置è¾å
¥æ¡è¾¹è·*/ |
| | | } |
| | | /*设置æ¬ç«ä¿¡æ¯æé®é«åº¦*/ |
| | | .bz_btu { |
| | | height: 30px; |
| | | width: 60px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | th { |
| | | width: 70px; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="formData" id="formData" style="background-color:white;"> |
| | | <div style="background-color:#0085E8;"> |
| | | <span style="color: white;" class="jzd"><i class="layui-icon layui-icon-form"></i>ç产å®å·¥å</span> |
| | | </div> |
| | | <div class="layui-form-item" style="margin: 1% 2%;text-align: right;"> |
| | | <button type="button" lay-submit="" lay-filter="Add" class="layui-btn layui-btn-radius">æ°å¢</button> |
| | | <button type="button" lay-submit="" lay-filter="Saver" id="Saver" class="layui-btn layui-btn-radius">ä¿å</button> |
| | | <button type="button" lay-submit="" lay-filter="Cancel" class="layui-btn layui-btn-radius layui-btn-danger">éåº</button> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>æ¡å½¢ç </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarCode" class="layui-input" id="HBarCode" placeholder="请è¾å
¥æ¡å½¢ç åå车" style="border-radius: 50px;" disabled> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu layui-btn-radius" lay-filter="QueDin" style="line-height: 30px;">ç¡®å®</button> |
| | | </td> |
| | | </tr> |
| | | <!--<tr> |
| | | <th>设å¤</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HEquipName" class="layui-input" id="HEquipName" placeholder="è¯·æ«æè®¾å¤äºç»´ç " style="border-radius: 50px;"> |
| | | <input type="hidden" name="HEquipID" id="HEquipID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr>--> |
| | | <tr> |
| | | <th>æºååå·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" class="layui-input" value="" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç产订å</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HICMOBillNo" id="HICMOBillNo" class="layui-input" value="" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HICMOInterID" id="HICMOInterID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>çäº§èµæº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HSourceName" class="layui-input" id="HSourceName" placeholder="éæ©çäº§èµæº" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HSourceID" id="HSourceID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | |
| | | <!--<tr> |
| | | <th>æµæ°´å·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HProcNo" class="layui-input" id="HProcNo" placeholder="éæ©æµæ°´å·" style="background-color:#efefef4d;border-radius: 50px;"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="SerialNum-BT" id="SerialNum-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å½åå·¥åº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HProcName" class="layui-input" id="HProcName" placeholder="å½åå·¥åº" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HProcID" id="HProcID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr>--> |
| | | <tr> |
| | | <th>产å代ç </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaterNumber" class="layui-input" id="HMaterNumber" placeholder="产å代ç " style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>产ååç§°</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaterName" class="layui-input" id="HMaterName" placeholder="产ååç§°" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HMaterID" id="HMaterID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®å·¥æ¶é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HEndWorkTime" class="layui-input" id="HEndWorkTime" style="border-radius: 50px;" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç产çç»</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HGroupName" class="layui-input" id="HGroupName" placeholder="éæ©ç产çç»" style="background-color:#efefef4d;border-radius: 50px;"> |
| | | <input type="hidden" name="HGroupID" id="HGroupID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionTeam-BT" id="ProductionTeam-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æä½å</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HEmpName" class="layui-input" id="HEmpName" placeholder="éæ©æ¥æ¶äºº" style="background-color:#efefef4d;border-radius: 50px;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="HEmployeeID-BT" id="HEmployeeID-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>车é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeptName" class="layui-input set_height" id="HDeptName" placeholder="éæ©è½¦é´" style="border-radius: 50px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" value="0" autocomplete="off" class="layui-input set_height"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnHDept" id="btnHDept" style="font-weight:bolder;">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>çäº§çæ¬¡</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HWorkShiftName" class="layui-input set_height" id="HWorkShiftName" placeholder="éæ©çæ¬¡" style="border-radius: 50px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HWorkShiftID" id="HWorkShiftID" value="0" autocomplete="off" class="layui-input set_height"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnHWorkShift" id="btnHWorkShift" style="font-weight:bolder;">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®æ¥æ</th> |
| | | <td class="t1_input"> |
| | | <input type="text" name="HDate" class="layui-input" id="HDate" style="border-radius: 50px;" placeholder="è¯·éæ©æ¥æ" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®å·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBillNo" class="layui-input" id="HBillNo" placeholder="åæ®å·" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>å¶å人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaker" class="layui-input" id="HMaker" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å¶åæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMakeDate" class="layui-input" id="HMakeDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDater" class="layui-input" id="HUpDater" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDateDate" class="layui-input" id="HUpDateDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HChecker" class="layui-input" id="HChecker" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCheckDate" class="layui-input" id="HCheckDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å
³é人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCloseMan" class="layui-input" id="HCloseMan" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å
³éæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCloseDate" class="layui-input" id="HCloseDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºäºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteMan" class="layui-input" id="HDeleteMan" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteDate" class="layui-input" id="HDeleteDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">åæ®ä¿¡æ¯</li> |
| | | <li>å¶åä¿¡æ¯</li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | <!--éèåæ®µ--> |
| | | <input type="hidden" name="lngProcInterID" id="lngProcInterID"> |
| | | <input type="hidden" name="lngBillKey" id="lngBillKey" value="0"> |
| | | <input type="hidden" name="lngBillSubKey" id="lngBillSubKey" value="0"> |
| | | <!--<input type="hidden" name="HMaker" id="HMaker">--><!--å¶å人--> |
| | | <input type="hidden" name="eventType" id="eventType" value="Add"> |
| | | <input type="hidden" name="HeqSouID" id="HeqSouID" value="0"> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | var HBillType = ""; //åæ®ç±»å |
| | | var HSourceInterID = ""; //æºå主å
ç |
| | | var HSourceEntryID = ""; //æºååå
ç |
| | | var HSourceBillNo = ""; //æºååå· |
| | | var HSourceBillType = ""; //æºåç±»å |
| | | //è·å页é¢è·³è½¬åæ° //åæ®ç¼è¾ç¶æï¼ 1.æ æºåæ°å¢Â  2.ææºåæ°å¢Â  3.ç¼è¾Â 4.æµè§Â 5.åæ´ |
| | | 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 HSBillType = params[params[2]];//æºåç±»å |
| | | } |
| | | |
| | | var edit = function (data) { |
| | | HBillType = data[0].HBillType; |
| | | HSourceInterID = data[0].HSourceInterID; |
| | | HSourceEntryID = data[0].HSourceEntryID; |
| | | HSourceBillNo = data[0].HSourceBillNo; |
| | | HSourceBillType = data[0].HSourceBillType; |
| | | |
| | | } |
| | | layui.config({ |
| | | base: '../../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element','upload'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | //æµè½¬å¡æ¯å¦æ«ææ è®° |
| | | var HProcExchBillNoFlag = false; |
| | | //å è½½æ¶é´æ§ä»¶ |
| | | laydate.render({ |
| | | elem: '#HEndWorkTime' |
| | | , type: 'datetime' |
| | | }); |
| | | //夿æ¯å¦æ°å¢ |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 5) { |
| | | //è·åæå¤§åæ®å· |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3788' }, |
| | | success: function (d) { |
| | | $("#HInterID").val(0); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | , error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.msg("è·ååæ®å·å¤±è´¥ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | }); |
| | | |
| | | GetDefValByUser(); |
| | | set_AddNew(); |
| | | } |
| | | |
| | | //è¿å
¥é¡µé¢é»è®¤å
æ 卿¡å½¢ç ä¸ |
| | | $("#HBarCode").focus(); |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //#region ç¡®å®æé® |
| | | form.on('submit(QueDin)', function (data) {// |
| | | var HBarCode = $('#HBarCode').val(); |
| | | |
| | | if (!HBarCode) { |
| | | layer.msg("æ¡å½¢ç ä¸è½ä¸ºç©ºï¼") |
| | | return; |
| | | } |
| | | txtHBarCode_KeyDown(HBarCode); |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æ°å¢æé® |
| | | form.on('submit(Add)', function () {//æäº¤ |
| | | layer.confirm('æ°å¢å页颿°æ®å°æ¶å¤±ï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | location.replace('Sc_MESBeginWorkBillList_PDA.html?type=' + params[params[0]]); |
| | | }); |
| | | }) |
| | | //#endregion |
| | | |
| | | //#region ä¿åæé® |
| | | form.on('submit(Saver)', function (data) {//æäº¤ |
| | | var refSav = ""; |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 5) { |
| | | refSav = "Add"; |
| | | } else { |
| | | refSav = "Update"; |
| | | } |
| | | if ($("#HSourceID").val() == '' || $("#HSourceID").val() == null || $("#HSourceID").val() == 0) { |
| | | layer.msg("çäº§èµæºä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HMainSourceInterID").val() == '' || $("#HMainSourceInterID").val() == null || $("#HMainSourceInterID").val() == 0) { |
| | | layer.msg("æºååå·ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HEmpID").val() == '' || $("#HEmpID").val() == null||$("#HEmpID").val() == '0') { |
| | | layer.msg("æä½åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null || $("#HGroupID").val() == '0') { |
| | | layer.msg("çç»ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null || $("#HDeptID").val() == '0') { |
| | | layer.msg("车é´ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HICMOInterID").val() == '' || $("#HICMOInterID").val() == null || $("#HICMOInterID").val() == '0') { |
| | | layer.msg("ç产订åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | |
| | | var msg = JSON.stringify(data.field) + ";" + sessionStorage["HUserName"] + ";" + refSav; |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_MESEndWorkBill/SaveGetMESEndFrom", |
| | | async: true, |
| | | data: { "msg": msg }, |
| | | dataType: "json", |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);//ç¦ç¨ä¿åæé® |
| | | $("#HInterID").val(result.HInterID);//è·åæäº¤æåè¿åç忮䏻ID |
| | | layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | if (result.Verify == "Y") //èªå¨å®¡æ ¸ |
| | | { |
| | | layer.close(index); |
| | | SaveVerify(); //å®¡æ ¸ |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(result.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: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | $('#HBarCode').on('keydown', function (event) { |
| | | var HBarCode = $('#HBarCode').val(); |
| | | if (event.keyCode == 13) { |
| | | if (!HBarCode) { |
| | | layer.msg("空ç½ç ,æ¡å½¢ç ä¸è½ä¸ºç©ºï¼") |
| | | return; |
| | | } |
| | | txtHBarCode_KeyDown(HBarCode); |
| | | } |
| | | }); |
| | | //æµæ°´å·ï¼å·¥åºå·ï¼åè½¦æ¹æ³ |
| | | $('#HProcNo').on('keydown', function (event) { |
| | | var sProcNo = $('#HProcNo').val(); |
| | | var sBillNo = $('#HMainSourceBillNo').val(); |
| | | if (event.keyCode == 13) { |
| | | if (!HProcExchBillNoFlag) { |
| | | layer.msg("æµè½¬å¡æ²¡ææ«æï¼æè
没ææå车é®ï¼è¯·æ«ææµè½¬å¡æè
卿µè½¬å¡ææ¬æ¡ä¸æå车é®ï¼"); |
| | | return; |
| | | } |
| | | txtHProcNo_KeyDown(sBillNo, sProcNo); |
| | | } |
| | | }); |
| | | |
| | | //éæ©ç产çç»å¼¹çª |
| | | form.on('submit(ProductionTeam-BT)', function () {//éæ©ç产çç» |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æ¬ç«å·¥åº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_GetProductionTeamList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©çäº§èµæºå¼¹çª |
| | | form.on('submit(ProductionResources-BT)', function () {//çäº§èµæº |
| | | console.log($('#HProcNo').val()) |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'çäº§èµæº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_GetProductionResourcesList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©æä½äºº |
| | | form.on('submit(HEmployeeID-BT)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'èåå表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_EmployeeList.html?Type=HWorker', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©æµæ°´å·å¼¹çª |
| | | form.on('submit(SerialNum-BT)', function () {//çäº§èµæº |
| | | var value = $("#lngProcInterID").val(); |
| | | // 夿æ¯å¦å·²ç»è¾å
¥æµæ°´å·ï¼æ¯åå¼¹åºæ¨¡ææ¡ï¼å¦åç»åºæç¤º |
| | | if (value) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æµæ°´å·' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: [`../../../Baseset/åºç¡èµæ/Gy_GetProcNoList.html?HInterID=${value}`, 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | , end: function () { |
| | | var sProcNo = $('#HProcNo').val(); |
| | | var sBillNo = $('#HMainSourceBillNo').val(); |
| | | if (sProcNo != "") { |
| | | txtHProcNo_KeyDown(sBillNo, sProcNo); |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | layer.alert('请æ¨ç¡®è®¤è¾å
¥æµè½¬å¡å·åéè¯^_^', { icon: 7 }); |
| | | } |
| | | }); |
| | | |
| | | //éæ©é¨é¨å¼¹çª |
| | | form.on('submit(btnHDept)', function () {//é¨é¨ |
| | | layer.open({ |
| | | type: 2 //ç±»å |
| | | , skin: 'layui-layer-rim'//å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'é¨é¨å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , 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('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID); |
| | | $("#HDeptName").val(checkStatus.data[0].HName); |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éåº--å
¨å±ç |
| | | form.on('submit(Cancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.location.href = "../../../../views/index_Mobile.html"; |
| | | }); |
| | | }) |
| | | |
| | | //æ°å¢ |
| | | form.on('submit(Add)', function () { |
| | | var index = parent.layer.getFrameIndex(window.name); // å
å¾å°å½å iframe å±çç´¢å¼ |
| | | parent.layer.close(index); // åæ§è¡å
³é |
| | | }) |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | | |
| | | //#region éè¿ç»å½ç¨æ·è·åé»è®¤å¼ |
| | | function GetDefValByUser() { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cj_StationInBill/GetDefValByUser", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "Czybm": sessionStorage["Czybm"], "Czymc": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | var data = result.data[0]; |
| | | |
| | | form.val("formData", { |
| | | //"HSourceID": data.HSourceID, |
| | | //"HSourceName": data.çäº§èµæºåç§°, |
| | | "HGroupID": data.HGroupID, |
| | | "HGroupName": data.ç产çç»åç§°, |
| | | "HEmpID": data.HEmpID, |
| | | "HEmpName": data.æä½ååç§° |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | , error: function () { |
| | | layer.close(index); |
| | | layer.msg("æ¥å£è¯·æ±å¤±è´¥"); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | function txtHBarCode_KeyDown(HBarCode) { |
| | | var ajaxLoad = layer.load(); |
| | | var sql = "select * from Sc_ICMOBillStatus_Tmp where HICMOBillNo = '" + HBarCode + "'" ; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sql }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | HSourceInterID = data1.data[0].HInterID; |
| | | HSourceEntryID = data1.data[0].HICMOEntryID; |
| | | HSourceBillNo = HBarCode; |
| | | HSourceBillType = data1.data[0].HBillType; |
| | | } else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }); |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID; |
| | | |
| | | $("#HProcID").val(LoadData[0].HProcID); //å½åå·¥åºID |
| | | $("#HProcName").val(LoadData[0].HProcName); //å½åå·¥åº |
| | | $("#HMaterID").val(LoadData[0].HMaterID); //产åID |
| | | $("#HMaterCode").val(LoadData[0].HMaterNumber); //产å代ç |
| | | $("#HMaterName").val(LoadData[0].HMaterName); //产ååç§° |
| | | $("#HMaterSpec").val(LoadData[0].HModel); //产åè§æ ¼ |
| | | $("#HSourceID").val(LoadData[0].HSourceID); //çäº§èµæºID |
| | | $("#HSourceName").val(LoadData[0].HSourceName); //çäº§èµæº |
| | | $("#HMainSourceBillNo").val(LoadData[0].HICMOBillNo); //æºååå·ï¼ææ¶åå¼è®¢åç¼å·ï¼ |
| | | $("#HMainSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç (åå¼HInterID) |
| | | $("#HMainSourceEntryID").val(LoadData[0].HSourceEntryID); //æºååå
ç (æºåè¡å·) |
| | | $("#HMainSourceBillType").val(HSourceBillType); //æºåç±»å |
| | | $("#HDeptID").val(LoadData[0].HDeptID); //车é´ID |
| | | $("#HDeptName").val(LoadData[0].HDeptName); //è½¦é´ |
| | | $("#HICMOInterID").val(LoadData[0].HICMOInterID); //ç产订åID |
| | | $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //ç产订ååID |
| | | $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //ç产订å |
| | | //HCenterID = LoadData[0].HCenterID == null ? sessionStorage["HWorkCenterID"] : LoadData[0].HCenterID;//å·¥ä½ä¸å¿id |
| | | layer.close(ajaxLoad); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }); |
| | | } |
| | | //æµæ°´å·åè½¦æ¹æ³ |
| | | function txtHProcNo_KeyDown(sBillNo, sProcNo) { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cj_StationInBill/txtHProcNo_KeyDown", |
| | | type: "GET", |
| | | data: { "sBillNo": sBillNo, "sProcNo": sProcNo }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | var data = result.data[0]; |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HProcName": data.å·¥åº, |
| | | "HProcID": data.HProcID, |
| | | "HSourceID": data.HSourceID, |
| | | "HSourceName": data.çäº§èµæº |
| | | }); |
| | | $("#HProcNo").attr("readonly", "readonly"); |
| | | $("#HProcNo").css("background-color", "#efefef4d"); |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(result.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 SaveVerify() { |
| | | var InterID = $("#HInterID").val(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESEndWorkBill/AuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | //layer.close(layer.index); |
| | | //window.parent.location.reload(); |
| | | }); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }) |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //ææºåæ°å¢ |
| | | function set_AddNew() { |
| | | //åå§åºæ¬ä¿¡æ¯èµå¼ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | $("#HEndWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")) //å¼å§æ¶é´ |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //å¶åæ¥æ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å¶å人 |
| | | |
| | | |
| | | //å æºåç±»ååºå(å¯ä»¥åä¸åçæ¹æ³) |
| | | $('#HProcName').attr("disabled", true); |
| | | $('#HSourceName').attr("disabled", true); |
| | | $('#ProductionResources-BT').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HMainSourceBillNo').attr("disabled", true); |
| | | $('#HICMOBillNo').attr("disabled", true); |
| | | $('#HDeptName').attr("disabled", true); |
| | | $('#btnHDept').addClass("layui-btn-disabled").attr("disabled", true); |
| | | |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HBillType |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID; |
| | | |
| | | $("#HProcID").val(LoadData[0].HProcID); //å½åå·¥åºID |
| | | $("#HProcName").val(LoadData[0].HProcName); //å½åå·¥åº |
| | | $("#HMaterID").val(LoadData[0].HMaterID); //产åID |
| | | $("#HMaterNumber").val(LoadData[0].HMaterNumber); //产å代ç |
| | | $("#HMaterName").val(LoadData[0].HMaterName); //产ååç§° |
| | | $("#HSourceID").val(LoadData[0].HSourceID); //çäº§èµæºID |
| | | $("#HSourceName").val(LoadData[0].HSourceName); //çäº§èµæº |
| | | $("#HMainSourceBillNo").val(LoadData[0].HICMOBillNo); //æºååå·ï¼ææ¶åå¼è®¢åç¼å·ï¼ |
| | | $("#HMainSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç (åå¼HInterID) |
| | | $("#HMainSourceEntryID").val(LoadData[0].HSourceEntryID); //æºååå
ç (æºåè¡å·) |
| | | $("#HMainSourceBillType").val(HSourceBillType); //æºåç±»å |
| | | $("#HDeptID").val(LoadData[0].HDeptID); //车é´ID |
| | | $("#HDeptName").val(LoadData[0].HDeptName); //è½¦é´ |
| | | $("#HICMOInterID").val(LoadData[0].HICMOInterID); //ç产订åID |
| | | $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //ç产订ååID |
| | | $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //ç产订å |
| | | //HCenterID = LoadData[0].HCenterID == null ? sessionStorage["HWorkCenterID"] : LoadData[0].HCenterID;//å·¥ä½ä¸å¿id |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | }); |
| | | //è¿åæµæ°´å· |
| | | function GetProcNoValue(obj) { |
| | | $("#HProcNo").val(obj[0].æµæ°´å·); |
| | | } |
| | | |
| | | //è¿åç产çç» |
| | | function GetProductionTeamValue(obj) { |
| | | $("#HGroupName").val(obj[0].çç»); |
| | | $("#HGroupID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | //è¿åçäº§èµæº |
| | | function GetProductionResourcesValue(obj) { |
| | | $("#HSourceName").val(obj[0].çäº§èµæº); |
| | | $("#HSourceID").val(obj[0].HItemID); |
| | | } |
| | | //è¿åæä½å |
| | | function GetHWorkerValue(obj) { |
| | | $("#HEmpName").val(obj[0].HName); |
| | | $("#HEmpID").val(obj[0].HItemID); |
| | | } |
| | | //è¿åå½åå·¥åº |
| | | function GetHProcValue(obj) { //è¿åå½åå·¥åº |
| | | $("#HProcName").val(obj[0].å·¥åº); |
| | | $("#HProcID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title class="sckgd">ç产å¼å·¥å</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <!--å¼ç¨layuiæ ·å¼æä»¶--> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all"> |
| | | <!--å¼ç¨layui jsæä»¶--> |
| | | <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> |
| | | .layui-form-label { |
| | | font-size: 14px; |
| | | width: 85px; |
| | | text-align: inherit; |
| | | } |
| | | /*å
¨å±è®¾ç½®è¾å
¥æ¡é«åº¦*/ |
| | | .layui-input { |
| | | height: 30px; |
| | | } |
| | | /*设置表头è¾å
¥æ¡*/ |
| | | .t1_input { |
| | | padding: 1%; |
| | | } |
| | | /*æ¬ç«ä¿¡æ¯td*/ |
| | | .bz_td { |
| | | display: -webkit-box; /*设置æé®ä¸æ¢è¡*/ |
| | | padding: 1%; /*设置è¾å
¥æ¡è¾¹è·*/ |
| | | } |
| | | /*设置æ¬ç«ä¿¡æ¯æé®é«åº¦*/ |
| | | .bz_btu { |
| | | height: 30px; |
| | | width: 60px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | th { |
| | | width: 70px; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="formData" id="formData" style="background-color:white;"> |
| | | <div style="background-color:#0085E8;"> |
| | | <span style="color: white;" class="jzd"><i class="layui-icon layui-icon-form"></i>ç产å¼å·¥å</span> |
| | | </div> |
| | | <div class="layui-form-item" style="margin: 1% 2%;text-align: right;"> |
| | | <button type="button" lay-submit="" lay-filter="Add" class="layui-btn layui-btn-radius">æ°å¢</button> |
| | | <button type="button" lay-submit="" lay-filter="Saver" id="Saver" class="layui-btn layui-btn-radius">ä¿å</button> |
| | | <button type="button" lay-submit="" lay-filter="Cancel" class="layui-btn layui-btn-radius layui-btn-danger">éåº</button> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>æ¡å½¢ç </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarCode" class="layui-input" id="HBarCode" placeholder="请è¾å
¥æ¡å½¢ç åå车" style="border-radius: 50px;" disabled> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu layui-btn-radius" lay-filter="QueDin" style="line-height: 30px;">ç¡®å®</button> |
| | | </td> |
| | | </tr> |
| | | <!--<tr> |
| | | <th>设å¤</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HEquipName" class="layui-input" id="HEquipName" placeholder="è¯·æ«æè®¾å¤äºç»´ç " style="border-radius: 50px;"> |
| | | <input type="hidden" name="HEquipID" id="HEquipID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr>--> |
| | | <tr> |
| | | <th>æºååå·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" class="layui-input" value="" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç产订å</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HICMOBillNo" id="HICMOBillNo" class="layui-input" value="" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HICMOInterID" id="HICMOInterID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" class="layui-input" value="0" style="border-radius: 50px;"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>çäº§èµæº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HSourceName" class="layui-input" id="HSourceName" placeholder="éæ©çäº§èµæº" style="border-radius: 50px;"> |
| | | <input type="hidden" name="HSourceID" id="HSourceID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | |
| | | <!--<tr> |
| | | <th>æµæ°´å·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HProcNo" class="layui-input" id="HProcNo" placeholder="éæ©æµæ°´å·" style="background-color:#efefef4d;border-radius: 50px;"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="SerialNum-BT" id="SerialNum-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å½åå·¥åº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HProcName" class="layui-input" id="HProcName" placeholder="å½åå·¥åº" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HProcID" id="HProcID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr>--> |
| | | <tr> |
| | | <th>产å代ç </th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaterNumber" class="layui-input" id="HMaterNumber" placeholder="产å代ç " style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>产ååç§°</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaterName" class="layui-input" id="HMaterName" placeholder="产ååç§°" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HMaterID" id="HMaterID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å¼å·¥æ¶é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBeginWorkTime" class="layui-input" id="HBeginWorkTime" style="border-radius: 50px;" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ç产çç»</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HGroupName" class="layui-input" id="HGroupName" placeholder="éæ©ç产çç»" style="background-color:#efefef4d;border-radius: 50px;"> |
| | | <input type="hidden" name="HGroupID" id="HGroupID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="ProductionTeam-BT" id="ProductionTeam-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æä½å</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HEmpName" class="layui-input" id="HEmpName" placeholder="éæ©æ¥æ¶äºº" style="background-color:#efefef4d;border-radius: 50px;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" value="0" autocomplete="off" class="layui-input"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="HEmployeeID-BT" id="HEmployeeID-BT" style="font-weight:bolder">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>车é´</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeptName" class="layui-input set_height" id="HDeptName" placeholder="éæ©è½¦é´" style="border-radius: 50px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" value="0" autocomplete="off" class="layui-input set_height"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnHDept" id="btnHDept" style="font-weight:bolder;">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>çäº§çæ¬¡</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HWorkShiftName" class="layui-input set_height" id="HWorkShiftName" placeholder="éæ©çæ¬¡" style="border-radius: 50px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HWorkShiftID" id="HWorkShiftID" value="0" autocomplete="off" class="layui-input set_height"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnHWorkShift" id="btnHWorkShift" style="font-weight:bolder;">...</button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®æ¥æ</th> |
| | | <td class="t1_input"> |
| | | <input type="text" name="HDate" class="layui-input" id="HDate" style="border-radius: 50px;" placeholder="è¯·éæ©æ¥æ" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>åæ®å·</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBillNo" class="layui-input" id="HBillNo" placeholder="åæ®å·" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0" autocomplete="off" class="layui-input"> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table style="width:80%;"> |
| | | <tbody> |
| | | <tr> |
| | | <th>å¶å人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMaker" class="layui-input" id="HMaker" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å¶åæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMakeDate" class="layui-input" id="HMakeDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDater" class="layui-input" id="HUpDater" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä¿®æ¹æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HUpDateDate" class="layui-input" id="HUpDateDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸äºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HChecker" class="layui-input" id="HChecker" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å®¡æ ¸æ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCheckDate" class="layui-input" id="HCheckDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å
³é人</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCloseMan" class="layui-input" id="HCloseMan" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>å
³éæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HCloseDate" class="layui-input" id="HCloseDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºäºº</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteMan" class="layui-input" id="HDeleteMan" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>ä½åºæ¥æ</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HDeleteDate" class="layui-input" id="HDeleteDate" style="border-radius: 50px;background-color:#efefef4d;" readonly> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">åæ®ä¿¡æ¯</li> |
| | | <li>å¶åä¿¡æ¯</li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | <!--éèåæ®µ--> |
| | | <input type="hidden" name="lngProcInterID" id="lngProcInterID"> |
| | | <input type="hidden" name="lngBillKey" id="lngBillKey" value="0"> |
| | | <input type="hidden" name="lngBillSubKey" id="lngBillSubKey" value="0"> |
| | | <!--<input type="hidden" name="HMaker" id="HMaker">--><!--å¶å人--> |
| | | <input type="hidden" name="eventType" id="eventType" value="Add"> |
| | | <input type="hidden" name="HeqSouID" id="HeqSouID" value="0"> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | var HBillType = ""; //åæ®ç±»å |
| | | var HSourceInterID = ""; //æºå主å
ç |
| | | var HSourceEntryID = ""; //æºååå
ç |
| | | var HSourceBillNo = ""; //æºååå· |
| | | var HSourceBillType = ""; //æºåç±»å |
| | | //è·å页é¢è·³è½¬åæ° //åæ®ç¼è¾ç¶æï¼ 1.æ æºåæ°å¢Â  2.ææºåæ°å¢Â  3.ç¼è¾Â 4.æµè§Â 5.åæ´ |
| | | 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 HSBillType = params[params[2]];//æºåç±»å |
| | | } |
| | | |
| | | var edit = function (data) { |
| | | HBillType = data[0].HBillType; |
| | | HSourceInterID = data[0].HSourceInterID; |
| | | HSourceEntryID = data[0].HSourceEntryID; |
| | | HSourceBillNo = data[0].HSourceBillNo; |
| | | HSourceBillType = data[0].HSourceBillType; |
| | | |
| | | } |
| | | layui.config({ |
| | | base: '../../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element','upload'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | //æµè½¬å¡æ¯å¦æ«ææ è®° |
| | | var HProcExchBillNoFlag = false; |
| | | //å è½½æ¶é´æ§ä»¶ |
| | | laydate.render({ |
| | | elem: '#HBeginWorkTime' |
| | | , type: 'datetime' |
| | | }); |
| | | //夿æ¯å¦æ°å¢ |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 5) { |
| | | //è·åæå¤§åæ®å· |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3787' }, |
| | | success: function (d) { |
| | | $("#HInterID").val(0); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | , error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.msg("è·ååæ®å·å¤±è´¥ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | }); |
| | | |
| | | GetDefValByUser(); |
| | | set_AddNew(); |
| | | } |
| | | |
| | | //è¿å
¥é¡µé¢é»è®¤å
æ 卿¡å½¢ç ä¸ |
| | | $("#HBarCode").focus(); |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //#region ç¡®å®æé® |
| | | form.on('submit(QueDin)', function (data) {// |
| | | var HBarCode = $('#HBarCode').val(); |
| | | |
| | | if (!HBarCode) { |
| | | layer.msg("æ¡å½¢ç ä¸è½ä¸ºç©ºï¼") |
| | | return; |
| | | } |
| | | txtHBarCode_KeyDown(HBarCode); |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æ°å¢æé® |
| | | form.on('submit(Add)', function () {//æäº¤ |
| | | layer.confirm('æ°å¢å页颿°æ®å°æ¶å¤±ï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | location.replace('Sc_MESBeginWorkBillList_PDA.html?type=' + params[params[0]]); |
| | | }); |
| | | }) |
| | | //#endregion |
| | | |
| | | //#region ä¿åæé® |
| | | form.on('submit(Saver)', function (data) {//æäº¤ |
| | | var refSav = ""; |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 5) { |
| | | refSav = "Add"; |
| | | } else { |
| | | refSav = "Update"; |
| | | } |
| | | if ($("#HSourceID").val() == '' || $("#HSourceID").val() == null || $("#HSourceID").val() == 0) { |
| | | layer.msg("çäº§èµæºä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HMainSourceInterID").val() == '' || $("#HMainSourceInterID").val() == null || $("#HMainSourceInterID").val() == 0) { |
| | | layer.msg("æºååå·ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HEmpID").val() == '' || $("#HEmpID").val() == null||$("#HEmpID").val() == '0') { |
| | | layer.msg("æä½åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null || $("#HGroupID").val() == '0') { |
| | | layer.msg("çç»ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null || $("#HDeptID").val() == '0') { |
| | | layer.msg("车é´ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HICMOInterID").val() == '' || $("#HICMOInterID").val() == null || $("#HICMOInterID").val() == '0') { |
| | | layer.msg("ç产订åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | |
| | | var msg = JSON.stringify(data.field) + ";" + "{};" + sessionStorage["HUserName"] + ";" + refSav; |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/SaveGetMESBeginWorkFrom", |
| | | async: true, |
| | | data: { "msg": msg }, |
| | | dataType: "json", |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);//ç¦ç¨ä¿åæé® |
| | | $("#HInterID").val(result.HInterID);//è·åæäº¤æåè¿åç忮䏻ID |
| | | layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | if (result.Verify == "Y") //èªå¨å®¡æ ¸ |
| | | { |
| | | layer.close(index); |
| | | SaveVerify(); //å®¡æ ¸ |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(result.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: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | $('#HBarCode').on('keydown', function (event) { |
| | | var HBarCode = $('#HBarCode').val(); |
| | | if (event.keyCode == 13) { |
| | | if (!HBarCode) { |
| | | layer.msg("空ç½ç ,æ¡å½¢ç ä¸è½ä¸ºç©ºï¼") |
| | | return; |
| | | } |
| | | txtHBarCode_KeyDown(HBarCode); |
| | | } |
| | | }); |
| | | //æµæ°´å·ï¼å·¥åºå·ï¼åè½¦æ¹æ³ |
| | | $('#HProcNo').on('keydown', function (event) { |
| | | var sProcNo = $('#HProcNo').val(); |
| | | var sBillNo = $('#HMainSourceBillNo').val(); |
| | | if (event.keyCode == 13) { |
| | | if (!HProcExchBillNoFlag) { |
| | | layer.msg("æµè½¬å¡æ²¡ææ«æï¼æè
没ææå车é®ï¼è¯·æ«ææµè½¬å¡æè
卿µè½¬å¡ææ¬æ¡ä¸æå车é®ï¼"); |
| | | return; |
| | | } |
| | | txtHProcNo_KeyDown(sBillNo, sProcNo); |
| | | } |
| | | }); |
| | | |
| | | //éæ©ç产çç»å¼¹çª |
| | | form.on('submit(ProductionTeam-BT)', function () {//éæ©ç产çç» |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æ¬ç«å·¥åº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_GetProductionTeamList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©çäº§èµæºå¼¹çª |
| | | form.on('submit(ProductionResources-BT)', function () {//çäº§èµæº |
| | | console.log($('#HProcNo').val()) |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'çäº§èµæº' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_GetProductionResourcesList.html', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©æä½äºº |
| | | form.on('submit(HEmployeeID-BT)', function () { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'èåå表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../Baseset/åºç¡èµæ/Gy_EmployeeList.html?Type=HWorker', 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éæ©æµæ°´å·å¼¹çª |
| | | form.on('submit(SerialNum-BT)', function () {//çäº§èµæº |
| | | var value = $("#lngProcInterID").val(); |
| | | // 夿æ¯å¦å·²ç»è¾å
¥æµæ°´å·ï¼æ¯åå¼¹åºæ¨¡ææ¡ï¼å¦åç»åºæç¤º |
| | | if (value) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , title: 'æµæ°´å·' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | //, maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: [`../../../Baseset/åºç¡èµæ/Gy_GetProcNoList.html?HInterID=${value}`, 'yes'] |
| | | , resize: false |
| | | , cancel: function (index, layero) { |
| | | } |
| | | , end: function () { |
| | | var sProcNo = $('#HProcNo').val(); |
| | | var sBillNo = $('#HMainSourceBillNo').val(); |
| | | if (sProcNo != "") { |
| | | txtHProcNo_KeyDown(sBillNo, sProcNo); |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | layer.alert('请æ¨ç¡®è®¤è¾å
¥æµè½¬å¡å·åéè¯^_^', { icon: 7 }); |
| | | } |
| | | }); |
| | | |
| | | //éæ©é¨é¨å¼¹çª |
| | | form.on('submit(btnHDept)', function () {//é¨é¨ |
| | | layer.open({ |
| | | type: 2 //ç±»å |
| | | , skin: 'layui-layer-rim'//å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'é¨é¨å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , 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('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID); |
| | | $("#HDeptName").val(checkStatus.data[0].HName); |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | //éåº--å
¨å±ç |
| | | form.on('submit(Cancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.location.href = "../../../../views/index_Mobile.html"; |
| | | }); |
| | | }) |
| | | |
| | | //æ°å¢ |
| | | form.on('submit(Add)', function () { |
| | | var index = parent.layer.getFrameIndex(window.name); // å
å¾å°å½å iframe å±çç´¢å¼ |
| | | parent.layer.close(index); // åæ§è¡å
³é |
| | | }) |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | | |
| | | //#region éè¿ç»å½ç¨æ·è·åé»è®¤å¼ |
| | | function GetDefValByUser() { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cj_StationInBill/GetDefValByUser", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "Czybm": sessionStorage["Czybm"], "Czymc": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | var data = result.data[0]; |
| | | |
| | | form.val("formData", { |
| | | //"HSourceID": data.HSourceID, |
| | | //"HSourceName": data.çäº§èµæºåç§°, |
| | | "HGroupID": data.HGroupID, |
| | | "HGroupName": data.ç产çç»åç§°, |
| | | "HEmpID": data.HEmpID, |
| | | "HEmpName": data.æä½ååç§° |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | , error: function () { |
| | | layer.close(index); |
| | | layer.msg("æ¥å£è¯·æ±å¤±è´¥"); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | function txtHBarCode_KeyDown(HBarCode) { |
| | | var ajaxLoad = layer.load(); |
| | | var sql = "select * from Sc_ICMOBillStatus_Tmp where HICMOBillNo = '" + HBarCode + "'" ; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sql }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | HSourceInterID = data1.data[0].HInterID; |
| | | HSourceEntryID = data1.data[0].HICMOEntryID; |
| | | HSourceBillNo = HBarCode; |
| | | HSourceBillType = data1.data[0].HBillType; |
| | | } else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }); |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID; |
| | | |
| | | $("#HProcID").val(LoadData[0].HProcID); //å½åå·¥åºID |
| | | $("#HProcName").val(LoadData[0].HProcName); //å½åå·¥åº |
| | | $("#HMaterID").val(LoadData[0].HMaterID); //产åID |
| | | $("#HMaterCode").val(LoadData[0].HMaterNumber); //产å代ç |
| | | $("#HMaterName").val(LoadData[0].HMaterName); //产ååç§° |
| | | $("#HMaterSpec").val(LoadData[0].HModel); //产åè§æ ¼ |
| | | $("#HSourceID").val(LoadData[0].HSourceID); //çäº§èµæºID |
| | | $("#HSourceName").val(LoadData[0].HSourceName); //çäº§èµæº |
| | | $("#HMainSourceBillNo").val(LoadData[0].HICMOBillNo); //æºååå·ï¼ææ¶åå¼è®¢åç¼å·ï¼ |
| | | $("#HMainSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç (åå¼HInterID) |
| | | $("#HMainSourceEntryID").val(LoadData[0].HSourceEntryID); //æºååå
ç (æºåè¡å·) |
| | | $("#HMainSourceBillType").val(HSourceBillType); //æºåç±»å |
| | | $("#HDeptID").val(LoadData[0].HDeptID); //车é´ID |
| | | $("#HDeptName").val(LoadData[0].HDeptName); //è½¦é´ |
| | | $("#HICMOInterID").val(LoadData[0].HICMOInterID); //ç产订åID |
| | | $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //ç产订ååID |
| | | $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //ç产订å |
| | | //HCenterID = LoadData[0].HCenterID == null ? sessionStorage["HWorkCenterID"] : LoadData[0].HCenterID;//å·¥ä½ä¸å¿id |
| | | layer.close(ajaxLoad); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }); |
| | | } |
| | | //æµæ°´å·åè½¦æ¹æ³ |
| | | function txtHProcNo_KeyDown(sBillNo, sProcNo) { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cj_StationInBill/txtHProcNo_KeyDown", |
| | | type: "GET", |
| | | data: { "sBillNo": sBillNo, "sProcNo": sProcNo }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | var data = result.data[0]; |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HProcName": data.å·¥åº, |
| | | "HProcID": data.HProcID, |
| | | "HSourceID": data.HSourceID, |
| | | "HSourceName": data.çäº§èµæº |
| | | }); |
| | | $("#HProcNo").attr("readonly", "readonly"); |
| | | $("#HProcNo").css("background-color", "#efefef4d"); |
| | | layer.close(index); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(result.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 SaveVerify() { |
| | | var InterID = $("#HInterID").val(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/AuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | //layer.close(layer.index); |
| | | //window.parent.location.reload(); |
| | | }); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }) |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //ææºåæ°å¢ |
| | | function set_AddNew() { |
| | | //åå§åºæ¬ä¿¡æ¯èµå¼ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | $("#HBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")) //å¼å§æ¶é´ |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //å¶åæ¥æ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å¶å人 |
| | | |
| | | |
| | | //å æºåç±»ååºå(å¯ä»¥åä¸åçæ¹æ³) |
| | | $('#HProcName').attr("disabled", true); |
| | | $('#HSourceName').attr("disabled", true); |
| | | $('#ProductionResources-BT').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HMainSourceBillNo').attr("disabled", true); |
| | | $('#HICMOBillNo').attr("disabled", true); |
| | | $('#HDeptName').attr("disabled", true); |
| | | $('#btnHDept').addClass("layui-btn-disabled").attr("disabled", true); |
| | | |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HBillType |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID; |
| | | |
| | | $("#HProcID").val(LoadData[0].HProcID); //å½åå·¥åºID |
| | | $("#HProcName").val(LoadData[0].HProcName); //å½åå·¥åº |
| | | $("#HMaterID").val(LoadData[0].HMaterID); //产åID |
| | | $("#HMaterNumber").val(LoadData[0].HMaterNumber); //产å代ç |
| | | $("#HMaterName").val(LoadData[0].HMaterName); //产ååç§° |
| | | $("#HSourceID").val(LoadData[0].HSourceID); //çäº§èµæºID |
| | | $("#HSourceName").val(LoadData[0].HSourceName); //çäº§èµæº |
| | | $("#HMainSourceBillNo").val(LoadData[0].HICMOBillNo); //æºååå·ï¼ææ¶åå¼è®¢åç¼å·ï¼ |
| | | $("#HMainSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç (åå¼HInterID) |
| | | $("#HMainSourceEntryID").val(LoadData[0].HSourceEntryID); //æºååå
ç (æºåè¡å·) |
| | | $("#HMainSourceBillType").val(HSourceBillType); //æºåç±»å |
| | | $("#HDeptID").val(LoadData[0].HDeptID); //车é´ID |
| | | $("#HDeptName").val(LoadData[0].HDeptName); //è½¦é´ |
| | | $("#HICMOInterID").val(LoadData[0].HICMOInterID); //ç产订åID |
| | | $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //ç产订ååID |
| | | $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //ç产订å |
| | | //HCenterID = LoadData[0].HCenterID == null ? sessionStorage["HWorkCenterID"] : LoadData[0].HCenterID;//å·¥ä½ä¸å¿id |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | }); |
| | | //è¿åæµæ°´å· |
| | | function GetProcNoValue(obj) { |
| | | $("#HProcNo").val(obj[0].æµæ°´å·); |
| | | } |
| | | |
| | | //è¿åç产çç» |
| | | function GetProductionTeamValue(obj) { |
| | | $("#HGroupName").val(obj[0].çç»); |
| | | $("#HGroupID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | //è¿åçäº§èµæº |
| | | function GetProductionResourcesValue(obj) { |
| | | $("#HSourceName").val(obj[0].çäº§èµæº); |
| | | $("#HSourceID").val(obj[0].HItemID); |
| | | } |
| | | //è¿åæä½å |
| | | function GetHWorkerValue(obj) { |
| | | $("#HEmpName").val(obj[0].HName); |
| | | $("#HEmpID").val(obj[0].HItemID); |
| | | } |
| | | //è¿åå½åå·¥åº |
| | | function GetHProcValue(obj) { //è¿åå½åå·¥åº |
| | | $("#HProcName").val(obj[0].å·¥åº); |
| | | $("#HProcID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | <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;"> |
| | | <div class="layui-card" style="padding: 0px"> |
| | | <div class="layui-card-body" style="padding: 0px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else if ($.inArray(data[i].name, totalArray) > -1) { //计ç®å |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, totalRow: true, width: 120 }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, totalRow: true, width: 80 }); |
| | | } else if (data[i].name == "æé®id") { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, totalRow: true, width: 80, hide:true }); |
| | | } else { |
| | | switch (data[i].Type) { |
| | | //int |
| | |
| | | case 'Int64': |
| | | case 'double': |
| | | case 'Decimal': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 120, totalRow: true }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 100, totalRow: true }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 200 }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 100 }); |
| | | } |
| | | } |
| | | } |
| | |
| | | , cols: [col] |
| | | , data: data1.data |
| | | , height: 'full-80' |
| | | , page: true |
| | | , page: false |
| | | , limits: [50, 500, 5000, 20000] |
| | | , limit: 50 |
| | | , cellMinWidth: 90 |
| | |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else if ($.inArray(data[i].name, totalArray) > -1) { //计ç®å |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120, filter: true }); |
| | | } else if (data[i].name == 'æ¯å¦å¹é
å°è®¢å') { |
| | | col.push({ field: 'æ¯å¦å¹é
å°è®¢å', title: 'æ¯å¦å¹é
å°è®¢å', sort: true, filter: true, templet: function (d) { return d.æ¯å¦å¹é
å°è®¢å ? 'å¦' : 'æ¯'; } }); |
| | | } |
| | |
| | | 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 == "è¡å
³éæ¥æ" ? "è¡å
³é人" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, filter: true, templet: "<div>{{d." + (data[i].name == "è¡å
³éæ¥æ" ? "è¡å
³é人" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, filter: true }); |
| | | } |
| | | } |
| | | } |
| | |
| | | HExportData = data1.data; |
| | | var firstdata = data1.data; |
| | | let itemMap = new Map();// |
| | | let maxLevel = firstdata[0].å±çº§; |
| | | // ä½¿ç¨ Map åå¨å¯¹è±¡å¼ç¨ï¼ä»¥å¤çå¯è½ç Hitemid éå¤ |
| | | //æç¸åçHICMOEntryIDæ¾å°åä¸ä¸ªå¯¹è±¡æ°ç»é |
| | | firstdata.forEach(item => { |
| | |
| | | }); |
| | | // ç¬¬äºæ¬¡éåï¼æå»ºå±æ¬¡ç»æå¹¶è®¾ç½® isParent |
| | | firstdata.forEach(item => { |
| | | if (item.å±çº§ === maxLevel) { |
| | | if (item.ç©æID == HMaterID) { |
| | | root.push(item); |
| | | } else { |
| | | const parentList = itemMap.get(item.HMainICMOEntryID); |
| | |
| | | data: { "sWhere": sql }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = [];//ååæ®µæ°æ® |
| | | var col = []; |
| | | var totalArray = []; |
| | | var titleData = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | 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', totalRowText: 'å计' }); |
| | | for (var i = 0; i < data.length; i++) {//éådataæ°ç»éçæ°æ® |
| | | // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { |
| | | if ($.inArray(data[i].name, titleData) > -1) {//æ£æ¥dataãiã.nameæ¯å¦å¨æ°ç»ä¸ //计ç®å |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else if ($.inArray(data[i].name, totalArray) > -1) { //计ç®å |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120, filter: true }); |
| | | } else if (data[i].name == 'æ¯å¦å¹é
å°è®¢å') { |
| | | col.push({ field: 'æ¯å¦å¹é
å°è®¢å', title: 'æ¯å¦å¹é
å°è®¢å', sort: true, filter: true, templet: function (d) { return d.æ¯å¦å¹é
å°è®¢å ? 'å¦' : 'æ¯'; } }); |
| | | } |
| | | else if (data[i].name == 'æ¯å¦å¹é
å°è¦æè®¡åä¿¡æ¯') { |
| | | col.push({ field: 'æ¯å¦å¹é
å°è¦æè®¡åä¿¡æ¯', title: 'æ¯å¦å¹é
å°è¦æè®¡åä¿¡æ¯', sort: true, filter: true, templet: function (d) { return d.æ¯å¦å¹é
å°è¦æè®¡åä¿¡æ¯ ? 'å¦' : 'æ¯'; } }); |
| | | } else if (isValidDate(data[i].name)) { |
| | | col.push({ field: data[i].name, title: Format(data[i].name, 'MM.dd'), width: 70, totalRow: true, filter: true }) |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, filter: true, templet: "<div>{{d." + (data[i].name == "è¡å
³éæ¥æ" ? "è¡å
³é人" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, filter: true }); |
| | | } |
| | | } |
| | | } |
| | | option2.cols = [col]; |
| | | HExportData2 = data1.data; |
| | | var firstdata = data1.data; |
| | | let itemMap = new Map();// |
| | | let maxLevel = firstdata[firstdata.length-1].å±çº§; |
| | | // ä½¿ç¨ Map åå¨å¯¹è±¡å¼ç¨ï¼ä»¥å¤çå¯è½ç Hitemid éå¤ |
| | | //æç¸åçHICMOEntryIDæ¾å°åä¸ä¸ªå¯¹è±¡æ°ç»é |
| | | firstdata.forEach(item => { |
| | |
| | | }); |
| | | // ç¬¬äºæ¬¡éåï¼æå»ºå±æ¬¡ç»æå¹¶è®¾ç½® isParent |
| | | firstdata.forEach(item => { |
| | | if (item.å±çº§ === maxLevel) { |
| | | if (item.ç©æID == HMaterID) { |
| | | root.push(item); |
| | | } else { |
| | | const parentList = itemMap.get(item.HICMOEntryID); |
| | |
| | | } |
| | | } |
| | | }); |
| | | option2.cols = option.cols; |
| | | option2.data = root; |
| | | |
| | | //å设置 |
| | |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else if ($.inArray(data[i].name, totalArray) > -1) { //计ç®å |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120, filter: true }); |
| | | } else if (data[i].name == 'æ¯å¦å¹é
å°è®¢å') { |
| | | col.push({ field: 'æ¯å¦å¹é
å°è®¢å', title: 'æ¯å¦å¹é
å°è®¢å', sort: true, filter: true, templet: function (d) { return d.æ¯å¦å¹é
å°è®¢å ? 'å¦' : 'æ¯'; } }); |
| | | } |
| | |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + (data[i].name == "è¡å
³éæ¥æ" ? "è¡å
³é人" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, filter: true, width: 200 }); |
| | | } |
| | | } |
| | | } |