2023-05-15 16:21:46 +08:00

1 line
8.9 KiB
JavaScript

"use strict";require("./sub-vendors.js");require("./sub-common/445510f5d4845e2c86487fd7619fee61.js");require("./sub-common/0b1e8524d9aebaec86aca4f62ff693f4.js");(wx.webpackJsonp=wx.webpackJsonp||[]).push([[1930],{1090:function(e,n,t){var l=t(2180),_=t(1413),s=t(9439),r=t(4165),o=t(5861),a=t(1515),i=t(2954),c=t.n(i),u=t(7294),d="index-module__main___M3bT3",m="index-module__search___DC5HP",x="index-module__color_card_list___OGV8W",p="index-module__order_item___hX2OR",f="index-module__bottomBar___APR0X",h="index-module__bottomBar__button___Mni2t",g="index-module__topItem___Khmyp",v="index-module__orderNo___TeFVa",j="index-module__status____SZvr",Z="index-module__flexBox___YoQRy",b="index-module__pussName___bIhsR",G="index-module__tag___Fbc6t",N="index-module__contBox___Wk1gH",C="index-module__leftCont___yNVO2",w="index-module__rightCont___EGkAu",y="index-module__rightTop___no2cF",k="index-module__productName___LNfzt",S="index-module__shipMode___mKw3z",z="index-module__colorsBox___k0kHM",R="index-module__colorName___LCFXW",D="index-module__colorCount___hz3io",B="index-module__bottomMsg___FBnJS",O="index-module__msgLeft___yUck6",P="index-module__msgRight___dhPao",F="index-module__paymentMethod___RQ1Du",L="index-module__msgRightOne___CA0Fi",M="index-module__bottomBox___zHS1E",T=t(4812),W=t(3407),A=t(9742),E=t(2128),I=t(9579),V=t(8260),H=t(1115),Q=t(5893),$=function ItemList(e){var n,t,l,_,s=e.data,r=e.cancel,o=(0,u.useCallback)((function(e){return{lab:null==e?void 0:e.lab,rgb:null==e?void 0:e.rgb,texture_url:null==e?void 0:e.texture_url}}),[]);return(0,Q.jsxs)(V.Z,{onClick:function navTo(){(0,H.jD)("/pages/sampleCutting/sampleCuttingDetail/index",{id:s.order_id})},circle:!0,children:[(0,Q.jsxs)(a.G7,{className:g,children:[(0,Q.jsxs)(a.G7,{className:v,children:["单号:",s.order_no]}),(0,Q.jsx)(a.G7,{className:j,children:s.mp_cut_sample_audit_status_name})]}),(0,Q.jsxs)(a.G7,{className:Z,children:[(0,Q.jsx)(a.G7,{className:b,children:s.purchaser_name}),s.sale_user_name&&(0,Q.jsx)(I.Z,{type:"primary",size:"normal",circle:!0,customClassName:G,plain:!0,children:s.sale_user_name})]}),(0,Q.jsx)(E.Z,{direction:"horizontal",customStyles:{margin:"12px 0"}}),(0,Q.jsxs)(a.G7,{className:N,children:[(0,Q.jsx)(a.G7,{style:{minWidth:"24%"},children:(0,Q.jsx)(a.G7,{className:C,children:(0,Q.jsx)(W.Z,{value:o(null===(n=s.cut_sample_order_product_list)||void 0===n?void 0:n[0])})})}),(0,Q.jsxs)(a.G7,{className:w,children:[(0,Q.jsxs)(a.G7,{className:y,children:[(0,Q.jsx)(a.G7,{className:k,children:null===(t=s.cut_sample_order_product_list)||void 0===t?void 0:t[0].name}),(0,Q.jsx)(a.G7,{className:S,children:s.shipment_mode_name})]}),null===(l=s.cut_sample_order_product_list)||void 0===l||null===(_=l[0].product_colors)||void 0===_?void 0:_.map((function(e,n){return n<2?(0,Q.jsxs)(a.G7,{className:z,children:[(0,Q.jsx)(a.G7,{className:R,children:(0,T.W7)(e.code,e.name)}),(0,Q.jsxs)(a.G7,{className:D,children:["x",e.color_num||0,"份"]})]},n):null}))]})]}),(0,Q.jsx)(E.Z,{direction:"horizontal",customStyles:{margin:"12px 0"}}),(0,Q.jsxs)(a.G7,{className:B,children:[(0,Q.jsx)(a.G7,{className:O,children:"剪样信息:"}),(0,Q.jsxs)(a.G7,{className:P,children:[(null==s?void 0:s.total_fabrics)||0," 种面料,",(null==s?void 0:s.total_colors)||0," 种剪样,共 ",(null==s?void 0:s.total_number)||0," 份"]})]}),(0,Q.jsx)(a.G7,{className:F,children:(0,Q.jsx)(a.G7,{className:L,children:"快递到付"})}),(0,Q.jsx)(a.G7,{className:M,children:1===s.mp_cut_sample_audit_status&&(0,Q.jsx)(A.Z,{customStyles:{fontSize:"14px"},type:"info",size:"normal",round:!0,plain:!0,onClick:r,children:"取消订单"})})]})},J=(0,u.memo)($),K=t(4489),X=t(9335),U=t(7227),Y=t(8939),q=t(2495),ee=t(146),ne=t(3433),te=t(5025),le={common_safe_area_y:"index-module__common_safe_area_y___ev0OK","flex-col":"index-module__flex-col___bEzPD","flex-row":"index-module__flex-row___mpqug","justify-between":"index-module__justify-between___I8geF","justify-center":"index-module__justify-center___GL_uS","items-center":"index-module__items-center___dbG8r","flex-item":"index-module__flex-item___Hh5Wz","full-100":"index-module__full-100___WGecB","color-blue":"index-module__color-blue___W_QGD","color-yellow":"index-module__color-yellow___iOzIB","color-green":"index-module__color-green___YygLr","color-grey":"index-module__color-grey___ZbcdV","color-white":"index-module__color-white___vztxc","s-w":"index-module__s-w___oG9cS","s-e":"index-module__s-e___h539p",filter:"index-module__filter___OxwQL",grid:"index-module__grid___V3CkC",tab_bar:"index-module__tab_bar___VADdE"},_e=function SelectSampleCuttingStatus(e,n){var t=e.onChange,l=e.defaultValue,_=void 0===l?0:l;console.log(e);var i=(0,ee.sv)().fetchData,c=(0,u.useState)([]),d=(0,s.Z)(c,2),m=d[0],x=d[1],p=function(){var e=(0,o.Z)((0,r.Z)().mark((function _callee(){var e;return(0,r.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i();case 2:e=n.sent,x([{id:0,code:"",name:"全部记录"}].concat((0,ne.Z)(e.data.list)));case 4:case"end":return n.stop()}}),_callee)})));return function getData(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){p()}),[]);var f=(0,u.useState)(_),h=(0,s.Z)(f,2),g=h[0],v=h[1],j=(0,u.useRef)(null);return(0,u.useImperativeHandle)(n,(function(){return{show:j.current.show,showPopup:j.current.showPopup,closePopup:j.current.closePopup}}),[j.current]),(0,Q.jsx)(a.G7,{className:le.tab_bar,children:!!m.length&&m.map((function(e,n){return(0,Q.jsx)(te.Z,{round:!0,customClassName:le.button,size:"small",isActive:e.id===g,onClick:function onClick(){return function handleClick(e){v(e),null==t||t(e)}(e.id)},children:e.name},n)}))})},se=(0,u.memo)((0,u.forwardRef)(_e)),re=function GetSampleCutting(){var e,n=(0,ee.bR)(),t=n.fetchData,l=n.state,i=function(){var e=(0,o.Z)((0,r.Z)().mark((function _callee(){var e;return(0,r.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t((0,U.mB)(j));case 2:if((e=n.sent).success){n.next=5;break}return n.abrupt("return",H.Z9.error(e.msg));case 5:C({list:e.data.list,total:e.data.total}),S(!1);case 7:case"end":return n.stop()}}),_callee)})));return function getData(){return e.apply(this,arguments)}}(),g=(0,u.useState)({purchaser_and_sale_user:"",mp_cut_sample_audit_status:0,page:1,size:10}),v=(0,s.Z)(g,2),j=v[0],Z=v[1],b=(0,u.useState)({list:[],total:0}),G=(0,s.Z)(b,2),N=G[0],C=G[1],w=(0,u.useState)(!1),y=(0,s.Z)(w,2),k=y[0],S=y[1],z=(0,u.useMemo)((function(){return(0,U.rA)({list:null==N?void 0:N.list,total:N.total,status:l.loading})}),[N,l.loading]),R=(0,u.useRef)({size:j.size,page:j.page}),D=function(){var e=(0,o.Z)((0,r.Z)().mark((function _callee2(){return(0,r.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:R.current.page=1,S(!0),Z((function(e){return(0,_.Z)((0,_.Z)({},e),{},{size:10})}));case 3:case"end":return e.stop()}}),_callee2)})));return function getRefresherRefresh(){return e.apply(this,arguments)}}(),B=(0,u.useCallback)((function(){var e;if((null===(e=N.list)||void 0===e?void 0:e.length)<N.total){R.current.page++;var n=R.current.size*R.current.page;Z((0,_.Z)((0,_.Z)({},j),{},{size:n}))}}),[N]),O=(0,U.Ds)((function(e){Z((function(n){return(0,_.Z)((0,_.Z)({},n),{},{purchaser_and_sale_user:e})}))}),300);(0,u.useEffect)((function(){i()}),[j]);var P=(0,ee.Fp)().fetchData,F=function(){var e=(0,o.Z)((0,r.Z)().mark((function _callee3(e){return(0,r.Z)().wrap((function _callee3$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,P({id:e});case 2:n.sent.success&&i();case 4:case"end":return n.stop()}}),_callee3)})));return function cancelOrder(n){return e.apply(this,arguments)}}();return(0,Q.jsxs)(a.G7,{className:d,children:[(0,Q.jsx)(a.G7,{className:m,children:(0,Q.jsx)(K.Z,{placeholder:"请输入客户或业务员",showBtn:!1,changeOnSearch:O})}),(0,Q.jsx)(se,{onChange:function handleClickFilter(e){j.mp_cut_sample_audit_status!==e&&Z((function(n){return(0,_.Z)((0,_.Z)({},n),{},{mp_cut_sample_audit_status:e})}))}}),(0,Q.jsx)(a.G7,{className:x,children:(0,Q.jsx)(X.Z,{emptySlot:(0,Q.jsx)(Y.Z,{picUrl:q.z8,text:"还没有领取过剪样"}),statusMore:z,selfonScrollToLower:B,refresherEnabled:!0,refresherTriggered:k,selfOnRefresherRefresh:D,safeAreaInsetBottom:!1,children:null==N||null===(e=N.list)||void 0===e?void 0:e.map((function(e,n){return(0,Q.jsx)(a.G7,{className:p,children:(0,Q.jsx)(J,{data:e,cancel:function cancel(n){return function handleCancel(e,n){e.stopPropagation(),c().showModal({content:"确定取消该订单?",confirmColor:"#337fff",confirmText:"确认",success:function success(e){e.confirm&&(F(n),console.log("用户点击确定"))}})}(n,e.order_id)}},n)},e.order_id)}))})}),(0,Q.jsx)(a.G7,{className:f,children:(0,Q.jsx)(A.Z,{customClassName:h,type:"primary",round:!0,onClick:function getSampleCutting(){(0,H.jD)("/pages/sampleCutting/sampleCuttingList/index")},children:"领取剪样"})})]})};Page((0,l.createPageConfig)(re,"pages/sampleCutting/index",{root:{cn:[]}},{navigationBarTitleText:"领取剪样"}||{}))}},function(e){e.O(0,[7843,2726,8530,6696,2107,1216,8592],(function(){return n=1090,e(e.s=n);var n}));e.O()}]);