2023-05-15 14:13:36 +08:00

1 line
8.3 KiB
JavaScript

"use strict";require("./sub-common/db6cc8fba2c34d36042a60bcf5f10485.js");require("./sub-common/510d0e7078f44d770a0720344fb06369.js");require("./sub-common/0762d0d2445fe1200cae192cedb39f4b.js");require("./sub-common/cf216475951e5960bcea5b5b9d46933b.js");require("./sub-common/b381c79a1fbfec5335fa7029f46ddeee.js");require("./sub-common/a9f502422a5cebf3f4d008798630c54f.js");require("./sub-common/071f0d2864ed3f21580488256af4d8b8.js");require("./sub-common/1765aa4ae4fcbfcb768c717dfd0558f0.js");require("./sub-common/d4d7ae6cf70fe19bf5c8f83e9b163279.js");require("./sub-common/9996aa9f0d3c47748a31f7de83203e6f.js");(wx.webpackJsonp=wx.webpackJsonp||[]).push([[1912],{3028:function(e,n,t){var s=t(2180),i=t(4165),c=t(1413),o=t(5861),l=t(9439),a=t(1515),r=t(2954),u=t.n(r),_=t(4184),d=t.n(_),x=t(7294),m=t(9542),h="index-module__main____Ci3z",f="index-module__search___bYFuM",p="index-module__filter___ErwMP",j="index-module__filter_all___NX8rY",Z="index-module__text_one___N2Qup",v="index-module__text_two___NwXDg",N="index-module__miconfont___GQsMc",g="index-module__filter_btns___Tg0vH",w="index-module__list___xRwdR",k=t(3433),G="index-module__main___OxCyx",S="index-module__topBox___PlbjL",B="index-module__leftTop___jblbR",y="index-module__lefttopTitle___fk8aS",C="index-module__inputBox___NkmZK",b="index-module__inputClass___l8ImL",P="index-module__lefttopSelectBox___eYPHY",z="index-module__inputstyle___ZFIkI",I="index-module__danwei___pCEhJ",L="index-module__thirdBox___JB_re",M="index-module__thirdTopfont___adyqO",T="index-module__flexModebox___fHdZG",R="index-module__activemodeBox___y3_pM",E="index-module__modeBox___DxvPS",O="index-module__safeBox___Ctcjh",J="index-module__bottomBox___fIMky",Y="index-module__resetBox___s_XOp",D="index-module__activeButton___tknPL",F=t(5679),H=t(9988),Q=t(8093),X=t(5893),A=function SearchPopup(e){var n=(0,x.useState)({width:"",weight_density:"",product_kind_ids:"",component:""}),t=(0,l.Z)(n,2),s=t[0],r=t[1],u=(0,H.J7)().fetchData,_=(0,x.useState)([]),m=(0,l.Z)(_,2),h=m[0],f=m[1],p=function(){var e=(0,o.Z)((0,i.Z)().mark((function _callee(){var e,n;return(0,i.Z)().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u();case 2:e=t.sent,n=e.data,f(n.list);case 5:case"end":return t.stop()}}),_callee)})));return function getCategoryList(){return e.apply(this,arguments)}}();(0,x.useEffect)((function(){p()}),[]);var j=function handBlur(e,n){1==n&&r((function(n){return(0,c.Z)((0,c.Z)({},n),{},{width:Number(e.detail.value)})})),2==n&&r((function(n){return(0,c.Z)((0,c.Z)({},n),{},{weight_density:Number(e.detail.value)})})),3==n&&r((function(n){return(0,c.Z)((0,c.Z)({},n),{},{component:e.detail.value})}))},Z=function handSure(){e.handSearch((0,Q.mB)(s))};return(0,X.jsx)(F.Z,{title:"全部筛选",show:e.showPopup,onClose:function onClose(){var n;return null===(n=e.closePopup)||void 0===n?void 0:n.call(e)},children:(0,X.jsx)(a.pf,{scrollY:!0,style:{height:"600rpx"},children:(0,X.jsxs)(a.G7,{className:G,children:[(0,X.jsxs)(a.G7,{className:L,children:[(0,X.jsx)(a.G7,{className:M,children:"系列名称"}),(0,X.jsx)(a.G7,{className:T,children:h.map((function(e,n){return(0,X.jsx)(a.G7,{onClick:function onClick(){!function handCheckMode(e){h.map((function(n){return n.id==e.id&&(n.check=!n.check),n})),f((0,k.Z)(h));var n=[];h.filter((function(e){return e.check})).forEach((function(e){n.push(e.id)})),r((function(e){return(0,c.Z)((0,c.Z)({},e),{},{product_kind_ids:n.toString()})}))}(e)},className:d()(e.check?R:E),children:e.name},n)}))})]}),(0,X.jsxs)(a.G7,{className:S,children:[(0,X.jsxs)(a.G7,{className:B,children:[(0,X.jsx)(a.G7,{className:y,children:"幅宽"}),(0,X.jsxs)(a.G7,{className:P,children:[(0,X.jsx)(a.II,{className:z,type:"number",value:s.width,onBlur:function onBlur(e){return j(e,1)},placeholder:"请输入幅宽"}),(0,X.jsx)(a.G7,{className:I,children:"CM"})]})]}),(0,X.jsxs)(a.G7,{className:B,children:[(0,X.jsx)(a.G7,{className:y,children:"克重"}),(0,X.jsxs)(a.G7,{className:P,children:[(0,X.jsx)(a.II,{className:z,type:"number",value:s.weight_density,onBlur:function onBlur(e){return j(e,2)},placeholder:"请输入克重"}),(0,X.jsx)(a.G7,{className:I,children:"KG"})]})]})]}),(0,X.jsx)(a.G7,{className:S,children:(0,X.jsxs)(a.G7,{className:B,children:[(0,X.jsx)(a.G7,{className:y,children:"成分"}),(0,X.jsx)(a.G7,{className:C,children:(0,X.jsx)(a.II,{className:b,type:"text",value:s.component,onBlur:function onBlur(e){return j(e,3)},placeholder:"请输入成分"})})]})}),(0,X.jsx)(a.G7,{className:O}),(0,X.jsxs)(a.G7,{className:J,children:[(0,X.jsx)(a.zx,{className:Y,plain:!0,onClick:function onClick(){return function handReset(){h.map((function(e){return e.check=!1,e})),f((0,k.Z)(h)),r({width:"",weight_density:"",product_kind_ids:"",component:""})}()},children:"重置"}),(0,X.jsx)(a.zx,{className:D,plain:!0,onClick:function onClick(){return null==Z?void 0:Z()},children:"确认"})]})]})})})},K=(0,x.memo)(A),$=t(7317),q=t(1809),V=t(2711),U=t(7490),W=t(4408);Page((0,s.createPageConfig)((function(){(0,W.Z)();var e=(0,x.useState)(!1),n=(0,l.Z)(e,2),t=(n[0],n[1],(0,r.useRouter)());(0,x.useEffect)((function(){u().setNavigationBarTitle({title:t.params.title||"分类页面"})}),[t]);var s=(0,x.useState)({code_or_name:"",product_category_id:t.params.id,page:1,size:10,width:"",weight_density:"",product_kind_id:"",component:""}),_=(0,l.Z)(s,2),k=_[0],G=_[1],S=(0,x.useState)({list:[],total:0}),B=(0,l.Z)(S,2),y=B[0],C=B[1],b=(0,H.vQ)(),P=b.fetchData,z=b.state,I=function(){var e=(0,o.Z)((0,i.Z)().mark((function _callee(){var e;return(0,i.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,P((0,Q.mB)(k));case 2:e=n.sent,C((0,c.Z)((0,c.Z)({},y),{},{list:e.data.list,total:e.data.total}));case 4:case"end":return n.stop()}}),_callee)})));return function getSubjectList(){return e.apply(this,arguments)}}();(0,x.useEffect)((function(){I()}),[k]);var L=(0,x.useRef)({size:k.size,page:k.page}),M=(0,x.useMemo)((function(){return(0,Q.rA)({list:y.list,total:y.total,status:z.loading})}),[y,z]),T=(0,x.useState)(),R=(0,l.Z)(T,2),E=R[0],O=(R[1],(0,x.useCallback)((function(e){L.current.page=1,C((function(){return{list:[],total:0}})),G((function(n){return(0,c.Z)((0,c.Z)({},n),{},{code_or_name:e,size:10})}))}),[])),J=(0,x.useRef)(null),Y=(0,x.useState)({comprehensive:"none"}),D=(0,l.Z)(Y,2),F=D[0],A=D[1],ee=(0,x.useState)(!1),ne=(0,l.Z)(ee,2),te=ne[0],se=ne[1];return(0,X.jsxs)(a.G7,{className:h,children:[(0,X.jsx)(a.G7,{className:f,children:(0,X.jsx)($.Z,{placeIcon:"out",showBtn:!0,btnStyle:{color:"#007AFF"},changeOnSearch:O,debounceTime:300})}),(0,X.jsxs)(a.G7,{className:p,children:[(0,X.jsxs)(a.G7,{className:j,children:[(0,X.jsxs)(a.G7,{className:Z,onClick:function onClick(){return function changeSort(){C((function(){return{list:[],total:0}}));var e=J.current.changeSort(),n=e.status,t=e.value;A((function(e){return(0,c.Z)((0,c.Z)({},e),{},{comprehensive:n,collection:"none"})})),G((function(e){return(0,c.Z)((0,c.Z)({},e),{},{abstract_sort_key:t,size:10,page:1})})),L.current={size:10,page:1}}()},children:[(0,X.jsx)(a.xv,{children:"综合"}),(0,X.jsx)(U.Z,{status:F.comprehensive,ref:J,sortValue:{desc:"1",asc:"-1"}})]}),(0,X.jsxs)(a.G7,{className:v,onClick:function onClick(){return se(!0)},children:[(0,X.jsx)(a.xv,{children:"筛选"}),(0,X.jsx)(a.xv,{className:d()("iconfont icon-bianji_bianji",N)})]})]}),(0,X.jsx)(a.G7,{className:g,children:(0,X.jsx)(m.Z,{list:E})})]}),(0,X.jsx)(a.G7,{className:w,children:(0,X.jsx)(V.Z,{selfonScrollToLower:function selfonScrollToLower(){return function getScrolltolower(){if(y.list.length<y.total){L.current.page++;var e=L.current.size*L.current.page;G((0,c.Z)((0,c.Z)({},k),{},{size:e}))}}()},statusMore:M,children:(0,X.jsx)(q.Z,{pageName:"pages/classList/index",productList:y.list})})}),(0,X.jsx)(K,{showPopup:te,closePopup:function closePopup(){return se(!1)},handSearch:function handSearch(e){return function handSearch(e){L.current.page=1,C((function(){return{list:[],total:0}})),G((0,c.Z)((0,c.Z)({},k),{},{width:null==e?void 0:e.width,weight_density:null==e?void 0:e.weight_density,size:10,component:null==e?void 0:e.component,product_kind_id:null==e?void 0:e.product_kind_ids})),se(!1)}(e)}})]})}),"pages/classList/index",{root:{cn:[]}},{navigationBarTitleText:"分类标题"}||{}))}},function(e){e.O(0,[4634,6878,3560,9315,4271,635,6320,1030,1902,9700,4339,8021,1739,3843,248,2107,1216,8592],(function(){return n=3028,e(e.s=n);var n}));e.O()}]);