| | |
| | | .layui-form-label { |
| | | width: 85px; |
| | | } |
| | | |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | .layui-table-cell { |
| | | overflow: visible !important; |
| | | } |
| | | /* 使å¾ä¸ææ¡ä¸åå
æ ¼å好åé */ |
| | | td .layui-form-select { |
| | | margin-top: -10px; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | <li>éä»¶ä¿¡æ¯</li> |
| | | </ul> |
| | | <h1 style="text-align:center;"><b>å¨å
·ä¿å
»è®°å½è¡¨</b></h1> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | |
| | | <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">å
é¨åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HInnerBillNo" id="HInnerBillNo" class="layui-input"> |
| | |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä¿å
»è®¡åç¼å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HPlanNo" id="HPlanNo" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <input type="text" name="HPlanName" id="HPlanName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMouldMaintainPlanEntryID" id="HMouldMaintainPlanEntryID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMouldMaintainPlanInterID" id="HMouldMaintainPlanInterID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HPlanList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä¿å
»è§ç¨<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HMouldMaintainRuleInterID" id="HMouldMaintainRuleInterID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="HMouldMaintainRuleInterNo" id="HMouldMaintainRuleInterNo" class="layui-input" value="" style="float:left;width:150px;" readonly="readonly"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HMouldMaintainRuleInterList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | |
| | | <label class="layui-form-label">ä¿å
»ç»ææ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HEndDate" id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä¿å
»çº§å«</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HMaintainLevID" id="HMaintainLevID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <input type="text" name="HMaintainLevName" id="HMaintainLevName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="btnMaintainLev" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¦æ±å®ææ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" id="HRequestComDate" name="HRequestComDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æè¿ä¿å
»æ¨¡æ°</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HRecentMainModule" lay-verify="HRecentMainModule" id="HRecentMainModule" value="0" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">累计模æ°</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HCumulativeModule" lay-verify="HCumulativeModule" id="HCumulativeModule" value="0" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æ¬æ¬¡ç产模æ°</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HProductionModule" lay-verify="HProductionModule" id="HProductionModule" value="0" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¨å
·ä¿å
»è§ç¨<label style="color:red"> * </label></label> |
| | | <label class="layui-form-label">æç»ç»è®º</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HMouldMaintainRuleInterID" id="HMouldMaintainRuleInterID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="HMouldMaintainRuleInterNo" id="HMouldMaintainRuleInterNo" class="layui-input" value="" style="float:left;width:150px;" readonly="readonly"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HMouldMaintainRuleInterList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | <input type="radio" name="HLastResult" id="HLastResult" value="OK" title="OK" checked> |
| | | <input type="radio" name="HLastResult" id="HLastResult" value="NG" title="NG"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--éä»¶ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-upload"> |
| | | <button type="button" class="layui-btn" id="testList">éæ©æä»¶</button><input class="layui-upload-file" type="file" accept="" name="file" multiple=""> |
| | | <div class="layui-upload-list"> |
| | | <table class="layui-table" lay-filter="fileTable"> |
| | | <thead> |
| | | <tr> |
| | | <th>æä»¶å</th> |
| | | <th>å¾ç</th> |
| | | <th>大å°</th> |
| | | <th>ç¶æ</th> |
| | | <th>æä½</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="ProImgByList" class="ProImgByList"> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <!--<a class="layui-btn layui-btn-xs" lay-event="edit">ç¼è¾</a>--> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del1">å é¤</a> |
| | | </script> |
| | | <!--è¡ä¸æéæ©(ä¿å
ȍȾ)--> |
| | | <script type="text/html" id="HMaintainResult"> |
| | | <select name="HMaintainResult" lay-filter="HMaintainResult" id="HMaintainResult{{d.LAY_TABLE_INDEX+1}}"> |
| | | <!--<option value="">è¯·éæ©</option>--> |
| | | <option value="Y" selected>Y</option> |
| | | <option value="X">X</option> |
| | | </select> |
| | | </script> |
| | | <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/PageTitle.js"></script> |
| | | <script> |
| | | //è·å页é¢è·³è½¬åæ° |
| | | var params = get_UrlVars(); |
| | |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | }).use(['index', 'form', 'laydate', 'table', 'element', 'upload'], function () { |
| | | |
| | | //#region å
¬ç¨åé |
| | | var $ = layui.$ |
| | |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , upload = layui.upload |
| | | , element = layui.element; |
| | | var option; |
| | | var option2; |
| | | var sBillType = "3807"; |
| | | var TabRow = { "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }; |
| | | var TabRow = { "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " ", "HMaintainResult": "Y" }; |
| | | var TabRow1 = { "HMaterID": 0, "HMaterNumber": " ", "HMaterName": " ", "HMaterSpec": " ", "HUnitID": "0", "HUnitNumber": " ", "HUnitName": " ", "HQty": "0", "HQtyMust": "0", "HRemark": " " }; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //#region ã卿è·å模ååç§°ã |
| | | var HModuleType = "3819"; |
| | | //éè¿åæ®ç±»åï¼ä»æ°æ®åºå¨æè·ååæ®æ¨¡åå½å,å¼ç¨jsæä»¶ PageTitle.js |
| | | var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType); |
| | | $("h1").html('<b>' + HPageTitle + '</b>'); |
| | | //#endregion |
| | | |
| | | //åå§å表åæä»¶ |
| | | set_InitFrom(); |
| | | |
| | |
| | | //夿æä½ç±»å |
| | | if (OperationType == 1) {//æ æºå |
| | | set_AddFNew(); |
| | | //æä»¶éæ©åå§å |
| | | PicUpload(); |
| | | } |
| | | else if (OperationType == 3) {//ç¼è¾ |
| | | |
| | | set_EditFromGrid(); |
| | | //æä»¶éæ©åå§å |
| | | PicUpload(); |
| | | getFile(); |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data;; |
| | | var AddRow = table.cache['mainTable']; |
| | | var NewRow = { "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }; |
| | | var NewRow = { "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " ", "HMaintainResult": "Y" }; |
| | | switch (obj.event) { |
| | | //æ°å¢ä¸è¡ |
| | | case 'btn-AddLine': btnAddLine(NewRow); |
| | |
| | | set_GridCellCheck1(obj); //è¡å
å¿«æ·é®çé |
| | | }); |
| | | |
| | | //è¡éæ©å¤çï¼ç¹æ£ç»æï¼ |
| | | form.on('select(HMaintainResult)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HMaintainResult = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | |
| | | console.log(table.cache['mainTable']); |
| | | |
| | | var HQty = 0;//表ä½è¡ä¸åæ ¼æ°é |
| | | for (let i = 0; i < table.cache['mainTable'].length; i++) { |
| | | if (table.cache['mainTable'][i].HMaintainResult == "X") { |
| | | HQty++; |
| | | } |
| | | } |
| | | if (HQty > 0) { |
| | | document.querySelectorAll("[name='HLastResult']")[0].removeAttribute('checked'); //å é¤éæ©å±æ§ |
| | | $("input:radio[name=HLastResult][value=" + "NG" + "]").attr("checked", "true"); //æ·»å 鿩屿§ |
| | | } else { |
| | | document.querySelectorAll("[name='HLastResult']")[1].removeAttribute('checked'); //å é¤éæ©å±æ§ |
| | | $("input:radio[name=HLastResult][value=" + "OK" + "]").attr("checked", "true"); //æ·»å 鿩屿§ |
| | | } |
| | | form.render('radio'); |
| | | }); |
| | | |
| | | //表头信æ¯ä¿å
»è®¡åæºåå¼¹çª |
| | | form.on('submit(HPlanList)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | |
| | | } |
| | | $("#HPlanName").val(checkStatus.data[0].åæ®å·); |
| | | $("#HPlanNo").val(checkStatus.data[0].hmainid); |
| | | $("#HMaintainLevName").val(checkStatus.data[0].ä¿å
»çº§å«åç§°); |
| | | $("#HMaintainLevID").val(checkStatus.data[0].HMaintainLevID); |
| | | $("#HBeginDate").val(Pub_Format(checkStatus.data[0].计åå¼å§æ¥æ, "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Pub_Format(checkStatus.data[0].计åç»ææ¥æ, "yyyy-MM-dd")); |
| | | $("#HMouldMaintainPlanInterID").val(checkStatus.data[0].hmainid); |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | get_MaintainItem1(); |
| | | } |
| | |
| | | } |
| | | }); |
| | | }); |
| | | //表头信æ¯ä¿å
»çº§å«å¼¹çª |
| | | form.on('submit(btnMaintainLev)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ä¿å
»çº§å«å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_MaintainLev.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HMaintainLevName").val(checkStatus.data[0].ä¿å
»çº§å«åç§°); |
| | | $("#HMaintainLevID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | //产åå¨å
· |
| | | form.on('submit(HMouldList)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | |
| | | } |
| | | $("#HMouldName").val(checkStatus.data[0].åæ®å·); |
| | | $("#HMouldID").val(checkStatus.data[0].hmainid); |
| | | get_MaintainItem(); |
| | | //get_MaintainItem(); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | //表头信æ¯å¨å
·ä¿å
»è§ç¨ |
| | |
| | | }); |
| | | |
| | | //产åå¨å
· |
| | | function get_MaintainItem() { |
| | | window.get_MaintainItem = function () { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMaintainItemtemByMouldProjectID", |
| | | type: "GET", |
| | |
| | | var PJData = result.list[1];//é
ä»¶ |
| | | var rowdate1 = layui.table.cache["mainTable"]; |
| | | var rowdate2 = layui.table.cache["mainTable1"]; |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }]; |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " ", "HMaintainResult": "Y"}]; |
| | | option2.data = [{ "HMaterID": 0, "HMaterNumber": " ", "HMaterName": " ", "HMaterSpec": " ", "HUnitID": "0", "HUnitNumber": " ", "HUnitName": " ", "HQty": "0", "HQtyMust": "0", "HRemark": " " }]; |
| | | table.render(option); |
| | | table.render(option2); |
| | |
| | | var checkrow = { |
| | | "HMaintainItemID": BYData[i].HMaintainItemID, "HMaintainItemNumber": BYData[i].HMaintainItemNumber, "HMaintainItem": BYData[i].HMaintainItem, |
| | | "HMaintainPart": BYData[i].HMaintainPart, "HManagerID": BYData[i].HManagerID, "HManagerNumber": BYData[i].HManagerNumber, |
| | | "HManagerName": BYData[i].HManagerName, "HClaim": BYData[i].HClaim, "HRemark": BYData[i].HRemark |
| | | "HManagerName": BYData[i].HManagerName, "HClaim": BYData[i].HClaim, "HRemark": BYData[i].HRemark, "HMaintainResult": "Y" |
| | | }; |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | |
| | | } |
| | | |
| | | //ä¿å
»è®¡åç¼å· |
| | | function get_MaintainItem1() { |
| | | window.get_MaintainItem1 = function () { |
| | | var HPlanID = $("#HPlanNo").val() //ä¿å
»è®¡åID |
| | | var HDate = $("#HDate").val(); //å½å¤©æ¥æ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_MouldMaintainPlanBill/Sc_MouldMaintainPlanBillListProjectDetai", |
| | | url: GetWEBURL() + "/Sc_MouldMaintainPlanBill/Sc_MouldMaintainPlanBill_PlanList", |
| | | type: "GET", |
| | | data: { "sqlWhere": "and hmainid=" + $("#HPlanNo").val() }, |
| | | data: { "HInterID": HPlanID, "HDate": HDate }, |
| | | success: function (result) { |
| | | if (result != null) { |
| | | if (result.count == 1) { |
| | | var BYData = result.list[0];//ä¿å
» |
| | | var PJData = result.list[1];//é
ä»¶ |
| | | var BYData = result.data[0];//ä¿å
» |
| | | var PJData = result.data[1];//é
ä»¶ |
| | | var rowdate1 = layui.table.cache["mainTable"]; |
| | | var rowdate2 = layui.table.cache["mainTable1"]; |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }]; |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " ", "HMaintainResult": "Y" }]; |
| | | option2.data = [{ "HMaterID": 0, "HMaterNumber": " ", "HMaterName": " ", "HMaterSpec": " ", "HUnitID": "0", "HUnitNumber": " ", "HUnitName": " ", "HQty": "0", "HQtyMust": "0", "HRemark": " " }]; |
| | | table.render(option); |
| | | table.render(option2); |
| | | |
| | | if (BYData.length != 0) { |
| | | $("#HMouldMaintainRuleInterID").val(BYData[0].HMouldMaintainRuleID); |
| | | $("#HMouldMaintainRuleInterNo").val(BYData[0].HEquipDotCheckNo); |
| | | $("#HMouldMaintainRuleInterNo").val(BYData[0].ä¿å
»è§ç¨åå·); |
| | | } |
| | | else { |
| | | layer.msg("æ ä¿å
»è§ç¨!") |
| | | } |
| | | |
| | | |
| | | |
| | | if (BYData.length != 0) //è¡¨ä½æ°æ®ä¸ºç©ºæ¶ |
| | | { |
| | | $("#HMouldMaintainPlanEntryID").val(BYData[0].HPlanEntryID); |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < BYData.length; i++) { |
| | | var checkrow = { |
| | | "HMaintainItemID": BYData[i].HMaintainItemID, "HMaintainItemNumber": BYData[i].HMaintainItemNumber, "HMaintainItem": BYData[i].HMaintainItem, |
| | | "HMaintainPart": BYData[i].HMaintainPart, "HManagerID": BYData[i].è´è´£äººID, "HManagerNumber": BYData[i].HManagerNumber, |
| | | "HManagerName": BYData[i].HManagerName, "HClaim": BYData[i].HClaim, "HRemark": BYData[i].HRemark |
| | | "HMaintainItemID": BYData[i].HMaintainItemID == null ? 0 : BYData[i].HMaintainItemID, "HMaintainItemNumber": BYData[i].ä¿å
»é¡¹ç®ä»£ç , "HMaintainItem": BYData[i].ä¿å
»é¡¹ç®, |
| | | "HMaintainPart": BYData[i].ä¿å
»é¨ä½, "HManagerID": BYData[i].HEmployeeID == null ? 0 : BYData[i].HEmployeeID, "HManagerNumber": BYData[i].è´è´£äººä»£ç , |
| | | "HManagerName": BYData[i].è´è´£äººåç§°, "HClaim": BYData[i].å
·ä½è¦æ±, "HRemark": "", "HMaintainResult": "Y" |
| | | }; |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | |
| | | } |
| | | |
| | | //å¨å
·ä¿å
»è§ç¨ |
| | | function get_MaintainItem2() { |
| | | window.get_MaintainItem2 = function () { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMouldMaintainItemtemByMaintainRuleID", |
| | | type: "GET", |
| | |
| | | var PJData = result.list[1];//é
ä»¶ |
| | | var rowdate1 = layui.table.cache["mainTable"]; |
| | | var rowdate2 = layui.table.cache["mainTable1"]; |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }]; |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " ", "HMaintainResult": "Y" }]; |
| | | option2.data = [{ "HMaterID": 0, "HMaterNumber": " ", "HMaterName": " ", "HMaterSpec": " ", "HUnitID": "0", "HUnitNumber": " ", "HUnitName": " ", "HQty": "0", "HQtyMust": "0", "HRemark": " " }]; |
| | | table.render(option); |
| | | table.render(option2); |
| | |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < BYData.length; i++) { |
| | | var checkrow = { |
| | | "HMaintainItemID": BYData[i].HMaintainItemID, "HMaintainItemNumber": BYData[i].HMaintainItemNumber, "HMaintainItem": BYData[i].HMaintainItem, |
| | | "HMaintainPart": BYData[i].HMaintainPart, "HManagerID": BYData[i].HManagerID, "HManagerNumber": BYData[i].HManagerNumber, |
| | | "HManagerName": BYData[i].HManagerName, "HClaim": BYData[i].HClaim, "HRemark": BYData[i].HRemark |
| | | "HMaintainItemID": BYData[i].ä¿å
»é¡¹ç®ID, "HMaintainItemNumber": BYData[i].ä¿å
»é¡¹ç®ä»£ç , "HMaintainItem": BYData[i].ä¿å
»é¡¹ç®, |
| | | "HMaintainPart": BYData[i].ä¿å
»é¨ä½, "HManagerID": BYData[i].è´è´£äººID, "HManagerNumber": BYData[i].è´è´£äººä»£ç , |
| | | "HManagerName": BYData[i].è´è´£äººåç§°, "HClaim": BYData[i].å
·ä½è¦æ±, "HRemark": BYData[i].å夿³¨2, "HMaintainResult": "Y" |
| | | }; |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | option.data = buttonArr; |
| | | table.render(option); |
| | | } |
| | | |
| | | |
| | |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < PJData.length; i++) { |
| | | var checkrow = { |
| | | "HMaterID": PJData[i].HMaterID, "HMaterNumber": PJData[i].HMaterNumber, "HMaterName": PJData[i].HMaterName, |
| | | "HMaterSpec": PJData[i].HMaterSpec, "HUnitID": PJData[i].HUnitID, "HUnitNumber": PJData[i].HUnitNumber, |
| | | "HUnitName": PJData[i].HUnitName, "HQty": PJData[i].HQty, "HQtyMust": PJData[i].HQtyMust, |
| | | "HRemark": PJData[i].HRemark |
| | | "HMaterID": PJData[i].é
ä»¶ID, "HMaterNumber": PJData[i].é
件代ç , "HMaterName": PJData[i].é
ä»¶åç§°, |
| | | "HMaterSpec": PJData[i].è§æ ¼åå·, "HUnitID": PJData[i].åä½ID, "HUnitNumber": PJData[i].计éåä½ä»£ç , |
| | | "HUnitName": PJData[i].计éåä½åç§°, "HQty": PJData[i].ç¨é, "HQtyMust": PJData[i].æ åç¨é, |
| | | "HRemark": PJData[i].å夿³¨1 |
| | | }; |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | table.reload("mainTable1", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | option2.data = buttonArr; |
| | | table.render(option2); |
| | | } |
| | | |
| | | } else { |
| | |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/Gy_Maintain.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/åºç¡èµæ/Gy_MaintainList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaintainItemID: checkStatus.data[0].HItemID, |
| | | HMaintainItemNumber: checkStatus.data[0].HNumber, |
| | | HMaintainItem: checkStatus.data[0].HName, |
| | | HMaintainItemNumber: checkStatus.data[0].ä¿å
»é¡¹ç®ä»£ç , |
| | | HMaintainItem: checkStatus.data[0].ä¿å
»é¡¹ç®åç§°, |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/UserInformation.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_EmployeeList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HManagerID: checkStatus.data[0].HItemID, |
| | | HManagerNumber: checkStatus.data[0].HNumber, |
| | | HManagerName: checkStatus.data[0].HName |
| | | HManagerNumber: checkStatus.data[0].èå代ç , |
| | | HManagerName: checkStatus.data[0].èååç§° |
| | | }); |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/PartInformation.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Material.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: checkStatus.data[0].HItemID, |
| | | HMaterNumber: checkStatus.data[0].HNumber, |
| | | HMaterName: checkStatus.data[0].HName, |
| | | HMaterSpec: checkStatus.data[0].HModel, |
| | | HMaterNumber: checkStatus.data[0].ç©æä»£ç , |
| | | HMaterName: checkStatus.data[0].ç©æåç§°, |
| | | HMaterSpec: checkStatus.data[0].è§æ ¼åå·, |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/UnitInformation.html', 'yes'], |
| | | content: ['../../../views/åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Unit.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HUnitID: checkStatus.data[0].HItemID, |
| | | HUnitNumber: checkStatus.data[0].HNumber, |
| | | HUnitName: checkStatus.data[0].HName |
| | | HUnitNumber: checkStatus.data[0].计éåä½ä»£ç , |
| | | HUnitName: checkStatus.data[0].计éåä½åç§° |
| | | }); |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | |
| | | laydate.render({ |
| | | elem: '#HEndDate' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HRequestComDate' |
| | | }); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | |
| | | function Table1() { |
| | | //表头 |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计è¡' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left' } |
| | | , { field: 'HMaintainItemID', title: 'ä¿å
»é¡¹ç®ID', edit: 'text', hide: true } |
| | | , { field: 'HMaintainItemNumber', title: 'ä¿å
»é¡¹ç®ä»£ç ', edit: 'text', event: 'HMaintainItemNumber' } |
| | | , { field: 'HMaintainItem', title: 'ä¿å
»é¡¹ç®' } |
| | | , { field: 'HMaintainResult', title: 'ä¿å
ȍȾ', templet: '#HMaintainResult', event: 'HMaintainResult' } |
| | | , { field: 'HMaintainPart', title: 'ä¿å
»é¨ä½', edit: 'text' } |
| | | , { field: 'HClaim', title: 'å
·ä½è¦æ±', edit: 'text' } |
| | | , { field: 'HManagerID', title: 'è´è´£äººID', edit: 'text', hide: true } |
| | | , { field: 'HManagerNumber', title: 'è´è´£äººä»£ç ', edit: 'text', event: 'HManagerNumber' } |
| | | , { field: 'HManagerName', title: 'è´è´£äºº'} |
| | | , { field: 'HManagerName', title: 'è´è´£äºº' } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text' } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]; |
| | |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , height: 500 |
| | | , cols: [columns] |
| | |
| | | function Table2() { |
| | | //表头 |
| | | columns1 = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao1', title: 'åºå·', sort: true, fixed: 'left'} |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计è¡' } |
| | | , { templet: '#xuhao1', title: 'åºå·', sort: true, fixed: 'left' } |
| | | , { field: 'HMaterID', title: 'é
ä»¶ID', edit: 'text', hide: true } |
| | | , { field: 'HMaterNumber', title: 'é
件代ç ', edit: 'text', event: "HMaterNumber" } |
| | | , { field: 'HMaterName', title: 'é
ä»¶åç§°' } |
| | |
| | | , { field: 'HUnitID', title: 'åä½ID', edit: 'text', hide: true } |
| | | , { field: 'HUnitNumber', title: 'åä½ä»£ç ', edit: 'text', event: "HUnitNumber" } |
| | | , { field: 'HUnitName', title: 'åä½åç§°' } |
| | | , { field: 'HQty', title: 'å®é
ç¨é', edit: 'text' } |
| | | , { field: 'HQtyMust', title: 'æ åç¨é', edit: 'text' } |
| | | , { field: 'HQty', title: 'å®é
ç¨é', edit: 'text', totalRow: true } |
| | | , { field: 'HQtyMust', title: 'æ åç¨é', edit: 'text', totalRow: true } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text' } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo1' } |
| | | ]; |
| | |
| | | , elem: '#mainTable1' |
| | | , toolbar: '#toolbarDemo1' |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , height: 500 |
| | | , cols: [columns1] |
| | |
| | | function set_AddFNew() { |
| | | //è·åæå¤§åæ®å· |
| | | get_MAXNum(); |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }]; |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " ", "HMaintainResult": "Y" }]; |
| | | option2.data = [{ "HMaterID": 0, "HMaterNumber": " ", "HMaterName": " ", "HMaterSpec": " ", "HUnitID": "0", "HUnitNumber": " ", "HUnitName": " ", "HQty": "0", "HQtyMust": "0", "HRemark": " " }]; |
| | | table.render(option); |
| | | table.render(option2); |
| | |
| | | $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBeginDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HRequestComDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | |
| | | } |
| | | }); |
| | |
| | | data: { |
| | | "HID": linterid |
| | | }, |
| | | async: false, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data.h_v_Sc_MouldMaintain[0]; |
| | |
| | | , "HMouldName": data.äº§åæ¨¡å
· |
| | | , "HMouldMaintainRuleInterID": data.HMouldMaintainRuleInterID |
| | | , "HMouldMaintainRuleInterNo": data.å¨å
·ä¿å
»è§ç¨ |
| | | , "HMaintainLevID": data.HMaintainLevID |
| | | , "HMaintainLevName": data.ä¿å
»çº§å«åç§° |
| | | , "HRequestComDate": formatDate(data.è¦æ±å®ææ¥æ) |
| | | , "HRecentMainModule": data.æè¿ä¿å
»æ¨¡æ° |
| | | , "HCumulativeModule": data.ç´¯è®¡æ¨¡æ° |
| | | , "HProductionModule": data.æ¬æ¬¡çäº§æ¨¡æ° |
| | | }); |
| | | |
| | | if (data.æç»ç»è®º == "ä¸åæ ¼") { |
| | | document.querySelectorAll("[name='HLastResult']")[0].removeAttribute('checked'); //å é¤éæ©å±æ§ |
| | | $("input:radio[name=HLastResult][value=" + "NG" + "]").attr("checked", "true"); //æ·»å 鿩屿§ |
| | | } else { |
| | | document.querySelectorAll("[name='HLastResult']")[1].removeAttribute('checked'); //å é¤éæ©å±æ§ |
| | | $("input:radio[name=HLastResult][value=" + "OK" + "]").attr("checked", "true"); //æ·»å 鿩屿§ |
| | | } |
| | | form.render('radio'); |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.list[0]; |
| | | for (let i = 0; i < option.data.length; i++) { |
| | | if (option.data[i].HMaintainResult == "åæ ¼") { |
| | | option.data[i].HMaintainResult = "Y"; |
| | | } else { |
| | | option.data[i].HMaintainResult = "X"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | option2.data = result.list[1]; |
| | | table.render(option2); |
| | | |
| | | for (let j = 0; j < result.list[0].length; j++) { |
| | | $("#HMaintainResult" + (j + 1)).val(result.list[0][j].HMaintainResult == "åæ ¼" ? 'Y' : (result.list[0][j].HMaintainResult == 'Y' ? 'Y' : 'X')) |
| | | } |
| | | form.render('select'); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HMaintainResult' + i + '').find("option[value='" + option.data[i - 1].HMaintainResult + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | } |
| | | |
| | | //å¢å ä¸è¡ |
| | |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HMaintainResult' + i + '').find("option[value='" + option.data[i - 1].HMaintainResult + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | return Result; |
| | | } |
| | | |
| | | //#region æä»¶ä¸ä¼ |
| | | function PicUpload() { |
| | | //å¤å¾çä¸ä¼ |
| | | //夿件åè¡¨ç¤ºä¾ |
| | | var ProImgByList = $('#ProImgByList') |
| | | , uploadListIns = upload.render({ |
| | | elem: '#testList' |
| | | |
| | | , url: GetWEBURL() + "/Sc_MouldMaintainBill/UploadFile" |
| | | , accept: 'file' |
| | | , multiple: true |
| | | , auto: false |
| | | //, bindAction: '#testListAction' //ææç»å® |
| | | , data: { "HBillNo": $("#HBillNo").val(), "HRemark": $("#HRemark").val(), "HUserName": sessionStorage["HUserName"] } |
| | | , choose: function (obj) { |
| | | var files = this.files = obj.pushFile(); //å°æ¯æ¬¡éæ©çæä»¶è¿½å å°æä»¶éå |
| | | //è¯»åæ¬å°æä»¶ |
| | | obj.preview(function (index, file, result) { |
| | | var tr = $(['<tr id="upload-' + index + '">' |
| | | , '<td>' + file.name + '</td>' |
| | | , '<td>' + '<img onclick=\"previewImg(this)\" id="showImg" class="ImgClass" style="width: 150px; margin:10px;cursor:pointer;"src="' + result + '" alt="' + file.name + '">' + '</td>' |
| | | , '<td>' + (file.size / 1014).toFixed(1) + 'kb</td>' |
| | | , '<td>çå¾
ä¸ä¼ </td>' |
| | | , '<td>' |
| | | , '<button class="layui-btn layui-btn-xs demo-reload ">ä¸ä¼ </button>' |
| | | , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">å é¤</button>' |
| | | , '</td>' |
| | | , '</tr>'].join('')); |
| | | |
| | | |
| | | //å个éä¼ |
| | | tr.find('.demo-reload').on('click', function () { |
| | | obj.upload(index, file); |
| | | return false; |
| | | }); |
| | | |
| | | //å é¤ |
| | | tr.find('.demo-delete').on('click', function () { |
| | | delete files[index]; //å é¤å¯¹åºçæä»¶ |
| | | tr.remove(); |
| | | uploadListIns.config.elem.next()[0].value = ''; //æ¸
空 input file å¼ï¼ä»¥å
å é¤ååºç°ååæä»¶ä¸å¯é |
| | | }); |
| | | |
| | | ProImgByList.append(tr); |
| | | |
| | | }); |
| | | } |
| | | , done: function (res, index, upload) { |
| | | if (res.code == 1) { //ä¸ä¼ æå |
| | | var tr = ProImgByList.find('tr#upload-' + index) |
| | | , tds = tr.children(); |
| | | tds.eq(3).html('<span style="color: #5FB878;">ä¸ä¼ æå</span>'); |
| | | tds.eq(4).html(''); //æ¸
空æä½ |
| | | |
| | | return delete this.files[index]; //å 餿件éåå·²ç»ä¸ä¼ æåçæä»¶ |
| | | } |
| | | this.error(index, upload); |
| | | } |
| | | , error: function (index, upload) { |
| | | var tr = ProImgByList.find('tr#upload-' + index) |
| | | , tds = tr.children(); |
| | | tds.eq(2).html('<span style="color: #FF5722;">ä¸ä¼ 失败[æ£æ¥æä»¶ååæä»¶æ ¼å¼]</span>'); |
| | | tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //æ¾ç¤ºä¸ä¼ |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region ç¼è¾æ¶,è·åå·²ä¸ä¼ çæä»¶å表 |
| | | function getFile() { |
| | | var ProImgByList = $('#ProImgByList') |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldMaintainBill/Filelist', |
| | | type: "GET", |
| | | data: { "HBillNo": $("#HBillNo").val() }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var index = 0; |
| | | for (var i = 0; i < data1.data.length; i++) { |
| | | var tr = $(['<tr id="upload-' + i + '">' |
| | | , '<td style="display:none">' + data1.data[i].HItemID + '</td>' |
| | | , '<td style="display:none">' + data1.data[i].HSourceBillNo + '</td>' |
| | | , '<td>' + data1.data[i].HFileName + '</td>' |
| | | , '<td>' + '<img onclick=\"previewImg(this)\" id="showImg' + i + '" class="ImgClass" style="width: 150px; margin:10px;cursor:pointer;"src="' + data1.data[i].HFilePath + '" alt="' + data1.data[i].HFileName + '">' + '</td>' |
| | | , '<td>' + (data1.data[i].HFileSize / 1014).toFixed(1) + 'kb</td>' |
| | | , '<td style="color: #5FB878;">ä¸ä¼ æå</td>' |
| | | , '<td style="display:none">' + data1.data[i].url + '</td>' |
| | | , '<td>' |
| | | , '<button class="layui-btn layui-btn-xs demo-dowload" type="button" id="deltefile" onclick="javascript:dowload(this)"><i class="layui-icon layui-icon-download-circle layuiadmin-button-btn"></i>ä¸è½½</button>' |
| | | , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete" type="button" id="deltefile" onclick="javascript:toManager(this)"><i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>å é¤</button>' |
| | | , '</td>' |
| | | , '</tr>'].join('')); |
| | | |
| | | $('#ProImgByList').append(tr); |
| | | } |
| | | |
| | | } else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | }); |
| | | |
| | | function GetMouldFileValue(obj) { //å¨å
·æ¡£æ¡ |
| | | $("#HMouldName").val(obj[0].模å
·åç§°); |
| | | $("#HMouldID").val(obj[0].hmainid); |
| | | get_MaintainItem(); |
| | | } |
| | | |
| | | function GetMouldMainPlanValue(obj) { //ä¿å
»è®¡å |
| | | $("#HPlanName").val(obj[0].åæ®å·); |
| | | $("#HPlanNo").val(obj[0].hmainid); |
| | | get_MaintainItem1(); |
| | | } |
| | | |
| | | function GetMouldMaintainRuleValue(obj) { //ä¿å
»è§ç¨ |
| | | $("#HMouldMaintainRuleInterNo").val(obj[0].åæ®å·); |
| | | $("#HMouldMaintainRuleInterID").val(obj[0].hmainid); |
| | | get_MaintainItem2(); |
| | | } |
| | | |
| | | function previewImg(obj) { |
| | | var img = new Image(); |
| | | img.src = obj.src; |
| | | var height = img.height * 1.2; //è·åå¾çé«åº¦ |
| | | var width = img.width * 1.2; //è·åå¾ç宽度 |
| | | var imgHtml = "<img src='" + obj.src + "' width='100%' height='100%'/>"; |
| | | //å¼¹åºå± |
| | | layer.open({ |
| | | type: 1, |
| | | shade: 0.8, |
| | | offset: 'auto', |
| | | area: ['80%', '80%'], |
| | | shadeClose: true, |
| | | scrollbar: false, |
| | | title: "å¾çé¢è§", //䏿¾ç¤ºæ é¢ |
| | | content: imgHtml, //æè·çå
ç´ ï¼æ³¨æï¼æå¥½è¯¥æå®çå
ç´ è¦åæ¾å¨bodyæå¤å±ï¼å¦åå¯è½è¢«å
¶å®çç¸å¯¹å
ç´ æå½±å |
| | | cancel: function () { |
| | | //layer.msg('æè·å°±æ¯ä»é¡µé¢å·²ç»åå¨çå
ç´ ä¸ï¼å
裹layerçç»æ', { time: 5000, icon: 6 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //#region ä¸è½½å·²ä¸ä¼ çæä»¶ |
| | | function dowload(r) { |
| | | //å¾å°å½åæå¨è¡ |
| | | var rows = r.parentNode.parentNode.rowIndex; |
| | | //å¾å°æå¨è¡ç第äºåçå
容:æä»¶å°å |
| | | var url = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(6)").html(); |
| | | /*window.location.href = url;*/ |
| | | window.open(url) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å é¤å·²ä¸ä¼ çæä»¶ |
| | | function toManager(r) { |
| | | //å¾å°å½åæå¨è¡ |
| | | var rows = r.parentNode.parentNode.rowIndex; |
| | | //å¾å°æå¨è¡ç第ä¸åçå
容:主é®ID |
| | | var HItemID = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(0)").html(); |
| | | //å¾å°æå¨è¡ç第äºåçå
容:åæ®å· |
| | | var HSourceBillNo = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(1)").html(); |
| | | //å¾å°æå¨è¡ç第ä¸åçå
容:æä»¶åç§° |
| | | var HFileName = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(2)").html(); |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | |
| | | //å é¤å·²ä¸ä¼ æä»¶ |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldMaintainBill/DeleteFilelist', |
| | | type: "GET", |
| | | data: { "HItemID": HItemID, "HSourceBillNo": HSourceBillNo, "HFileName": HFileName }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | $("#ProImgByList tr").eq((rows - 1)).remove(); |
| | | } |
| | | else { |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |