clientList.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <template>
  2. <view class="content">
  3. <view class="top-bg">
  4. <view class="top-title">我的下级人数</view>
  5. <view class="num">285</view>
  6. </view>
  7. <view class="search-cont">
  8. <view class="inner">
  9. <image class="icon-search" src="/static/images/search.png" mode=""></image>
  10. <input type="text" value="" placeholder="搜索名称或编号" confirm-type="搜索" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
  11. </view>
  12. <view class="btn-serach" @click="goSearch" >搜索</view>
  13. </view>
  14. <view class="top-title">下级列表</view>
  15. <!-- 订单列表 -->
  16. <mescroll-body ref="mescrollRef" :up="upOption">
  17. <view class="client-list">
  18. <view v-for="(item,index) in dataList" :key="index" class="item" @click="showDetail()">
  19. <view class="top-box">
  20. <image :src="item.img==null?'../static/images/health/my_heads.png':item.img" mode="aspectFill"></image>
  21. <view class="right">
  22. <view class="name">{{item.name}}</view>
  23. <view class="align-end">
  24. <view class="proxy">
  25. <view class="title">代理价格</view>
  26. <view class="price">¥{{item.proxyPrice.toFixed(2)}}</view>
  27. </view>
  28. <view class="sale">
  29. <view class="title">销售价格</view>
  30. <view class="price">¥{{item.salePrice.toFixed(2)}}</view>
  31. </view>
  32. </view>
  33. <view class="phone">手机号:{{item.phone}}</view>
  34. <view class="time">注册时间:{{item.createTime}}</view>
  35. </view>
  36. </view>
  37. <view class="btn-box">
  38. <view class="btn-proxy" @click.stop="showDetail(item)">
  39. 设置代理价格
  40. </view>
  41. <view class="btn-sale" @click.stop="showDetail(item)">
  42. 设置销售价格
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </mescroll-body>
  48. </view>
  49. </template>
  50. <script>
  51. import {getCompanyStoreOrderList} from '@/api/storeOrder'
  52. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  53. export default {
  54. mixins: [MescrollMixin],
  55. data() {
  56. return {
  57. searchKey:"",
  58. mescroll:null,
  59. // 上拉加载的配置
  60. upOption: {
  61. onScroll:true,
  62. use: true, // 是否启用上拉加载; 默认true
  63. page: {
  64. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  65. size: 10 // 每页数据的数量,默认10
  66. },
  67. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  68. empty: {
  69. icon:'/static/images/no_data.png',
  70. tip: '暂无数据'
  71. }
  72. },
  73. // 列表数据
  74. dataList: [
  75. {name:'西航宇',phone:'18056647845',proxyPrice:0.8,salePrice:0.6,createTime:'2025-06-10 14:20',img:'/static/images/health/my_heads.png'},
  76. {name:'蓝西',phone:'18056647845',proxyPrice:1.0,salePrice:0.8,createTime:'2025-07-10 14:20',img:'/static/images/health/female_profile.png'}
  77. ],
  78. };
  79. },
  80. onLoad(options) {
  81. var that=this;
  82. // uni.$on('refreshOrder', () => {
  83. // that.mescroll.resetUpScroll()
  84. // })
  85. this.companyId=options.companyId;
  86. this.companyUserId=options.companyUserId;
  87. },
  88. methods: {
  89. goSearch(e) {
  90. this.searchKey=e.detail.value;
  91. this.mescroll.resetUpScroll()
  92. },
  93. mescrollInit(mescroll) {
  94. this.mescroll = mescroll;
  95. },
  96. /*下拉刷新的回调 */
  97. downCallback(mescroll) {
  98. mescroll.resetUpScroll()
  99. },
  100. upCallback(page) {
  101. //联网加载数据
  102. var that = this;
  103. var data = {
  104. keyword:this.searchKey,
  105. companyId:this.companyId,
  106. companyUserId:this.companyUserId,
  107. page: page.num,
  108. pageSize: page.size
  109. };
  110. // getCompanyStoreOrderList(data).then(res => {
  111. // if(res.code==200){
  112. // //设置列表数据
  113. // if (page.num == 1) {
  114. // that.dataList = res.data.list;
  115. // } else {
  116. // that.dataList = that.dataList.concat(res.data.list);
  117. // }
  118. // that.mescroll.endBySize(res.data.list.length, res.data.total);
  119. // }else{
  120. // uni.showToast({
  121. // icon:'none',
  122. // title: "请求失败",
  123. // });
  124. // that.dataList = null;
  125. // that.mescroll.endErr();
  126. // }
  127. // });
  128. },
  129. showDetail(item) {
  130. uni.navigateTo({
  131. url: './clientDetail?id='
  132. })
  133. },
  134. // cancel(item){
  135. // var that=this;
  136. // uni.showModal({
  137. // title: '提示',
  138. // content: '确定取消订单吗',
  139. // success: function (res) {
  140. // if (res.confirm) {
  141. // var data = {
  142. // orderId:item.id
  143. // };
  144. // cancelOrder(data).then(res => {
  145. // if(res.code==200){
  146. // uni.showToast({
  147. // icon:'success',
  148. // title: "操作成功",
  149. // });
  150. // that.mescroll.resetUpScroll()
  151. // }else{
  152. // uni.showToast({
  153. // icon:'none',
  154. // title: res.msg,
  155. // });
  156. // }
  157. // });
  158. // }
  159. // else if (res.cancel) {
  160. // }
  161. // }
  162. // });
  163. // },
  164. // pay(item) {
  165. // uni.navigateTo({
  166. // url: '../shopping/paymentOrder?orderId='+item.id
  167. // })
  168. // },
  169. // 查看物流
  170. // showDelivery(item) {
  171. // uni.navigateTo({
  172. // url: './storeOrderDelivery?orderId='+item.id
  173. // })
  174. // }
  175. }
  176. }
  177. </script>
  178. <style lang="scss">
  179. .content{
  180. padding:20upx;
  181. }
  182. .top-bg{
  183. background: linear-gradient( 266deg, #FEA603 0%, #E83924 100%);
  184. border-radius: 16rpx 16rpx 16rpx 16rpx;
  185. padding: 30rpx;
  186. margin-bottom: 30rpx;
  187. .top-title{
  188. font-family: PingFang SC;
  189. font-weight: 500;
  190. font-size: 28rpx;
  191. color: #FFFFFF;
  192. text-align: left;
  193. }
  194. .num{
  195. font-family: Roboto;
  196. font-weight: 500;
  197. font-size: 64rpx;
  198. color: #FFFFFF;
  199. text-align: left;
  200. }
  201. }
  202. .search-cont{
  203. // padding: 16upx 30upx;
  204. // background-color: #FFFFFF;
  205. display: flex;
  206. align-items: center;
  207. justify-content:space-between;
  208. .inner{
  209. box-sizing: border-box;
  210. width: 80%;
  211. height: 64rpx;
  212. background: #fff;
  213. border-radius: 32upx;
  214. display: flex;
  215. align-items: center;
  216. padding: 0 30upx;
  217. .icon-search{
  218. width: 28upx;
  219. height: 28upx;
  220. margin-right: 20upx;
  221. }
  222. input{
  223. height: 60upx;
  224. line-height: 60upx;
  225. flex: 1;
  226. }
  227. }
  228. .btn-serach{
  229. width: 112rpx;
  230. height: 64rpx;
  231. line-height: 64rpx;
  232. text-align: center;
  233. font-weight: 600;
  234. font-size: 24rpx;
  235. color: #fff;
  236. background: #008FD3;
  237. border-radius: 34rpx 34rpx 34rpx 34rpx;
  238. }
  239. }
  240. .top-title{
  241. font-family: PingFang SC, PingFang SC;
  242. font-weight: 600;
  243. font-size: 36rpx;
  244. color: #222426;
  245. text-align: left;
  246. padding:22rpx ;
  247. }
  248. .client-list{
  249. .item{
  250. background: #fff;
  251. border-radius: 0rpx 0rpx 0rpx 0rpx;
  252. padding: 30rpx;
  253. margin-bottom: 20rpx;
  254. .top-box{
  255. padding-bottom: 30rpx;
  256. display: flex;
  257. align-items: flex-start;
  258. border-bottom: 1rpx solid #ECECEC;
  259. image{
  260. width: 112rpx;
  261. height: 112rpx;
  262. background: #EAEAEA;
  263. border-radius:50%;
  264. margin-right: 22rpx;
  265. }
  266. .right{
  267. display: flex;
  268. flex-direction: column;
  269. justify-content: space-between;
  270. .name{
  271. font-family: PingFang SC;
  272. font-weight: 500;
  273. font-size: 32rpx;
  274. color: #222426;
  275. text-align: left;
  276. margin-bottom: 10rpx;
  277. }
  278. .proxy{
  279. // width: 166rpx;
  280. // height: 36rpx;
  281. border-radius: 4rpx 4rpx 4rpx 4rpx;
  282. border: 1rpx solid #008FD3;
  283. display: flex;
  284. align-items: center;
  285. margin-right: 16rpx;
  286. .title{
  287. font-family: PingFang SC;
  288. font-weight: 400;
  289. font-size: 20rpx;
  290. color: #FFFFFF;
  291. background: #008FD3;
  292. padding: 8rpx;
  293. }
  294. .price{
  295. font-weight: 500;
  296. font-size: 20rpx;
  297. color: #008FD3;
  298. padding: 4rpx 12rpx;
  299. }
  300. }
  301. .sale{
  302. // width: 166rpx;
  303. // height: 36rpx;
  304. border-radius: 4rpx 4rpx 4rpx 4rpx;
  305. border: 1rpx solid #FF5030;
  306. display: flex;
  307. align-items: center;
  308. .title{
  309. font-family: PingFang SC;
  310. font-weight: 400;
  311. font-size: 20rpx;
  312. color: #FFFFFF;
  313. background: #FF5030;
  314. padding: 8rpx;
  315. }
  316. .price{
  317. font-weight: 500;
  318. font-size: 20rpx;
  319. color: #FF5030;
  320. padding: 4rpx 12rpx;
  321. }
  322. }
  323. .phone,.time{
  324. font-family: PingFang SC;
  325. font-weight: 400;
  326. font-size: 24rpx;
  327. color: #898E91;
  328. text-align: left;
  329. margin-top: 16rpx;
  330. }
  331. }
  332. }
  333. .btn-box{
  334. padding-top: 30rpx;
  335. display: flex;
  336. align-items: center;
  337. justify-content: flex-end;
  338. .btn-proxy{
  339. width: 224rpx;
  340. height: 60rpx;
  341. font-weight: 400;
  342. font-size: 24rpx;
  343. color: #FFFFFF;
  344. text-align: center;
  345. line-height:60rpx;
  346. background: #008FD3;
  347. border-radius: 30rpx 30rpx 30rpx 30rpx;
  348. margin-right: 16rpx;
  349. }
  350. .btn-sale{
  351. width: 224rpx;
  352. height: 60rpx;
  353. font-weight: 400;
  354. font-size: 24rpx;
  355. text-align: center;
  356. line-height:60rpx;
  357. color: #FFFFFF;
  358. background: #FF5030;
  359. border-radius: 30rpx 30rpx 30rpx 30rpx;
  360. }
  361. }
  362. }
  363. }
  364. </style>