| | |
| | | <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="" class="layui-btn layui-btn-radius">æ¸
空</button>--> |
| | | <button type="button" lay-submit="" lay-filter="Saver" 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-tab layui-tab-card" lay-filter="TabTest"> |
| | |
| | | <textarea name="HExplanation" id="HExplanation" placeholder="请è¾å
¥å
容" class="layui-textarea"></textarea> |
| | | </td> |
| | | </tr> |
| | | <tr style="display:none;"> |
| | | <tr> |
| | | <th>æºåç±»å</th> |
| | | <td class="bz_td"> |
| | | <select name="HMainSourceBillType" lay-filter="HMainSourceBillType" id="HMainSourceBillType"> |
| | | <option value="设å¤ç»´ä¿®ç»è®°å" selected="selected">设å¤ç»´ä¿®ç»è®°å</option> |
| | | <option value="æå·¥å½å
¥">æå·¥å½å
¥</option> |
| | | <option value="设å¤ç»´ä¿®æ´¾å·¥å">设å¤ç»´ä¿®æ´¾å·¥å</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æ
éç»è®°å</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HMainSourceBillNo" class="layui-input" id="HMainSourceBillNo" placeholder="éæ©æ
éç»è®°å" style="background-color:#efefef4d;"> |
| | |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>æ¶é´åä½</th> |
| | | <td class="bz_td"> |
| | | <select name="HCycleUnit" lay-filter="aihao" id="HCycleUnit" style="border-radius: 50px;"> |
| | | <option value="å°æ¶">å°æ¶</option> |
| | | <option value="天">天</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>设å¤åç§°</th> |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarName" class="layui-input LineHeight" id="HBarName" style="border-radius: 50px;background-color:#EDEDED;" readonly> |
| | |
| | | <td class="bz_td"> |
| | | <input type="text" name="HBarModel" class="layui-input LineHeight" id="HBarModel" style="border-radius: 50px;background-color:#EDEDED;" readonly> |
| | | </td> |
| | | </tr> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | ,laydate = layui.laydate |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | |
| | | //#region æ¥ææ¶é´éæ©å¨ |
| | |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HExplanation": "", "HRemark": ""}; |
| | | var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HEmpID": 0, "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" }; |
| | | switch (obj.event) { |
| | | //æ°å¢ä¸è¡ |
| | | case 'btn-AddLine': btnAddLine(NewRow); |
| | |
| | | |
| | | $("#HDeptID").val(sessionStorage["HDeptID"]); //é¨é¨ID |
| | | $("#HDeptName").val(sessionStorage["HDept"]); //é¨é¨ |
| | | //$("#HEmpID").val(sessionStorage["HBillerID"]); //维修人ID |
| | | //$("#HEmpName").val(sessionStorage["HUserName"]); //维修人 |
| | | $("#HEmpID").val(sessionStorage["HKeeperID"]); //维修人ID |
| | | $("#HEmpName").val(sessionStorage["HKeeper"]); //维修人 |
| | | $("#HManagerID").val(sessionStorage["HManagerID"]); //责任人ID |
| | | $("#HManagerName").val(sessionStorage["HManagerName"]); //责任人 |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å建人 |
| | | //模治å
·æ¡ç æ¯å¦æ«ææ è®° |
| | | var HProcExchBillNoFlag = false; |
| | | |
| | | |
| | | |
| | | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | $('#HBarCode').on('keydown', function (event) { |
| | |
| | | |
| | | //æäº¤ |
| | | form.on('submit(Saver)', function (data) {//æäº¤ |
| | | option.data = [{ "HRepairID": $("#HRepairID").val(), "HRepairCode": "", "HRepairName": "", "HManagerID": $("#HManagerID").val(), "HManagerCode": "", "HManagerName": "", "HRepairExplanation": $("#HExplanation").val(), "HRemark": "", "HEmpID": $("#HEmpID").val(), "HSourceInterID": $("#HMainSourceInterID").val(), "HSourceEntryID": $("#HMainSourceEntryID").val(), "HSourceBillNo": $("#HMainSourceBillNo").val() }]; |
| | | table.render(option); |
| | | //var tableData = data.field; |
| | | data.field.HMaker = sessionStorage["HUserName"];//å¶å人 |
| | | var oMain = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | var sMainSub = oMain + ';' + sSubStr; |
| | | |
| | | if (AllowLoadData(sSubStr)) { |
| | | $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);//ä¿åæé®ç¦ç¨ |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sb_PDA_EqpRepairWorkBill/SaveGetEqpRepairWorkBillList", |
| | |
| | | $('#Saver').addClass("layui-btn-disabled").attr("disabled", true); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | $('#Saver').removeClass("layui-btn-disabled").attr("disabled", false);//ä¿åæé®å¯ç¨ |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | |
| | | // æ¸
空表å ï¼âformDataâæ¯è¡¨åçidï¼ |
| | | $("#formData")[0].reset(); |
| | | layui.form.render(); |
| | | option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HExplanation": "", "HRemark": "" }]; |
| | | option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": $("#HManagerID").val(), "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": $("#HRemark").val(), "HEmpID": 0, "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" }]; |
| | | table.render(option); |
| | | |
| | | $("#HBarCode").focus(); |
| | |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å建人 |
| | | }) |
| | | |
| | | //#region éåºæé® |
| | | //#region éåºæé® |
| | | form.on('submit(Cancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | Pub_Close(2); |
| | |
| | | , { field: 'HManagerID', title: 'HManagerID', edit: 'text', hide: true } |
| | | , { field: 'HManagerCode', title: 'è´è´£äººä»£ç ', edit: 'text', event: "HManagerCode" } |
| | | , { field: 'HManagerName', title: 'è´è´£äºº', edit: 'text' } |
| | | , { field: 'HExplanation', title: 'ç»´ä¿®è¦æ±', edit: 'text' } |
| | | , { field: 'HRepairExplanation', title: 'ç»´ä¿®è¦æ±', edit: 'text' } |
| | | , { field: 'HRemark', title: '夿³¨', event: "", edit: 'text' } |
| | | , { field: 'HEmpID', title: 'HEmpID', edit: 'text', hide: true } |
| | | , { field: 'HSourceInterID', title: 'æºåå
ç ', edit: 'text', hide: true } |
| | | , { field: 'HSourceEntryID', title: 'æºååå
ç ', edit: 'text', hide: true } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', edit: 'text', hide: true } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 150 } |
| | | ]; |
| | | option = { |
| | |
| | | |
| | | } |
| | | }; |
| | | option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HExplanation": "", "HRemark": "" }]; |
| | | option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRepairExplanation": "", "HRemark": "", "HEmpID": 0, "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "" }]; |
| | | table.render(option); |
| | | } |
| | | //å¢å ä¸è¡ |
| | |
| | | } |
| | | //é空éªè¯ |
| | | function AllowLoadData(sSubStr) { |
| | | if ($("#HManagerID").val() == 0) { |
| | | layer.msg("è´è´£äººæ²¡æéæ©ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | |
| | | if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") { |
| | | layer.msg("没æè®¾å¤æç»è®°å½", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | var data = result.data[0]; |
| | | $("#HEquipID").val(data.HItemID); |
| | | $("#HEquipID").val(data.HInterID); |
| | | $("#HBarName").val(data.HName); |
| | | $("#HBarSpec").val(data.HModel); |
| | | $("#HBarModel").val(data.HModel2); |
| | | $("#HManagerID").val(data.HRepairEmpID); |
| | | $("#HManagerName").val(data.è´è´£äºº); |
| | | $("#HMainSourceBillNo").val(data.æ
éç»è®°å); |
| | | $("#HMainSourceInterID").val(data.æ
éç»è®°åID); |
| | | $("#HMainSourceEntryID").val(data.æ
éç»è®°ååID); |
| | | |
| | | $("#HQty").val(1); |
| | | $("#HBarCode").attr("readonly", "readonly");//æ¡å½¢ç åªè¯» |
| | | $("#HBarCode").css("background-color", "#efefef4d"); |