1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[303],{1113:function(e,t,n){n.d(t,{Z:function(){return g}});var r=n(9439),l=n(4165),o=n(5861),_=n(1515),a=n(2954),i=n.n(a),c=n(7294),s=n(4184),u=n.n(s),d={common_safe_area_y:"index-module__common_safe_area_y___kWMcA",hoverClass:"index-module__hoverClass___hrpeU","full-100":"index-module__full-100___CI9VN",submit_order:"index-module__submit_order___rwfaE",order_btn:"index-module__order_btn___Iab_q",order_btn_select:"index-module__order_btn_select___u7zmC",order_number_desc:"index-module__order_number_desc___Iu60K",btns_list:"index-module__btns_list___htCtS",more:"index-module__more___O0AIh",more_list:"index-module__more_list___yGWlB",more_item:"index-module__more_item___Yo3yF",more_bg:"index-module__more_bg___cU4x9",scroll:"index-module__scroll___LCDPT",list_scroll:"index-module__list_scroll___P7zPb",btns_item:"index-module__btns_item___JrUEb",end_btn:"index-module__end_btn___WsTO2"},m=n(8629),f=n(1115),h=n(3275),x=n(8093),p=n(5893),v=function AfterOrderBtns(e){var t=e.orderInfo,n=e.onClick,a=e.fixedBottom,s=void 0===a||a,v=m.tp.ReturnStageApplying,g=m.tp.ReturnStageWaitCheck,b=m.tp.ReturnStageReturned,y=m.tp.ReturnStageQualityCheckPendingRefund,j=m.tp.ReturnStageServiceOrderPendingRefund,w=(m.T_.ReturnApplyOrderTypeAdvanceReceiptRefund,m.T_.ReturnApplyOrderTypeReturnForRefund),k=(m.T_.ReturnApplyOrderTypeSalesRefund,(0,c.useRef)([{id:8,label:"申请记录",validatarFunc:function validatarFunc(e){return 1!==e.sale_mode&&[y.value,j.value,b.value].includes(e.stage)}},{id:1,label:"取消退货",validatarFunc:function validatarFunc(e){return 1!=(null==e?void 0:e.sale_mode)&&e.type==w.value&&[v.value,g.value].includes(e.stage)}},{id:5,label:"上传物流",validatarFunc:function validatarFunc(e){return(null==e?void 0:e.stage)==g.value}},{id:6,label:"取消退款",validatarFunc:function validatarFunc(e){var t;return 1!=(null==e?void 0:e.sale_mode)&&e.type!=w.value?null===(t=[v.value,j.value])||void 0===t?void 0:t.includes(e.stage):1==(null==e?void 0:e.sale_mode)&&[v.value].includes(e.stage)}},{id:7,label:"退款码单",validatarFunc:function validatarFunc(e){return b.value==e.stage&&0===(null==e?void 0:e.sale_mode)}}])),Z=(0,c.useMemo)((function(){return k.current.filter((function(e){return e.validatarFunc(t)}))}),[t]),N=(0,h.AS)().fetchData,S=function cancelOrder(e){var r=e.title,_=void 0===r?"":r,a=e.val;i().showModal({title:_,success:function success(e){return(0,o.Z)((0,l.Z)().mark((function _callee(){var r;return(0,l.Z)().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:if(!e.confirm){l.next=7;break}return l.next=3,N({id:null==t?void 0:t.return_apply_order_id});case 3:(r=l.sent).success?(f.Z9.success("取消成功"),null==n||n(a,t)):f.Z9.none(r.msg),l.next=8;break;case 7:e.cancel&&console.log("用户点击取消");case 8:case"end":return l.stop()}}),_callee)})))()}})},G=(0,x.P2)((function(e,r){1==e?S({title:"要取消退货吗?",val:e}):6==e?S({title:"要取消退款吗?",val:e}):null==n||n(e,t)}),600),C=(0,c.useState)(!1),R=(0,r.Z)(C,2),P=R[0],F=R[1],I=(0,c.useMemo)((function(){return{top:"-".concat(70*(Z.length-3)+10,"rpx"),left:"-".concat(10,"rpx")}}),[Z]);return(0,p.jsx)(p.Fragment,{children:Z.length>0&&(0,p.jsx)(_.G7,{className:u()(s&&d.submit_order),children:(0,p.jsxs)(_.G7,{className:d.btns_list,children:[Z.length>3&&(0,p.jsxs)(_.G7,{className:d.more,children:[(0,p.jsx)(_.xv,{onClick:function onClick(){return F(!P)},children:P?"关闭":"更多"}),P&&(0,p.jsx)(_.G7,{className:d.more_con,children:(0,p.jsx)(_.G7,{className:d.more_list,style:I,children:Z.map((function(e,t){return t>=3&&(0,p.jsx)(_.G7,{className:d.more_item,onClick:function onClick(){return G(e.id,t)},children:e.label},e.id)}))})})]}),(0,p.jsx)(_.G7,{className:d.list_scroll,children:Z.map((function(e,t){return t<3&&(0,p.jsx)(_.G7,{className:u()(d.btns_item),onClick:function onClick(){return G(e.id,t)},children:e.label},e.id)}))})]})})})},g=(0,c.memo)(v)},4251:function(e,t,n){n.d(t,{Z:function(){return I}});var r=n(1413),l=n(4165),o=n(5861),_=n(9439),a=n(1515),i=n(2954),c=n.n(i),s=n(7294),u="index-module__apply_record_main___lTUF7",d="index-module__apply_record_scroll___KvxlS",m="index-module__kind_number___OkQIv",f="index-module__orders_list_con___Zpbb6",h="index-module__order_list___P_VEp",x="index-module__order_list_title___CRSS8",p="index-module__tag___I6o1I",v="index-module__title___RtKdp",g="index-module__num___DcI1j",b="index-module__order_list_scroll___HGZ9A",y="index-module__order_list_item___VIkcp",j="index-module__order_list_item_img___E7sGv",w="index-module__order_list_item_con___TgLY3",k="index-module__order_list_item_des___srhif",Z="index-module__order_list_item_title___zI6Q_",N="index-module__order_list_item_price___WpOQc",S="index-module__order_list_item_count___Iv33D",G=n(3275),C=n(4158),R=n(6599),P=n(5679),F=n(5893),I=(0,s.memo)((function(e){var t,n=e.show,i=e.onClose,I=(e.onSubmit,e.id);(0,s.useEffect)((function(){n&&I&&$(),n||U((function(){return null}))}),[n,I]);var A=(0,s.useState)(null),D=(0,_.Z)(A,2),T=D[0],O=D[1],E=(0,G.vu)().fetchData,$=function(){var e=(0,o.Z)((0,l.Z)().mark((function _callee(){var e;return(0,l.Z)().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:if(!I){t.next=5;break}return t.next=3,E({id:I});case 3:e=t.sent,O(e.data);case 5:c().stopPullDownRefresh();case 6:case"end":return t.stop()}}),_callee)})));return function getSaleOrderPreView(){return e.apply(this,arguments)}}(),V=(0,s.useState)(),M=(0,_.Z)(V,2),Q=M[0],U=M[1];(0,s.useEffect)((function(){T&&function formatData(){U({estimate_amount:T.estimate_amount,sale_mode:T.sale_mode,sale_mode_name:T.sale_mode_name,total_colors:T.total_colors,total_number:T.total_number,total_fabrics:T.total_fabrics,unit:0==T.sale_mode?"条":"m",list:T.product_list,stage:T.stage,type:T.type,total_sale_price:T.total_sale_price,total_should_collect_money:T.total_should_collect_money,total_weight_error_discount:T.total_weight_error_discount,actual_amount:T.actual_amount,the_previous_status:T.the_previous_status})}()}),[T]);(0,s.useCallback)((function(e){return 0==(null==Q?void 0:Q.sale_mode)?e.roll:Number(e.length/100)}),[Q]);var W=(0,s.useCallback)((function(e){return"".concat((0,C.yb)(e).toLocaleString(),"/").concat(1==(null==Q?void 0:Q.sale_mode)?"m":"kg")}),[Q]),z=(0,s.useMemo)((function(){if(Q){var e=0==(null==Q?void 0:Q.sale_mode)?null==Q?void 0:Q.total_number:(null==Q?void 0:Q.total_number)/100;return"".concat(null==Q?void 0:Q.total_fabrics," 种面料,").concat(null==Q?void 0:Q.total_colors," 种颜色,共 ").concat(e," ").concat(null==Q?void 0:Q.unit)}}),[Q]),K=(0,s.useCallback)((function(e){return{lab:(0,r.Z)({},null==e?void 0:e.lab),rgb:(0,r.Z)({},null==e?void 0:e.rgb),texturl_url:null==e?void 0:e.texturl_url}}),[]);return(0,F.jsx)(F.Fragment,{children:(0,F.jsx)(P.Z,{show:n,title:"申请记录",onClose:i,children:(0,F.jsx)(a.G7,{className:u,children:Q&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(a.G7,{className:m,children:(0,F.jsx)(a.xv,{children:z})}),(0,F.jsx)(a.pf,{scrollY:!0,className:d,children:(0,F.jsx)(a.G7,{className:f,children:null==Q||null===(t=Q.list)||void 0===t?void 0:t.map((function(e){var t;return(0,F.jsxs)(a.G7,{className:h,children:[(0,F.jsxs)(a.G7,{className:x,children:[(0,F.jsx)(a.G7,{className:p,children:Q.sale_mode_name}),(0,F.jsx)(a.G7,{className:v,children:(0,C.W7)(e.code,e.name)}),(0,F.jsxs)(a.G7,{className:g,children:["共",null==e?void 0:e.product_colors.length,"种"]})]}),(0,F.jsx)(a.G7,{className:b,children:null==e||null===(t=e.product_colors)||void 0===t?void 0:t.map((function(e){return(0,F.jsxs)(a.G7,{className:y,children:[(0,F.jsx)(a.G7,{className:j,children:(0,F.jsx)(R.Z,{value:K(e)})}),(0,F.jsxs)(a.G7,{className:w,children:[(0,F.jsxs)(a.G7,{className:k,children:[(0,F.jsx)(a.G7,{className:Z,children:"".concat(e.code," ").concat(e.name)}),(0,F.jsx)(a.G7,{className:N,children:(0,F.jsxs)(a.xv,{children:["¥",W(e.sale_price)]})})]}),(0,F.jsx)(a.G7,{className:S})]})]},e.id)}))})]},e.product_code)}))})})]})})})})}))},6256:function(e,t,n){n.d(t,{Z:function(){return b}});var r=n(4165),l=n(5861),o=n(1515),_=n(7294),a="index-module__logistics_main____OgxQ",i="index-module__logistics_image___ItZDn",c="index-module__title_desc___FdBek",s="index-module__upload_image___pbfsQ",u="index-module__logistics_desc___edmFc",d="index-module__btns_two___bRhp5",m="index-module__verify_btn___Hnk2f",f=n(3416),h=n(5679),x=n(9021),p=n(3275),v=n(1115),g=n(5893),b=(0,_.memo)((function(e){var t=e.show,n=void 0!==t&&t,b=e.onClose,y=e.onSubmit,j=e.id,w=void 0===j?0:j,k=e.images,Z=void 0===k?[]:k,N=e.descValue,S=void 0===N?"":N,G=e.onlyRead,C=void 0!==G&&G,R=(0,_.useRef)({accessory_url:[],remark:"",id:0});(0,_.useEffect)((function(){w&&(R.current.id=w)}),[w]);var P=(0,_.useCallback)((function(e){R.current.accessory_url=e}),[]),F=(0,_.useCallback)((function(e){R.current.remark=e}),[]),I=(0,p.zf)().fetchData,A=function(){var e=(0,l.Z)((0,r.Z)().mark((function _callee(){return(0,r.Z)().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:if(w){e.next=2;break}return e.abrupt("return",v.Z9.error("参数有误"));case 2:if(!(R.current.accessory_url.length<=0)){e.next=4;break}return e.abrupt("return",v.Z9.error("请上传附件"));case 4:return e.next=6,I(R.current);case 6:e.sent.success?v.Z9.success("上传成功"):v.Z9.error("上传失败"),null==y||y();case 9:case"end":return e.stop()}}),_callee)})));return function onSubmitEven(){return e.apply(this,arguments)}}();return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(h.Z,{show:n,title:C?"查看物流":"上传物流",onClose:b,children:(0,g.jsxs)(o.G7,{className:a,children:[(0,g.jsxs)(o.G7,{className:i,children:[(0,g.jsx)(o.xv,{className:c,children:"上传附件:"}),(0,g.jsx)(o.G7,{className:s,children:(0,g.jsx)(f.Z,{onChange:P,defaultList:Z,onlyRead:C})})]}),(0,g.jsx)(o.G7,{className:u,children:(0,g.jsx)(x.Z,{defaultValue:S,onChange:F,title:"备注:",onlyRead:C,placeholder:"请输入备注信息"})}),!C&&(0,g.jsx)(o.G7,{className:d,children:(0,g.jsx)(o.G7,{className:m,onClick:function onClick(){return A()},children:"保存"})})]})})})}))},377:function(e,t,n){n.d(t,{Z:function(){return Z}});var r=n(4165),l=n(5861),o=n(9439),_=n(1515),a=n(2954),i=n.n(a),c=n(7294),s=n(4184),u=n.n(s),d="index-module__scanPay_main___D9Utc",m="index-module__scanPay_con___CFhV1",f="index-module__miconfont_title___Cm6FQ",h="index-module__title___f0RS3",x="index-module__scanPay_list___eyDac",p="index-module__btns___VxyzX",v=n(5679),g=n(1115),b=n(4158),y=n(4856),j=n(5547),w=n(4508),k=n(5893),Z=(0,c.memo)((function(e){var t=e.show,n=void 0===t||t,a=e.onClose,s=e.orderInfo,Z=(0,c.useState)(),N=(0,o.Z)(Z,2),S=N[0],G=N[1];(0,c.useEffect)((function(){n&&S&&E()}),[n,S]);var C=(0,c.useMemo)((function(){return null!=s&&s.is_quality_check?null==s?void 0:s.quality_check_pass_product:null==s?void 0:s.product_list}),[s]);(0,c.useEffect)((function(){if(s){var e=[];null==C||C.map((function(t){var n;null==t||null===(n=t.product_colors)||void 0===n||n.map((function(n){e.push({product_code:(0,b.ZK)(t.code),product_name:t.name,product_color_code:(0,b.ZK)(n.code),product_color_name:n.name,num:n.roll.toString(),length:(n.length/100).toString(),weight:(0,b.$y)(n.label_weight).toString(),sale_price:(0,b.yb)(n.sale_price).toString(),total_price:(0,b.yb)(n.refund_amount).toString(),weight_error:(0,b.$y)(n.settle_weight_error).toString(),deduction_weight:(0,b.$y)(n.deductions_weight).toString(),settle_weight:(0,b.$y)(n.settle_weight).toString(),deduction_amount:(0,b.yb)(n.deductions_amount).toString()})}))})),G((function(){return{title:"售后确认单",order_type:s.sale_mode_name,client:s.purchaser_name,order_created_time:(0,b.o0)(s.create_time),order_no:s.return_order_no,pay_account:s.transfer_remittance_account,bank_account_name:s.account_name,bank_name:s.bank_of_deposit,order_total_length:(s.total_number/100).toString(),order_total_price:(0,b.yb)(s.refund_amount).toString(),show_order_total_price:s.is_display_price,order_total_num:s.total_number.toString(),order_total_settle_weight:(0,b.$y)(s.order_total_settle_weight).toString(),order_total_deduction_weight:(0,b.$y)(s.order_total_deduction_weight).toString(),order_total_deduction_amount:(0,b.yb)(s.order_total_deduction_amount).toString(),show_order_total_deduction_amount:s.is_display_price,order_total_weight_error:(0,b.$y)(s.total_weight_error).toString(),list:e,show_total_price:s.is_display_price,show_sale_price:s.is_display_price,show_deduction_amount:s.is_display_price,show_tips:!0,tips:"请核对本单后验收, <b>如发现质量问题,请于收到货之日起3天内与平台客服联系协商解决,</b>逾期不作处理即表示购方默认对货物无异议;<b>购方确认无任何问题方可裁剪/加工,一经裁剪,缩水等工艺,平台概不负责;</b>\n 看布购货,请先试缩水,并注意分缸裁布!如需撞色拼接,请先试色牢度。非质量问题,恕不退换,谢谢合作!"}}))}}),[s]);var R=(0,c.useState)(""),P=(0,o.Z)(R,2),F=P[0],I=P[1],A=(0,c.useRef)({filePath:"",base64:""}),D=(0,j.Ps)(),T=D.fetchData,O=D.state,E=function(){var e=(0,l.Z)((0,r.Z)().mark((function _callee(){var e,t,n,l,_,a,c,s;return(0,r.Z)().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,T(S);case 2:e=r.sent,t=e.data.base64,I((function(){return t})),n=(new Date).valueOf(),l=/data:image\/(\w+);base64,(.*)/.exec(t)||[],_=(0,o.Z)(l,3),a=_[1],c=_[2],s="".concat(i().env.USER_DATA_PATH,"/img").concat(n,".").concat(a),A.current.filePath=s,A.current.base64=c,i().getFileSystemManager().writeFile({filePath:A.current.filePath,data:A.current.base64,encoding:"base64"});case 12:case"end":return r.stop()}}),_callee)})));return function getCore(){return e.apply(this,arguments)}}(),$=(0,y.Z)({scope:"scope.writePhotosAlbum",msg:"您没授权,无法保存图片"}).check,V=function(){var e=(0,l.Z)((0,r.Z)().mark((function _callee2(){return(0,r.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:e.sent&&M();case 4:case"end":return e.stop()}}),_callee2)})));return function saveImageCheck(){return e.apply(this,arguments)}}(),M=function saveImage(){g.Z9.loading("正在保存图片"),i().saveImageToPhotosAlbum({filePath:A.current.filePath,success:function success(){g.Z9.success("图片保存成功")},fail:function fail(e){console.log("err::",e)}})};return(0,k.jsx)(_.G7,{className:d,children:(0,k.jsx)(v.Z,{show:n,showTitle:!1,onClose:a,children:(0,k.jsxs)(_.G7,{className:m,children:[(0,k.jsx)(_.G7,{className:u()("iconfont icon-a-moreback",f),onClick:a}),(0,k.jsx)(_.G7,{className:h,children:"查看退款码单"}),(0,k.jsx)(_.G7,{className:x,children:O.loading&&(0,k.jsx)(w.Z,{})||(0,k.jsx)(_.pf,{scrollY:!0,className:x,children:(0,k.jsx)(_.Ee,{mode:"widthFix",src:F,onClick:function showImage(){console.log("fileData.current.filePath::",A.current.filePath),i().previewImage({current:A.current.filePath,urls:[A.current.filePath]})}})})}),(0,k.jsx)(_.G7,{className:p,onClick:V,children:"保存码单"})]})})})}))}}]); |