胖子天骄的MES系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

2 lines
31 KiB

  1. "use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[384],{25429:function(Je,Ce,f){f.r(Ce),f.d(Ce,{default:function(){return tt}});var Ae=f(15009),Z=f.n(Ae),pe=f(99289),O=f.n(pe),ve=f(5574),V=f.n(ve),Ee=f(15513),K=f(12029),Te=f(87462),S=f(67294),Fe=f(82947),Be=f(93771),re=function(o,u){return S.createElement(Be.Z,(0,Te.Z)({},o,{ref:u,icon:Fe.Z}))},je=S.forwardRef(re),Le=f(94184),Se=f.n(Le),$e=Object.defineProperty,le=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,Re=(i,o,u)=>o in i?$e(i,o,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[o]=u,_=(i,o)=>{for(var u in o||(o={}))ye.call(o,u)&&Re(i,u,o[u]);if(le)for(var u of le(o))be.call(o,u)&&Re(i,u,o[u]);return i},ie=(i,o)=>{var u={};for(var l in i)ye.call(i,l)&&o.indexOf(l)<0&&(u[l]=i[l]);if(i!=null&&le)for(var l of le(i))o.indexOf(l)<0&&be.call(i,l)&&(u[l]=i[l]);return u};var a;(i=>{const o=class{constructor(e,t,r,n){if(this.version=e,this.errorCorrectionLevel=t,this.modules=[],this.isFunction=[],e<o.MIN_VERSION||e>o.MAX_VERSION)throw new RangeError("Version value out of range");if(n<-1||n>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let s=[];for(let c=0;c<this.size;c++)s.push(!1);for(let c=0;c<this.size;c++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const d=this.addEccAndInterleave(r);if(this.drawCodewords(d),n==-1){let c=1e9;for(let y=0;y<8;y++){this.applyMask(y),this.drawFormatBits(y);const p=this.getPenaltyScore();p<c&&(n=y,c=p),this.applyMask(y)}}m(0<=n&&n<=7),this.mask=n,this.applyMask(n),this.drawFormatBits(n),this.isFunction=[]}static encodeText(e,t){const r=i.QrSegment.makeSegments(e);return o.encodeSegments(r,t)}static encodeBinary(e,t){const r=i.QrSegment.makeBytes(e);return o.encodeSegments([r],t)}static encodeSegments(e,t,r=1,n=40,s=-1,d=!0){if(!(o.MIN_VERSION<=r&&r<=n&&n<=o.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let c,y;for(c=r;;c++){const h=o.getNumDataCodewords(c,t)*8,w=P.getTotalBits(e,c);if(w<=h){y=w;break}if(c>=n)throw new RangeError("Data too long")}for(const h of[o.Ecc.MEDIUM,o.Ecc.QUARTILE,o.Ecc.HIGH])d&&y<=o.getNumDataCodewords(c,h)*8&&(t=h);let p=[];for(const h of e){l(h.mode.modeBits,4,p),l(h.numChars,h.mode.numCharCountBits(c),p);for(const w of h.getData())p.push(w)}m(p.length==y);const k=o.getNumDataCodewords(c,t)*8;m(p.length<=k),l(0,Math.min(4,k-p.length),p),l(0,(8-p.length%8)%8,p),m(p.length%8==0);for(let h=236;p.length<k;h^=253)l(h,8,p);let N=[];for(;N.length*8<p.length;)N.push(0);return p.forEach((h,w)=>N[w>>>3]|=h<<7-(w&7)),new o(c,t,N,s)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)r==0&&n==0||r==0&&n==t-1||r==t-1&&n==0||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let s=0;s<10;s++)r=r<<1^(r>>>9)*1335;const n=(t<<10|r)^21522;m(n>>>15==0);for(let s=0;s<=5;s++)this.setFunctionModule(8,s,E(n,s));this.setFunctionModule(8,7,E(n,6)),this.setFunctionModule(8,8,E(n,7)),this.setFunctionModule(7,8,E(n,8));for(let s=9;s<15;s++)this.setFunctionModule(14-s,8,E(n,s));for(let s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,E(n,s));for(let s=8;s<15;s++)this.setFunctionModule(8,this.size-15+s,E(n,s));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^(e>>>11)*7973;const t=this.version<<12|e;m(t>>>18==0);for(let r=0;r<18;r++){const n=E(t,r),s=this.size-11+r%3,d=Math.floor(r/3);this.setFunctionModule(s,d,n),this.setFunctionModule(d,s,n)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const s=Math.max(Math.abs(n),Math.abs(r)),d=e+n,c=t+r;0<=d&&d<this.size&&0<=c&&c<this.size&&this.setFunctionModule(d,c,s!=2&&s!=4)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,Math.max(Math.abs(n),Math.abs(r))!=1)}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const t=this.version,r=this.errorCorrectionLevel;if(e.length!=o.getNumDataCodewords(t,r))throw new RangeError("Invalid argument");const n=o.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t],s=o.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t],d=Math.floor(o.getNumRawDataModules(t)/8),c=n-d%n,y=Math.floor(d/n);let p=[];const k=o.reedSolomonComputeDivisor(s);for(let h=0,w=0;h<n;h++){let B=e.slice(w,w+y-s+(h<c?0:1));w+=B.length;const G=o.reedSolomonComputeRemainder(B,k);h<c&&B.push(0),p.push(B.concat(G))}let N=[];for(let h=0;h<p[0].length;h++)p.forEach((w,B)=>{(h!=y-s||B>=c)&&N.push(w[h])});return m(N.length==d),N}drawCodewords(e){if(e.length!=Math.floor(o.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let t=0;for(let r=this.size-1;r>=1;r-=2){r==6&&(r=5);for(let n=0;n<this.size;n++)for(let s=0;s<2;s++){const d=r-s,y=(r+1&2)==0?this.size-1-n:n;!this.isFunction[y][d]&&t<e.length*8&&(this.modules[y][d]=E(e[t>>>3],7-(t&7)),t++)}}m(t==e.length*8)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let s=0;s<this.size;s++){let d=!1,c=0,y=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[s][p]==d?(c++,c==5?e+=o.PENALTY_N1:c>5&&e++):(this.finderPenaltyAddHistory(c,y),d||(e+=this.finderPenaltyCountPatterns(y)*o.PENALTY_N3),d=this.modules[s][p],c=1);e+=this.finderPenaltyTerminateAndCount(d,c,y)*o.PENALTY_N3}for(let s=0;s<this.size;s++){let d=!1,c=0,y=[0,0,0,0,0,0,0];for(let p=0;p<this.size;p++)this.modules[p][s]==d?(c++,c==5?e+=o.PENALTY_N1:c>5&&e++):(this.finderPenaltyAddHistory(c,y),d||(e+=this.finderPenaltyCountPatterns(y)*o.PENALTY_N3),d=this.modules[p][s],c=1);e+=this.finderPenaltyTerminateAndCount(d,c,y)*o.PENALTY_N3}for(let s=0;s<this.size-1;s++)for(let d=0;d<this.size-1;d++){const c=this.modules[s][d];c==this.modules[s][d+1]&&c==this.modules[s+1][d]&&c==this.modules[s+1][d+1]&&(e+=o.PENALTY_N2)}let t=0;for(const s of this.modules)t=s.reduce((d,c)=>d+(c?1:0),t);const r=this.size*this.size,n=Math.ceil(Math.abs(t*20-r*10)/r)-1;return m(0<=n&&n<=9),e+=n*o.PENALTY_N4,m(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{const e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2;let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<o.MIN_VERSION||e>o.MAX_VERSION)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return m(208<=t&&t<=29648),t}static getNumDataCodewords(e,t){return Math.floor(o.getNumRawDataModules(e)/8)-o.ECC_CODEWORDS_PER_BLOCK[t.ordinal][e]*o.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let r=1;for(let n=0;n<e;n++){for(let s=0;s<t.length;s++)t[s]=o.reedSolomonMultiply(t[s],r),s+1<t.length&&(t[s]^=t[s+1]);r=o.reedSolomonMultiply(r,2)}return t}static reedSolomonComputeRemainder(e,t){let r=t.map(n=>0);for(const n of e){const s=n^r.shift();r.push(0),t.forEach((d,c)=>r[c]^=o.reedSolomonMultiply(d,s))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return m(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];m(t<=this.size*3);const r=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(r&&e[0]>=t*4&&e[6]>=t?1:0)+(r&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};let u=o;u.MIN_VERSION=1,u.MAX_VERSION=40,u.PENALTY_N1=3,u.PENALTY_N2=3,u.PENALTY_N3=40,u.PENALTY_N4=10,u.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],u.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],i.QrCode=u;function l(e,t,r){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function E(e,t){return(e>>>t&1)!=0}function m(e){if(!e)throw new Error("Assertion error")}const C=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(const r of e)l(r,8,t);return new C(C.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!C.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let r=0;r<e.length;){const n=Math.min(e.length-r,3);l(parseInt(e.substr(r,n),10),n*3+1,t),r+=n}return new C(C.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!C.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t=[],r;for(r=0;r+2<=e.length;r+=2){let n=C.ALPHANUMERIC_CHARSET.indexOf(e.charAt(r))*45;n+=C.ALPHANUMERIC_CHARSET.indexOf(e.charAt(r+1)),l(n,11,t)}return r<e.length&&l(C.ALPHANUMERIC_CHARSET.indexOf(e.charAt(r)),6,t),new C(C.Mode.ALPHANUMERIC,e.length,t)}static makeSegments(e){return e==""?[]:C.isNumeric(e)?[C.makeNumeric(e)]:C.isAlphanumeric(e)?[C.makeAlphanumeric(e)]:[C.makeBytes(C.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)l(e,8,t);else if(e<16384)l(2,2,t),l(e,14,t);else if(e<1e6)l(6,3,t),l(e,21,t);else throw new RangeError("ECI assignment value out of range");return new C(C.Mode.ECI,0,t)}static isNumeric(e){return C.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return C.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const s=n.mode.numCharCountBits(t);if(n.numChars>=1<<s)return 1/0;r+=4+s+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)e.charAt(r)!="%"?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substr(r+1,2),16)),r+=2);return t}};let P=C;P.NUMERIC_REGEX=/^[0-9]*$/,P.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,P.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",i.QrSegment=P})(a||(a={})),(i=>{let o;(u=>{const l=class{constructor(m,C){this.ordinal=m,this.formatBits=C}};let E=l;E.LOW=new l(0,1),E.MEDIUM=new l(1,0),E.QUARTILE=new l(2,3),E.HIGH=new l(3,2),u.Ecc=E})(o=i.QrCode||(i.QrCode={}))})(a||(a={})),(i=>{let o;(u=>{const l=class{constructor(m,C){this.modeBits=m,this.numBitsCharCount=C}numCharCountBits(m){return this.numBitsCharCount[Math.floor((m+7)/17)]}};let E=l;E.NUMERIC=new l(1,[10,12,14]),E.ALPHANUMERIC=new l(2,[9,11,13]),E.BYTE=new l(4,[8,16,16]),E.KANJI=new l(8,[8,10,12]),E.ECI=new l(7,[0,0,0]),u.Mode=E})(o=i.QrSegment||(i.QrSegment={}))})(a||(a={}));var M=a;var x={L:M.QrCode.Ecc.LOW,M:M.QrCode.Ecc.MEDIUM,Q:M.QrCode.Ecc.QUARTILE,H:M.QrCode.Ecc.HIGH},v=128,R="L",A="#FFFFFF",z="#000000",ne=!1,U=4,Y=.1;function ee(i,o=0){const u=[];return i.forEach(function(l,E){let m=null;l.forEach(function(C,P){if(!C&&m!==null){u.push(`M${m+o} ${E+o}h${P-m}v1H${m+o}z`),m=null;return}if(P===l.length-1){if(!C)return;m===null?u.push(`M${P+o},${E+o} h1v1H${P+o}z`):u.push(`M${m+o},${E+o} h${P+1-m}v1H${m+o}z`);return}C&&m===null&&(m=P)})}),u.join("")}function te(i,o){return i.slice().map((u,l)=>l<o.y||l>=o.y+o.h?u:u.map((E,m)=>m<o.x||m>=o.x+o.w?E:!1))}function oe(i,o,u,l){if(l==null)return null;const E=u?U:0,m=i.length+E*2,C=Math.floor(o*Y),P=m/o,e=(l.width||C)*P,t=(l.height||C)*P,r=l.x==null?i.length/2-e/2:l.x*P,n=l.y==null?i.length/2-t/2:l.y*P;let s=null;if(l.excavate){let d=Math.floor(r),c=Math.floor(n),y=Math.ceil(e+r-d),p=Math.ceil(t+n-c);s={x:d,y:c,w:y,h:p}}return{x:r,y:n,h:t,w:e,excavation:s}}var J=function(){try{new Path2D().addPath(new Path2D)}catch(i){return!1}return!0}();function Pe(i){const o=i,{value:u,size:l=v,level:E=R,bgColor:m=A,fgColor:C=z,includeMargin:P=ne,style:e,imageSettings:t}=o,r=ie(o,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),n=t==null?void 0:t.src,s=(0,S.useRef)(null),d=(0,S.useRef)(null),[c,y]=(0,S.useState)(!1);(0,S.useEffect)(()=>{if(s.current!=null){const N=s.current,h=N.getContext("2d");if(!h)return;let w=M.QrCode.encodeText(u,x[E]).getModules();const B=P?U:0,G=w.length+B*2,L=oe(w,l,P,t),W=d.current,xe=L!=null&&W!==null&&W.complete&&W.naturalHeight!==0&&W.naturalWidth!==0;xe&&L.excavation!=null&&(w=te(w,L.excavation));const we=window.devicePixelRatio||1;N.height=N.width=l*we;const Ne=l/G*we;h.scale(Ne,Ne),h.fillStyle=m,h.fillRect(0,0,G,G),h.fillStyle=C,J?h.fill(new Path2D(ee(w,B))):w.forEach(function(Oe,We){Oe.forEach(function(Ye,Xe){Ye&&h.fillRect(Xe+B,We+B,1,1)})}),xe&&h.drawImage(W,L.x+B,L.y+B,L.w,L.h)}}),(0,S.useEffect)(()=>{y(!1)},[n]);const p=_({height:l,width:l},e);let k=null;return n!=null&&(k=S.createElement("img",{src:n,key:n,style:{display:"none"},onLoad:()=>{y(!0)},ref:d})),S.createElement(S.Fragment,null,S.createElement("canvas",_({style:p,height:l,width:l,ref:s},r)),k)}function Me(i){const o=i,{value:u,size:l=v,level:E=R,bgColor:m=A,fgColor:C=z,includeMargin:P=ne,imageSettings:e}=o,t=ie(o,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let r=M.QrCode.encodeText(u,x[E]).getModules();const n=P?U:0,s=r.length+n*2,d=oe(r,l,P,e);let c=null;e!=null&&d!=null&&(d.excavation!=null&&(r=te(r,d.excavation)),c=S.createElement("image",{xlinkHref:e.src,height:d.h,width:d.w,x:d.x+n,y:d.y+n,preserveAspectRatio:"none"}));const y=ee(r,n);return S.createElement("svg",_({height:l,width:l,viewBox:`0 0 ${s} ${s}`},t),S.createElement("path",{fill:m,d:`M0,0 h${s}v${s}H0z`,shapeRendering:"crispEdges"}),S.createElement("path",{fill:C,d:y,shapeRendering:"crispEdges"}),c)}var Ve=i=>{const o=i,{renderAs:u}=o,l=ie(o,["renderAs"]);return u==="svg"?React.createElement(Me,_({},l)):React.createElement(Pe,_({},l))},Q=f(71577),ce=f(53124),ze=f(10110),H=f(75081),De=f(9361),Ze=f(14747),Ue=f(67968),de=f(45503);const Qe=i=>{const{componentCls:o}=i;return{[o]:Object.assign(Object.assign({},(0,Ze.Wf)(i)),{display:"flex",justifyContent:"center",alignItems:"center",padding:i.paddingSM,backgroundColor:i.colorWhite,borderRadius:i.borderRadiusLG,border:`${i.lineWidth}px ${i.lineType} ${i.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${o}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:i.colorText,lineHeight:i.lineHeight,background:i.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${o}-expired`]:{color:i.QRCodeExpiredTextColor}},"&-icon":{marginBlockEnd:i.marginXS,fontSize:i.controlHeight}}),[`${o}-borderless`]:{borderColor:"transparent"}}};var He=(0,Ue.Z)("QRCode",i=>Qe((0,de.TS)(i,{QRCodeExpiredTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"})));const{useToken:Ie}=De.Z;var ue=i=>{const{token:o}=Ie(),{value:u,type:l="canvas",icon:E="",size:m=160,iconSize:C=40,color:P=o.colorText,errorLevel:e="M",status:t="active",bordered:r=!0,onRefresh:n,style:s,className:d,rootClassName:c,prefixCls:y,bgColor:p="transparent"}=i,{getPrefixCls:k}=(0,S.useContext)(ce.E_),N=k("qrcode",y),[h,w]=He(N),B={src:E,x:void 0,y:void 0,height:C,width:C,excavate:!0},G={value:u,size:m-(o.paddingSM+o.lineWidth)*2,level:e,bgColor:p,fgColor:P,imageSettings:E?B:void 0},[L]=(0,ze.Z)("QRCode");if(!u)return null;const W=Se()(N,d,c,w,{[`${N}-borderless`]:!r});return h(S.createElement("div",{style:Object.assign(Object.assign({},s),{width:m,height:m,backgroundColor:p}),className:W},t!=="active"&&S.createElement("div",{className:`${N}-mask`},t==="loading"&&S.createElement(H.Z,null),t==="expired"&&S.createElement(S.Fragment,null,S.createElement("p",{className:`${N}-expired`},L==null?void 0:L.expired),n&&S.createElement(Q.ZP,{type:"link",icon:S.createElement(je,null),onClick:n},L==null?void 0:L.refresh))),l==="canvas"?S.createElement(Pe,Object.assign({},G)):S.createElement(Me,Object.assign({},G))))},he=f(86738),se=f(45360),ke=f(5914),Ge=f(51904),fe=f(12096),qe=f(37798),_e=f(97857),me=f.n(_e),X=f(12578),ge={Add:function(o){return(0,X.request)("/api/bucketinfo/add",{method:"POST",data:me()({},o)})},Del:function(o){return(0,X.request)("/api/bucketinfo/del",{method:"POST",data:me()({},o)})},Update:function(o){return(0,X.request)("/api/bucketinfo/update",{method:"POST",data:me()({},o)})},Detail:function(o){return(0,X.request)("/api/bucketinfo/detail?id=".concat(o),{method:"GET"})},List:function(){return(0,X.request)("/api/bucketinfo/list",{method:"POST"})},UnBindList:function(){return(0,X.request)("/api/bucketinfo/UnBindList",{method:"GET"})},PagedList:function(o){return(0,X.request)("/api/bucketinfo/pagedlist",{method:"POST",data:me()({},o)})},BatchUpdate:function(o){return(0,X.request)("/api/bucketrecipe/batchupdate",{method:"POST",data:o})},RecipeList:function(o){return(0,X.request)("api/bucketrecipe/list",{method:"POST",data:{bucketId:o}})},materialtrecored:function(o){return(0,X.request)("/api/bucketmaterialsrecord/pagedlist",{method:"POST",data:me()({},o)})}},g=f(85893),et=function(){var o=K.Z.useForm(),u=V()(o,1),l=u[0],E=(0,S.useState)(),m=V()(E,2),C=m[0],P=m[1],e=(0,S.useState)(!1),t=V()(e,2),r=t[0],n=t[1],s=(0,S.useRef)(),d=(0,S.useState)(!1),c=V()(d,2),y=c[0],p=c[1],k=(0,S.useState)({id:"",name:"",code:""}),N=V()(k,2),h=N[0],w=N[1],B=(0,S.useState)(!1),G=V()(B,2),L=G[0],W=G[1],xe=[{title:"id",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u6876\u540D\u79F0",dataIndex:"name",ellipsis:!0,align:"center"},{title:"\u6876\u7F16\u53F7",dataIndex:"code",hideInSearch:!0,ellipsis:!0,align:"center"},{title:"\u5F53\u524D\u539F\u6599",dataIndex:"materialName",ellipsis:!0,hideInSearch:!0,align:"center"},{title:"\u6876\u4E8C\u7EF4\u7801",dataIndex:"type",align:"center",ellipsis:!0,hideInSearch:!0,width:160,render:function(D,j){return(0,g.jsxs)("div",{className:"qrcodebox",children:[(0,g.jsx)("div",{id:"myqrcode",children:(0,g.jsx)(ue,{size:120,bordered:!1,value:j.code})}),(0,g.jsx)("a",{onClick:function(){var I,T=(I=document.getElementById("myqrcode"))===null||I===void 0?void 0:I.querySelector("canvas");if(T){var b=T.toDataURL(),ae=document.createElement("a");ae.download="QRCode.png",ae.href=b,document.body.appendChild(ae),ae.click(),document.body.removeChild(ae)}},children:"\u4E0B\u8F7D"})]})}},{title:"\u6876\u7C7B\u578B",dataIndex:"lx",ellipsis:!0,align:"center",hideInSearch:!0},{title:"\u6876\u5BB9\u79EF",dataIndex:"rj",align:"center",ellipsis:!0,hideInSearch:!0},{title:"\u64CD\u4F5C",valueType:"option",key:"option",width:220,render:function(D,j){return[(0,g.jsx)(Q.ZP,{type:"primary",ghost:!0,className:"btn1",onClick:O()(Z()().mark(function F(){var I;return Z()().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:n(!0),P("\u7F16\u8F91\u4FE1\u606F"),I=JSON.parse(JSON.stringify(j)),console.log(I),I.state=I.state==="0",l.setFieldsValue(I);case 6:case"end":return b.stop()}},F)})),children:"\u7F16\u8F91"},"edit"),(0,g.jsx)(Q.ZP,{type:"primary",ghost:!0,className:"btn2",onClick:O()(Z()().mark(function F(){return Z()().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return W(!0),w(j),T.next=4,Xe(j);case 4:case"end":return T.stop()}},F)})),children:"\u8BB0\u5F55"},"jl"),(0,g.jsx)(he.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){var I={id:j.id,name:"",code:""};ge.Del(I).then(function(T){if(T.statusCode===200){var b;se.ZP.success(T.statusCode===200?"\u5220\u9664\u6210\u529F":T.message),(b=s.current)===null||b===void 0||b.reload()}})},onCancel:function(){se.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,g.jsx)(Q.ZP,{type:"primary",danger:!0,ghost:!0,className:"btn3",children:"\u5220\u9664"})},"del")]}}],we=[{title:"",dataIndex:"id",render:function(){return null}},{title:"\u5DE5\u5355ID",dataIndex:"code",align:"center"},{title:"\u5DE5\u5355\u540D\u79F0",dataIndex:"name",align:"center",ellipsis:!0},{title:"\u539F\u6599",dataIndex:"materialName",align:"center"},{title:"\u539F\u6599\u91CD\u91CF",dataIndex:"age2",align:"center"},{title:"\u65F6\u95F4",dataIndex:"createTime",align:"center"}],Ne=(0,S.useState)(),Oe=V()(Ne,2),We=Oe[0],Ye=Oe[1],Xe=function(){var $=O()(Z()().mark(function D(j){var F,I;return Z()().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return F={pageIndex:1,pageSize:10,bucketId:j.id},b.prev=1,b.next=4,ge.materialtrecored(F);case 4:I=b.sent,I.statusCode===200&&(console.log(I),Ye(I.data.items)),b.next=11;break;case 8:b.prev=8,b.t0=b.catch(1),console.error("Error fetching data:",b.t0);case 11:case"end":return b.stop()}},D,null,[[1,8]])}));return function(j){return $.apply(this,arguments)}}(),rt=function(){var $=O()(Z()().mark(function D(j){var F,I,T,b;return Z()().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(!j.id){q.next=7;break}return q.next=3,ge.Update(j);case 3:F=q.sent,F.statusCode===200?(se.ZP.success("\u4FEE\u6539\u6210\u529F"),(I=s.current)===null||I===void 0||I.reload(),n(!1)):se.ZP.error(JSON.stringify(F.errors)||"\u4FEE\u6539\u5931\u8D25"),q.next=12;break;case 7:return q.next=9,ge.Add(j);case 9:T=q.sent,console.log("response",T),T.statusCode===200?(se.ZP.success("\u6DFB\u52A0\u6210\u529F"),(b=s.current)===null||b===void 0||b.reload(),n(!1)):se.ZP.error(JSON.stringify(T.errors)||"\u6DFB\u52A0\u5931\u8D25");case 12:case"end":return q.stop()}},D)}));return function(j){return $.apply(this,arguments)}}();return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Ee.Z,{columns:xe,actionRef:s,cardBordered:!0,request:O()(Z()().mark(function $(){var D,j,F,I=arguments;return Z()().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return D=I.length>0&&I[0]!==void 0?I[0]:{},j={pageIndex:D.current||1,pageSize:D.pageSize||10,name:D.name||"",id:"",code:""},b.next=4,ge.PagedList(j);case 4:if(F=b.sent,F.statusCode!==200){b.next=9;break}return b.abrupt("return",{data:F.data.items,success:!0,total:F.data.total});case 9:return b.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return b.stop()}},$)})),rowKey:"id",pagination:{pageSize:10,showSizeChanger:!1},dateFormatter:"string",headerTitle:"\u6876\u5217\u8868",toolBarRender:function(){return[(0,g.jsx)(Q.ZP,{type:"primary",onClick:function(){l.resetFields(),n(!0),P("\u65B0\u589E\u6876")},children:"\u65B0\u589E\u6876"},"button")]}},"myTable"),(0,g.jsx)(ke.Z,{maskClosable:!1,width:800,title:(0,g.jsx)(Ge.Z,{color:"#cd201f",children:C}),open:r,onCancel:function(){n(!1)},footer:[(0,g.jsx)(Q.ZP,{onClick:function(){n(!1)},children:"\u8FD4\u56DE"},"back"),(0,g.jsx)(Q.ZP,{form:"bucketForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,g.jsxs)(K.Z,{form:l,name:"basic",id:"bucketForm",wrapperCol:{span:12},onFinish:rt,autoComplete:"off",children:[(0,g.jsx)(K.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,g.jsx)(fe.Z,{})}),(0,g.jsx)(K.Z.Item,{label:"\u6876\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,g.jsx)(fe.Z,{})}),(0,g.jsx)(K.Z.Item,{label:"\u6876\u7F16\u53F7",name:"code",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,g.jsx)(fe.Z,{})}),(0,g.jsx)(K.Z.Item,{label:"\u6876\u7C7B\u578B",name:"lx",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,g.jsx)(fe.Z,{})}),(0,g.jsx)(K.Z.Item,{label:"\u6876\u5BB9\u79EF",name:"rj",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,g.jsx)(fe.Z,{})})]})},"01"),(0,g.jsx)(ke.Z,{maskClosable:!1,width:400,title:(0,g.jsx)(Ge.Z,{color:"#cd201f",children:"\u4E8C\u7EF4\u7801"}),open:y,onCancel:function(){p(!1)},footer:[(0,g.jsx)(Q.ZP,{onClick:function(){p(!1)},children:"\u8FD4\u56DE"},"back")],children:(0,g.jsxs)("div",{className:"container",children:[(0,g.jsxs)("div",{className:"left",children:[(0,g.jsxs)("div",{children:["\u6876\u7F16\u53F7 : ",h==null?void 0:h.code]}),(0,g.jsxs)("div",{children:["\u6876\u540D\u79F0 : ",h==null?void 0:h.name]}),(0,g.jsx)("div",{children:"\u5F53\u524D\u539F\u6599 : "})]}),(0,g.jsx)("div",{className:"right",children:(0,g.jsx)("div",{id:"myqrcode",children:(0,g.jsx)(ue,{value:h==null?void 0:h.code,style:{border:"none"}})})})]})},"xzModal"),(0,g.jsx)(ke.Z,{maskClosable:!1,width:800,title:(0,g.jsx)(Ge.Z,{color:"#cd201f",children:"\u6876\u8BB0\u5F55"}),open:L,onCancel:function(){W(!1)},footer:[(0,g.jsx)(Q.ZP,{onClick:function(){W(!1)},children:"\u8FD4\u56DE"},"back")],children:(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{children:["\u6876\u7F16\u53F7 : ",h==null?void 0:h.code," "]}),(0,g.jsxs)("div",{children:["\u6876\u540D\u79F0 :",h==null?void 0:h.name," "]}),(0,g.jsx)(qe.Z,{columns:we,dataSource:We})]})},"tjl01")]})},tt=et},51904:function(Je,Ce,f){f.d(Ce,{Z:function(){return ie}});var Ae=f(62208),Z=f(94184),pe=f.n(Z),O=f(67294),ve=f(98787),V=f(45353),Ee=f(53124);function K(a){return typeof a!="string"?a:a.charAt(0).toUpperCase()+a.slice(1)}var Te=f(14747),S=f(98719),Fe=f(67968),Be=f(45503);const re=(a,M,x)=>{const v=K(x);return{[`${a.componentCls}-${M}`]:{color:a[`color${x}`],background:a[`color${v}Bg`],borderColor:a[`color${v}Border`],[`&${a.componentCls}-borderless`]:{borderColor:"transparent"}}}},je=a=>(0,S.Z)(a,(M,x)=>{let{textColor:v,lightBorderColor:R,lightColor:A,darkColor:z}=x;return{[`${a.componentCls}-${M}`]:{color:v,background:A,borderColor:R,"&-inverse":{color:a.colorTextLightSolid,background:z,borderColor:z},[`&${a.componentCls}-borderless`]:{borderColor:"transparent"}}}}),Le=a=>{const{paddingXXS:M,lineWidth:x,tagPaddingHorizontal:v,componentCls:R}=a,A=v-x,z=M-x;return{[R]:Object.assign(Object.assign({},(0,Te.Wf)(a)),{display:"inline-block",height:"auto",marginInlineEnd:a.marginXS,paddingInline:A,fontSize:a.tagFontSize,lineHeight:a.tagLineHeight,whiteSpace:"nowrap",background:a.defaultBg,border:`${a.lineWidth}px ${a.lineType} ${a.colorBorder}`,borderRadius:a.borderRadiusSM,opacity:1,transition:`all ${a.motionDurationMid}`,textAlign:"start",[`&${R}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:a.defaultColor},[`${R}-close-icon`]:{marginInlineStart:z,color:a.colorTextDescription,fontSize:a.tagIconSize,cursor:"pointer",transition:`all ${a.motionDurationMid}`,"&:hover":{color:a.colorTextHeading}},[`&${R}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${a.iconCls}-close, ${a.iconCls}-close:hover`]:{color:a.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${R}-checkable-checked):hover`]:{color:a.colorPrimary,backgroundColor:a.colorFillSecondary},"&:active, &-checked":{color:a.colorTextLightSolid},"&-checked":{backgroundColor:a.colorPrimary,"&:hover":{backgroundColor:a.colorPrimaryHover}},"&:active":{backgroundColor:a.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${a.iconCls} + span, > span + ${a.iconCls}`]:{marginInlineStart:A}}),[`${R}-borderless`]:{borderColor:"transparent",background:a.tagBorderlessBg}}};var Se=(0,Fe.Z)("Tag",a=>{const{lineWidth:M,fontSizeIcon:x}=a,v=a.fontSizeSM,R=`${a.lineHeightSM*v}px`,A=(0,Be.TS)(a,{tagFontSize:v,tagLineHeight:R,tagIconSize:x-2*M,tagPaddingHorizontal:8,tagBorderlessBg:a.colorFillTertiary});return[Le(A),je(A),re(A,"success","Success"),re(A,"processing","Info"),re(A,"error","Error"),re(A,"warning","Warning")]},a=>({defaultBg:a.colorFillQuaternary,defaultColor:a.colorText})),$e=function(a,M){var x={};for(var v in a)Object.prototype.hasOwnProperty.call(a,v)&&M.indexOf(v)<0&&(x[v]=a[v]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,v=Object.getOwnPropertySymbols(a);R<v.length;R++)M.indexOf(v[R])<0&&Object.prototype.propertyIsEnumerable.call(a,v[R])&&(x[v[R]]=a[v[R]]);return x},ye=a=>{const{prefixCls:M,className:x,checked:v,onChange:R,onClick:A}=a,z=$e(a,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:ne}=O.useContext(Ee.E_),U=J=>{R==null||R(!v),A==null||A(J)},Y=ne("tag",M),[ee,te]=Se(Y),oe=pe()(Y,{[`${Y}-checkable`]:!0,[`${Y}-checkable-checked`]:v},x,te);return ee(O.createElement("span",Object.assign({},z,{className:oe,onClick:U})))},be=function(a,M){var x={};for(var v in a)Object.prototype.hasOwnProperty.call(a,v)&&M.indexOf(v)<0&&(x[v]=a[v]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,v=Object.getOwnPropertySymbols(a);R<v.length;R++)M.indexOf(v[R])<0&&Object.prototype.propertyIsEnumerable.call(a,v[R])&&(x[v[R]]=a[v[R]]);return x};const Re=(a,M)=>{const{prefixCls:x,className:v,rootClassName:R,style:A,children:z,icon:ne,color:U,onClose:Y,closeIcon:ee,closable:te=!1,bordered:oe=!0}=a,J=be(a,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Pe,direction:Me}=O.useContext(Ee.E_),[Ve,Q]=O.useState(!0);O.useEffect(()=>{"visible"in J&&Q(J.visible)},[J.visible]);const ce=(0,ve.o2)(U)||(0,ve.yT)(U),ze=Object.assign({backgroundColor:U&&!ce?U:void 0},A),H=Pe("tag",x),[De,Ze]=Se(H),Ue=pe()(H,{[`${H}-${U}`]:ce,[`${H}-has-color`]:U&&!ce,[`${H}-hidden`]:!Ve,[`${H}-rtl`]:Me==="rtl",[`${H}-borderless`]:!oe},v,R,Ze),de=he=>{he.stopPropagation(),Y==null||Y(he),!he.defaultPrevented&&Q(!1)},Qe=O.useMemo(()=>te?ee?O.createElement("span",{className:`${H}-close-icon`,onClick:de},ee):O.createElement(Ae.Z,{className:`${H}-close-icon`,onClick:de}):null,[te,ee,H,de]),He=typeof J.onClick=="function"||z&&z.type==="a",Ie=ne||null,Ke=Ie?O.createElement(O.Fragment,null,Ie,O.createElement("span",null,z)):z,ue=O.createElement("span",Object.assign({},J,{ref:M,className:Ue,style:ze}),Ke,Qe);return De(He?O.createElement(V.Z,null,ue):ue)},_=O.forwardRef(Re);_.CheckableTag=ye;var ie=_}}]);