1 line
26 KiB
JavaScript

"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[6563],{9030:function(e,o,n){var t=n(9975),l=n(2982),i=n(4165),a=n(1413),c=n(5861),r=n(885),s=n(1515),d=n(9792),u=n(1251),_="index-module__order_status_list___k66cU",m="index-module__order_status_item___rcQLA",x="index-module__selected___RLILI",f="index-module__order_list_scroll___mbA1_",p=n(6408),h=n.n(p),v=n(5513),j=(0,d.memo)((function(e){var o=e.list,n=void 0===o?[]:o,t=e.defaultId,l=void 0===t?null:t,i=e.onSelect,c=(0,d.useState)({selected:-1,tabId:""}),u=(0,r.Z)(c,2),p=u[0],j=u[1];(0,d.useEffect)((function(){if("number"==typeof l&&l>=0){var e=null==n?void 0:n.findIndex((function(e){return e.id==l}));if(-1!==e){var o=e>0?e-1:0;j((function(e){return(0,a.Z)((0,a.Z)({},e),{},{tabId:n[o].id.toString()})}))}}j((function(e){return(0,a.Z)((0,a.Z)({},e),{},{selected:l||-1})}))}),[l]);return(0,v.jsx)(s.G7,{className:_,children:(0,v.jsx)(s.pf,{scrollX:!0,scrollIntoView:"tabs_".concat(p.tabId),scrollWithAnimation:!0,children:(0,v.jsx)(s.G7,{className:f,children:n.map((function(e,o){return(0,v.jsx)(s.G7,{id:"tabs_".concat(e.id),onClick:function onClick(){return function clickEvent(e){var o=e.item,t=e.index,l=t>0?t-1:0;j((function(e){return(0,a.Z)((0,a.Z)({},e),{},{tabId:n[l].id.toString(),selected:o.id})})),null==i||i(o.id)}({item:e,index:o})},className:h()(m,p.selected==e.id&&x),children:e.name},e.id)}))})})})})),g=n(5032),b=n(7227),N={common_safe_area_y:"index-module__common_safe_area_y___P1Do_","flex-col":"index-module__flex-col___JnRad","flex-row":"index-module__flex-row___lBkWj","justify-between":"index-module__justify-between___Eoh75","items-center":"index-module__items-center___Q9UGv","flex-item":"index-module__flex-item___G8khT","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"},Z=n(5854),k=n(4909),w=n(2535),G=n.n(w),y="index-module__itemBox___r2hfd",B="index-module__topItem___p12RW",S="index-module__orderNo___ee0pt",C="index-module__status___mfwsO",T="index-module__pussName___OFHb2",I="index-module__line___bwG9I",L="index-module__contBox___z18C3",P="index-module__leftCont___lAQ2l",z="index-module__leftContNums___NYM9g",R="index-module__rightCont___zh7yE",F="index-module__rightTop___CTR2z",D="index-module__productBox___ZRAps",O="index-module__productName___BYyH2",M="index-module__productMode___FoG3x",E="index-module__shipMode___m7eRw",$="index-module__colorsBox___AGf69",A="index-module__colorNameOne___DByBc",Q="index-module__colorName___J5hr_",J="index-module__colorNameTwo___DxtPY",H="index-module__lineOne___AvPrw",U="index-module__bottomMsg___Ol2O_",V="index-module__msgLeft____ZLLS",W="index-module__msgRight___SR_rw",Y="index-module__msgRightOne___IJhUL",q="index-module__bottomBox___rpUFB",X=n(6631),K=n(4812),ee=(0,d.memo)((function(e){var o,n,t,l,i,a,c,r,d,u,_,m,x,f,p,h,j,g,b,N,Z,k,w,ee,oe,ne,te,le,ie,ae,ce,re,se,de,ue,_e,me,xe,fe,pe,he,ve,je,ge,be,Ne,Ze,ke,we,Ge,ye,Be,Se,Ce,Te,Ie,Le,Pe,ze,Re,Fe,De,Oe,Me,Ee,$e,Ae;return(0,v.jsxs)(s.G7,{className:y,onClick:function onClick(o){return function navTo(o){var n;G().navigateTo({url:"/pages/orderDetails/index?id="+(null==e||null===(n=e.obj)||void 0===n?void 0:n.id)})}()},children:[(0,v.jsxs)(s.G7,{className:B,children:[(0,v.jsxs)(s.G7,{className:S,children:["单号:",null==e||null===(o=e.obj)||void 0===o?void 0:o.order_no]}),(0,v.jsx)(s.G7,{className:C,children:null==e||null===(n=e.obj)||void 0===n?void 0:n.status_name})]}),(0,v.jsx)(s.G7,{className:T,children:null==e||null===(t=e.obj)||void 0===t?void 0:t.purchaser_name}),(0,v.jsx)(s.G7,{className:I}),(0,v.jsxs)(s.G7,{className:L,children:[(0,v.jsx)(s.G7,{className:P,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===(r=e.obj)||void 0===r||null===(d=r.product_list[0])||void 0===d||null===(u=d.product_colors[0])||void 0===u||null===(_=u.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===(f=x.product_colors[0])||void 0===f||null===(p=f.rgb)||void 0===p?void 0:p.b,")")},children:(0,v.jsxs)(s.G7,{className:z,children:["颜色 (",null==e||null===(h=e.obj)||void 0===h?void 0:h.total_colors,")"]})}),(0,v.jsxs)(s.G7,{className:R,children:[(0,v.jsxs)(s.G7,{className:F,children:[(0,v.jsxs)(s.G7,{className:D,children:[(0,v.jsxs)(s.G7,{className:O,children:[null==e||null===(j=e.obj)||void 0===j||null===(g=j.product_list[0])||void 0===g?void 0:g.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)(s.G7,{className:M,children:0===(null==e||null===(Z=e.obj)||void 0===Z?void 0:Z.sale_mode)?"大货":1===(null==e||null===(k=e.obj)||void 0===k?void 0:k.sale_mode)?"剪版":"散剪"})]}),(0,v.jsx)(s.G7,{className:E,children:null==e||null===(w=e.obj)||void 0===w?void 0:w.shipment_mode_name})]}),(0,v.jsxs)(s.G7,{className:$,children:[(0,v.jsxs)(s.G7,{className:A,children:[null==e||null===(ee=e.obj)||void 0===ee||null===(oe=ee.product_list[0])||void 0===oe||null===(ne=oe.product_colors[0])||void 0===ne?void 0:ne.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)(s.G7,{className:Q,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===(re=ce.product_list[0])||void 0===re||null===(se=re.product_colors[0])||void 0===se?void 0:se.roll:(null==e||null===(de=e.obj)||void 0===de||null===(ue=de.product_list[0])||void 0===ue||null===(_e=ue.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)(s.G7,{className:J,children:["¥ ",(null==e||null===(xe=e.obj)||void 0===xe||null===(fe=xe.product_list[0])||void 0===fe||null===(pe=fe.product_colors[0])||void 0===pe?void 0:pe.sale_price)/100,"/kg"]})]}),(null==e||null===(he=e.obj)||void 0===he||null===(ve=he.product_list[0])||void 0===ve||null===(je=ve.product_colors)||void 0===je?void 0:je.length)>1&&(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(s.G7,{className:$,children:[(0,v.jsxs)(s.G7,{className:A,children:[null==e||null===(ge=e.obj)||void 0===ge||null===(be=ge.product_list[0])||void 0===be||null===(Ne=be.product_colors[1])||void 0===Ne?void 0:Ne.code," ",null==e||null===(Ze=e.obj)||void 0===Ze||null===(ke=Ze.product_list[0])||void 0===ke||null===(we=ke.product_colors[1])||void 0===we?void 0:we.name]}),(0,v.jsxs)(s.G7,{className:Q,children:["x",0===(null==e||null===(Ge=e.obj)||void 0===Ge?void 0:Ge.sale_mode)?null==e||null===(ye=e.obj)||void 0===ye||null===(Be=ye.product_list[0])||void 0===Be||null===(Se=Be.product_colors[1])||void 0===Se?void 0:Se.roll:(null==e||null===(Ce=e.obj)||void 0===Ce||null===(Te=Ce.product_list[0])||void 0===Te||null===(Ie=Te.product_colors[1])||void 0===Ie?void 0:Ie.length)/100," ",0===(null==e||null===(Le=e.obj)||void 0===Le?void 0:Le.sale_mode)?"条":"m"]}),(0,v.jsxs)(s.G7,{className:J,children:["¥ ",(null==e||null===(Pe=e.obj)||void 0===Pe||null===(ze=Pe.product_list[0])||void 0===ze||null===(Re=ze.product_colors[1])||void 0===Re?void 0:Re.sale_price)/100,"/kg"]})]})})]})]}),(0,v.jsx)(s.G7,{className:H}),(0,v.jsxs)(s.G7,{className:U,children:[(0,v.jsx)(s.G7,{className:V,children:"布料信息:"}),(0,v.jsxs)(s.G7,{className:W,children:[null==e||null===(Fe=e.obj)||void 0===Fe?void 0:Fe.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===(Ee=e.obj)||void 0===Ee?void 0:Ee.total_number)/100," ",0===(null==e||null===($e=e.obj)||void 0===$e?void 0:$e.sale_mode)?"条":"m"]})]}),(0,v.jsxs)(s.G7,{className:U,children:[(0,v.jsx)(s.G7,{className:V,children:"预估金额:"}),(0,v.jsxs)(s.G7,{className:Y,children:["¥",(0,K.yb)(null==e||null===(Ae=e.obj)||void 0===Ae?void 0:Ae.estimate_amount)]})]}),(0,v.jsx)(s.G7,{className:q,children:(0,v.jsx)(X.Z,{obj:null==e?void 0:e.obj,cancle:function cancle(o){var n;return null==e||null===(n=e.cancle)||void 0===n?void 0:n.call(e,o,null==e?void 0:e.obj)},nextBuy:function nextBuy(o){var n;return null==e||null===(n=e.nextBuy)||void 0===n?void 0:n.call(e,o,null==e?void 0:e.obj)},toPay:function toPay(o){var n;return null==e||null===(n=e.toPay)||void 0===n?void 0:n.call(e,o,null==e?void 0:e.obj)}})})]})})),oe=n(1062),ne=n(3772);Page((0,t.createPageConfig)((function(){var e,o=(0,d.useState)({status:-1,page:1,size:10,name:""}),n=(0,r.Z)(o,2),t=n[0],_=n[1],m=(0,u.Vy)(),x=m.fetchData,f=m.state,p=(0,d.useState)({list:[],total:0}),y=(0,r.Z)(p,2),B=y[0],S=y[1],C=function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee(){var e;return(0,i.Z)().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,x((0,a.Z)((0,a.Z)({},(0,b.mB)(t)),(0,b.mB)(te)));case 2:e=o.sent,S((function(o){var n,t;return(0,a.Z)((0,a.Z)({},o),{},{list:null===(n=e.data)||void 0===n?void 0:n.list,total:null===(t=e.data)||void 0===t?void 0:t.total})})),Y(!1),P((function(){return!1}));case 6:case"end":return o.stop()}}),_callee)})));return function getOrderList(){return e.apply(this,arguments)}}(),T=(0,d.useState)(!1),I=(0,r.Z)(T,2),L=I[0],P=I[1],z=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:F.current.size=1,P(!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)}}(),R=(0,d.useMemo)((function(){return(0,b.rA)({list:B.list,total:B.total,status:f.loading})}),[B,f]),F=(0,d.useRef)({size:t.size,page:t.page}),D=(0,d.useCallback)((function(){if(B.list.length<B.total){F.current.page++;var e=F.current.size*F.current.page;_((0,a.Z)((0,a.Z)({},t),{},{size:e}))}}),[B]),O=(0,u.rj)().fetchData,M=(0,d.useState)([{id:-1,name:"全部"}]),E=(0,r.Z)(M,2),$=E[0],A=E[1],Q=function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee3(){var e;return(0,i.Z)().wrap((function _callee3$(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,O();case 2:e=o.sent,A((function(o){return[].concat((0,l.Z)(o),(0,l.Z)(e.data.list))}));case 4:case"end":return o.stop()}}),_callee3)})));return function getOrderStatusList(){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){null!=t.status&&C()}),[t]);var J=(0,d.useCallback)((function(e){F.current.page=1,_((function(o){return(0,a.Z)((0,a.Z)({},o),{},{status:e,size:10})})),S((function(){return{list:[],total:0}}))}),[]),H=(0,d.useCallback)((function(e){F.current.page=1,S((function(){return{list:[],total:0}})),_((function(o){return(0,a.Z)((0,a.Z)({},o),{},{name:e,size:10})}))}),[]),U=(0,d.useState)(!1),V=(0,r.Z)(U,2),W=V[0],Y=V[1];(0,w.useDidShow)((function(){var e=G().getCurrentPages(),o=e[e.length-1];le((function(e){var n,t,l,i,c,r,s,d;return(0,a.Z)((0,a.Z)({},e),{},{purchaser_id:null!==(n=o.data)&&void 0!==n&&n.clientId?null===(t=o.data)||void 0===t?void 0:t.clientId:"",clientName:null!==(l=o.data)&&void 0!==l&&l.clientName?null===(i=o.data)||void 0===i?void 0:i.clientName:"",sale_user_id:null!==(c=o.data)&&void 0!==c&&c.saleuserId?null===(r=o.data)||void 0===r?void 0:r.saleuserId:"",saleuserName:null!==(s=o.data)&&void 0!==s&&s.saleuserName?null===(d=o.data)||void 0===d?void 0:d.saleuserName:""})}))}));var q=(0,d.useState)({purchaser_id:"",clientName:"",sale_user_id:"",saleuserName:"",orderNo:"",sale_mode:void 0,shipment_mode:void 0}),X=(0,r.Z)(q,2),te=X[0],le=X[1],ie=function navTo(e){1===e?G().navigateTo({url:"/pages/customerPage/index?clientId="+(null==te?void 0:te.purchaser_id)}):G().navigateTo({url:"/pages/saleuserPage/index?saleuserId="+(null==te?void 0:te.sale_user_id)})},ae=(0,d.useState)([{id:-1,name:"不限"},{id:0,name:"大货"},{id:1,name:"剪版"},{id:2,name:"散剪"}]),ce=(0,r.Z)(ae,2),re=ce[0],se=ce[1],de=(0,d.useState)([{id:-1,name:"不限"},{id:1,name:"自提"},{id:2,name:"物流"}]),ue=(0,r.Z)(de,2),_e=ue[0],me=ue[1],xe=(0,d.useMemo)((function(){return""===te.clientName&&""===te.orderNo&&""===te.saleuserName&&void 0===te.sale_mode&&void 0===te.shipment_mode}),[te]),fe=function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee4(){return(0,i.Z)().wrap((function _callee4$(e){for(;;)switch(e.prev=e.next){case 0:C();case 1:case"end":return e.stop()}}),_callee4)})));return function handSure(){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){Q()}),[]);var pe=(0,u.Rv)().fetchData,he=function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee6(e,o){return(0,i.Z)().wrap((function _callee6$(n){for(;;)switch(n.prev=n.next){case 0:e.stopPropagation(),G().showModal({content:"确定要取消吗?",confirmText:"确认",cancelText:"取消",success:function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee5(e){var n;return(0,i.Z)().wrap((function _callee5$(t){for(;;)switch(t.prev=t.next){case 0:if(!e.confirm){t.next=6;break}return G().showLoading({title:"请稍等...",mask:!0}),t.next=4,pe({id:o.id});case 4:"success"===(n=t.sent).msg?(G().showToast({title:"取消成功"}),G().hideLoading(),C()):G().showToast({title:n.msg,icon:"error"});case 6:case"end":return t.stop()}}),_callee5)})));return function success(o){return e.apply(this,arguments)}}()});case 2:case"end":return n.stop()}}),_callee6)})));return function cancle(o,n){return e.apply(this,arguments)}}(),ve=(0,u.eS)().fetchData,je=function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee7(e,o){var n,t,l;return(0,i.Z)().wrap((function _callee7$(i){for(;;)switch(i.prev=i.next){case 0:return e.stopPropagation(),G().showLoading({title:"请稍等...",mask:!0}),n=[],o.product_list.forEach((function(e){e.product_colors.forEach((function(e){n.push({length:e.length,roll:e.roll,product_color_id:e.id})}))})),t={purchaser_id:o.purchaser_id,sale_mode:o.sale_mode,color_list:n},i.next=7,ve(t);case 7:"success"===(l=i.sent).msg?(G().showToast({title:"加入购物车成功!"}),G().hideLoading(),C()):G().showToast({title:l.msg,icon:"error"});case 9:case"end":return i.stop()}}),_callee7)})));return function nextBuy(o,n){return e.apply(this,arguments)}}(),ge=(0,u.Gg)().fetchData,be=(0,u.fu)().fetchData,Ne=(0,d.useState)({}),Ze=(0,r.Z)(Ne,2),ke=Ze[0],we=Ze[1],Ge=(0,d.useState)([{id:2,iconfont:"icon-yufukuan1",name:"预存款",fonts:"可用额度 ",money:"",isCheck:!1},{id:5,iconfont:"icon-xianxiahuizong",name:"货到付款",fonts:"发货后3天内付款",isCheck:!1,money:""},{id:3,iconfont:"icon-xianxiahuizong",name:"x天账期",fonts:"可用额度 ",money:"",isCheck:!1},{iconfont:"icon-yue",name:"线下汇款"},{iconfont:"icon-saomiao",name:"扫码支付"}]),ye=(0,r.Z)(Ge,2),Be=ye[0],Se=ye[1],Ce=function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee8(e,o){var n,t,a,c,r;return(0,i.Z)().wrap((function _callee8$(i){for(;;)switch(i.prev=i.next){case 0:if(e.stopPropagation(),we(o),10===o.status){i.next=11;break}return i.next=5,ge({id:o.should_collect_order_id});case 5:n=i.sent,Be.map((function(e){return 3===e.id&&(e.name="".concat(n.data.account_period,"天账期"),e.fonts="可用额度".concat((0,K.yb)(n.data.account_period_credit_available_line).toLocaleString())),2===e.id&&(e.fonts="可用额度".concat((0,K.yb)(n.data.advance_deposit_balance).toLocaleString())),e})),Se((0,l.Z)(Be)),o.is_shipper_picks_up&&(t=Be.filter((function(e){return 6===e.id})),0===t.length&&(Be.unshift({id:6,iconfont:"icon-xianxiahuizong",name:"货主自提",fonts:"",money:"",isCheck:!1}),Se((0,l.Z)(Be)))),i.next=18;break;case 11:return i.next=13,be({id:o.pre_collect_order_id});case 13:a=i.sent,(c=[]).push({id:2,iconfont:"icon-yufukuan1",name:"预存款",fonts:"可用额度".concat((0,K.yb)(a.data.advance_deposit_balance).toLocaleString()),money:"",isCheck:!1},{iconfont:"icon-yue",name:"线下汇款"},{iconfont:"icon-saomiao",name:"扫码支付"}),o.is_shipper_picks_up&&(r=c.filter((function(e){return 6===e.id})),0===r.length&&c.unshift({id:6,iconfont:"icon-xianxiahuizong",name:"货主自提",fonts:"",money:"",isCheck:!1})),Se([].concat(c));case 18:Pe(!0),De("待支付款项"),Ye(!0);case 21:case"end":return i.stop()}}),_callee8)})));return function toPay(o,n){return e.apply(this,arguments)}}(),Te=(0,d.useState)(!0),Ie=(0,r.Z)(Te,2),Le=Ie[0],Pe=Ie[1],ze=(0,d.useState)(""),Re=(0,r.Z)(ze,2),Fe=Re[0],De=Re[1],Oe=(0,d.useState)(""),Me=(0,r.Z)(Oe,2),Ee=Me[0],$e=Me[1],Ae=(0,u.fs)().fetchData,Qe=function(){var e=(0,c.Z)((0,i.Z)().mark((function _callee9(){var e,o,n;return(0,i.Z)().wrap((function _callee9$(t){for(;;)switch(t.prev=t.next){case 0:return e=[],ke.product_list.forEach((function(o){o.product_colors.forEach((function(n){e.push({product_code:o.code,product_name:o.name,product_color_code:n.product_color_code,product_color_name:n.product_color_name,num:n.roll.toString(),weight:(0,K.$y)(n.actual_weight).toString(),sale_price:(n.sale_price/100).toString(),total_price:0!==n.total_sale_price?(n.total_sale_price/100).toString():(n.estimate_amount/100).toString(),length:(n.length/100).toString(),weight_error:(0,K.$y)(n.weight_error).toString()})}))})),o={list:e,title:"面料销售电子确认单",show_qrcode:!0,show_barcode:!0,show_wait_pay_amount:!0,order_type:ke.sale_mode_name,shipment_mode:ke.shipment_mode_name,company:ke.title_purchaser_name,sale_user:ke.sale_user_name,order_created_time:(0,K.o0)(ke.create_time),order_no:ke.order_no,target_user_name:ke.target_user_name,target_address:ke.address_detail,target_description:ke.remark,pay_account:ke.transfer_remittance_account,bank_account_name:ke.account_name,bank_name:ke.bank_of_deposit,pay_type:ke.settle_mode_name,client:ke.purchaser_name,phone:ke.target_user_phone,order_total_length:(ke.total_number/100).toString(),order_total_price:(ke.bill_total_sale_price/100).toString(),total_weight_error_discount:(ke.total_weight_error_discount/100).toString(),order_total_num:ke.total_number.toString(),qrcode:"",order_total_weight:(ke.total_weight/1e3).toString(),estimate_amount:(ke.estimate_amount/100).toString(),total_sale_price:(ke.total_sale_price/100).toString(),show_total_sale_price:!0,show_total_weight_error_discount:!0,actual_amount:(ke.actual_amount/100).toString(),wait_pay_amount:(ke.wait_pay_amount/100).toString(),order_total_weight_error:(ke.total_weight_error/1e3).toString()},t.next=5,Ae(o);case 5:(n=t.sent).data&&(Pe(!1),De("查看销售码单"),$e(n.data.base64));case 7:case"end":return t.stop()}}),_callee9)})));return function handScanpay(){return e.apply(this,arguments)}}(),Je=(0,u.a3)().fetchData,He=(0,u.ot)().fetchData,Ue=(0,d.useState)(!1),Ve=(0,r.Z)(Ue,2),We=Ve[0],Ye=Ve[1],qe=(0,d.useState)(!1),Xe=(0,r.Z)(qe,2),Ke=Xe[0],eo=Xe[1];return(0,v.jsxs)(s.G7,{children:[(0,v.jsx)(s.G7,{style:{background:"#FFFFFF",paddingLeft:"20rpx",paddingBottom:"20rpx",position:"sticky",top:"0",zIndex:"99"},children:(0,v.jsx)(g.Z,{placeholder:"搜索商品/名称/颜色/订单号",showBtn:!1,changeOnSearch:H,debounceTime:300,children:(0,v.jsxs)(s.G7,{className:N.flexBox,onClick:function onClick(){return function showSelctPopup(){Y(!0)}()},children:[(0,v.jsx)(s.G7,{className:h()("iconfont","icon-shaixuan",xe?N.activeshaixuan:N.icon_shaixuan)}),(0,v.jsx)(s.G7,{className:h()(xe?N.shaixuan:N.activeshai),children:"筛选"})]})})}),(0,v.jsx)(s.G7,{style:{background:"#FFFFFF"},children:(0,v.jsx)(j,{list:$,onSelect:J,defaultId:-1})}),(0,v.jsxs)(s.G7,{className:N.order_list,children:[(0,v.jsx)(k.Z,{statusMore:R,selfonScrollToLower:D,refresherEnabled:!0,refresherTriggered:L,selfOnRefresherRefresh:z,children:null==B||null===(e=B.list)||void 0===e?void 0:e.map((function(e,o){return(0,v.jsx)(s.G7,{className:N.order_item_con,children:(0,v.jsx)(ee,{obj:e,cancle:function cancle(e,o){return he(e,o)},nextBuy:function nextBuy(e,o){return je(e,o)},toPay:function toPay(e,o){return Ce(e,o)}},o)},e.id)}))}),(0,v.jsx)(s.G7,{className:N.kongboxTwo})]}),(0,v.jsx)(Z.Z,{title:"筛选订单",show:W,onClose:function onClose(){return function closePopup(){Y(!1)}()},children:(0,v.jsxs)(s.G7,{className:N.popupBox,children:[(0,v.jsxs)(s.G7,{className:N.topBox,children:[(0,v.jsxs)(s.G7,{className:N.leftTop,onClick:function onClick(){return ie(1)},children:[(0,v.jsx)(s.G7,{className:N.lefttopTitle,children:"客户信息"}),(0,v.jsxs)(s.G7,{className:h()(""===te.clientName?N.lefttopSelectBox:N.activelefttopSelectBox),children:[(0,v.jsx)(s.G7,{className:N.lefttopSelectName,children:""===te.clientName?"请选择客户":te.clientName}),(0,v.jsx)(s.G7,{className:h()("iconfont","icon-more",N.icon_more)})]})]}),(0,v.jsxs)(s.G7,{className:N.leftTop,onClick:function onClick(){return ie(2)},children:[(0,v.jsx)(s.G7,{className:N.lefttopTitle,children:"业务员"}),(0,v.jsxs)(s.G7,{className:h()(""===te.saleuserName?N.lefttopSelectBox:N.activelefttopSelectBox),children:[(0,v.jsx)(s.G7,{className:N.lefttopSelectName,children:""===te.saleuserName?"请选择客户":te.saleuserName}),(0,v.jsx)(s.G7,{className:h()("iconfont","icon-more",N.icon_more)})]})]})]}),(0,v.jsxs)(s.G7,{className:N.secondBox,children:[(0,v.jsx)(s.G7,{className:N.secondTopfont,children:"订单单号"}),(0,v.jsxs)(s.G7,{className:N.inputBox,children:[(0,v.jsx)(s.II,{onInput:function onInput(e){!function handInput(e){le((function(o){return(0,a.Z)((0,a.Z)({},o),{},{orderNo:e.detail.value})}))}(e)},placeholderStyle:"color:#000000; font-size:26rpx",className:N.orderInput,value:te.orderNo,placeholder:"请输入或扫描条形码"}),(0,v.jsx)(s.G7,{className:h()("iconfont","icon-saomiao",N.saomiao),onClick:function onClick(){!function handScan(){G().scanCode({success:function success(e){le((function(o){return(0,a.Z)((0,a.Z)({},o),{},{orderNo:e.result})}))},fail:function fail(e){}})}()}})]})]}),(0,v.jsxs)(s.G7,{className:N.thirdBox,children:[(0,v.jsx)(s.G7,{className:N.thirdTopfont,children:"订单类型"}),(0,v.jsx)(s.G7,{className:N.flexModebox,children:re.map((function(e,o){return(0,v.jsx)(s.G7,{onClick:function onClick(){!function handCheckMode(e){re.map((function(o){return o.id===e.id?o.checked=!0:o.checked=!1,o})),se((0,l.Z)(re)),le((function(o){return(0,a.Z)((0,a.Z)({},o),{},{sale_mode:e.id})}))}(e)},className:h()(e.checked?N.activemodeBox:N.modeBox),children:e.name},o)}))})]}),(0,v.jsxs)(s.G7,{className:N.thirdBox,children:[(0,v.jsx)(s.G7,{className:N.thirdTopfont,children:"发货方式"}),(0,v.jsx)(s.G7,{className:N.flexModebox,children:_e.map((function(e,o){return(0,v.jsx)(s.G7,{onClick:function onClick(){!function handCheckDelivery(e){_e.map((function(o){return o.id===e.id?o.checked=!0:o.checked=!1,o})),me((0,l.Z)(_e)),le((function(o){return(0,a.Z)((0,a.Z)({},o),{},{shipment_mode:e.id})}))}(e)},className:h()(e.checked?N.activemodeBox:N.modeBox),children:e.name},o)}))})]}),(0,v.jsx)(s.G7,{children:xe}),(0,v.jsx)(s.G7,{style:{height:"160rpx"}}),(0,v.jsxs)(s.G7,{className:N.bottomBox,children:[(0,v.jsxs)(s.zx,{className:N.resetBox,onClick:function onClick(){!function handReset(){le({purchaser_id:"",clientName:"",sale_user_id:"",saleuserName:"",orderNo:"",sale_mode:void 0,shipment_mode:void 0})}()},children:[" ","重置"]}),(0,v.jsxs)(s.zx,{className:h()(xe?N.button:N.activeButton),disabled:xe,onClick:function onClick(){null==fe||fe()},children:[" ","确认"]})]})]})}),(0,v.jsx)(ne.Z,{list:Be,obj:ke,showPopup:We,popupClose:function popupClose(){return Ye(!1)},clickItem:function clickItem(e){return function clickItem(e){"扫码支付"===e.name&&Qe(),"线下汇款"===e.name&&eo(!0),Be.map((function(o){return e.id===o.id?o.checked=!0:o.checked=!1,o})),Se((0,l.Z)(Be))}(e)},handsurePay:function handsurePay(e){return function handsurePay(e){var o,n;if(!(o=Be.filter((function(e){return e.checked}))).length)return G().showToast({title:"请选择后再提交",icon:"error"}),!1;G().showModal({content:"确定交易吗?",confirmText:"确认",cancelText:"取消",success:(n=(0,c.Z)((0,i.Z)().mark((function _callee10(n){var t,l,a;return(0,i.Z)().wrap((function _callee10$(i){for(;;)switch(i.prev=i.next){case 0:if(!n.confirm){i.next=12;break}return G().showLoading({title:"请稍等...",mask:!0}),i.next=4,e.status;case 4:if(i.t0=i.sent,10===i.t0){i.next=9;break}i.t1=Je({id:Number(e.should_collect_order_id),payment_method:Number(null===(t=o[0])||void 0===t?void 0:t.id)}),i.next=10;break;case 9:i.t1=He({id:Number(e.pre_collect_order_id),payment_method:Number(null===(l=o[0])||void 0===l?void 0:l.id)});case 10:"success"===(null==(a=i.t1)?void 0:a.msg)?(G().showToast({title:"交易成功"}),G().hideLoading(),Ye(!1),C()):G().showToast({title:null==a?void 0:a.msg,icon:"error"});case 12:case"end":return i.stop()}}),_callee10)}))),function success(e){return n.apply(this,arguments)})})}(e)},showSide:Le,title:Fe,picUrl:Ee}),(0,v.jsx)(oe.Z,{show:Ke,onClose:function onClose(){return eo(!1)},offlineInfo:ke})]})}),"pages/order/index",{root:{cn:[]}},{navigationBarTitleText:"订单"}||{}))}},function(e){e.O(0,[2107,1216,8592],(function(){return o=9030,e(e.s=o);var o}));e.O()}]);