12345678 |
- import{g as Ct,q as Et,c as _t,u as bt,d as Bt}from"./goodsLend-DfV8fz7M.js";import{P as vt}from"./print-B1R8CqW6.js";import{g as At,a as Tt}from"./setting-CO6n2wVB.js";import{r as D,a as ne,o as It,I as Nt,f as G,i as _,w as B,p as St,m as Lt,n as Pt,l as L,q as M,h as oe,x as j,s as V,y as Y,v as ye,F as Ce,t as Ee,E as le,O as Mt}from"./index-JAEh4X-P.js";var q={},Rt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Ke={},R={};let Le;const kt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];R.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};R.getSymbolTotalCodewords=function(e){return kt[e]};R.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};R.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Le=e};R.isKanjiModeEnabled=function(){return typeof Le<"u"};R.toSJIS=function(e){return Le(e)};var ge={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+i)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,o){if(t.isValid(r))return r;try{return e(r)}catch{return o}}})(ge);function Oe(){this.buffer=[],this.length=0}Oe.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let i=0;i<e;i++)this.putBit((t>>>e-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Dt=Oe;function se(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}se.prototype.set=function(t,e,i,r){const o=t*this.size+e;this.data[o]=i,r&&(this.reservedBit[o]=!0)};se.prototype.get=function(t,e){return this.data[t*this.size+e]};se.prototype.xor=function(t,e,i){this.data[t*this.size+e]^=i};se.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var Ut=se,Je={};(function(t){const e=R.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,n=e(r),s=n===145?26:Math.ceil((n-13)/(2*o-2))*2,l=[n-7];for(let a=1;a<o-1;a++)l[a]=l[a-1]-s;return l.push(6),l.reverse()},t.getPositions=function(r){const o=[],n=t.getRowColCoords(r),s=n.length;for(let l=0;l<s;l++)for(let a=0;a<s;a++)l===0&&a===0||l===0&&a===s-1||l===s-1&&a===0||o.push([n[l],n[a]]);return o}})(Je);var $e={};const Ft=R.getSymbolSize,Ve=7;$e.getPositions=function(e){const i=Ft(e);return[[0,0],[i-Ve,0],[0,i-Ve]]};var je={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},t.from=function(o){return t.isValid(o)?parseInt(o,10):void 0},t.getPenaltyN1=function(o){const n=o.size;let s=0,l=0,a=0,u=null,c=null;for(let v=0;v<n;v++){l=a=0,u=c=null;for(let m=0;m<n;m++){let g=o.get(v,m);g===u?l++:(l>=5&&(s+=e.N1+(l-5)),u=g,l=1),g=o.get(m,v),g===c?a++:(a>=5&&(s+=e.N1+(a-5)),c=g,a=1)}l>=5&&(s+=e.N1+(l-5)),a>=5&&(s+=e.N1+(a-5))}return s},t.getPenaltyN2=function(o){const n=o.size;let s=0;for(let l=0;l<n-1;l++)for(let a=0;a<n-1;a++){const u=o.get(l,a)+o.get(l,a+1)+o.get(l+1,a)+o.get(l+1,a+1);(u===4||u===0)&&s++}return s*e.N2},t.getPenaltyN3=function(o){const n=o.size;let s=0,l=0,a=0;for(let u=0;u<n;u++){l=a=0;for(let c=0;c<n;c++)l=l<<1&2047|o.get(u,c),c>=10&&(l===1488||l===93)&&s++,a=a<<1&2047|o.get(c,u),c>=10&&(a===1488||a===93)&&s++}return s*e.N3},t.getPenaltyN4=function(o){let n=0;const s=o.data.length;for(let a=0;a<s;a++)n+=o.data[a];return Math.abs(Math.ceil(n*100/s/5)-10)*e.N4};function i(r,o,n){switch(r){case t.Patterns.PATTERN000:return(o+n)%2===0;case t.Patterns.PATTERN001:return o%2===0;case t.Patterns.PATTERN010:return n%3===0;case t.Patterns.PATTERN011:return(o+n)%3===0;case t.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(n/3))%2===0;case t.Patterns.PATTERN101:return o*n%2+o*n%3===0;case t.Patterns.PATTERN110:return(o*n%2+o*n%3)%2===0;case t.Patterns.PATTERN111:return(o*n%3+(o+n)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(o,n){const s=n.size;for(let l=0;l<s;l++)for(let a=0;a<s;a++)n.isReserved(a,l)||n.xor(a,l,i(o,a,l))},t.getBestMask=function(o,n){const s=Object.keys(t.Patterns).length;let l=0,a=1/0;for(let u=0;u<s;u++){n(u),t.applyMask(u,o);const c=t.getPenaltyN1(o)+t.getPenaltyN2(o)+t.getPenaltyN3(o)+t.getPenaltyN4(o);t.applyMask(u,o),c<a&&(a=c,l=u)}return l}})(je);var he={};const K=ge,ue=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],ce=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];he.getBlocksCount=function(e,i){switch(i){case K.L:return ue[(e-1)*4+0];case K.M:return ue[(e-1)*4+1];case K.Q:return ue[(e-1)*4+2];case K.H:return ue[(e-1)*4+3];default:return}};he.getTotalCodewordsCount=function(e,i){switch(i){case K.L:return ce[(e-1)*4+0];case K.M:return ce[(e-1)*4+1];case K.Q:return ce[(e-1)*4+2];case K.H:return ce[(e-1)*4+3];default:return}};var Ge={},me={};const re=new Uint8Array(512),de=new Uint8Array(256);(function(){let e=1;for(let i=0;i<255;i++)re[i]=e,de[e]=i,e<<=1,e&256&&(e^=285);for(let i=255;i<512;i++)re[i]=re[i-255]})();me.log=function(e){if(e<1)throw new Error("log("+e+")");return de[e]};me.exp=function(e){return re[e]};me.mul=function(e,i){return e===0||i===0?0:re[de[e]+de[i]]};(function(t){const e=me;t.mul=function(r,o){const n=new Uint8Array(r.length+o.length-1);for(let s=0;s<r.length;s++)for(let l=0;l<o.length;l++)n[s+l]^=e.mul(r[s],o[l]);return n},t.mod=function(r,o){let n=new Uint8Array(r);for(;n.length-o.length>=0;){const s=n[0];for(let a=0;a<o.length;a++)n[a]^=e.mul(o[a],s);let l=0;for(;l<n.length&&n[l]===0;)l++;n=n.slice(l)}return n},t.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let n=0;n<r;n++)o=t.mul(o,new Uint8Array([1,e.exp(n)]));return o}})(Ge);const Ye=Ge;function Pe(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Pe.prototype.initialize=function(e){this.degree=e,this.genPoly=Ye.generateECPolynomial(this.degree)};Pe.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(e.length+this.degree);i.set(e);const r=Ye.mod(i,this.genPoly),o=this.degree-r.length;if(o>0){const n=new Uint8Array(this.degree);return n.set(r,o),n}return r};var Vt=Pe,qe={},O={},Me={};Me.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var z={};const Qe="[0-9]+",zt="[A-Z $%*+\\-./:]+";let ie="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ie=ie.replace(/u/g,"\\u");const Ht="(?:(?![A-Z0-9 $%*+\\-./:]|"+ie+`)(?:.|[\r
- ]))+`;z.KANJI=new RegExp(ie,"g");z.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");z.BYTE=new RegExp(Ht,"g");z.NUMERIC=new RegExp(Qe,"g");z.ALPHANUMERIC=new RegExp(zt,"g");const Kt=new RegExp("^"+ie+"$"),Ot=new RegExp("^"+Qe+"$"),Jt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");z.testKanji=function(e){return Kt.test(e)};z.testNumeric=function(e){return Ot.test(e)};z.testAlphanumeric=function(e){return Jt.test(e)};(function(t){const e=Me,i=z;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?n.ccBits[0]:s<27?n.ccBits[1]:n.ccBits[2]},t.getBestModeForData=function(n){return i.testNumeric(n)?t.NUMERIC:i.testAlphanumeric(n)?t.ALPHANUMERIC:i.testKanji(n)?t.KANJI:t.BYTE},t.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},t.isValid=function(n){return n&&n.bit&&n.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+o)}}t.from=function(n,s){if(t.isValid(n))return n;try{return r(n)}catch{return s}}})(O);(function(t){const e=R,i=he,r=ge,o=O,n=Me,s=7973,l=e.getBCHDigit(s);function a(m,g,p){for(let d=1;d<=40;d++)if(g<=t.getCapacity(d,p,m))return d}function u(m,g){return o.getCharCountIndicator(m,g)+4}function c(m,g){let p=0;return m.forEach(function(d){const N=u(d.mode,g);p+=N+d.getBitsLength()}),p}function v(m,g){for(let p=1;p<=40;p++)if(c(m,p)<=t.getCapacity(p,g,o.MIXED))return p}t.from=function(g,p){return n.isValid(g)?parseInt(g,10):p},t.getCapacity=function(g,p,d){if(!n.isValid(g))throw new Error("Invalid QR Code version");typeof d>"u"&&(d=o.BYTE);const N=e.getSymbolTotalCodewords(g),w=i.getTotalCodewordsCount(g,p),C=(N-w)*8;if(d===o.MIXED)return C;const h=C-u(d,g);switch(d){case o.NUMERIC:return Math.floor(h/10*3);case o.ALPHANUMERIC:return Math.floor(h/11*2);case o.KANJI:return Math.floor(h/13);case o.BYTE:default:return Math.floor(h/8)}},t.getBestVersionForData=function(g,p){let d;const N=r.from(p,r.M);if(Array.isArray(g)){if(g.length>1)return v(g,N);if(g.length===0)return 1;d=g[0]}else d=g;return a(d.mode,d.getLength(),N)},t.getEncodedBits=function(g){if(!n.isValid(g)||g<7)throw new Error("Invalid QR Code version");let p=g<<12;for(;e.getBCHDigit(p)-l>=0;)p^=s<<e.getBCHDigit(p)-l;return g<<12|p}})(qe);var xe={};const Te=R,We=1335,$t=21522,ze=Te.getBCHDigit(We);xe.getEncodedBits=function(e,i){const r=e.bit<<3|i;let o=r<<10;for(;Te.getBCHDigit(o)-ze>=0;)o^=We<<Te.getBCHDigit(o)-ze;return(r<<10|o)^$t};var Ze={};const jt=O;function Q(t){this.mode=jt.NUMERIC,this.data=t.toString()}Q.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Q.prototype.getLength=function(){return this.data.length};Q.prototype.getBitsLength=function(){return Q.getBitsLength(this.data.length)};Q.prototype.write=function(e){let i,r,o;for(i=0;i+3<=this.data.length;i+=3)r=this.data.substr(i,3),o=parseInt(r,10),e.put(o,10);const n=this.data.length-i;n>0&&(r=this.data.substr(i),o=parseInt(r,10),e.put(o,n*3+1))};var Gt=Q;const Yt=O,_e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function x(t){this.mode=Yt.ALPHANUMERIC,this.data=t}x.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};x.prototype.getLength=function(){return this.data.length};x.prototype.getBitsLength=function(){return x.getBitsLength(this.data.length)};x.prototype.write=function(e){let i;for(i=0;i+2<=this.data.length;i+=2){let r=_e.indexOf(this.data[i])*45;r+=_e.indexOf(this.data[i+1]),e.put(r,11)}this.data.length%2&&e.put(_e.indexOf(this.data[i]),6)};var qt=x,Qt=function(e){for(var i=[],r=e.length,o=0;o<r;o++){var n=e.charCodeAt(o);if(n>=55296&&n<=56319&&r>o+1){var s=e.charCodeAt(o+1);s>=56320&&s<=57343&&(n=(n-55296)*1024+s-56320+65536,o+=1)}if(n<128){i.push(n);continue}if(n<2048){i.push(n>>6|192),i.push(n&63|128);continue}if(n<55296||n>=57344&&n<65536){i.push(n>>12|224),i.push(n>>6&63|128),i.push(n&63|128);continue}if(n>=65536&&n<=1114111){i.push(n>>18|240),i.push(n>>12&63|128),i.push(n>>6&63|128),i.push(n&63|128);continue}i.push(239,191,189)}return new Uint8Array(i).buffer};const xt=Qt,Wt=O;function W(t){this.mode=Wt.BYTE,typeof t=="string"&&(t=xt(t)),this.data=new Uint8Array(t)}W.getBitsLength=function(e){return e*8};W.prototype.getLength=function(){return this.data.length};W.prototype.getBitsLength=function(){return W.getBitsLength(this.data.length)};W.prototype.write=function(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data[e],8)};var Zt=W;const Xt=O,en=R;function Z(t){this.mode=Xt.KANJI,this.data=t}Z.getBitsLength=function(e){return e*13};Z.prototype.getLength=function(){return this.data.length};Z.prototype.getBitsLength=function(){return Z.getBitsLength(this.data.length)};Z.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let i=en.toSJIS(this.data[e]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
- Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),t.put(i,13)}};var tn=Z,Xe={exports:{}};(function(t){var e={single_source_shortest_paths:function(i,r,o){var n={},s={};s[r]=0;var l=e.PriorityQueue.make();l.push(r,0);for(var a,u,c,v,m,g,p,d,N;!l.empty();){a=l.pop(),u=a.value,v=a.cost,m=i[u]||{};for(c in m)m.hasOwnProperty(c)&&(g=m[c],p=v+g,d=s[c],N=typeof s[c]>"u",(N||d>p)&&(s[c]=p,l.push(c,p),n[c]=u))}if(typeof o<"u"&&typeof s[o]>"u"){var w=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(w)}return n},extract_shortest_path_from_predecessor_list:function(i,r){for(var o=[],n=r;n;)o.push(n),i[n],n=i[n];return o.reverse(),o},find_path:function(i,r,o){var n=e.single_source_shortest_paths(i,r,o);return e.extract_shortest_path_from_predecessor_list(n,o)},PriorityQueue:{make:function(i){var r=e.PriorityQueue,o={},n;i=i||{};for(n in r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=i.sorter||r.default_sorter,o},default_sorter:function(i,r){return i.cost-r.cost},push:function(i,r){var o={value:i,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(Xe);var nn=Xe.exports;(function(t){const e=O,i=Gt,r=qt,o=Zt,n=tn,s=z,l=R,a=nn;function u(w){return unescape(encodeURIComponent(w)).length}function c(w,C,h){const f=[];let A;for(;(A=w.exec(h))!==null;)f.push({data:A[0],index:A.index,mode:C,length:A[0].length});return f}function v(w){const C=c(s.NUMERIC,e.NUMERIC,w),h=c(s.ALPHANUMERIC,e.ALPHANUMERIC,w);let f,A;return l.isKanjiModeEnabled()?(f=c(s.BYTE,e.BYTE,w),A=c(s.KANJI,e.KANJI,w)):(f=c(s.BYTE_KANJI,e.BYTE,w),A=[]),C.concat(h,f,A).sort(function(I,P){return I.index-P.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function m(w,C){switch(C){case e.NUMERIC:return i.getBitsLength(w);case e.ALPHANUMERIC:return r.getBitsLength(w);case e.KANJI:return n.getBitsLength(w);case e.BYTE:return o.getBitsLength(w)}}function g(w){return w.reduce(function(C,h){const f=C.length-1>=0?C[C.length-1]:null;return f&&f.mode===h.mode?(C[C.length-1].data+=h.data,C):(C.push(h),C)},[])}function p(w){const C=[];for(let h=0;h<w.length;h++){const f=w[h];switch(f.mode){case e.NUMERIC:C.push([f,{data:f.data,mode:e.ALPHANUMERIC,length:f.length},{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.ALPHANUMERIC:C.push([f,{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.KANJI:C.push([f,{data:f.data,mode:e.BYTE,length:u(f.data)}]);break;case e.BYTE:C.push([{data:f.data,mode:e.BYTE,length:u(f.data)}])}}return C}function d(w,C){const h={},f={start:{}};let A=["start"];for(let T=0;T<w.length;T++){const I=w[T],P=[];for(let U=0;U<I.length;U++){const k=I[U],H=""+T+U;P.push(H),h[H]={node:k,lastCount:0},f[H]={};for(let X=0;X<A.length;X++){const F=A[X];h[F]&&h[F].node.mode===k.mode?(f[F][H]=m(h[F].lastCount+k.length,k.mode)-m(h[F].lastCount,k.mode),h[F].lastCount+=k.length):(h[F]&&(h[F].lastCount=k.length),f[F][H]=m(k.length,k.mode)+4+e.getCharCountIndicator(k.mode,C))}}A=P}for(let T=0;T<A.length;T++)f[A[T]].end=0;return{map:f,table:h}}function N(w,C){let h;const f=e.getBestModeForData(w);if(h=e.from(C,f),h!==e.BYTE&&h.bit<f.bit)throw new Error('"'+w+'" cannot be encoded with mode '+e.toString(h)+`.
- Suggested mode is: `+e.toString(f));switch(h===e.KANJI&&!l.isKanjiModeEnabled()&&(h=e.BYTE),h){case e.NUMERIC:return new i(w);case e.ALPHANUMERIC:return new r(w);case e.KANJI:return new n(w);case e.BYTE:return new o(w)}}t.fromArray=function(C){return C.reduce(function(h,f){return typeof f=="string"?h.push(N(f,null)):f.data&&h.push(N(f.data,f.mode)),h},[])},t.fromString=function(C,h){const f=v(C,l.isKanjiModeEnabled()),A=p(f),T=d(A,h),I=a.find_path(T.map,"start","end"),P=[];for(let U=1;U<I.length-1;U++)P.push(T.table[I[U]].node);return t.fromArray(g(P))},t.rawSplit=function(C){return t.fromArray(v(C,l.isKanjiModeEnabled()))}})(Ze);const pe=R,be=ge,on=Dt,rn=Ut,sn=Je,an=$e,Ie=je,Ne=he,ln=Vt,fe=qe,un=xe,cn=O,Be=Ze;function dn(t,e){const i=t.size,r=an.getPositions(e);for(let o=0;o<r.length;o++){const n=r[o][0],s=r[o][1];for(let l=-1;l<=7;l++)if(!(n+l<=-1||i<=n+l))for(let a=-1;a<=7;a++)s+a<=-1||i<=s+a||(l>=0&&l<=6&&(a===0||a===6)||a>=0&&a<=6&&(l===0||l===6)||l>=2&&l<=4&&a>=2&&a<=4?t.set(n+l,s+a,!0,!0):t.set(n+l,s+a,!1,!0))}}function fn(t){const e=t.size;for(let i=8;i<e-8;i++){const r=i%2===0;t.set(i,6,r,!0),t.set(6,i,r,!0)}}function gn(t,e){const i=sn.getPositions(e);for(let r=0;r<i.length;r++){const o=i[r][0],n=i[r][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?t.set(o+s,n+l,!0,!0):t.set(o+s,n+l,!1,!0)}}function hn(t,e){const i=t.size,r=fe.getEncodedBits(e);let o,n,s;for(let l=0;l<18;l++)o=Math.floor(l/3),n=l%3+i-8-3,s=(r>>l&1)===1,t.set(o,n,s,!0),t.set(n,o,s,!0)}function ve(t,e,i){const r=t.size,o=un.getEncodedBits(e,i);let n,s;for(n=0;n<15;n++)s=(o>>n&1)===1,n<6?t.set(n,8,s,!0):n<8?t.set(n+1,8,s,!0):t.set(r-15+n,8,s,!0),n<8?t.set(8,r-n-1,s,!0):n<9?t.set(8,15-n-1+1,s,!0):t.set(8,15-n-1,s,!0);t.set(r-8,8,1,!0)}function mn(t,e){const i=t.size;let r=-1,o=i-1,n=7,s=0;for(let l=i-1;l>0;l-=2)for(l===6&&l--;;){for(let a=0;a<2;a++)if(!t.isReserved(o,l-a)){let u=!1;s<e.length&&(u=(e[s]>>>n&1)===1),t.set(o,l-a,u),n--,n===-1&&(s++,n=7)}if(o+=r,o<0||i<=o){o-=r,r=-r;break}}}function pn(t,e,i){const r=new on;i.forEach(function(a){r.put(a.mode.bit,4),r.put(a.getLength(),cn.getCharCountIndicator(a.mode,t)),a.write(r)});const o=pe.getSymbolTotalCodewords(t),n=Ne.getTotalCodewordsCount(t,e),s=(o-n)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const l=(s-r.getLengthInBits())/8;for(let a=0;a<l;a++)r.put(a%2?17:236,8);return wn(r,t,e)}function wn(t,e,i){const r=pe.getSymbolTotalCodewords(e),o=Ne.getTotalCodewordsCount(e,i),n=r-o,s=Ne.getBlocksCount(e,i),l=r%s,a=s-l,u=Math.floor(r/s),c=Math.floor(n/s),v=c+1,m=u-c,g=new ln(m);let p=0;const d=new Array(s),N=new Array(s);let w=0;const C=new Uint8Array(t.buffer);for(let I=0;I<s;I++){const P=I<a?c:v;d[I]=C.slice(p,p+P),N[I]=g.encode(d[I]),p+=P,w=Math.max(w,P)}const h=new Uint8Array(r);let f=0,A,T;for(A=0;A<w;A++)for(T=0;T<s;T++)A<d[T].length&&(h[f++]=d[T][A]);for(A=0;A<m;A++)for(T=0;T<s;T++)h[f++]=N[T][A];return h}function yn(t,e,i,r){let o;if(Array.isArray(t))o=Be.fromArray(t);else if(typeof t=="string"){let u=e;if(!u){const c=Be.rawSplit(t);u=fe.getBestVersionForData(c,i)}o=Be.fromString(t,u||40)}else throw new Error("Invalid data");const n=fe.getBestVersionForData(o,i);if(!n)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=n;else if(e<n)throw new Error(`
- The chosen QR Code version cannot contain this amount of data.
- Minimum version required to store current data is: `+n+`.
- `);const s=pn(e,i,o),l=pe.getSymbolSize(e),a=new rn(l);return dn(a,e),fn(a),gn(a,e),ve(a,i,0),e>=7&&hn(a,e),mn(a,s),isNaN(r)&&(r=Ie.getBestMask(a,ve.bind(null,a,i))),Ie.applyMask(r,a),ve(a,i,r),{modules:a,version:e,errorCorrectionLevel:i,maskPattern:r,segments:o}}Ke.create=function(e,i){if(typeof e>"u"||e==="")throw new Error("No input text");let r=be.M,o,n;return typeof i<"u"&&(r=be.from(i.errorCorrectionLevel,be.M),o=fe.from(i.version),n=Ie.from(i.maskPattern),i.toSJISFunc&&pe.setToSJISFunction(i.toSJISFunc)),yn(e,o,r,n)};var et={},Re={};(function(t){function e(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let r=i.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+i);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(n){return[n,n]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,n=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:n,scale:n?4:s,margin:o,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},t.getImageWidth=function(r,o){const n=t.getScale(r,o);return Math.floor((r+o.margin*2)*n)},t.qrToImageData=function(r,o,n){const s=o.modules.size,l=o.modules.data,a=t.getScale(s,n),u=Math.floor((s+n.margin*2)*a),c=n.margin*a,v=[n.color.light,n.color.dark];for(let m=0;m<u;m++)for(let g=0;g<u;g++){let p=(m*u+g)*4,d=n.color.light;if(m>=c&&g>=c&&m<u-c&&g<u-c){const N=Math.floor((m-c)/a),w=Math.floor((g-c)/a);d=v[l[N*s+w]?1:0]}r[p++]=d.r,r[p++]=d.g,r[p++]=d.b,r[p]=d.a}}})(Re);(function(t){const e=Re;function i(o,n,s){o.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=s,n.width=s,n.style.height=s+"px",n.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(n,s,l){let a=l,u=s;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(u=r()),a=e.getOptions(a);const c=e.getImageWidth(n.modules.size,a),v=u.getContext("2d"),m=v.createImageData(c,c);return e.qrToImageData(m.data,n,a),i(v,u,c),v.putImageData(m,0,0),u},t.renderToDataURL=function(n,s,l){let a=l;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const u=t.render(n,s,a),c=a.type||"image/png",v=a.rendererOpts||{};return u.toDataURL(c,v.quality)}})(et);var tt={};const Cn=Re;function He(t,e){const i=t.a/255,r=e+'="'+t.hex+'"';return i<1?r+" "+e+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function Ae(t,e,i){let r=t+e;return typeof i<"u"&&(r+=" "+i),r}function En(t,e,i){let r="",o=0,n=!1,s=0;for(let l=0;l<t.length;l++){const a=Math.floor(l%e),u=Math.floor(l/e);!a&&!n&&(n=!0),t[l]?(s++,l>0&&a>0&&t[l-1]||(r+=n?Ae("M",a+i,.5+u+i):Ae("m",o,0),o=0,n=!1),a+1<e&&t[l+1]||(r+=Ae("h",s),s=0)):o++}return r}tt.render=function(e,i,r){const o=Cn.getOptions(i),n=e.modules.size,s=e.modules.data,l=n+o.margin*2,a=o.color.light.a?"<path "+He(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",u="<path "+He(o.color.dark,"stroke")+' d="'+En(s,n,o.margin)+'"/>',c='viewBox="0 0 '+l+" "+l+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+c+' shape-rendering="crispEdges">'+a+u+`</svg>
- `;return typeof r=="function"&&r(null,m),m};const _n=Rt,Se=Ke,nt=et,bn=tt;function ke(t,e,i,r,o){const n=[].slice.call(arguments,1),s=n.length,l=typeof n[s-1]=="function";if(!l&&!_n())throw new Error("Callback required as last argument");if(l){if(s<2)throw new Error("Too few arguments provided");s===2?(o=i,i=e,e=r=void 0):s===3&&(e.getContext&&typeof o>"u"?(o=r,r=void 0):(o=r,r=i,i=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=e,e=r=void 0):s===2&&!e.getContext&&(r=i,i=e,e=void 0),new Promise(function(a,u){try{const c=Se.create(i,r);a(t(c,e,r))}catch(c){u(c)}})}try{const a=Se.create(i,r);o(null,t(a,e,r))}catch(a){o(a)}}q.create=Se.create;q.toCanvas=ke.bind(null,nt.render);q.toDataURL=ke.bind(null,nt.renderToDataURL);q.toString=ke.bind(null,function(t,e,i){return bn.render(t,i)});const Bn={class:"inner-toolbar w-11/12 flex justify-between"},vn={class:"toolbar-btns"},An={class:"toolbar-search"},Tn={id:"deliverySheet",style:{width:"900px"}},Pn={__name:"goodsLend",setup(t){const e=St(),i=Lt(),r=Pt(),o=D(""),n=D([]),s=D(!1),l=ne({page_no:1,page_size:10,company_id:e.state.companId}),a=ne({}),u=D(""),c=D(!1),v=D([]);ne({});const m=D([]),g=D(""),p=D(!1),d=ne({warehouse_id:"",type:"",code:"",intro:""}),N=ne({warehouse_id:[{required:!0,message:"请选择仓库",trigger:"change"}],name:[{required:!0,message:"请选择输入仓库名称",trigger:"blur"}],code:[{required:!0,message:"请选择输入库位号",trigger:"blur"}],type:[{required:!0,message:"请选择仓库类型",trigger:"change"}]}),w=D([]),C=D([]),h=D(""),f=()=>{s.value=!0,Et(l).then(y=>{s.value=!1,u.value=y}).catch(()=>{s.value=!1})};It(()=>{f(),it()}),Nt(r,y=>{y.query.status&&(l.status=y.query.status,a.status=y.query.status),l.page_no=1,f()},{immediate:!0});const A=()=>{p.value=!1,i.push({name:"warehouseList"})},T=y=>{let S=n.value.filter(ee=>ee.id===y)[0];o.value=S.sn},I=y=>{let S=C.value.filter(ee=>ee.code===y)[0];h.value=S.code},P=()=>{console.log(d),d.code=o.value+"-"+d.type+"-"+d.code,g.value==="新增"?_t(d).then(()=>{le.success("添加成功!"),p.value=!1,o.value="",d.value={},f()}):g.value==="编辑"&&bt(d).then(()=>{le.success("修改成功!"),p.value=!1,d.value={},f()})},U=()=>{p.value=!1},k=()=>{c.value=!1,m.value=[]},H=()=>{nextTick(()=>{m.value.forEach((y,b)=>{document.getElementById(`codeItem${b}`).innerHTML="",new q(document.getElementById(`codeItem${b}`),{text:y,width:600,height:660,render:"table",colorDark:"#333333",colorLight:"#ffffff",correctLevel:q.CorrectLevel.H})})})},X=y=>{g.value="编辑";const b=y.code;o.value=b.split("-")[0],h.value=b.split("-")[1],Object.assign(d,y),console.log(o.value,h.value),d.code=b.split("-").pop(),p.value=!0},F=y=>{Mt.confirm("确定要删除吗?","提示",{type:"warning"}).then(()=>{Bt({id:y.id}).then(()=>{le.success("删除成功!"),f()})}).catch(()=>{})},ot=y=>{const b=C.value.filter(S=>S.code===y);return b.length!==0?b[0].name:""},rt=()=>{if(!v.value.length)return le.error("请先选择!");const y=v.value.map(b=>b.code);m.value=y,c.value=!0,H()},it=()=>{At().then(y=>{n.value=y}),Tt({dictType:"Warehouse_location_type",page_no:1,page_size:1,page_size:50}).then(y=>{w.value=y.data}),Ct({page_no:1,page_size:100,company_id:e.state.companId}).then(y=>{s.value=!1,C.value=y}).catch(()=>{s.value=!1})},st=()=>{vt({printable:"deliverySheet",type:"html",targetStyles:["*"],ignoreElements:["no-logs","goods-image","no-btn","elementToIgnore"]})},at=y=>{v.value=y},lt=y=>{l.page_size=y,f()},ut=y=>{l.page_no=y,f()},ct=()=>{g.value="新增",p.value=!0},dt=y=>{c.value=!0,m.value.push(y.code),H()},ft=y=>{l.sn=y,Object.keys(a).forEach(b=>delete l[b]),l.page_no=1,f()},gt=()=>{Object.assign(l,a),delete l.start_time,delete l.end_time,a.goodsLend_time_range&&(l.start_time=parseInt(Number(a.goodsLend_time_range[0])/1e3),l.end_time=parseInt(Number(a.goodsLend_time_range[1])/1e3)),delete l.goodsLend_time_range,l.page_no=1,f()};return(y,b)=>{const S=L("el-button"),ee=L("el-cascader"),J=L("el-form-item"),te=L("el-option"),we=L("el-select"),ht=L("el-date-picker"),De=L("el-form"),mt=L("en-table-search"),$=L("el-table-column"),pt=L("el-pagination"),wt=L("en-table-layout"),yt=L("barcode"),Ue=L("el-dialog"),Fe=L("el-input");return M(),G("div",null,[_(wt,{tableData:u.value.data,loading:s.value,onSelectionChange:at},{toolbar:B(()=>[oe("div",Bn,[oe("div",vn,[y.checkPermission(["goodsLend:add"])?(M(),j(S,{key:0,size:"mini",type:"primary",onClick:ct},{default:B(()=>[V("新增")]),_:1})):Y("",!0),y.checkPermission(["goodsLend:confirm"])?(M(),j(S,{key:1,type:"success",size:"mini",onClick:rt,disabled:v.value.length===0},{default:B(()=>[V("打印")]),_:1},8,["disabled"])):Y("",!0)]),oe("div",An,[_(mt,{onSearch:ft,onAdvancedSearch:gt,placeholder:"请输入仓库编号",advanced:"",advancedWidth:"465"},{"advanced-content":B(()=>[_(De,{ref:"advancedForm",model:a,"label-width":"90px"},{default:B(()=>[_(J,{label:"仓库"},{default:B(()=>[_(ee,{modelValue:a.dept_id,"onUpdate:modelValue":b[0]||(b[0]=E=>a.dept_id=E),options:n.value,props:{label:"name",value:"id",emitPath:!1,checkStrictly:!0},clearable:""},null,8,["modelValue","options"])]),_:1}),_(J,{label:"状态"},{default:B(()=>[_(we,{modelValue:a.status,"onUpdate:modelValue":b[1]||(b[1]=E=>a.status=E),clearable:""},{default:B(()=>[_(te,{key:"NEW",label:"新创建",value:"NEW"}),_(te,{key:"CONFIRMED",label:"已确认",value:"CONFIRMED"}),_(te,{key:"RETURNED",label:"已归还",value:"RETURNED"})]),_:1},8,["modelValue"])]),_:1}),_(J,{label:"时间"},{default:B(()=>[_(ht,{modelValue:a.goodsLend_time_range,"onUpdate:modelValue":b[2]||(b[2]=E=>a.goodsLend_time_range=E),type:"daterange",align:"center",editable:!1,"unlink-panels":"",clearable:!0,"default-time":["00:00:00","23:59:59"],"range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"timestamp","picker-options":{disabledDate(E){return E.getTime()-1>=new Date(new Date().getFullYear(),new Date().getMonth(),new Date().getDate()).getTime()+864e5-1},shortcuts:y.MixinPickerShortcuts}},null,8,["modelValue","picker-options"])]),_:1})]),_:1},8,["model"])]),_:1})])])]),"table-columns":B(()=>[_($,{type:"selection",width:"55"}),_($,{prop:"warehouse.sn",label:"仓库编号"}),_($,{prop:"warehouse.name",label:"仓库名称"}),_($,{prop:"code",label:"库位号"}),_($,{prop:"type",label:"库位区域"},{default:B(E=>[V(ye(ot(E.row.type)),1)]),_:1}),_($,{prop:"bind_num",label:"已绑定SKU数"}),_($,{label:"操作",width:"250"},{default:B(E=>[y.checkPermission(["goodsLend:edit"])?(M(),j(S,{key:0,size:"mini",onClick:ae=>X(E.row)},{default:B(()=>[V("编辑")]),_:2},1032,["onClick"])):Y("",!0),y.checkPermission(["goodsLend:del"])?(M(),j(S,{key:1,type:"success",size:"mini",style:{"margin-top":"5px"},onClick:ae=>F(E.row)},{default:B(()=>[V("删除")]),_:2},1032,["onClick"])):Y("",!0),_(S,{type:"primary",size:"mini",style:{"margin-top":"5px"},onClick:ae=>dt(E.row)},{default:B(()=>[V("打印")]),_:2},1032,["onClick"])]),_:1})]),pagination:B(()=>[u.value?(M(),j(pt,{key:0,onSizeChange:lt,onCurrentChange:ut,"current-page":u.value.page_no,"page-sizes":[10,20,50,100],"page-size":u.value.page_size,layout:"total, sizes, prev, pager, next, jumper",total:u.value.data_total},null,8,["current-page","page-size","total"])):Y("",!0)]),_:1},8,["tableData","loading"]),_(Ue,{title:"打印预览",visible:c.value,"onUpdate:visible":b[3]||(b[3]=E=>c.value=E),width:"940px",center:"",onClose:k},{default:B(()=>[_(S,{size:"mini",type:"primary",onClick:st,class:"print"},{default:B(()=>[V("打印")]),_:1}),oe("div",Tn,[(M(!0),G(Ce,null,Ee(m.value,(E,ae)=>(M(),G("div",{class:"tips-t",key:ae},[oe("div",null,[_(yt,{value:E,height:"20",format:"CODE128",fontSize:"20"},null,8,["value"])])]))),128))])]),_:1},8,["visible"]),_(Ue,{title:g.value,modelValue:p.value,"onUpdate:modelValue":b[8]||(b[8]=E=>p.value=E),width:"940px",center:"",onClose:U,style:{width:"30%","border-radius":"10px"}},{footer:B(()=>[_(S,{onClick:U},{default:B(()=>[V("取 消")]),_:1}),_(S,{type:"primary",onClick:P},{default:B(()=>[V("确 定")]),_:1})]),default:B(()=>[_(De,{model:d,ref:"addLendFormRef",rules:N,"label-width":"90px"},{default:B(()=>[_(J,{label:"仓库",prop:"warehouse_id"},{default:B(()=>[_(we,{modelValue:d.warehouse_id,"onUpdate:modelValue":b[4]||(b[4]=E=>d.warehouse_id=E),clearable:"",onChange:T},{default:B(()=>[(M(!0),G(Ce,null,Ee(n.value,E=>(M(),j(te,{key:E.id,label:E.name,value:E.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),n.value.length==0?(M(),G("span",{key:0,style:{color:"red","margin-left":"20px",cursor:"pointer","text-decoration":"underline"},onClick:A},"新增仓库")):Y("",!0)]),_:1}),_(J,{label:"库位区域",prop:"type"},{default:B(()=>[_(we,{modelValue:d.type,"onUpdate:modelValue":b[5]||(b[5]=E=>d.type=E),clearable:"",onChange:I},{default:B(()=>[(M(!0),G(Ce,null,Ee(C.value,E=>(M(),j(te,{key:E.id,label:E.name,value:E.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),_(J,{label:"库位号",prop:"code"},{default:B(()=>[_(Fe,{modelValue:d.code,"onUpdate:modelValue":b[6]||(b[6]=E=>d.code=E),maxlength:"12",placeholder:"请输入库位号",style:{width:"270px"}},{prepend:B(()=>[V(ye(o.value)+"-"+ye(h.value),1)]),_:1},8,["modelValue"])]),_:1}),_(J,{label:"库位说明"},{default:B(()=>[_(Fe,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"请输入内容",modelValue:d.intro,"onUpdate:modelValue":b[7]||(b[7]=E=>d.intro=E)},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"])])}}};export{Pn as default};
|