1 line
27 KiB
JavaScript
1 line
27 KiB
JavaScript
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[6563],{8455:function(e,o,t){var n=t(2180),l=t(3433),a=t(4165),i=t(1413),s=t(5861),r=t(9439),c=t(1515),d=t(2954),_=t.n(d),u=t(7294),m=t(4184),f=t.n(m),x="index-module__order_status_list___k66cU",p="index-module__order_status_item___rcQLA",h="index-module__selected___RLILI",v="index-module__order_list_scroll___mbA1_",g=t(5893),N=function OrderStatusList(e){var o=e.list,t=void 0===o?[]:o,n=e.defaultId,l=void 0===n?null:n,a=e.onSelect,s=(0,u.useState)({selected:-1,tabId:""}),d=(0,r.Z)(s,2),_=d[0],m=d[1];return(0,u.useEffect)((function(){if("number"==typeof l&&l>=0){console.log("defaultId:::",l);var e=null==t?void 0:t.findIndex((function(e){return e.id==l}));if(-1!==e){var o=e>0?e-1:0;m((function(e){return(0,i.Z)((0,i.Z)({},e),{},{tabId:t[o].id.toString()})}))}}m((function(e){return(0,i.Z)((0,i.Z)({},e),{},{selected:l||-1})}))}),[l]),(0,g.jsx)(c.G7,{className:x,children:(0,g.jsx)(c.pf,{scrollX:!0,scrollIntoView:"tabs_".concat(_.tabId),scrollWithAnimation:!0,children:(0,g.jsx)(c.G7,{className:v,children:t.map((function(e,o){return(0,g.jsx)(c.G7,{id:"tabs_".concat(e.id),onClick:function onClick(){return function clickEvent(e){var o=e.item,n=e.index,l=n>0?n-1:0;m((function(e){return(0,i.Z)((0,i.Z)({},e),{},{tabId:t[l].id.toString(),selected:o.id})})),null==a||a(o.id)}({item:e,index:o})},className:f()(p,_.selected==e.id&&h),children:e.name},e.id)}))})})})},Z=(0,u.memo)(N),j={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","justify-center":"index-module__justify-center___FZILr","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","s-w":"index-module__s-w___LE_4o","s-e":"index-module__s-e___knya8",filter:"index-module__filter___Kv6KD",orderContainer:"index-module__orderContainer___GCzcP",flexBox:"index-module__flexBox___zJAJh",searchBar:"index-module__searchBar___G11z7",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",lefttopSelectNameactive:"index-module__lefttopSelectNameactive___baTzP",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",order_list:"index-module__order_list___RoU_W",afterSaleIcon:"index-module__afterSaleIcon___DKQ0K",iconName:"index-module__iconName___PUJH0"},w="index-module__itemBox___r2hfd",y="index-module__topItem___p12RW",S="index-module__orderNo___ee0pt",b="index-module__status___mfwsO",k="index-module__flexBox___kkAz6",G="index-module__pussName___OFHb2",B="index-module__platform_name___BT1x8",C="index-module__editFont___L2rx3",T="index-module__line___bwG9I",I="index-module__contBox___z18C3",P="index-module__leftCont___lAQ2l",L="index-module__leftContNums___NYM9g",z="index-module__rightCont___zh7yE",D="index-module__rightTop___CTR2z",R="index-module__productBox___ZRAps",F="index-module__productName___BYyH2",O="index-module__productMode___FoG3x",M="index-module__shipMode___m7eRw",E="index-module__colorsBox___AGf69",A="index-module__colorNameOne___DByBc",$="index-module__colorName___J5hr_",Q="index-module__colorNameTwo___DxtPY",H="index-module__lineOne___AvPrw",J="index-module__bottomMsg___Ol2O_",U="index-module__msgLeft____ZLLS",V="index-module__msgRightOne___IJhUL",W="index-module__bottomBox___rpUFB",K=t(6281),Y=t(4812),q=t(3407),X=t(9579),ee=function ItemList(e){var o,t,n,l,a,i,s,r,d,m,f,x,p,h,v,N,Z,j,ee,oe,te,ne,le,ae,ie,se=e.obj,re=(0,u.useMemo)((function(){return 0==se.status||1==se.status||2==se.status?null==se?void 0:se.estimate_amount:null==se?void 0:se.bill_total_sale_price}),[se]),ce=((0,u.useMemo)((function(){return 0===(null==se?void 0:se.status)||1===(null==se?void 0:se.status)?"预估金额":"合计金额"}),[se]),(0,u.useCallback)((function(e){return{lab:e.lab,rgb:e.rgb,texture_url:e.texture_url}}),[]));return(0,g.jsxs)(c.G7,{className:w,onClick:function navTo(e){null==e||e.stopPropagation(),_().navigateTo({url:"/pages/orderDetails/index?id=".concat(null==se?void 0:se.id)})},children:[(0,g.jsxs)(c.G7,{className:y,children:[(0,g.jsxs)(c.G7,{className:S,children:["单号:",null==se?void 0:se.order_no]}),(0,g.jsx)(c.G7,{className:b,children:null==se?void 0:se.status_name})]}),(0,g.jsxs)(c.G7,{className:k,children:[(0,g.jsxs)(c.G7,{className:k,children:[(0,g.jsx)(c.G7,{className:G,children:null==se?void 0:se.purchaser_name}),(null==se?void 0:se.platform_source_name)&&1!==(null==se?void 0:se.platform_source)&&(0,g.jsx)(X.Z,{type:"primary",size:"small",circle:!0,plain:!0,customClassName:B,children:null==se?void 0:se.platform_source_name})]}),(null==se?void 0:se.is_modify)&&(0,g.jsx)(c.G7,{className:C,children:"已修改"})]}),(0,g.jsx)(c.G7,{className:T}),(0,g.jsxs)(c.G7,{className:I,children:[(0,g.jsx)(c.G7,{style:{minWidth:"24%"},children:(0,g.jsxs)(c.G7,{className:P,children:[(0,g.jsx)(q.Z,{value:ce(null==se||null===(o=se.product_list)||void 0===o?void 0:o[0])}),(0,g.jsxs)(c.G7,{className:L,children:["颜色 (",null==se?void 0:se.total_colors,")"]})]})}),(0,g.jsxs)(c.G7,{className:z,children:[(0,g.jsxs)(c.G7,{className:D,children:[(0,g.jsxs)(c.G7,{className:R,children:[(0,g.jsxs)(c.G7,{className:F,children:[null==se||null===(t=se.product_list[0])||void 0===t?void 0:t.code," ",null==se||null===(n=se.product_list[0])||void 0===n?void 0:n.name]}),(0,g.jsx)(c.G7,{className:O,children:0===(null==se?void 0:se.sale_mode)?"大货":1===(null==se?void 0:se.sale_mode)?"剪版":"散剪"})]}),(0,g.jsx)(c.G7,{className:M,children:null==se?void 0:se.shipment_mode_name})]}),(0,g.jsxs)(c.G7,{className:E,children:[(0,g.jsxs)(c.G7,{className:A,children:[null==se||null===(l=se.product_list[0])||void 0===l||null===(a=l.product_colors[0])||void 0===a?void 0:a.code," ",null==se||null===(i=se.product_list[0])||void 0===i||null===(s=i.product_colors[0])||void 0===s?void 0:s.name]}),(0,g.jsxs)(c.G7,{className:$,children:["x",0===(null==se?void 0:se.sale_mode)?null==se||null===(r=se.product_list[0])||void 0===r||null===(d=r.product_colors[0])||void 0===d?void 0:d.roll:(null==se||null===(m=se.product_list[0])||void 0===m||null===(f=m.product_colors[0])||void 0===f?void 0:f.length)/100," ",0===(null==se?void 0:se.sale_mode)?"条":"m"]}),(0,g.jsxs)(c.G7,{className:Q,children:["¥ ",(null==se||null===(x=se.product_list[0])||void 0===x||null===(p=x.product_colors[0])||void 0===p?void 0:p.sale_price)/100,"/",1==(null==se?void 0:se.sale_mode)?"m":"kg"]})]}),(null==se||null===(h=se.product_list[0])||void 0===h||null===(v=h.product_colors)||void 0===v?void 0:v.length)>1&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(c.G7,{className:E,children:[(0,g.jsxs)(c.G7,{className:A,children:[null==se||null===(N=se.product_list[0])||void 0===N||null===(Z=N.product_colors[1])||void 0===Z?void 0:Z.code," ",null==se||null===(j=se.product_list[0])||void 0===j||null===(ee=j.product_colors[1])||void 0===ee?void 0:ee.name]}),(0,g.jsxs)(c.G7,{className:$,children:["x",0===(null==se?void 0:se.sale_mode)?null==se||null===(oe=se.product_list[0])||void 0===oe||null===(te=oe.product_colors[1])||void 0===te?void 0:te.roll:(null==se||null===(ne=se.product_list[0])||void 0===ne||null===(le=ne.product_colors[1])||void 0===le?void 0:le.length)/100," ",0===(null==se?void 0:se.sale_mode)?"条":"m"]}),(0,g.jsxs)(c.G7,{className:Q,children:["¥ ",(null==se||null===(ae=se.product_list[0])||void 0===ae||null===(ie=ae.product_colors[1])||void 0===ie?void 0:ie.sale_price)/100,"/",1==(null==se?void 0:se.sale_mode)?"m":"kg"]})]})})]})]}),(0,g.jsx)(c.G7,{className:H}),(0,g.jsxs)(c.G7,{className:J,children:[(0,g.jsxs)(c.G7,{className:U,children:[null==se?void 0:se.total_fabrics," 种面料,",null==se?void 0:se.total_colors," 种颜色,共 ",0===(null==se?void 0:se.sale_mode)?null==se?void 0:se.total_number:(null==se?void 0:se.total_number)/100," ",0===(null==se?void 0:se.sale_mode)?"条":"m"]}),5!=se.status&&(0,g.jsxs)(c.G7,{className:V,children:["¥",(0,Y.yb)(re)]})]}),(0,g.jsx)(c.G7,{className:W,children:(0,g.jsx)(K.Z,{obj:se,cancle:function cancle(o){var t;return null==e||null===(t=e.cancle)||void 0===t?void 0:t.call(e,o,se)},nextBuy:function nextBuy(o){var t;return null==e||null===(t=e.nextBuy)||void 0===t?void 0:t.call(e,o,se)},toPay:function toPay(o){var t;return null==e||null===(t=e.toPay)||void 0===t?void 0:t.call(e,o,se)}})})]})},oe=(0,u.memo)(ee),te=t(5328),ne=t(6252),le=t(6107),ae=t(1251),ie=t(4489),se=t(7227),re=t(5989),ce=t(9335),de=t(6028),_e=t(2495),ue=t(1115),me=t(8932),fe=t(9498),xe=t(9742),pe=t(4547),he=function Order(){var e,o=(0,u.useState)({status:-1,page:1,size:10,order_no:""}),t=(0,r.Z)(o,2),n=t[0],m=t[1],x=(0,ae.Vy)(),p=x.fetchData,h=x.state,v=(0,u.useState)({list:[],total:0}),N=(0,r.Z)(v,2),w=N[0],y=N[1],S=(0,u.useState)({purchaser_id:"",clientName:"",sale_user_id:"",saleuserName:"",sale_mode:void 0,shipment_mode:void 0}),b=(0,r.Z)(S,2),k=b[0],G=b[1],B=(0,u.useState)(!1),C=(0,r.Z)(B,2),T=C[0],I=C[1],P=(0,u.useRef)({size:n.size,page:n.page}),L=(0,u.useState)(!1),z=(0,r.Z)(L,2),D=z[0],R=z[1],F=function(){var e=(0,s.Z)((0,a.Z)().mark((function _callee(){var e;return(0,a.Z)().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,p((0,i.Z)((0,i.Z)({},(0,se.mB)(n)),(0,se.mB)(k)));case 2:e=o.sent,y((function(o){var t,n;return(0,i.Z)((0,i.Z)({},o),{},{list:null===(t=e.data)||void 0===t?void 0:t.list,total:null===(n=e.data)||void 0===n?void 0:n.total})})),I(!1),R((function(){return!1}));case 6:case"end":return o.stop()}}),_callee)})));return function getOrderList(){return e.apply(this,arguments)}}(),O=function(){var e=(0,s.Z)((0,a.Z)().mark((function _callee2(){return(0,a.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:P.current.page=1,R(!0),m((function(e){return(0,i.Z)((0,i.Z)({},e),{},{size:10})}));case 3:case"end":return e.stop()}}),_callee2)})));return function getRefresherRefresh(){return e.apply(this,arguments)}}(),M=(0,u.useMemo)((function(){return console.log({list:w.list,total:w.total,status:h.loading},"{ list: orderData.list, total: orderData.total, status: orderState.loading }"),(0,se.rA)({list:w.list,total:w.total,status:h.loading})}),[w,h]),E=(0,u.useCallback)((function(){if(w.list.length<w.total){P.current.page++;var e=P.current.size*P.current.page;m((0,i.Z)((0,i.Z)({},n),{},{size:e}))}}),[w]),A=(0,ae._z)().fetchData,$=(0,u.useState)([{id:-1,name:"全部"}]),Q=(0,r.Z)($,2),H=Q[0],J=Q[1],U=function(){var e=(0,s.Z)((0,a.Z)().mark((function _callee3(){var e;return(0,a.Z)().wrap((function _callee3$(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,A();case 2:e=o.sent,J((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,u.useEffect)((function(){null!=n.status&&F()}),[n]);var V=(0,u.useCallback)((function(e){P.current.page=1,m((function(o){return(0,i.Z)((0,i.Z)({},o),{},{status:e,size:10})})),y((function(){return{list:[],total:0}}))}),[]),W=(0,u.useCallback)((function(e){P.current.page=1,y((function(){return{list:[],total:0}})),m((function(o){return(0,i.Z)((0,i.Z)({},o),{},{order_no:e,size:10})}))}),[]),K=_().getCurrentPages(),q=K[K.length-1];(0,d.useDidShow)((function(){console.log(q.data,"8888"),G((function(e){var o,t,n,l,a,s,r,c;return(0,i.Z)((0,i.Z)({},e),{},{purchaser_id:null!==(o=q.data)&&void 0!==o&&o.clientId?null===(t=q.data)||void 0===t?void 0:t.clientId:"",clientName:null!==(n=q.data)&&void 0!==n&&n.clientName?null===(l=q.data)||void 0===l?void 0:l.clientName:"",sale_user_id:null!==(a=q.data)&&void 0!==a&&a.saleuserId?null===(s=q.data)||void 0===s?void 0:s.saleuserId:"",saleuserName:null!==(r=q.data)&&void 0!==r&&r.saleuserName?null===(c=q.data)||void 0===c?void 0:c.saleuserName:""})}))}));var X=function navTo(e){1===e?_().navigateTo({url:"/pages/customerPage/index?clientId=".concat(null==k?void 0:k.purchaser_id)}):_().navigateTo({url:"/pages/saleuserPage/index?saleuserId=".concat(null==k?void 0:k.sale_user_id)})},ee=(0,u.useState)([{id:-1,name:"不限"},{id:0,name:"大货"},{id:1,name:"剪版"},{id:2,name:"散剪"}]),he=(0,r.Z)(ee,2),ve=he[0],ge=he[1],Ne=(0,u.useState)([{id:-1,name:"不限"},{id:1,name:"自提"},{id:2,name:"物流"}]),Ze=(0,r.Z)(Ne,2),je=Ze[0],we=Ze[1],ye=(0,u.useMemo)((function(){return""===k.clientName&&""===k.saleuserName&&void 0===k.sale_mode&&void 0===k.shipment_mode}),[k]),Se=function resetArr(e){return e.map((function(e){return e.checked=!1,e})),e},be=function(){var e=(0,s.Z)((0,a.Z)().mark((function _callee4(){return(0,a.Z)().wrap((function _callee4$(e){for(;;)switch(e.prev=e.next){case 0:F();case 1:case"end":return e.stop()}}),_callee4)})));return function handSure(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){U()}),[]);var ke=(0,ae.g7)().fetchData,Ge=function(){var e=(0,s.Z)((0,a.Z)().mark((function _callee6(e,o){return(0,a.Z)().wrap((function _callee6$(t){for(;;)switch(t.prev=t.next){case 0:e.stopPropagation(),_().showModal({content:"确定要取消吗?",confirmText:"确认",cancelText:"取消",success:function success(e){return(0,s.Z)((0,a.Z)().mark((function _callee5(){var t;return(0,a.Z)().wrap((function _callee5$(n){for(;;)switch(n.prev=n.next){case 0:if(!e.confirm){n.next=6;break}return _().showLoading({title:"请稍等...",mask:!0}),n.next=4,ke({id:o.id});case 4:"success"===(t=n.sent).msg?(_().showToast({title:"取消成功"}),_().hideLoading(),F()):_().showToast({title:t.msg,icon:"error"});case 6:case"end":return n.stop()}}),_callee5)})))()}});case 2:case"end":return t.stop()}}),_callee6)})));return function cancle(o,t){return e.apply(this,arguments)}}(),Be=(0,ae.BV)().fetchData,Ce=function(){var e=(0,s.Z)((0,a.Z)().mark((function _callee7(e,o){var t,n,l;return(0,a.Z)().wrap((function _callee7$(a){for(;;)switch(a.prev=a.next){case 0:return e.stopPropagation(),_().showLoading({title:"请稍等...",mask:!0}),t=[],o.product_list.forEach((function(e){e.product_colors.forEach((function(e){t.push({length:e.length,roll:e.roll,product_color_id:e.id})}))})),n={purchaser_id:o.purchaser_id,sale_mode:o.sale_mode,color_list:t},a.next=7,Be(n);case 7:"success"===(l=a.sent).msg?(_().hideLoading(),_().showToast({title:"加入购物车成功!",duration:2e3}),F()):_().showToast({title:l.msg,icon:"error"});case 9:case"end":return a.stop()}}),_callee7)})));return function nextBuy(o,t){return e.apply(this,arguments)}}(),Te=(0,ae.P0)().fetchData,Ie=(0,ae.aA)().fetchData,Pe=(0,u.useState)({}),Le=(0,r.Z)(Pe,2),ze=Le[0],De=Le[1],Re=(0,u.useState)(ue.gT),Fe=(0,r.Z)(Re,2),Oe=Fe[0],Me=Fe[1],Ee=(0,u.useState)(!1),Ae=(0,r.Z)(Ee,2),$e=Ae[0],Qe=Ae[1],He=(0,u.useState)(!1),Je=(0,r.Z)(He,2),Ue=Je[0],Ve=Je[1],We=(0,u.useState)(!0),Ke=(0,r.Z)(We,2),Ye=Ke[0],qe=Ke[1],Xe=(0,u.useState)(""),eo=(0,r.Z)(Xe,2),oo=eo[0],to=eo[1],no=(0,u.useState)(""),lo=(0,r.Z)(no,2),ao=lo[0],io=lo[1],so=(0,ae.fs)().fetchData,ro=function(){var e=(0,s.Z)((0,a.Z)().mark((function _callee8(){var e,o,t;return(0,a.Z)().wrap((function _callee8$(n){for(;;)switch(n.prev=n.next){case 0:return e=[],ze.product_list.forEach((function(o){o.product_colors.forEach((function(t){e.push({product_code:o.code,product_name:o.name,product_color_code:(0,Y.ZK)(t.code),product_color_name:t.name,num:t.roll.toString(),weight:(0,Y.$y)(t.actual_weight).toString(),sale_price:(t.sale_price/100).toString(),total_price:0!==t.total_sale_price?(t.total_sale_price/100).toString():(t.estimate_amount/100).toString(),length:(t.length/100).toString(),weight_error:(0,Y.$y)(t.weight_error).toString()})}))})),o={list:e,title:"面料销售电子确认单",show_qrcode:!0,show_barcode:!0,order_type:ze.sale_mode_name,shipment_mode:ze.shipment_mode_name,company:ze.title_purchaser_name,sale_user:ze.sale_user_name,order_created_time:(0,Y.o0)(ze.create_time),order_no:ze.order_no,target_user_name:ze.target_user_name,target_address:ze.address_detail,target_description:ze.remark,pay_account:ze.transfer_remittance_account,bank_account_name:ze.account_name,bank_name:ze.bank_of_deposit,pay_type:ze.settle_mode_name,client:ze.purchaser_name,phone:ze.target_user_phone,order_total_length:(ze.total_number/100).toString(),order_total_price:(ze.bill_total_sale_price/100).toString(),total_weight_error_discount:(ze.total_weight_error_discount/100).toString(),order_total_num:ze.total_number.toString(),qrcode:"".concat(_e.uQ,"?key=").concat(mo),order_total_weight:(ze.total_weight/1e3).toString(),estimate_amount:(ze.estimate_amount/100).toString(),total_sale_price:(ze.total_sale_price/100).toString(),actual_amount:(ze.actual_amount/100).toString(),wait_pay_amount:(ze.wait_pay_amount/100).toString(),order_total_weight_error:(ze.total_weight_error/1e3).toString(),show_sale_price:!(0!=(null==ze?void 0:ze.sale_mode)||null==ze||!ze.is_display_price)||!(1!==(null==ze?void 0:ze.sale_mode)&&2!==(null==ze?void 0:ze.sale_mode)),show_total_price:!(0!=(null==ze?void 0:ze.sale_mode)||null==ze||!ze.is_display_price)||!(1!==(null==ze?void 0:ze.sale_mode)&&2!==(null==ze?void 0:ze.sale_mode)),show_estimate_amount:!(0!=(null==ze?void 0:ze.sale_mode)||null==ze||!ze.is_display_price)||!(1!==(null==ze?void 0:ze.sale_mode)&&2!==(null==ze?void 0:ze.sale_mode)),show_total_sale_price:!(0!=(null==ze?void 0:ze.sale_mode)||null==ze||!ze.is_display_price)||!(1!==(null==ze?void 0:ze.sale_mode)&&2!==(null==ze?void 0:ze.sale_mode)),show_total_weight_error_discount:!(0!=(null==ze?void 0:ze.sale_mode)||null==ze||!ze.is_display_price)||!(1!==(null==ze?void 0:ze.sale_mode)&&2!==(null==ze?void 0:ze.sale_mode)),show_actual_amount:!(0!=(null==ze?void 0:ze.sale_mode)||null==ze||!ze.is_display_price)||!(1!==(null==ze?void 0:ze.sale_mode)&&2!==(null==ze?void 0:ze.sale_mode)),show_wait_pay_amount:!(0!=(null==ze?void 0:ze.sale_mode)||null==ze||!ze.is_display_price)||!(1!==(null==ze?void 0:ze.sale_mode)&&2!==(null==ze?void 0:ze.sale_mode)),show_tips:!0,tips:"请核对本单后验收, <b>如发现质量问题,请于收到货之日起3天内与平台客服联系协商解决,</b>逾期不作处理即表示购方默认对货物无异议;<b>购方确认无任何问题方可裁剪/加工,一经裁剪,缩水等工艺,平台概不负责;</b>\n 看布购货,请先试缩水,并注意分缸裁布!如需撞色拼接,请先试色牢度。非质量问题,恕不退换,谢谢合作!"},n.next=5,so(o);case 5:(t=n.sent).data&&(console.log(t.data.base64),qe(!1),to("查看销售码单"),io(t.data.base64));case 7:case"end":return n.stop()}}),_callee8)})));return function handScanpay(){return e.apply(this,arguments)}}(),co=function(){var e=(0,s.Z)((0,a.Z)().mark((function _callee9(e,o){var t,n,i,s,r,c;return(0,a.Z)().wrap((function _callee9$(a){for(;;)switch(a.prev=a.next){case 0:if(e.stopPropagation(),console.log("toPay",o),De(o),10===o.status){a.next=14;break}return a.next=6,Te({id:o.should_collect_order_id});case 6:t=a.sent,fo(t.data.md5_key),(n=Oe.filter((function(e){return!([3,8,13,9].includes(o.status)||[7].includes(o.status)&&[pe.p.BulkCut,pe.p.Plate].includes(o.sale_mode))||![5,3].includes(e.id)}))).map((function(e){return 3===e.id&&(e.name="".concat(t.data.account_period,"天账期"),e.fonts="可用额度".concat((0,Y.yb)(t.data.account_period_credit_available_line).toLocaleString())),2===e.id&&(e.fonts="可用额度".concat((0,Y.yb)(t.data.advance_deposit_balance).toLocaleString())),e})),Me((0,l.Z)(n)),o.is_shipper_picks_up&&(i=n.filter((function(e){return 6===e.id})),console.log(i,"456456"),0===i.length&&(n.unshift({id:6,iconfont:"icon-huozhuziti",color:"#ffffff",name:"货主自提",fonts:"",money:"",isCheck:!1}),Me((0,l.Z)(n)))),a.next=22;break;case 14:return a.next=16,Ie({id:o.pre_collect_order_id});case 16:s=a.sent,fo(s.data.md5_key),(r=[]).push({id:2,iconfont:"icon-yufukuan1",name:"预存款",fonts:"可用额度".concat((0,Y.yb)(s.data.advance_deposit_balance).toLocaleString()),money:"",isCheck:!1},{iconfont:"icon-yue",name:"线下汇款"},{iconfont:"icon-saomiao",name:"扫码支付",color:"#ffffff"}),o.is_shipper_picks_up&&(c=r.filter((function(e){return 6===e.id})),0===c.length&&r.unshift({id:6,iconfont:"icon-huozhuziti",name:"货主自提",color:"#ffffff",fonts:"",money:"",isCheck:!1})),Me([].concat(r));case 22:qe(!0),to("待支付款项"),Qe(!0);case 25:case"end":return a.stop()}}),_callee9)})));return function toPay(o,t){return e.apply(this,arguments)}}(),_o=(0,u.useState)(""),uo=(0,r.Z)(_o,2),mo=uo[0],fo=uo[1],xo=(0,ae._6)().fetchData,po=(0,ae.hj)().fetchData;return(0,fe.F5)(me.R2.ORDER),(0,g.jsxs)(c.G7,{className:f()("flex-col",j.orderContainer),children:[(0,g.jsx)(le.Z,{hasLeft:!0,leftSlot:(0,g.jsxs)(c.G7,{className:j.afterSaleIcon,onClick:function handleAfterSale(){(0,ue.jD)("/pages/refundPage/index")},children:[(0,g.jsx)(de.Z,{name:"icon-shouhou",size:50,color:"007aff"}),(0,g.jsx)(c.G7,{className:j.iconName,children:"售后"})]}),title:"订单"}),(0,g.jsx)(c.G7,{className:j.searchBar,children:(0,g.jsx)(ie.Z,{handScan:function handScan(){return function handScan(){_().scanCode({success:function success(e){m((function(o){return(0,i.Z)((0,i.Z)({},o),{},{order_no:e.result})}))},fail:function fail(e){console.log(e)}})}()},defaultValue:n.order_no,showScan:!0,placeholder:"搜索商品/名称/颜色/订单号",showBtn:!1,changeOnSearch:W,children:(0,g.jsxs)(c.G7,{className:j.flexBox,onClick:function onClick(){return function showSelctPopup(){I(!0)}()},children:[(0,g.jsx)(de.Z,{name:"icon-shaixuan",size:35,color:ye?"":"#0D7CFF",customClassName:j.activeshaixuan}),(0,g.jsx)(c.G7,{className:f()(ye?j.shaixuan:j.activeshai),children:"筛选"})]})})}),(0,g.jsx)(c.G7,{style:{background:"#FFFFFF"},children:(0,g.jsx)(Z,{list:H,onSelect:V,defaultId:-1})}),(0,g.jsx)(c.G7,{className:j.order_list,children:(0,g.jsx)(ce.Z,{statusMore:M,selfonScrollToLower:E,refresherEnabled:!0,refresherTriggered:D,selfOnRefresherRefresh:O,children:null==w||null===(e=w.list)||void 0===e?void 0:e.map((function(e,o){return(0,g.jsx)(c.G7,{className:j.order_item_con,children:(0,g.jsx)(oe,{obj:e,cancle:function cancle(e,o){return Ge(e,o)},nextBuy:function nextBuy(e,o){return Ce(e,o)},toPay:function toPay(e,o){return co(e,o)}},o)},e.id)}))})}),(0,g.jsx)(re.Z,{title:"筛选订单",show:T,onClose:function onClose(){return function closePopup(){I(!1)}()},children:(0,g.jsxs)(c.G7,{className:j.popupBox,children:[(0,g.jsxs)(c.G7,{className:j.topBox,children:[(0,g.jsxs)(c.G7,{className:j.leftTop,onClick:function onClick(){return X(1)},children:[(0,g.jsx)(c.G7,{className:j.lefttopTitle,children:"客户信息"}),(0,g.jsxs)(c.G7,{className:f()(""===k.clientName?j.lefttopSelectBox:j.activelefttopSelectBox),children:[(0,g.jsx)(c.G7,{className:f()(""===k.clientName?j.lefttopSelectNameactive:j.lefttopSelectName),children:""===k.clientName?"请选择客户":k.clientName}),(0,g.jsx)(c.G7,{className:f()("iconfont","icon-more",j.icon_more)})]})]}),(0,g.jsxs)(c.G7,{className:j.leftTop,onClick:function onClick(){return X(2)},children:[(0,g.jsx)(c.G7,{className:j.lefttopTitle,children:"业务员"}),(0,g.jsxs)(c.G7,{className:f()(""===k.saleuserName?j.lefttopSelectBox:j.activelefttopSelectBox),children:[(0,g.jsx)(c.G7,{className:f()(""===k.saleuserName?j.lefttopSelectNameactive:j.lefttopSelectName),children:""===k.saleuserName?"请选择客户":k.saleuserName}),(0,g.jsx)(c.G7,{className:f()("iconfont","icon-more",j.icon_more)})]})]})]}),(0,g.jsxs)(c.G7,{className:j.thirdBox,children:[(0,g.jsx)(c.G7,{className:j.thirdTopfont,children:"订单类型"}),(0,g.jsx)(c.G7,{className:j.flexModebox,children:ve.map((function(e,o){return(0,g.jsx)(c.G7,{onClick:function onClick(){!function handCheckMode(e){ve.map((function(o){return o.id===e.id?o.checked=!0:o.checked=!1,o})),ge((0,l.Z)(ve)),G((function(o){return(0,i.Z)((0,i.Z)({},o),{},{sale_mode:e.id})}))}(e)},className:f()(e.checked?j.activemodeBox:j.modeBox),children:e.name},o)}))})]}),(0,g.jsxs)(c.G7,{className:j.thirdBox,children:[(0,g.jsx)(c.G7,{className:j.thirdTopfont,children:"发货方式"}),(0,g.jsx)(c.G7,{className:j.flexModebox,children:je.map((function(e,o){return(0,g.jsx)(c.G7,{onClick:function onClick(){!function handCheckDelivery(e){je.map((function(o){return o.id===e.id?o.checked=!0:o.checked=!1,o})),we((0,l.Z)(je)),G((function(o){return(0,i.Z)((0,i.Z)({},o),{},{shipment_mode:e.id})}))}(e)},className:f()(e.checked?j.activemodeBox:j.modeBox),children:e.name},o)}))})]}),(0,g.jsxs)(c.G7,{className:j.bottomBox,children:[(0,g.jsx)(xe.Z,{customClassName:j.resetBox,onClick:function handReset(){P.current.page=1,G({purchaser_id:"",clientName:"",sale_user_id:"",saleuserName:"",sale_mode:void 0,shipment_mode:void 0}),q.data.clientId=null,q.data.clientName=null,q.data.saleuserId=null,q.data.saleuserName=null;var e=Se(ve);ge((0,l.Z)(e));var o=Se(je);we((0,l.Z)(o))},children:"重置"}),(0,g.jsx)(xe.Z,{type:"primary",customClassName:f()(j.button),onClick:be,children:"确认"})]})]})}),(0,g.jsx)(ne.Z,{list:Oe,obj:ze,showPopup:$e,popupClose:function popupClose(){return Qe(!1)},clickItem:function clickItem(e){return function clickItem(e){"扫码支付"===e.name&&ro(),"线下汇款"===e.name&&Ve(!0),Oe.map((function(o){return e.id===o.id?o.checked=!0:o.checked=!1,o})),Me((0,l.Z)(Oe))}(e)},handsurePay:function handsurePay(e){return function handsurePay(e){var o;if(!(o=Oe.filter((function(e){return e.checked}))).length)return _().showToast({title:"请选择后再提交",icon:"error"}),!1;_().showModal({content:"确定交易吗?",confirmText:"确认",cancelText:"取消",success:function success(t){return(0,s.Z)((0,a.Z)().mark((function _callee10(){var n,l,i;return(0,a.Z)().wrap((function _callee10$(a){for(;;)switch(a.prev=a.next){case 0:if(!t.confirm){a.next=6;break}return _().showLoading({title:"请稍等...",mask:!0}),a.next=4,10!==e.status?xo({id:Number(e.should_collect_order_id),payment_method:Number(null===(n=o[0])||void 0===n?void 0:n.id)}):po({id:Number(e.pre_collect_order_id),payment_method:Number(null===(l=o[0])||void 0===l?void 0:l.id)});case 4:"success"===(null==(i=a.sent)?void 0:i.msg)?(_().showToast({title:"交易成功"}),_().hideLoading(),Qe(!1),F()):_().showToast({title:null==i?void 0:i.msg,icon:"error"});case 6:case"end":return a.stop()}}),_callee10)})))()}})}(e)},showSide:Ye,title:oo,picUrl:ao}),(0,g.jsx)(te.Z,{show:Ue,onClose:function onClose(){return Ve(!1)},offlineInfo:ze})]})};Page((0,n.createPageConfig)(he,"pages/order/index",{root:{cn:[]}},{navigationBarTitleText:"订单",navigationStyle:"custom"}||{}))}},function(e){e.O(0,[2107,1216,8592],(function(){return o=8455,e(e.s=o);var o}));e.O()}]); |