| | |
| | | <button type="button" class="layui-btn" lay-submit="" lay-filter="Delete" id="Delete"><i class="layui-icon layui-icon-add"></i>å é¤</button> |
| | | <button type="button" class="layui-btn" lay-submit="" lay-filter="AskReport" id="AskReport"><i class="layui-icon layui-icon-add"></i>ç³è¯·æ£éª</button> |
| | | <button type="button" class="layui-btn" lay-submit="" lay-filter="Exit" id="Exit"><i class="layui-icon layui-icon-add"></i>éåº</button> |
| | | <span id="top-title">äº§éæ±æ¥</span> |
| | | <button type="button" class="layui-btn" lay-submit="" lay-filter="ProdReport" id="ProdReport"><i class="layui-icon layui-icon-add"></i>çäº§æ±æ¥</button> |
| | | <span id="top-title">äº§éæ±æ¥</span> |
| | | </div> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | |
| | | |
| | | <div class="layui-collapse"> |
| | | <div class="layui-colla-item"> |
| | | <div class="layui-colla-title layui-inline"> |
| | |
| | | |
| | | //#endregion |
| | | |
| | | table.on('row(mainTable)', function (obj) { |
| | | //éä¸è¡æ¹åé¢è² |
| | | var flag = !obj.tr.find(':checkbox:first').prop('checked'); |
| | | obj.tr.find(':checkbox').prop('checked', flag); |
| | | if (flag) { |
| | | obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //设置å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | } else { |
| | | obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//åæ¶å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:" });//åæ¶å½åtré¢è² |
| | | } |
| | | //mainTable ä¸ºè¡¨æ ¼ID æ³¨ææ¤å¤å¦æID䏿£ç¡®å°å¯¼è´ä½ å¨çå¬å¤éæ¡æ¶è·åä¸å°ä½ éæ©çæ°æ®ï¼åé¢çåªæ¯æ·»å æå é¤é䏿ªé䏿 ·å¼ä»¥åè®¾ç½®èæ¯è²ï¼åä½é¢è² |
| | | layui.each(table.cache.mainTable, function (i, l) { |
| | | if (obj.tr.index() == l.LAY_TABLE_INDEX) { |
| | | l.LAY_CHECKED = flag; |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | |
| | | elem: '#mainTable' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , limit:500 |
| | | , totalRow: true |
| | | , limits: [100, 500, 1000, 2000] |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计' } |
| | | , { field: 'HInterID', title: 'HInterID', sort: true, hide: true, width: 200 } |
| | | , { field: 'HDate', title: 'æ¥æ', width: 200, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'HBillNo', title: 'åæ®å·', width: 200 } |
| | |
| | | , { field: 'HMaterCode', title: '产å代ç ', width: 200 } |
| | | , { field: 'HMaterName', title: '产ååç§°', width: 200 } |
| | | , { field: 'HMaterSpec', title: '产åè§æ ¼', width: 200 } |
| | | , { field: 'HQty', title: 'æ±æ¥æ°é', width: 200 } |
| | | , { field: 'HQty', title: 'æ±æ¥æ°é', width: 200, totalRow: true } |
| | | , { field: 'HSourceID', title: 'çäº§èµæºID', width: 200, hide: true } |
| | | , { field: 'HSourceCode', title: 'çäº§èµæºä»£ç ', width: 200 } |
| | | , { field: 'HSourceName', title: 'çäº§èµæº', width: 200 } |
| | |
| | | }; |
| | | } |
| | | |
| | | //æ¥å·¥å¹³å°è¿å
¥(ææºå) |
| | | //æ¥å·¥å¹³å°è¿å
¥(ææºå) åªè½çå°å½åçäº§èµæºä¸å¼å·¥äºçç产订åçäº§éæ±æ¥å |
| | | function set_AddNew() |
| | | { |
| | | sWhere = " where a.HSourceID='" + HSourceID + "' and a.HICMOBillNo='" + workcode + "' and HICMOInterID='" + (HICMOInterID == "null" ? 0 : HICMOInterID) + "' and HICMOEntryID='" + (HICMOEntryID == "null" ? 0 : HICMOEntryID) + "' and HMaker='" + HMaker + "' "; |
| | | sWhere = " where HSourceID='" + HSourceID + "' and HICMOBillNo='" + workcode + "' and HICMOInterID='" + (HICMOInterID == "null" ? 0 : HICMOInterID) + "' and HICMOEntryID='" + (HICMOEntryID == "null" ? 0 : HICMOEntryID) + "' and HMaker='" + HMaker + "' "; |
| | | SchWhere = sWhere; |
| | | console.log(sWhere); |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | |
| | | var InterID = data[0].HInterID.toString(); |
| | | var HICMOInID = data[0].HICMOInterID.toString(); |
| | | var HICMOEnID = data[0].HICMOEntryID.toString(); |
| | | |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sc_MESBeginWorkBill/DeltetMESProductReportBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "HICMOInterID": HICMOInID, "HICMOEntryID": HICMOEnID }, |
| | | data: { "HInterID": InterID, "HICMOInterID": HICMOInID, "HICMOEntryID": HICMOEnID, "UserName":sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 2000, icon: 1 }); |
| | |
| | | }); |
| | | }) |
| | | |
| | | //çäº§æ±æ¥ |
| | | form.on('submit(ProdReport)', function (data) { |
| | | var checkStatus = table.checkStatus('mainTable'); |
| | | var TabData = checkStatus.data; |
| | | var HInterID = TabData[0].HInterID; |
| | | |
| | | if (checkStatus.data.length != 1) { |
| | | layer.alert("è¯·éæ©ä¸æ¡æ°æ®!åä¸è®¢åçç产æ°éå°ç±ç³»ç»å¤æå¹¶èªå¨å¸¦åºã"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'çäº§æ±æ¥å-ç¼è¾' |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['../çäº§æ±æ¥å/Sc_Add_ICMOReportBillList.html?OperationType=2&linterid=' + HInterID.toString() + '&HSouceBillType=' + 3724, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | //éåº |
| | | form.on('submit(Exit)', function (data) |
| | | { |
| | |
| | | var Source = $("#Source").val(); //èµæº |
| | | sWhere += SchWhere; |
| | | if (HDate) { |
| | | sWhere += " and CONVERT(varchar(100),a.HDate, 23) >= '" + HDate + "'"; |
| | | sWhere += " and CONVERT(varchar(100),HDate, 23) >= '" + HDate + "'"; |
| | | } |
| | | if (HDate1) { |
| | | sWhere += " and CONVERT(varchar(100),a.HDate, 23) <= '" + HDate1 + "'"; |
| | | sWhere += " and CONVERT(varchar(100),HDate, 23) <= '" + HDate1 + "'"; |
| | | } |
| | | if (HBillNo) { |
| | | sWhere += " and a.HBillNo like '%" + HBillNo + "%'"; |
| | | sWhere += " and HBillNo like '%" + HBillNo + "%'"; |
| | | } |
| | | if (Part) { |
| | | sWhere += " and concat(m.HNumber,m.HName,m.HModel) like '%" + Part + "%'"; |
| | | sWhere += " and concat(HNumber,HName,HModel) like '%" + Part + "%'"; |
| | | } |
| | | if (Source) { |
| | | sWhere += " and s.HName like '%" + Dept + "%'"; |
| | | sWhere += " and HName like '%" + Dept + "%'"; |
| | | } |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |