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

1 line
8.1 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([[8269],{4355:function(e,n,t){var s=t(2180),i=t(4165),l=t(1413),a=t(5861),o=t(9439),c=t(1515),r=t(2954),_=t.n(r),u=t(4184),d=t.n(u),m=t(7294),x=t(9542),h="index-module__main___QUbTp",f="index-module__search___DkN9r",p="index-module__filter___D7Fcj",j="index-module__filter_all___zNIFe",g="index-module__text_one___lhAQl",N="index-module__text_two___Z6sKf",v="index-module__miconfont___Ew4Fj",G="index-module__filter_btns___iegJ1",w="index-module__list___KaynC",Z=t(7317),b=t(1809),C=t(2711),S="index-module__popup_main___cGQYc",y="index-module__popup_title___YJPOA",I="index-module__scroll___ehbP2",k="index-module__popup_filter___U4C7r",W="index-module__popup_filter_item___lPVA5",B="index-module__title___doRbK",F="index-module__btn_list___e_lFd",z="index-module__btn_item___A2Mfh",E="index-module__select_btn_item___JtwQv",L="index-module__btn_list_input___SJu9K",T="index-module__btn_width___CBAb5",A="index-module__unit___rZnN8",J="index-module__btn_list_element___HelW6",K="index-module__btns_con___wgBNu",P="index-module__btns_two___CMpXx",Q="index-module__rest_btn___H2jIT",D="index-module__verify_btn___I7LwN",M=t(5679),O=t(9988),R=t(5893),V=function FilterV2(e){var n=e.onClose,t=e.onFiltr,s=e.show,r=void 0!==s&&s,_=(0,m.useState)({seriesId:"",minWidth:"",maxWidth:"",minWeight:"",maxWeight:"",element:""}),u=(0,o.Z)(_,2),x=u[0],h=u[1],f=(0,O.J7)().fetchData,p=(0,m.useState)([]),j=(0,o.Z)(p,2),g=j[0],N=j[1],v=function(){var e=(0,a.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,f();case 2:e=t.sent,n=e.data,N(n.list);case 5:case"end":return t.stop()}}),_callee)})));return function getCategoryList(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){r&&v()}),[r]);var G=function onCloseEven(){null==n||n()};(0,m.useEffect)((function(){console.log(x)}),[x]);var w=function setNumber(e,n){console.log(e);var t=parseFloat(e.detail.value);Number.isNaN(t)?x[n]=null:x[n]=parseFloat(t.toFixed(2)),h((0,l.Z)({},x))};return(0,R.jsx)(M.Z,{position:"right",show:r,showTitle:!1,onClose:function onClose(){return G()},showIconButton:!0,children:(0,R.jsxs)(c.G7,{className:S,children:[(0,R.jsx)(c.G7,{className:y,children:"全部筛选"}),(0,R.jsx)(c.pf,{scrollY:!0,className:I,children:(0,R.jsxs)(c.G7,{className:k,children:[(0,R.jsxs)(c.G7,{className:W,children:[(0,R.jsx)(c.G7,{className:B,children:"系列"}),(0,R.jsx)(c.G7,{className:F,children:g.map((function(e){return(0,R.jsx)(c.G7,{onClick:function onClick(){return function changeKind(e){h((0,l.Z)((0,l.Z)({},x),{},{seriesId:e.id}))}(e)},className:d()(z,x.seriesId==e.id&&E),children:e.name},e.id)}))})]}),(0,R.jsxs)(c.G7,{className:W,children:[(0,R.jsx)(c.G7,{className:B,children:"幅宽"}),(0,R.jsxs)(c.G7,{className:L,children:[(0,R.jsx)(c.G7,{className:T,children:(0,R.jsx)(c.II,{alwaysEmbed:!0,cursorSpacing:150,value:x.minWidth,type:"digit",onBlur:function onBlur(e){return w(e,"minWidth")},placeholder:"请输入幅宽",placeholderStyle:"font-size: 26rpx"})}),(0,R.jsx)(c.G7,{className:A,children:"cm"})]})]}),(0,R.jsxs)(c.G7,{className:W,children:[(0,R.jsx)(c.G7,{className:B,children:"克重"}),(0,R.jsxs)(c.G7,{className:L,children:[(0,R.jsx)(c.G7,{className:T,children:(0,R.jsx)(c.II,{type:"digit",value:x.minWeight,onBlur:function onBlur(e){return w(e,"minWeight")},placeholder:"自定义最低值",placeholderStyle:"font-size: 26rpx",alwaysEmbed:!0,cursorSpacing:150})}),(0,R.jsx)(c.xv,{children:"—"}),(0,R.jsx)(c.G7,{className:T,children:(0,R.jsx)(c.II,{type:"digit",value:x.maxWeight,onBlur:function onBlur(e){return w(e,"maxWeight")},placeholder:"自定义最高值",placeholderStyle:"font-size: 26rpx",alwaysEmbed:!0,cursorSpacing:150})}),(0,R.jsx)(c.G7,{className:A,children:"g"})]})]}),(0,R.jsxs)(c.G7,{className:W,children:[(0,R.jsx)(c.G7,{className:B,children:"成分"}),(0,R.jsx)(c.G7,{className:J,children:(0,R.jsx)(c.gx,{placeholder:"请输入",cursorSpacing:60,value:x.element,onInput:function onInput(e){return function setElement(e){var n=e.detail.value;h((0,l.Z)((0,l.Z)({},x),{},{element:n}))}(e)}})})]}),(0,R.jsx)(c.G7,{className:"common_safe_area_y"})]})}),(0,R.jsx)(c.G7,{className:K,children:(0,R.jsxs)(c.G7,{className:P,children:[(0,R.jsx)(c.G7,{className:Q,onClick:function onClick(){return function onRest(){console.log("12123"),h({seriesId:"",minWidth:"",maxWidth:"",minWeight:"",maxWeight:"",element:""})}()},children:"重置"}),(0,R.jsx)(c.G7,{className:D,onClick:function onClick(){return function onVerify(){console.log(x),null==t||t(x)}()},children:"确认"})]})})]})})},Y=t(7490),H=t(8093);Page((0,s.createPageConfig)((function(){var e=(0,m.useState)(!1),n=(0,o.Z)(e,2),t=n[0],s=n[1],u=(0,r.useRouter)();(0,m.useEffect)((function(){_().setNavigationBarTitle({title:u.params.title||"专题页面"})}),[u]);var S=(0,m.useState)({code_or_name:"",product_subject_id:u.params.id,page:1,size:10,width:"",weight_density:"",product_kind_id:"",component:""}),y=(0,o.Z)(S,2),I=y[0],k=y[1],W=(0,m.useState)({list:[],total:0}),B=(0,o.Z)(W,2),F=B[0],z=B[1],E=(0,O.vQ)(),L=E.fetchData,T=E.state,A=function(){var e=(0,a.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,L((0,H.mB)(I));case 2:e=n.sent,z((0,l.Z)((0,l.Z)({},F),{},{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,m.useEffect)((function(){A()}),[I]);var J=(0,m.useRef)({size:I.size,page:I.page}),K=(0,m.useMemo)((function(){return(0,H.rA)({list:F.list,total:F.total,status:T.loading})}),[F]),P=(0,m.useState)(),Q=(0,o.Z)(P,2),D=Q[0],M=Q[1],U=function formatSelectList(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{data:{},field:{}},n=[];for(var t in e.data)"seriesId"!==t&&""!=e.data[t]&&n.push({title:e.field[t],value:e.data[t]});M([].concat(n))},$=(0,m.useCallback)((function(e){J.current.page=1,z((function(){return{list:[],total:0}})),k((function(n){return(0,l.Z)((0,l.Z)({},n),{},{code_or_name:e,size:10})}))}),[]);return(0,R.jsxs)(c.G7,{className:h,children:[(0,R.jsx)(c.G7,{className:f,children:(0,R.jsx)(Z.Z,{placeIcon:"out",showBtn:!0,btnStyle:{color:"#007AFF"},changeOnSearch:$,debounceTime:300})}),(0,R.jsxs)(c.G7,{className:p,children:[(0,R.jsxs)(c.G7,{className:j,children:[(0,R.jsxs)(c.G7,{className:g,children:[(0,R.jsx)(c.xv,{children:"综合"}),(0,R.jsx)(Y.Z,{status:"top"})]}),(0,R.jsxs)(c.G7,{className:N,onClick:function onClick(){return s(!0)},children:[(0,R.jsx)(c.xv,{children:"筛选"}),(0,R.jsx)(c.xv,{className:d()("iconfont icon-bianji_bianji",v)})]})]}),(0,R.jsx)(c.G7,{className:G,children:(0,R.jsx)(x.Z,{list:D})})]}),(0,R.jsx)(c.G7,{className:w,children:(0,R.jsx)(C.Z,{selfonScrollToLower:function selfonScrollToLower(){return function getScrolltolower(){if(F.list.length<F.total){J.current.page++;var e=J.current.size*J.current.page;k((0,l.Z)((0,l.Z)({},I),{},{size:e}))}}()},statusMore:K,children:(0,R.jsx)(b.Z,{pageName:"pages/subjectList/index",productList:F.list})})}),(0,R.jsx)(V,{show:t,onClose:function onClose(){return s(!1)},onFiltr:function getFiltr(e){J.current.page=1;var n=e.data;k((0,l.Z)((0,l.Z)({},I),{},{width:null==n?void 0:n.width,weight_density:null==n?void 0:n.weight,size:10,component:null==n?void 0:n.element,product_kind_id:null==n?void 0:n.seriesId})),U(e)}})]})}),"pages/subjectList/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=4355,e(e.s=n);var n}));e.O()}]);