✨ feat(购物界面): 完成购物界面50%

This commit is contained in:
xuan
2022-09-15 19:59:19 +08:00
parent 8472f4c14b
commit fee33aec38
124 changed files with 1939 additions and 28 deletions
+1
View File
@@ -0,0 +1 @@
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([[778],{1236:function(e,n,t){var a=t(9975),s=t(4165),r=t(5861),l=t(1413),i=t(885),u=t(1515),c=t(9792),o="index-module__cussBox___nfG8K",d="index-module__searchBox___dDI_q",_="index-module__two___Fi3_d",f="index-module__listBox____J_PG",m="index-module__itemBox___rxNQO",h="index-module__cussName___LA0fc",x="index-module__phone___MiI8M",p="index-module__woker___jicxx",g="index-module__acticveitemBox___Y3ckT",v=t(6408),Z=t.n(v),k=t(5032),N=t(1251),w=t(2535),j=t.n(w),z=t(4909),G=t(7227),C=t(5513);Page((0,a.createPageConfig)((function(){var e=(0,c.useState)({name:null,page:1,size:10}),n=(0,i.Z)(e,2),t=n[0],a=n[1],v=(0,c.useState)({list:[],total:0}),B=(0,i.Z)(v,2),I=B[0],b=B[1],P=(0,N.Fm)(),R=P.fetchData,S=P.state,T=(0,c.useMemo)((function(){return(0,G.rA)({list:I.list,total:I.total,status:S.loading})}),[I,S]),O=(0,c.useState)({saleuserId:null,saleuserName:""}),D=(0,i.Z)(O,2),M=D[0],E=D[1],J=(0,c.useCallback)((function(e){A.current.page=1,b((function(){return{list:[],total:0}})),a((function(n){return(0,l.Z)((0,l.Z)({},n),{},{name:e,size:10})}))}),[]),y=(0,w.useRouter)();(0,c.useEffect)((function(){""===t.name&&a((function(e){return(0,l.Z)((0,l.Z)({},e),{},{name:null})})),""!==t.name&&Y()}),[t]);var A=(0,c.useRef)({size:t.size,page:t.page}),F=(0,c.useCallback)((function(){if(I.list.length<I.total){A.current.page++;var e=A.current.size*A.current.page;a((function(n){return(0,l.Z)((0,l.Z)({},n),{},{size:e})}))}}),[I]),L=(0,c.useState)(!1),$=(0,i.Z)(L,2),q=$[0],K=$[1],Q=function(){var e=(0,r.Z)((0,s.Z)().mark((function _callee(){return(0,s.Z)().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:A.current.size=1,K(!0),a((function(e){return(0,l.Z)((0,l.Z)({},e),{},{size:10})}));case 3:case"end":return e.stop()}}),_callee)})));return function getRefresherRefresh(){return e.apply(this,arguments)}}(),Y=function(){var e=(0,r.Z)((0,s.Z)().mark((function _callee2(){var e;return(0,s.Z)().wrap((function _callee2$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,R({name:null===t.name?"":t.name,page:t.page,size:t.size});case 2:e=n.sent,null!=y&&y.params.clientId&&e.data.list.map((function(e){return e.id==(null==y?void 0:y.params.clientId)?e.checked=!0:e.checked=!1,e})),b((function(n){var t,a;return(0,l.Z)((0,l.Z)({},n),{},{list:null===(t=e.data)||void 0===t?void 0:t.list,total:null===(a=e.data)||void 0===a?void 0:a.total})})),K((function(){return!1}));case 6:case"end":return n.stop()}}),_callee2)})));return function getCuss(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){if(null!==(null==M?void 0:M.saleuserId))E(M);else{var e=j().getCurrentPages();e[e.length-2].setData({saleuserId:"",saleuserName:""})}}),[M]),(0,C.jsxs)(u.G7,{className:o,children:[(0,C.jsx)(u.G7,{className:d,children:(0,C.jsx)(u.G7,{className:_,children:(0,C.jsx)(k.Z,{placeholder:"请输入业务员名称",showBtn:!1,changeOnSearch:J,debounceTime:300})})}),(0,C.jsx)(u.G7,{className:f,children:(0,C.jsx)(z.Z,{statusMore:T,selfonScrollToLower:F,refresherEnabled:!0,refresherTriggered:q,selfOnRefresherRefresh:Q,children:I.list.map((function(e,n){return(0,C.jsxs)(u.G7,{className:Z()(e.checked?g:m),onClick:function onClick(){!function selectClient(e){I.list.map((function(n){return e.id===n.id?n.checked=!0:n.checked=!1,n}));var n=j().getCurrentPages();n[n.length-2].setData({saleuserId:e.id,saleuserName:e.name}),b((function(e){return(0,l.Z)((0,l.Z)({},e),{},{list:null==I?void 0:I.list,total:null==I?void 0:I.total})})),E(e),j().navigateBack({delta:1})}(e)},children:[(0,C.jsx)(u.G7,{className:h,children:e.name}),(0,C.jsx)(u.G7,{className:x,children:e.phone}),(0,C.jsx)(u.G7,{className:p,children:e.sale_user_name})]},n)}))})})]})}),"pages/saleuserPage/index",{root:{cn:[]}},{navigationBarTitleText:"选择业务员"}||{}))}},function(e){e.O(0,[107,216,592],(function(){return n=1236,e(e.s=n);var n}));e.O()}]);
+1
View File
@@ -0,0 +1 @@
{"navigationBarTitleText":"选择业务员","usingComponents":{"custom-wrapper":"../../custom-wrapper","comp":"../../comp"}}
+2
View File
@@ -0,0 +1,2 @@
<import src="../../base.wxml"/>
<template is="taro_tmpl" data="{{root:root}}" />
+1
View File
@@ -0,0 +1 @@
.index-module__common_safe_area_y___R_xNk{height:constant(safe-area-inset-bottom);height:env(safe-area-inset-bottom);width:100%}.index-module__full-100___OG_8B{height:100%;width:100%}.index-module__color-blue___nDp4N{color:#3287ec}.index-module__color-yellow___QU4ne{color:#ff9100}.index-module__color-green____UVnY{color:#00b837}.index-module__color-grey___JM7c6{color:#707070}.index-module__color-white___VYJI7{color:#fff}page{background:#f7f7f7}.index-module__cussBox___nfG8K .index-module__searchBox___dDI_q{-ms-flex-align:center;-webkit-align-items:center;align-items:center;background:#fff;display:-webkit-flex;display:-ms-flexbox;display:flex;height:96rpx;position:-webkit-sticky;position:sticky;top:0;width:750rpx}.index-module__cussBox___nfG8K .index-module__searchBox___dDI_q .index-module__two___Fi3_d{height:72rpx;margin-left:24rpx;width:702rpx}.index-module__cussBox___nfG8K .index-module__listBox____J_PG{height:calc(100vh - 96rpx)}.index-module__cussBox___nfG8K .index-module__itemBox___rxNQO{-ms-flex-align:center;-webkit-align-items:center;align-items:center;background:#fff;border-radius:16rpx;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:104rpx;margin-left:24rpx;margin-top:24rpx;width:702rpx}.index-module__cussBox___nfG8K .index-module__itemBox___rxNQO .index-module__cussName___LA0fc{color:#000;font-family:PingFangSC-Medium,PingFang SC;font-size:28rpx;font-weight:500;height:34rpx;margin-left:48rpx;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;width:168rpx}.index-module__cussBox___nfG8K .index-module__itemBox___rxNQO .index-module__phone___MiI8M{color:#000;font-family:PingFangSC-Regular,PingFang SC;font-size:28rpx;font-weight:400;margin-left:88rpx}.index-module__cussBox___nfG8K .index-module__itemBox___rxNQO .index-module__woker___jicxx{color:#000;font-family:PingFangSC-Regular,PingFang SC;font-size:28rpx;font-weight:400;margin-left:88rpx}.index-module__cussBox___nfG8K .index-module__acticveitemBox___Y3ckT{-ms-flex-align:center;-webkit-align-items:center;align-items:center;background:#fff;border:1px solid #337fff;border-radius:16rpx;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:104rpx;margin-left:24rpx;margin-top:24rpx;width:702rpx}.index-module__cussBox___nfG8K .index-module__acticveitemBox___Y3ckT .index-module__cussName___LA0fc{color:#000;font-family:PingFangSC-Medium,PingFang SC;font-size:28rpx;font-weight:500;height:34rpx;margin-left:48rpx;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;width:168rpx}.index-module__cussBox___nfG8K .index-module__acticveitemBox___Y3ckT .index-module__phone___MiI8M{color:#000;font-family:PingFangSC-Regular,PingFang SC;font-size:28rpx;font-weight:400;margin-left:88rpx}.index-module__cussBox___nfG8K .index-module__acticveitemBox___Y3ckT .index-module__woker___jicxx{color:#000;font-family:PingFangSC-Regular,PingFang SC;font-size:28rpx;font-weight:400;margin-left:88rpx}