| | |
| | | <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 æ¤æ ·å¼ç¨äºæ¶é¤è¡å
ç´ ä¸å¸å±å®½åº¦ä¸å¤çé®é¢*/ |
| | |
| | | margin-right: 0px; |
| | | } |
| | | /*end*/ |
| | | .layui-table-cell .layui-form-checkbox[lay-skin="primary"] { |
| | | margin-left: 35%; |
| | | } |
| | | |
| | | .layui-input-block { |
| | | margin-left: 0px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | <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="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"> |
| | | <option value="1">ä¾åºå</option> |
| | | <option value="2">客æ·</option> |
| | | <option value="3">车é´é¨é¨</option> |
| | | </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"> |
| | | <option value="1">ä¾åºå</option> |
| | | <option value="2">客æ·</option> |
| | | <option value="3">车é´é¨é¨</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HSourceBillType" id="HSourceBillType" lay-filter="HSourceBillType" class="layui-input" value="" style="float:left;width:150px"> |
| | | <option value="1">ä¾åºå</option> |
| | | <option value="2">客æ·</option> |
| | | <option value="3">车é´é¨é¨</option> |
| | | <option value="1">ç产订å</option> |
| | | <option value="2">çäº§æ±æ¥å</option> |
| | | <option value="3">éè´è®¢å</option> |
| | | <option value="4">æ¶æéç¥å</option> |
| | | <option value="5">å§å¤è®¢å</option> |
| | | <option value="6">éè´§éç¥å</option> |
| | | <option value="7">å
¶ä»å
¥åºå</option> |
| | | <option value="8">ç´æ¥è°æ¨å</option> |
| | | <option value="9">éè´éæå</option> |
| | | <option value="10">ç产éæå</option> |
| | | <option value="11">ç»è£
æå¸å</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="layui-form-label">éåå·<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSourceBillNo" id="HSourceBillNo" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSourceBillNoList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </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"> |
| | | <option value="1">ä¾åºå</option> |
| | | <option value="2">客æ·</option> |
| | | <option value="3">车é´é¨é¨</option> |
| | | </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="xuhao"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | <script type="text/html" id="switchTpl"> |
| | | <!-- è¿éç checked çç¶æåªæ¯æ¼ç¤º --> |
| | | <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="HGiveAwayFlag1"> |
| | | </script> |
| | | </form> |
| | | </div> |
| | |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var option = []; |
| | | var option1 = []; |
| | | var option2 = []; |
| | | var sWhere = ""; |
| | | var sBillType = "3801"; |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | //åå§å表åæä»¶ |
| | | set_InitFrom(); |
| | | //å è½½ç»ç»æ°æ® |
| | | set_HOrg(); |
| | | //å 载工åä»£ç æ°æ® |
| | | set_HWorksNumber(); |
| | | //å è½½æ¡ç ç±»åæ°æ® |
| | | set_HBarCodeType(); |
| | | //åå§åè¡¨æ ¼ |
| | | 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(HSupTypeID)', function (data) { |
| | | $("#HSupID").val(""); |
| | | $("#HSupName").val(""); |
| | | form.on('select(HSourceBillType)', function (data) { |
| | | $("#HSourceBillNo").val(""); |
| | | }); |
| | | |
| | | function getSupType() { |
| | | var type = $("#HSupTypeID").val(); |
| | | console.log(type) |
| | | var type = $("#HSourceBillType").val(); |
| | | switch (type) { |
| | | case '1': |
| | | return "SupplierInformation"; |
| | | return "ç产订å"; |
| | | break; |
| | | case '2': |
| | | return "CustomerInformation"; |
| | | return "çäº§æ±æ¥å"; |
| | | break; |
| | | case '3': |
| | | return "DeptInformation"; |
| | | return "éè´è®¢å"; |
| | | break; |
| | | case '4': |
| | | return "æ¶æéç¥å"; |
| | | break; |
| | | case '5': |
| | | return "å§å¤è®¢å"; |
| | | break; |
| | | } |
| | | } |
| | | //表头信æ¯å¾æ¥åä½å¼¹çª |
| | | form.on('submit(HSupList)', function () { |
| | | debugger; |
| | | if ($("#HSupTypeID").val() == 0 || $("#HSupTypeID").val() == null) { |
| | | return layer.msg('è¯·éæ©å¾æ¥ç±»å'); |
| | | |
| | | //è¡¨å¤´ä¿¡æ¯æºåä¿¡æ¯å¼¹çª |
| | | form.on('submit(HSourceBillNoList)', function () { |
| | | if ($("#HSourceBillType").val() == 0 || $("#HSourceBillType").val() == null) { |
| | | return layer.msg('è¯·éæ©åæ®ç±»å'); |
| | | } |
| | | //è·åç»ç»ID |
| | | var SetHOrgID = $("#HOrgID").find("option:selected").val(); |
| | | //页é¢å±-èªå®ä¹ |
| | | var url = '../../PublicPage/' + getSupType() + '.html'; |
| | | var url = '../../PublicPage/HSourceReportHtml.html?OperationType=3&linterid=' + SetHOrgID + '&HSouceBillType=' + getSupType() + ''; |
| | | url = encodeURI(url); |
| | | //alert(url); |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: '徿¥åä½å表', |
| | | title: '' + getSupType() + 'å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | area: ['95%', '80%'], |
| | | maxmin: true, |
| | | content: [url, 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('layTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | return layer.msg('è¯·éæ©åæ®æ°æ®'); |
| | | } |
| | | $("#HSupName").val(checkStatus.data[0].HName); |
| | | $("#HSupID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | 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(ToolPrint)', function (data) { |
| | | get_PrintReport(); |
| | | }) |
| | | |
| | | //æ¡ç çæ |
| | | 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 æ¤é¡µé¢æææ¹æ³ |
| | |
| | | elem: '#HDate' |
| | | }); |
| | | } |
| | | //åå§åæç»è¡¨æ ¼ |
| | | |
| | | //è·åç»ç» |
| | | function set_HOrg() { |
| | | //è·åç»å½é¡µç»ç»å |
| | | var Organization = ''; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/Web/GetOrganizations", |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; |
| | | } |
| | | $("#HOrgID").append(Organization); |
| | | form.render('select'); |
| | | } |
| | | $('#HOrgID').find("option[value=" + result.data[0].ID + "]").attr("selected", true); |
| | | form.render('select') //忬¡æ¸²æ |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | //è·åå·¥å代ç |
| | | function set_HWorksNumber() { |
| | | //è·åå·¥å代ç |
| | | var Organization = ''; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/Sc_BarCode/GetHWorksNumberBill", |
| | | success: function (result) { |
| | | 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>'; |
| | | } |
| | | $("#HWorksNumber").append(Organization); |
| | | form.render('select'); |
| | | if (result.list[0] != "" && result.list[0] != null) { |
| | | $('#HWorksNumber').find("option[value=" + result.list[0] + "]").attr("selected", true); |
| | | form.render('select') //忬¡æ¸²æ |
| | | } |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | //è·åæ¡ç ç±»å |
| | | function set_HBarCodeType() { |
| | | //è·åæ¡ç ç±»å代ç |
| | | var Organization = ''; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/Sc_BarCode/GetHBarCodeTypeBill", |
| | | success: function (result) { |
| | | 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>'; |
| | | } |
| | | $("#HBarCodeType").append(Organization); |
| | | form.render('select'); |
| | | } |
| | | $('#HBarCodeType').find("option[value=" + result.list[0] + "]").attr("selected", true); |
| | | form.render('select') //忬¡æ¸²æ |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //åå§åç©æä¿¡æ¯è¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | 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: 'æ¯å¦èµ å', 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' } |
| | |
| | | } |
| | | }; |
| | | } |
| | | //åå§æ±æ»ä¿¡æ¯ |
| | | //åå§æ¡ç ä¿¡æ¯è¡¨æ ¼ |
| | | function set_CountGrid() { |
| | | //表头 |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 100 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', edit: 'text', event: 'HMaterCode', width: 100 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', edit: 'text', width: 100 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', edit: 'text', width: 100 } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', edit: 'text', width: 100 } |
| | | , { field: 'æ¹æ¬¡', title: 'æ¹æ¬¡', edit: 'text', width: 100 } |
| | | , { field: '宿¶æ°é', title: '宿¶æ°é', edit: 'text', width: 100 } |
| | | , { field: 'hwhid1', title: 'HWHID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'æ¶æä»åºä»£ç ', title: 'æ¶æä»åºä»£ç ', edit: 'text', event: 'HWHCode', width: 120 } |
| | | , { field: 'æ¶æä»åº', title: 'æ¶æä»åºåç§°', edit: 'text', width: 120 } |
| | | , { field: '表ä½å¤æ³¨', title: '夿³¨', edit: 'text', 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' |
| | | , elem: '#mainTable1' |
| | | , height: 500 |
| | | , page: true |
| | | , page: false |
| | | , limit: 500 |
| | | , cellMinWidth: 120 |
| | | , height: 650 |
| | |
| | | } |
| | | }; |
| | | } |
| | | |
| | | //åå§åæ¡£æ¡å表信æ¯è¡¨æ ¼ |
| | | 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":"", "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": "" }]; |
| | | option.data = [{ |
| | | "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); |
| | | } |
| | | |
| | | function set_AddFNew1() { |
| | | option1.data = [{ "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": "" }]; |
| | | option1.data = [{ |
| | | "HBarCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HAuxPropNumber": "", "HAuxPropName": "" |
| | | , "HGiveAwayFlag": "", "HUnitCode": "", "HUnitName": "", "HQty": 0, "HDate": "", "HCusNumber": "", "HCusName": "" |
| | | , "HSourceBillNo": "", "HSeOrderBillNo": "", "HRemark": "", "HMTONo": "", "HShowDate": "", "HInnerBillNo": "", "HMaker": "" |
| | | }]; |
| | | 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 get_PrintReport() { |
| | | var checkStatus = table.checkStatus('mainTable2') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length>0) { |
| | | var rows = ''; |
| | | for (var i = 0; i < data.length; i++) { |
| | | rows += data[i].HItemID.toString() + ','; |
| | | } |
| | | rows = rows.substring(rows.length - 1, 0); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + rows + '&MyMsg=' + rows + '&Type=HGy_BarCodeBill', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©è¦æå°çæ¡ç æ°æ®ï¼'); |
| | | } |
| | | } |
| | | |
| | | //é空éªè¯ |
| | | 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].HMainID == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,æºåä¿¡æ¯ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubStr[i].HMaterID == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,å¨å
·ä¿¡æ¯ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | 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: "温馨æç¤º" }); |
| | | if (sSubStr[i].HQty == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,æ°é为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | } |