1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[7073],{760:function(e,n,t){var o=t(2180),a=t(3433),i=t(4165),l=t(5861),_=t(1413),c=t(9439),s=t(1515),r=t(2954),d=t.n(r),u=t(7294),m=t(4184),x=t.n(m),f=t(7484),h=t.n(f),p={common_safe_area_y:"index-module__common_safe_area_y___Ervb7","flex-col":"index-module__flex-col___F6t6z","flex-row":"index-module__flex-row____YW8K","justify-between":"index-module__justify-between___HIhpI","justify-center":"index-module__justify-center___zwEQc","items-center":"index-module__items-center___J8krx","flex-item":"index-module__flex-item___tvTRd","full-100":"index-module__full-100___P53Wg","color-blue":"index-module__color-blue___GRFQ9","color-yellow":"index-module__color-yellow___keRkH","color-green":"index-module__color-green___UGS1L","color-grey":"index-module__color-grey___XGGLZ","color-white":"index-module__color-white___QDcNL","s-w":"index-module__s-w___DdAi9","s-e":"index-module__s-e___O4R7P",filter:"index-module__filter___LRFaK",flexBox:"index-module__flexBox___g2Er8",icon_shaixuan:"index-module__icon_shaixuan___jTkb0",activeshaixuan:"index-module__activeshaixuan___GluJg",shaixuan:"index-module__shaixuan___RsP5j",activeshai:"index-module__activeshai___VzW5J",order_list:"index-module__order_list___nyMTs",bigBpx:"index-module__bigBpx___nCEW7",kongboxTwo:"index-module__kongboxTwo___x1UyT",fixedBox:"index-module__fixedBox___jF27Q",addBtn:"index-module__addBtn___b8AGD",pageTop:"index-module__pageTop___eSvBk",pageTopLeft:"index-module__pageTopLeft___kP3mT",pageTopRight:"index-module__pageTopRight___vvETD",popupBox:"index-module__popupBox___dGo78",timeFlex:"index-module__timeFlex___S7JbX",timeOne:"index-module__timeOne___mEzRr",activetimeOne:"index-module__activetimeOne___iKAHP",timeBox2:"index-module__timeBox2___sgVY9",more:"index-module__more___lqgVG",activetimeBox2:"index-module__activetimeBox2___wZ2dV",safeBox:"index-module__safeBox___b3195",bottomBox:"index-module__bottomBox___wuchx",resetBox:"index-module__resetBox___K7n_R",button:"index-module__button___gmE07",activeButton:"index-module__activeButton___cKeSi"},g="index-module__itemBox___ggXoj",v="index-module__itemTop___IGjiJ",j="index-module__itemTopLeft___D5ymv",b="index-module__itemTopRight___pRSSe",D="index-module__flexBox___ysG2e",Z="index-module__flexLeft1___ojjV4",G="index-module__flexRight1___rZKpV",k="index-module__flexLeft___Sb1am",w="index-module__flexRight___okaGM",B=t(4812),N=t(5893),y=function ItemList(e){var n=(0,u.useMemo)((function(){return"待审核"==e.obj.auditor_status_name?"#E42945":"已审核"==e.obj.auditor_status_name?"#337FFF":"已拒绝"==e.obj.auditor_status_name?"#000000":void 0}),[e.obj]);return(0,N.jsxs)(s.G7,{className:g,onClick:function navTo(n){null==n||n.stopPropagation(),d().navigateTo({url:"/pages/collectionDetail/index?id=".concat(e.obj.id)})},children:[(0,N.jsxs)(s.G7,{className:v,children:[(0,N.jsx)(s.G7,{className:j,children:e.obj.purchaser_name}),(0,N.jsx)(s.G7,{className:b,style:{color:n},children:e.obj.auditor_status_name})]}),(0,N.jsxs)(s.G7,{className:D,children:[(0,N.jsx)(s.G7,{className:Z,children:"转账金额:"}),(0,N.jsxs)(s.G7,{className:G,children:["¥",(0,B.yb)(e.obj.receipt_amount,100,!0)]})]}),(0,N.jsxs)(s.G7,{className:D,children:[(0,N.jsx)(s.G7,{className:k,children:"待认款金额:"}),(0,N.jsxs)(s.G7,{className:w,children:["¥",(0,B.yb)(e.obj.pending_distribute_amount,100,!0)]})]}),(0,N.jsxs)(s.G7,{className:D,children:[(0,N.jsx)(s.G7,{className:k,children:"收款时间:"}),(0,N.jsx)(s.G7,{className:w,children:(0,B.o0)(e.obj.create_time)})]})]})},Y=(0,u.memo)(y),S=t(4489),T=t(7227),C=t(5989),z=t(9335),L=t(2606),M=t(4558),R=t(6028),F=t(9742),O=function NewCollection(){var e,n,t=new Date,o=(0,u.useState)({page:1,size:10,search_name:"",start_time:"".concat(h()(new Date("".concat(null==t?void 0:t.toLocaleDateString()," ")+"00:00:00")).subtract(14,"day").format("YYYY-MM-DD")," 00:00:00"),end_time:"".concat(h()(new Date("".concat(null==t?void 0:t.toLocaleDateString()," ")+"00:00:00")).add(1,"day").format("YYYY-MM-DD")," 00:00:00")}),m=(0,c.Z)(o,2),f=m[0],g=m[1],v=(0,u.useRef)({size:f.size,page:f.page}),j=(0,L.i_)(),b=j.fetchData,D=j.state,Z=(0,u.useState)({list:[],total:0,summary:{}}),G=(0,c.Z)(Z,2),k=G[0],w=G[1],y=(0,u.useCallback)((function(e){v.current.page=1,w((function(){return{list:[],total:0}})),g((function(n){return(0,_.Z)((0,_.Z)({},n),{},{search_name:e,size:10})}))}),[]),O=(0,u.useState)(!1),E=(0,c.Z)(O,2),P=E[0],J=E[1],K=function(){var e=(0,l.Z)((0,i.Z)().mark((function _callee(){var e;return(0,i.Z)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,b((0,_.Z)({},f));case 2:e=n.sent,w((function(n){var t,o,a;return(0,_.Z)((0,_.Z)({},n),{},{list:null===(t=e.data)||void 0===t?void 0:t.list,total:null===(o=e.data)||void 0===o?void 0:o.total,summary:null===(a=e.data)||void 0===a?void 0:a.summary})})),J(!1);case 5:case"end":return n.stop()}}),_callee)})));return function getOrderList(){return e.apply(this,arguments)}}(),V=function(){var e=(0,l.Z)((0,i.Z)().mark((function _callee2(){return(0,i.Z)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:v.current.page=1,J(!0),K(),g((function(e){return(0,_.Z)((0,_.Z)({},e),{},{size:10})}));case 4:case"end":return e.stop()}}),_callee2)})));return function getRefresherRefresh(){return e.apply(this,arguments)}}(),A=(0,u.useMemo)((function(){return(0,T.rA)({list:k.list,total:k.total,status:D.loading})}),[k,D]),I=(0,u.useCallback)((function(){if(k.list.length<k.total){v.current.page++;var e=v.current.size*v.current.page;console.log(v.current.page,"pageNum.current.page"),console.log(e,123123),g((0,_.Z)((0,_.Z)({},f),{},{size:e}))}}),[k]),Q=(0,u.useMemo)((function(){return!1}),[]),W=(0,u.useState)(!1),H=(0,c.Z)(W,2),X=H[0],q=H[1],U=(0,u.useState)([{id:1,name:"默认14天内",start_time:"".concat(h()(new Date("".concat(null==t?void 0:t.toLocaleDateString()," ")+"00:00:00")).subtract(14,"day").format("YYYY-MM-DD")," 00:00:00"),end_time:"".concat(h()(new Date("".concat(null==t?void 0:t.toLocaleDateString()," ")+"00:00:00")).add(1,"day").format("YYYY-MM-DD")," 00:00:00"),checked:!0},{id:2,name:"展示全部日期",start_time:"",end_time:"",checked:!1}]),$=(0,c.Z)(U,2),ee=$[0],ne=$[1],te=(0,u.useState)(!1),oe=(0,c.Z)(te,2),ae=oe[0],ie=oe[1],le=(0,u.useState)(t.toLocaleDateString()),_e=(0,c.Z)(le,2),ce=_e[0],se=_e[1],re=(0,u.useState)(""),de=(0,c.Z)(re,2),ue=de[0],me=de[1];(0,r.useDidShow)((function(){K()})),(0,u.useEffect)((function(){K()}),[f.size,f.search_name]);var xe=(0,u.useMemo)((function(){return""!==ue?"".concat(ce," ")+"-"+" ".concat(ue):"自定义起始时间"}),[ue]);(0,u.useEffect)((function(){g(f)}),[f]);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(s.G7,{style:{background:"#FFFFFF",paddingLeft:"20rpx",paddingBottom:"20rpx",position:"sticky",top:"0",zIndex:"99"},children:(0,N.jsx)(S.Z,{placeholder:"请输入客户或客户跟进人",showBtn:!1,changeOnSearch:y,children:(0,N.jsxs)(s.G7,{className:p.flexBox,onClick:function onClick(){q(!0)},children:[(0,N.jsx)(R.Z,{name:"icon-shaixuan",size:35,color:Q?"":"#0D7CFF",customClassName:p.activeshaixuan}),(0,N.jsx)(s.G7,{className:x()(Q?p.shaixuan:p.activeshai),children:"筛选"})]})})}),(0,N.jsxs)(s.G7,{className:p.pageTop,children:[(0,N.jsx)(s.G7,{className:p.pageTopLeft,children:"时间默认14天内"}),(0,N.jsxs)(s.G7,{className:p.pageTopRight,children:["金额汇总:",(0,B.yb)(null==k||null===(e=k.summary)||void 0===e?void 0:e.receipt_amount)]})]}),(0,N.jsxs)(s.G7,{className:p.order_list,children:[(0,N.jsx)(z.Z,{statusMore:A,selfonScrollToLower:I,refresherEnabled:!0,refresherTriggered:P,selfOnRefresherRefresh:V,children:null==k||null===(n=k.list)||void 0===n?void 0:n.map((function(e,n){return(0,N.jsx)(s.G7,{className:p.order_item_con,children:(0,N.jsx)(Y,{obj:e},n)},e.id)}))}),(0,N.jsx)(s.G7,{className:p.kongboxTwo}),(0,N.jsx)(s.G7,{className:p.fixedBox,children:(0,N.jsx)(F.Z,{customClassName:p.addBtn,type:"primary",onClick:function handAdd(){d().navigateTo({url:"/pages/addCollection/index"})},children:"新建收款"})})]}),(0,N.jsx)(C.Z,{title:"选择日期",show:X,onClose:function onClose(){q(!1)},children:(0,N.jsxs)(s.G7,{className:p.popupBox,children:[(0,N.jsx)(s.G7,{className:p.timeFlex,children:ee.map((function(e,n){return(0,N.jsx)(s.G7,{onClick:function onClick(){return function handSelect(e){ee.map((function(n){return n.id==e.id?n.checked=!0:n.checked=!1,n})),ne((0,a.Z)(ee)),v.current.size=10,g((0,_.Z)((0,_.Z)({},f),{},{start_time:e.start_time,end_time:e.end_time,size:10})),me("")}(e)},className:x()(e.checked&&"自定义起始时间"==xe?p.activetimeOne:p.timeOne),children:e.name},n)}))}),(0,N.jsxs)(s.G7,{className:x()("自定义起始时间"==xe?p.timeBox2:p.activetimeBox2),onClick:function onClick(){ie(!0)},children:[xe,(0,N.jsx)(s.G7,{className:p.more,children:"自定义起始时间"==xe&&(0,N.jsx)(R.Z,{name:"icon-chakanquanbukehu",color:"#000000",size:40,customClassName:p.more})})]}),(0,N.jsx)(s.G7,{className:p.safeBox}),(0,N.jsxs)(s.G7,{className:p.bottomBox,children:[(0,N.jsx)(s.zx,{className:p.resetBox,onClick:function onClick(){!function handReset(){ee.map((function(e){return 1==e.id?e.checked=!0:e.checked=!1,e})),ne((0,a.Z)(ee)),v.current.size=10,g((0,_.Z)((0,_.Z)({},f),{},{start_time:"".concat(h()(new Date("".concat(null==t?void 0:t.toLocaleDateString()," ")+"00:00:00")).subtract(14,"day").format("YYYY-MM-DD")," 00:00:00"),end_time:"".concat(h()(new Date("".concat(null==t?void 0:t.toLocaleDateString()," ")+"00:00:00")).add(1,"day").format("YYYY-MM-DD")," 00:00:00"),size:10})),se(t.toLocaleDateString()),me("")}()},children:" 重置"}),(0,N.jsx)(s.zx,{className:x()(Q?p.button:p.activeButton),disabled:Q,onClick:function onClick(){return function handSureSelect(){v.current.size=10,g((0,_.Z)((0,_.Z)({},f),{},{size:10})),K(),q(!1)}()},children:" 确认"})]})]})}),(0,N.jsx)(M.Z,{start:ce,end:ue,showTime:ae,closePopup:function handClose(){ie(!1)},onSelectDate:function onSelectDate(e){return function handTime(e){var n,o;if(0===Object.keys(e).length){var a={start:"",end:""};a.start="".concat(h()(new Date("".concat(null==t?void 0:t.toLocaleDateString()," ")+"00:00:00")).format("YYYY-MM-DD")," 00:00:00"),a.end="".concat(h()(new Date(null==a?void 0:a.start)).add(1,"day").format("YYYY-MM-DD")," 00:00:00"),e.value=a}g((function(n){var t,o;return(0,_.Z)((0,_.Z)({},n),{},{start_time:null==e||null===(t=e.value)||void 0===t?void 0:t.start,end_time:null==e||null===(o=e.value)||void 0===o?void 0:o.end})})),se(null==e||null===(n=e.value)||void 0===n?void 0:n.start),me(null==e||null===(o=e.value)||void 0===o?void 0:o.end),ie(!1),v.current.size=10}(e)}})]})};Page((0,o.createPageConfig)(O,"pages/newCollection/index",{root:{cn:[]}},{navigationBarTitleText:"收款列表"}||{}))}},function(e){e.O(0,[2107,1216,8592],(function(){return n=760,e(e.s=n);var n}));e.O()}]); |