clientList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  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="openEditMoney(1)">
  39. 设置代理价格
  40. </view>
  41. <view class="btn-sale" @click.stop="openEditMoney(2)">
  42. 设置销售价格
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="h20"></view>
  48. </mescroll-body>
  49. <view class="popup-box" v-if="editShow">
  50. <view class="info-mask" @click.stop="cancelEditMoney()" ></view>
  51. <view class="info-form" >
  52. <view class="title">{{type==1?'设置代理价格':'设置销售价格'}}</view>
  53. <view class="form-box">
  54. <view class="form-item">
  55. <text class="label">{{type==1?'代理价格':'销售价格'}}</text>
  56. <input type="text" v-model="proxyPrice" maxlength="10" placeholder="请输入价格" class="form-input" />
  57. </view>
  58. </view>
  59. <view class="btns">
  60. <view class="sub-btn" @click.stop="confirmEditMoney()">提交</view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. import {getCompanyStoreOrderList} from '@/api/storeOrder'
  68. import {getUserInfo} from '@/api/companyUser'
  69. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  70. export default {
  71. mixins: [MescrollMixin],
  72. data() {
  73. return {
  74. searchKey:"",
  75. mescroll:null,
  76. type:0,
  77. editShow:false,
  78. proxyPrice:0,
  79. // 上拉加载的配置
  80. upOption: {
  81. onScroll:true,
  82. use: true, // 是否启用上拉加载; 默认true
  83. page: {
  84. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  85. size: 10 // 每页数据的数量,默认10
  86. },
  87. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  88. empty: {
  89. icon:'/static/images/no_data.png',
  90. tip: '暂无数据'
  91. }
  92. },
  93. // 列表数据
  94. dataList: [
  95. {name:'西航宇',phone:'18056647845',proxyPrice:0.8,salePrice:0.6,createTime:'2025-06-10 14:20',img:'/static/images/health/my_heads.png'},
  96. ]
  97. };
  98. },
  99. onLoad(options) {
  100. var that=this;
  101. // uni.$on('refreshOrder', () => {
  102. // that.mescroll.resetUpScroll()
  103. // })
  104. this.companyId=options.companyId;
  105. this.companyUserId=options.companyUserId;
  106. },
  107. methods: {
  108. goSearch(e) {
  109. this.searchKey=e.detail.value;
  110. this.mescroll.resetUpScroll()
  111. },
  112. // getUserInfo(){
  113. // var data={token:uni.getStorageSync('CompanyUserToken')}
  114. // getUserInfo(data).then(
  115. // res => {
  116. // if(res.code==200){
  117. // this.user=res.data;
  118. // }
  119. // else if(res.code==403){
  120. // uni.setStorageSync('CompanyUserToken',null);
  121. // uni.navigateBack({
  122. // delta:-1
  123. // })
  124. // }else{
  125. // uni.showToast({
  126. // icon:'none',
  127. // title: res.msg,
  128. // });
  129. // }
  130. // },
  131. // rej => {}
  132. // );
  133. // },
  134. openEditMoney(value){
  135. this.type=value
  136. this.editShow = true
  137. },
  138. cancelEditMoney(){
  139. this.editShow = false
  140. },
  141. confirmEditMoney(){
  142. if(parseFloat(this.proxyPrice)>=0){
  143. var that=this;
  144. // var data={orderId:this.order.id,token:uni.getStorageSync('CompanyUserToken'),money:this.payMoney}
  145. // editOrderMoney(data).then(
  146. // res => {
  147. // if(res.code==200){
  148. // this.editShow = false
  149. // this.getMyStoreOrderById();
  150. // }else{
  151. // uni.showToast({
  152. // icon:'none',
  153. // title: res.msg,
  154. // });
  155. // }
  156. // },
  157. // rej => {}
  158. // );
  159. }
  160. else{
  161. uni.showToast({
  162. icon:'none',
  163. title: "价格应大于等于0",
  164. });
  165. }
  166. },
  167. mescrollInit(mescroll) {
  168. this.mescroll = mescroll;
  169. },
  170. /*下拉刷新的回调 */
  171. downCallback(mescroll) {
  172. mescroll.resetUpScroll()
  173. },
  174. upCallback(page) {
  175. //联网加载数据
  176. var that = this;
  177. var data = {
  178. keyword:this.searchKey,
  179. companyId:this.companyId,
  180. companyUserId:this.companyUserId,
  181. page: page.num,
  182. pageSize: page.size
  183. };
  184. },
  185. showDetail(item) {
  186. // uni.navigateTo({
  187. // url: './clientDetail?companyId='+this.companyId+"&companyUserId="+this.companyUserId
  188. // })
  189. },
  190. }
  191. }
  192. </script>
  193. <style lang="scss">
  194. .content{
  195. padding:20upx;
  196. }
  197. .top-bg{
  198. background: linear-gradient( 266deg, #FEA603 0%, #E83924 100%);
  199. border-radius: 16rpx 16rpx 16rpx 16rpx;
  200. padding: 30rpx;
  201. margin-bottom: 30rpx;
  202. .top-title{
  203. font-family: PingFang SC;
  204. font-weight: 500;
  205. font-size: 28rpx;
  206. color: #FFFFFF;
  207. text-align: left;
  208. }
  209. .num{
  210. font-family: Roboto;
  211. font-weight: 500;
  212. font-size: 64rpx;
  213. color: #FFFFFF;
  214. text-align: left;
  215. }
  216. }
  217. .search-cont{
  218. // padding: 16upx 30upx;
  219. // background-color: #FFFFFF;
  220. display: flex;
  221. align-items: center;
  222. justify-content:space-between;
  223. .inner{
  224. box-sizing: border-box;
  225. width: 80%;
  226. height: 64rpx;
  227. background: #fff;
  228. border-radius: 32upx;
  229. display: flex;
  230. align-items: center;
  231. padding: 0 30upx;
  232. .icon-search{
  233. width: 28upx;
  234. height: 28upx;
  235. margin-right: 20upx;
  236. }
  237. input{
  238. height: 60upx;
  239. line-height: 60upx;
  240. flex: 1;
  241. }
  242. }
  243. .btn-serach{
  244. width: 112rpx;
  245. height: 64rpx;
  246. line-height: 64rpx;
  247. text-align: center;
  248. font-weight: 600;
  249. font-size: 24rpx;
  250. color: #fff;
  251. background: #008FD3;
  252. border-radius: 34rpx 34rpx 34rpx 34rpx;
  253. }
  254. }
  255. .top-title{
  256. font-family: PingFang SC, PingFang SC;
  257. font-weight: 600;
  258. font-size: 36rpx;
  259. color: #222426;
  260. text-align: left;
  261. padding:22rpx ;
  262. }
  263. .popup-box{
  264. position: fixed;
  265. top: 0;
  266. right: 0;
  267. left: 0;
  268. bottom: 0;
  269. z-index: 999;
  270. display: flex;
  271. justify-content: center;
  272. align-items: center;
  273. .info-mask {
  274. position: fixed;
  275. top: 0;
  276. right: 0;
  277. bottom: 0;
  278. left: 0;
  279. background-color: rgba($color: #000000, $alpha: 0.5);
  280. z-index: 999;
  281. }
  282. .info-form {
  283. z-index: 1000;
  284. width: 650rpx;
  285. display: flex;
  286. flex-direction: column;
  287. justify-content: center;
  288. align-items: center;
  289. padding: 0 30upx;
  290. background: #FFFFFF;
  291. border-radius: 16upx;
  292. .title{
  293. padding: 30rpx 0rpx 15rpx;
  294. display: flex;
  295. justify-content: center;
  296. align-items: center;
  297. font-size: 40upx;
  298. line-height: 44upx;
  299. font-family: PingFang SC;
  300. color: #222222;
  301. }
  302. .form-box{
  303. width: 100%;
  304. .form-item{
  305. padding: 30upx 0;
  306. display: flex;
  307. align-items: flex-start;
  308. border-bottom: 1px solid #F1F1F1;
  309. .label{
  310. width: 160upx;
  311. text-align: left;
  312. font-size: 30upx;
  313. line-height: 44upx;
  314. font-family: PingFang SC;
  315. font-weight: 500;
  316. color: #222222;
  317. flex-shrink: 0;
  318. }
  319. input{
  320. text-align: left;
  321. }
  322. .form-input{
  323. font-size: 34upx;
  324. font-family: PingFang SC;
  325. font-weight: 500;
  326. color: #222222;
  327. text-align: left;
  328. }
  329. }
  330. }
  331. .btns{
  332. width: 100%;
  333. height: 120upx;
  334. padding: 0 30upx;
  335. display: flex;
  336. align-items: center;
  337. justify-content: center;
  338. .sub-btn{
  339. width: 100%;
  340. height: 88upx;
  341. line-height: 88upx;
  342. text-align: center;
  343. font-size: 30upx;
  344. font-family: PingFang SC;
  345. font-weight: bold;
  346. color: #FFFFFF;
  347. background: #008FD3;
  348. border-radius: 44upx;
  349. }
  350. }
  351. }
  352. }
  353. .client-list{
  354. .item{
  355. background: #fff;
  356. border-radius: 0rpx 0rpx 0rpx 0rpx;
  357. padding: 30rpx;
  358. margin-bottom: 20rpx;
  359. .top-box{
  360. padding-bottom: 30rpx;
  361. display: flex;
  362. align-items: flex-start;
  363. border-bottom: 1rpx solid #ECECEC;
  364. image{
  365. width: 112rpx;
  366. height: 112rpx;
  367. background: #EAEAEA;
  368. border-radius:50%;
  369. margin-right: 22rpx;
  370. }
  371. .right{
  372. display: flex;
  373. flex-direction: column;
  374. justify-content: space-between;
  375. .name{
  376. font-family: PingFang SC;
  377. font-weight: 500;
  378. font-size: 32rpx;
  379. color: #222426;
  380. text-align: left;
  381. margin-bottom: 10rpx;
  382. }
  383. .proxy{
  384. // width: 166rpx;
  385. // height: 36rpx;
  386. border-radius: 4rpx 4rpx 4rpx 4rpx;
  387. border: 1rpx solid #008FD3;
  388. display: flex;
  389. align-items: center;
  390. margin-right: 16rpx;
  391. .title{
  392. font-family: PingFang SC;
  393. font-weight: 400;
  394. font-size: 20rpx;
  395. color: #FFFFFF;
  396. background: #008FD3;
  397. padding: 8rpx;
  398. }
  399. .price{
  400. font-weight: 500;
  401. font-size: 20rpx;
  402. color: #008FD3;
  403. padding: 4rpx 12rpx;
  404. }
  405. }
  406. .sale{
  407. // width: 166rpx;
  408. // height: 36rpx;
  409. border-radius: 4rpx 4rpx 4rpx 4rpx;
  410. border: 1rpx solid #FF5030;
  411. display: flex;
  412. align-items: center;
  413. .title{
  414. font-family: PingFang SC;
  415. font-weight: 400;
  416. font-size: 20rpx;
  417. color: #FFFFFF;
  418. background: #FF5030;
  419. padding: 8rpx;
  420. }
  421. .price{
  422. font-weight: 500;
  423. font-size: 20rpx;
  424. color: #FF5030;
  425. padding: 4rpx 12rpx;
  426. }
  427. }
  428. .phone,.time{
  429. font-family: PingFang SC;
  430. font-weight: 400;
  431. font-size: 24rpx;
  432. color: #898E91;
  433. text-align: left;
  434. margin-top: 16rpx;
  435. }
  436. }
  437. }
  438. .btn-box{
  439. padding-top: 30rpx;
  440. display: flex;
  441. align-items: center;
  442. justify-content: flex-end;
  443. .btn-proxy{
  444. width: 224rpx;
  445. height: 60rpx;
  446. font-weight: 400;
  447. font-size: 24rpx;
  448. color: #FFFFFF;
  449. text-align: center;
  450. line-height:60rpx;
  451. background: #008FD3;
  452. border-radius: 30rpx 30rpx 30rpx 30rpx;
  453. margin-right: 16rpx;
  454. }
  455. .btn-sale{
  456. width: 224rpx;
  457. height: 60rpx;
  458. font-weight: 400;
  459. font-size: 24rpx;
  460. text-align: center;
  461. line-height:60rpx;
  462. color: #FFFFFF;
  463. background: #FF5030;
  464. border-radius: 30rpx 30rpx 30rpx 30rpx;
  465. }
  466. }
  467. }
  468. }
  469. </style>