| | |
| | | .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 id="layout1" class="layui-fluid"> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-md12"> |
| | |
| | | </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"> |
| | |
| | | <label class="layui-form-label">产åå¨å
·<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HMouldName" id="HMouldName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMouldID" id="HMouldID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMouldID" id="HMouldID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HMouldList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label">ç¹æ£è®¡åç¼å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HPlanNo" id="HPlanNo" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç¹æ£è®¡åå
ç <label style="color:red"> * </label></label> |
| | | <label class="layui-form-label">ç¹æ£è®¡åç¼å·<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HPlanInterName" id="HPlanInterName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HPlanInterID" id="HPlanInterID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="HPlanNo" id="HPlanNo" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HPlanInterID" id="HPlanInterID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMouldDotCheckPlanEntryID" id="HMouldDotCheckPlanEntryID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMouldDotCheckPlanInterID" id="HMouldDotCheckPlanInterID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HPlanInterList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | |
| | | <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" style="width:95px;">å¨å
·ç¹æ£è§ç¨<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HMouldDotCheckRuleName" id="HMouldDotCheckRuleName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMouldDotCheckRuleID" id="HMouldDotCheckRuleID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="btnHMouldDotCheckRule" 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 type="text" name="HErrNote" id="HErrNote" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">é大å®å
¨<br />éæ£è®°å½</label> |
| | | <div class="layui-input-inline" style="margin-top:10px;"> |
| | | <input type="text" name="HBigSafeNote" id="HBigSafeNote" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç¹æ£æ°æ®</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HDotCheckNote" id="HDotCheckNote" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">çäº§çæ¬¡</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HShiftsID" id="HShiftsID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <input type="text" name="HShiftsName" id="HShiftsName" class="layui-input" value="" style="float:left;width:150px;background-color:#efefef4d;" readonly="readonly"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="btnHShifts" 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"> |
| | |
| | | <textarea placeholder="请è¾å
¥ç»´å¤æ³¨" class="layui-textarea" name="HRemark" id="HRemark"></textarea> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æç»ç»è®º</label> |
| | | <div class="layui-input-inline"> |
| | | <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> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>å¢å ä¸è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="toolbarDemo1"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine1"><i class="layui-icon layui-icon-form"></i>å¢å ä¸è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine1"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="xuhao"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | <script type="text/html" id="xuhao1"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | </form> |
| | |
| | | <!--<a class="layui-btn layui-btn-xs" lay-event="edit">ç¼è¾</a>--> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <script type="text/html" id="barDemo1"> |
| | | <!--<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="HDotCheckResult"> |
| | | <select name="HDotCheckResult" lay-filter="HDotCheckResult" id="HDotCheckResult{{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/zgqCustom/zgqCustom.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.$ |
| | | , admin = layui.admin |
| | |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , upload = layui.upload |
| | | , element = layui.element; |
| | | var option; |
| | | var sBillType = "3807"; |
| | | var option = [];//ç¹æ£ |
| | | var option1 = [];//é
ä»¶ |
| | | |
| | | var sBillType = "3821"; |
| | | //var TabRow = { "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "","HManagerName":"", "HRemark": "" }; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //#region ã卿è·å模ååç§°ã |
| | | var HModuleType = "3821"; |
| | | //éè¿åæ®ç±»åï¼ä»æ°æ®åºå¨æè·ååæ®æ¨¡åå½å,å¼ç¨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 = { "HDotCheckItemID":0,"HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "" }; |
| | | var NewRow = { "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": "Y" }; |
| | | switch (obj.event) { |
| | | //æ°å¢ä¸è¡ |
| | | case 'btn-AddLine': btnAddLine(NewRow); |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | console.log(checkStatus); |
| | | $("#HPlanInterName").val(checkStatus.data[0].åæ®å·); |
| | | $("#HPlanInterID").val(checkStatus.data[0].hmainid); |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sc_MouldDotCheckBill/Sc_MouldDotCheckSubBillListByPlan', |
| | | type: "GET", |
| | | data: { "HPlanInterID": $("#HPlanInterID").val() }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.data; |
| | | table.render(option); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | $("#HPlanNo").val(checkStatus.data[0].åæ®å·); |
| | | $("#HPlanInterID").val(checkStatus.data[0].hmainid); |
| | | $("#HMouldID").val(checkStatus.data[0].HMouldID); |
| | | $("#HMouldName").val(checkStatus.data[0].äº§åæ¨¡å
·); |
| | | $("#HMouldDotCheckRuleID").val(checkStatus.data[0].HMouldDotCheckRuleID); |
| | | $("#HMouldDotCheckRuleName").val(checkStatus.data[0].HMouldDotCheckRuleNo); |
| | | $("#HMouldDotCheckPlanInterID").val(checkStatus.data[0].hmainid); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | |
| | | //get_DocCheckItem(checkStatus.data[0].hmainid); |
| | | get_DocCheckItem3(); |
| | | |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | |
| | | //表头信æ¯çäº§çæ¬¡å¼¹çª |
| | | form.on('submit(btnHShifts)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'çäº§çæ¬¡å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true |
| | | , content: ['../../åºç¡èµæ/ç产åºç¡èµæ/Gy_ShiftsList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HShiftsID").val(checkStatus.data[0].HItemID); |
| | | $("#HShiftsName").val(checkStatus.data[0].çæ¬¡åç§°); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | |
| | | //è¡¨å¤´äº§åæ¨¡å
·ä¿¡æ¯ |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/MouldInformation.html', 'yes'], |
| | | content: ['../../模治å
·ç®¡ç/模治å
·ç®¡ç/Gy_MouldFileList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | console.log(checkStatus); |
| | | $("#HMouldName").val(checkStatus.data[0].HName); |
| | | $("#HMouldID").val(checkStatus.data[0].HItemID); |
| | | $("#HMouldName").val(checkStatus.data[0].模å
·åç§°); |
| | | $("#HMouldID").val(checkStatus.data[0].hmainid); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | |
| | | }); |
| | | }); |
| | | |
| | | //表头å¨å
·ç¹æ£è§ç¨ä¿¡æ¯ |
| | | form.on('submit(btnHMouldDotCheckRule)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å¨å
·ç¹æ£è§ç¨å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../模治å
·ç®¡ç/å¨å
·ç¹æ£è§ç¨å/Sc_MouldDotCheckRuleBillList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | console.log(checkStatus); |
| | | $("#HMouldDotCheckRuleName").val(checkStatus.data[0].åæ®å·); |
| | | $("#HMouldDotCheckRuleID").val(checkStatus.data[0].hmainid); |
| | | $("#HMouldID").val(checkStatus.data[0].HMouldID); |
| | | $("#HMouldName").val(checkStatus.data[0].模å
·åç§°); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | get_DocCheckItem2(checkStatus.data[0].hmainid); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //è¡éæ©å¤çï¼ç¹æ£ç»æï¼ |
| | | form.on('select(HDotCheckResult)', 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.HDotCheckResult = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | |
| | | var HQty = 0;//表ä½è¡ä¸åæ ¼æ°é |
| | | for (let i = 0; i < table.cache['mainTable'].length; i++) { |
| | | if (table.cache['mainTable'][i].HDotCheckResult == "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'); |
| | | }); |
| | | |
| | | |
| | | //è¡¨æ ¼è¡å
äºä»¶å¿«æ·é®çé |
| | |
| | | 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å
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ç©æå表', |
| | | title: 'ç¹æ£é¡¹ç®å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/CheckItemInformation.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/åºç¡èµæ/Gy_DotCheckList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | //æé®ãæé®ä¸ãçåè° |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HDotCheckItemID: checkStatus.data[0].HItemID, |
| | | HDotCheckItem: checkStatus.data[0].HName |
| | | HDotCheckItem: checkStatus.data[0].ç¹æ£é¡¹ç®åç§° |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event === 'HDotCheckItemClassName') //ç¹æ£é¡¹ç®åç±» |
| | | { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ç¹æ£é¡¹ç®åç±»å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true |
| | | , content: ['../../åºç¡èµæ/åºç¡èµæ/Gy_DotCheckItemClassList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HDotCheckItemClassID: checkStatus.data[0].HItemID, |
| | | HDotCheckItemClassName: checkStatus.data[0].ç¹æ£é¡¹ç®åç±»åç§° |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event === 'HDotCheckItemMethodName') //ç¹æ£æ¹æ³ |
| | | { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ç¹æ£æ¹æ³å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true |
| | | , content: ['../../åºç¡èµæ/åºç¡èµæ/Gy_DotCheckItemMethodList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HDotCheckItemMethodID: checkStatus.data[0].HItemID, |
| | | HDotCheckItemMethodName: checkStatus.data[0].ç¹æ£æ¹æ³åç§° |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | } |
| | | }); |
| | | } |
| | | |
| | | obj.event = ""; |
| | | return false; |
| | | |
| | | } |
| | | |
| | | |
| | | }) |
| | | } |
| | | |
| | | |
| | | //æ°å¢ |
| | | form.on('submit(set_AddNew)', function (data) { |
| | |
| | | function set_InitGrid() { |
| | | //表头 |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计è¡' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe" } |
| | | , { field: 'HDotCheckItemID', title: 'ç¹æ£ID', edit: 'text', hide: true } |
| | | , { field: 'HDotCheckItem', title: 'ç¹æ£é¡¹ç®', edit: 'text', event: 'HDotCheckItem'} |
| | | , { field: 'HDotCheckItem', title: 'ç¹æ£é¡¹ç®', edit: 'text', event: 'HDotCheckItem' } |
| | | , { field: 'HDotCheckItemClassID', title: 'ç¹æ£é¡¹ç®åç±»ID', edit: 'text', hide: true } |
| | | , { field: 'HDotCheckItemClassName', title: 'ç¹æ£é¡¹ç®åç±»', edit: 'text', event: 'HDotCheckItemClassName' } |
| | | , { field: 'HDotCheckItemMethodID', title: 'ç¹æ£æ¹æ³ID', edit: 'text', hide: true } |
| | | , { field: 'HDotCheckItemMethodName', title: 'ç¹æ£æ¹æ³', edit: 'text', event: 'HDotCheckItemMethodName' } |
| | | , { field: 'HDotCheckResult', title: 'ç¹æ£ç»æ', templet: '#HDotCheckResult', event: 'HDotCheckResult' } |
| | | , { field: 'HDotCheckPart', title: 'ç¹æ£é¨ä½', edit: 'text' } |
| | | , { field: 'HClaim', title: 'å
·ä½è¦æ±', edit: 'text' } |
| | | , { field: 'HManagerID', title: 'è´è´£äººID', edit: 'text', hide: true } |
| | |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , height: 500 |
| | | , cols: [columns] |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //æ æºåæ°å¢ |
| | | function set_AddFNew() { |
| | | //è·åæå¤§åæ®å· |
| | | get_MAXNum(); |
| | | option.data = []; |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": "Y" }]; |
| | | table.render(option); |
| | | } |
| | | |
| | |
| | | function set_EditFromGrid() { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | set_EditGrid(linterid); //ç¼è¾è·åè¡¨ä½ |
| | | option.data = [{ "HDotCheckItemID":0,"HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "" }]; |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": "Y" }]; |
| | | table.render(option); |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | // ç¹æ£è®¡å ç¹æ£ä¿¡æ¯ é
ä»¶ä¿¡æ¯ |
| | | window.get_DocCheckItem = function (data) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBillListProjectDetai", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sqlWhere": "and HInterID=" + data }, |
| | | success: function (result) { |
| | | if (result != null) { |
| | | if (result.count == 1) { |
| | | var BYData = result.list[0];//ç¹æ£ |
| | | //var PJData = result.list[1];//é
ä»¶ |
| | | //var rowdate1 = layui.table.cache["mainTable"]; |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": "Y" }]; |
| | | table.render(option); |
| | | |
| | | if (BYData.length != 0) //è¡¨ä½æ°æ®ä¸ä¸ºç©ºæ¶ |
| | | { |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < BYData.length; i++) { |
| | | var checkrow = { |
| | | "HDotCheckItemID": BYData[i].ç¹æ£é¡¹ç®ID, "HDotCheckItem": BYData[i].ç¹æ£é¡¹ç®, "HDotCheckPart": BYData[i].ç¹æ£é¨ä½, |
| | | "HClaim": BYData[i].å
·ä½è¦æ±, "HManagerID": BYData[i].è´è´£äººID, "HManagerNumber": BYData[i].è´è´£ä»£ç , |
| | | "HManagerName": BYData[i].è´è´£äººåç§°, "HRemark": BYData[i].表ä½å¤æ³¨, "HDotCheckItemClassID": BYData[i].HDotCheckItemClassID, "HDotCheckItemClassName": BYData[i].ç¹æ£é¡¹ç®åç±»åç§°, "HDotCheckItemMethodID": BYData[i].HDotCheckItemMethodID, "HDotCheckItemMethodName": BYData[i].ç¹æ£æ¹æ³åç§°, "HDotCheckResult": "Y" |
| | | }; |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | |
| | | option.data = buttonArr; |
| | | table.render(option); |
| | | } |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //ç¹æ£è§ç¨ ç¹æ£ä¿¡æ¯ é
ä»¶ä¿¡æ¯ |
| | | window.get_DocCheckItem2 = function (data) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_MouldDotCheckRuleBill/Sc_MouldDotCheckRuleBillSubAndSubItem", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HInterID": data }, |
| | | success: function (result) { |
| | | if (result != null) { |
| | | if (result.count == 1) { |
| | | var BYData = result.list[0];//ç¹æ£ |
| | | //var PJData = result.list[1];//é
ä»¶ |
| | | //var rowdate1 = layui.table.cache["mainTable"]; |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": "Y" }]; |
| | | table.render(option); |
| | | |
| | | if (BYData.length != 0) //è¡¨ä½æ°æ®ä¸ä¸ºç©ºæ¶ |
| | | { |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < BYData.length; i++) { |
| | | var checkrow = { |
| | | "HDotCheckItemID": BYData[i].ç¹æ£é¡¹ç®ID, "HDotCheckItem": BYData[i].ç¹æ£é¡¹ç®, "HDotCheckPart": BYData[i].ç¹æ£é¨ä½, |
| | | "HClaim": BYData[i].å
·ä½è¦æ±, "HManagerID": BYData[i].è´è´£äººID, "HManagerNumber": BYData[i].è´è´£äººä»£ç , |
| | | "HManagerName": BYData[i].è´è´£äººåç§°, "HRemark": BYData[i].å夿³¨, "HDotCheckItemClassID": BYData[i].HDotCheckItemClassID, "HDotCheckItemClassName": BYData[i].ç¹æ£é¡¹ç®åç±»åç§°, "HDotCheckItemMethodID": BYData[i].HDotCheckItemMethodID, "HDotCheckItemMethodName": BYData[i].ç¹æ£æ¹æ³åç§°, "HDotCheckResult": "Y" |
| | | }; |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | option.data = buttonArr; |
| | | table.render(option); |
| | | } |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function get_DocCheckItem3() { |
| | | var HPlanID = $("#HMouldDotCheckPlanInterID").val() //ç¹æ£è®¡åID |
| | | var HDate = $("#HDate").val(); //å½å¤©æ¥æ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBill_PlanList", |
| | | type: "GET", |
| | | data: { "HInterID": HPlanID, "HDate": HDate }, |
| | | success: function (result) { |
| | | if (result != null) { |
| | | if (result.count == 1) { |
| | | var DJData = result.data;// |
| | | var rowdate1 = layui.table.cache["mainTable"]; |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": " ", "HDotCheckPart": " ", "HClaim": " ", "HManagerID": 0, "HManagerNumber": " ", "HManagerName": " ", "HRemark": " ", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": "Y" }]; |
| | | table.render(option); |
| | | |
| | | if (DJData.length != 0) //è¡¨ä½æ°æ®ä¸ºç©ºæ¶ |
| | | { |
| | | $("#HMouldDotCheckPlanEntryID").val(DJData[0].HPlanEntryID); |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < DJData.length; i++) { |
| | | var checkrow = { |
| | | "HDotCheckItemID": DJData[i].HDotCheckID, "HDotCheckItem": DJData[i].ç¹æ£é¡¹ç®, |
| | | "HDotCheckPart": DJData[i].ç¹æ£é¨ä½, "HClaim": DJData[i].å
·ä½è¦æ±, "HManagerID": DJData[i].HEmployeeID, |
| | | "HManagerNumber": DJData[i].è´è´£äººä»£ç , "HManagerName": DJData[i].è´è´£äººåç§°, "HRemark": DJData[i].HRemark, |
| | | "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": "Y" |
| | | }; |
| | | |
| | | buttonArr.push(checkrow); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | option.data = buttonArr; |
| | | table.render(option); |
| | | //table.reload("mainTable", { |
| | | // data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | //}) |
| | | } else { |
| | | layer.alert("ç¹åæ¶é´æ®µææ éè¦ç¹æ£çè§å", { icon: 5 }); |
| | | } |
| | | } |
| | | else { |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "", "HDotCheckResult": "Y" }]; |
| | | table.render(option); |
| | | //layer.alert("è¯¥è®¾å¤ææ é»è®¤ç¹æ£è®°å½", { icon: 5 }); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //ç¼è¾è·å表头 |
| | | function set_EditForm(linterid) { |
| | | |
| | |
| | | data: { |
| | | "HID": linterid |
| | | }, |
| | | async: false, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data.h_v_Sc_MouldDotCheckBillList[0]; |
| | |
| | | , "HEndDate": formatDate(data.ç¹æ£ç»ææ¥æ) |
| | | , "HExplanation": data.æè¦ |
| | | , "HRemark": data.夿³¨ |
| | | , "HPlanNo": data.ç¹æ£è®¡åç¼å· |
| | | , "HPlanInterID": data.HPlanInterID |
| | | , "HPlanInterName": data.ç¹æ£è®¡åå
ç |
| | | , "HMouldID": data.HMouldID |
| | | |
| | | //, "HPlanNo": data.ç¹æ£è®¡åç¼å· |
| | | , "HPlanInterID": data.HPlanInterID == undefined ? 0 : data.HPlanInterID |
| | | , "HPlanNo": data.ç¹æ£è®¡åå
ç |
| | | , "HMouldID": data.HMouldID == undefined ? 0 : data.HPlanInterID |
| | | , "HMouldDotCheckRuleName": data.å¨å
·ç¹æ£è§ç¨åæ®å· |
| | | , "HMouldDotCheckRuleID": data.HMouldDotCheckRuleID == undefined ? 0 : data.HMouldDotCheckRuleID |
| | | , "HErrNote": data.å¼å¸¸æ
åµè®°å½ //å¼å¸¸æ
åµè®°å½ |
| | | , "HBigSafeNote": data.é大å®å
¨éæ£è®°å½ //é大å®å
¨éæ£è®°å½ |
| | | , "HDotCheckNote": data.ç¹æ£æ°æ® //ç¹æ£æ°æ® |
| | | , "HShiftsID": data.HShiftsID == undefined ? 0 : data.HShiftsID |
| | | , "HShiftsName": 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' }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sc_MouldDotCheckBill/Sc_MouldDotCheckBillListProjectDetai', |
| | | type: "GET", |
| | | data: { "sqlWhere": "and hmainid=" + linterid }, |
| | | data: { "sqlWhere": "and HInterID=" + linterid }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.data; |
| | | var data = result.data; |
| | | var subarr = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | subarr.push({ "HDotCheckItemID": data[i].ç¹æ£é¡¹ç®ID, "HDotCheckItem": data[i].ç¹æ£é¡¹ç®, "HDotCheckPart": data[i].ç¹æ£é¨ä½, "HClaim": data[i].å
·ä½è¦æ±, "HManagerID": data[i].è´è´£äººID, "HManagerNumber": data[i].è´è´£äººä»£ç , "HManagerName": data[i].è´è´£äººåç§°, "HRemark": data[i].å夿³¨2, "HDotCheckItemClassID": data[i].HDotCheckItemClassID, "HDotCheckItemClassName": data[i].ç¹æ£é¡¹ç®åç±»åç§°, "HDotCheckItemMethodID": data[i].HDotCheckItemMethodID, "HDotCheckItemMethodName": data[i].ç¹æ£æ¹æ³åç§°, "HDotCheckResult": data[i].ç¹æ£ç»æ == "åæ ¼" ? 'Y' : 'X' }); |
| | | } |
| | | |
| | | option.data = subarr; |
| | | table.render(option); |
| | | for (let j = 0; j < data.length; j++) { |
| | | $("#HDotCheckResult" + (j + 1)).val(data[j].ç¹æ£ç»æ == "åæ ¼" ? 'Y' : 'X') |
| | | } |
| | | form.render('select'); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | |
| | | |
| | | //å¢å ä¸è¡ |
| | | function btnAddLine(NewRow) { |
| | | var tableBak = table.cache["mainTable"]; //è·åä¹åç¼è¾è¿çè¡¨æ ¼æ°æ® |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < tableBak.length; i++) { |
| | | buttonArr.push(tableBak[i]); //å°ä¹åçæ°æ®åå¨ |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HDotCheckResult' + i + '').find("option[value='" + option.data[i - 1].HDotCheckResult + "']").attr("selected", true); |
| | | } |
| | | buttonArr.push(NewRow); //å¨å°¾é¨å ä¸è¡ |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | form.render('select'); |
| | | } |
| | | |
| | | //å¤å¶ä¸è¡ |
| | | function btnCopyLine(data) { |
| | | var copydata = JSON.stringify(data); |
| | |
| | | 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++) { |
| | | $('#HDotCheckResult' + i + '').find("option[value='" + option.data[i - 1].HDotCheckResult + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | } |
| | | } |
| | | |
| | | |
| | | //è¡¨æ ¼è¡å
äºä»¶å é¤ |
| | | function set_GridDelete(obj) { |
| | |
| | | return Result; |
| | | } |
| | | |
| | | //#region æä»¶ä¸ä¼ |
| | | function PicUpload() { |
| | | //å¤å¾çä¸ä¼ |
| | | //夿件åè¡¨ç¤ºä¾ |
| | | var ProImgByList = $('#ProImgByList') |
| | | , uploadListIns = upload.render({ |
| | | elem: '#testList' |
| | | |
| | | , url: GetWEBURL() + "/Sc_MouldDotCheckBill/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_MouldDotCheckBill/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); |
| | | } |
| | | |
| | | function GetMouldDotCheckPlanValue(obj) { //å¨å
·ç¹æ£è®¡å |
| | | $("#HPlanNo").val(obj[0].åæ®å·); |
| | | $("#HPlanInterID").val(obj[0].hmainid); |
| | | get_DocCheckItem(obj[0].hmainid); |
| | | |
| | | } |
| | | |
| | | function GetMouldDotCheckRuleValue(obj) { //å¨å
·ç¹æ£è§ç¨ |
| | | $("#HMouldDotCheckRuleName").val(obj[0].åæ®å·); |
| | | $("#HMouldDotCheckRuleID").val(obj[0].hmainid); |
| | | get_DocCheckItem2(obj[0].hmainid); |
| | | } |
| | | |
| | | 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_MouldDotCheckBill/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> |