mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
4 lines
32 KiB
JavaScript
Vendored
4 lines
32 KiB
JavaScript
Vendored
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ab4d3e40"],{"0a5a":function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return o}));var r="admin_token";function a(){return localStorage.getItem("token")}function o(){return localStorage.removeItem(r)}},"0d3b":function(t,e,n){var r=n("d039"),a=n("b622"),o=n("c430"),s=a("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e["delete"]("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},"2b3d":function(t,e,n){"use strict";n("3ca3");var r,a=n("23e7"),o=n("83ab"),s=n("0d3b"),i=n("da84"),u=n("37e8"),c=n("6eeb"),l=n("19aa"),d=n("5135"),f=n("60da"),h=n("4df4"),p=n("6547").codeAt,g=n("5fb2"),m=n("d44e"),v=n("9861"),b=n("69f3"),y=i.URL,k=v.URLSearchParams,w=v.getState,_=b.set,S=b.getterFor("URL"),D=Math.floor,U=Math.pow,j="Invalid authority",L="Invalid scheme",R="Invalid host",O="Invalid port",A=/[A-Za-z]/,q=/[\d+-.A-Za-z]/,x=/\d/,C=/^0x/i,B=/^[0-7]+$/,I=/^\d+$/,P=/^[\dA-Fa-f]+$/,E=/[\0\t\n\r #%/:<>?@[\\\]^|]/,$=/[\0\t\n\r #/:<>?@[\\\]^|]/,T=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,M=/[\t\n\r]/g,F=function(t,e){var n,r,a;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return R;if(n=N(e.slice(1,-1)),!n)return R;t.host=n}else if(X(t)){if(e=g(e),E.test(e))return R;if(n=z(e),null===n)return R;t.host=n}else{if($.test(e))return R;for(n="",r=h(e),a=0;a<r.length;a++)n+=Q(r[a],J);t.host=n}},z=function(t){var e,n,r,a,o,s,i,u=t.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),e=u.length,e>4)return t;for(n=[],r=0;r<e;r++){if(a=u[r],""==a)return t;if(o=10,a.length>1&&"0"==a.charAt(0)&&(o=C.test(a)?16:8,a=a.slice(8==o?1:2)),""===a)s=0;else{if(!(10==o?I:8==o?B:P).test(a))return t;s=parseInt(a,o)}n.push(s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=U(256,5-e))return null}else if(s>255)return null;for(i=n.pop(),r=0;r<n.length;r++)i+=n[r]*U(256,3-r);return i},N=function(t){var e,n,r,a,o,s,i,u=[0,0,0,0,0,0,0,0],c=0,l=null,d=0,f=function(){return t.charAt(d)};if(":"==f()){if(":"!=t.charAt(1))return;d+=2,c++,l=c}while(f()){if(8==c)return;if(":"!=f()){e=n=0;while(n<4&&P.test(f()))e=16*e+parseInt(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,c>6)return;r=0;while(f()){if(a=null,r>0){if(!("."==f()&&r<4))return;d++}if(!x.test(f()))return;while(x.test(f())){if(o=parseInt(f(),10),null===a)a=o;else{if(0==a)return;a=10*a+o}if(a>255)return;d++}u[c]=256*u[c]+a,r++,2!=r&&4!=r||c++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;u[c++]=e}else{if(null!==l)return;d++,c++,l=c}}if(null!==l){s=c-l,c=7;while(0!=c&&s>0)i=u[c],u[c--]=u[l+s-1],u[l+--s]=i}else if(8!=c)return;return u},W=function(t){for(var e=null,n=1,r=null,a=0,o=0;o<8;o++)0!==t[o]?(a>n&&(e=r,n=a),r=null,a=0):(null===r&&(r=o),++a);return a>n&&(e=r,n=a),e},G=function(t){var e,n,r,a;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=D(t/256);return e.join(".")}if("object"==typeof t){for(e="",r=W(t),n=0;n<8;n++)a&&0===t[n]||(a&&(a=!1),r===n?(e+=n?":":"::",a=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},J={},H=f({},J,{" ":1,'"':1,"<":1,">":1,"`":1}),Z=f({},H,{"#":1,"?":1,"{":1,"}":1}),K=f({},Z,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Q=function(t,e){var n=p(t,0);return n>32&&n<127&&!d(e,t)?t:encodeURIComponent(t)},V={ftp:21,file:null,http:80,https:443,ws:80,wss:443},X=function(t){return d(V,t.scheme)},Y=function(t){return""!=t.username||""!=t.password},tt=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},et=function(t,e){var n;return 2==t.length&&A.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},nt=function(t){var e;return t.length>1&&et(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},rt=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&et(e[0],!0)||e.pop()},at=function(t){return"."===t||"%2e"===t.toLowerCase()},ot=function(t){return t=t.toLowerCase(),".."===t||"%2e."===t||".%2e"===t||"%2e%2e"===t},st={},it={},ut={},ct={},lt={},dt={},ft={},ht={},pt={},gt={},mt={},vt={},bt={},yt={},kt={},wt={},_t={},St={},Dt={},Ut={},jt={},Lt=function(t,e,n,a){var o,s,i,u,c=n||st,l=0,f="",p=!1,g=!1,m=!1;n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(T,"")),e=e.replace(M,""),o=h(e);while(l<=o.length){switch(s=o[l],c){case st:if(!s||!A.test(s)){if(n)return L;c=ut;continue}f+=s.toLowerCase(),c=it;break;case it:if(s&&(q.test(s)||"+"==s||"-"==s||"."==s))f+=s.toLowerCase();else{if(":"!=s){if(n)return L;f="",c=ut,l=0;continue}if(n&&(X(t)!=d(V,f)||"file"==f&&(Y(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=f,n)return void(X(t)&&V[t.scheme]==t.port&&(t.port=null));f="","file"==t.scheme?c=yt:X(t)&&a&&a.scheme==t.scheme?c=ct:X(t)?c=ht:"/"==o[l+1]?(c=lt,l++):(t.cannotBeABaseURL=!0,t.path.push(""),c=Dt)}break;case ut:if(!a||a.cannotBeABaseURL&&"#"!=s)return L;if(a.cannotBeABaseURL&&"#"==s){t.scheme=a.scheme,t.path=a.path.slice(),t.query=a.query,t.fragment="",t.cannotBeABaseURL=!0,c=jt;break}c="file"==a.scheme?yt:dt;continue;case ct:if("/"!=s||"/"!=o[l+1]){c=dt;continue}c=pt,l++;break;case lt:if("/"==s){c=gt;break}c=St;continue;case dt:if(t.scheme=a.scheme,s==r)t.username=a.username,t.password=a.password,t.host=a.host,t.port=a.port,t.path=a.path.slice(),t.query=a.query;else if("/"==s||"\\"==s&&X(t))c=ft;else if("?"==s)t.username=a.username,t.password=a.password,t.host=a.host,t.port=a.port,t.path=a.path.slice(),t.query="",c=Ut;else{if("#"!=s){t.username=a.username,t.password=a.password,t.host=a.host,t.port=a.port,t.path=a.path.slice(),t.path.pop(),c=St;continue}t.username=a.username,t.password=a.password,t.host=a.host,t.port=a.port,t.path=a.path.slice(),t.query=a.query,t.fragment="",c=jt}break;case ft:if(!X(t)||"/"!=s&&"\\"!=s){if("/"!=s){t.username=a.username,t.password=a.password,t.host=a.host,t.port=a.port,c=St;continue}c=gt}else c=pt;break;case ht:if(c=pt,"/"!=s||"/"!=f.charAt(l+1))continue;l++;break;case pt:if("/"!=s&&"\\"!=s){c=gt;continue}break;case gt:if("@"==s){p&&(f="%40"+f),p=!0,i=h(f);for(var v=0;v<i.length;v++){var b=i[v];if(":"!=b||m){var y=Q(b,K);m?t.password+=y:t.username+=y}else m=!0}f=""}else if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&X(t)){if(p&&""==f)return j;l-=h(f).length+1,f="",c=mt}else f+=s;break;case mt:case vt:if(n&&"file"==t.scheme){c=wt;continue}if(":"!=s||g){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&X(t)){if(X(t)&&""==f)return R;if(n&&""==f&&(Y(t)||null!==t.port))return;if(u=F(t,f),u)return u;if(f="",c=_t,n)return;continue}"["==s?g=!0:"]"==s&&(g=!1),f+=s}else{if(""==f)return R;if(u=F(t,f),u)return u;if(f="",c=bt,n==vt)return}break;case bt:if(!x.test(s)){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&X(t)||n){if(""!=f){var k=parseInt(f,10);if(k>65535)return O;t.port=X(t)&&k===V[t.scheme]?null:k,f=""}if(n)return;c=_t;continue}return O}f+=s;break;case yt:if(t.scheme="file","/"==s||"\\"==s)c=kt;else{if(!a||"file"!=a.scheme){c=St;continue}if(s==r)t.host=a.host,t.path=a.path.slice(),t.query=a.query;else if("?"==s)t.host=a.host,t.path=a.path.slice(),t.query="",c=Ut;else{if("#"!=s){nt(o.slice(l).join(""))||(t.host=a.host,t.path=a.path.slice(),rt(t)),c=St;continue}t.host=a.host,t.path=a.path.slice(),t.query=a.query,t.fragment="",c=jt}}break;case kt:if("/"==s||"\\"==s){c=wt;break}a&&"file"==a.scheme&&!nt(o.slice(l).join(""))&&(et(a.path[0],!0)?t.path.push(a.path[0]):t.host=a.host),c=St;continue;case wt:if(s==r||"/"==s||"\\"==s||"?"==s||"#"==s){if(!n&&et(f))c=St;else if(""==f){if(t.host="",n)return;c=_t}else{if(u=F(t,f),u)return u;if("localhost"==t.host&&(t.host=""),n)return;f="",c=_t}continue}f+=s;break;case _t:if(X(t)){if(c=St,"/"!=s&&"\\"!=s)continue}else if(n||"?"!=s)if(n||"#"!=s){if(s!=r&&(c=St,"/"!=s))continue}else t.fragment="",c=jt;else t.query="",c=Ut;break;case St:if(s==r||"/"==s||"\\"==s&&X(t)||!n&&("?"==s||"#"==s)){if(ot(f)?(rt(t),"/"==s||"\\"==s&&X(t)||t.path.push("")):at(f)?"/"==s||"\\"==s&&X(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&et(f)&&(t.host&&(t.host=""),f=f.charAt(0)+":"),t.path.push(f)),f="","file"==t.scheme&&(s==r||"?"==s||"#"==s))while(t.path.length>1&&""===t.path[0])t.path.shift();"?"==s?(t.query="",c=Ut):"#"==s&&(t.fragment="",c=jt)}else f+=Q(s,Z);break;case Dt:"?"==s?(t.query="",c=Ut):"#"==s?(t.fragment="",c=jt):s!=r&&(t.path[0]+=Q(s,J));break;case Ut:n||"#"!=s?s!=r&&("'"==s&&X(t)?t.query+="%27":t.query+="#"==s?"%23":Q(s,J)):(t.fragment="",c=jt);break;case jt:s!=r&&(t.fragment+=Q(s,H));break}l++}},Rt=function(t){var e,n,r=l(this,Rt,"URL"),a=arguments.length>1?arguments[1]:void 0,s=String(t),i=_(r,{type:"URL"});if(void 0!==a)if(a instanceof Rt)e=S(a);else if(n=Lt(e={},String(a)),n)throw TypeError(n);if(n=Lt(i,s,null,e),n)throw TypeError(n);var u=i.searchParams=new k,c=w(u);c.updateSearchParams(i.query),c.updateURL=function(){i.query=String(u)||null},o||(r.href=At.call(r),r.origin=qt.call(r),r.protocol=xt.call(r),r.username=Ct.call(r),r.password=Bt.call(r),r.host=It.call(r),r.hostname=Pt.call(r),r.port=Et.call(r),r.pathname=$t.call(r),r.search=Tt.call(r),r.searchParams=Mt.call(r),r.hash=Ft.call(r))},Ot=Rt.prototype,At=function(){var t=S(this),e=t.scheme,n=t.username,r=t.password,a=t.host,o=t.port,s=t.path,i=t.query,u=t.fragment,c=e+":";return null!==a?(c+="//",Y(t)&&(c+=n+(r?":"+r:"")+"@"),c+=G(a),null!==o&&(c+=":"+o)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==i&&(c+="?"+i),null!==u&&(c+="#"+u),c},qt=function(){var t=S(this),e=t.scheme,n=t.port;if("blob"==e)try{return new Rt(e.path[0]).origin}catch(r){return"null"}return"file"!=e&&X(t)?e+"://"+G(t.host)+(null!==n?":"+n:""):"null"},xt=function(){return S(this).scheme+":"},Ct=function(){return S(this).username},Bt=function(){return S(this).password},It=function(){var t=S(this),e=t.host,n=t.port;return null===e?"":null===n?G(e):G(e)+":"+n},Pt=function(){var t=S(this).host;return null===t?"":G(t)},Et=function(){var t=S(this).port;return null===t?"":String(t)},$t=function(){var t=S(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},Tt=function(){var t=S(this).query;return t?"?"+t:""},Mt=function(){return S(this).searchParams},Ft=function(){var t=S(this).fragment;return t?"#"+t:""},zt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&u(Ot,{href:zt(At,(function(t){var e=S(this),n=String(t),r=Lt(e,n);if(r)throw TypeError(r);w(e.searchParams).updateSearchParams(e.query)})),origin:zt(qt),protocol:zt(xt,(function(t){var e=S(this);Lt(e,String(t)+":",st)})),username:zt(Ct,(function(t){var e=S(this),n=h(String(t));if(!tt(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=Q(n[r],K)}})),password:zt(Bt,(function(t){var e=S(this),n=h(String(t));if(!tt(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=Q(n[r],K)}})),host:zt(It,(function(t){var e=S(this);e.cannotBeABaseURL||Lt(e,String(t),mt)})),hostname:zt(Pt,(function(t){var e=S(this);e.cannotBeABaseURL||Lt(e,String(t),vt)})),port:zt(Et,(function(t){var e=S(this);tt(e)||(t=String(t),""==t?e.port=null:Lt(e,t,bt))})),pathname:zt($t,(function(t){var e=S(this);e.cannotBeABaseURL||(e.path=[],Lt(e,t+"",_t))})),search:zt(Tt,(function(t){var e=S(this);t=String(t),""==t?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",Lt(e,t,Ut)),w(e.searchParams).updateSearchParams(e.query)})),searchParams:zt(Mt),hash:zt(Ft,(function(t){var e=S(this);t=String(t),""!=t?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",Lt(e,t,jt)):e.fragment=null}))}),c(Ot,"toJSON",(function(){return At.call(this)}),{enumerable:!0}),c(Ot,"toString",(function(){return At.call(this)}),{enumerable:!0}),y){var Nt=y.createObjectURL,Wt=y.revokeObjectURL;Nt&&c(Rt,"createObjectURL",(function(t){return Nt.apply(y,arguments)})),Wt&&c(Rt,"revokeObjectURL",(function(t){return Wt.apply(y,arguments)}))}m(Rt,"URL"),a({global:!0,forced:!s,sham:!o},{URL:Rt})},"2f76":function(t,e,n){"use strict";n("d252")},"323e":function(t,e,n){var r,a;
|
||
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
||
* @license MIT */(function(o,s){r=s,a="function"===typeof r?r.call(e,n,e,t):r,void 0===a||(t.exports=a)})(0,(function(){var t={version:"0.2.0"},e=t.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function n(t,e,n){return t<e?e:t>n?n:t}function r(t){return 100*(-1+t)}function a(t,n,a){var o;return o="translate3d"===e.positionUsing?{transform:"translate3d("+r(t)+"%,0,0)"}:"translate"===e.positionUsing?{transform:"translate("+r(t)+"%,0)"}:{"margin-left":r(t)+"%"},o.transition="all "+n+"ms "+a,o}t.configure=function(t){var n,r;for(n in t)r=t[n],void 0!==r&&t.hasOwnProperty(n)&&(e[n]=r);return this},t.status=null,t.set=function(r){var i=t.isStarted();r=n(r,e.minimum,1),t.status=1===r?null:r;var u=t.render(!i),c=u.querySelector(e.barSelector),l=e.speed,d=e.easing;return u.offsetWidth,o((function(n){""===e.positionUsing&&(e.positionUsing=t.getPositioningCSS()),s(c,a(r,l,d)),1===r?(s(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){s(u,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){t.remove(),n()}),l)}),l)):setTimeout(n,l)})),this},t.isStarted=function(){return"number"===typeof t.status},t.start=function(){t.status||t.set(0);var n=function(){setTimeout((function(){t.status&&(t.trickle(),n())}),e.trickleSpeed)};return e.trickle&&n(),this},t.done=function(e){return e||t.status?t.inc(.3+.5*Math.random()).set(1):this},t.inc=function(e){var r=t.status;return r?("number"!==typeof e&&(e=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+e,0,.994),t.set(r)):t.start()},t.trickle=function(){return t.inc(Math.random()*e.trickleRate)},function(){var e=0,n=0;t.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&t.start(),e++,n++,r.always((function(){n--,0===n?(e=0,t.done()):t.set((e-n)/e)})),this):this}}(),t.render=function(n){if(t.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var a=document.createElement("div");a.id="nprogress",a.innerHTML=e.template;var o,i=a.querySelector(e.barSelector),c=n?"-100":r(t.status||0),l=document.querySelector(e.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),e.showSpinner||(o=a.querySelector(e.spinnerSelector),o&&d(o)),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(a),a},t.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(e.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&d(t)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var o=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),s=function(){var t=["Webkit","O","Moz","ms"],e={};function n(t){return t.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()}))}function r(e){var n=document.body.style;if(e in n)return e;var r,a=t.length,o=e.charAt(0).toUpperCase()+e.slice(1);while(a--)if(r=t[a]+o,r in n)return r;return e}function a(t){return t=n(t),e[t]||(e[t]=r(t))}function o(t,e,n){e=a(e),t.style[e]=n}return function(t,e){var n,r,a=arguments;if(2==a.length)for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&o(t,n,r);else o(t,a[1],a[2])}}();function i(t,e){var n="string"==typeof t?t:l(t);return n.indexOf(" "+e+" ")>=0}function u(t,e){var n=l(t),r=n+e;i(n,e)||(t.className=r.substring(1))}function c(t,e){var n,r=l(t);i(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function l(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function d(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return t}))},"4df4":function(t,e,n){"use strict";var r=n("0366"),a=n("7b0b"),o=n("9bdd"),s=n("e95a"),i=n("50c4"),u=n("8418"),c=n("35a1");t.exports=function(t){var e,n,l,d,f,h,p=a(t),g="function"==typeof this?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,b=void 0!==v,y=c(p),k=0;if(b&&(v=r(v,m>2?arguments[2]:void 0,2)),void 0==y||g==Array&&s(y))for(e=i(p.length),n=new g(e);e>k;k++)h=b?v(p[k],k):p[k],u(n,k,h);else for(d=y.call(p),f=d.next,n=new g;!(l=f.call(d)).done;k++)h=b?o(d,v,[l.value,k],!0):l.value,u(n,k,h);return n.length=k,n}},"5fb2":function(t,e,n){"use strict";var r=2147483647,a=36,o=1,s=26,i=38,u=700,c=72,l=128,d="-",f=/[^\0-\u007E]/,h=/[.\u3002\uFF0E\uFF61]/g,p="Overflow: input needs wider integers to process",g=a-o,m=Math.floor,v=String.fromCharCode,b=function(t){var e=[],n=0,r=t.length;while(n<r){var a=t.charCodeAt(n++);if(a>=55296&&a<=56319&&n<r){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&a)<<10)+(1023&o)+65536):(e.push(a),n--)}else e.push(a)}return e},y=function(t){return t+22+75*(t<26)},k=function(t,e,n){var r=0;for(t=n?m(t/u):t>>1,t+=m(t/e);t>g*s>>1;r+=a)t=m(t/g);return m(r+(g+1)*t/(t+i))},w=function(t){var e=[];t=b(t);var n,i,u=t.length,f=l,h=0,g=c;for(n=0;n<t.length;n++)i=t[n],i<128&&e.push(v(i));var w=e.length,_=w;w&&e.push(d);while(_<u){var S=r;for(n=0;n<t.length;n++)i=t[n],i>=f&&i<S&&(S=i);var D=_+1;if(S-f>m((r-h)/D))throw RangeError(p);for(h+=(S-f)*D,f=S,n=0;n<t.length;n++){if(i=t[n],i<f&&++h>r)throw RangeError(p);if(i==f){for(var U=h,j=a;;j+=a){var L=j<=g?o:j>=g+s?s:j-g;if(U<L)break;var R=U-L,O=a-L;e.push(v(y(L+R%O))),U=m(R/O)}e.push(v(y(U))),g=k(h,D,_==w),h=0,++_}}++h,++f}return e.join("")};t.exports=function(t){var e,n,r=[],a=t.toLowerCase().replace(h,".").split(".");for(e=0;e<a.length;e++)n=a[e],r.push(f.test(n)?"xn--"+w(n):n);return r.join(".")}},"6d71":function(t,e,n){"use strict";n.d(e,"h",(function(){return a})),n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"g",(function(){return i})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return c})),n.d(e,"a",(function(){return l})),n.d(e,"f",(function(){return d}));var r=n("adb5");function a(t){return Object(r["a"])({url:"/api/goods_types",method:"get",params:t})}function o(t){return Object(r["a"])({url:"/api/goods_types/".concat(t),method:"delete"})}function s(t){return Object(r["a"])({url:"/api/goods_types/",method:"post",data:t})}function i(t,e){return Object(r["a"])({url:"/api/goods_types/".concat(t),method:"patch",data:e})}function u(t){return Object(r["a"])({url:"/api/goods_brands",method:"get",params:t})}function c(t){return Object(r["a"])({url:"/api/goods_brands/".concat(t),method:"delete"})}function l(t){return Object(r["a"])({url:"/api/goods_brands",method:"post",data:t})}function d(t,e){return Object(r["a"])({url:"/api/goods_brands/".concat(t),method:"patch",data:e})}},8418:function(t,e,n){"use strict";var r=n("c04e"),a=n("9bf2"),o=n("5c6c");t.exports=function(t,e,n){var s=r(e);s in t?a.f(t,s,o(0,n)):t[s]=n}},9861:function(t,e,n){"use strict";n("e260");var r=n("23e7"),a=n("d066"),o=n("0d3b"),s=n("6eeb"),i=n("e2cc"),u=n("d44e"),c=n("9ed3"),l=n("69f3"),d=n("19aa"),f=n("5135"),h=n("0366"),p=n("f5df"),g=n("825a"),m=n("861d"),v=n("7c73"),b=n("5c6c"),y=n("9a1f"),k=n("35a1"),w=n("b622"),_=a("fetch"),S=a("Headers"),D=w("iterator"),U="URLSearchParams",j=U+"Iterator",L=l.set,R=l.getterFor(U),O=l.getterFor(j),A=/\+/g,q=Array(4),x=function(t){return q[t-1]||(q[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},C=function(t){try{return decodeURIComponent(t)}catch(e){return t}},B=function(t){var e=t.replace(A," "),n=4;try{return decodeURIComponent(e)}catch(r){while(n)e=e.replace(x(n--),C);return e}},I=/[!'()~]|%20/g,P={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},E=function(t){return P[t]},$=function(t){return encodeURIComponent(t).replace(I,E)},T=function(t,e){if(e){var n,r,a=e.split("&"),o=0;while(o<a.length)n=a[o++],n.length&&(r=n.split("="),t.push({key:B(r.shift()),value:B(r.join("="))}))}},M=function(t){this.entries.length=0,T(this.entries,t)},F=function(t,e){if(t<e)throw TypeError("Not enough arguments")},z=c((function(t,e){L(this,{type:j,iterator:y(R(t).entries),kind:e})}),"Iterator",(function(){var t=O(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),N=function(){d(this,N,U);var t,e,n,r,a,o,s,i,u,c=arguments.length>0?arguments[0]:void 0,l=this,h=[];if(L(l,{type:U,entries:h,updateURL:function(){},updateSearchParams:M}),void 0!==c)if(m(c))if(t=k(c),"function"===typeof t){e=t.call(c),n=e.next;while(!(r=n.call(e)).done){if(a=y(g(r.value)),o=a.next,(s=o.call(a)).done||(i=o.call(a)).done||!o.call(a).done)throw TypeError("Expected sequence with length 2");h.push({key:s.value+"",value:i.value+""})}}else for(u in c)f(c,u)&&h.push({key:u,value:c[u]+""});else T(h,"string"===typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},W=N.prototype;i(W,{append:function(t,e){F(arguments.length,2);var n=R(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){F(arguments.length,1);var e=R(this),n=e.entries,r=t+"",a=0;while(a<n.length)n[a].key===r?n.splice(a,1):a++;e.updateURL()},get:function(t){F(arguments.length,1);for(var e=R(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){F(arguments.length,1);for(var e=R(this).entries,n=t+"",r=[],a=0;a<e.length;a++)e[a].key===n&&r.push(e[a].value);return r},has:function(t){F(arguments.length,1);var e=R(this).entries,n=t+"",r=0;while(r<e.length)if(e[r++].key===n)return!0;return!1},set:function(t,e){F(arguments.length,1);for(var n,r=R(this),a=r.entries,o=!1,s=t+"",i=e+"",u=0;u<a.length;u++)n=a[u],n.key===s&&(o?a.splice(u--,1):(o=!0,n.value=i));o||a.push({key:s,value:i}),r.updateURL()},sort:function(){var t,e,n,r=R(this),a=r.entries,o=a.slice();for(a.length=0,n=0;n<o.length;n++){for(t=o[n],e=0;e<n;e++)if(a[e].key>t.key){a.splice(e,0,t);break}e===n&&a.push(t)}r.updateURL()},forEach:function(t){var e,n=R(this).entries,r=h(t,arguments.length>1?arguments[1]:void 0,3),a=0;while(a<n.length)e=n[a++],r(e.value,e.key,this)},keys:function(){return new z(this,"keys")},values:function(){return new z(this,"values")},entries:function(){return new z(this,"entries")}},{enumerable:!0}),s(W,D,W.entries),s(W,"toString",(function(){var t,e=R(this).entries,n=[],r=0;while(r<e.length)t=e[r++],n.push($(t.key)+"="+$(t.value));return n.join("&")}),{enumerable:!0}),u(N,U),r({global:!0,forced:!o},{URLSearchParams:N}),o||"function"!=typeof _||"function"!=typeof S||r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,r,a=[t];return arguments.length>1&&(e=arguments[1],m(e)&&(n=e.body,p(n)===U&&(r=e.headers?new S(e.headers):new S,r.has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=v(e,{body:b(0,String(n)),headers:b(0,r)}))),a.push(e)),_.apply(this,a)}}),t.exports={URLSearchParams:N,getState:R}},"9a1f":function(t,e,n){var r=n("825a"),a=n("35a1");t.exports=function(t){var e=a(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},"9bdd":function(t,e,n){var r=n("825a"),a=n("2a62");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(s){throw a(t),s}}},a5d8:function(t,e,n){},adb5:function(t,e,n){"use strict";n("d3b7");var r=n("bc3a"),a=n.n(r),o=n("0a5a"),s=n("323e"),i=n.n(s),u=(n("a5d8"),n("5c96")),c=a.a.create({timeout:36e4});c.interceptors.request.use((function(t){return t.headers.Authorization="Bearer "+Object(o["a"])(),i.a.start(),t}),(function(t){return Promise.reject(t)})),c.interceptors.response.use((function(t){i.a.done();var e=t.status;if(200===e||201===e)return t}),(function(t){return i.a.done(),400===t.response.status&&Object(u["Message"])({message:t.response.data.errorMessage,type:"error"}),500===t.response.status&&Object(u["Message"])({message:t.response.data.message,type:"error"}),Promise.reject(t)})),e["a"]=c},c40e:function(t,e,n){"use strict";n.d(e,"h",(function(){return a})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"i",(function(){return i})),n.d(e,"o",(function(){return u})),n.d(e,"n",(function(){return c})),n.d(e,"m",(function(){return l})),n.d(e,"k",(function(){return d})),n.d(e,"f",(function(){return f})),n.d(e,"j",(function(){return h})),n.d(e,"g",(function(){return p})),n.d(e,"e",(function(){return g})),n.d(e,"b",(function(){return m})),n.d(e,"d",(function(){return v})),n.d(e,"l",(function(){return b}));var r=n("adb5");function a(t){return Object(r["a"])({url:"/api/goods_skus",method:"get",params:t})}function o(t){return Object(r["a"])({url:"/api/goods",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/api/goods_skus/".concat(t),method:"get"})}function i(t){return Object(r["a"])({url:"/api/goods",method:"get",params:t})}function u(t,e){return Object(r["a"])({url:"/api/goods_skus/".concat(t),method:"patch",data:e})}function c(t){return Object(r["a"])({url:"/api/batch/goods_skus",method:"patch",data:t})}function l(t,e){return Object(r["a"])({url:"/api/single/goods_skus/".concat(t),method:"patch",data:e})}function d(t,e){return Object(r["a"])({url:"/api/upload",Headers:e,method:"post",data:t})}function f(t){return Object(r["a"])({url:"/api/goodsList",method:"get",params:t})}function h(t){return Object(r["a"])({url:"/api/goods_sku_location",method:"get",params:t})}function p(){return Object(r["a"])({url:"/api/stock/goods_skus",method:"get"})}function g(t){return Object(r["a"])({url:"/api/goods/filter/"+t,method:"get"})}function m(t){return Object(r["a"])({url:"/api/goods_combination",method:"post",data:t})}function v(t){return Object(r["a"])({url:"/api/goods_combination",method:"get",params:t})}function b(t){return Object(r["a"])({url:"/api/goods_combination/"+t,method:"get"})}},d252:function(t,e,n){},f3ed:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-card",{staticClass:"box-card"},[n("el-form",{ref:"form",attrs:{inline:!0,model:t.goodsData}},[n("div",[n("el-form-item",{attrs:{label:"商品列表:"}},[n("el-select",{attrs:{placeholder:"选择商品",filterable:"",disabled:!0},model:{value:t.goodsData.goods_id,callback:function(e){t.$set(t.goodsData,"goods_id",e)},expression:"goodsData.goods_id"}},t._l(t.goodschoose,(function(t){return n("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})})),1)],1)],1),n("div",[n("el-form-item",{attrs:{label:"商品图片:"}},[n("el-upload",{staticClass:"avatar-uploader",attrs:{action:"#",limit:1,"auto-upload":!1,"show-file-list":!0,"list-type":"picture-card","on-change":t.handleAvatarSuccess}},[t.goodsData.goods.img_url?n("img",{staticClass:"avatar",attrs:{src:t.goodsData.goods.img_url}}):n("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1)],1),n("div",[n("el-form-item",{attrs:{label:"商品名称:"}},[n("el-input",{attrs:{placeholder:"商品名称"},model:{value:t.goodsData.goods.title,callback:function(e){t.$set(t.goodsData.goods,"title",e)},expression:"goodsData.goods.title"}})],1),n("el-form-item",{attrs:{label:"商品编码:"}},[n("el-input",{attrs:{placeholder:"商品编码"},model:{value:t.goodsData.goods.goods_code,callback:function(e){t.$set(t.goodsData.goods,"goods_code",e)},expression:"goodsData.goods.goods_code"}})],1),n("el-form-item",{attrs:{label:"商品种类:"}},[n("el-select",{attrs:{placeholder:"商品种类",filterable:""},model:{value:t.goodsData.goods.type_id,callback:function(e){t.$set(t.goodsData.goods,"type_id",e)},expression:"goodsData.goods.type_id"}},t._l(t.cate,(function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),n("el-form-item",{attrs:{label:"商品品牌:"}},[n("el-select",{attrs:{placeholder:"商品品牌",filterable:""},model:{value:t.goodsData.goods.brand_id,callback:function(e){t.$set(t.goodsData.goods,"brand_id",e)},expression:"goodsData.goods.brand_id"}},t._l(t.brand,(function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1),n("div",[n("el-form-item",{attrs:{label:"商品规格:"}},[n("el-input",{attrs:{placeholder:"商品规格"},model:{value:t.goodsData.title,callback:function(e){t.$set(t.goodsData,"title",e)},expression:"goodsData.title"}})],1),n("el-form-item",{attrs:{label:"规格编码:"}},[n("el-input",{attrs:{placeholder:"商品编码"},model:{value:t.goodsData.sku_code,callback:function(e){t.$set(t.goodsData,"sku_code",e)},expression:"goodsData.sku_code"}})],1),n("el-form-item",{attrs:{label:"商品状态:"}},[n("el-select",{model:{value:t.goodsData.status,callback:function(e){t.$set(t.goodsData,"status",e)},expression:"goodsData.status"}},t._l(t.options,(function(t){return n("el-option",{key:t.id,attrs:{label:t.label,value:t.id}})})),1)],1),n("div",[n("el-form-item",{attrs:{label:"商品数量:"}},[n("el-input",{attrs:{placeholder:"商品数量"},model:{value:t.goodsData.num,callback:function(e){t.$set(t.goodsData,"num",e)},expression:"goodsData.num"}})],1),n("el-form-item",{attrs:{label:"商品成本:"}},[n("el-input",{attrs:{placeholder:"商品成本"},model:{value:t.goodsData.cost,callback:function(e){t.$set(t.goodsData,"cost",e)},expression:"goodsData.cost"}})],1)],1)],1),n("div",[n("el-form-item",{attrs:{label:"规格图片:"}},[n("div",{staticClass:"shop-sku-img"},t._l(t.goodsData.thumb_url,(function(e){return n("div",{key:e.shop_id,staticClass:"shop"},[n("div",{staticClass:"shop-name"},[t._v(t._s(e.shop_name))]),n("div",[n("el-upload",{staticClass:"avatar-uploader",attrs:{action:"/api/upload",limit:1,accept:"image/png,image/jpg,image/jpeg","show-file-list":!1,"list-type":"picture-card",data:{shop_id:e.shop_id},name:"uploadFile","on-success":t.handleShopImgSuccess,"before-upload":t.beforeAvatarUpload}},[e.img_url?n("img",{staticClass:"avatar",attrs:{src:e.img_url}}):n("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1)])})),0)])],1),n("div",{staticClass:"btn"},[n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.Edititem()}}},[t._v("保存")]),n("el-button",{attrs:{plain:""},on:{click:function(e){return t.cancel()}}},[t._v("取消")])],1)],1)])],1)],1)},a=[],o=(n("159b"),n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("c40e")),s=n("6d71"),i={data:function(){return{brand:[],cate:[],goodschoose:[],skuId:0,goodsData:{goods_id:"",title:"",status:"",num:"",cost:"",sku_code:"",thumb_url:[],goods:{img_url:"",title:"",type_id:"",brand_id:"",goods_code:""}},options:[{id:"0",label:"下架"},{id:"1",label:"在售"},{id:"2",label:"预警"}],file:[],shopList:[]}},methods:{handleAvatarSuccess:function(t,e){var n=this,r=new FormData;e.forEach((function(t){r.append("uploadFile",t.raw)}));var a={headers:{"Content-Type":"multipart/form-data"}};Object(o["k"])(r,a).then((function(t){n.goodsData.goods.img_url=t.data.resource}))},handleShopImgSuccess:function(t){var e=this;this.goodsData.thumb_url.forEach((function(n,r){n.shop_id==t.shop_id&&(e.goodsData.thumb_url[r].img_url=t.resource)}))},beforeAvatarUpload:function(t){var e=this,n=t.size/1024/1024<1;if(!n)return this.$message.error("上传头像图片大小不能超过 1MB!"),!1;var r=new Promise((function(e,n){var r=1200,a=1200,o=window.URL||window.webkitURL,s=new Image;s.onload=function(){var t=s.width<=r&&s.height<=a;t?e():n()},s.src=o.createObjectURL(t)})).then((function(){return t}),(function(){return e.$message.error("图片尺寸限制为1200 x 1200,大小不可超过1MB"),Promise.reject()}));return r},handleList:function(){var t=this;Object(o["i"])().then((function(e){t.goodschoose=e.data.data}))},getGoodsSkuData:function(){var t=this;Object(o["c"])(this.skuId).then((function(e){t.goodsData=e.data.data}))},Edititem:function(){var t=this,e={title:this.goodsData.goods.title,img_url:this.goodsData.goods.img_url,type_id:this.goodsData.goods.type_id,brand_id:this.goodsData.goods.brand_id,goods_code:this.goodsData.goods.goods_code},n={title:this.goodsData.title,sku_code:this.goodsData.sku_code,status:this.goodsData.status,num:this.goodsData.num,cost:this.goodsData.cost,thumb_url:this.goodsData.thumb_url};"下架"==n.status?n.status=0:"在售"==n.status?n.status=1:"预警"==n.status&&(n.status=2);var r={goods_id:this.goodsData.goods_id,goods:e,sku:n};Object(o["o"])(this.skuId,r).then((function(e){t.$message(e.data.message),t.$router.push("/GOODS_LIST")}))},cancel:function(){this.$router.push("/GOODS_LIST")}},created:function(){this.skuId=parseInt(this.$route.query.id)},mounted:function(){var t=this,e={per_page:999};Object(s["h"])(e).then((function(e){t.cate=e.data.data})),Object(s["c"])(e).then((function(e){t.brand=e.data.data})),this.handleList(),this.getGoodsSkuData()}},u=i,c=(n("2f76"),n("2877")),l=Object(c["a"])(u,r,a,!1,null,"0509b8a0",null);e["default"]=l.exports}}]);
|
||
//# sourceMappingURL=chunk-ab4d3e40.0c286099.js.map
|