Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
| | |
| | | |
| | | //è·åæé®éè设置çªå£æä»¶è·¯å¾ |
| | | var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | |
| | | var viewsLocation = urlStr.indexOf('views') |
| | | var viewsLocation = urlStr.indexOf('views') |
| | | urlStr = urlStr.substring(viewsLocation + 6, urlStr.length) |
| | | var urlLen = urlStr.split('/'); |
| | | for (var i = 0; i < urlLen.length - 4; i++) { |
| | | for (var i = 0; i < urlLen.length - 1; i++) { |
| | | contentUrl += "../"; |
| | | } |
| | | contentUrl += 'ç³»ç»ç®¡ç/æé®è®¾ç½®/Xt_ModuleButtonSet.html?HModName=' + HModName + '&HBillType=' + HBillType + "&btnIdList=" + btnIdList + "&btnNameList=" + btnNameList + "&btnOrderList=" + btnOrderList + "&HUserName=" + HUserName; |
| | |
| | | |
| | | var contentUrl = ""; |
| | | var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | var viewsLocation = urlStr.indexOf('views') |
| | | urlStr = urlStr.substring(viewsLocation + 6, urlStr.length) |
| | | var urlLen = urlStr.split('/'); |
| | | for (var i = 0; i < urlLen.length - 4; i++) { |
| | | for (var i = 0; i < urlLen.length - 1; i++) { |
| | | contentUrl += "../"; |
| | | } |
| | | contentUrl += 'åºç¡èµæ/éèå设置/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName; |
| | |
| | | |
| | | var contentUrl = ""; |
| | | var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | var viewsLocation = urlStr.indexOf('views') |
| | | urlStr = urlStr.substring(viewsLocation + 6, urlStr.length) |
| | | var urlLen = urlStr.split('/'); |
| | | for (var i = 0; i < urlLen.length - 4; i++) { |
| | | for (var i = 0; i < urlLen.length - 1; i++) { |
| | | contentUrl += "../"; |
| | | } |
| | | contentUrl += 'åºç¡èµæ/éèå设置/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName; |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | //设置å
容åä½å¤§å° ç´æ¥è¦ççè¯ä¼å¯¼è´åæçæ ·å¼æ¶å¤±ï¼æ
使ç¨å¨styleä¸è®¾ç½®important强å¶å¯ç¨çæ¹å¼ |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | option.cols[0][i + 1]["style"]+="font-size:" + data1.data[0].HFontSize + " !important px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | option.cols[0][i + 1]["style"]+= "font-size:100% !important;"; |
| | | } |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| New file |
| | |
| | | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O})); |
| | |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; 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, maximum-scale=1"> |
| | |
| | | <script src="../../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../../layuiadmin/PubCustom.js"></script> |
| | | <style> |
| | | .layui-col-xs4 { |
| | | width: 12.333333% |
| | | } |
| | | |
| | | .layui-col-xs8 { |
| | | width: 55.666667%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0px"> |
| | | <div class="layui-card"> |
| | | <div class="layui-fluid" style="padding:0"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 0px; height:800px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div style="background-color:#0085E8;"> |
| | | <span style="color: white;"><i class="layui-icon layui-icon-form"></i>å æå</span> |
| | | <span style="color: white;"><i class="layui-icon layui-icon-form"></i>ç产ææå</span> |
| | | </div> |
| | | <div class="layui-form-item" style="padding:10px;margin:0px"> |
| | | <div class="layui-form-item" style="padding:15px;margin:0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:50px;padding-left:0px;">ææ¡ç </label> |
| | | <div class="layui-col-xs2"> |
| | | <label class="layui-form-label" style="width: 45px;padding-left: 0px;">ææ¡ç </label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HBarCode_Pack" id="HBarCode_Pack" lay-verify="HBarCode_Pack" autocomplete="off" class="layui-input"> |
| | | <input type="text" name="HBarCode_Pack" id="HBarCode_Pack" lay-verify="HBarCode_Pack" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();"> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdHBarCode_Pack" id="cmdHBarCode_Pack">ç¡®å®</button> |
| | | <button type="button" lay-submit="" lay-filter="HBarCode_Pack-BT" class="layui-btn" id="HBarCode_Pack-BT" style="width: 45px; margin-left: 8px;padding-left:12px">OK</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-Sc_DeletePackUnionBill_PDA"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1">æ¡ç ä¿¡æ¯</li> |
| | | <li lay-id="2">åæ®ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--æ¡ç ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table> |
| | | </div> |
| | | <!--åæ®ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">å¶å人</label> |
| | | </div> |
| | | <div class="layui-col-xs8 layui-input-inline mobile"> |
| | | <input type="text" name="HMaker" id="HMaker" lay-verify="HMaker" autocomplete="off" class="layui-input"> |
| | | <div class="layui-tab layui-col-xs12" style="margin-top:5px;" lay-filter="tab-Sc_DeletePackUnionBill_PDA"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;">ææä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;">åæ®ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--ææä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs12"> |
| | | <div class="layui-form-item" style="padding:0px;margin:0px"></div> |
| | | <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">åæ®å·</label> |
| | | </div> |
| | | <div class="layui-col-xs8 layui-input-inline mobile"> |
| | | <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">忮ID</label> |
| | | </div> |
| | | <div class="layui-col-xs8 layui-input-inline mobile"> |
| | | <input type="text" name="HInterID" id="HInterID" lay-verify="HInterID" value="0" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdLoadData" id="cmdLoadData">æäº¤</button> |
| | | </div> |
| | | <div class="layui-col-xs3"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">éåº</button> |
| | | <!--åæ®ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item" style="padding: 0px; margin: 0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">å¶å人</label> |
| | | </div> |
| | | <div class="layui-col-xs9"> |
| | | <input type="text" name="HMaker" id="HMaker" lay-verify="HMaker" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">åæ®å·</label> |
| | | </div> |
| | | <div class="layui-col-xs9"> |
| | | <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">忮ID</label> |
| | | </div> |
| | | <div class="layui-col-xs9"> |
| | | <input type="text" name="HInterID" id="HInterID" lay-verify="HInterID" value="0" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px"> |
| | | <button type="button" lay-submit="" lay-filter="cmdSaver" class="layui-btn" id="cmdSaver">ææ</button> |
| | | <button type="button" lay-submit="" lay-filter="cmdCancel" class="layui-btn" id="cmdCancel">éåº</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!--éèåæ®µ--> |
| | | <input type="hidden" name="HBillType" id="HBillType"> |
| | | <!--失败æç¤ºé³--> |
| | | <div id="" style="display:none;"> |
| | | <audio id="cs1" hidden controls> |
| | | <audio id="cs" hidden controls> |
| | | <source src="../../../video/jingbao.wav" type="audio/ogg"> |
| | | </audio> |
| | | </div> |
| | | <!--æåæç¤ºé³--> |
| | | <div id="" style="display:none;"> |
| | | <audio id="cs2" hidden controls> |
| | | <source src="../../../video/success.wav" type="audio/ogg"> |
| | |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | var HInterID = $('#HInterID').val() |
| | | var HBillNo = $('#HBillNo').val() |
| | | var HBillType = '3783' |
| | | var HMaker = sessionStorage["HUserName"] |
| | | var HStockOrgID = sessionStorage["OrganizationID"] |
| | | var option = []; |
| | | var HStockOrgID = sessionStorage["OrganizationID"] //ç»ç»ID |
| | | var listOption = []; |
| | | var columns = ""; |
| | | var HModName = "Sc_DeletePackUnionBill_PDA"; |
| | | var ModRightName = "CE_DeletePackUnion"; //模åæéåæ° |
| | | var titleData = []; //ä¸éè¦æ¾ç¤ºçåæ®µ |
| | | |
| | | //#endregion |
| | | |
| | |
| | | if (sessionStorage.login != "login") { |
| | | layer.confirm("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼", { |
| | | icon: 4, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['éæ°ç»å½'] |
| | | }, function () { window.location.href = "../../../user/login.html"; }); |
| | | }, function () { window.location.href = "../../../user/login_pda.html"; }); |
| | | } |
| | | |
| | | //#region åå§åçé¢ |
| | | //#region ç¨æ·æ¨¡åæé夿 |
| | | |
| | | set_ClearBill(); |
| | | //ç¨æ·æ¨¡åæé夿 |
| | | CheckModRight(); |
| | | |
| | | function set_ClearBill() { |
| | | $("#HMaker").val(HMaker); |
| | | $("#HMaker").attr("readonly", "readonly"); |
| | | $("#HBillNo").attr("readonly", "readonly"); |
| | | $("#HInterID").attr("readonly", "readonly"); |
| | | element.tabChange('tab-Sc_DeletePackUnionBill_PDA', '1'); |
| | | var pFocus = $("#HBarCode_Pack"); |
| | | pFocus.focus(); //è·åå
æ |
| | | pFocus.select(); |
| | | set_InitGrid(); //åå§åè¡¨æ ¼ |
| | | function CheckModRight() { |
| | | layer.load(3); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/CheckModRight_ERP_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "ModRightName": ModRightName, "HUserName": HMaker }, |
| | | success: function (d) { |
| | | if (d.count == 1) { |
| | | } |
| | | else { |
| | | layer.msg(d.Message, { |
| | | icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { parent.location.href = "../../../../views/index_Mobile.html"; }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null }//åæ¶èµæº |
| | | }); |
| | | layer.closeAll("loading"); |
| | | } |
| | | |
| | | //#region åå§åè¡¨æ ¼æ¹æ³ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#wl-table' |
| | | , height: 'full-50' |
| | | //, page: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | //, limits: [50, 500, 5000, 20000] |
| | | }; |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //失败æç¤ºé³ |
| | | function playSound() { |
| | | console.log("playSound"); |
| | | var audio = document.getElementById("cs1"); |
| | | var audio = document.getElementById("cs"); |
| | | audio.play(); |
| | | audio.onended = function () { |
| | | // å½é³é¢ææ¥å®ææ¶ï¼è°ç¨ pause å设置 currentTime 为 0 ä»¥åæ¢ææ¥å¹¶éç½® |
| | |
| | | }; |
| | | } |
| | | |
| | | //#region åå§åçé¢ |
| | | |
| | | set_ClearBill(); |
| | | |
| | | function set_ClearBill() { |
| | | //表头åå§åèµå¼ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HBillType").val(HBillType); |
| | | $("#HInterID").val(0); |
| | | $("#HBillNo").val(''); |
| | | HInterID = $('#HInterID').val() |
| | | HBillNo = $('#HBillNo').val() |
| | | |
| | | //é»è®¤æ¾ç¤ºé¡µé¢ |
| | | element.tabChange('tab-Sc_DeletePackUnionBill_PDA', '1'); |
| | | set_InitGrid(); //åå§åè¡¨æ ¼ |
| | | |
| | | var data = []; |
| | | listOption.cols = [[ |
| | | { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 100 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 100 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 100 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 100 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100 } |
| | | ]]; |
| | | listOption.data = data; |
| | | table.render(listOption); |
| | | |
| | | //å
æ é»è®¤å¨æ¡ç ä½ç½®ä¸ |
| | | var pFocus = $("#HBarCode_Pack"); |
| | | pFocus.select(); |
| | | pFocus.focus(); //è·åå
æ |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | listOption = { |
| | | elem: '#wl-table' |
| | | //, toolbar: '#toolbarDemo' |
| | | , totalRow: true |
| | | , height: 'full-60' |
| | | , cellMinWidth: 90 |
| | | , limit: 200 |
| | | }; |
| | | } |
| | | |
| | | //#region ç¹å»è¡éä¸é«äº® |
| | | table.on('row(wl-table)', function (obj) { |
| | | //éä¸è¡æ¹åé¢è² |
| | | $(".layui-table-body tr ").attr({ "style": "background:" }); //å
¶ä»træ¢å¤åæ · |
| | | obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); //éä¸è¡æ ·å¼ |
| | | obj.tr.find('i[class="layui-anim layui-icon"]').trigger("click"); //éä¸radioæ ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" }); //æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | }) |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ«æææ¡ç |
| | | |
| | | //æå车é®è¿åä¿¡æ¯ |
| | | $('#HBarCode_Pack').on('keydown', function (event) { |
| | | if (event.keyCode == 13) { |
| | | GetMeesageByBarCode_Pack(); |
| | | } |
| | | }); |
| | | |
| | | //ç¹å»æé®è¿åä¿¡æ¯ |
| | | form.on('submit(cmdHBarCode_Pack)', function (data) { |
| | | GetMeesageByBarCode_Pack(); |
| | | }); |
| | | |
| | | //æ«æææ¡ç |
| | | function GetMeesageByBarCode_Pack(obj) { |
| | | HBarCode_Pack = $('#HBarCode_Pack').val() |
| | | |
| | | if (HBarCode_Pack == '') { |
| | | playSound(); |
| | | layer.msg("ææ¡ç ä¸è½ä¸ºç©ºï¼è¯·æ«æææ¡ç ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/Get_PackBarCode_DeletePackUnionBill_Json", |
| | | data: { "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker, "HStockOrgID": HStockOrgID }, |
| | | success: function (result) { |
| | | var col = []; |
| | | if (result.count == 1) { |
| | | playSound_OK(); |
| | | $("#HInterID").val(result.data[0].HInterID); |
| | | $("#HBillNo").val(result.data[0].HBillNo); |
| | | $("#HBarCode_Pack").val(result.data[0].HBarCode_Pack); |
| | | $("#HBarCode_Pack").attr("readonly", "readonly"); |
| | | document.getElementById("cmdHBarCode_Pack").disabled = true; //æé®å为ä¸å¯ç¼è¾ç¶æ |
| | | //å
¨å±åéèµå¼ |
| | | HInterID = $('#HInterID').val() |
| | | HBillNo = $('#HBillNo').val() |
| | | element.tabChange('tab-Sc_DeletePackUnionBill_PDA', '1'); |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | var data = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in result.list) { |
| | | data.push({ "name": result.list[key].ColmCols, "Type": result.list[key].ColmType }); |
| | | } |
| | | //夿æ¯å¦æ¯çº¯è±æ |
| | | var patrn = new RegExp("[\u4E00-\u9FA5]+"); |
| | | col.push({ type: 'radio' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (!patrn.test(data[i].name)) { |
| | | col.push({ field: data[i].name, title: data[i].name, hide: true }); //éèå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | case 'DateTime': |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true }); |
| | | } |
| | | } |
| | | } |
| | | option.cols = [col]; |
| | | option.data = result.data; |
| | | table.cache['wl-table'] = null; //æ¸
ç©ºè¡¨æ ¼ç¼åæ°æ® |
| | | table.render(option); |
| | | layer.load(3); |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | $('#HBarCode_Pack').val(""); |
| | | $("#HBarCode_Pack").select(); |
| | | $("#HBarCode_Pack").focus(); //è·åå
æ |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null }//åæ¶èµæº |
| | | }); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region åè½æ§ä»¶ |
| | | |
| | | //#region æäº¤ä¸ä¼ åè½æ§ä»¶ |
| | | |
| | | form.on('submit(cmdLoadData)', function (data) { |
| | | HBarCode_Pack = $('#HBarCode_Pack').val() |
| | | document.getElementById("cmdLoadData").disabled = true; //æé®å为ä¸å¯ç¼è¾ç¶æ |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/GetDeletePackUnionBill_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.confirm(data.Message, { |
| | | icon: 1, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['æ°å¢'], |
| | | btn2: function () { |
| | | parent.location.href = "../../../../views/index_Mobile.html" |
| | | }//å
³é |
| | | }, function () { |
| | | window.location.reload(); //å·æ°å½åé¡µé¢ |
| | | });//æ°å¢ |
| | | layer.load(3); |
| | | //#region ææ |
| | | form.on('submit(cmdSaver)', function (data) { |
| | | document.getElementById("cmdSaver").disabled = true; //æé®å为ä¸å¯ç¼è¾ç¶æ |
| | | var sSubStr = table.cache['wl-table']; |
| | | var HBarCode_Pack = $('#HBarCode_Pack').val() |
| | | if (AllowLoadData(sSubStr) != false)//é空éªè¯ |
| | | { |
| | | layer.load(3); |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/GetDeletePackUnionBill_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäº |
| | | layer.confirm(data.Message, { |
| | | icon: 1, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['æ°å¢', 'å
³é'], |
| | | btn2: function () { |
| | | parent.location.href = "../../../../views/index_Mobile.html"; |
| | | }//å
³é |
| | | } |
| | | , function () { |
| | | location.replace('Sc_DeletePackUnionBill_PDA.html?HInterID=0'); |
| | | });//æ°å¢ |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | document.getElementById("cmdSaver").disabled = false; //æé®å为å¯ç¼è¾ç¶æ |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | document.getElementById("cmdSaver").disabled = false; //æé®å为å¯ç¼è¾ç¶æ |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | document.getElementById("cmdLoadData").disabled = false; //æé®å为å¯ç¼è¾ç¶æ |
| | | } |
| | | layer.closeAll("loading"); //å
³éå è½½å± |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | document.getElementById("cmdLoadData").disabled = false; |
| | | } |
| | | }); |
| | | }); |
| | | layer.closeAll("loading"); |
| | | return; |
| | | } |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region éåºåè½æ§ä»¶ |
| | | //#region éåº |
| | | |
| | | form.on('submit(cmdCancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ«æææ¡ç |
| | | |
| | | //æ«æææ¡ç |
| | | $('#HBarCode_Pack').on('keydown', function (event) { |
| | | if (event.keyCode == 13) { |
| | | GetMeesageByBarCode_Pack(); |
| | | } |
| | | }); |
| | | |
| | | //ææ¡ç æé® |
| | | form.on('submit(HBarCode_Pack-BT)', function (data) { |
| | | GetMeesageByBarCode_Pack(); |
| | | }); |
| | | |
| | | //æ«ææ¡ç |
| | | function GetMeesageByBarCode_Pack(obj) { |
| | | var HBarCode_Pack = $('#HBarCode_Pack').val() |
| | | if (HBarCode_Pack == '') { |
| | | playSound(); |
| | | layer.msg("ææ¡ç ä¸è½ä¸ºç©ºï¼è¯·æ«æææ¡ç ï¼", { |
| | | icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode_Pack").select(); |
| | | $("#HBarCode_Pack").focus(); |
| | | }); |
| | | return; |
| | | } |
| | | layer.load(3) |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/Get_PackBarCode_DeletePackUnionBill_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker, "HStockOrgID": HStockOrgID }, |
| | | success: function (result) { |
| | | var data = []; |
| | | var col = []; |
| | | if (result.count == 1) { |
| | | playSound_OK(); |
| | | $("#HInterID").val(result.data[0].HInterID); |
| | | $("#HBillNo").val(result.data[0].HBillNo); |
| | | HInterID = $('#HInterID').val() |
| | | HBillNo = $('#HBillNo').val() |
| | | |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in result.list) { |
| | | //卿è·åå表ææåå |
| | | data.push({ "id": result.list[key].ColmCols, "name": result.list[key].ColmCols, "Type": result.list[key].ColmType }); |
| | | //è·åä¸éè¦æ¾ç¤ºçåï¼Hå¼å¤´çå䏿¾ç¤ºï¼ |
| | | var patrn = new RegExp(/^h/i); |
| | | if (patrn.test(result.list[key].ColmCols)) { |
| | | titleData[key] = result.list[key].ColmCols; |
| | | } |
| | | } |
| | | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'radio', totalRowText: 'å计' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 }); |
| | | break; |
| | | default: |
| | | |
| | | if (data[i].name == 'æ°é') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', totalRow: true }); |
| | | } else if (data[i].name == 'ç©æä»£ç ') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 120 }); |
| | | } else if (data[i].name == 'ç©æåç§°' || data[i].name == 'è§æ ¼åå·') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 180 }); |
| | | } else { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 220 }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | columns = col; |
| | | listOption.cols = [columns]; |
| | | listOption.data = result.data; |
| | | listOption.totalRow = true; |
| | | table.cache['wl-table'] = null; //æ¸
ç©ºè¡¨æ ¼ç¼åæ°æ® |
| | | table.render(listOption); |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(result.Message, { |
| | | icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode_Pack").select(); |
| | | $("#HBarCode_Pack").focus(); |
| | | listOption.cols = [[ |
| | | { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 100 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 100 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 100 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 100 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100 } |
| | | , { field: 'æ¡ç 个æ°', title: 'æ¡ç 个æ°', width: 100 } |
| | | ]]; |
| | | listOption.data = data; |
| | | table.render(listOption); |
| | | }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | playSound(); |
| | | layer.msg("é误ï¼" + err, { |
| | | icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode_Pack").select(); |
| | | $("#HBarCode_Pack").focus(); |
| | | listOption.cols = [[ |
| | | { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 100 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 100 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 100 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 100 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100 } |
| | | , { field: 'æ¡ç 个æ°', title: 'æ¡ç 个æ°', width: 100 } |
| | | ]]; |
| | | listOption.data = data; |
| | | table.render(listOption); |
| | | }); |
| | | } |
| | | }); |
| | | layer.closeAll("loading"); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | }); |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | //æ¤å¤æ¹æ³æ¶åå°è¢«å¤é¨é¡µé¢parent.æ¹æ³åè°ç¨çå¿
é¡»æ¾å¨Layuiæ¹æ³å¤é¨ |
| | | |
| | | //åæ®ä¸ä¼ å夿 |
| | | function AllowLoadData(sSubStr) { |
| | | if (sSubStr.length == 0) { |
| | | layer.msg("æ²¡æææä¿¡æ¯ï¼è¯·å
æ«æææ¡ç ï¼ç¡®è®¤æ 误ååææï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | </script> |
| | | |
| | | </body> |
| | |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div class="layui-tab" lay-filter="tab-Sc_PackUnionBillList_PDA"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1">ç¼åå表</li> |
| | | <li lay-id="1" style="padding:1px;">ç¼åå表</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <!--ç¼åå表--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs12"> |
| | | <table class="layui-hide" id="Temp-table" lay-filter="Temp-table"></table> |
| | | <div class="layui-form-item" style="padding:0px;margin:0px"></div> |
| | | <table class="layui-hide" id="dj-table" lay-filter="dj-table"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="margin-bottom: 20px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">ç¼è¾</button> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">å é¤</button> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">å·æ°</button> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">éåº</button> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdAdd">æ°å¢</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px"> |
| | | <div class="layui-col-xs2" style="margin-left:0px"> |
| | | <button type="button" lay-submit="" style="width: 60px; float: right" lay-filter="cmdModify" class="layui-btn" id="cmdModify">ç¼è¾</button> |
| | | </div> |
| | | <div class="layui-col-xs2" style="margin-left:5px"> |
| | | <button type="button" lay-submit="" style="width: 60px; float: right" lay-filter="cmdDelete" class="layui-btn" id="cmdDelete">å é¤</button> |
| | | </div> |
| | | <div class="layui-col-xs2" style="margin-left:5px"> |
| | | <button type="button" lay-submit="" style="width: 60px; float: right" lay-filter="cmdRefresh" class="layui-btn" id="cmdRefresh">å·æ°</button> |
| | | </div> |
| | | <div class="layui-col-xs2" style="margin-left:5px"> |
| | | <button type="button" lay-submit="" style="width: 60px; float: right" lay-filter="cmdCancel" class="layui-btn" id="cmdCancel">éåº</button> |
| | | </div> |
| | | <div class="layui-col-xs2" style="margin-left:5px"> |
| | | <button type="button" lay-submit="" style="width: 60px; float: right" lay-filter="cmdAdd" class="layui-btn" id="cmdAdd">æ°å¢</button> |
| | | </div> |
| | | </div> |
| | | <!--失败æç¤ºé³--> |
| | | <div id="" style="display:none;"> |
| | | <audio id="cs" hidden controls> |
| | | <source src="../../../video/jingbao.wav" type="audio/ogg"> |
| | | </audio> |
| | | </div> |
| | | <!--æåæç¤ºé³--> |
| | | <div id="" style="display:none;"> |
| | | <audio id="cs2" hidden controls> |
| | | <source src="../../../video/success.wav" type="audio/ogg"> |
| | | </audio> |
| | | </div> |
| | | </form> |
| | | </div> |
| | |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | |
| | | , element = layui.element; |
| | | var HBillType = '3783' |
| | | var HMaker = sessionStorage["HUserName"] |
| | | var HStockOrgID = sessionStorage["OrganizationID"] |
| | | var option = []; |
| | | var HStockOrgID = sessionStorage["OrganizationID"] //ç»ç»ID |
| | | var listOption = []; //ç¼åå表 |
| | | var columns = ""; |
| | | var MvarReportTitle = "çäº§ç»æåç¼åå表"; |
| | | var HModName = "Sc_PackUnionBillList_PDA"; |
| | | var ModRightName = "CE_PackUnion"; //模åæéåæ° |
| | | var titleData = []; //ä¸éè¦æ¾ç¤ºçåæ®µ |
| | | |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | if (sessionStorage.login != "login") { |
| | | layer.confirm("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼", { |
| | | icon: 4, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['éæ°ç»å½'] |
| | | }, function () { window.location.href = "../../user/login_pda.html"; }); |
| | | } |
| | | |
| | | //#region ç¨æ·æ¨¡åæé夿 |
| | | |
| | | //ç¨æ·æ¨¡åæé夿 |
| | | CheckModRight(); |
| | | |
| | | function CheckModRight() { |
| | | layer.load(3); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/CheckModRight_ERP_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "ModRightName": ModRightName, "HUserName": HMaker }, |
| | | success: function (d) { |
| | | if (d.count == 1) { |
| | | } |
| | | else { |
| | | layer.msg(d.Message, { |
| | | icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { parent.location.href = "../../../../views/index_Mobile.html"; }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null }//åæ¶èµæº |
| | | }); |
| | | layer.closeAll("loading"); |
| | | } |
| | | //#endregion |
| | | |
| | | //失败æç¤ºé³ |
| | | function playSound() { |
| | | console.log("playSound"); |
| | | var audio = document.getElementById("cs"); |
| | | audio.play(); |
| | | audio.onended = function () { |
| | | // å½é³é¢ææ¥å®ææ¶ï¼è°ç¨ pause å设置 currentTime 为 0 ä»¥åæ¢ææ¥å¹¶éç½® |
| | | audio.pause(); |
| | | audio.currentTime = 0; |
| | | }; |
| | | } |
| | | //æåæç¤ºé³ |
| | | function playSound_OK() { |
| | | console.log("playSound_OK"); |
| | | var audio = document.getElementById("cs2"); |
| | | audio.play(); |
| | | audio.onended = function () { |
| | | // å½é³é¢ææ¥å®ææ¶ï¼è°ç¨ pause å设置 currentTime 为 0 ä»¥åæ¢ææ¥å¹¶éç½® |
| | | audio.pause(); |
| | | audio.currentTime = 0; |
| | | }; |
| | | } |
| | | |
| | | //#region åå§åçé¢ |
| | | |
| | | set_ClearBill(); |
| | | |
| | | function set_ClearBill() { |
| | | //é»è®¤æ¾ç¤ºé¡µé¢ |
| | | element.tabChange('tab-Sc_PackUnionBillList_PDA', '1'); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //读ååæ®å表 |
| | | DisBillEntryList(); |
| | | set_InitGrid(); //åå§åè¡¨æ ¼ |
| | | //æ¾ç¤ºç¼ååè¡¨ä¿¡æ¯ |
| | | DisTempEntryList(); |
| | | } |
| | | |
| | | //#region åå§åè¡¨æ ¼æ¹æ³ |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#Temp-table' |
| | | , height: 'full-50' |
| | | //, page: true |
| | | //ç¼åå表 |
| | | listOption = { |
| | | elem: '#dj-table' |
| | | , height: 'full-150' |
| | | , page: true //å¼å¯å页 |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | //, limits: [50, 500, 5000, 20000] |
| | | }; |
| | | } |
| | | |
| | | //#region ç¹å»è¡éä¸é«äº® |
| | | table.on('row(dj-table)', function (obj) { |
| | | //éä¸è¡æ¹åé¢è² |
| | | $(".layui-table-body tr ").attr({ "style": "background:" }); //å
¶ä»træ¢å¤åæ · |
| | | obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); //éä¸è¡æ ·å¼ |
| | | obj.tr.find('i[class="layui-anim layui-icon"]').trigger("click"); //éä¸radioæ ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" }); //æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | }) |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region ç¼åå表çé¢ æ§ä»¶äºä»¶ |
| | | |
| | | //#region ç¼è¾åè½æ§ä»¶ |
| | | form.on('submit(cmdModify)', function () { |
| | | var checkStatus = table.checkStatus('Temp-table') |
| | | , data = checkStatus.data; |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'çäº§ç»æå' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../WMSæ«ç 模å/ç产管ç/çäº§ç»æå/Sc_PackUnionBill_PDA.html?HInterID_Temp=' + data[0].HInterID + '& HBillNo_Temp=' + data[0].HBillNo + '& HBarCode_Pack_Temp=' + data[0].HBarCode_Pack, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | $(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region å é¤åè½æ§ä»¶ |
| | | form.on('submit(cmdDelete)', function () { |
| | | var checkStatus = table.checkStatus('Temp-table') |
| | | form.on('submit(cmdModify)', function () { |
| | | var checkStatus = table.checkStatus('dj-table') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åå°ä¸å¯æ¢å¤ï¼", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | var sInterID = data[0].HInterID; |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'çäº§ç»æå' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../WMSæ«ç 模å/ç产管ç/çäº§ç»æå/Sc_PackUnionBill_PDA.html?OperationType=2&HBarCode_Pack_Temp=' + data[0].HBarCode_Pack, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | $(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('请å
éä¸ä¸è¡æ°æ®ï¼'); |
| | | } |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region å é¤åè½æ§ä»¶ |
| | | |
| | | form.on('submit(cmdDelete)', function () { |
| | | var checkStatus = table.checkStatus('dj-table') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | layer.confirm("确认è¦å é¤éä¸è¡æææ«ç è®°å½ï¼å é¤åå°ä¸å¯æ¢å¤ï¼", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | layer.load(3) |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/DeleteTemp_PackUnionBill_Json", |
| | | async: true, |
| | | data: { "HInterID": sInterID }, |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": data[0].HInterID }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | DisBillEntryList(); //æ¾ç¤ºè¡¨ä½æç» |
| | | //// å¾å°frameç´¢å¼ |
| | | //var index = layer.getFrameIndex(window.name); |
| | | ////å
³éå½åframe |
| | | //layer.close(index); |
| | | ////ä¿®æ¹æååå·æ°çé¢ |
| | | //window.location.reload(); |
| | | //æ¾ç¤ºç¼ååè¡¨ä¿¡æ¯ |
| | | DisTempEntryList(); |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 2 }); |
| | | playSound(); |
| | | layer.msg(data.Message, { icon: 2, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | layer.msg('é误' + err, { |
| | | icon: 5, |
| | | time: 20000 |
| | | }, function () { |
| | | }); |
| | | layer.msg('é误' + err, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡è®°å½ï¼è¿è¡å é¤ï¼'); |
| | | layer.closeAll("loading"); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region å·æ°åè½æ§ä»¶ |
| | | |
| | | form.on('submit(cmdRefresh)', function () { |
| | | DisBillEntryList(); |
| | | //æ¾ç¤ºç¼ååè¡¨ä¿¡æ¯ |
| | | DisTempEntryList(); |
| | | }); |
| | | |
| | | function DisBillEntryList() { |
| | | var ajaxLoad = layer.load(); |
| | | //æ¾ç¤ºç¼ååè¡¨ä¿¡æ¯ |
| | | function DisTempEntryList() { |
| | | layer.load(3) |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + '/WEBSController/GetSc_PackUnionBill_TempList_Json', |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HBillType": HBillType, "HMaker": HMaker, "HStockOrgID": HStockOrgID }, |
| | | success: function (data1) { |
| | | success: function (result) { |
| | | var data = []; |
| | | var col = []; |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | for (var key in result.list) { |
| | | //卿è·åå表ææåå |
| | | data.push({ "id": result.list[key].ColmCols, "name": result.list[key].ColmCols, "Type": result.list[key].ColmType }); |
| | | //è·åä¸éè¦æ¾ç¤ºçåï¼Hå¼å¤´çå䏿¾ç¤ºï¼ |
| | | var patrn = new RegExp(/^h/i); |
| | | if (patrn.test(result.list[key].ColmCols)) { |
| | | titleData[key] = result.list[key].ColmCols; |
| | | } |
| | | } |
| | | //夿æ¯å¦æ¯çº¯è±æ |
| | | var patrn = new RegExp("[\u4E00-\u9FA5]+"); |
| | | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'radio' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (!patrn.test(data[i].name)) { |
| | | col.push({ field: data[i].name, title: data[i].name, hide: true }); //éèå |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true }); |
| | | |
| | | if (data[i].name == 'ææ¡ç ') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 200 }); |
| | | } else if (data[i].name == 'åæ®å·' || data[i].name == 'ç»ç»') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 150 }); |
| | | } else { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left' }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.cache['Temp-table'] = null; //æ¸
ç©ºè¡¨æ ¼ç¼åæ°æ® |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | columns = col; |
| | | listOption.cols = [columns]; |
| | | listOption.data = result.data; |
| | | //listOption.totalRow = true; |
| | | table.cache['dj-table'] = null; //æ¸
ç©ºè¡¨æ ¼ç¼åæ°æ® |
| | | table.render(listOption); |
| | | } |
| | | else { |
| | | listOption.cols = [[ |
| | | { field: 'ææ¡ç ', title: 'ææ¡ç ', width: 100 } |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 100 } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 100 } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 100 } |
| | | , { field: 'ç»ç»', title: 'ç»ç»', width: 100 } |
| | | ]]; |
| | | listOption.data = data; |
| | | //listOption.totalRow = true; |
| | | table.render(listOption); |
| | | //layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("å·æ°ç¼åå表信æ¯ï¼æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | complete: function (XHR, TS) { XHR = null }//åæ¶èµæº |
| | | }); |
| | | layer.closeAll("loading"); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region éåºåè½æ§ä»¶ |
| | | |
| | | form.on('submit(cmdCancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.location.href = "../../../../views/index_Mobile.html" |
| | | parent.location.href = "../../../../views/index_Mobile.html"; |
| | | }); |
| | | }) |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ°å¢åè½æ§ä»¶ |
| | |
| | | |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | }); |
| | | |
| | | </script> |
| | | |
| | | </body> |
| | |
| | | <script src="../../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../../layuiadmin/PubCustom.js"></script> |
| | | <style> |
| | | .layui-col-xs4 { |
| | | width: 12.333333% |
| | | } |
| | | |
| | | .layui-col-xs8 { |
| | | width: 55.666667%; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0px"> |
| | | <div class="layui-card"> |
| | | <div class="layui-fluid" style="padding:0"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 0px; height:800px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div style="background-color:#0085E8;"> |
| | | <span style="color: white;"><i class="layui-icon layui-icon-form"></i>çäº§ç»æå</span> |
| | | </div> |
| | | <div class="layui-form-item" style="padding:10px;margin:0px"> |
| | | <div class="layui-form-item" style="padding:15px;margin:0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:50px;padding-left:0px;">ææ¡ç </label> |
| | | <div class="layui-col-xs2"> |
| | | <label class="layui-form-label" style="width: 45px;padding-left: 0px;">ææ¡ç </label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HBarCode_Pack" id="HBarCode_Pack" lay-verify="HBarCode_Pack" autocomplete="off" class="layui-input"> |
| | | <input type="text" name="HBarCode_Pack" id="HBarCode_Pack" lay-verify="HBarCode_Pack" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();"> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdHBarCode_Pack" id="cmdHBarCode_Pack">ç¡®å®</button> |
| | | <button type="button" lay-submit="" lay-filter="HBarCode_Pack-BT" class="layui-btn" id="HBarCode_Pack-BT" style="width: 45px; margin-left: 8px;padding-left:12px">OK</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="padding:10px;margin:0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:50px;padding-left:0px;">æ¡ç </label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdHBarCode">ç¡®å®</button> |
| | | <div class="layui-row" style="margin-top: 5px; margin-bottom: 0px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs2"> |
| | | <label class="layui-form-label" style="width: 45px;padding-left: 0px;">æ¡ç </label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();"> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" lay-filter="HBarCode-BT" class="layui-btn" id="HBarCode-BT" style="width: 45px; margin-left: 8px;padding-left:12px">OK</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-Sc_PackUnionBill_PDA"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1">ç»æä¿¡æ¯</li> |
| | | <li lay-id="2">åæ®ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--ç»æä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table> |
| | | </div> |
| | | <!--åæ®ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">å¶å人</label> |
| | | </div> |
| | | <div class="layui-col-xs8 layui-input-inline mobile"> |
| | | <input type="text" name="HMaker" id="HMaker" lay-verify="HMaker" autocomplete="off" class="layui-input"> |
| | | <div class="layui-tab layui-col-xs12" style="margin-top:5px;" lay-filter="tab-Sc_PackUnionBill_PDA"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;">ç»æä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;">åæ®ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--ç»æä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs12"> |
| | | <div class="layui-form-item" style="padding:0px;margin:0px"></div> |
| | | <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">åæ®å·</label> |
| | | </div> |
| | | <div class="layui-col-xs8 layui-input-inline mobile"> |
| | | <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">忮ID</label> |
| | | </div> |
| | | <div class="layui-col-xs8 layui-input-inline mobile"> |
| | | <input type="text" name="HInterID" id="HInterID" lay-verify="HInterID" value="0" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdLoadData" id="cmdLoadData">æäº¤</button> |
| | | </div> |
| | | <div class="layui-col-xs3"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">å é¤</button> |
| | | </div> |
| | | <div class="layui-col-xs3"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">éåº</button> |
| | | <!--åæ®ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item" style="padding: 0px; margin: 0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">æ¥æ</label> |
| | | </div> |
| | | <div class="layui-col-xs9"> |
| | | <input name="HDate" id="HDate" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">å¶å人</label> |
| | | </div> |
| | | <div class="layui-col-xs9"> |
| | | <input type="text" name="HMaker" id="HMaker" lay-verify="HMaker" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">åæ®å·</label> |
| | | </div> |
| | | <div class="layui-col-xs9"> |
| | | <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">忮ID</label> |
| | | </div> |
| | | <div class="layui-col-xs9"> |
| | | <input type="text" name="HInterID" id="HInterID" lay-verify="HInterID" value="0" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">ç»ç»</label> |
| | | </div> |
| | | <div class="layui-col-xs9"> |
| | | <input type="text" name="HStockOrgName" id="HStockOrgName" lay-verify="HStockOrgName" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled> |
| | | <input type="hidden" name="HStockOrgID" id="HStockOrgID" lay-verify="HStockOrgID" value="0" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px"> |
| | | <button type="button" lay-submit="" lay-filter="cmdSaver" class="layui-btn" id="cmdSaver">æäº¤</button> |
| | | <button type="button" lay-submit="" lay-filter="cmdDelete" class="layui-btn" id="cmdDelete">å é¤</button> |
| | | <button type="button" lay-submit="" lay-filter="cmdCancel" class="layui-btn" id="cmdCancel">éåº</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!--éèåæ®µ--> |
| | | <input type="hidden" name="HBillType" id="HBillType"> |
| | | <input type="hidden" name="HBillSubType" id="HBillSubType"> |
| | | <!--失败æç¤ºé³--> |
| | | <div id="" style="display:none;"> |
| | | <audio id="cs1" hidden controls> |
| | | <audio id="cs" hidden controls> |
| | | <source src="../../../video/jingbao.wav" type="audio/ogg"> |
| | | </audio> |
| | | </div> |
| | | <!--æåæç¤ºé³--> |
| | | <div id="" style="display:none;"> |
| | | <audio id="cs2" hidden controls> |
| | | <source src="../../../video/success.wav" type="audio/ogg"> |
| | |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | var HInterID = $('#HInterID').val() |
| | | var HBillNo = $('#HBillNo').val() |
| | | var HBillType = '3783' |
| | | var HBarCode_Pack = sessionStorage["HBarCode_Pack"] |
| | | var HBillSubType = '1' //åç±»åï¼1è£
ç®±ãæ åç»æã2ç»æï¼ |
| | | var HMaker = sessionStorage["HUserName"] |
| | | var HStockOrgID = sessionStorage["OrganizationID"] |
| | | var SourceFlag = sessionStorage["SourceFlag"]; //ææ¡ç å·²æ«æ å¿ |
| | | var option = []; |
| | | var HStockOrgID = sessionStorage["OrganizationID"] //ç»ç»ID |
| | | var OperationType = 1 //æä½ç±»åï¼1æ°å¢ã2ä»ç¼åå表ä¸è¿åï¼ |
| | | var HMaterNumber_Pack = ""; //ææ¡ç 对åºç©æä»£ç |
| | | var listOption = []; |
| | | var columns = ""; |
| | | var HModName = "Sc_PackUnionBill_PDA"; |
| | | var ModRightName = "CE_PackUnion"; //模åæéåæ° |
| | | var titleData = []; //ä¸éè¦æ¾ç¤ºçåæ®µ |
| | | var params = get_UrlVars(); |
| | | var OperationType = params[params[0]] == null ? 1 : params[params[0]]; //ä»ç¼åå表ä¸è¿åæ°æ®ç±»åï¼1æ°å¢ã2ä»ç¼åå表ä¸è¿åï¼ |
| | | var HBarCode_Pack_Temp = params[params[1]]; //ä»ç¼åå表ä¸è¿åææ¡ç |
| | | |
| | | //#endregion |
| | | |
| | |
| | | if (sessionStorage.login != "login") { |
| | | layer.confirm("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼", { |
| | | icon: 4, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['éæ°ç»å½'] |
| | | }, function () { window.location.href = "../../../user/login.html"; }); |
| | | }, function () { window.location.href = "../../../user/login_pda.html"; }); |
| | | } |
| | | |
| | | //#region åå§åçé¢ |
| | | //#region ç¨æ·æ¨¡åæé夿 |
| | | |
| | | set_ClearBill(); |
| | | //ç¨æ·æ¨¡åæé夿 |
| | | CheckModRight(); |
| | | |
| | | function set_ClearBill() { |
| | | $("#HMaker").val(HMaker); |
| | | $("#HMaker").attr("readonly", "readonly"); |
| | | $("#HBillNo").attr("readonly", "readonly"); |
| | | $("#HInterID").attr("readonly", "readonly"); |
| | | element.tabChange('tab-Sc_PackUnionBill_PDA', '1'); |
| | | var pFocus = $("#HBarCode_Pack"); |
| | | pFocus.focus(); //è·åå
æ |
| | | pFocus.select(); |
| | | set_InitGrid(); //åå§åè¡¨æ ¼ |
| | | } |
| | | |
| | | //#region åå§åè¡¨æ ¼æ¹æ³ |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#wl-table' |
| | | , height: 'full-50' |
| | | //, page: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | //, limits: [50, 500, 5000, 20000] |
| | | }; |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#region ä»ç¼åå表ä¸è¿åä¿¡æ¯ |
| | | function getBillTemp() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | | for (var i = 0; i < hashes.length; i++) { |
| | | hash = hashes[i].split('='); |
| | | vars.push(hash[0]); |
| | | vars[hash[0]] = hash[1]; |
| | | } |
| | | return vars; |
| | | } |
| | | var params = getBillTemp(); |
| | | var HInterID_Temp = params[params[0]]; //ä»ç¼åå表ä¸è¿ååæ®ID |
| | | var HBillNo_Temp = params[params[1]]; //ä»ç¼åå表ä¸è¿ååæ®å· |
| | | var HBarCode_Pack_Temp = params[params[2]]; //ä»ç¼åå表ä¸è¿åææ¡ç |
| | | |
| | | //#endregion |
| | | |
| | | //夿æ¯å¦æ°å¢ |
| | | if (HInterID_Temp == null || HInterID_Temp == 0) { |
| | | //è·åæå¤§åæ®IDãåæ®å· |
| | | function CheckModRight() { |
| | | layer.load(3); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json", |
| | | data: { "HBillType": HBillType }, |
| | | url: GetWEBURL() + "/WEBSController/CheckModRight_ERP_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "ModRightName": ModRightName, "HUserName": HMaker }, |
| | | success: function (d) { |
| | | if (d.count == 1) { |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | HInterID = $('#HInterID').val() |
| | | HBillNo = $('#HBillNo').val() |
| | | } |
| | | else { |
| | | layer.msg(d.Message, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | layer.msg(d.Message, { |
| | | icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { parent.location.href = "../../../../views/index_Mobile.html"; }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null }//åæ¶èµæº |
| | | }); |
| | | SourceFlag = false; |
| | | layer.closeAll("loading"); |
| | | } |
| | | //ä»ç¼åå表ç¼è¾åè½è·³è½¬è³åæ®æ¨¡å |
| | | else { |
| | | $('#HInterID').val(HInterID_Temp) |
| | | $('#HBillNo').val(HBillNo_Temp) |
| | | $('#HBarCode_Pack').val(HBarCode_Pack_Temp) |
| | | $("#HBarCode_Pack").attr("readonly", "readonly"); |
| | | HInterID = $('#HInterID').val() |
| | | HBillNo = $('#HBillNo').val() |
| | | HBarCode_Pack = $('#HBarCode_Pack').val() |
| | | $("#HBarCode").focus(); |
| | | element.tabChange('tab-Sc_PackUnionBill_PDA', '1'); |
| | | |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | DisBillEntryList(); |
| | | SourceFlag = true; |
| | | } |
| | | //#endregion |
| | | |
| | | //失败æç¤ºé³ |
| | | function playSound() { |
| | | console.log("playSound"); |
| | | var audio = document.getElementById("cs1"); |
| | | var audio = document.getElementById("cs"); |
| | | audio.play(); |
| | | audio.onended = function () { |
| | | // å½é³é¢ææ¥å®ææ¶ï¼è°ç¨ pause å设置 currentTime 为 0 ä»¥åæ¢ææ¥å¹¶éç½® |
| | |
| | | }; |
| | | } |
| | | |
| | | //#region åå§åçé¢ |
| | | |
| | | set_ClearBill(); |
| | | |
| | | function set_ClearBill() { |
| | | //表头åå§åèµå¼ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HStockOrgID").val(sessionStorage["OrganizationID"]); |
| | | $("#HStockOrgName").val(sessionStorage["Organization"]); |
| | | $("#HBillType").val(HBillType); |
| | | $("#HBillSubType").val(HBillSubType); |
| | | |
| | | //é»è®¤æ¾ç¤ºé¡µé¢ |
| | | element.tabChange('tab-Sc_PackUnionBill_PDA', '1'); |
| | | set_InitDate(); //åå§åè¡¨åæ¶é´ |
| | | set_InitGrid(); //åå§åè¡¨æ ¼ |
| | | |
| | | var data = []; |
| | | listOption.cols = [[ |
| | | { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 100 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 100 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 100 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 100 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100 } |
| | | , { field: 'æ¡ç 个æ°', title: 'æ¡ç 个æ°', width: 100 } |
| | | ]]; |
| | | listOption.data = data; |
| | | table.render(listOption); |
| | | |
| | | //å
æ é»è®¤å¨æ¡ç ä½ç½®ä¸ |
| | | var pFocus = $("#HBarCode_Pack"); |
| | | pFocus.select(); |
| | | pFocus.focus(); //è·åå
æ |
| | | } |
| | | |
| | | //åå§åè¡¨åæ¶é´æä»¶ |
| | | function set_InitDate() { |
| | | //常è§ç¨æ³ |
| | | laydate.render({ |
| | | elem: '#HDate' |
| | | }); |
| | | } |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | listOption = { |
| | | elem: '#wl-table' |
| | | //, toolbar: '#toolbarDemo' |
| | | , totalRow: true |
| | | , height: 'full-60' |
| | | , cellMinWidth: 90 |
| | | , limit: 200 |
| | | }; |
| | | } |
| | | |
| | | //#region ç¹å»è¡éä¸é«äº® |
| | | table.on('row(wl-table)', function (obj) { |
| | | //éä¸è¡æ¹åé¢è² |
| | | $(".layui-table-body tr ").attr({ "style": "background:" }); //å
¶ä»træ¢å¤åæ · |
| | | obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); //éä¸è¡æ ·å¼ |
| | | obj.tr.find('i[class="layui-anim layui-icon"]').trigger("click"); //éä¸radioæ ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" }); //æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | }) |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ«æææ¡ç |
| | | |
| | | //æå车é®è¿åä¿¡æ¯ |
| | | $('#HBarCode_Pack').on('keydown', function (event) { |
| | | if (event.keyCode == 13) { |
| | | GetMeesageByBarCode_Pack(); |
| | | } |
| | | }); |
| | | |
| | | //ç¹å»æé®è¿åä¿¡æ¯ |
| | | form.on('submit(cmdHBarCode_Pack)', function (data) { |
| | | //夿æ¯å¦æ°å¢ï¼è·åæå¤§åæ®å· |
| | | if (HInterID != 0) { |
| | | } |
| | | //ä»ç¼åå表ç¼è¾åè½è·³è½¬è³åæ®æ¨¡å |
| | | else if (OperationType == 2) { |
| | | $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBarCode_Pack").val(HBarCode_Pack_Temp); |
| | | GetMeesageByBarCode_Pack(); |
| | | }); |
| | | |
| | | //æ«æææ¡ç |
| | | function GetMeesageByBarCode_Pack(obj) { |
| | | HBarCode_Pack = $('#HBarCode_Pack').val() |
| | | |
| | | if (HBarCode_Pack == '') { |
| | | playSound(); |
| | | layer.msg("ææ¡ç ä¸è½ä¸ºç©ºï¼è¯·æ«æææ¡ç ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | DisBillEntryList(); |
| | | element.tabChange('tab-Sc_PackUnionBill_PDA', '1'); |
| | | } |
| | | else { |
| | | //è·åæå¤§åæ®IDãåæ®å· |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/Get_PackBarCode_PackUnionBill_Json", |
| | | data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker, "HStockOrgID": HStockOrgID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | playSound_OK(); |
| | | $("#HBarCode_Pack").val(result.data.hBarCodeField); |
| | | $("#HBarCode_Pack").attr("readonly", "readonly"); |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); //è·åå
æ |
| | | document.getElementById("cmdHBarCode_Pack").disabled = true; //æé®å为ä¸å¯ç¼è¾ç¶æ |
| | | element.tabChange('tab-Sc_PackUnionBill_PDA', '1'); |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | DisBillEntryList(); |
| | | SourceFlag = true; |
| | | layer.load(3); |
| | | url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HBillType": HBillType }, |
| | | success: function (d) { |
| | | if (d.count == 1) { |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | HInterID = $('#HInterID').val() |
| | | HBillNo = $('#HBillNo').val() |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | $('#HBarCode_Pack').val(""); |
| | | $("#HBarCode_Pack").select(); |
| | | $("#HBarCode_Pack").focus(); //è·åå
æ |
| | | layer.msg(d.Message, { icon: 0, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null }//åæ¶èµæº |
| | | }); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ«æç©ææ¡ç |
| | | |
| | | //æå车é®è¿åä¿¡æ¯ |
| | | $('#HBarCode').on('keydown', function (event) { |
| | | if (event.keyCode == 13) { |
| | | GetMeesageByBarCode(); |
| | | } |
| | | }); |
| | | |
| | | //ç¹å»æé®è¿åä¿¡æ¯ |
| | | form.on('submit(cmdHBarCode)', function (data) { |
| | | GetMeesageByBarCode(); |
| | | }); |
| | | |
| | | //æ«æç©ææ¡ç |
| | | function GetMeesageByBarCode(obj) { |
| | | var sBarCode = $('#HBarCode').val() |
| | | |
| | | if (sBarCode == '') { |
| | | playSound(); |
| | | layer.msg("æ¡ç ä¸è½ä¸ºç©ºï¼è¯·æ«ææ¡ç ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | else if (SourceFlag == false) { |
| | | playSound(); |
| | | layer.msg("æ²¡ææ«æææ¡ç ï¼è¯·å
æ«æææ¡ç ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | if (sBarCode != "") { |
| | | $('#HBarCode').val(""); |
| | | } |
| | | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/Get_BarCode_PackUnionBill_Json", |
| | | data: { "HBarCode": sBarCode, "HInterID": HInterID, "HBillType": HBillType, "HBillNo": HBillNo, "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker, "HStockOrgID": HStockOrgID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | playSound_OK(); |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); //è·åå
æ |
| | | element.tabChange('tab-Sc_PackUnionBill_PDA', '1'); |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | DisBillEntryList(); |
| | | layer.load(3) |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null }//åæ¶èµæº |
| | | }); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ¾ç¤ºç©æåè¡¨ä¿¡æ¯ |
| | | |
| | | function DisBillEntryList() { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + '/WEBSController/GetBillEntry_Tmp_Pack_Json', |
| | | data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType }, |
| | | success: function (data1) { |
| | | var col = []; |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //夿æ¯å¦æ¯çº¯è±æ |
| | | var patrn = new RegExp("[\u4E00-\u9FA5]+"); |
| | | col.push({ type: 'radio' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (!patrn.test(data[i].name)) { |
| | | col.push({ field: data[i].name, title: data[i].name, hide: true }); //éèå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | case 'DateTime': |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].name, title: data[i].name, align: 'center', sort: true }); |
| | | } |
| | | } |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.cache['wl-table'] = null; //æ¸
ç©ºè¡¨æ ¼ç¼åæ°æ® |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | |
| | | //#region åè½æ§ä»¶ |
| | | |
| | | //#region æäº¤ä¸ä¼ åè½æ§ä»¶ |
| | | |
| | | form.on('submit(cmdLoadData)', function (data) { |
| | | document.getElementById("cmdLoadData").disabled = true; //æé®å为ä¸å¯ç¼è¾ç¶æ |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/set_SavePackUnionBill_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": HInterID, "HBillType": HBillType, "HBillNo": HBillNo, "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker, "HStockOrgID": HStockOrgID }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.confirm(data.Message, { |
| | | icon: 1, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['æ°å¢'], |
| | | btn2: function () { |
| | | parent.location.href = "../../../../views/index_Mobile.html" |
| | | }//å
³é |
| | | }, function () { |
| | | HInterID_Temp = 0; |
| | | window.location.reload(); //å·æ°å½åé¡µé¢ |
| | | });//æ°å¢ |
| | | layer.load(3); |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | document.getElementById("cmdLoadData").disabled = false; //æé®å为å¯ç¼è¾ç¶æ |
| | | } |
| | | layer.closeAll("loading"); //å
³éå è½½å± |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | document.getElementById("cmdLoadData").disabled = false; |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region å é¤åè½æ§ä»¶ |
| | | |
| | | form.on('submit(cmdDelete)', function () {//å é¤ |
| | | var checkStatus = table.checkStatus('wl-table') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | layer.confirm("ç¡®å®è¦å é¤åï¼å é¤åå°ä¸å¯æ¢å¤ï¼ç¡®å®è¦ç»§ç»æä½ï¼", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | var HBarCode = data[0].HBarCode |
| | | //#region æäº¤ |
| | | form.on('submit(cmdSaver)', function (data) { |
| | | document.getElementById("cmdSaver").disabled = true; //æé®å为ä¸å¯ç¼è¾ç¶æ |
| | | var sSubStr = table.cache['wl-table']; |
| | | var HBarCode_Pack = $('#HBarCode_Pack').val() |
| | | if (AllowLoadData(sSubStr) != false)//é空éªè¯ |
| | | { |
| | | layer.load(3); |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/set_DelPackUnionBill_Temp_Pack_Json", |
| | | async: true, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": HInterID, "HBarCode": HBarCode, "HBillType": HBillType }, |
| | | url: GetWEBURL() + "/WEBSController/set_SavePackUnionBill_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": HInterID, "HBillType": HBillType, "HBillNo": HBillNo, "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker, "HStockOrgID": HStockOrgID }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { //æå |
| | | DisBillEntryList(); //æ¾ç¤ºè¡¨ä½æç» |
| | | if (data.count == 1) { // 说æéªè¯æåäº |
| | | layer.confirm(data.Message, { |
| | | icon: 1, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['æ°å¢','å
³é'], |
| | | btn2: function () { |
| | | parent.location.href = "../../../../views/index_Mobile.html"; |
| | | }//å
³é |
| | | } |
| | | , function () { |
| | | location.replace('Sc_PackUnionBill_PDA.html?OperationType=1&HInterID=0'); |
| | | });//æ°å¢ |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 2 }); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | document.getElementById("cmdSaver").disabled = false; //æé®å为å¯ç¼è¾ç¶æ |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | layer.msg('é误' + err, { |
| | | icon: 5, |
| | | time: 20000 |
| | | }, function () { |
| | | }); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | document.getElementById("cmdSaver").disabled = false; //æé®å为å¯ç¼è¾ç¶æ |
| | | } |
| | | }); |
| | | layer.close(index) |
| | | layer.closeAll("loading"); |
| | | return; |
| | | } |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region å é¤ |
| | | |
| | | form.on('submit(cmdDelete)', function () { |
| | | var checkStatus = table.checkStatus('wl-table') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length == 1) { |
| | | layer.confirm("确认è¦å é¤éä¸è¡æææ«ç è®°å½ï¼å é¤åå°ä¸å¯æ¢å¤ï¼", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | var HBarCode = data[0].HBarCode |
| | | |
| | | layer.load(3) |
| | | $.ajax( |
| | | { |
| | | type: "Get", |
| | | url: GetWEBURL() + "/WEBSController/set_DelPackUnionBill_Temp_Pack_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": HInterID, "HBarCode": HBarCode, "HBillType": HBillType }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | DisBillEntryList(); |
| | | }); |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(data.Message, { icon: 2, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | layer.msg('é误' + err, { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | layer.closeAll("loading"); |
| | | }) |
| | | } |
| | | else { |
| | |
| | | |
| | | //#endregion |
| | | |
| | | //#region éåºåè½æ§ä»¶ |
| | | //#region éåº |
| | | |
| | | form.on('submit(cmdCancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.location.href = "../../../../views/index_Mobile.html"; |
| | | if (OperationType == 2) { |
| | | var index = parent.layer.getFrameIndex(window.name); //å
å¾å°å½åiframeå±çç´¢å¼ |
| | | parent.location.reload(); //å·æ°ç¶é¡µé¢ï¼æ³¨æä¸å®è¦å¨å
³éå½åiframeå±ä¹åæ§è¡å·æ° |
| | | parent.layer.close(index); //åæ§è¡å
³é |
| | | } |
| | | else { |
| | | parent.location.href = "../../../../views/index_Mobile.html"; |
| | | } |
| | | }); |
| | | }) |
| | | |
| | |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ«æææ¡ç |
| | | |
| | | //æ«æææ¡ç |
| | | $('#HBarCode_Pack').on('keydown', function (event) { |
| | | if (event.keyCode == 13) { |
| | | GetMeesageByBarCode_Pack(); |
| | | } |
| | | }); |
| | | |
| | | //ææ¡ç æé® |
| | | form.on('submit(HBarCode_Pack-BT)', function (data) { |
| | | GetMeesageByBarCode_Pack(); |
| | | }); |
| | | |
| | | //æ«ææ¡ç |
| | | function GetMeesageByBarCode_Pack(obj) { |
| | | var HBarCode_Pack = $('#HBarCode_Pack').val() |
| | | if (HBarCode_Pack == '') { |
| | | playSound(); |
| | | layer.msg("ææ¡ç ä¸è½ä¸ºç©ºï¼è¯·æ«æææ¡ç ï¼", { |
| | | icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode_Pack").select(); |
| | | $("#HBarCode_Pack").focus(); |
| | | }); |
| | | return; |
| | | } |
| | | layer.load(3) |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/Get_PackBarCode_PackUnionBill_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker, "HStockOrgID": HStockOrgID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | playSound_OK(); |
| | | $("#HInterID").val(result.data[0].HInterID); |
| | | $("#HBillNo").val(result.data[0].HBillNo); |
| | | HInterID = $('#HInterID').val() |
| | | HBillNo = $('#HBillNo').val() |
| | | HMaterNumber_Pack = result.data[0].HMaterNumber |
| | | |
| | | $("#HBarCode_Pack").attr("disabled", "disabled"); |
| | | $('#HBarCode_Pack-BT').addClass("layui-btn-disabled").attr("disabled", true);//æé®ç¦ç¨ |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); //è·åå
æ |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | DisBillEntryList(); |
| | | element.tabChange('tab-Sc_PackUnionBill_PDA', '1'); |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(result.Message, { |
| | | icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode_Pack").select(); |
| | | $("#HBarCode_Pack").focus(); |
| | | }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | playSound(); |
| | | layer.msg("é误ï¼" + err, { |
| | | icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode_Pack").select(); |
| | | $("#HBarCode_Pack").focus(); |
| | | }); |
| | | } |
| | | }); |
| | | layer.closeAll("loading"); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ«æå¾
ç»ææ¡ç |
| | | |
| | | //æ«æå¾
ç»ææ¡ç |
| | | $('#HBarCode').on('keydown', function (event) { |
| | | if (event.keyCode == 13) { |
| | | GetMeesageByBarCode(); |
| | | } |
| | | }); |
| | | |
| | | //å¾
ç»ææ¡ç æé® |
| | | form.on('submit(HBarCode-BT)', function (data) { |
| | | GetMeesageByBarCode(); |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); //è·åå
æ |
| | | }); |
| | | |
| | | //æ«å¾
ç»ææ¡ç |
| | | function GetMeesageByBarCode(obj) { |
| | | var HBarCode_Pack = $('#HBarCode_Pack').val() |
| | | var sOldBarCode = $('#HBarCode').val() |
| | | var HDeleteFlag = sOldBarCode.substring(0, 1); |
| | | var sBarCode = sOldBarCode.slice(1); |
| | | |
| | | if (HBarCode_Pack == '') { |
| | | playSound(); |
| | | layer.msg("ææ¡ç ä¸è½ä¸ºç©ºï¼è¯·å
æ«æææ¡ç ï¼", { |
| | | icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode_Pack").select(); |
| | | $("#HBarCode_Pack").focus(); |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (HDeleteFlag == "*") { |
| | | if (sBarCode == "") { |
| | | playSound(); |
| | | layer.msg("è¯·æ«æè¦å é¤çæ¡ç ", { |
| | | icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode").focus(); |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | $('#HBarCode').val(""); |
| | | } |
| | | layer.load(3) |
| | | $.ajax( |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/set_DelPackUnionBill_Temp_Pack_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": HInterID, "HBarCode": sBarCode, "HBillType": HBillType }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäº |
| | | playSound_OK(); |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | DisBillEntryList(); |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(data.Message, { |
| | | icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); |
| | | }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | playSound(); |
| | | layer.msg('é误' + err, { |
| | | icon: 2, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); |
| | | }); |
| | | } |
| | | }); |
| | | layer.closeAll("loading"); |
| | | } |
| | | else { |
| | | var sBarCode = $('#HBarCode').val() |
| | | if (sBarCode == '') { |
| | | playSound(); |
| | | layer.msg("æ¡ç ä¸è½ä¸ºç©ºï¼è¯·æ«ææ¡ç ï¼", { |
| | | icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | layer.load(3) |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/WEBSController/Get_BarCode_PackUnionBill_Json", |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HBarCode": sBarCode, "HInterID": HInterID, "HBillType": HBillType, "HBillNo": HBillNo, "HBarCode_Pack": HBarCode_Pack, "HMaker": HMaker, "HStockOrgID": HStockOrgID }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | playSound_OK(); |
| | | if (sBarCode != "") { |
| | | $('#HBarCode').val(""); |
| | | } |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); //è·åå
æ |
| | | element.tabChange('tab-Sc_PackUnionBill_PDA', '1'); |
| | | //æ¾ç¤ºè¡¨ä½æç» |
| | | DisBillEntryList(); |
| | | } |
| | | else { |
| | | playSound(); |
| | | layer.msg(result.Message, { |
| | | icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); |
| | | }); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | | error: function (err) { |
| | | playSound(); |
| | | layer.msg("é误ï¼" + err, { |
| | | icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º", btn: ['确认'] |
| | | }, function () { |
| | | $("#HBarCode").select(); |
| | | $("#HBarCode").focus(); |
| | | }); |
| | | } |
| | | }); |
| | | layer.closeAll("loading"); |
| | | } |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ¾ç¤ºç©æåè¡¨ä¿¡æ¯ |
| | | |
| | | function DisBillEntryList() { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + '/WEBSController/GetBillEntry_Tmp_Pack_Json', |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType }, |
| | | success: function (result) { |
| | | var data = []; |
| | | var col = []; |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in result.list) { |
| | | //卿è·åå表ææåå |
| | | data.push({ "id": result.list[key].ColmCols, "name": result.list[key].ColmCols, "Type": result.list[key].ColmType }); |
| | | //è·åä¸éè¦æ¾ç¤ºçåï¼Hå¼å¤´çå䏿¾ç¤ºï¼ |
| | | var patrn = new RegExp(/^h/i); |
| | | if (patrn.test(result.list[key].ColmCols)) { |
| | | titleData[key] = result.list[key].ColmCols; |
| | | } |
| | | } |
| | | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'radio', totalRowText: 'å计' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 }); |
| | | break; |
| | | default: |
| | | |
| | | if (data[i].name == 'æ°é' || data[i].name == 'æ¡ç 个æ°') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', totalRow: true }); |
| | | } else if (data[i].name == 'ç©æä»£ç ') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 120 }); |
| | | } else if (data[i].name == 'ç©æåç§°' || data[i].name == 'è§æ ¼åå·') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 180 }); |
| | | } else { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 220 }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | columns = col; |
| | | listOption.cols = [columns]; |
| | | listOption.data = result.data; |
| | | listOption.totalRow = true; |
| | | table.cache['wl-table'] = null; //æ¸
ç©ºè¡¨æ ¼ç¼åæ°æ® |
| | | table.render(listOption); |
| | | } |
| | | else { |
| | | listOption.cols = [[ |
| | | { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 100 } |
| | | , { field: 'æ°é', title: 'æ°é', width: 100 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 100 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 100 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100 } |
| | | , { field: 'æ¡ç 个æ°', title: 'æ¡ç 个æ°', width: 100 } |
| | | ]]; |
| | | listOption.data = data; |
| | | table.render(listOption); |
| | | } |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null }//åæ¶èµæº |
| | | }); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | }); |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | //æ¤å¤æ¹æ³æ¶åå°è¢«å¤é¨é¡µé¢parent.æ¹æ³åè°ç¨çå¿
é¡»æ¾å¨Layuiæ¹æ³å¤é¨ |
| | | |
| | | //åæ®ä¸ä¼ å夿 |
| | | function AllowLoadData(sSubStr) { |
| | | if (HInterID == 0) { |
| | | layer.msg("åæ®å
ç è·å失败ï¼é误çåæ®å
ç ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | if (HBillNo == '') { |
| | | layer.msg("åæ®å·è·å失败ï¼é误çåæ®å·ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | if (sSubStr.length == 0) { |
| | | layer.msg("æ²¡ææ«ç ä¿¡æ¯ï¼è¯·å
æ«ææ¡ç ï¼ç¡®è®¤æ 误ååæäº¤ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | </script> |
| | | |
| | | </body> |
| | |
| | | </a> |
| | | </li> |
| | | <li class="layui-col-xs3"> |
| | | <a href="../WMSæ«ç 模å/ç产管ç/çäº§ç»æå/Sc_PackUnionBill_PDA.html" target="main_self_frame"> |
| | | <i class="layui-icon layui-icon-template-1"></i> |
| | | <cite style="white-space:pre-wrap">çäº§ç»æå</cite> |
| | | </a> |
| | | </li> |
| | | <li class="layui-col-xs3"> |
| | | <a href="../WMSæ«ç 模å/ç产管ç/å æå/Sc_DeletePackUnionBill_PDA.html" target="main_self_frame"> |
| | | <i class="layui-icon layui-icon-app"></i> |
| | | <cite style="white-space:pre-wrap">ç产ææå</cite> |
| | | </a> |
| | | </li> |
| | | <li class="layui-col-xs3"> |
| | | <a href="../车é´ç®¡ç/å·¥åºæµè½¬/MES_StationOutBill_PDA.html" target="main_self_frame"> |
| | | <i class="layui-icon layui-icon-auz"></i> |
| | | <cite style="white-space:pre-wrap">åºç«æ±æ¥</cite> |
| | |
| | | </a> |
| | | </li> |
| | | <li class="layui-col-xs3"> |
| | | <a href="../WMSæ«ç 模å/ç产管ç/çäº§ç»æå/Sc_PackUnionBillList_PDA.html" target="main_self_frame"> |
| | | <i class="layui-icon layui-icon-template-1"></i> |
| | | <cite style="white-space:pre-wrap">çäº§ç»æåç¼å</cite> |
| | | </a> |
| | | </li> |
| | | <li class="layui-col-xs3"> |
| | | <a href="../WMSæ«ç 模å/å®¢æ·æ¡ç æ«æ/Gy_getCusBarCodeBillList_PDA.html" target="main_self_frame"> |
| | | <i class="layui-icon layui-icon-windows"></i> |
| | | <cite style="white-space:pre-wrap">å®¢æ·æ¡ç æ«ç è®°å½å</cite> |
| | |
| | | <dd> |
| | | <a href="WMSæ«ç 模å/ç产管ç/å æå/Sc_DeletePackUnionBill_PDA.html" target="main_self_frame" style="color: aqua;"> |
| | | <img src="../layuiadmin/myicon/åæ®å½å¶.svg" alt="åæ®å½å¶" style="width:25px;height:25px;margin-right: 5px;" /> |
| | | å æå |
| | | ç产ææå |
| | | </a> |
| | | </dd> |
| | | <dd> |
| | |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | option.data = result.data; |
| | | if(!result.data.length) { |
| | | option.data = [{ HCenterID: $('#HItemID').val(), HCenterName: $("#HName").val(), HSourceID: 0, HSourceName: "" }] |
| | | } |
| | | table.render(option); |
| | | } |
| | | |
| | |
| | | //è¡å
å¿«æ·é®çé |
| | | function set_GridCellCheck(obj) { |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | debugger |
| | | if (event.key == "F7") { |
| | | if (obj.event == 'HSourceNameSelect') { |
| | | layer.open({ |
| | |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <div class="layui-row" style=" margin-top: 10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <div class="layui-row" style=" margin-top: 10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <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"> |
| | | <meta name="viewport" |
| | | content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <!--å¼ç¨layuiæ ·å¼æä»¶--> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | |
| | | <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/dayjs.min.js"></script> |
| | | <style> |
| | | .layui-form-item .layui-inline { |
| | | margin-top: 5px; |
| | |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card" style="padding: 2px;background-color: #efefef;"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group" style="background-color:white;"> |
| | | <div style="padding: 10px; "> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btn_Save" id="btn_Save">ä¿å</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btn_Cancel" id="btn_Cancel">éåº</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" |
| | | lay-filter="btn_Save" id="btn_Save">ä¿å</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" |
| | | lay-filter="btn_Cancel" id="btn_Cancel">éåº</button> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-Gy_ShiftsEdit"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | |
| | | <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" lay-verify="HNumber" name="HNumber" id="HNumber" placeholder="请è¾å
¥å
容"> |
| | | <input type="text" class="layui-input" lay-verify="HNumber" |
| | | name="HNumber" id="HNumber" placeholder="请è¾å
¥å
容"> |
| | | </div> |
| | | </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" lay-verify="HName" name="HName" id="HName" placeholder="请è¾å
¥å
容"> |
| | | <input type="text" class="layui-input" lay-verify="HName" name="HName" |
| | | id="HName" placeholder="请è¾å
¥å
容"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">é¨é¨</label> |
| | | <label class="layui-form-label" |
| | | style="width: 85px;padding: 9px 18px;">é¨é¨</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="HDeptName" name="HDeptName" id="HDeptName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" lay-verify="HDeptID" name="HDeptID" id="HDeptID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDept" id="btnHDept" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <input type="text" class="layui-input" lay-verify="HDeptName" |
| | | name="HDeptName" id="HDeptName" |
| | | style="background-color:#efefef4d;width: 60%;display: inline-block;" |
| | | readonly> |
| | | <input type="hidden" lay-verify="HDeptID" name="HDeptID" id="HDeptID" |
| | | value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" |
| | | lay-submit="" lay-filter="btnHDept" id="btnHDept" |
| | | style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </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" lay-verify="HBeginTimes" name="HBeginTimes" id="HBeginTimes" onfocus="this.select();"> |
| | | <input type="text" class="layui-input" lay-verify="HBeginTimes" |
| | | name="HBeginTimes" id="HBeginTimes" placeholder="HH:MM" |
| | | onfocus="this.select();"> |
| | | </div> |
| | | </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" lay-verify="HEndTimes" name="HEndTimes" id="HEndTimes" onfocus="this.select();"> |
| | | <input type="text" class="layui-input" lay-verify="HEndTimes" |
| | | name="HEndTimes" id="HEndTimes" placeholder="HH:MM" |
| | | onfocus="this.select();"> |
| | | </div> |
| | | </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" name="HWorkTimes" id="HWorkTimes" lay-verify="HWorkTimes" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" autocomplete="off" class="layui-input" onfocus="this.select();"> |
| | | <input type="text" name="HWorkTimes" id="HWorkTimes" |
| | | lay-verify="HWorkTimes" |
| | | onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" |
| | | autocomplete="off" class="layui-input" onfocus="this.select();"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <div class="layui-inline" style="width: 965px;"> |
| | | <label class="layui-form-label" style="width: 85px;">夿³¨</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" lay-verify="HRemark" name="HRemark" id="HRemark" onmouseover="this.title=this.value"> |
| | | <input type="text" class="layui-input" lay-verify="HRemark" |
| | | name="HRemark" id="HRemark" onmouseover="this.title=this.value"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-block" style="margin-left: 200px;"> |
| | | <input type="checkbox" name="checkboxHStopflag" id="checkboxHStopflag" lay-skin="primary" lay-filter="checkboxHStopflag" value="true" title="æ¯å¦ç¦ç¨" disabled="disabled"> |
| | | <input type="checkbox" name="checkboxHStopflag" id="checkboxHStopflag" |
| | | lay-skin="primary" lay-filter="checkboxHStopflag" value="true" |
| | | title="æ¯å¦ç¦ç¨" disabled="disabled"> |
| | | <input type="hidden" value="false" name="HStopflag" id="HStopflag"> |
| | | </div> |
| | | </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="HMakeEmp" id="HMakeEmp" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HMakeEmp" id="HMakeEmp" |
| | | style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </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="HCheckEmp" id="HCheckEmp" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HCheckEmp" id="HCheckEmp" |
| | | style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HMakeTime" id="HMakeTime" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HMakeTime" id="HMakeTime" |
| | | style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </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="HCheckTime" id="HCheckTime" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HCheckTime" id="HCheckTime" |
| | | style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HModifyEmp" id="HModifyEmp" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HModifyEmp" id="HModifyEmp" |
| | | style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </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="HStopEmp" id="HStopEmp" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HStopEmp" id="HStopEmp" |
| | | style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </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="HModifyTime" id="HModifyTime" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HModifyTime" |
| | | id="HModifyTime" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </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="HStopTime" id="HStopTime" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HStopTime" id="HStopTime" |
| | | style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-row" style="display:none;"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="hidden" lay-verify="HItemID" name="HItemID" id="HItemID" value="0"> |
| | | <input type="hidden" lay-verify="HItemID" name="HItemID" id="HItemID" |
| | | value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | , element = layui.element |
| | | // æ¥ææä»¶ |
| | | , laydate = layui.laydate; |
| | | var HItemID = $('#HItemID').val() |
| | | var HMaker = sessionStorage["HUserName"] |
| | | var HUSEORGID = sessionStorage["OrganizationID"] //ç»ç»ID |
| | |
| | | |
| | | //è·åç»ç» |
| | | Organ(); |
| | | // åå§å表å |
| | | Init_GridForm() |
| | | |
| | | //#region è·åç»ç» |
| | | function Organ() { |
| | |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | //è·å页é¢è·³è½¬åæ° |
| | | var params = get_UrlVars(); |
| | |
| | | if (IsHStopflag) { |
| | | $("input[name='checkboxHStopflag'][value='" + IsHStopflag + "']").attr("checked", true); |
| | | } |
| | | if (data.å®¡æ ¸äºº!="") { |
| | | if (data.å®¡æ ¸äºº != "") { |
| | | $('#btn_Save').addClass("layui-btn-disabled").attr("disabled", true); |
| | | } |
| | | if (data.HUSEORGID != 0) { |
| | |
| | | |
| | | //#region åè½æ§ä»¶ |
| | | |
| | | function Init_GridForm() { |
| | | laydate.render({ |
| | | elem: '#HBeginTimes', |
| | | type: 'time', |
| | | format: 'HH:mm', |
| | | done: () => { |
| | | CalcTimesGap() |
| | | } |
| | | }); |
| | | |
| | | laydate.render({ |
| | | elem: '#HEndTimes', |
| | | type: 'time', |
| | | format: 'HH:mm', |
| | | done: () => { |
| | | CalcTimesGap() |
| | | } |
| | | }); |
| | | |
| | | var beginTime = dayjs(Date.now()).format("HH:mm") |
| | | $("#HBeginTimes").val(beginTime) |
| | | $("#HEndTimes").val(beginTime) |
| | | } |
| | | |
| | | //#region ä¿å |
| | | |
| | | //ä¿åæé® |
| | |
| | | |
| | | //#endregion |
| | | |
| | | function CalcTimesGap() { |
| | | |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | }); |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | |
| | | } |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | <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/HideButton.js"></script> |
| | | <script src="../../../layuiadmin/HideButton_New.js"></script> |
| | | <script src="../../../layuiadmin/soulTable.slim.js"></script> |
| | | <style> |
| | | .layui-form-select .layui-input { |
| | |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <div class="layui-btn-container" id="btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>导åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_AddNew" id="btn_AddNew"><i class="layui-icon layui-icon-add-1"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Modify" id="btn_Modify"><i class="layui-icon layui-icon-edit"></i>ä¿®æ¹</button> |
| | |
| | | var option = []; |
| | | var columns = ""; |
| | | var HModName = "Gy_ShiftsList"; |
| | | var HBillType = "Gy_ShiftsList"; |
| | | var titleData = []; //ä¸éè¦æ¾ç¤ºçåæ®µ |
| | | var params = get_UrlVars(); |
| | | var Type = params[params[0]]; |
| | |
| | | } |
| | | |
| | | //å·æ°æé®æ¾ç¤º |
| | | var btns = document.getElementsByTagName("button"); //è·åæ¬é¡µæææé®å¯¹è±¡ |
| | | Display_HideButton(btns, HModName, HModName, HMaker); |
| | | // var btns = document.getElementsByTagName("button"); //è·åæ¬é¡µæææé®å¯¹è±¡ |
| | | Display_HideButton('btn-container', HModName, HModName, HMaker); |
| | | |
| | | }, |
| | | complete: function (XHR, TS) { XHR = null },//åæ¶èµæº |
| | |
| | | //æé®è®¾ç½® |
| | | case 'btn_HideButton': |
| | | var btns = document.getElementsByTagName("button"); //è·åæ¬é¡µæææé®å¯¹è±¡ |
| | | get_HideButton(btns, HModName, HModName, HMaker); |
| | | get_HideButton('btn-container', HBillType, HModName, sessionStorage["HUserName"]); |
| | | break; |
| | | //éåºæé® |
| | | case 'btn_Exit': Pub_Close(2); |
| | |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | var urlLen = urlStr.split('/'); |
| | | for (var i = 0; i < urlLen.length - 4; i++) { |
| | | contentUrl += "../"; |
| | | } |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | // var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | // var urlLen = urlStr.split('/'); |
| | | // for (var i = 0; i < urlLen.length - 4; i++) { |
| | | // contentUrl += "../"; |
| | | // } |
| | | // colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | |
| | | contentUrl += 'åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName; |
| | | contentUrl += '../../åºç¡èµæ/éèå设置/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName; |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | |
| | | |
| | | //å·æ°æé®æ¾ç¤º |
| | | var btns = document.getElementsByTagName("button"); //è·åæ¬é¡µæææé®å¯¹è±¡ |
| | | Display_HideButton(btns, HModName, HModName, HMaker); |
| | | Display_HideButton('btn-container', HModName, HModName, HMaker); |
| | | |
| | | layer.close(ajaxLoad); |
| | | //èªå®ä¹è¿æ»¤ä¸ææ¡å è½½ |
| | |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //æ¥è¯¢ |
| | | // get_FastQuery(1); |
| | | get_FastQuery(1); |
| | | |
| | | get_DefaultModule();//å è½½æ¹æ¡ |
| | | |
| | |
| | | //éèæ¾ç¤ºè¿æ»¤æ¹æ¡çæ ç¾ä¿¡æ¯ |
| | | document.getElementById("HFilterScheme_Now").style.display = "none"; |
| | | //æ§è¡æ¥è¯¢æ¹æ³ |
| | | get_FastQuery(1); |
| | | // get_FastQuery(1); |
| | | form.render("select"); |
| | | } |
| | | }, error: function () { |
| | |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/soulTable.slim.js"></script> |
| | | <script src="../../../layuiadmin/zy_DragObserver.js"></script> |
| | | <!-- <script src="../../../layuiadmin/zy_DragObserver.js"></script> --> |
| | | <style> |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | /*.layui-table-cell { |
| | |
| | | form.render('checkbox'); |
| | | form.render('select'); |
| | | |
| | | registerDragObserver() |
| | | // registerDragObserver() |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | var colTitleNames = colTitleName.split(','); |
| | |
| | | } |
| | | |
| | | //// æ³¨åææ½è§å¯è
ï¼çå¬è¡¨æ ¼ææ½åå |
| | | function registerDragObserver() { |
| | | // 妿䏿¯æï¼åä»ä¹é½ä¸æ§è¡ |
| | | if (typeof window.MutationObserver === 'undefined' |
| | | && typeof window.WebKitMutationObserver === 'undefined') { |
| | | console.warn('observer not supported') |
| | | return |
| | | } |
| | | let targetEl = $(".layui-table-box")[0]; |
| | | let config = { |
| | | attributes: true, |
| | | attributesOldValue: true, |
| | | attributeFilter: ['class'], |
| | | childList: false, |
| | | subtree: false, |
| | | characterData: false, |
| | | characterDataOldValue: false |
| | | }; |
| | | let observer = new MutationObserver(mutations => { |
| | | mutations.forEach(function (mutation) { |
| | | if (mutation.attributeName === 'class') { |
| | | // çå¬classä¸å
容çåå |
| | | if ($(targetEl).hasClass('noselect')) { |
| | | document.documentElement.style.userSelect = 'none'; |
| | | document.documentElement.style.webkitUserSelect = 'none'; |
| | | } else { |
| | | document.documentElement.style.userSelect = ''; |
| | | document.documentElement.style.webkitUserSelect = ''; |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | observer.observe(targetEl, config); |
| | | } |
| | | // function registerDragObserver() { |
| | | // // 妿䏿¯æï¼åä»ä¹é½ä¸æ§è¡ |
| | | // if (typeof window.MutationObserver === 'undefined' |
| | | // && typeof window.WebKitMutationObserver === 'undefined') { |
| | | // console.warn('observer not supported') |
| | | // return |
| | | // } |
| | | // let targetEl = $(".layui-table-box")[0]; |
| | | // let config = { |
| | | // attributes: true, |
| | | // attributesOldValue: true, |
| | | // attributeFilter: ['class'], |
| | | // childList: false, |
| | | // subtree: false, |
| | | // characterData: false, |
| | | // characterDataOldValue: false |
| | | // }; |
| | | // let observer = new MutationObserver(mutations => { |
| | | // mutations.forEach(function (mutation) { |
| | | // if (mutation.attributeName === 'class') { |
| | | // // çå¬classä¸å
容çåå |
| | | // if ($(targetEl).hasClass('noselect')) { |
| | | // document.documentElement.style.userSelect = 'none'; |
| | | // document.documentElement.style.webkitUserSelect = 'none'; |
| | | // } else { |
| | | // document.documentElement.style.userSelect = ''; |
| | | // document.documentElement.style.webkitUserSelect = ''; |
| | | // } |
| | | // } |
| | | // }) |
| | | // }) |
| | | // observer.observe(targetEl, config); |
| | | // } |
| | | |
| | | //#endregion |
| | | |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_RoutingBill/CloseGy_RoutingBill_1', |
| | | type: "GET", |
| | | data: { "HInterID": HInterID, "Type": 1, "user": sessionStorage["HUserName"], "HBillSubType": "" }, |
| | | data: { "HInterID": HInterID, "Type": 2, "user": sessionStorage["HUserName"], "HBillSubType": "" }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <div class="layui-row" style=" margin-top: 10px; "> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <div class="layui-row" style=" margin-top: 10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | |
| | | else if ($.inArray(data[i].name, totalArray) > -1) { //计ç®å |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 }); |
| | | } else if (data[i].name == 'åæ®å·') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: 'åæ®å·' }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: 'åæ®å·'}); |
| | | } else { |
| | | switch (data[i].Type) { |
| | | //int |
| | |
| | | option.data = result; |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, titleData) |
| | | table.render(option); |
| | | table.render(option); |
| | | |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | |
| | | if ($.inArray(data[i].name, titleData) > -1) {//æ£æ¥dataãiã.nameæ¯å¦å¨æ°ç»ä¸ //计ç®å |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } else if (data[i].name == 'åæ®å·') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: 'åæ®å·' }); |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: 'åæ®å·', style:"color:blue; cursor: pointer;" }); |
| | | } else { |
| | | switch (data[i].Type) { |
| | | //int |
| | |
| | | } |
| | | } |
| | | option.data = result; |
| | | |
| | | debugger |
| | | |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, titleData) |
| | | laypage.render(optionPage); |
| | | debugger |
| | | |
| | | ins = table.render(option); |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |