"use strict";require("./sub-vendors.js");require("./sub-common/ba01bce307afcc9a88c0b242d7eb7cf5.js");require("./sub-common/004f11aaa141116253254b2d9892879c.js");require("./sub-common/e4015d998cf50ca1ca7b34bced9738a8.js");require("./sub-common/63bf87d821bca5788c0f93a9e30ef482.js");require("./sub-common/46fea72589f2422b6f2b110cd2878dd5.js");require("./sub-common/cfc73dead13629e0abcc62d612a93153.js");require("./sub-common/2b286cb83c3ba825c8232e7f0e8d98e4.js");require("./sub-common/79dce9cedae514998e78ea49450e892a.js");require("./sub-common/2d6c1e74d7f6aeec909c38802e94be4d.js");require("./sub-common/e2bfd15678b26a24e9970acd7bc73315.js");require("./sub-common/bd58a99800ec9985133b8fafd773d720.js");require("./sub-common/e2481df95dcfca6405afd70563fc6267.js");require("./sub-common/441b7df64c632cf467bebf9085faa6f7.js");require("./sub-common/ed5a4ee8a8d67749b720c65671b82a9a.js");(wx.webpackJsonp=wx.webpackJsonp||[]).push([[6299],{5661:function(e,_,n){var r=n(2180),s=n(1413),l=n(4165),t=n(5861),d=n(9439),o=n(1515),i=n(2954),a=n.n(i),u=n(7294),c=n(4184),m=n.n(c),x={common_safe_area_y:"index-module__common_safe_area_y___LEjvm",hoverClass:"index-module__hoverClass___TlICm","full-100":"index-module__full-100___AoenO",address_main:"index-module__address_main___ojE6Z",address_title_tag:"index-module__address_title_tag___RdFYL",miconfont:"index-module__miconfont___v00kJ",order_address:"index-module__order_address___DR3kh",order_address_icon:"index-module__order_address_icon___uwaH6",order_address_text_con:"index-module__order_address_text_con___NkGeI",order_address_text_title:"index-module__order_address_text_title___WRdZF",moreIconfont:"index-module__moreIconfont___JlIWE",address_text:"index-module__address_text___cr303",order_address_text_name:"index-module__order_address_text_name___hdzdZ",updateBtn:"index-module__updateBtn___xHpZZ"},h=n(8629),f=n(5893),v=(0,u.memo)((function(e){var _=e.orderInfo,n=e.onLogistics,r=h.tp.ReturnStageApplying,s=h.tp.ReturnStageWaitCheck,l=(h.tp.ReturnStageChecked,h.tp.ReturnStageReturned,h.tp.ReturnStageCancel),t=(h.tp.ReturnStageQualityCheckPendingRefund,h.tp.ReturnStageServiceOrderPendingRefund,h.tp.ReturnStageRejected),d=h.T_.ReturnApplyOrderTypeAdvanceReceiptRefund,i=(h.T_.ReturnApplyOrderTypeReturnForRefund,h.T_.ReturnApplyOrderTypeSalesRefund),a=(0,u.useMemo)((function(){var e=[r.value,l.value,t.value],n=[i.value,d.value];return!e.includes(null==_?void 0:_.stage)&&1!=(null==_?void 0:_.sale_mode)&&!n.includes(null==_?void 0:_.type)}),[_]),c=(0,u.useMemo)((function(){return(null==_?void 0:_.stage)==s.value}),[_]);return(0,f.jsx)(f.Fragment,{children:a&&(0,f.jsxs)(o.G7,{className:x.address_main,children:[(0,f.jsxs)(o.G7,{className:x.address_title_tag,children:[(0,f.jsx)(o.xv,{className:m()(x.miconfont,"iconfont icon-zhuyi")}),"请按以下退货地址寄回货物并提供退货物流信息"]}),(0,f.jsxs)(o.G7,{className:x.order_address,children:[(0,f.jsx)(o.G7,{className:m()(x.order_address_icon,"iconfont","icon-fahuo")}),(0,f.jsxs)(o.G7,{className:x.order_address_text_con,children:[(0,f.jsx)(o.G7,{className:x.order_address_text_title,children:(0,f.jsx)(o.xv,{className:m()(x.address_text,x.address_text_no),children:null==_?void 0:_.return_address})}),(0,f.jsxs)(o.G7,{className:x.order_address_text_name,children:[(0,f.jsx)(o.xv,{children:null==_?void 0:_.return_user_name}),(0,f.jsx)(o.xv,{children:null==_?void 0:_.return_user_phone}),c&&(0,f.jsx)(o.G7,{className:x.updateBtn,onClick:function onClick(){return null==n?void 0:n(1)},children:"上传物流"})||(0,f.jsx)(o.G7,{className:x.updateBtn,onClick:function onClick(){return null==n?void 0:n(2)},children:"查看物流"})]})]})]})]})})})),p=n(4251),j={common_safe_area_y:"index-module__common_safe_area_y___e2tTS",hoverClass:"index-module__hoverClass___ZlbH1","full-100":"index-module__full-100___hDXU8",content_box:"index-module__content_box___mzC5l",content_box_title:"index-module__content_box_title___jWqcy"},g=(0,u.memo)((function(e){var _=e.children,n=e.title,r=void 0===n?"":n;return(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(o.G7,{className:j.content_box,children:[(0,f.jsx)(o.G7,{className:j.content_box_title,children:r}),(0,f.jsx)(o.G7,{className:j.content_box_con,children:_})]})})})),N="index-module__kindsList_main___i7chi",b="index-module__orders_list_con___dH15e",G="index-module__orders_return_title___Koohz",k="index-module__order_list___LcCwk",C="index-module__order_list_title___eZ7Wq",y="index-module__tag___iXTP_",R="index-module__title___FBMYT",w="index-module__num___TrMB3",S="index-module__order_list_scroll___klzB4",Z="index-module__order_list_item___G7oXD",P="index-module__order_list_item_img___n4cHw",I="index-module__order_list_item_con___A2V0O",A="index-module__order_list_item_des___wNtc1",B="index-module__order_list_item_title___HQfXk",D="index-module__order_list_item_price___hciRV",M="index-module__order_list_item_count___eKNft",T="index-module__count_num___It3qv",q="index-module__count_price___nBz0Z",F="index-module__order_total___krKPF",O="index-module__order_estimated_amount___dXAd2",H="index-module__inspection___mCgPq",W="index-module__inspection_title___UtIF5",z="index-module__inspection_con___sqJpo",L="index-module__miconfont___r_q0H",J=n(4158),V=n(2232),E=n(6599),Q=(0,u.memo)((function(e){var _=e.order,n=(e.comfirm,h.tp.ReturnStageApplying,h.tp.ReturnStageWaitCheck,h.tp.ReturnStageChecked,h.tp.ReturnStageReturned),r=(h.tp.ReturnStageCancel,h.tp.ReturnStageQualityCheckPendingRefund),l=h.tp.ReturnStageServiceOrderPendingRefund,t=(h.tp.ReturnStageRejected,[{id:5,value:[n.value],label:"合计金额",field:"total_refund_amount",message:"按原单价*退货重量的金额"},{id:1,value:[n.value],label:"扣款金额",field:"other_deduction_amount",message:"本次售后扣款金额"},{id:3,value:[n.value],label:"退款金额",field:"refund_amount",message:"本次售后应退款金额"},{id:4,value:[n.value],label:"退款去向",field:"refund_flow_name",message:"本次售后退款金额去向"}]),d=(0,u.useCallback)((function(e){return e.value.includes(null==_?void 0:_.stage)}),[_]),i=(0,u.useMemo)((function(){if(_)return(0,f.jsx)(f.Fragment,{children:t.map((function(e){return(0,f.jsx)(f.Fragment,{children:d(e)&&(0,f.jsx)(V.Z,{messageTitle:e.message,number:_[e.field],numberFormat:4==e.id?"text":"number",title:e.label},e.id)})}))})}),[_]),a=(0,u.useCallback)((function(e){return 0==(null==_?void 0:_.sale_mode)?e.roll:Number(e.length/100)}),[_]),c=(0,u.useCallback)((function(e){return"".concat((0,J.yb)(e).toLocaleString(),"/").concat(1==(null==_?void 0:_.sale_mode)?"m":"kg")}),[_]),x=(0,u.useMemo)((function(){if(_){if(null!=_&&_.is_quality_check){var e=0==(null==_?void 0:_.sale_mode)?null==_?void 0:_.quality_check_pass_number:(null==_?void 0:_.quality_check_pass_number)/100;return"".concat(null==_?void 0:_.quality_check_pass_fabrics," 种面料,").concat(null==_?void 0:_.quality_check_pass_colors," 种颜色,共 ").concat(e," ").concat(null==_?void 0:_.unit)}var n=0==(null==_?void 0:_.sale_mode)?null==_?void 0:_.total_number:(null==_?void 0:_.total_number)/100;return"".concat(null==_?void 0:_.total_fabrics," 种面料,").concat(null==_?void 0:_.total_colors," 种颜色,共 ").concat(n," ").concat(null==_?void 0:_.unit)}}),[_]),v=(0,u.useMemo)((function(){return null!=_&&_.is_quality_check?null==_?void 0:_.quality_check_pass_product:null==_?void 0:_.product_list}),[_]),p=(0,u.useCallback)((function(e){return{lab:(0,s.Z)({},null==e?void 0:e.lab),rgb:(0,s.Z)({},null==e?void 0:e.rgb),texturl_url:null==e?void 0:e.texturl_url}}),[]),j=(0,u.useMemo)((function(){return(null==_?void 0:_.stage)!=l.value&&(null==_?void 0:_.stage)!=r.value}),[_]),g=(0,u.useCallback)((function(e){return n.value==(null==_?void 0:_.stage)&&(0,f.jsxs)(o.G7,{className:q,children:[(0,f.jsx)("text",{children:"¥"}),(0,J.yb)(e.estimate_amount,100,!0)]})}),[_]);return(0,f.jsxs)(o.G7,{className:N,children:[(null==v?void 0:v.length)>0&&(0,f.jsxs)(o.G7,{className:b,children:[(0,f.jsx)(o.G7,{className:G,children:1==(null==_?void 0:_.type)?"退货信息":"退款信息"}),null==v?void 0:v.map((function(e){var r,s;return(0,f.jsxs)(o.G7,{className:k,children:[(0,f.jsxs)(o.G7,{className:C,children:[(0,f.jsx)(o.G7,{className:y,children:_.sale_mode_name}),(0,f.jsx)(o.G7,{className:R,children:(0,J.W7)(e.code,e.name)}),(0,f.jsxs)(o.G7,{className:w,children:["共",null==e||null===(r=e.product_colors)||void 0===r?void 0:r.length,"种"]})]}),(0,f.jsx)(o.G7,{className:S,children:null==e||null===(s=e.product_colors)||void 0===s?void 0:s.map((function(e){return(0,f.jsxs)(o.G7,{className:Z,children:[(0,f.jsx)(o.G7,{className:P,children:(0,f.jsx)(E.Z,{value:p(e)})}),(0,f.jsxs)(o.G7,{className:I,children:[(0,f.jsxs)(o.G7,{className:A,children:[(0,f.jsx)(o.G7,{className:B,children:"".concat(e.code," ").concat(e.name)}),(0,f.jsxs)(o.G7,{className:D,children:[j&&(0,f.jsxs)(o.xv,{children:["¥",c(e.sale_price)]}),(null==_?void 0:_.stage)==n.value&&(0,f.jsxs)(o.xv,{children:["总重",(0,J.$y)(e.estimate_weight),"kg"]})]})]}),(0,f.jsxs)(o.G7,{className:M,children:[(0,f.jsxs)(o.G7,{className:T,children:["×",a(e),(0,f.jsx)("text",{children:_.unit})]}),g(e)]})]})]},e.id)}))})]},e.product_code)})),(0,f.jsxs)(o.G7,{className:F,children:[(0,f.jsx)(o.xv,{children:"合计"}),(0,f.jsx)(o.xv,{children:x})]}),(0,f.jsx)(o.G7,{className:O,children:i})]}),(null==v?void 0:v.length)<=0&&(null==_?void 0:_.is_quality_check)&&(0,f.jsxs)(o.G7,{className:H,children:[(0,f.jsx)(o.G7,{className:W,children:"质检情况"}),(0,f.jsxs)(o.G7,{className:z,children:[(0,f.jsx)(o.xv,{className:m()("iconfont icon-zhuyi",L)}),"没有质检通过的商品,无法退款"]})]})]})})),U="index-module__order_flow_state___ySzaa",X="index-module__order_status_list___sYujP",K="index-module__order_status_list_show___VftUJ",Y="index-module__order_status_item___oxC5t",$="index-module__order_status_tail_end___yowLa",ee="index-module__order_status_tail___WfJYO",_e="index-module__order_status_line___DRrHH",ne="index-module__order_status_content___HME_M",re="index-module__order_status_title___r48za",se="index-module__order_status_time___lLA06",le="index-module__order_status_select____MWQj",te="index-module__order_status_des___dmRVG",de="index-module__order_status_des_select___PaFkj",oe="index-module__more___gOH15",ie="index-module__miconfonts___P_JCN",ae="index-module__open_miconfonts___iXcG7",ue=(0,u.memo)((function(e){var _=e.orderInfo,n=void 0===_?{logistics_details:[],payment_method:0,status:0}:_,r=(e.onRefresh,(0,u.useState)(!1)),s=(0,d.Z)(r,2),l=s[0],t=s[1],i=(0,u.useMemo)((function(){return n.logistics_details?null==n?void 0:n.logistics_details.reverse():[]}),[n.logistics_details]);h.DF.SaleorderstatusWaitingPrePayment;return(0,f.jsx)(f.Fragment,{children:(null==i?void 0:i.length)>0&&(0,f.jsxs)(o.G7,{className:U,children:[(0,f.jsx)(o.G7,{className:m()(X,l&&K),children:i.map((function(e,_){return(0,f.jsxs)(o.G7,{className:Y,children:[i.length>1&&(0,f.jsx)(o.G7,{className:m()(ee,0==_&&$)}),i.length!=_+1&&(0,f.jsx)(o.G7,{className:_e}),(0,f.jsxs)(o.G7,{className:ne,children:[(0,f.jsx)(o.G7,{className:m()(re,0==_&&le),children:e.status}),(0,f.jsx)(o.G7,{className:m()(se,0==_&&le),children:(0,J.o0)(e.time)})]}),(0,f.jsx)(o.xv,{className:m()(te,0==_&&de),children:e.desc})]})}))}),i.length>2&&(0,f.jsxs)(o.G7,{className:oe,onClick:function onClick(){return function changeMore(){t((function(){return!l}))}()},children:[(0,f.jsx)(o.xv,{children:l?"收起详情":"点击查看详情"}),(0,f.jsx)(o.xv,{className:m()("iconfont icon-a-moreback",ie,l&&ae)})]})]})})})),ce=n(6256),me=n(377),xe={common_safe_area_y:"index-module__common_safe_area_y___OLcP_",hoverClass:"index-module__hoverClass___LwQgR","full-100":"index-module__full-100___SDZwy",order_main:"index-module__order_main___EhuNb",content:"index-module__content___oiD3P",order_title:"index-module__order_title___imu4J",order_status:"index-module__order_status___VhqaN",order_desc:"index-module__order_desc___jWCQ8",order_desc_con:"index-module__order_desc_con___Ri3Pc",order_desc_text:"index-module__order_desc_text___EVR6r",order_desc_text_hint:"index-module__order_desc_text_hint___g2H8x",miconfont:"index-module__miconfont___uf6Rd",submit_order:"index-module__submit_order___zDWpl",order_btn:"index-module__order_btn___E0QHr",order_btn_select:"index-module__order_btn_select___XKN3Q",order_number_desc:"index-module__order_number_desc___VuBCw",order_info:"index-module__order_info___M1t9B",order_info_title:"index-module__order_info_title___wSa7B",order_num:"index-module__order_num___wDQJt",order_num_btn:"index-module__order_num_btn___qfovT",after_sale_picture_list:"index-module__after_sale_picture_list___F60ty",after_sale_picture_item:"index-module__after_sale_picture_item___CAWrd",weight_memo_con:"index-module__weight_memo_con___kVwgj"},he=n(4408),fe=n(6027),ve=n(1113),pe=n(3275),je=n(6353),ge=n(1341),Ne=n(9194),be=n(9498),Ge=function OrderDes(e){var _=e.orderInfo,n=function clipboardData(e){a().setClipboardData({data:e,success:function success(e){a().showToast({icon:"none",title:"复制成功"})}})};return(0,f.jsxs)(o.G7,{className:xe.order_info,children:[(0,f.jsx)(o.G7,{className:xe.order_info_title,children:"订单信息"}),(0,f.jsx)(fe.Z,{showBorder:!1,title:"售后单号",height:"50rpx",children:(0,f.jsxs)(o.G7,{className:xe.order_num,children:[(0,f.jsx)(o.xv,{children:null==_?void 0:_.return_order_no}),(0,f.jsx)(o.G7,{className:xe.order_num_btn,onClick:function onClick(){return n(null==_?void 0:_.return_order_no)},children:"复制"})]})}),(0,f.jsx)(fe.Z,{showBorder:!1,title:"订单号",height:"50rpx",children:(0,f.jsxs)(o.G7,{className:xe.order_num,children:[(0,f.jsx)(o.xv,{children:null==_?void 0:_.order_no}),(0,f.jsx)(o.G7,{className:xe.order_num_btn,onClick:function onClick(){return n(null==_?void 0:_.order_no)},children:"复制"})]})}),(0,f.jsx)(fe.Z,{showBorder:!1,title:"退货原因",height:"50rpx",children:(0,f.jsx)(o.xv,{children:null==_?void 0:_.return_reason_name})}),(0,f.jsx)(fe.Z,{showBorder:!1,title:"退货说明",height:"50rpx",children:(0,f.jsx)(o.xv,{children:null==_?void 0:_.return_explain_name})}),(0,f.jsx)(fe.Z,{showBorder:!1,title:"货物状况",height:"50rpx",children:(0,f.jsx)(o.xv,{children:null==_?void 0:_.goods_status_name})}),(0,f.jsx)(fe.Z,{showBorder:!1,title:"申请时间",height:"50rpx",children:(0,f.jsx)(o.xv,{children:(0,J.o0)(null==_?void 0:_.apply_time)})}),(0,f.jsx)(fe.Z,{showBorder:!1,title:"其它说明",height:"auto",children:(0,f.jsx)(o.xv,{children:null==_?void 0:_.reason_describe})})]})},ke=(0,u.memo)(Ge),Ce=function AfterSalePricture(e){var _=e.urls,n=void 0===_?[]:_,r=(0,u.useMemo)((function(){return n.map((function(e){return(0,J.z)(e,"!w800")}))}),[n]),s=function showImage(){a().previewImage({current:r[0],urls:r})};return(0,f.jsx)(g,{title:"售后图片",children:(0,f.jsx)(o.G7,{className:xe.after_sale_picture_list,children:null==n?void 0:n.map((function(e,_){return(0,f.jsx)(o.G7,{className:xe.after_sale_picture_item,onClick:s,children:(0,f.jsx)(o.Ee,{src:(0,J.z)(e)})},_)}))})})},ye=(0,u.memo)(Ce),Re=function SalesAfter(){(0,he.Z)(),(0,be.av)("pages/salesAfter/index");var e=(0,i.useRouter)(),_=(0,u.useRef)(Number(e.params.id)),n=(0,u.useState)(),r=(0,d.Z)(n,2),c=r[0],m=r[1],x=(0,pe.vu)().fetchData,h=function(){var e=(0,t.Z)((0,l.Z)().mark((function _callee(){var e;return(0,l.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:if(!_.current){n.next=5;break}return n.next=3,x({id:_.current});case 3:e=n.sent,m(e.data);case 5:a().stopPullDownRefresh();case 6:case"end":return n.stop()}}),_callee)})));return function getSaleOrderPreView(){return e.apply(this,arguments)}}(),j=(0,u.useState)(),g=(0,d.Z)(j,2),N=g[0],b=g[1],G=(0,u.useMemo)((function(){return N}),[N]);(0,i.usePullDownRefresh)((function(){h()})),(0,i.useDidShow)((function(){h()}));var k=(0,u.useMemo)((function(){return(0,s.Z)({},c)}),[c]),C=(0,u.useState)(!1),y=(0,d.Z)(C,2),R=y[0],w=y[1],S=(0,u.useState)(!1),Z=(0,d.Z)(S,2),P=Z[0],I=Z[1],A=(0,u.useCallback)((function(e){w(!0),1!=e&&I(!0)}),[]),B=(0,u.useCallback)((function(){w(!1)}),[]),D=(0,u.useCallback)((function(){w(!1),h()}),[]),M=(0,u.useState)(!1),T=(0,d.Z)(M,2),q=T[0],F=T[1],O=(0,u.useState)(!1),H=(0,d.Z)(O,2),W=H[0],z=H[1],L=(0,Ne.v)((function(e){return e.userInfo})),V=(0,u.useCallback)((function(e,_){1==e||6==e?(h(),1===e&&(0,ge.aB)({page_name:"pages/salesAfter/index",order_number:_.return_apply_order_id,order_type:_.sale_mode,trigger_time:(0,J.o0)(new Date),purchaser_name:L.adminUserInfo.user_name||"未知用户",purchaser_id:L.adminUserInfo.user_id||0})):8==e?F(!0):5==e?A(1):7==e&&(z(!0),(0,ge.CF)({page_name:"pages/salesAfter/index",order_number:_.return_apply_order_id,order_type:_.sale_mode,trigger_time:(0,J.o0)(new Date),purchaser_name:L.adminUserInfo.user_name||"未知用户",purchaser_id:L.adminUserInfo.user_id||0}))}),[c]);return(0,u.useEffect)((function(){c&&function formatData(){b((0,s.Z)((0,s.Z)({},c),{},{unit:0==c.sale_mode?"条":"m"}))}()}),[c]),(0,f.jsx)(je.Z,{pageName:"pages/salesAfter/index",showList:["order"],messageTitle:null==c?void 0:c.return_order_no,messagePath:"/pages/salesAfter/index?id=".concat(null==c?void 0:c.id),showCart:!0,children:(0,f.jsxs)(o.G7,{className:xe.order_main,children:[(0,f.jsxs)(o.G7,{className:xe.content,style:{padding:"20rpx"},children:[(0,f.jsx)(ue,{orderInfo:c}),(0,f.jsx)(v,{orderInfo:c,onLogistics:A}),(0,f.jsx)(Q,{order:G}),(0,f.jsx)(ke,{orderInfo:c}),(0,f.jsx)(ye,{urls:null==c?void 0:c.fabric_piece_accessory_url})]}),(0,f.jsx)(o.G7,{className:xe.button_bar,children:(0,f.jsx)(ve.Z,{orderInfo:k,onClick:V})}),(0,f.jsx)(ce.Z,{onlyRead:P,images:null==c?void 0:c.accessory_url,descValue:null==c?void 0:c.take_goods_remark,show:R,id:null==c?void 0:c.return_apply_order_id,onClose:B,onSubmit:D}),(0,f.jsx)(p.Z,{show:q,id:null==c?void 0:c.id,onClose:function onClose(){return F(!1)}}),(0,f.jsx)(me.Z,{orderInfo:c,show:W,onClose:function onClose(){return z(!1)}})]})})};Re.enableShareAppMessage=!0;Page((0,r.createPageConfig)(Re,"pages/salesAfter/index",{root:{cn:[]}},{navigationBarTitleText:"售后详情",enablePullDownRefresh:!0,backgroundTextStyle:"dark",enableShareAppMessage:!0}||{}))}},function(e){e.O(0,[303,9760,9498,7563,8556,1515,5848,9972,8515,3479,1167,7706,1287,9303,1977,4044,4235,3676,6379,3847,2107,1216,8592],(function(){return _=5661,e(e.s=_);var _}));e.O()}]);