提料计划报表 动态显示日期
生产计划平台 提料运算(缺料)
齐套分析列表优化
| | |
| | | , { field: 'ä»åºID', title: 'ä»åºID', hide: true } |
| | | , { field: 'ä»åºç¼ç ', title: 'ä»åºç¼ç ' } |
| | | , { field: 'ä»åºåç§°', title: 'ä»åºåç§°' } |
| | | , { field: 'ä»ä½ID', title: 'ä»ä½ID', hide: true } |
| | | , { field: 'ä»ä½åç§°', title: 'ä»ä½åç§°' } |
| | | , { field: 'åºå主åä½ID', title: 'åºå主åä½ID', hide: true } |
| | | , { field: 'åä½ç¼ç ', title: 'åä½ç¼ç ' } |
| | | , { field: 'åä½åç§°', title: 'åä½åç§°' } |
| | |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">ç©æåç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="hidden" class="layui-input" lay-verify="HMaterID" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" lay-verify="HMaterName" name="HMaterName" id="HMaterName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" lay-verify="HMaterName" name="HMaterName" id="HMaterName" value="" style="width: 60%; display: inline-block;"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | |
| | | $("#HENDDATE").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //ç产ç»ç»å è½½ |
| | | Organ(); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | ////åå§åè¡¨æ ¼ |
| | | //set_InitGrid(); |
| | | //å¿«éè¿æ»¤ |
| | | get_FastQuery(1); |
| | | } |
| | |
| | | //#region åå§åè¡¨æ ¼æ¹æ³ |
| | | function set_InitGrid() { |
| | | var columns = []; |
| | | var myDate = new Date(); |
| | | var yyyy = myDate.getFullYear(); |
| | | var MM = myDate.getMonth() + 1; |
| | | var dd = myDate.getDate(); |
| | | var SumMonth = 31; //卿䏤æä¹å·® new Date(yyyy, MM, 0).getDate() |
| | | var MonthCount = new Date(yyyy, MM-1, 0).getDate(); |
| | | |
| | | columns.push({ type: 'checkbox', fixed: 'left' }); |
| | | columns.push({ field: 'ç»ç»', title: 'éè´ç»ç»' }); |
| | |
| | | columns.push({ field: 'ç©æä»£ç ', title: 'ç©æç¼ç ' }); |
| | | columns.push({ field: '计éåä½åç§°', title: '计éåä½' }); |
| | | columns.push({ field: 'TQSUM', title: 'æææææ°é' }); |
| | | for (var i = 1; i <= (MonthCount - dd + (SumMonth - MonthCount)); i++) { |
| | | columns.push({ field: Format(yyyy + '/' + (MM - 1) + '/' + (dd + i - (SumMonth - MonthCount)), 'yyyy-MM-dd'), title: Format(yyyy + '/' + (MM - 1) + '/' + (dd + i - (SumMonth - MonthCount)), 'MM.dd'), width: 70 })//0 |
| | | |
| | | //è·å两个ææä¹é´çç¸å·® |
| | | var time1 = Date.parse(new Date($("#HBEGINDATE").val()));//å¼å§æ¶é´ |
| | | var time2 = Date.parse(new Date($("#HENDDATE").val()));//ç»ææ¶é´ |
| | | var Days = Math.abs(parseInt((time2 - time1) / 1000 / 3600 / 24)); |
| | | //è·åå¹´ |
| | | var yyyy = new Date($("#HBEGINDATE").val()).getFullYear(); |
| | | //è·åæä»½ |
| | | var MM = new Date($("#HBEGINDATE").val()).getMonth() + 1; |
| | | //è·åå¼å§æä»½çæå¤§å¤©æ° |
| | | var SumMonth = new Date(yyyy, MM, 0).getDate(); //卿䏤æä¹å·® |
| | | //è·åå¼å§æ¥æçå¤©æ° |
| | | var HBEGINDATE = new Date(new Date($("#HBEGINDATE").val())).getDate(); //è·åå¼å§æ¥æå¤©æ° |
| | | |
| | | var k = 0;//æ¶éå¾ªç¯æ¬¡æ° |
| | | for (var j = 0; j <= (Days - k); j++) { |
| | | columns.push({ field: Format(yyyy + '/' + MM + '/' + (HBEGINDATE + j), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (HBEGINDATE + j), 'MM.dd'), width: 70 }) |
| | | //跨年çè¯ ä¼ä»ä¸æä¸å·å¼å§ |
| | | if (MM == 12 && (HBEGINDATE + j) == 31) { |
| | | yyyy += 1; |
| | | MM = 1; |
| | | SumMonth = new Date(yyyy, MM, 0).getDate(); |
| | | HBEGINDATE = 0; |
| | | k += j; |
| | | j = 0; |
| | | } else if ((HBEGINDATE + j) == SumMonth) { //è·¨æ ææ°å ä¸ å¤©æ°ä»ä¸å¼å§ |
| | | HBEGINDATE = 0; |
| | | MM += 1; |
| | | SumMonth = new Date(yyyy, MM, 0).getDate(); |
| | | k += j; |
| | | j = 0; |
| | | } |
| | | } |
| | | for (var i = 1; i <= dd; i++) { |
| | | columns.push({ field: Format(yyyy + '/' + MM + '/' + i, 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + i, 'MM.dd'), width: 70 })//0 |
| | | } |
| | | |
| | | columns.push({ field: '', title: 'ææè®¡åå计' }); |
| | | |
| | | option = { |
| | |
| | | }; |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //è·åç»ç» |
| | | function Organ() { |
| | |
| | | var HXQD = $("#HXQD").val();//éæ±åå· |
| | | var HPURORDERNO = $("#HPURORDERNO").val();//éè´è®¢åå· |
| | | |
| | | if (HBEGINDATE > HENDDATE) { |
| | | return layer.msg("å¼å§æ¥æä¸è½å°äºç»ææ¥æ!"); |
| | | } |
| | | |
| | | sWhere = { |
| | | HORGID: HORGID |
| | | , HBEGINDATE: HBEGINDATE |
| | |
| | | , HXQD: HXQD |
| | | , HPURORDERNO: HPURORDERNO |
| | | } |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | get_Display(JSON.stringify(sWhere)); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç产订åç»ç»</label> |
| | | <label class="layui-form-label" style="width: 85px;">ææç±»å</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> |
| | | <select name="HProdORGID" id="HProdORGID" lay-verify="HProdORGID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | <select name="HTLType" id="HTLType" lay-verify="HTLType"> |
| | | <option value="缺æ" selected="selected">缺æ</option> |
| | | <option value="çäº§ç¨ææ¸
å">çäº§ç¨ææ¸
å</option> |
| | | <!--<option value="éè´è®¢å">éè´è®¢å</option> ææ¶æ²¡æ--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">ç产车é´</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">ç©æç¼ç </label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="hidden" class="layui-input" lay-verify="HMaterID" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" value="" style="width: 60%;display: inline-block;"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æåç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="background-color:#efefef4d" readonly> |
| | | <input type="text" class="layui-input" name="HMaterName" id="HMaterName"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">é½å¥ç±»å</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> |
| | | <select name="HOrderType" id="HOrderType" lay-verify="HOrderType"> |
| | | <option value="å
¨é¨">å
¨é¨</option> |
| | | <option value="çäº§ç¨ææ¸
å">çäº§ç¨ææ¸
å</option> |
| | | <option value="çäº§ç¨ææ¸
å" selected="selected">çäº§ç¨ææ¸
å</option> |
| | | <option value="æ åBom">æ åBom</option> |
| | | </select> |
| | | </div> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">è§æ ¼åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" style="background-color:#efefef4d" readonly> |
| | | <input type="text" class="layui-input" name="HMaterModel" id="HMaterModel"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:10px;margin-bottom:10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç产订åç»ç»</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> |
| | | <select name="HProdORGID" id="HProdORGID" lay-verify="HProdORGID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_BatchFill"><i class="layui-icon layui-icon-file-b"></i>æ¹éå¡«å
</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button>--> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_BatchFill"><i class="layui-icon layui-icon-file-b"></i>æ¹éå¡«å
</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><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> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>å é¤è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | |
| | | layer.open({ |
| | | type: 2 //ç±»å |
| | | , skin: 'layui-layer-rim'//å ä¸è¾¹æ¡ |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'é½å¥åææç»è¡¨'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | |
| | | HProdORGID: $("#HProdORGID").val() |
| | | , HWorkShopID: $("#HWorkShopID").val() |
| | | } |
| | | var HTLType = $("#HTLType").val(); |
| | | sWhere = JSON.stringify(sWhere); |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_TLYS', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["Czybm"] }, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["Czybm"], "HTLType": HTLType }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | get_FastQuery(2); |
| | |
| | | , { field: 'ç产车é´åç§°', title: 'ç产车é´åç§°' } |
| | | , { field: 'ä»åºID', title: 'ä»åºID', hide: true } |
| | | , { field: 'ä»åºç¼ç ', title: 'ä»åºç¼ç ' } |
| | | , { field: 'ä»åºåç§°', title: 'ä»åºåç§°', width: 120} |
| | | , { field: 'ä»åºåç§°', title: 'ä»åºåç§°', width: 120 } |
| | | , { field: 'ä»ä½ID', title: 'ä»ä½ID', hide: true } |
| | | , { field: 'ä»ä½åç§°', title: 'ä»ä½åç§°' } |
| | | , { field: 'æ¹å·', title: 'æ¹å·' ,width:120} |
| | | ]] |
| | | , done: function (res, curr, count) { |
| | |
| | | layer.confirm("ç¡®è®¤è¦æ¹éæå°å?", { title: "确认" }, function (index) { |
| | | time = setInterval(function () { |
| | | dy(data); |
| | | }, 1000); |
| | | }, 2000); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | }) |
| | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | async: false, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | |
| | | var args = { |
| | | type: "print", |
| | | showOptionDlg: false, //妿䏿¾ç¤ºæå°å¯¹è¯æ¡èç´æ¥æå°ï¼å°æ¤è¡æ³¨é廿å³å¯ |
| | | report: urlAddRandomNo("../../grf/涤纶.grf"), |
| | | report: urlAddRandomNo("../../grf/cs10.grf"), |
| | | data: Customer |
| | | }; |
| | | //var args = { |