1 line
23 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[5425],{5184:function(e,n,o){var t=o(9975),r=o(4165),i=o(5861),l=o(885),c=o(5032),s=o(1515),_=o(2535),u=o.n(_),d=o(9792),a=o.n(d),m="index-module__shopping___rSsIK",f="index-module__shopping--topBar___NgzyU",x="index-module__shopping--context___wd0NG",h="index-module__shopping__list__container___eQIei",p="index-module__flexBox___XHnXI",g="index-module__icon--manage--cancel___EBDNt",y=o(6408),w=o.n(y),v=o(1329),b=o(4909),N=o(4942),j=o(1413),k={common_safe_area_y:"index-module__common_safe_area_y___hMeQP","flex-col":"index-module__flex-col___u4mqJ","flex-row":"index-module__flex-row___QF4Xz","justify-between":"index-module__justify-between___SVnXc","items-center":"index-module__items-center___TeRak","flex-item":"index-module__flex-item___JP4fE","full-100":"index-module__full-100___sMWPr","color-blue":"index-module__color-blue___M3nPu","color-yellow":"index-module__color-yellow___wQhTc","color-green":"index-module__color-green___ymSO3","color-grey":"index-module__color-grey___Rpf81","color-white":"index-module__color-white___U5GdE",layout:"index-module__layout___xCsni",checkbox:"index-module__checkbox___h99C7","checkbox--text":"index-module__checkbox--text___f_Yes",selected:"index-module__selected___jo7LR",line:"index-module__line___kat2C",topItem:"index-module__topItem___yYKWx",topTitle:"index-module__topTitle___FdpQH",summary:"index-module__summary___b0i6I",detailBox:"index-module__detailBox___Ug3IB",orderTitle:"index-module__orderTitle___FfbyX",orderType:"index-module__orderType___hlmst",orderTypeDetail:"index-module__orderTypeDetail___aDmtP",orderColor:"index-module__orderColor___rxtLi",bottomBox:"index-module__bottomBox____9Lf7",drawerButton:"index-module__drawerButton___l8Rgq",drawerOpen:"index-module__drawerOpen___xkch1",drawerClose:"index-module__drawerClose___XfbvG"},C=o(4365),B=o(6574),Z=o(9943),I=o(2407),S=o(7594),G=1e6,T=1e6,E="[big.js] ",K=E+"Invalid ",D=K+"decimal places",P=E+"Division by zero",M={},z=void 0,O=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function round(e,n,o,t){var r=e.c;if(o===z&&(o=e.constructor.RM),0!==o&&1!==o&&2!==o&&3!==o)throw Error("[big.js] Invalid rounding mode");if(n<1)t=3===o&&(t||!!r[0])||0===n&&(1===o&&r[0]>=5||2===o&&(r[0]>5||5===r[0]&&(t||r[1]!==z))),r.length=1,t?(e.e=e.e-n+1,r[0]=1):r[0]=e.e=0;else if(n<r.length){if(t=1===o&&r[n]>=5||2===o&&(r[n]>5||5===r[n]&&(t||r[n+1]!==z||1&r[n-1]))||3===o&&(t||!!r[0]),r.length=n,t)for(;++r[--n]>9;)if(r[n]=0,0===n){++e.e,r.unshift(1);break}for(n=r.length;!r[--n];)r.pop()}return e}function stringify(e,n,o){var t=e.e,r=e.c.join(""),i=r.length;if(n)r=r.charAt(0)+(i>1?"."+r.slice(1):"")+(t<0?"e":"e+")+t;else if(t<0){for(;++t;)r="0"+r;r="0."+r}else if(t>0)if(++t>i)for(t-=i;t--;)r+="0";else t<i&&(r=r.slice(0,t)+"."+r.slice(t));else i>1&&(r=r.charAt(0)+"."+r.slice(1));return e.s<0&&o?"-"+r:r}M.abs=function(){var e=new this.constructor(this);return e.s=1,e},M.cmp=function(e){var n,o=this,t=o.c,r=(e=new o.constructor(e)).c,i=o.s,l=e.s,c=o.e,s=e.e;if(!t[0]||!r[0])return t[0]?i:r[0]?-l:0;if(i!=l)return i;if(n=i<0,c!=s)return c>s^n?1:-1;for(l=(c=t.length)<(s=r.length)?c:s,i=-1;++i<l;)if(t[i]!=r[i])return t[i]>r[i]^n?1:-1;return c==s?0:c>s^n?1:-1},M.div=function(e){var n=this,o=n.constructor,t=n.c,r=(e=new o(e)).c,i=n.s==e.s?1:-1,l=o.DP;if(l!==~~l||l<0||l>G)throw Error(D);if(!r[0])throw Error(P);if(!t[0])return e.s=i,e.c=[e.e=0],e;var c,s,_,u,d,a=r.slice(),m=c=r.length,f=t.length,x=t.slice(0,c),h=x.length,p=e,g=p.c=[],y=0,w=l+(p.e=n.e-e.e)+1;for(p.s=i,i=w<0?0:w,a.unshift(0);h++<c;)x.push(0);do{for(_=0;_<10;_++){if(c!=(h=x.length))u=c>h?1:-1;else for(d=-1,u=0;++d<c;)if(r[d]!=x[d]){u=r[d]>x[d]?1:-1;break}if(!(u<0))break;for(s=h==c?r:a;h;){if(x[--h]<s[h]){for(d=h;d&&!x[--d];)x[d]=9;--x[d],x[h]+=10}x[h]-=s[h]}for(;!x[0];)x.shift()}g[y++]=u?_:++_,x[0]&&u?x[h]=t[m]||0:x=[t[m]]}while((m++<f||x[0]!==z)&&i--);return g[0]||1==y||(g.shift(),p.e--,w--),y>w&&round(p,w,o.RM,x[0]!==z),p},M.eq=function(e){return 0===this.cmp(e)},M.gt=function(e){return this.cmp(e)>0},M.gte=function(e){return this.cmp(e)>-1},M.lt=function(e){return this.cmp(e)<0},M.lte=function(e){return this.cmp(e)<1},M.minus=M.sub=function(e){var n,o,t,r,i=this,l=i.constructor,c=i.s,s=(e=new l(e)).s;if(c!=s)return e.s=-s,i.plus(e);var _=i.c.slice(),u=i.e,d=e.c,a=e.e;if(!_[0]||!d[0])return d[0]?e.s=-s:_[0]?e=new l(i):e.s=1,e;if(c=u-a){for((r=c<0)?(c=-c,t=_):(a=u,t=d),t.reverse(),s=c;s--;)t.push(0);t.reverse()}else for(o=((r=_.length<d.length)?_:d).length,c=s=0;s<o;s++)if(_[s]!=d[s]){r=_[s]<d[s];break}if(r&&(t=_,_=d,d=t,e.s=-e.s),(s=(o=d.length)-(n=_.length))>0)for(;s--;)_[n++]=0;for(s=n;o>c;){if(_[--o]<d[o]){for(n=o;n&&!_[--n];)_[n]=9;--_[n],_[o]+=10}_[o]-=d[o]}for(;0===_[--s];)_.pop();for(;0===_[0];)_.shift(),--a;return _[0]||(e.s=1,_=[a=0]),e.c=_,e.e=a,e},M.mod=function(e){var n,o=this,t=o.constructor,r=o.s,i=(e=new t(e)).s;if(!e.c[0])throw Error(P);return o.s=e.s=1,n=1==e.cmp(o),o.s=r,e.s=i,n?new t(o):(r=t.DP,i=t.RM,t.DP=t.RM=0,o=o.div(e),t.DP=r,t.RM=i,this.minus(o.times(e)))},M.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},M.plus=M.add=function(e){var n,o,t,r=this,i=r.constructor;if(e=new i(e),r.s!=e.s)return e.s=-e.s,r.minus(e);var l=r.e,c=r.c,s=e.e,_=e.c;if(!c[0]||!_[0])return _[0]||(c[0]?e=new i(r):e.s=r.s),e;if(c=c.slice(),n=l-s){for(n>0?(s=l,t=_):(n=-n,t=c),t.reverse();n--;)t.push(0);t.reverse()}for(c.length-_.length<0&&(t=_,_=c,c=t),n=_.length,o=0;n;c[n]%=10)o=(c[--n]=c[n]+_[n]+o)/10|0;for(o&&(c.unshift(o),++s),n=c.length;0===c[--n];)c.pop();return e.c=c,e.e=s,e},M.pow=function(e){var n=this,o=new n.constructor("1"),t=o,r=e<0;if(e!==~~e||e<-1e6||e>T)throw Error(K+"exponent");for(r&&(e=-e);1&e&&(t=t.times(n)),e>>=1;)n=n.times(n);return r?o.div(t):t},M.prec=function(e,n){if(e!==~~e||e<1||e>G)throw Error(K+"precision");return round(new this.constructor(this),e,n)},M.round=function(e,n){if(e===z)e=0;else if(e!==~~e||e<-G||e>G)throw Error(D);return round(new this.constructor(this),e+this.e+1,n)},M.sqrt=function(){var e,n,o,t=this,r=t.constructor,i=t.s,l=t.e,c=new r("0.5");if(!t.c[0])return new r(t);if(i<0)throw Error(E+"No square root");0===(i=Math.sqrt(t+""))||i===1/0?((n=t.c.join("")).length+l&1||(n+="0"),l=((l+1)/2|0)-(l<0||1&l),e=new r(((i=Math.sqrt(n))==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+l)):e=new r(i+""),l=e.e+(r.DP+=4);do{o=e,e=c.times(o.plus(t.div(o)))}while(o.c.slice(0,l).join("")!==e.c.slice(0,l).join(""));return round(e,(r.DP-=4)+e.e+1,r.RM)},M.times=M.mul=function(e){var n,o=this,t=o.constructor,r=o.c,i=(e=new t(e)).c,l=r.length,c=i.length,s=o.e,_=e.e;if(e.s=o.s==e.s?1:-1,!r[0]||!i[0])return e.c=[e.e=0],e;for(e.e=s+_,l<c&&(n=r,r=i,i=n,_=l,l=c,c=_),n=new Array(_=l+c);_--;)n[_]=0;for(s=c;s--;){for(c=0,_=l+s;_>s;)c=n[_]+i[s]*r[_-s-1]+c,n[_--]=c%10,c=c/10|0;n[_]=c}for(c?++e.e:n.shift(),s=n.length;!n[--s];)n.pop();return e.c=n,e},M.toExponential=function(e,n){var o=this,t=o.c[0];if(e!==z){if(e!==~~e||e<0||e>G)throw Error(D);for(o=round(new o.constructor(o),++e,n);o.c.length<e;)o.c.push(0)}return stringify(o,!0,!!t)},M.toFixed=function(e,n){var o=this,t=o.c[0];if(e!==z){if(e!==~~e||e<0||e>G)throw Error(D);for(e=e+(o=round(new o.constructor(o),e+o.e+1,n)).e+1;o.c.length<e;)o.c.push(0)}return stringify(o,!1,!!t)},M[Symbol.for("nodejs.util.inspect.custom")]=M.toJSON=M.toString=function(){var e=this,n=e.constructor;return stringify(e,e.e<=n.NE||e.e>=n.PE,!!e.c[0])},M.toNumber=function(){var e=Number(stringify(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(E+"Imprecise conversion");return e},M.toPrecision=function(e,n){var o=this,t=o.constructor,r=o.c[0];if(e!==z){if(e!==~~e||e<1||e>G)throw Error(K+"precision");for(o=round(new t(o),e,n);o.c.length<e;)o.c.push(0)}return stringify(o,e<=o.e||o.e<=t.NE||o.e>=t.PE,!!r)},M.valueOf=function(){var e=this,n=e.constructor;if(!0===n.strict)throw Error(E+"valueOf disallowed");return stringify(e,e.e<=n.NE||e.e>=n.PE,!0)};var R=function _Big_(){function Big(e){var n=this;if(!(n instanceof Big))return e===z?_Big_():new Big(e);if(e instanceof Big)n.s=e.s,n.e=e.e,n.c=e.c.slice();else{if("string"!=typeof e){if(!0===Big.strict&&"bigint"!=typeof e)throw TypeError(K+"value");e=0===e&&1/e<0?"-0":String(e)}!function parse(e,n){var o,t,r;if(!O.test(n))throw Error(K+"number");e.s="-"==n.charAt(0)?(n=n.slice(1),-1):1,(o=n.indexOf("."))>-1&&(n=n.replace(".",""));(t=n.search(/e/i))>0?(o<0&&(o=t),o+=+n.slice(t+1),n=n.substring(0,t)):o<0&&(o=n.length);for(r=n.length,t=0;t<r&&"0"==n.charAt(t);)++t;if(t==r)e.c=[e.e=0];else{for(;r>0&&"0"==n.charAt(--r););for(e.e=o-t-1,e.c=[],o=0;t<=r;)e.c[o++]=+n.charAt(t++)}return e}(n,e)}n.constructor=Big}return Big.prototype=M,Big.DP=20,Big.RM=1,Big.NE=-7,Big.PE=21,Big.strict=false,Big.roundDown=0,Big.roundHalfUp=1,Big.roundHalfEven=2,Big.roundUp=3,Big}(),F=R,L="index-module__main___qhaDe",A="index-module__plus___Z8nKa",q="index-module__reduce___Z9T6S",J="index-module__input___JUf5U",U="index-module__unit___ThR6I",X=o(5513),counter=function(e){var n=e.minNum,o=void 0===n?0:n,t=e.maxNum,r=void 0===t?1e4:t,i=e.step,c=void 0===i?1:i,_=e.digits,u=void 0===_?0:_,a=e.defaultNum,m=void 0===a?0:a,f=e.onChange,x=e.onBlue,h=e.onClickBtn,p=e.unit,g=void 0===p?"":p,y=e.disable,w=void 0!==y&&y,v=(0,d.useState)({count:m}),b=(0,l.Z)(v,2),N=b[0],k=b[1],C=function formatDigits(e){if((e+="").includes(".")&&u>0){var n=e.split("."),o=n[1].substr(0,u);return n[0]+"."+o}return parseFloat(e)},B=function checkData(e){var n=parseFloat(e);return n>r?r:n<o?o:e};return(0,X.jsxs)(s.G7,{className:L,children:[(0,X.jsx)(s.G7,{className:q,onClick:function onClick(){return function minus(){if(w)return!1;var e=N.count,n=F(e).minus(c).toNumber();n=n<o?o:n,k((0,j.Z)((0,j.Z)({},N),{},{count:n})),null==f||f(parseFloat(n)),null==h||h(parseFloat(n))}()},children:"-"}),(0,X.jsxs)(s.G7,{className:J,children:[(0,X.jsx)(s.II,{value:String(N.count),onInput:function onInputEven(e){var n=e.detail.value;if(""===n)k((0,j.Z)((0,j.Z)({},N),{},{count:o})),null==f||f(o);else if(isNaN(Number(n))){var t=parseFloat(n);if(isNaN(t))k((0,j.Z)((0,j.Z)({},N),{},{count:m})),null==f||f(m);else{var r=C(t);r=B(r),k((0,j.Z)((0,j.Z)({},N),{},{count:r})),null==f||f(r)}}else{var i=C(n);i=B(i),k((0,j.Z)((0,j.Z)({},N),{},{count:i})),null==f||f(parseFloat(i))}},onBlur:function onBluerEven(){var e=parseFloat(N.count);if(isNaN(e))k((0,j.Z)((0,j.Z)({},N),{},{count:m})),null==x||x(m);else{var n=C(e);n=B(n),k((0,j.Z)((0,j.Z)({},N),{},{count:n})),null==x||x(n)}},type:"digit",disabled:w}),(0,X.jsx)(s.G7,{className:U,children:g})]}),(0,X.jsx)(s.G7,{className:A,onClick:function onClick(){return function onPlus(){if(w)return!1;var e=N.count,n=F(e).add(c).toNumber();n=C(n=n>=r?r:n),k((0,j.Z)((0,j.Z)({},N),{},{count:n})),null==f||f(parseFloat(n)),null==h||h(parseFloat(n))}()},children:"+"})]})},Q={common_safe_area_y:"index-module__common_safe_area_y___fWsCw","flex-col":"index-module__flex-col___Ra0HZ","flex-row":"index-module__flex-row___a2x9u","justify-between":"index-module__justify-between___CfLIX","items-center":"index-module__items-center___px4zj","flex-item":"index-module__flex-item____aoyw","full-100":"index-module__full-100___hA5V5","color-blue":"index-module__color-blue___Dxo4G","color-yellow":"index-module__color-yellow___lCuXN","color-green":"index-module__color-green___dJNqM","color-grey":"index-module__color-grey___cK2Om","color-white":"index-module__color-white___QbWlK",colorKindItem:"index-module__colorKindItem___unIT2",colorKindItem__left:"index-module__colorKindItem__left___T53SU","colorKindItem__left--image":"index-module__colorKindItem__left--image___mmuUp",colorKindItem__center:"index-module__colorKindItem__center___ejsbq","colorKindItem__center--title":"index-module__colorKindItem__center--title___z6WQr","colorKindItem__center--ID":"index-module__colorKindItem__center--ID___vq6as","colorKindItem__center--description":"index-module__colorKindItem__center--description___obrWy",colorKindItem__right:"index-module__colorKindItem__right___jp_VV","colorKindItem__right--price":"index-module__colorKindItem__right--price___Fu6Pv",checkbox:"index-module__checkbox___IxTs9",selected:"index-module__selected___DiFAO"},V=o(7227),W=o(4812),H=o(8703),$={0:{title:"大货",unit:"条",eunit:"kg",step:1,digits:0,minNum:1,maxNum:1e5,defaultNum:1},1:{title:"剪板",unit:"米",eunit:"m",step:1,digits:2,minNum:.5,maxNum:9.99,defaultNum:1},2:{title:"散剪",unit:"米",eunit:"kg",step:1,digits:2,minNum:3,maxNum:1e5,defaultNum:3}},Y=(0,d.memo)((function(e){var n=e.item,o=e.orderType,t=void 0===o?H.p.Bulk:o,l=e.isSelected,c=void 0!==l&&l,_=e.onChecked,u=e.onUnChecked,a=((0,d.useCallback)((function(e){return Number((0,W.yb)(e))}),[]),(0,d.useCallback)((function(e){return e.sale_mode==H.p.Bulk?e.roll:e.length/100}),[])),m=(0,d.useCallback)((function(e){return e.sale_mode==H.p.Bulk?"条":"米"}),[]),f=(0,V.Ds)(function(){var e=(0,i.Z)((0,r.Z)().mark((function _callee(e,n){return(0,r.Z)().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:n.sale_mode===H.p.Bulk?n.roll=e:n.length=e,_&&_((0,j.Z)((0,j.Z)({},n),{},{checked:!0}));case 2:case"end":return o.stop()}}),_callee)})));return function(n,o){return e.apply(this,arguments)}}(),300);return(0,X.jsxs)(B.Z,{triggerLabel:!1,status:c,onSelect:function handleSelect(){_&&_((0,j.Z)((0,j.Z)({},n),{},{checked:!0}))},onClose:function handleClose(){u&&u((0,j.Z)((0,j.Z)({},n),{},{checked:!1}))},customClassName:w()(Q.checkbox,c?Q.selected:""),customTextClass:Q.colorKindItem,children:[(0,X.jsx)(s.G7,{className:Q.colorKindItem__left,children:(0,X.jsx)(s.Ee,{className:Q["colorKindItem__left--image"],mode:"aspectFill",src:"https://test.cdn.zzfzyc.com/mall/no_img.png"})}),(0,X.jsxs)(s.G7,{className:Q.colorKindItem__center,children:[(0,X.jsx)(s.xv,{className:Q["colorKindItem__center--title"],children:"001# 环保黑 环保黑 环保黑 环保黑 环保黑 环保黑"}),(0,X.jsxs)(s.G7,{className:Q["colorKindItem__center--detail"],children:[(0,X.jsx)(s.xv,{className:Q["colorKindItem__center--ID"],children:"6002#220G"}),(0,X.jsx)(s.xv,{className:Q["colorKindItem__center--description"],children:"流线棉拉架卫衣"})]})]}),(0,X.jsxs)(s.G7,{className:Q.colorKindItem__right,children:[(0,X.jsx)(s.G7,{className:Q["colorKindItem__right--price"],children:"¥ 37.50/kg"}),(0,X.jsx)(s.G7,{className:Q["colorKindItem__right--counter"],children:(0,X.jsx)(counter,{onBlue:function onBlue(e){return f(e,n)},defaultNum:a(n),step:$[t].step,digits:$[t].digits,onClickBtn:function onClickBtn(e){return f(e,n)},unit:m(n),minNum:$[t].minNum,maxNum:$[t].maxNum})})]})]})}),(function(e,n){var o=JSON.stringify(e.item),t=JSON.stringify(n.item),r=!0;return e.isSelected!==n.isSelected&&(r=!1),e.orderType!==n.orderType&&(r=!1),o!==t&&(r=!1),r})),ee=Y,ne=o(9498),oe=(0,d.memo)((function(e){var n=e.isOpen;return(0,X.jsx)(s.G7,{className:k.drawerButton,children:n?(0,X.jsx)(s.xv,{className:"iconfont icon-shouqi"}):(0,X.jsx)(s.xv,{className:"iconfont icon-zhankai"})})})),te=(0,d.memo)((function(e){var n=e.itemData,o=e.selectedId,t=(0,d.useState)(!1),r=(0,l.Z)(t,2),i=r[0],c=r[1],_=(0,d.useState)(0),u=(0,l.Z)(_,2),a=u[0],m=u[1],f=function onSelectOrderType(e){m(e)},x=(0,d.useState)({0:[{id:0,sale_mode:0,roll:5,length:0,checked:!0},{id:1,sale_mode:0,roll:6,length:0,checked:!1},{id:2,sale_mode:0,roll:7,length:0,checked:!0}],1:[{id:5,sale_mode:1,roll:0,length:77700,checked:!1},{id:6,sale_mode:1,roll:0,length:7600,checked:!0},{id:7,sale_mode:1,roll:0,length:400,checked:!0}],2:[{id:8,sale_mode:2,roll:0,length:11100,checked:!1},{id:9,sale_mode:2,roll:0,length:8540,checked:!0}]}),h=(0,l.Z)(x,2),p=h[0],g=h[1],y=(0,d.useCallback)((function(e){var n=p[a].map((function(n){return n.id===e.id&&(n=e),n}));g((function(e){return(0,j.Z)((0,j.Z)({},e),{},(0,N.Z)({},a,n))}))}),[p,a]),v=(0,d.useCallback)((function(e){var n=p[a].map((function(n){return n.id===e.id&&(n=e),n}));g((function(e){return(0,j.Z)((0,j.Z)({},e),{},(0,N.Z)({},a,n))}))}),[p,a]),b=(0,d.useMemo)((function(){return p[a].map((function(e,n){return(0,X.jsx)(ee,{isSelected:e.checked,item:e,orderType:a,onChecked:y,onUnChecked:v},e.id)}))}),[p,a]);return(0,X.jsxs)(C.Z,{circle:!0,customClassName:w()(k.layout,(null==n?void 0:n.purchaser_id)===o?k.selected:""),onClick:function handleClickLayout(){},children:[(0,X.jsx)(B.Z,{customClassName:k.checkbox,customTextClass:k["checkbox--text"],triggerLabel:!1,children:(0,X.jsxs)(s.G7,{className:"flex-row justify-between",onClick:function handleOpenDetail(){c((function(e){return!e}))},children:[(0,X.jsxs)(s.G7,{className:k.topItem,children:[(0,X.jsxs)(s.G7,{className:"flex-row items-center",children:[(0,X.jsx)(s.G7,{className:k.topTitle,children:null==n?void 0:n.purchaser_name}),(0,X.jsx)(Z.Z,{type:"info",size:"normal",circle:!0,plain:!0,children:null==n?void 0:n.sale_user_name})]}),(0,X.jsx)(s.G7,{className:k.summary,children:(0,X.jsxs)(s.xv,{children:["已选 ",p[a].filter((function(e){return e.checked})).length," 种面料1 个颜色,共 ",a===H.p.Bulk?"".concat(4," 条"):"".concat(4," 米")]})})]}),(0,X.jsx)(oe,{isOpen:i})]})}),i&&(0,X.jsxs)(s.G7,{className:w()(k.detailBox,i?k.drawerOpen:k.drawerClose),children:[(0,X.jsxs)(s.G7,{className:k.orderType,children:[(0,X.jsx)(I.Z,{customClassName:k.line}),(0,X.jsx)(s.G7,{className:k.orderTitle,children:"订单类型"}),(0,X.jsxs)(s.G7,{className:k.orderTypeDetail,children:[(0,X.jsx)(S.Z,{type:a===H.p.Bulk?"primary":"info",plain:a!==H.p.Bulk,customStyles:{padding:"0 50rpx"},circle:!0,onClick:function onClick(){return f(H.p.Bulk)},children:"大货"}),(0,X.jsx)(S.Z,{type:a===H.p.Plate?"primary":"info",plain:a!==H.p.Plate,customStyles:{padding:"0 50rpx"},circle:!0,onClick:function onClick(){return f(H.p.Plate)},children:"剪板"}),(0,X.jsx)(S.Z,{type:a===H.p.BulkCut?"primary":"info",plain:a!==H.p.BulkCut,customStyles:{padding:"0 50rpx"},circle:!0,onClick:function onClick(){return f(H.p.BulkCut)},children:"散剪"})]})]}),(0,X.jsxs)(s.G7,{className:k.orderColor,children:[(0,X.jsx)(I.Z,{customClassName:k.line}),(0,X.jsxs)(s.G7,{className:w()(k.orderTitle,"justify-between"),children:[(0,X.jsx)(s.xv,{children:"布料颜色"}),(0,X.jsxs)(Z.Z,{type:"danger",size:"normal",circle:!0,plain:!1,children:[$[a].title,"单位:",$[a].unit]})]})]}),(0,X.jsx)(s.G7,{className:k.orderContainer,children:b})]})]})}),(0,ne.t)()),re={common_safe_area_y:"index-module__common_safe_area_y___ywkBM","flex-col":"index-module__flex-col___de8wP","flex-row":"index-module__flex-row___gDspD","justify-between":"index-module__justify-between___VoVh6","items-center":"index-module__items-center___ozCp3","flex-item":"index-module__flex-item___gVEzn","full-100":"index-module__full-100___jvGKu","color-blue":"index-module__color-blue___c4cFd","color-yellow":"index-module__color-yellow___fKrs3","color-green":"index-module__color-green___yIx6k","color-grey":"index-module__color-grey___oGnEl","color-white":"index-module__color-white___bN0GE",bottomBar:"index-module__bottomBar___s1C3T",bottomLeft:"index-module__bottomLeft___CXaSe",moneyText:"index-module__moneyText___HI_B_",moneyNumber:"index-module__moneyNumber___adzn0",unit:"index-module__unit___Yo7zI"},ie=(0,d.memo)((function(e){var n=e.onSettleAccount,o=e.amount,t=void 0===o?0:o;return(0,X.jsxs)(s.G7,{className:re.bottomBar,children:[(0,X.jsxs)(s.G7,{className:re.bottomLeft,children:[(0,X.jsx)(s.xv,{className:re.moneyText,children:"预估金额:"}),(0,X.jsxs)(s.xv,{className:re.moneyNumber,children:[(0,X.jsx)(s.xv,{className:re.unit,children:"¥"}),(0,W.yb)(t)]})]}),(0,X.jsx)(s.G7,{className:re.bottomRight,children:(0,X.jsx)(S.Z,{plain:!0,type:"primary",round:!0,size:"normal",onClick:function handleSettle(){n&&n()},children:(0,X.jsx)(s.xv,{style:{fontSize:"32rpx"},children:"结算"})})})]})})),le={common_safe_area_y:"index-module__common_safe_area_y___eNJSZ","flex-col":"index-module__flex-col___PhLMD","flex-row":"index-module__flex-row___d_wkz","justify-between":"index-module__justify-between___zRtwG","items-center":"index-module__items-center___AJIf7","flex-item":"index-module__flex-item___w_MjE","full-100":"index-module__full-100___IkB6L","color-blue":"index-module__color-blue___J24Mw","color-yellow":"index-module__color-yellow___kGAM0","color-green":"index-module__color-green___aWfB5","color-grey":"index-module__color-grey___LVlhS","color-white":"index-module__color-white___qLZgT",bottomBar:"index-module__bottomBar___hWO3j",bottomLeft:"index-module__bottomLeft___UsLb7",moneyText:"index-module__moneyText___C4ulT",moneyNumber:"index-module__moneyNumber___fMs_5"},ce=(0,d.memo)((function(e){var n=e.onDelete,o=e.onSelectCheckbox,t=(0,d.useState)(!1),r=(0,l.Z)(t,2),i=r[0],c=r[1];return(0,X.jsxs)(s.G7,{className:le.bottomBar,children:[(0,X.jsx)(s.G7,{className:le.bottomLeft,children:(0,X.jsx)(B.Z,{status:i,round:!0,size:"small",onSelect:function selectCallBack(){c(!0),o&&o(i)},onClose:function closeCallBack(){c(!1),o&&o(i)},customStyles:{color:"$color: #000000, $alpha: 0.6"},children:"全选"})}),(0,X.jsx)(s.G7,{className:le.bottomRight,children:(0,X.jsx)(S.Z,{plain:!0,round:!0,type:"danger",size:"normal",onClick:function handleSettle(){n&&n()},customStyles:{backgroundColor:"#F44761"},children:(0,X.jsx)(s.xv,{style:{fontSize:"32rpx"},children:"删除"})})})]})})),se=o(8072),_e={isManager:!1},ue=a().createContext(_e),de=function Shopping(){var e,n,o=(0,d.useCallback)((function(e){}),[]),t=(0,d.useState)(!1),a=(0,l.Z)(t,2),y=a[0],N=a[1],j=(0,d.useState)(0),k=(0,l.Z)(j,2),C=k[0],B=(k[1],(0,d.useState)("auto")),Z=(0,l.Z)(B,2),I=Z[0],S=Z[1],G=(0,se.kM)(),T=G.fetchData,E=G.state,K=(0,d.useState)({list:[],total:0}),D=(0,l.Z)(K,2),P=D[0],M=D[1],z=(0,d.useMemo)((function(){return(0,V.rA)({list:P.list,total:P.total,status:E.loading})}),[P,E]);(0,_.useDidShow)((function(){(0,i.Z)((0,r.Z)().mark((function _callee(){var e;return(0,r.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,T();case 2:(e=u().createSelectorQuery()).select("#shoppingContainer").boundingClientRect(),e.select("#topBar").boundingClientRect(),e.select("#bottomBar").boundingClientRect(),e.exec((function(e){var n=e[0].height,o=e[1].height,t=e[2].height;S(n-o-t+"px")}));case 8:case"end":return n.stop()}}),_callee)})))()})),(0,d.useEffect)((function(){M({list:E.data,total:E.data.length})}),[E]),(0,_.useDidShow)((function(){}));var O=(0,d.useState)(),R=(0,l.Z)(O,2),F=R[0];R[1];return(0,X.jsxs)(s.G7,{className:w()("flex-col",m),id:"shoppingContainer",children:[(0,X.jsx)(s.G7,{className:f,id:"topBar",children:(0,X.jsx)(c.Z,{placeholder:"请输入客户名称",showBtn:!1,changeOnSearch:o,debounceTime:300,children:(0,X.jsx)(s.G7,{className:p,onClick:function onStartToManage(){N((function(e){return!e}))},children:y?(0,X.jsx)(v.Z,{iconName:"icon-guanlidingdan",text:"取消",customClass:g}):(0,X.jsx)(v.Z,{iconName:"icon-guanlidingdan",text:"管理"})})})}),(0,X.jsxs)(s.G7,{className:w()("flex-item","flex-col",x),children:[(0,X.jsx)(s.G7,{className:w()(h,"flex-item"),style:{height:I},children:(0,X.jsx)(ue.Provider,{value:{isManager:!1},children:(0,X.jsx)(b.Z,{statusMore:z,children:!(null==P||null===(e=P.list)||void 0===e||!e.length)&&(null==P||null===(n=P.list)||void 0===n?void 0:n.map((function(e,n){return(0,X.jsx)(te,{itemData:e,selectedId:F},n)})))})})}),(0,X.jsx)(s.G7,{id:"bottomBar",children:y?(0,X.jsx)(ce,{onDelete:function handleDelete(){},onSelectCheckbox:function handleSelectAllCheckbox(e){}}):(0,X.jsx)(ie,{onSettleAccount:function handleSettleAccount(){},amount:C})})]})]})};Page((0,t.createPageConfig)(de,"pages/shopping/index",{root:{cn:[]}},{navigationBarTitleText:"购物页面"}||{}))}},function(e){e.O(0,[2107,1216,8592],(function(){return n=5184,e(e.s=n);var n}));e.O()}]);