| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¶å人</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate"> |
| | |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¶å人</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy"> |
| | | </div> |
| | | </div>--> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | |
| | | <span>å
¶ä»æ¡ä»¶></span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | //#endregion |
| | | |
| | | var option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | ,{ field: 'hmainid', title: '忮ID', hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 160, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>"} |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 160 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 160, hide: true } |
| | | , { field: 'HEquipID', title: 'HEquipID', width: 200, hide: true } |
| | | , { field: '设å¤ä»£ç ', title: '设å¤ä»£ç ', width: 200 } |
| | | , { field: '设å¤åç§°', title: '设å¤åç§°', width: 200 } |
| | | , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true } |
| | | , { field: 'éªæ¶äººä»£ç ', title: 'éªæ¶äººä»£ç ', width: 200 } |
| | | , { field: 'éªæ¶äºº', title: 'éªæ¶äºº', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: 'ç»´ä¿®é¨é¨ä»£ç ', title: 'ç»´ä¿®é¨é¨ä»£ç ', width: 115 } |
| | | , { field: 'ç»´ä¿®é¨é¨åç§°', title: 'ç»´ä¿®é¨é¨åç§°', width: 200 } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true } |
| | | , { field: 'è´è´£äººä»£ç ', title: 'è´è´£äººä»£ç ', width: 115 } |
| | | , { field: 'è´è´£äºº', title: 'è´è´£äºº', width: 200 } |
| | | , { field: 'åçæ¥æ', title: 'åçæ¥æ', width: 160, templet: "<div>{{d.åçæ¥æ ==null ?'':layui.util.toDateString(d.åçæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 200 } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 115 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 200, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'HRepairCheckID1', title: 'HRepairCheckID1', width: 115, hide: true } |
| | | , { field: '表ä½è´è´£äººä»£ç ', title: '表ä½è´è´£äººä»£ç ', width: 200 } |
| | | , { field: '表ä½è´è´£äºº', title: '表ä½è´è´£äºº', width: 200 } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 200 } |
| | | , { field: 'å
³éç±»å', title: 'å
³éç±»å', width: 200 } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200 } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200 } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200 } |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 200 } |
| | | , { field: 'HBillType', title: 'HBillType', width: 200, hide: true } |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | | //#endregion |
| | | |
| | | ]] |
| | | }; |
| | | |
| | | var index = layer.load(0); |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch (obj.event) { |
| | | //æ°å¢æé® |
| | | case 'btn-Add': |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢è®¾å¤ç»´ä¿®éªæ¶å', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../设å¤ç®¡ç/Sb_Add_EqpRepairCheckBillList.html', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | set_AddNew(); |
| | | break; |
| | | //ç¼è¾æé® |
| | | case 'btn-Edit': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//é空éªè¯ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾è®¾å¤ç»´ä¿®éªæ¶å' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../设å¤ç®¡ç/Sb_Add_EqpRepairCheckBillList.html?hID=' + hID |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | |
| | | set_ShowBill(); |
| | | break; |
| | | case 'btn-Delete': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sb_EqpRepairWorkBill/DeltetEqpRepairCheckBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | set_DeleteBill(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpRepairCheckWorkBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | $("#HDate").val("");//å¼å§æ¥æ |
| | | $("#HDate1").val("");//ç»ææ¥æ |
| | | $("#HBillNo").val("");//åæ®å· |
| | | $("#btnSearch").click(); |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) {//éæ©ä»ä½ |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | }) |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼(主表) |
| | | set_InitGrid(); |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | } |
| | | //åå§åè¡¨æ ¼(主表) |
| | | function set_InitGrid() { |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HDate1").val(Format(new Date(), "yyyy-MM-dd")); |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: '忮ID', hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 160, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 160 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 160, hide: true } |
| | | , { field: 'HEquipID', title: 'HEquipID', width: 200, hide: true } |
| | | , { field: '设å¤ä»£ç ', title: '设å¤ä»£ç ', width: 200 } |
| | | , { field: '设å¤åç§°', title: '设å¤åç§°', width: 200 } |
| | | , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true } |
| | | , { field: 'éªæ¶äººä»£ç ', title: 'éªæ¶äººä»£ç ', width: 200 } |
| | | , { field: 'éªæ¶äºº', title: 'éªæ¶äºº', width: 200 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: 'ç»´ä¿®é¨é¨ä»£ç ', title: 'ç»´ä¿®é¨é¨ä»£ç ', width: 115 } |
| | | , { field: 'ç»´ä¿®é¨é¨åç§°', title: 'ç»´ä¿®é¨é¨åç§°', width: 200 } |
| | | , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true } |
| | | , { field: 'è´è´£äººä»£ç ', title: 'è´è´£äººä»£ç ', width: 115 } |
| | | , { field: 'è´è´£äºº', title: 'è´è´£äºº', width: 200 } |
| | | , { field: 'åçæ¥æ', title: 'åçæ¥æ', width: 160, templet: "<div>{{d.åçæ¥æ ==null ?'':layui.util.toDateString(d.åçæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 200 } |
| | | , { field: 'å
é¨åæ®å·', title: 'å
é¨åæ®å·', width: 115 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 200, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 200 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 200, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ? '':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 200 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 200, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 200 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 200, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 200 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 200, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'hsubid', title: 'hsubid', width: 200, hide: true } |
| | | , { field: 'HRepairCheckID1', title: 'HRepairCheckID1', width: 115, hide: true } |
| | | , { field: '表ä½è´è´£äººä»£ç ', title: '表ä½è´è´£äººä»£ç ', width: 200 } |
| | | , { field: '表ä½è´è´£äºº', title: '表ä½è´è´£äºº', width: 200 } |
| | | , { field: 'è¡å
³é人', title: 'è¡å
³é人', width: 200 } |
| | | , { field: 'å
³éç±»å', title: 'å
³éç±»å', width: 200 } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 200 } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 200, hide: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200 } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 200 } |
| | | , { field: 'å
³èæ°é', title: 'å
³èæ°é', width: 200 } |
| | | , { field: 'HBillType', title: 'HBillType', width: 200, hide: true } |
| | | |
| | | ]] |
| | | } |
| | | } |
| | | |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpRepairCheckWorkBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(wait); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //æ°å¢ |
| | | function set_AddNew() { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢è®¾å¤ç»´ä¿®éªæ¶å ', |
| | | closeBtn: false, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../设å¤ç®¡ç/Sb_Add_EqpRepairCheckBillList.html?OperationType=1&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å é¤ |
| | | function set_DeleteBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var HInterID = data[0].hmainid.toString(); |
| | | |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sb_EqpRepairWorkBill/DeltetEqpRepairCheckBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | } |
| | | |
| | | //ç¼è¾ |
| | | function set_ShowBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var linterid = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//é空éªè¯ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾è®¾å¤ç»´ä¿®éªæ¶å ' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../设å¤ç®¡ç/Sb_Add_EqpRepairCheckBillList.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=' |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | var HCreateBy = $("#HCreateBy").val();//å¶å人 |
| | | var HDate = $("#HDate").val();//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (HCreateBy) { |
| | | sWhere += " and å¶å人 like '%" + HCreateBy + "%'"; |
| | | } |
| | | if (HDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HDate + "'"; |
| | | } |
| | | if (HDate1) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HDate1 + "'"; |
| | | } |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | var index = layer.load(0); |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Sb_EqpRepairWorkBill/GetEqpRepairCheckWorkBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | |
| | | get_Display(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶æ¹æ³ |
| | | function set_ClearQuery() { |
| | | $("#HBillNo").val("");//åæ®å· |
| | | $("#HCreateBy").val("");//å¶å人 |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); //å¼å§æ¥æ |
| | | $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));// ç»ææ¥æ |
| | | sWhere = ""; |
| | | //$("#HBillType").val("");//åæ®ç±»å |
| | | //$("#HBillNo").val("");//åæ®å· |
| | | //$("#HSourceBillNo").val("");//æºåå· |
| | | //$("#HCreateBy").val("");//å¶å人 |
| | | //$("#BenginHCreateDate").val("");//å¼å§å¶åæ¶é´ |
| | | //$("#EndHCreateDate").val("");//ç»æå¶åæ¶é´ |
| | | }); |
| | | |
| | | //çå¬è¡åå»äºä»¶ |
| | | table.on('rowDouble(mainTable)', function (obj) { |
| | | layer.alert("åå»äºä»¶", { icon: 1 }); |
| | | }); |
| | | |
| | | |
| | | //laydate.render({ |
| | | // elem: '#HDate' |
| | | // , type: 'datetime' |
| | | // , trigger: 'click' |
| | | // , format:'yyyy-MM-dd HH:mm' |
| | | //}); |
| | | |
| | | $("#btnSearch").click(); |
| | | } |
| | | //#endregion |
| | | |
| | | //以䏿¯layui模å |
| | | }); |