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

1 line
14 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";require("../sub-vendors.js");require("../sub-common/db6cc8fba2c34d36042a60bcf5f10485.js");require("../sub-common/510d0e7078f44d770a0720344fb06369.js");require("../sub-common/0762d0d2445fe1200cae192cedb39f4b.js");require("../sub-common/cf216475951e5960bcea5b5b9d46933b.js");require("../sub-common/ba01bce307afcc9a88c0b242d7eb7cf5.js");require("../sub-common/004f11aaa141116253254b2d9892879c.js");require("../sub-common/63bf87d821bca5788c0f93a9e30ef482.js");require("../sub-common/46fea72589f2422b6f2b110cd2878dd5.js");require("../sub-common/2b286cb83c3ba825c8232e7f0e8d98e4.js");require("../sub-common/e2481df95dcfca6405afd70563fc6267.js");require("../sub-common/441b7df64c632cf467bebf9085faa6f7.js");require("../sub-common/ed5a4ee8a8d67749b720c65671b82a9a.js");(wx.webpackJsonp=wx.webpackJsonp||[]).push([[2145],{2346:function(e,n,l){var r=l(2180),o=l(1413),t=l(4165),s=l(3433),a=l(5861),u=l(9439),i=l(1515),c=l(2954),_=l(7294),d=l(4251),m=l(6256),f=l(377),x="index-module__order_list_main___Wd_ek",p="index-module__title___pJib_",v="index-module__order_list___bMLaq",h="index-module__order_item_con___zAB9T",g=l(4184),j=l.n(g),b="index-module__tag___dwDmk",Z="index-module__miconfont___xKM9z",k="index-module__saleReturn_tag___jRnTa",N="index-module__refund_tag___n3mo9",G=l(8629),y=l(5893),C=(0,_.memo)((function(e){var n=e.status,l=void 0===n?0:n,r=(G.T_.ReturnApplyOrderTypeAdvanceReceiptRefund,G.T_.ReturnApplyOrderTypeReturnForRefund);G.T_.ReturnApplyOrderTypeSalesRefund;return(0,y.jsx)(y.Fragment,{children:0!==l&&(0,y.jsxs)(i.G7,{className:j()(b,l!=r.value?N:k),children:[(0,y.jsx)(i.G7,{className:j()(Z,"iconfont icon-yucunkuan")}),(0,y.jsx)(i.xv,{children:l==r.value?"退货":"退款"})]})})})),S={common_safe_area_y:"index-module__common_safe_area_y___srZOc",hoverClass:"index-module__hoverClass___bK8UT","full-100":"index-module__full-100___X8B5n",order_item:"index-module__order_item___ruzVV",header:"index-module__header___v5DHZ",user:"index-module__user___QCwIE",name:"index-module__name___mmiXf",order_con:"index-module__order_con___T8S8k",order_num:"index-module__order_num___VWloq",order_num_con:"index-module__order_num_con___dYGEU",miconfont:"index-module__miconfont___R0HEh",tag:"index-module__tag___B3Ob7",product_title:"index-module__product_title___JYETo",product_tag:"index-module__product_tag___MINOf",product_name:"index-module__product_name___OdtJl",product_status:"index-module__product_status___wqrzV",product_list:"index-module__product_list___cLpgf",image:"index-module__image___WBUk8",color_num:"index-module__color_num___r2djW",color_list:"index-module__color_list___AEsu0",color_item:"index-module__color_item___wciGQ",color_title:"index-module__color_title___mYenC",color_more:"index-module__color_more___AAR4M",color_count_num:"index-module__color_count_num___Gb8bD",refund_amount:"index-module__refund_amount___duWOY",order_number:"index-module__order_number___Zci4I",inspection:"index-module__inspection___vzj3E"},A=l(1115),R=l(4158),I=l(1113),w=l(6599),T=l(9194),O=(0,_.memo)((function(e){var n,l,r,t,s,a=e.value,u=e.onClickBtn,c=(0,T.v)((function(e){return e.userInfo})),d=(0,_.useCallback)((function(e,n){return 0==n?"".concat(e.roll,"条"):"".concat(Number(e.length/100),"米")}),[a]),m=(0,_.useCallback)((function(e,n){return"".concat((0,R.yb)(e).toLocaleString(),"/").concat(1==n?"m":"kg")}),[a]),f=(0,_.useCallback)((function(e){null==u||u({status:e,orderInfo:a})}),[a]),x=(0,_.useMemo)((function(){return a}),[a]),p=(0,_.useMemo)((function(){return{lab:(0,o.Z)({},null==a?void 0:a.lab),rgb:(0,o.Z)({},null==a?void 0:a.rgb),texturl_url:null==a?void 0:a.texturl_url}}),[a]),v=G.T_.ReturnApplyOrderTypeReturnForRefund,h=(0,_.useMemo)((function(){if(null!=a&&a.is_quality_check){var e=0==(null==a?void 0:a.sale_mode)?null==a?void 0:a.quality_check_pass_number:(null==a?void 0:a.quality_check_pass_number)/100;return"".concat(null==a?void 0:a.quality_check_pass_fabrics," 种面料,").concat(null==a?void 0:a.quality_check_pass_colors," 种颜色,共 ").concat(e).concat(0==(null==a?void 0:a.sale_mode)?" 条":" 米")}var n=0==(null==a?void 0:a.sale_mode)?null==a?void 0:a.total_number:(null==a?void 0:a.total_number)/100;return"".concat(null==a?void 0:a.total_fabrics," 种面料,").concat(null==a?void 0:a.total_colors," 种颜色,共 ").concat(n).concat(0==(null==a?void 0:a.sale_mode)?" 条":" 米")}),[a]),g=G.tp.ReturnStageQualityCheckPendingRefund,b=G.tp.ReturnStageServiceOrderPendingRefund,Z=G.tp.ReturnStageReturned,k=(0,_.useMemo)((function(){return[g.value,b.value].includes(null==a?void 0:a.stage)?"待退款":null==a?void 0:a.stage_name}),[a]),N=(0,_.useMemo)((function(){return(null!=a&&a.is_quality_check?null==a?void 0:a.quality_check_pass_product:null==a?void 0:a.product_list)||[]}),[a]);return(0,y.jsxs)(i.G7,{className:S.order_item,children:[(0,y.jsxs)(i.G7,{className:S.header,onClick:function onClick(){return(0,A.jD)("/pages/salesAfter/index",{id:null==a?void 0:a.id})},children:[(0,y.jsx)(i.G7,{className:S.user,children:(0,y.jsx)(i.Ee,{src:"".concat(null==c||null===(n=c.adminUserInfo)||void 0===n?void 0:n.avatar_url)})}),(0,y.jsxs)(i.G7,{className:S.order_con,children:[(0,y.jsx)(i.xv,{className:S.name,children:null==c||null===(l=c.adminUserInfo)||void 0===l?void 0:l.user_name}),(0,y.jsxs)(i.G7,{className:S.order_num,children:[(0,y.jsxs)(i.G7,{className:S.order_num_con,children:[(0,y.jsxs)(i.xv,{className:S.order_no,children:["售后单号:",null==a?void 0:a.return_order_no]}),(0,y.jsx)(i.xv,{className:j()(S.miconfont,"iconfont, icon-a-moreback")})]}),(0,y.jsx)(C,{status:null==a?void 0:a.type})]})]})]}),(null==N?void 0:N.length)>0&&(0,y.jsxs)(i.G7,{className:S.product_con,onClick:function onClick(){return(0,A.jD)("/pages/salesAfter/index",{id:null==a?void 0:a.id})},children:[(0,y.jsxs)(i.G7,{className:S.product_title,children:[(0,y.jsx)(i.G7,{className:S.product_tag,children:null==a?void 0:a.sale_mode_name}),(0,y.jsx)(i.G7,{className:S.product_name,children:(0,R.W7)(null==N?void 0:N[0].code,null==N?void 0:N[0].name)}),(0,y.jsx)(i.G7,{className:S.product_status,children:k})]}),(0,y.jsxs)(i.G7,{className:S.product_list,children:[(0,y.jsxs)(i.G7,{className:S.image,children:[(0,y.jsx)(w.Z,{value:p}),(0,y.jsx)(i.G7,{className:S.color_num,children:null==N||null===(r=N[0].product_colors)||void 0===r?void 0:r[0].code})]}),(0,y.jsxs)(i.G7,{className:S.color_list,children:[null==N||null===(t=N[0].product_colors)||void 0===t?void 0:t.map((function(e,n){return n<=1&&(0,y.jsxs)(i.G7,{className:S.color_item,children:[(0,y.jsx)(i.G7,{className:S.color_title,children:(0,R.W7)(e.code,e.name)}),(0,y.jsxs)(i.G7,{className:S.color_price,children:["¥",m(e.sale_price,a.sale_mode)]}),(0,y.jsxs)(i.G7,{className:S.color_num,children:["×",d(e,a.sale_mode)]})]})})),(null==N||null===(s=N[0].product_colors)||void 0===s?void 0:s.length)>2&&(0,y.jsxs)(i.G7,{className:S.color_item,children:[(0,y.jsx)(i.G7,{className:S.color_more,children:"……"}),(0,y.jsx)(i.G7,{className:S.color_more,children:"……"}),(0,y.jsx)(i.G7,{className:S.color_more,children:"……"})]})]})]}),(0,y.jsxs)(i.G7,{className:S.color_count_num,children:[(0,y.jsx)(i.xv,{children:h}),Z.value==(null==a?void 0:a.stage)&&(0,y.jsxs)(i.xv,{className:S.refund_amount,children:[(0,y.jsx)(i.xv,{children:"¥"}),(0,R.yb)(null==a?void 0:a.refund_amount,100,!0)]})]}),(0,y.jsxs)(i.G7,{className:S.order_number,children:[(0,y.jsx)(i.xv,{children:(null==a?void 0:a.type)==v.value?"已申请退货":"已申请退款"}),(0,y.jsxs)(i.xv,{children:["订单号:",null==a?void 0:a.order_no]})]})]}),(null==N?void 0:N.length)<=0&&(null==a?void 0:a.is_quality_check)&&(0,y.jsxs)(i.G7,{className:S.inspection,onClick:function onClick(){return(0,A.jD)("/pages/salesAfter/index",{id:null==a?void 0:a.id})},children:[(0,y.jsx)(i.xv,{className:j()("iconfont icon-zhuyi",S.miconfont)}),"没有质检通过的商品,无法退款"]}),(0,y.jsx)(I.Z,{orderInfo:x,onClick:f,fixedBottom:!1})]})})),z="index-module__order_status_list___twnxE",M="index-module__order_status_item___k_NQ5",E="index-module__selected___rOKTA",L="index-module__order_list_scroll___AMxCL",q=(0,_.memo)((function(e){var n=e.list,l=void 0===n?[]:n,r=e.defaultId,t=void 0===r?null:r,s=e.onSelect,a=(0,_.useState)({selected:-1,tabId:""}),c=(0,u.Z)(a,2),d=c[0],m=c[1];(0,_.useEffect)((function(){if(t){var e=null==l?void 0:l.findIndex((function(e){return console.log(e.id,t),e.id==t}));if(-1!==e){var n=e>0?e-1:0;m((function(e){return(0,o.Z)((0,o.Z)({},e),{},{tabId:l[n].id.toString()})}))}}}),[t]);return(0,y.jsx)(i.G7,{className:z,children:(0,y.jsx)(i.pf,{scrollX:!0,scrollIntoView:"tabs_".concat(d.tabId),scrollWithAnimation:!0,children:(0,y.jsx)(i.G7,{className:L,children:l.map((function(e,n){return(0,y.jsx)(i.G7,{id:"tabs_".concat(e.id),onClick:function onClick(){return function clickEvent(e){var n=e.item,r=e.index,t=r>0?r-1:0;m((function(e){return(0,o.Z)((0,o.Z)({},e),{},{tabId:l[t].id.toString(),selected:n.id})})),null==s||s(n.id)}({item:e,index:n})},className:j()(M,d.selected==e.id&&E),children:e.name},e.id)}))})})})})),B=l(2711),D=l(8093),U=l(3275),W=l(4408),V=l(7317),J=l(1341),F=l(9498),P=function SalesAfterList(){(0,W.Z)(),(0,F.av)("pages/salesAfter/salesAfterList/index");var e=(0,_.useState)({status:null,page:1,size:10,name:""}),n=(0,u.Z)(e,2),l=n[0],r=n[1],g=(0,_.useState)([{id:-1,name:"全部"}]),j=(0,u.Z)(g,2),b=j[0],Z=j[1],k=(0,U.cU)().fetchData,N=function(){var e=(0,a.Z)((0,t.Z)().mark((function _callee(){var e;return(0,t.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,k();case 2:e=n.sent,Z((function(n){return[].concat((0,s.Z)(n),(0,s.Z)(e.data.list))}));case 4:case"end":return n.stop()}}),_callee)})));return function getOrderStatusList(){return e.apply(this,arguments)}}();(0,_.useEffect)((function(){N(),r((function(e){return(0,o.Z)((0,o.Z)({},e),{},{status:-1})}))}),[]);var G=(0,U.m8)(),C=G.fetchData,S=G.state,A=(0,_.useState)({list:[],total:0}),I=(0,u.Z)(A,2),w=I[0],z=I[1],M=(0,_.useRef)({size:l.size,page:l.page}),E=(0,_.useCallback)((function(){if(w.list.length<w.total){M.current.page++;var e=M.current.size*M.current.page;r((function(n){return(0,o.Z)((0,o.Z)({},n),{},{size:e})}))}}),[w]),L=(0,_.useCallback)((function(e){M.current.page=1,r((function(n){return(0,o.Z)((0,o.Z)({},n),{},{status:e,size:10})})),z((function(){return{list:[],total:0}}))}),[]),P=(0,_.useMemo)((function(){return(0,D.rA)({list:w.list,total:w.total,status:S.loading})}),[w,S]),Q=(0,_.useCallback)((function(e){M.current.page=1,z((function(){return{list:[],total:0}})),r((function(n){return(0,o.Z)((0,o.Z)({},n),{},{name:e,size:10})}))}),[]),Y=(0,_.useState)(!1),K=(0,u.Z)(Y,2),X=K[0],$=K[1],H=function(){var e=(0,a.Z)((0,t.Z)().mark((function _callee2(){return(0,t.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:M.current.size=1,$(!0),r((function(e){return(0,o.Z)((0,o.Z)({},e),{},{size:10})}));case 3:case"end":return e.stop()}}),_callee2)})));return function getRefresherRefresh(){return e.apply(this,arguments)}}(),ee=function(){var e=(0,a.Z)((0,t.Z)().mark((function _callee3(){var e;return(0,t.Z)().wrap((function _callee3$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,C((0,D.mB)(l));case 2:e=n.sent,z({list:e.data.list,total:e.data.total}),$((function(){return!1}));case 5:case"end":return n.stop()}}),_callee3)})));return function getOrderList(){return e.apply(this,arguments)}}(),ne=(0,_.useState)(),le=(0,u.Z)(ne,2),re=le[0],oe=le[1],te=(0,_.useState)(!1),se=(0,u.Z)(te,2),ae=se[0],ue=se[1],ie=(0,_.useState)(!1),ce=(0,u.Z)(ie,2),_e=ce[0],de=ce[1];(0,c.useDidShow)((function(){null!=l.status&&ee()})),(0,_.useEffect)((function(){null!=l.status&&ee()}),[l]);var me=(0,_.useState)(!1),fe=(0,u.Z)(me,2),xe=fe[0],pe=fe[1],ve=(0,_.useCallback)((function(e){pe(!0)}),[]),he=(0,_.useCallback)((function(){pe(!1)}),[]),ge=(0,_.useCallback)((function(){pe(!1),ee()}),[w]),je=(0,T.v)((function(e){return e.userInfo})),be=(0,_.useCallback)((function(e){var n=e.status,l=e.orderInfo;1==n||6==n?(ee(),1===n&&(0,J.aB)({page_name:"pages/salesAfter/salesAfterList/index",order_number:l.return_apply_order_id,order_type:l.sale_mode,trigger_time:(0,R.o0)(new Date),purchaser_name:je.adminUserInfo.user_name||"未知用户",purchaser_id:je.adminUserInfo.user_id||0})):8==n?ue(!0):5==n?ve((function(){return!0})):7==n&&(de(!0),(0,J.CF)({page_name:"pages/salesAfter/salesAfterList/index",order_number:l.return_apply_order_id,order_type:l.sale_mode,trigger_time:(0,R.o0)(new Date),purchaser_name:je.adminUserInfo.user_name||"未知用户",purchaser_id:je.adminUserInfo.user_id||0})),console.log("orderInfo::",l),oe(l)}),[w]);return(0,y.jsxs)(i.G7,{className:x,children:[(0,y.jsxs)(i.G7,{className:p,children:[(0,y.jsx)(V.Z,{placeIcon:"out",placeholder:"搜索商品/名称/颜色/订单号",showBtn:!0,changeOnSearch:Q,debounceTime:300}),(0,y.jsx)(q,{list:b,onSelect:L,defaultId:1})]}),(0,y.jsx)(i.G7,{className:v,children:(0,y.jsx)(B.Z,{statusMore:P,selfonScrollToLower:E,refresherEnabled:!0,refresherTriggered:X,selfOnRefresherRefresh:H,children:null==w?void 0:w.list.map((function(e){return(0,y.jsx)(i.G7,{className:h,children:(0,y.jsx)(O,{value:e,onClickBtn:be})},e.id)}))})}),(0,y.jsx)(d.Z,{show:ae,id:null==re?void 0:re.id,onClose:function onClose(){return ue(!1)}}),(0,y.jsx)(m.Z,{images:null==re?void 0:re.accessory_url,descValue:null==re?void 0:re.take_goods_remark,show:xe,id:null==re?void 0:re.return_apply_order_id,onClose:he,onSubmit:ge}),(0,y.jsx)(f.Z,{orderInfo:re,show:_e,onClose:function onClose(){return de(!1)}})]})};P.enableShareAppMessage=!0;Page((0,r.createPageConfig)(P,"pages/salesAfter/salesAfterList/index",{root:{cn:[]}},{navigationBarTitleText:"退货/售后",enableShareAppMessage:!0}||{}))}},function(e){e.O(0,[303,4634,6878,3560,9315,4271,635,9760,9498,7563,5848,9972,3479,4235,3676,6379,3847,2107,1216,8592],(function(){return n=2346,e(e.s=n);var n}));e.O()}]);