| | |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>æ°å¢/ç¼è¾å¨å
·éè´å
¥åºå</title> |
| | | <title>æ¡ç çæ</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | |
| | | /*begin æ¤æ ·å¼ç¨äºæ¶é¤è¡å
ç´ ä¸å¸å±å®½åº¦ä¸å¤çé®é¢*/ |
| | |
| | | } |
| | | /*end*/ |
| | | .layui-table-cell .layui-form-checkbox[lay-skin="primary"] { |
| | | margin-left:35%; |
| | | margin-left: 35%; |
| | | } |
| | | |
| | | .layui-input-block { |
| | | margin-left: 0px; |
| | | } |
| | | </style> |
| | | </head> |
| | |
| | | <div class="layui-card"> |
| | | <form id="form0" class="layui-form" lay-filter="component-form-group" action=""> |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | |
| | | <button type="button" id="copy-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Copy">å¤å¶</button> |
| | | <button type="button" id="addnew-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Add">æ°å¢</button> |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="planview">é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="print">æå°</button> |
| | | |
| | | <div class="layui-input-block"> |
| | | <button type="button" class="layui-btn" id="ToolPrint" lay-submit="" lay-filter="ToolPrint">æå°</button> |
| | | <button type="button" class="layui-btn" id="ToolPreView" lay-submit="" lay-filter="ToolPreView">é¢è§</button> |
| | | <button type="button" class="layui-btn" id="ToolTryPrint" lay-submit="" lay-filter="ToolTryPrint">è¯æå°</button> |
| | | <button type="button" class="layui-btn" id="ToolCreate" lay-submit="" lay-filter="ToolCreate">çæ</button> |
| | | <button type="button" class="layui-btn" id="ToolReset" lay-submit="" lay-filter="ToolReset">éç½®</button> |
| | | <button type="button" class="layui-btn" id="ToolStock" lay-submit="" lay-filter="ToolStock">åºå</button> |
| | | <button type="button" class="layui-btn" id="ToolSynch" lay-submit="" lay-filter="ToolSynch">åæ¥èµæ</button> |
| | | <button type="button" class="layui-btn" id="ToolBatch" lay-submit="" lay-filter="ToolBatch">æ¹æ¬¡</button> |
| | | <button type="button" class="layui-btn" id="ToolExit" lay-submit="" lay-filter="ToolExit">éåº</button> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="layui-card-body"> |
| | |
| | | <label class="layui-form-label">ç»ç»</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HOrgID" id="HOrgID" lay-filter="HOrgID" class="layui-input" value="" style="float:left;width:150px"> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="layui-form-label">å·¥å代ç </label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HWorksNumber" id="HWorksNumber" lay-filter="HWorksNumber" class="layui-input" value="" style="float:left;width:150px"> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="layui-form-label">æ¡ç ç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HBarCodeType" id="HBarCodeType" lay-filter="HBarCodeType" class="layui-input" value="" style="float:left;width:150px"> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <div class="layui-tab layui-tab-card" lay-filter="tab-TabTest"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">ç©æä¿¡æ¯</li> |
| | | <li>æ¡ç ä¿¡æ¯</li> |
| | | <li lay-id="1" class="layui-this">ç©æä¿¡æ¯</li> |
| | | <li lay-id="2">æ¡ç ä¿¡æ¯</li> |
| | | <li lay-id="3">æ¡£æ¡å表</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </script> |
| | | <script type="text/html" id="switchTpl"> |
| | | <!-- è¿éç checked çç¶æåªæ¯æ¼ç¤º --> |
| | | <input type="checkbox" name="checkbox" lay-skin="primary" lay-filter="HGiveAwayFlag"> |
| | | <input type="checkbox" name="checkbox" value="{{d.HGiveAwayFlag}}" lay-skin="primary" lay-filter="HGiveAwayFlag" {{ d.HGiveAwayFlag == 1 ? 'checked' : '' }}> |
| | | </script> |
| | | <script type="text/html" id="switchTp2"> |
| | | <!-- è¿éç checked çç¶æåªæ¯æ¼ç¤º --> |
| | | <input type="checkbox" name="checkbox" lay-skin="primary" lay-filter="HGiveAwayFlag"> |
| | | <input type="checkbox" name="checkbox" lay-skin="primary" lay-filter="HGiveAwayFlag1"> |
| | | </script> |
| | | </form> |
| | | </div> |
| | |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var option = []; |
| | | var option1 = []; |
| | | var option2 = []; |
| | | var sWhere = ""; |
| | | var sBillType = "3801"; |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | //åå§å表åæä»¶ |
| | | set_InitFrom(); |
| | |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | set_CountGrid(); |
| | | set_InitGrid2(); |
| | | //夿æä½ç±»å |
| | | if (OperationType == 1) {//æ æºæ°å¢ |
| | | //åå§åºæ¬ä¿¡æ¯èµå¼ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | set_AddFNew(); |
| | | set_AddFNew1(); |
| | | set_AddFNew2(); |
| | | } |
| | | else if (OperationType == 3) {//ç¼è¾ |
| | | set_EditFromGrid(linterid); |
| | |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data;; |
| | | var AddRow = table.cache['mainTable']; |
| | | var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; |
| | | var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; |
| | | console.log(NewRow); |
| | | switch (obj.event) { |
| | | //æ°å¢ä¸è¡ |
| | |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | set_GridCellCheck(obj); //è¡å
å¿«æ·é®çé |
| | | }); |
| | | |
| | | //çå¬åå
æ ¼ç¼è¾ åå
æ ¼ç¼è¾å åæ´ |
| | | table.on('edit(mainTable)', function (obj) { |
| | | // åå
æ ¼ç¼è¾ä¹åçå¼ |
| | | var oldText = $(this).prev().text(); |
| | | var value = obj.value //å¾å°ä¿®æ¹åçå¼ |
| | | , data = obj.data //å¾å°æå¨è¡ææé®å¼ |
| | | , field = obj.field; //å¾å°å段 |
| | | //layer.msg('[ID: ' + data.id + '] ' + field + ' åæ®µæ´æ¹ä¸ºï¼' + value); |
| | | |
| | | switch (field) { |
| | | case "HQty": //æ°é |
| | | value = isNaN(value) ? 0 : value; |
| | | var HMinQty = isNaN(data.HMinQty) ? 0 : data.HMinQty; |
| | | if (HMinQty == 0) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HQty: value, //æ°é |
| | | HBQty: 0, //ç®±æ°=æ°é/æå°å
è£
æ°é |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HQty: value, //æ°é |
| | | HBQty: Math.ceil(value / HMinQty), //ç®±æ°=æ°é/æå°å
è£
æ°é |
| | | }); |
| | | } |
| | | break; |
| | | case "HMinQty": //æå°å
è£
æ°é |
| | | value = isNaN(value) ? 0 : value; |
| | | var HQty = isNaN(data.HQty) ? 0 : data.HQty; |
| | | if (HQty == 0) //餿°ä¸º0 |
| | | { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMinQty: value, //æå°å
è£
æ°é |
| | | HBQty: 0, //ç®±æ°=æ°é/æå°å
è£
æ°é |
| | | }); |
| | | } |
| | | else { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMinQty: value, //æå°å
è£
æ°é |
| | | HBQty: Math.ceil(HQty / value), //ç®±æ°=æ°é/æå°å
è£
æ°é |
| | | }); |
| | | } |
| | | |
| | | break; |
| | | default: |
| | | } |
| | | }); |
| | | |
| | | //䏿æ¡äºä»¶éæ©è§¦å |
| | | form.on('select(HSourceBillType)', function (data) { |
| | | $("#HSourceBillNo").val(""); |
| | |
| | | case '5': |
| | | return "å§å¤è®¢å"; |
| | | break; |
| | | case '6': |
| | | return "éè´§éç¥å"; |
| | | break; |
| | | case '7': |
| | | return "å
¶ä»å
¥åºå"; |
| | | break; |
| | | case '8': |
| | | return "ç´æ¥è°æ¨å"; |
| | | break; |
| | | case '9': |
| | | return "éè´éæå"; |
| | | break; |
| | | case '10': |
| | | return "ç产éæå"; |
| | | break; |
| | | case '11': |
| | | return "ç»è£
æå¸å"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //è¡¨å¤´ä¿¡æ¯æºåä¿¡æ¯å¼¹çª |
| | | form.on('submit(HSourceBillNoList)', function () { |
| | | if ($("#HSourceBillType").val() == 0 || $("#HSourceBillType").val() == null) { |
| | |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: '' + getSupType()+'å表', |
| | | title: '' + getSupType() + 'å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['95%', '80%'], |
| | |
| | | content: [url, 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('layTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©åæ®æ°æ®'); |
| | | } |
| | | var list = []; |
| | | var BillSelect = []; |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | if (checkStatus.data[i].é¨é¨ != "" && checkStatus.data[i].é¨é¨ != null) { |
| | | list.push(checkStatus.data[i].é¨é¨) |
| | | } |
| | | BillSelect.push({ BillType: checkStatus.data[i].HBillType, BillTitle: getSupType(), BillNo: checkStatus.data[i].åæ®å·, "BillMainID": checkStatus.data[i].HMainID, "BillSubID": checkStatus.data[i].HSubID, "SPID": 0, "BatchNo": "", "HAuxPropID": 0 }); |
| | | } |
| | | if (isAllEqual(list)) //ä¸å
è®¸éæ©ä¸åé¨é¨ |
| | | { |
| | | //è·åé䏿°æ® |
| | | var GrdSelectData = JSON.stringify(BillSelect); |
| | | //è·åéæ©çæºåç±»å |
| | | var HSourceBillType = $("#HSourceBillType").find("option:selected").html(); |
| | | //è·åéæ©çæ¡ç ç±»å |
| | | var HBarCodeType = $("#HBarCodeType").find("option:selected").html(); |
| | | //è·åå½åç»å½äººå |
| | | var UserName = sessionStorage["HUserName"]; |
| | | var Str = GrdSelectData + ";" + HSourceBillType + ";" + HBarCodeType + ";" + UserName; |
| | | //éè¿éæ©çæºå主åå
ç æ¥æ¾è¯¦ç»ä¿¡æ¯ |
| | | $.ajax({ |
| | | type: "post", |
| | | url: GetWEBURL() + "/Sc_BarCode/SelectReportFromBillList", |
| | | //contentType: 'application/json', |
| | | async: true, |
| | | dataType: "json", |
| | | data: { "msg": Str }, |
| | | //traditional: true, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | table.reload('mainTable', { |
| | | data: result.list // è°ç¨table.reload éæ°æ¸²ææ¾ç¤ºå 载追å äºæ°æ®çè¡¨æ ¼ |
| | | }); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg("ä¸å
è®¸éæ©ä¸åçé¨é¨æ°æ®!", { time: 1 * 2000, icon: 5 }); |
| | | } |
| | | |
| | | |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | function isAllEqual(array) { |
| | | if (array.length > 0) { |
| | | return !array.some(function (value, index) { |
| | | return value !== array[0]; |
| | | }); |
| | | } else { |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | //æ¡ç çæ |
| | | form.on('submit(ToolCreate)', function (data) { |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | //ç©ææç»ä¿¡æ¯ä¸ä¸ºç©ºå¤æ |
| | | if (!AllowLoadData(sSubStr))//æ°æ®éªè¯ |
| | | { |
| | | return false; |
| | | } |
| | | //è·åéæ©çç»ç» |
| | | var HOrgType = $("#HOrgID").find("option:selected").html(); |
| | | //è·åéæ©çå·¥å代ç |
| | | var CampanyName = $("#HWorksNumber").find("option:selected").html(); |
| | | if (CampanyName == "" || CampanyName == null) |
| | | { |
| | | CampanyName = "xxx"; |
| | | } |
| | | //è·åéæ©çæºåç±»å |
| | | var HSourceBillType = $("#HSourceBillType").find("option:selected").html(); |
| | | //è·åéæ©çæ¡ç ç±»å |
| | | var HSelectBarCodeType = $("#HBarCodeType").find("option:selected").html(); |
| | | //è·åå½åç»å½äººå |
| | | //var UserName = sessionStorage["HUserName"]; |
| | | var UserName = "Admin"; |
| | | var sMainSub = sSubStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' + CampanyName + ';' + UserName; |
| | | SaveBarCodeCreate(sMainSub); |
| | | }) |
| | | |
| | | //éåº |
| | | form.on('submit(ToolExit)', function (data) { |
| | | if (linterid == undefined) { |
| | | //å
³éé¡µç¾ |
| | | Pub_Close(2); |
| | | } |
| | | else { |
| | | //å
³éé¡µç¾ |
| | | Pub_Close(1); |
| | | } |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢æææ¹æ³ |
| | |
| | | }) |
| | | } |
| | | //è·åå·¥å代ç |
| | | function set_HWorksNumber() |
| | | { |
| | | function set_HWorksNumber() { |
| | | //è·åå·¥å代ç |
| | | var Organization = ''; |
| | | $.ajax({ |
| | |
| | | } |
| | | $("#HWorksNumber").append(Organization); |
| | | form.render('select'); |
| | | if (result.list[0] != "" && result.list[0] != null) |
| | | { |
| | | if (result.list[0] != "" && result.list[0] != null) { |
| | | $('#HWorksNumber').find("option[value=" + result.list[0] + "]").attr("selected", true); |
| | | form.render('select') //忬¡æ¸²æ |
| | | } |
| | |
| | | }) |
| | | } |
| | | //è·åæ¡ç ç±»å |
| | | function set_HBarCodeType() |
| | | { |
| | | function set_HBarCodeType() { |
| | | //è·åæ¡ç ç±»å代ç |
| | | var Organization = ''; |
| | | $.ajax({ |
| | |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.list; |
| | | for (var i = 0; i < data.length; i++) { |
| | | Organization += '<option style="color:blue;" value="' + i+ '">' + data[i] + '</option>'; |
| | | Organization += '<option style="color:blue;" value="' + i + '">' + data[i] + '</option>'; |
| | | } |
| | | $("#HBarCodeType").append(Organization); |
| | | form.render('select'); |
| | | } |
| | | $('#HBarCodeType').find("option[value=" + result.list[0]+ "]").attr("selected", true); |
| | | $('#HBarCodeType').find("option[value=" + result.list[0] + "]").attr("selected", true); |
| | | form.render('select') //忬¡æ¸²æ |
| | | layer.closeAll("loading"); |
| | | } |
| | |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 100 } |
| | | , { field: 'HSourceInterID', title: 'æºå主å
ç ', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HSourceEntryID', title: 'æºååå
ç ', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', edit: 'text', event: 'HMaterCode', width: 100 } |
| | | , { field: 'HMaterID', title: 'ç©æID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', edit: 'text', width: 100 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', edit: 'text', width: 100 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', edit: 'text', width: 100 } |
| | | , { field: 'HAuxPropID', title: 'è¾
å©å±æ§ID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HAuxPropNumber', title: 'è¾
å©å±æ§ä»£ç ', edit: 'text', event: 'HUnitCode', width: 100 } |
| | | , { field: 'HAuxPropName', title: 'è¾
å©å±æ§åç§°', edit: 'text', width: 100 } |
| | | , { field: 'HUnitID', title: '计éåä½ID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HUnitCode', title: '计éåä½ä»£ç ', edit: 'text', event: 'HUnitCode', width: 100 } |
| | | , { field: 'HUnitName', title: '计éåä½', edit: 'text', width: 100 } |
| | | , { field: 'HMainID', title: 'æºå主å
ç ', width: 100, hide: true } |
| | | , { field: 'HSubID', title: 'æºååå
ç ', width: 100, hide: true } |
| | | , { field: 'HBillNo', title: 'æºååå·', width: 200 } |
| | | , { field: 'HMaterID', title: 'ç©æID', width: 100, hide: true } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', edit: 'text', event: 'HMaterNumber', width: 200 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 200 } |
| | | , { field: 'HAuxPropID', title: 'è¾
å©å±æ§ID', width: 100, hide: true } |
| | | , { field: 'HAuxPropNumber', title: 'è¾
å©å±æ§ä»£ç ', edit: 'text', event: 'HAuxPropNumber', width: 100 } |
| | | , { field: 'HAuxPropName', title: 'è¾
å©å±æ§åç§°', width: 100 } |
| | | , { field: 'HUnitID', title: '计éåä½ID', width: 100, hide: true } |
| | | , { field: 'HUnitNumber', title: '计éåä½ä»£ç ', edit: 'text', event: 'HUnitNumber', width: 100 } |
| | | , { field: 'HUnitName', title: '计éåä½',width: 100 } |
| | | , { field: 'HBatchNo', title: 'æ¹å·', edit: 'text', width: 100 } |
| | | , { field: 'HGiveAwayFlag', title: 'æ¯å¦èµ å', width: 100, templet: '#switchTpl', unresize: false } |
| | | , { field: 'HQty', title: 'æ°é', edit: 'text', width: 100 } |
| | | , { field: 'HMinQty', title: 'æå°å
è£
æ°', edit: 'text', width: 100 } |
| | | , { field: 'HBQty', title: 'ç®±æ°', edit: 'text', width: 100 } |
| | | , { field: 'HBQty', title: 'ç®±æ°', width: 100 } |
| | | , { field: 'HPackQty', title: 'å¤ç®±æ°', edit: 'text', width: 100 } |
| | | , { field: 'HDate', title: 'è¿ææ¥æ', edit: 'text', width: 100 } |
| | | , { field: 'HCusID', title: '客æ·ID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HCusNumber', title: '客æ·ä»£ç ', edit: 'text', event: 'HWHCode', width: 120 } |
| | | , { field: 'HCusName', title: '客æ·åç§°', edit: 'text', width: 120 } |
| | | , { field: 'HDate', title: 'è¿ææ¥æ', width: 100 } |
| | | , { field: 'HCusID', title: '客æ·ID', width: 100, hide: true } |
| | | , { field: 'HCusNumber', title: '客æ·ä»£ç ', edit: 'text', event: 'HCusNumber', width: 120 } |
| | | , { field: 'HCusName', title: '客æ·åç§°', width: 120 } |
| | | , { field: 'HSeOrderBillNo', title: 'éå®è®¢åå·', width: 200 } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text', width: 100 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 100 } |
| | | , { field: 'éæ©', title: 'éæ©', width: 100 } |
| | | , { field: 'HBarCode', title: 'æ¡ç ç¼å·', width: 100 } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', width: 100 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 100 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 100 } |
| | | , { field: 'HAuxPropNumber', title: 'è¾
å©å±æ§ä»£ç ', width: 100 } |
| | | , { field: 'HAuxPropName', title: 'è¾
å©å±æ§', event: 'HWHCode', width: 120 } |
| | | , { field: 'HGiveAwayFlag', title: 'æ¯å¦èµ å', width: 120, templet: '#switchTpl', unresize: false } |
| | | , { field: 'HUnitCode', title: '计éåä½ä»£ç ', width: 120 } |
| | | , { field: 'HUnitName', title: '计éåä½', width: 120 } |
| | | , { field: 'HQty', title: 'æ°é', width: 120 } |
| | | , { field: 'HDate', title: 'è¿ææ¥æ', width: 120 } |
| | | , { field: 'HCusNumber', title: '客æ·ä»£ç ', width: 120 } |
| | | , { field: 'HCusName', title: '客æ·', width: 120 } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', width: 120 } |
| | | , { field: 'HSeOrderBillNo', title: 'éå®è®¢åå·', width: 120 } |
| | | , { field: 'HRemark', title: '夿³¨', width: 120 } |
| | | , { field: 'HMTONo', title: '计åè·è¸ªå·', width: 120 } |
| | | , { field: 'HShowDate', title: 'æ¥æ', width: 100 } |
| | | , { field: 'HInnerBillNo', title: 'å
é¨éè´è®¢åå·', width: 100 } |
| | | , { field: 'HMaker', title: 'å¶å人', width: 100 } |
| | | , { field: 'HBarCode2', title: 'æ¡ç ç¼å·', width: 100 } |
| | | , { field: 'HMaterNumber2', title: 'ç©æä»£ç ', width: 100 } |
| | | , { field: 'HMaterName2', title: 'ç©æåç§°', width: 100 } |
| | | , { field: 'HMaterModel2', title: 'è§æ ¼åå·', width: 100 } |
| | | , { field: 'HAuxPropNumber2', title: 'è¾
å©å±æ§ä»£ç ', width: 100 } |
| | | , { field: 'HAuxPropName2', title: 'è¾
å©å±æ§', event: 'HWHCode', width: 120 } |
| | | , { field: 'HGiveAwayFlag2', title: 'æ¯å¦èµ å', width: 120, templet: '#switchTpl', unresize: false } |
| | | , { field: 'HUnitCode2', title: '计éåä½ä»£ç ', width: 120 } |
| | | , { field: 'HUnitName2', title: '计éåä½', width: 120 } |
| | | , { field: 'HQty2', title: 'æ°é', width: 120 } |
| | | , { field: 'HDate2', title: 'è¿ææ¥æ', width: 120 } |
| | | , { field: 'HCusNumber2', title: '客æ·ä»£ç ', width: 120 } |
| | | , { field: 'HCusName2', title: '客æ·', width: 120 } |
| | | , { field: 'HSourceBillNo2', title: 'æºååå·', width: 120 } |
| | | , { field: 'HSeOrderBillNo2', title: 'éå®è®¢åå·', width: 120 } |
| | | , { field: 'HRemark2', title: '夿³¨', width: 120 } |
| | | , { field: 'HMTONo2', title: '计åè·è¸ªå·', width: 120 } |
| | | , { field: 'HShowDate2', title: 'æ¥æ', width: 100 } |
| | | , { field: 'HInnerBillNo2', title: 'å
é¨éè´è®¢åå·', width: 100 } |
| | | , { field: 'HMaker2', title: 'å¶å人', width: 100 } |
| | | ]; |
| | | option1 = { |
| | | id: 'mainTable1' |
| | |
| | | } |
| | | }; |
| | | } |
| | | |
| | | //åå§åæ¡£æ¡å表信æ¯è¡¨æ ¼ |
| | | function set_InitGrid2() { |
| | | //表头 |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 100 } |
| | | , { field: 'HItemID', title: 'HItemID', width: 100, hide: true } |
| | | , { field: 'hmainid', title: 'hmainid', width: 100, hide: true } |
| | | , { field: 'hsubid', title: 'hsubid', width: 100, hide: true } |
| | | , { field: 'HinterID', title: 'HinterID', width: 100, hide: true } |
| | | , { field: 'æ¡ç ç±»å', title: 'æ¡ç ç±»å', width: 100 } |
| | | , { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 120 } |
| | | , { field: 'HMaterID', title: 'ç©æID', width: 100, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 120 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 120 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 120 } |
| | | , { field: 'HUnitID', title: '计éåä½ID', width: 100, hide: true } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 120 } |
| | | , { field: '计éåä½', title: '计éåä½', width: 120 } |
| | | , { field: 'HAuxPropID', title: 'è¾
å©å±æ§ID', width: 100, hide: true } |
| | | , { field: 'è¾
å©å±æ§ä»£ç ', title: 'è¾
å©å±æ§ä»£ç ', width: 120 } |
| | | , { field: 'è¾
å©å±æ§', title: 'è¾
å©å±æ§', width: 120 } |
| | | , { field: 'æ¹å·', title: 'æ¹å·', width: 120 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 100 } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 120 } |
| | | , { field: '计åè·è¸ªå·', title: '计åè·è¸ªå·', width: 120 } |
| | | , { field: 'æ¯å¦èµ å', title: 'æ¯å¦èµ å', width: 100 } |
| | | , { field: 'DeptID', title: '车é´ID', width: 100, hide: true } |
| | | , { field: '车é´', title: '车é´', width: 120 } |
| | | , { field: 'HSupID', title: 'ä¾åºåID', width: 100, hide: true } |
| | | , { field: 'ä¾åºå代ç ', title: 'ä¾åºå代ç ', width: 120 } |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå', width: 120 } |
| | | , { field: 'å®¢æ·æ¡ç ç¼å·', title: 'å®¢æ·æ¡ç ç¼å·', width: 120 } |
| | | , { field: '客æ·åå·', title: '客æ·åå·', width: 120 } |
| | | , { field: '徿¥åä½', title: '徿¥åä½', width: 120 } |
| | | , { field: 'éå®è®¢åå·', title: 'éå®è®¢åå·', width: 120 } |
| | | , { field: 'éå®è®¢åè¡å·', title: 'éå®è®¢åè¡å·', width: 120 } |
| | | , { field: 'æå·', title: 'æå·', width: 120 } |
| | | , { field: 'æ»ææ°', title: 'æ»ææ°', width: 100 } |
| | | , { field: 'æ¡ç æ¥æ', title: 'æ¡ç æ¥æ', width: 120 } |
| | | , { field: 'ç产å
¥åºæ¥æ', title: 'ç产å
¥åºæ¥æ', width: 120 } |
| | | , { field: 'ç产å
¥åºåå·', title: 'ç产å
¥åºåå·', width: 120 } |
| | | , { field: 'ç产å
¥åºæ¬¡æ°', title: 'ç产å
¥åºæ¬¡æ°', width: 100 } |
| | | , { field: 'éå®åºåºæ¥æ', title: 'éå®åºåºæ¥æ', width: 120 } |
| | | , { field: 'éå®åºåºåå·', title: 'éå®åºåºåå·', width: 120 } |
| | | , { field: 'éå®åºåºæ¬¡æ°', title: 'éå®åºåºæ¬¡æ°', width: 100 } |
| | | , { field: 'ä½åºæ è®°', title: 'ä½åºæ è®°', width: 100 } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 100 } |
| | | , { field: '夿³¨', title: '夿³¨', width: 120 } |
| | | , { field: 'å¶ä½äºº', title: 'å¶ä½äºº', width: 100 } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 120 } |
| | | , { field: '计åå®å·¥æ¥æ', title: '计åå®å·¥æ¥æ', width: 120 } |
| | | , { field: 'æå°æ¬¡æ°', title: 'æå°æ¬¡æ°', width: 100 } |
| | | , { field: 'HSTOCKORGID', title: 'HSTOCKORGID', width: 100, hide: true } |
| | | , { field: 'çæç»ç»', title: 'çæç»ç»', width: 120 } |
| | | ]; |
| | | option2 = { |
| | | id: 'mainTable2' |
| | | , elem: '#mainTable2' |
| | | , height: 500 |
| | | , page: false |
| | | , limit: 500 |
| | | , cellMinWidth: 120 |
| | | , height: 650 |
| | | , cols: [columns] |
| | | , done: function (res, curr, count) { |
| | | } |
| | | }; |
| | | } |
| | | //æ æºåæ°å¢ |
| | | function set_AddFNew() { |
| | | option.data = [{ |
| | | "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": "" |
| | | , "HAuxPropID": 0, "HAuxPropNumber": "", "HAuxPropName": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HGiveAwayFlag": 0 |
| | | "HMainID": 0, "HSubID": 0, "HBillNo": "", "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": "" |
| | | , "HAuxPropID": 0, "HAuxPropNumber": "", "HAuxPropName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HBatchNo": "", "HGiveAwayFlag": 0 |
| | | , "HQty": 0, "HMinQty": 0, "HBQty": 0, "HPackQty": 0, "HDate": "", "HCusID": 0, "HCusNumber": "", "HCusName": "", "HSeOrderBillNo": "", "HRemark": "" |
| | | }]; |
| | | table.render(option); |
| | |
| | | }]; |
| | | table.render(option1); |
| | | } |
| | | |
| | | function set_AddFNew2() { |
| | | option2.data = []; |
| | | table.render(option2); |
| | | } |
| | | |
| | | //æ¥ææ ¼å¼å |
| | | function formatDate(date) { |
| | | var d = new Date(date), |
| | |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | //模å
·ä¿¡æ¯ 妿卿¨¡å
·ä»£ç å æF7 |
| | | if (obj.event === 'HMaterCode') //模å
·ä¿¡æ¯ 妿卿¨¡å
·ä»£ç å æF7 |
| | | if (obj.event === 'HMaterNumber') //模å
·ä¿¡æ¯ 妿卿¨¡å
·ä»£ç å æF7 |
| | | { |
| | | //页é¢å±-èªå®ä¹ //F7éæ©æ¨¡å
· |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å¨å
·å表', |
| | | title: 'ç©æå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/MouldInformation.html', 'yes'], |
| | | content: ['../../PublicPage/PartInformation.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HMaterID: checkStatus.data[0].HItemID, |
| | | HMaterCode: checkStatus.data[0].HNumber, |
| | | HMaterNumber: checkStatus.data[0].HNumber, |
| | | HMaterName: checkStatus.data[0].HName, |
| | | HMaterSpec: checkStatus.data[0].HModel, |
| | | |
| | | HDesignLife: 0, //è®¾è®¡å¯¿å½ |
| | | HLeaveLife: 0, //å©ä½å¯¿å½ |
| | | HQty: 1, //宿¶æ°é |
| | | HMoney: 0, //éé¢ |
| | | HMaterModel: checkStatus.data[0].HModel |
| | | }); |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | |
| | | }); |
| | | } |
| | | //è¾
å©å±æ§ä¿¡æ¯ |
| | | if (obj.event === 'HPropertyCode') //è¾
å©å±æ§ä¿¡æ¯ |
| | | if (obj.event === 'HAuxPropNumber') //è¾
å©å±æ§ä¿¡æ¯ |
| | | { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | |
| | | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HPropertyID: checkStatus.data[0].HItemID, |
| | | HPropertyCode: checkStatus.data[0].HNumber, |
| | | HPropertyName: checkStatus.data[0].HName, |
| | | HAuxPropID: checkStatus.data[0].HItemID, |
| | | HAuxPropNumber: checkStatus.data[0].HNumber, |
| | | HAuxPropName: checkStatus.data[0].HName, |
| | | }); |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | |
| | | } |
| | | |
| | | //计éåä½ä»£ç |
| | | if (obj.event === 'HUnitCode') //计éåä½ä»£ç |
| | | if (obj.event === 'HUnitNumber') //计éåä½ä»£ç |
| | | { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HUnitID: checkStatus.data[0].HItemID, |
| | | HUnitCode: checkStatus.data[0].HNumber, |
| | | HUnitNumber: checkStatus.data[0].HNumber, |
| | | HUnitName: checkStatus.data[0].HName, |
| | | }); |
| | | |
| | |
| | | } |
| | | }); |
| | | } |
| | | //ä»åºä»£ç |
| | | if (obj.event === 'HWHCode') //ä»åºä»£ç |
| | | //客æ·ä»£ç |
| | | if (obj.event === 'HCusNumber') //客æ·ä»£ç |
| | | { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ä»åºå表', |
| | | title: '客æ·å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/WareHouseInformation.html', 'yes'], |
| | | content: ['../../PublicPage/CustomerInformation.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HWHID: checkStatus.data[0].HItemID, |
| | | HWHCode: checkStatus.data[0].HNumber, |
| | | HWHName: checkStatus.data[0].HName, |
| | | HSPID: "", |
| | | HSPCode: "", |
| | | HSPName: "", |
| | | |
| | | HCusID: checkStatus.data[0].HItemID, |
| | | HCusNumber: checkStatus.data[0].HNumber, |
| | | HCusName: checkStatus.data[0].HName |
| | | }); |
| | | ////表头ä»åºä¸ºç©ºæ¶ ç»å®æç»è¡ä»åºä¿¡æ¯ |
| | | //if ($("#HWHID").val() == '' || $("#HWHID").val() == null) { |
| | | // $("#HWHName").val(checkStatus.data[0].HName); |
| | | // $("#HWHID").val(checkStatus.data[0].HItemID); |
| | | //} |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | //ä»ä½ä»£ç |
| | | if (obj.event === 'HSPCode') //ä»ä½ä»£ç |
| | | { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ä»ä½å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/WareLocationInformation.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HSPID: checkStatus.data[0].HItemID, |
| | | HSPCode: checkStatus.data[0].HNumber, |
| | | HSPName: checkStatus.data[0].HName, |
| | | }); |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | |
| | | layer.alert(sMsg, { icon: 5 }); |
| | | |
| | | } |
| | | |
| | | //æ¡ç çæ |
| | | function SaveBarCodeCreate(sMainSub, CampanyName) { |
| | | $.ajax( |
| | | { |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_BarCode/Sub_SaveBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "msg": sMainSub, "CampanyName": CampanyName }, |
| | | dataType: "json", |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | table.reload('mainTable1', { |
| | | data: result.list // è°ç¨table.reload éæ°æ¸²ææ¾ç¤ºå 载追å äºæ°æ®çè¡¨æ ¼ |
| | | }); |
| | | //çææåè·³è½¬å°æ¡ç ä¿¡æ¯æ ç¾é¡µ |
| | | element.tabChange('tab-TabTest', '2'); |
| | | //å 载档æ¡å表 |
| | | table.reload('mainTable2', { |
| | | data: result.data // è°ç¨table.reload éæ°æ¸²ææ¾ç¤ºå 载追å äºæ°æ®çè¡¨æ ¼ |
| | | }); |
| | | } |
| | | else { |
| | | layer.alert(result.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(sSubStr) { |
| | | var Result = true; |
| | | if ($("#HWHID").val() == '' || $("#HWHID").val() == null) { |
| | | layer.msg("ä»åºä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HSecManagerID").val() == '' || $("#HSecManagerID").val() == null) { |
| | | layer.msg("éªæ¶åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HKeeperID").val() == '' || $("#HKeeperID").val() == null) { |
| | | layer.msg("ä¿ç®¡åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null) { |
| | | layer.msg("é¨é¨ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | |
| | | if (typeof (sSubStr) == "undefined" || sSubStr == "") { |
| | | layer.msg("没æç©ææç»è®°å½", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") { |
| | | sSubStr = JSON.parse(sSubStr); |
| | | for (var i = 0; i < sSubStr.length; i++) { |
| | | if (sSubStr[i].HMaterID == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,å¨å
·ä¿¡æ¯ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubStr[i].HUnitID == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,计éåä½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubStr[i].HWHID == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,æ¶æä»åºä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | } |
| | | } |
| | | //if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") { |
| | | // sSubStr = JSON.parse(sSubStr); |
| | | // for (var i = 0; i < sSubStr.length; i++) { |
| | | // if (sSubStr[i].HMaterID == "") { |
| | | // layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,å¨å
·ä¿¡æ¯ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return Result = false; |
| | | // } |
| | | // if (sSubStr[i].HUnitID == "") { |
| | | // layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,计éåä½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return Result = false; |
| | | // } |
| | | // if (sSubStr[i].HWHID == "") { |
| | | // layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,æ¶æä»åºä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return Result = false; |
| | | // } |
| | | // } |
| | | //} |
| | | else { |
| | | return Result = true; |
| | | } |