index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. <template>
  2. <view class="container">
  3. <view class="search-user flex-y-center ">
  4. <view class="search-content flex-y-center">
  5. <icon type="search" size="18" />
  6. <input confirm-type="search" v-model="seTval" @confirm="confirm" @input="getSearch" class="flex-grow-1"
  7. type="text" placeholder-style="font-size:26rpx" placeholder="请输入昵称或订单号" />
  8. <view class="flex-center" style="margin-left: 10rpx;" @click.stop="onDel" v-if="seTval">
  9. <icon type="clear" size="18" />
  10. </view>
  11. </view>
  12. <view class="search-btn" @click="search">
  13. 搜索
  14. </view>
  15. </view>
  16. <view class="box-pack-between headerScreen flex-y-center ">
  17. <view class="flex-y-center flex-grow-1 ft26 header-text">
  18. <view style="width: 50%;" class="flex-grow-1 flex-center " data-text="1" :class="act_index==1?'act':''"
  19. @click="onTopBtnTap(1)">
  20. <view class="text-1" style="width: auto; max-width: 300rpx;">
  21. {{level_text}}
  22. </view>
  23. <view class="d3"></view>
  24. </view>
  25. <view style="width: 50%;" class="flex-grow-1 flex-center text-1" data-text="2"
  26. :class="act_index==2?'act':''" @click="onTopBtnTap(2)">
  27. <view class="text-1" style="width: auto; max-width: 300rpx;">
  28. {{type_text}}
  29. </view>
  30. <view class="d3"></view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="header-hg200"></view>
  35. <uni-popup-top ref="popup" type="top" :top="top" :maskClass="maskClass">
  36. <view class="showpay">
  37. <block v-if='act_index==1'>
  38. <scroll-view scroll-y="true" style="height: 400rpx;">
  39. <view class="box-li" :class="status==0?'active':''" @click="onStatus(0,'全部')" >全部
  40. </view>
  41. <view class="box-li" :class="status==1?'active':''" @click="onStatus(1,'直接合伙人')" >直接合伙人
  42. </view>
  43. <view class="box-li" :class="status==2?'active':''" @click="onStatus(2,'间接合伙人')" >间接合伙人
  44. </view>
  45. </scroll-view>
  46. </block>
  47. <block v-if='act_index==2'>
  48. <view class="model">
  49. <view class="flex-center model-date box-pack-between">
  50. <view class="model-item" :class="time_index==1?'act':''">
  51. <picker mode='date' :value="start" :start="startDate" :end="endDate"
  52. @change="bindDateChange1" data-index="1">
  53. <view class="flex-center">
  54. <text>{{start}}</text>
  55. </view>
  56. </picker>
  57. </view>
  58. <view class="model-item" :class="time_index==2?'act':''">
  59. <picker mode='date' :value="end" :start="startDate" :end="endDate" @change="bindDateChange2"
  60. data-index="1">
  61. <view class="flex-center">
  62. <text>{{end}}</text>
  63. </view>
  64. </picker>
  65. </view>
  66. </view>
  67. <view class="flex">
  68. <view class="model-btn-close model-btn flex-center" @click="clear">
  69. 清空
  70. </view>
  71. <view class="model-btn-success flex-center model-btn" @click="sure">
  72. 确定
  73. </view>
  74. </view>
  75. </view>
  76. </block>
  77. </view>
  78. </uni-popup-top>
  79. <no-none v-if='list.length<=0'></no-none>
  80. <view class="list" v-else>
  81. <view class="item" style="border: none;" v-for="(item,index) in list" :key="index">
  82. <view class="box-pack-between">
  83. <view class="name box-pack-between flex-grow-1">
  84. <text>佣金:{{item.money||0}}</text>
  85. <view class="flex-center ft28" style="padding-right: 20rpx;color: #247EFF;">
  86. {{item.open==1?'冻结':item.open==2?'正常':item.open==3?'已退款':''}}
  87. </view>
  88. </view>
  89. </view>
  90. <view class="content">
  91. <view class="flex flex-y-center">
  92. <view class="cell flex flex-y-center">
  93. <view class="title">订单号:</view>
  94. <view class="desc">{{item.order_no||''}}</view>
  95. </view>
  96. </view>
  97. <view class="flex flex-y-center box-pack-between" style="margin-top: 16rpx;">
  98. <view class="cell flex-grow-0 flex-y-center ">
  99. <view class="title">订单金额:</view>
  100. <view class="desc">{{item.pay_price||''}}</view>
  101. </view>
  102. <view class="cell flex-grow-0 flex-y-center " >
  103. <view class="title">来源:</view>
  104. <view class="desc">{{item.type==1?'微信':'支付宝'}}</view>
  105. </view>
  106. </view>
  107. <view class="flex flex-y-center box-pack-between" style="margin-top: 16rpx;">
  108. <view class="cell flex-grow-0 flex-y-center ">
  109. <view class="title">消费用户:</view>
  110. <view class="desc">{{item.nickname}}</view>
  111. </view>
  112. <view class="cell flex-grow-0 flex-y-center">
  113. <view class="title">类型:</view>
  114. <view class="desc">{{item.status==1?'直接消费者':'间接收费者'}}</view>
  115. </view>
  116. </view>
  117. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  118. <view class="cell flex flex-y-center " style="width:100%">
  119. <view class="title">合伙人:</view>
  120. <rich-text :nodes="item.hehuoren"></rich-text>
  121. </view>
  122. </view>
  123. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  124. <view class="cell flex flex-y-center " style="width:100%">
  125. <view class="title">当前佣金:</view>
  126. <view class="desc">{{item.money}}</view>
  127. </view>
  128. </view>
  129. <view class="flex flex-y-center box-pack-between" style="margin-top: 16rpx;">
  130. <view class="cell flex flex-y-center" >
  131. <view class="title">状态:</view>
  132. <view class="desc">{{item.open==1?'冻结':item.open==2?'正常':item.open==3?'已退款':''}}</view>
  133. <!-- 1冻结,2正常,3已退款 -->
  134. </view>
  135. </view>
  136. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  137. <view class="cell flex flex-y-center " style="width:100%">
  138. <view class="title">创建时间:</view>
  139. <view class="desc">{{item.create_time}}</view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. </template>
  147. <script>
  148. import uniPopupTop from '@/components/zx-uni-popup/uni-popup-top.vue'
  149. export default {
  150. components: {
  151. uniPopupTop
  152. },
  153. data() {
  154. return {
  155. act_index: 1,
  156. type_text: '时间筛选',
  157. level_text: '直接合伙人',
  158. level_id: "",
  159. admin_id: '',
  160. list: [],
  161. page: 1,
  162. is_bottom: false,
  163. keywords: "",
  164. status:0,
  165. type: 2,
  166. tableTypeList: [],
  167. time_index: 0,
  168. time_index2: 0,
  169. start: "开始时间",
  170. end: "结束时间",
  171. top: "200rpx",
  172. maskClass: {
  173. 'position': 'fixed',
  174. 'bottom': 0,
  175. 'top': "100rpx",
  176. 'left': 0,
  177. 'right': 0,
  178. 'backgroundColor': 'rgba(0, 0, 0, 0.4)'
  179. },
  180. }
  181. },
  182. onLoad(e) {
  183. this.admin_id = uni.getStorageSync("admin_id");
  184. this.shop_store_index();
  185. },
  186. onShow() {
  187. this.getData(1)
  188. },
  189. onReachBottom() {
  190. if (!this.is_bottom) {
  191. this.getData(this.page + 1)
  192. }
  193. },
  194. methods: {
  195. onChange(e){
  196. console.log(e,"eee")
  197. this.is_show =e.detail.value?1:0;
  198. this.settlement(e.currentTarget.dataset.id);
  199. },
  200. settlement(id) {
  201. this.request({
  202. url: 'Smdcshop/shared_users_settlement',
  203. data: {
  204. id:id,
  205. is_show:this.is_show, //0关闭,1启用
  206. }
  207. }).then(res => {
  208. if (res.code == 200 ) {
  209. }
  210. })
  211. },
  212. shop_store_index() {
  213. let storeinfo = uni.getStorageSync("storeinfo");
  214. this.request({
  215. url: 'Smdcshop/shared_level_index',
  216. data: {
  217. admin_id: this.admin_id,
  218. page:1,
  219. limit:1000,
  220. }
  221. }).then(res => {
  222. if (res.code == 200 ) {
  223. this.tableTypeList = res.data;
  224. }
  225. })
  226. },
  227. onStatus(e, text) {
  228. this.status = e;
  229. this.level_text = text;
  230. this.list = [];
  231. this.getData(1);
  232. this.$refs.popup.close();
  233. },
  234. bindDateChange1(e) {
  235. this.time_index = e.currentTarget.dataset.index;
  236. this.start = e.target.value;
  237. },
  238. bindDateChange2(e) {
  239. this.time_index2 = e.currentTarget.dataset.index;
  240. this.end = e.target.value;
  241. },
  242. sure(e) {
  243. this.getData(1);
  244. this.$refs.popup.close();
  245. this.start_text = this.end;
  246. },
  247. clear() {
  248. this.start = '开始时间';
  249. this.start_text = '日期查找';
  250. this.end = '结束时间';
  251. this.getData(1);
  252. this.$refs.popup.close();
  253. },
  254. Onlevel(e, text) {
  255. this.level_id = e;
  256. this.level_text = text;
  257. this.list = [];
  258. this.getData(1);
  259. this.$refs.popup.close();
  260. },
  261. getSearch(e) {
  262. if (!e.detail.value) {
  263. this.page = 1;
  264. this.list = [];
  265. this.keywords = "";
  266. this.getData(1);
  267. }
  268. this.keywords = e.detail.value;
  269. },
  270. onDel() {
  271. this.seTval = '';
  272. this.page = 1;
  273. this.list = [];
  274. this.keywords = "";
  275. this.getData(1);
  276. },
  277. confirm(e) {
  278. this.page = 1;
  279. this.list = [];
  280. this.keywords = e.detail.value;
  281. this.getData(1);
  282. },
  283. search(e) {
  284. this.page = 1;
  285. this.list = [];
  286. this.getData(1);
  287. },
  288. onTopBtnTap(e) {
  289. this.act_index = e;
  290. this.$refs.popup.open();
  291. },
  292. getData(page) {
  293. if (page == 1) {
  294. this.list = []
  295. this.page = 1
  296. this.is_bottom = false
  297. }
  298. this.request({
  299. url: 'smdcshop/shared_commission_index',
  300. data: {
  301. page,
  302. limit: 10,
  303. serch: this.keywords,
  304. admin_id: this.admin_id,
  305. status:this.status,//状态:全部=空。1通过,2审核中,3已拒绝
  306. start: this.start == '开始时间' ? '' : this.start,
  307. end: this.end == '结束时间' ? '' : this.end,
  308. }
  309. }).then(res => {
  310. if (res.code == 200 && res.data.length) {
  311. this.list = this.list.concat(res.data)
  312. this.page = page
  313. } else {
  314. this.is_bottom = true
  315. }
  316. })
  317. }
  318. }
  319. }
  320. </script>
  321. <style lang="scss">
  322. /* @import url("./static/css/common.css"); */
  323. page {
  324. background-color: #F4F5F7;
  325. }
  326. .list {
  327. padding: 30rpx 25rpx;
  328. }
  329. .list .item {
  330. border-radius: 8rpx;
  331. overflow: hidden;
  332. padding-left: 30rpx;
  333. border-left: 8rpx solid #247EFF;
  334. background-color: #fff;
  335. margin-bottom: 30rpx;
  336. }
  337. .list .item .name {
  338. height: 80rpx;
  339. border-bottom: 1rpx solid #f5f5f5;
  340. font-size: 30rpx;
  341. line-height: 80rpx;
  342. font-weight: bold;
  343. }
  344. .list .item .content {
  345. padding: 20rpx 0 24rpx;
  346. }
  347. .list .item .content .cell {
  348. /* flex: none; */
  349. /* width: 50%; */
  350. box-sizing: border-box;
  351. padding-right: 30rpx;
  352. font-size: 26rpx;
  353. line-height: 37rpx;
  354. color: #666;
  355. }
  356. .list .item .content .cell .title {
  357. color: #99A0AD;
  358. }
  359. .headerScreen {
  360. height: 100rpx;
  361. position: fixed;
  362. top: 100rpx;
  363. width: 100%;
  364. z-index: 999;
  365. background: #fff;
  366. border-bottom: 1rpx solid #F1F1F1;
  367. }
  368. .header-hg200 {
  369. height: 210rpx;
  370. }
  371. .header-text {
  372. text-align: center;
  373. }
  374. .d3 {
  375. width: 0;
  376. height: 0;
  377. border-width: 12rpx;
  378. border-style: solid;
  379. border-color: #000 transparent transparent transparent;
  380. margin-top: 14rpx;
  381. margin-left: 6rpx;
  382. }
  383. .showpay {
  384. width: 100%;
  385. z-index: 10;
  386. background: #FFFFFF;
  387. }
  388. .search-user {
  389. z-index: 999;
  390. position: fixed;
  391. left: 0;
  392. width: 100%;
  393. height: 100rpx;
  394. background: #FFFFFF;
  395. margin-left: 15rpx;
  396. }
  397. .search-user .search-content {
  398. width: 83%;
  399. height: 70rpx;
  400. background: #F1F1F1;
  401. border-radius: 100rpx;
  402. padding: 0 20rpx;
  403. }
  404. .search-user .search-content icon {
  405. margin-right: 10rpx;
  406. }
  407. .search-user .search-btn {
  408. margin-left: 20rpx;
  409. font-size: 28rpx;
  410. }
  411. .box-li {
  412. background-color: #fff;
  413. text-align: center;
  414. border-bottom: 1rpx solid #f1f1f1;
  415. height: 80rpx;
  416. line-height: 80rpx;
  417. font-size: 26rpx;
  418. }
  419. page .active {
  420. color: #007AFF;
  421. }
  422. .model {
  423. width: 100%;
  424. z-index: 10;
  425. background: #FFFFFF;
  426. padding-bottom: 20rpx;
  427. .model-date {
  428. width: 100%;
  429. padding: 20rpx 80rpx;
  430. border-bottom: 1rpx solid #F1F1F1;
  431. .model-item {
  432. width: 270rpx;
  433. text-align: center;
  434. font-size: 28rpx;
  435. color: #999;
  436. position: relative;
  437. padding: 10rpx 0;
  438. text-align: center;
  439. border-radius: 8rpx;
  440. border: 1rpx solid #999;
  441. }
  442. .act {
  443. // color: #FFFFFF;
  444. // background: #FFBE2C;
  445. // border: 1rpx solid #FFBE2C;
  446. }
  447. }
  448. .model-btn {
  449. border-radius: 8rpx;
  450. box-shadow: 0px 0px 8rpx 0px rgba(51, 135, 255, 0.20);
  451. margin: 0 auto;
  452. margin-top: 20rpx;
  453. text-align: center;
  454. width: 41%;
  455. height: 80rpx;
  456. border-radius: none;
  457. }
  458. .model-btn-close {
  459. border: 1rpx solid #F1F1F1;
  460. color: #000;
  461. }
  462. .model-btn-success {
  463. color: #FFFFFF;
  464. background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
  465. }
  466. }
  467. </style>