1 line
26 KiB
JavaScript
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),r=n(5861),c=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_",h=n(6408),p=n.n(h),v=n(5513),g=(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,r=(0,d.useState)({selected:-1,tabId:""}),u=(0,c.Z)(r,2),h=u[0],g=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;g((function(e){return(0,a.Z)((0,a.Z)({},e),{},{tabId:n[o].id.toString()})}))}}g((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(h.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;g((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:p()(m,h.selected==e.id&&x),children:e.name},e.id)}))})})})})),j=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",S="index-module__topItem___p12RW",B="index-module__orderNo___ee0pt",C="index-module__status___mfwsO",T="index-module__pussName___OFHb2",I="index-module__line___bwG9I",z="index-module__contBox___z18C3",L="index-module__leftCont___lAQ2l",P="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",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,r,c,d,u,_,m,x,f,h,p,g,j,b,N,Z,k,w,ee,oe,ne,te,le,ie,ae,re,ce,se,de,ue,_e,me,xe,fe,he,pe,ve,ge,je,be,Ne,Ze,ke,we,Ge,ye,Se,Be,Ce,Te,Ie,ze,Le,Pe,Fe,Re,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:S,children:[(0,v.jsxs)(s.G7,{className:B,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:z,children:[(0,v.jsx)(s.G7,{className:L,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===(r=a.rgb)||void 0===r?void 0:r.r," ").concat(null==e||null===(c=e.obj)||void 0===c||null===(d=c.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===(h=f.rgb)||void 0===h?void 0:h.b,")")},children:(0,v.jsxs)(s.G7,{className:P,children:["颜色 (",null==e||null===(p=e.obj)||void 0===p?void 0:p.total_colors,")"]})}),(0,v.jsxs)(s.G7,{className:F,children:[(0,v.jsxs)(s.G7,{className:R,children:[(0,v.jsxs)(s.G7,{className:D,children:[(0,v.jsxs)(s.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)(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===(re=e.obj)||void 0===re||null===(ce=re.product_list[0])||void 0===ce||null===(se=ce.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===(he=fe.product_colors[0])||void 0===he?void 0:he.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)(s.G7,{className:$,children:[(0,v.jsxs)(s.G7,{className:A,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===(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===(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===(Ie=Te.product_colors[1])||void 0===Ie?void 0:Ie.length)/100," ",0===(null==e||null===(ze=e.obj)||void 0===ze?void 0:ze.sale_mode)?"条":"m"]}),(0,v.jsxs)(s.G7,{className:J,children:["¥ ",(null==e||null===(Le=e.obj)||void 0===Le||null===(Pe=Le.product_list[0])||void 0===Pe||null===(Fe=Pe.product_colors[1])||void 0===Fe?void 0:Fe.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===(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===(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),te=n(6028);Page((0,t.createPageConfig)((function(){var e,o=(0,d.useState)({status:-1,page:1,size:10,order_no:""}),n=(0,c.Z)(o,2),t=n[0],_=n[1],m=(0,u.Vy)(),x=m.fetchData,f=m.state,h=(0,d.useState)({list:[],total:0}),y=(0,c.Z)(h,2),S=y[0],B=y[1],C=function(){var e=(0,r.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)(le)));case 2:e=o.sent,B((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),L((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,c.Z)(T,2),z=I[0],L=I[1],P=function(){var e=(0,r.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,L(!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,d.useMemo)((function(){return(0,b.rA)({list:S.list,total:S.total,status:f.loading})}),[S,f]),R=(0,d.useRef)({size:t.size,page:t.page}),D=(0,d.useCallback)((function(){if(S.list.length<S.total){R.current.page++;var e=R.current.size*R.current.page;_((0,a.Z)((0,a.Z)({},t),{},{size:e}))}}),[S]),O=(0,u.rj)().fetchData,M=(0,d.useState)([{id:-1,name:"全部"}]),E=(0,c.Z)(M,2),$=E[0],A=E[1],Q=function(){var e=(0,r.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){R.current.page=1,_((function(o){return(0,a.Z)((0,a.Z)({},o),{},{status:e,size:10})})),B((function(){return{list:[],total:0}}))}),[]),H=(0,d.useCallback)((function(e){R.current.page=1,B((function(){return{list:[],total:0}})),_((function(o){return(0,a.Z)((0,a.Z)({},o),{},{order_no:e,size:10})}))}),[]),U=(0,d.useState)(!1),V=(0,c.Z)(U,2),W=V[0],Y=V[1];(0,w.useDidShow)((function(){var e=G().getCurrentPages(),o=e[e.length-1];ie((function(e){var n,t,l,i,r,c,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!==(r=o.data)&&void 0!==r&&r.saleuserId?null===(c=o.data)||void 0===c?void 0:c.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:"",sale_mode:void 0,shipment_mode:void 0}),X=(0,c.Z)(q,2),le=X[0],ie=X[1],ae=function navTo(e){1===e?G().navigateTo({url:"/pages/customerPage/index?clientId="+(null==le?void 0:le.purchaser_id)}):G().navigateTo({url:"/pages/saleuserPage/index?saleuserId="+(null==le?void 0:le.sale_user_id)})},re=(0,d.useState)([{id:-1,name:"不限"},{id:0,name:"大货"},{id:1,name:"剪版"},{id:2,name:"散剪"}]),ce=(0,c.Z)(re,2),se=ce[0],de=ce[1],ue=(0,d.useState)([{id:-1,name:"不限"},{id:1,name:"自提"},{id:2,name:"物流"}]),_e=(0,c.Z)(ue,2),me=_e[0],xe=_e[1],fe=(0,d.useMemo)((function(){return""===le.clientName&&""===le.saleuserName&&void 0===le.sale_mode&&void 0===le.shipment_mode}),[le]),he=function resetArr(e){return e.map((function(e){return e.checked=!1,e})),e},pe=function(){var e=(0,r.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 ve=(0,u.Rv)().fetchData,ge=function(){var e=(0,r.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,r.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,ve({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)}}(),je=(0,u.eS)().fetchData,be=function(){var e=(0,r.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,je(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)}}(),Ne=(0,u.Gg)().fetchData,Ze=(0,u.fu)().fetchData,ke=(0,d.useState)({}),we=(0,c.Z)(ke,2),Ge=we[0],ye=we[1],Se=(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:"扫码支付"}]),Be=(0,c.Z)(Se,2),Ce=Be[0],Te=Be[1],Ie=function(){var e=(0,r.Z)((0,i.Z)().mark((function _callee8(e,o){var n,t,a,r,c;return(0,i.Z)().wrap((function _callee8$(i){for(;;)switch(i.prev=i.next){case 0:if(e.stopPropagation(),ye(o),10===o.status){i.next=11;break}return i.next=5,Ne({id:o.should_collect_order_id});case 5:n=i.sent,Ce.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})),Te((0,l.Z)(Ce)),o.is_shipper_picks_up&&(t=Ce.filter((function(e){return 6===e.id})),0===t.length&&(Ce.unshift({id:6,iconfont:"icon-xianxiahuizong",name:"货主自提",fonts:"",money:"",isCheck:!1}),Te((0,l.Z)(Ce)))),i.next=18;break;case 11:return i.next=13,Ze({id:o.pre_collect_order_id});case 13:a=i.sent,(r=[]).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&&(c=r.filter((function(e){return 6===e.id})),0===c.length&&r.unshift({id:6,iconfont:"icon-xianxiahuizong",name:"货主自提",fonts:"",money:"",isCheck:!1})),Te([].concat(r));case 18:Fe(!0),Me("待支付款项"),Xe(!0);case 21:case"end":return i.stop()}}),_callee8)})));return function toPay(o,n){return e.apply(this,arguments)}}(),ze=(0,d.useState)(!0),Le=(0,c.Z)(ze,2),Pe=Le[0],Fe=Le[1],Re=(0,d.useState)(""),De=(0,c.Z)(Re,2),Oe=De[0],Me=De[1],Ee=(0,d.useState)(""),$e=(0,c.Z)(Ee,2),Ae=$e[0],Qe=$e[1],Je=(0,u.fs)().fetchData,He=function(){var e=(0,r.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=[],Ge.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:Ge.sale_mode_name,shipment_mode:Ge.shipment_mode_name,company:Ge.title_purchaser_name,sale_user:Ge.sale_user_name,order_created_time:(0,K.o0)(Ge.create_time),order_no:Ge.order_no,target_user_name:Ge.target_user_name,target_address:Ge.address_detail,target_description:Ge.remark,pay_account:Ge.transfer_remittance_account,bank_account_name:Ge.account_name,bank_name:Ge.bank_of_deposit,pay_type:Ge.settle_mode_name,client:Ge.purchaser_name,phone:Ge.target_user_phone,order_total_length:(Ge.total_number/100).toString(),order_total_price:(Ge.bill_total_sale_price/100).toString(),total_weight_error_discount:(Ge.total_weight_error_discount/100).toString(),order_total_num:Ge.total_number.toString(),qrcode:"",order_total_weight:(Ge.total_weight/1e3).toString(),estimate_amount:(Ge.estimate_amount/100).toString(),total_sale_price:(Ge.total_sale_price/100).toString(),show_total_sale_price:!0,show_total_weight_error_discount:!0,actual_amount:(Ge.actual_amount/100).toString(),wait_pay_amount:(Ge.wait_pay_amount/100).toString(),order_total_weight_error:(Ge.total_weight_error/1e3).toString()},t.next=5,Je(o);case 5:(n=t.sent).data&&(Fe(!1),Me("查看销售码单"),Qe(n.data.base64));case 7:case"end":return t.stop()}}),_callee9)})));return function handScanpay(){return e.apply(this,arguments)}}(),Ue=(0,u.a3)().fetchData,Ve=(0,u.ot)().fetchData,We=(0,d.useState)(!1),Ye=(0,c.Z)(We,2),qe=Ye[0],Xe=Ye[1],Ke=(0,d.useState)(!1),eo=(0,c.Z)(Ke,2),oo=eo[0],no=eo[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)(j.Z,{handScan:function handScan(){return function handScan(){G().scanCode({success:function success(e){_((0,a.Z)((0,a.Z)({},t),{},{order_no:e.result}))},fail:function fail(e){}})}()},showScan:!0,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)(te.Z,{name:"icon-shaixuan",size:35,color:fe?"":"#0D7CFF",customClassName:N.activeshaixuan}),(0,v.jsx)(s.G7,{className:p()(fe?N.shaixuan:N.activeshai),children:"筛选"})]})})}),(0,v.jsx)(s.G7,{style:{background:"#FFFFFF"},children:(0,v.jsx)(g,{list:$,onSelect:J,defaultId:-1})}),(0,v.jsxs)(s.G7,{className:N.order_list,children:[(0,v.jsx)(k.Z,{statusMore:F,selfonScrollToLower:D,refresherEnabled:!0,refresherTriggered:z,selfOnRefresherRefresh:P,children:null==S||null===(e=S.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 ge(e,o)},nextBuy:function nextBuy(e,o){return be(e,o)},toPay:function toPay(e,o){return Ie(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 ae(1)},children:[(0,v.jsx)(s.G7,{className:N.lefttopTitle,children:"客户信息"}),(0,v.jsxs)(s.G7,{className:p()(""===le.clientName?N.lefttopSelectBox:N.activelefttopSelectBox),children:[(0,v.jsx)(s.G7,{className:N.lefttopSelectName,children:""===le.clientName?"请选择客户":le.clientName}),(0,v.jsx)(s.G7,{className:p()("iconfont","icon-more",N.icon_more)})]})]}),(0,v.jsxs)(s.G7,{className:N.leftTop,onClick:function onClick(){return ae(2)},children:[(0,v.jsx)(s.G7,{className:N.lefttopTitle,children:"业务员"}),(0,v.jsxs)(s.G7,{className:p()(""===le.saleuserName?N.lefttopSelectBox:N.activelefttopSelectBox),children:[(0,v.jsx)(s.G7,{className:N.lefttopSelectName,children:""===le.saleuserName?"请选择客户":le.saleuserName}),(0,v.jsx)(s.G7,{className:p()("iconfont","icon-more",N.icon_more)})]})]})]}),(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:se.map((function(e,o){return(0,v.jsx)(s.G7,{onClick:function onClick(){!function handCheckMode(e){se.map((function(o){return o.id===e.id?o.checked=!0:o.checked=!1,o})),de((0,l.Z)(se)),ie((function(o){return(0,a.Z)((0,a.Z)({},o),{},{sale_mode:e.id})}))}(e)},className:p()(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:me.map((function(e,o){return(0,v.jsx)(s.G7,{onClick:function onClick(){!function handCheckDelivery(e){me.map((function(o){return o.id===e.id?o.checked=!0:o.checked=!1,o})),xe((0,l.Z)(me)),ie((function(o){return(0,a.Z)((0,a.Z)({},o),{},{shipment_mode:e.id})}))}(e)},className:p()(e.checked?N.activemodeBox:N.modeBox),children:e.name},o)}))})]}),(0,v.jsx)(s.G7,{children:fe}),(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(){R.current.page=1,ie({purchaser_id:"",clientName:"",sale_user_id:"",saleuserName:"",sale_mode:void 0,shipment_mode:void 0}),_((0,a.Z)((0,a.Z)({},t),{},{size:10}));var e=he(se);de((0,l.Z)(e));var o=he(me);xe((0,l.Z)(o))}()},children:[" ","重置"]}),(0,v.jsxs)(s.zx,{className:p()(fe?N.button:N.activeButton),disabled:fe,onClick:function onClick(){null==pe||pe()},children:[" ","确认"]})]})]})}),(0,v.jsx)(ne.Z,{list:Ce,obj:Ge,showPopup:qe,popupClose:function popupClose(){return Xe(!1)},clickItem:function clickItem(e){return function clickItem(e){"扫码支付"===e.name&&He(),"线下汇款"===e.name&&no(!0),Ce.map((function(o){return e.id===o.id?o.checked=!0:o.checked=!1,o})),Te((0,l.Z)(Ce))}(e)},handsurePay:function handsurePay(e){return function handsurePay(e){var o,n;if(!(o=Ce.filter((function(e){return e.checked}))).length)return G().showToast({title:"请选择后再提交",icon:"error"}),!1;G().showModal({content:"确定交易吗?",confirmText:"确认",cancelText:"取消",success:(n=(0,r.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=Ue({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=Ve({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(),Xe(!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:Pe,title:Oe,picUrl:Ae}),(0,v.jsx)(oe.Z,{show:oo,onClose:function onClose(){return no(!1)},offlineInfo:Ge})]})}),"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()}]); |