"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[563],{5767:function(e,n,o){var t=o(9975),l=o(2982),i=o(4165),a=o(1413),c=o(5861),s=o(885),r=o(1515),u=o(9792),d=o(1251),_="index-module__order_status_list___k66cU",m="index-module__order_status_item___rcQLA",x="index-module__selected___RLILI",h="index-module__order_list_scroll___mbA1_",f=o(6408),p=o.n(f),v=o(5513),g=(0,u.memo)((function(e){var n=e.list,o=void 0===n?[]:n,t=e.defaultId,l=void 0===t?null:t,i=e.onSelect,c=(0,u.useState)({selected:-1,tabId:""}),d=(0,s.Z)(c,2),f=d[0],g=d[1];(0,u.useEffect)((function(){if(l){var e=null==o?void 0:o.findIndex((function(e){return e.id==l}));if(-1!==e){var n=e>0?e-1:0;g((function(e){return(0,a.Z)((0,a.Z)({},e),{},{tabId:o[n].id.toString()})}))}}g((function(e){return(0,a.Z)((0,a.Z)({},e),{},{selected:l||-1})}))}),[l]);return(0,v.jsx)(r.G7,{className:_,children:(0,v.jsx)(r.pf,{scrollX:!0,scrollIntoView:"tabs_".concat(f.tabId),scrollWithAnimation:!0,children:(0,v.jsx)(r.G7,{className:h,children:o.map((function(e,n){return(0,v.jsx)(r.G7,{id:"tabs_".concat(e.id),onClick:function onClick(){return function clickEvent(e){var n=e.item,t=e.index,l=t>0?t-1:0;g((function(e){return(0,a.Z)((0,a.Z)({},e),{},{tabId:o[l].id.toString(),selected:n.id})})),null==i||i(n.id)}({item:e,index:n})},className:p()(m,f.selected==e.id&&x),children:e.name},e.id)}))})})})})),j=o(5032),b=o(7227),N={common_safe_area_y:"index-module__common_safe_area_y___P1Do_","full-100":"index-module__full-100___Dh8iF","color-blue":"index-module__color-blue___SV3iG","color-yellow":"index-module__color-yellow___cQjXZ","color-green":"index-module__color-green___ib23v","color-grey":"index-module__color-grey___KVUuL","color-white":"index-module__color-white___CcsbJ",flexBox:"index-module__flexBox___zJAJh",icon_shaixuan:"index-module__icon_shaixuan___ZLiRQ",activeshaixuan:"index-module__activeshaixuan___rHn4Q",shaixuan:"index-module__shaixuan___Hlvjt",activeshai:"index-module__activeshai___Nf47_",popupBox:"index-module__popupBox___NrHv7",topBox:"index-module__topBox___lVlZ6",leftTop:"index-module__leftTop___RoELY",lefttopTitle:"index-module__lefttopTitle___Rv_iD",lefttopSelectBox:"index-module__lefttopSelectBox___X26l6",lefttopSelectName:"index-module__lefttopSelectName___jWuQz",icon_more:"index-module__icon_more___ZuQ9q",activelefttopSelectBox:"index-module__activelefttopSelectBox___bu1fh",secondBox:"index-module__secondBox___BoNjH",secondTopfont:"index-module__secondTopfont___zdFhL",inputBox:"index-module__inputBox___ynOAj",orderInput:"index-module__orderInput___pjQvs",saomiao:"index-module__saomiao___xFk0W",thirdBox:"index-module__thirdBox___PWSQH",thirdTopfont:"index-module__thirdTopfont___Gs7HO",flexModebox:"index-module__flexModebox___rs5Sr",activemodeBox:"index-module__activemodeBox___mVovb",modeBox:"index-module__modeBox___kcNx0",bottomBox:"index-module__bottomBox___sebvs",resetBox:"index-module__resetBox___fGGEZ",button:"index-module__button___GU26e",activeButton:"index-module__activeButton___D0M1j",order_list:"index-module__order_list___RoU_W",bigBpx:"index-module__bigBpx___pO8tV",kongboxTwo:"index-module__kongboxTwo____wJnY"},k=o(5854),Z=o(4909),G=o(2535),w=o.n(G),y="index-module__itemBox___r2hfd",S="index-module__topItem___p12RW",B="index-module__orderNo___ee0pt",C="index-module__status___mfwsO",T="index-module__pussName___OFHb2",P="index-module__line___bwG9I",I="index-module__contBox___z18C3",z="index-module__leftCont___lAQ2l",L="index-module__leftContNums___NYM9g",F="index-module__rightCont___zh7yE",R="index-module__rightTop___CTR2z",D="index-module__productBox___ZRAps",O="index-module__productName___BYyH2",M="index-module__productMode___FoG3x",A="index-module__shipMode___m7eRw",E="index-module__colorsBox___AGf69",U="index-module__colorNameOne___DByBc",$="index-module__colorName___J5hr_",H="index-module__colorNameTwo___DxtPY",J="index-module__lineOne___AvPrw",V="index-module__bottomMsg___Ol2O_",Y="index-module__msgLeft____ZLLS",Q="index-module__msgRight___SR_rw",W="index-module__msgRightOne___IJhUL",q="index-module__bottomBox___rpUFB",K=o(6631),X=o(4812),ee=(0,u.memo)((function(e){var n,o,t,l,i,a,c,s,u,d,_,m,x,h,f,p,g,j,b,N,k,Z,G,ee,ne,oe,te,le,ie,ae,ce,se,re,ue,de,_e,me,xe,he,fe,pe,ve,ge,je,be,Ne,ke,Ze,Ge,we,ye,Se,Be,Ce,Te,Pe,Ie,ze,Le,Fe,Re,De,Oe,Me,Ae,Ee,Ue;return(0,v.jsxs)(r.G7,{className:y,onClick:function onClick(n){return function navTo(n){var o;w().navigateTo({url:"/pages/orderDetails/index?id="+(null==e||null===(o=e.obj)||void 0===o?void 0:o.id)})}()},children:[(0,v.jsxs)(r.G7,{className:S,children:[(0,v.jsxs)(r.G7,{className:B,children:["单号:",null==e||null===(n=e.obj)||void 0===n?void 0:n.order_no]}),(0,v.jsx)(r.G7,{className:C,children:null==e||null===(o=e.obj)||void 0===o?void 0:o.status_name})]}),(0,v.jsx)(r.G7,{className:T,children:null==e||null===(t=e.obj)||void 0===t?void 0:t.purchaser_name}),(0,v.jsx)(r.G7,{className:P}),(0,v.jsxs)(r.G7,{className:I,children:[(0,v.jsx)(r.G7,{className:z,style:{backgroundColor:"rgb(".concat(null==e||null===(l=e.obj)||void 0===l||null===(i=l.product_list[0])||void 0===i||null===(a=i.product_colors[0])||void 0===a||null===(c=a.rgb)||void 0===c?void 0:c.r," ").concat(null==e||null===(s=e.obj)||void 0===s||null===(u=s.product_list[0])||void 0===u||null===(d=u.product_colors[0])||void 0===d||null===(_=d.rgb)||void 0===_?void 0:_.g," ").concat(null==e||null===(m=e.obj)||void 0===m||null===(x=m.product_list[0])||void 0===x||null===(h=x.product_colors[0])||void 0===h||null===(f=h.rgb)||void 0===f?void 0:f.b,")")},children:(0,v.jsxs)(r.G7,{className:L,children:["颜色 (",null==e||null===(p=e.obj)||void 0===p?void 0:p.total_colors,")"]})}),(0,v.jsxs)(r.G7,{className:F,children:[(0,v.jsxs)(r.G7,{className:R,children:[(0,v.jsxs)(r.G7,{className:D,children:[(0,v.jsxs)(r.G7,{className:O,children:[null==e||null===(g=e.obj)||void 0===g||null===(j=g.product_list[0])||void 0===j?void 0:j.code," ",null==e||null===(b=e.obj)||void 0===b||null===(N=b.product_list[0])||void 0===N?void 0:N.name]}),(0,v.jsx)(r.G7,{className:M,children:0===(null==e||null===(k=e.obj)||void 0===k?void 0:k.sale_mode)?"大货":1===(null==e||null===(Z=e.obj)||void 0===Z?void 0:Z.sale_mode)?"剪版":"散剪"})]}),(0,v.jsx)(r.G7,{className:A,children:null==e||null===(G=e.obj)||void 0===G?void 0:G.shipment_mode_name})]}),(0,v.jsxs)(r.G7,{className:E,children:[(0,v.jsxs)(r.G7,{className:U,children:[null==e||null===(ee=e.obj)||void 0===ee||null===(ne=ee.product_list[0])||void 0===ne||null===(oe=ne.product_colors[0])||void 0===oe?void 0:oe.code," ",null==e||null===(te=e.obj)||void 0===te||null===(le=te.product_list[0])||void 0===le||null===(ie=le.product_colors[0])||void 0===ie?void 0:ie.name]}),(0,v.jsxs)(r.G7,{className:$,children:["x",0===(null==e||null===(ae=e.obj)||void 0===ae?void 0:ae.sale_mode)?null==e||null===(ce=e.obj)||void 0===ce||null===(se=ce.product_list[0])||void 0===se||null===(re=se.product_colors[0])||void 0===re?void 0:re.roll:(null==e||null===(ue=e.obj)||void 0===ue||null===(de=ue.product_list[0])||void 0===de||null===(_e=de.product_colors[0])||void 0===_e?void 0:_e.length)/100," ",0===(null==e||null===(me=e.obj)||void 0===me?void 0:me.sale_mode)?"条":"m"]}),(0,v.jsxs)(r.G7,{className:H,children:["¥ ",(null==e||null===(xe=e.obj)||void 0===xe||null===(he=xe.product_list[0])||void 0===he||null===(fe=he.product_colors[0])||void 0===fe?void 0:fe.sale_price)/100,"/kg"]})]}),(null==e||null===(pe=e.obj)||void 0===pe||null===(ve=pe.product_list[0])||void 0===ve||null===(ge=ve.product_colors)||void 0===ge?void 0:ge.length)>1&&(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(r.G7,{className:E,children:[(0,v.jsxs)(r.G7,{className:U,children:[null==e||null===(je=e.obj)||void 0===je||null===(be=je.product_list[0])||void 0===be||null===(Ne=be.product_colors[1])||void 0===Ne?void 0:Ne.code," ",null==e||null===(ke=e.obj)||void 0===ke||null===(Ze=ke.product_list[0])||void 0===Ze||null===(Ge=Ze.product_colors[1])||void 0===Ge?void 0:Ge.name]}),(0,v.jsxs)(r.G7,{className:$,children:["x",0===(null==e||null===(we=e.obj)||void 0===we?void 0:we.sale_mode)?null==e||null===(ye=e.obj)||void 0===ye||null===(Se=ye.product_list[0])||void 0===Se||null===(Be=Se.product_colors[1])||void 0===Be?void 0:Be.roll:(null==e||null===(Ce=e.obj)||void 0===Ce||null===(Te=Ce.product_list[0])||void 0===Te||null===(Pe=Te.product_colors[1])||void 0===Pe?void 0:Pe.length)/100," ",0===(null==e||null===(Ie=e.obj)||void 0===Ie?void 0:Ie.sale_mode)?"条":"m"]}),(0,v.jsxs)(r.G7,{className:H,children:["¥ ",(null==e||null===(ze=e.obj)||void 0===ze||null===(Le=ze.product_list[0])||void 0===Le||null===(Fe=Le.product_colors[1])||void 0===Fe?void 0:Fe.sale_price)/100,"/kg"]})]})})]})]}),(0,v.jsx)(r.G7,{className:J}),(0,v.jsxs)(r.G7,{className:V,children:[(0,v.jsx)(r.G7,{className:Y,children:"布料信息:"}),(0,v.jsxs)(r.G7,{className:Q,children:[null==e||null===(Re=e.obj)||void 0===Re?void 0:Re.total_fabrics," 种面料,",null==e||null===(De=e.obj)||void 0===De?void 0:De.total_colors," 种颜色,共"," ",0===(null==e||null===(Oe=e.obj)||void 0===Oe?void 0:Oe.sale_mode)?null==e||null===(Me=e.obj)||void 0===Me?void 0:Me.total_number:(null==e||null===(Ae=e.obj)||void 0===Ae?void 0:Ae.total_number)/100," ",0===(null==e||null===(Ee=e.obj)||void 0===Ee?void 0:Ee.sale_mode)?"条":"m"]})]}),(0,v.jsxs)(r.G7,{className:V,children:[(0,v.jsx)(r.G7,{className:Y,children:"预估金额:"}),(0,v.jsxs)(r.G7,{className:W,children:["¥",(0,X.yb)(null==e||null===(Ue=e.obj)||void 0===Ue?void 0:Ue.estimate_amount)]})]}),(0,v.jsx)(r.G7,{className:q,children:(0,v.jsx)(K.Z,{obj:null==e?void 0:e.obj,cancle:function cancle(n){var o;return null==e||null===(o=e.cancle)||void 0===o?void 0:o.call(e,n,null==e?void 0:e.obj)},nextBuy:function nextBuy(n){var o;return null==e||null===(o=e.nextBuy)||void 0===o?void 0:o.call(e,n,null==e?void 0:e.obj)},toPay:function toPay(n){var o;return null==e||null===(o=e.toPay)||void 0===o?void 0:o.call(e,n,null==e?void 0:e.obj)}})})]})})),ne="index-module__popupBox___kFbgH",oe="index-module__contBox___CAcdg",te="index-module__topMoney___j8UZV",le="index-module__itemMoney___bJKJg",ie="index-module__leftFont___Tksm8",ae="index-module__rightFont___eYtZ8",ce="index-module__line___YTc2_",se="index-module__itemBox___UJO13",re="index-module__leftItem___drH4s",ue="index-module__leftCrile___YCyu3",de="index-module__lujing___RZRmU",_e="index-module__rightLeft___zeTRC",me="index-module__title___P9e9y",xe="index-module__nums___FDuy6",he="index-module__checkYuan___TH2KO",fe="index-module__gou___eEUoA",pe="index-module__activeChecked___VgIhV",ve="index-module__chakanquanbukehu___XPisv",ge="index-module__sure___vTthp",je="index-module__pic___B9wKm",be=o(1115),Ne=(0,u.memo)((function(e){var n,o,t,l=e.showSide,a=void 0===l||l,d=e.showPopup,_=void 0!==d&&d,m=e.popupClose,x=e.obj,h=void 0===x?{wait_pay_amount:"",actual_amount:"",total_sale_price:""}:x,f=e.clickItem,g=e.handsurePay,j=e.list,b=void 0===j?[]:j,N=e.title,Z=void 0===N?"待支付款项":N,G=e.picUrl,y=void 0===G?"":G,S=(0,u.useRef)({filePath:"",base64:""}),B=(o=(n={scope:"scope.writePhotosAlbum",msg:"您没授权,无法保存图片"}).scope,t=n.msg,{check:(0,u.useCallback)((function(){return new Promise((function(e,n){w().getSetting({success:function success(l){l.authSetting[o]?e(!0):void 0===l.authSetting[o]?w().authorize({scope:o,success:function success(){e(!0)},fail:function fail(){be.Z9.none(t),n(!1)}}):w().openSetting({success:function success(l){l.authSetting[o]?e(!0):(be.Z9.none(t),n(!1))}})}})}))}),[o])}).check,C=function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee(){return(0,i.Z)().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:e.sent&&T();case 4:case"end":return e.stop()}}),_callee)})));return function saveImageCheck(){return e.apply(this,arguments)}}(),T=function saveImage(){be.Z9.loading("正在保存图片"),w().saveImageToPhotosAlbum({filePath:S.current.filePath,success:function success(){be.Z9.success("图片保存成功")},fail:function fail(e){}})};return(0,v.jsx)(r.G7,{className:ne,children:(0,v.jsxs)(k.Z,{show:_,title:Z,onClose:function onClose(){return null==m?void 0:m()},children:[a&&(0,v.jsxs)(r.G7,{className:oe,children:[(0,v.jsxs)(r.G7,{className:te,children:["¥",(0,X.yb)(h.wait_pay_amount)]}),(0,v.jsxs)(r.G7,{className:le,children:[(0,v.jsx)(r.G7,{className:ie,children:"订单金额"}),(0,v.jsxs)(r.G7,{className:ae,children:["¥",(0,X.yb)(h.total_sale_price)]})]}),(0,v.jsxs)(r.G7,{className:le,children:[(0,v.jsx)(r.G7,{className:ie,children:"已付金额"}),(0,v.jsxs)(r.G7,{className:ae,children:["¥",(0,X.yb)(h.actual_amount)]})]}),(0,v.jsx)(r.G7,{className:ce}),b.map((function(e,n){return(0,v.jsxs)(r.G7,{className:se,onClick:function onClick(){return null==f?void 0:f(e)},children:[(0,v.jsxs)(r.G7,{className:re,children:[(0,v.jsx)(r.G7,{className:ue,children:(0,v.jsx)(r.G7,{className:p()("iconfont",e.iconfont,de)})}),(0,v.jsxs)(r.G7,{className:_e,children:[(0,v.jsx)(r.G7,{className:me,children:e.name}),e.fonts&&(0,v.jsxs)(r.G7,{className:xe,children:[e.fonts,""!==e.money?"¥":"",e.money]})]})]}),"扫码支付"!==e.name&&(0,v.jsx)(r.G7,{className:e.checked?pe:he,children:(0,v.jsx)(r.G7,{className:p()("iconfont","icon-lujing",fe)})}),"扫码支付"===e.name&&(0,v.jsx)(r.G7,{className:p()("iconfont","icon-chakanquanbukehu",ve)})]},n)}))]}),a&&(0,v.jsx)(r.G7,{className:ge,onClick:function onClick(){return null==g?void 0:g(null==e?void 0:e.obj)},children:"确认交易"}),!a&&(0,v.jsx)(r.pf,{enhanced:!0,scrollY:!0,style:{height:"700rpx",marginLeft:"24rpx"},children:(0,v.jsx)(r.G7,{className:je,children:(0,v.jsx)(r.Ee,{lazyLoad:!0,mode:"widthFix",style:{width:"100%",height:"100%"},src:y,onClick:function onClick(){return function showImage(){var e=(new Date).valueOf(),n=/data:image\/(\w+);base64,(.*)/.exec(y)||[],o=(0,s.Z)(n,3),t=o[1],l=o[2],i=w().env.USER_DATA_PATH+"/img"+e+"."+t;S.current.filePath=i,S.current.base64=l,w().getFileSystemManager().writeFile({filePath:S.current.filePath,data:S.current.base64,encoding:"base64"}),w().previewImage({current:S.current.filePath,urls:[S.current.filePath]})}()}})})}),!a&&(0,v.jsx)(r.G7,{className:ge,onClick:function onClick(){return C()},children:"保存图片"})]})})}));Page((0,t.createPageConfig)((function(){var e,n=(0,u.useState)({status:-1,page:1,size:10,name:""}),o=(0,s.Z)(n,2),t=o[0],_=o[1],m=(0,d.Vy)(),x=m.fetchData,h=m.state,f=(0,u.useState)({list:[],total:0}),y=(0,s.Z)(f,2),S=y[0],B=y[1],C=function(){var e=(0,c.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,x((0,a.Z)((0,a.Z)({},(0,b.mB)(t)),(0,b.mB)(ne)));case 2:e=n.sent,B((function(n){var o,t;return(0,a.Z)((0,a.Z)({},n),{},{list:null===(o=e.data)||void 0===o?void 0:o.list,total:null===(t=e.data)||void 0===t?void 0:t.total})})),W(!1),z((function(){return!1}));case 6:case"end":return n.stop()}}),_callee)})));return function getOrderList(){return e.apply(this,arguments)}}(),T=(0,u.useState)(!1),P=(0,s.Z)(T,2),I=P[0],z=P[1],L=function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee2(){return(0,i.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:R.current.size=1,z(!0),_((function(e){return(0,a.Z)((0,a.Z)({},e),{},{size:10})}));case 3:case"end":return e.stop()}}),_callee2)})));return function getRefresherRefresh(){return e.apply(this,arguments)}}(),F=(0,u.useMemo)((function(){return(0,b.rA)({list:S.list,total:S.total,status:h.loading})}),[S,h]),R=(0,u.useRef)({size:t.size,page:t.page}),D=(0,u.useCallback)((function(){if(S.list.length