| | |
| | | option1.data = data1.list[0]; |
| | | table1.render(option1); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | |
| | | option2.data = data1.list[0]; |
| | | table2.render(option2); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | |
| | | option3.data = data1.list[0]; |
| | | table3.render(option3); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | |
| | | option4.data = data1.list[0]; |
| | | table4.render(option4); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | |
| | | option5.data = data1.list[0]; |
| | | table5.render(option5); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | |
| | | option6.data = data1.list[0]; |
| | | table6.render(option6); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | |
| | | option7.data = data1.list[0]; |
| | | table7.render(option7); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var HInterID = data[0].æ¡ç .toString(); |
| | | var HItemID = data[0].HItemID.toString(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeProdOut", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var HInterID = data[0].æ¡ç .toString(); |
| | | var HItemID = data[0].HItemID.toString(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeProdOutBack", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var HInterID = data[0].æ¡ç .toString(); |
| | | var HItemID = data[0].HItemID.toString(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeOtherIn", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var HInterID = data[0].æ¡ç .toString(); |
| | | var HItemID = data[0].HItemID.toString(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeScrapOut", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var HInterID = data[0].æ¡ç .toString(); |
| | | var HItemID = data[0].HItemID.toString(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeProdBack", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | |
| | | }); |
| | | //è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | alert(1); |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | set_GridCellCheck(obj); //è¡å
å¿«æ·é®çé |
| | | }); |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <label class="layui-form-label">æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HBeginDate" style="width:190px;"> |
| | | <input type="date" class="layui-input" id="HDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <label class="layui-form-label">é¨é¨åç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HEndDate" style="width:190px;"> |
| | | <input type="text" class="layui-input" id="HDepartName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <div class="layui-colla-content"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">é¨é¨åç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="HDepartName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æä»£ç </label> |
| | | <div class="layui-input-block"> |
| | |
| | | <label class="layui-form-label">ç©æåç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="HMaterName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è§æ ¼åå·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" id="HMaterModel" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | }); |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | var columns = [ |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计' } |
| | | , { 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 } |
| | | , { field: 'åé', title: 'åé', width: 160 } |
| | | , { field: 'æ¯é', title: 'æ¯é', width: 160 } |
| | | , { field: 'ç®é', title: 'ç®é', width: 160 } |
| | | |
| | | , { field: 'HProdOrgID', title: 'HProdOrgID', width: 200, hide: true } |
| | | , { field: 'ç产ç»ç»', title: 'ç产ç»ç»', width: 160 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: 'é¨é¨', title: 'é¨é¨', width: 160 } |
| | | , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true } |
| | | , { field: 'æä½å', title: 'æä½å', width: 160 } |
| | | , { field: 'å®¢æ·æ ç¾å·', title: 'å®¢æ·æ ç¾å·', width: 160 } |
| | | |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 200 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'hunitid', title: 'hunitid', width: 200, hide: true } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 200 } |
| | | , { field: '计éåä½åç§°', title: '计éåä½åç§°', width: 200 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 115 } |
| | | |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 120, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 100 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 120, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ?'':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 100 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 120, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 100 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 120, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 100 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 120, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | |
| | | ]; |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: 10 |
| | | , height: 'full-50' |
| | | , cols: [columns] |
| | | , limits: [50, 500, 1000, 5000] |
| | | , done: function (res, curr, count) { |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , limits: [10, 500, 1000, 5000, 10000] |
| | | , limit: 50 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计' } |
| | | , { 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 } |
| | | , { field: 'åé', title: 'åé', width: 160 } |
| | | , { field: 'æ¯é', title: 'æ¯é', width: 160 } |
| | | , { field: 'ç®é', title: 'ç®é', width: 160 } |
| | | |
| | | , { field: 'HProdOrgID', title: 'HProdOrgID', width: 200, hide: true } |
| | | , { field: 'ç产ç»ç»', title: 'ç产ç»ç»', width: 160 } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true } |
| | | , { field: 'é¨é¨', title: 'é¨é¨', width: 160 } |
| | | , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true } |
| | | , { field: 'æä½å', title: 'æä½å', width: 160 } |
| | | , { field: 'å®¢æ·æ ç¾å·', title: 'å®¢æ·æ ç¾å·', width: 160 } |
| | | |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 200 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'hunitid', title: 'hunitid', width: 200, hide: true } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 200 } |
| | | , { field: '计éåä½åç§°', title: '计éåä½åç§°', width: 200 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 115 } |
| | | |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 120, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 100 } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 120, templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ?'':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 100 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 120, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 100 } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 120, templet: "<div>{{d.å
³éæ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 100 } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 120, templet: "<div>{{d.ä½åºæ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | |
| | | ]] |
| | | } |
| | | }; |
| | | } |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | |
| | | } |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery(table, option) { |
| | | var HBeginDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | var HDate = $("#HDate").val();//å¼å§æ¥æ |
| | | var HBillNo = $("#HBillNo").val(); //åæ®å· |
| | | var HDepartName = $("#HDepartName").val(); |
| | | var HMaterNumber = $("#HMaterNumber").val(); |
| | | var HMaterName = $("#HMaterName").val(); |
| | | var HMaterModel = $("#HMaterModel").val(); |
| | | var HMakerMan = $("#HMakerMan").val(); |
| | | |
| | | if (HBeginDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HBeginDate + "'"; |
| | | } |
| | | if (HEndDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HEndDate + "'"; |
| | | if (HDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HDate + "'"; |
| | | } |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | |
| | | if (HMaterName) { |
| | | sWhere += " and ç©æåç§° like '%" + HMaterName + "%'"; |
| | | } |
| | | if (HMaterModel) { |
| | | sWhere += " and è§æ ¼åå· like '%" + HMaterModel + "%'"; |
| | | } |
| | | if (HMakerMan) { |
| | | sWhere += " and å¶å人 like '%" + HMakerMan + "%'"; |
| | | } |
| | |
| | | } |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HBillNo").val(""); |
| | | $("#HDepartName").val(""); |
| | | $("#HMaterNumber").val(""); |
| | | $("#HMaterName").val(""); |
| | | $("#HMaterModel").val(""); |
| | | $("#HMakerMan").val(""); |
| | | sWhere = " where 1 = 1 "; |
| | | get_Display(sWhere); |
| | |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>å·æ°</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="SetExcel"><i class="layui-icon layui-icon-return"></i>Excelè¡¨æ ¼å¯¼åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button> |
| | | </div> |
| | | </script> |
| | |
| | | //ä¼å
级 |
| | | case 'btn-yxj': set_Yxj(); |
| | | break; |
| | | case 'btn-back': set_Back(); |
| | | //Excelè¡¨æ ¼å¯¼åº |
| | | case 'SetExcel': SetExcel(); |
| | | break; |
| | | }; |
| | | }); |
| | |
| | | , { field: 'è¿ç«æ¶é´', title: 'è¿ç«æ¶é´', width: 160 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 200 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 120, templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 100 } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 120, templet: "<div>{{d.ä¿®æ¹æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | |
| | | |
| | | ]; |
| | | option = { |
| | | elem: '#mainTable' |
| | |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | } |
| | | //Excelè¡¨æ ¼å¯¼åº |
| | | function SetExcel() { |
| | | layer.confirm("ç¡®å®å¯¼åºæææ°æ®å", { title: "导åºç¡®è®¤" }, function (index) { |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_PackUnionBill/Sc_StationInBillSetExcel", |
| | | 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 }); |
| | | } |
| | | layer.close(wait); |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | //é¢è§ |
| | | function get_ViewReport() { |
| | | var checkStatus = table.checkStatus('mainTable') |