mySaleOrder.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <template>
  2. <!-- <app-layout :haveBackground="false"> -->
  3. <app-layout >
  4. <view class="page">
  5. <!-- <view style="background-color: #fff;position: fixed;top: 0;width: 100%;"> -->
  6. <view class="main-left cross-center search">
  7. <image src="https://t17.9026.com/web/statics/image/index/search.png" mode=""></image>
  8. <input style="width: 560rpx;" type="text" value="" placeholder="搜索客户、商品、时间、订单号" v-model="keyword"
  9. placeholder-style="font-size:28rpx;color:#999;" />
  10. </view>
  11. <view style="background-color: #fff;position: sticky;top: 0;width: 100%;">
  12. <AppDropdownMenu :size="28" :selectedColor="getTheme.color" :checkboxColor="getTheme.color"
  13. :options="options[selectIndex]" :minWidth="750" @click="rangeItemClick" @close="rangeClose"
  14. ref="ddmRange">
  15. <view class="main-between">
  16. <view class="fui-filter__item" @tap="filterTap(0)">
  17. <text>{{range}}</text>
  18. <view class="fui-filter__icon cross-center" :class="{'fui-icon__ani':rangeShow}">
  19. <image style="width: 16rpx;height: 9rpx;margin:0 11rpx;"
  20. src="https://t17.9026.com/web/statics/image/index/arrow-down-bottom.png" mode="">
  21. </image>
  22. </view>
  23. </view>
  24. <view class="fui-filter__item" @tap="filterTap(1)">
  25. <text>{{range1}}</text>
  26. <view class="fui-filter__icon cross-center" :class="{'fui-icon__ani':rangeShow1}">
  27. <image style="width: 16rpx;height: 9rpx;margin:0 11rpx;"
  28. src="https://t17.9026.com/web/statics/image/index/arrow-down-bottom.png" mode="">
  29. </image>
  30. </view>
  31. </view>
  32. </view>
  33. </AppDropdownMenu>
  34. </view>
  35. <!-- </view> -->
  36. <view class="list">
  37. <view class="box" v-for="(item,index) in dataList" :key="index">
  38. <view class="main-between cross-center header">
  39. <view class="cross-center head" :class="{'border_bottom':true}">
  40. <image :src="item.user.avatar" mode=""></image>
  41. {{item.user.nickname}}{{item.user.estate_name?`-${item.user.estate_name}`:''}}
  42. </view>
  43. <!-- <view class="cross-center head1">
  44. <image src="https://t17.9026.com/web/statics/image/sale/1.png" mode=""></image>
  45. 客户楼盘绑定通知
  46. </view> -->
  47. <view class="main-between cross-center">
  48. <view class="date">交易成功</view>
  49. <image class="del" src="https://t17.9026.com/web/statics/image/user-center/del.png" mode="">
  50. </image>
  51. </view>
  52. </view>
  53. <view class="center">
  54. <view class="main-between goods" v-for="(goods,index1) in item.detail" :key="index1" @click="$jump({open_type:'navigate',url:'/pages/goods/goods?id='+goods.id})">
  55. <view class="main-left desc">
  56. <image class="goods-img" :src="goods.goods_info.pic_url"
  57. mode=""></image>
  58. <view>
  59. <view class="title t-omit-two">{{goods.goods_info.name}}</view>
  60. <view class="main-between price">
  61. <view>
  62. <text class="company">¥</text>
  63. <text>{{goods.unit_price}}</text>
  64. </view>
  65. <view>
  66. x{{goods.num}}
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <!-- <view class="isopen cross-center">
  72. 收起
  73. <image src="https://t17.9026.com/web/statics/image/user-center/arrow-top.png" mode=""></image>
  74. </view> -->
  75. </view>
  76. <view class="main-between cross-bottom total_pay">
  77. <view class="order_number">订单号:{{item.order_no}}</view>
  78. <view><text>应付总</text><text>¥</text><text>{{item.total_price}}</text></view>
  79. </view>
  80. </view>
  81. <view class="main-between footer cross-center border_top">
  82. <template>
  83. <view class="date">{{item.updated_at.split(' ')[0]}}</view>
  84. <view class="main-around">
  85. <!-- <view class="kbtn">上传发票</view> -->
  86. <view class="kbtn">再次购买</view>
  87. <view class="kbtn" @click="$jump({open_type:'navigate',url:'/pages/order/express-detail/express-detail'})">查看物流</view>
  88. </view>
  89. </template>
  90. <!-- <template v-if="false">
  91. <view class="left">查看详情</view>
  92. <image style="width: 12rpx;height: 22rpx;"
  93. src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png" mode=""></image>
  94. </template> -->
  95. </view>
  96. </view>
  97. <view class="no-more" v-if="isNoMore">没有更多了...</view>
  98. <app-no-goods v-if="dataList.length===0" :title="'暂无数据'" background="#f7f7f7"></app-no-goods>
  99. </view>
  100. <template>
  101. <view class="safe-area-inset-bottom">
  102. <view :style="{height: '110rpx'}" class="nav-margin "
  103. :class="haveBackground ? 'app-layout-background' : ''"></view>
  104. </view>
  105. <app-tab-bar :page-count="0"></app-tab-bar>
  106. </template>
  107. </view>
  108. </app-layout>
  109. </template>
  110. <script>
  111. import {
  112. mapGetters,
  113. mapState
  114. } from 'vuex'
  115. import AppTabBar from '@/components/basic-component/app-tab-bar/app-tab-bar.vue';
  116. import AppDropdownMenu from '@/components/fui-dropdown-menu/fui-dropdown-menu.vue';
  117. import appNoGoods from '@/components/page-component/app-no-goods/app-no-goods.vue';
  118. export default {
  119. components: {
  120. AppTabBar,
  121. AppDropdownMenu,
  122. appNoGoods,
  123. },
  124. data() {
  125. return {
  126. dataList:[{}],
  127. options: [
  128. [{
  129. text: '订单状态',
  130. value: 1,
  131. checked: true
  132. }, {
  133. text: '交易成功',
  134. value: 2
  135. }, {
  136. text: '交易失败',
  137. value: 3
  138. }],
  139. [{
  140. text: '全部客户',
  141. value: 1,
  142. checked: true
  143. }, {
  144. text: '已认证',
  145. value: 2
  146. }, {
  147. text: '未认证',
  148. value: 3
  149. }]
  150. ],
  151. range: '订单状态',
  152. range1: '全部客户',
  153. selectIndex: 0,
  154. rangeShow: false,
  155. rangeShow1: false,
  156. keyword:'',
  157. page:1,
  158. isNoMore:false,
  159. };
  160. },
  161. computed: {
  162. ...mapGetters('mallConfig', {
  163. getTheme: 'getTheme'
  164. }),
  165. ...mapState({
  166. info:state=>state.user.info
  167. })
  168. },
  169. onShow() {
  170. uni.hideHomeButton()
  171. this.getDataList()
  172. },
  173. onReachBottom() {
  174. if(!this.isNoMore){
  175. this.page++
  176. this.getDataList()
  177. }
  178. },
  179. methods: {
  180. getDataList(){
  181. this.$showLoading()
  182. this.$request({
  183. url:this.$api.order.list,
  184. data:{
  185. status: 0,
  186. keyword: this.keyword,
  187. dateArr: [],
  188. page: this.page,
  189. sale_id:this.info.salesperson_id
  190. },
  191. method:'get'
  192. }).then(res=>{
  193. this.$hideLoading()
  194. if(res.code===0){
  195. if(this.page===1){
  196. this.dataList=res.data.list
  197. }else{
  198. this.dataList=this.dataList.concat(res.data.list)
  199. }
  200. if(res.data.list.length<20){
  201. this.isNoMore=true
  202. }
  203. }
  204. })
  205. },
  206. filterTap(i) {
  207. this.selectIndex = i
  208. //显示下拉框
  209. this.$refs.ddmRange.show()
  210. this.selectIndex ? this.rangeShow1 = true : this.rangeShow = true
  211. },
  212. rangeItemClick(e) {
  213. console.log(e)
  214. this.selectIndex ? this.range1 = e.text : this.range = e.text
  215. this.rangeClose()
  216. },
  217. rangeClose() {
  218. this.selectIndex ? this.rangeShow1 = false : this.rangeShow = false
  219. }
  220. }
  221. }
  222. </script>
  223. <style lang="scss" scoped>
  224. .page {
  225. min-height: 100vh;
  226. }
  227. .fui-filter__item {
  228. width: 100%;
  229. height: 88rpx;
  230. display: flex;
  231. align-items: center;
  232. justify-content: center;
  233. font-size: 30rpx;
  234. /* #ifdef H5 */
  235. cursor: pointer;
  236. /* #endif */
  237. background-color: #fff;
  238. }
  239. .fui-filter__icon {
  240. transition: all .15s linear;
  241. }
  242. .fui-icon__ani {
  243. transform: rotate(180deg);
  244. }
  245. .nav-margin {
  246. width: #{750rpx};
  247. }
  248. .search {
  249. width: 680rpx;
  250. height: 82rpx;
  251. // background: #FFFFFF;
  252. border: 1rpx solid #EEEEEE;
  253. border-radius: 4rpx;
  254. margin: 0 auto;
  255. padding-left: 22rpx;
  256. image {
  257. width: 22rpx;
  258. height: 22rpx;
  259. margin-right: 18rpx;
  260. }
  261. }
  262. .list {
  263. margin-top: 20rpx;
  264. }
  265. .box {
  266. width: 750rpx;
  267. height: auto;
  268. background: #ffffff;
  269. // border-radius: 6rpx;
  270. padding: 26rpx 31rpx;
  271. margin: 0 auto 20rpx;
  272. .border_bottom {
  273. border-bottom: 1px solid #eaeaea;
  274. }
  275. .border_top {
  276. border-top: 1px solid #eaeaea;
  277. }
  278. .header {
  279. padding-bottom: 21rpx;
  280. .head {
  281. max-width: 500rpx;
  282. height: 48rpx;
  283. background: #f6f6f6;
  284. border-radius: 24rpx;
  285. padding: 0 17rpx;
  286. overflow: hidden;
  287. image {
  288. width: 32rpx;
  289. height: 32rpx;
  290. margin-right: 14rpx;
  291. border-radius: 50%;
  292. }
  293. font-size: 24rpx;
  294. font-weight: 500;
  295. color: #666666;
  296. }
  297. .head1 {
  298. max-width: 500rpx;
  299. height: 48rpx;
  300. overflow: hidden;
  301. image {
  302. width: 45rpx;
  303. height: 45rpx;
  304. margin-right: 14rpx;
  305. border-radius: 50%;
  306. }
  307. font-size: 30rpx;
  308. font-weight: bold;
  309. color: #222222;
  310. }
  311. .date {
  312. font-size: 22rpx;
  313. font-weight: 500;
  314. color: #222222;
  315. margin-right: 30rpx;
  316. }
  317. .del {
  318. width: 36rpx;
  319. height: 36rpx;
  320. }
  321. }
  322. .center {
  323. padding: 0 0 10rpx;
  324. .title {
  325. font-size: 30rpx;
  326. font-weight: bold;
  327. color: #222222;
  328. }
  329. .isopen {
  330. font-size: 24rpx;
  331. font-weight: bold;
  332. color: #a18353;
  333. image {
  334. width: 19rpx;
  335. height: 12rpx;
  336. margin-left: 8rpx;
  337. }
  338. }
  339. .center-text {
  340. margin-top: 20rpx;
  341. font-size: 24rpx;
  342. font-weight: 500;
  343. color: #999999;
  344. line-height: 34rpx;
  345. }
  346. .center-img {
  347. margin-top: 28rpx;
  348. image {
  349. width: 146rpx;
  350. height: 96rpx;
  351. border-radius: 12rpx;
  352. margin-right: 15rpx;
  353. }
  354. }
  355. .goods {
  356. // padding-top: 42rpx;
  357. // border-top: 1rpx solid #EAEAEA;
  358. .desc {
  359. width: 100%;
  360. height: 141rpx;
  361. // background: #F8F8F8;
  362. border-radius: 6rpx;
  363. padding: 18rpx 0 18rpx 0;
  364. .goods-img {
  365. width: 147rpx;
  366. height: 110rpx;
  367. border-radius: 8rpx;
  368. margin-right: 21rpx;
  369. }
  370. .title {
  371. width: 478rpx;
  372. font-size: 26rpx;
  373. font-weight: 500;
  374. color: #222222;
  375. line-height: 34rpx;
  376. }
  377. .price {
  378. width: 520rpx;
  379. font-size: 24rpx;
  380. font-weight: 500;
  381. color: #222222;
  382. line-height: 36rpx;
  383. .company {}
  384. }
  385. }
  386. }
  387. .total_pay {
  388. font-size: 24rpx;
  389. color: #222222;
  390. line-height: 34px;
  391. .order_number{
  392. font-size: 22rpx;
  393. font-weight: 500;
  394. color: #838584;
  395. }
  396. &>text:nth-child(1) {
  397. font-weight: 500;
  398. margin-right: 8rpx;
  399. }
  400. &>text:nth-child(2) {
  401. font-weight: 500;
  402. font-size: 20rpx;
  403. }
  404. &>text:nth-child(3) {
  405. font-weight: 600;
  406. }
  407. }
  408. }
  409. .footer {
  410. padding: 28rpx 0 0;
  411. .left {
  412. font-size: 28rpx;
  413. font-weight: 500;
  414. color: #666666;
  415. }
  416. .date {
  417. font-size: 22rpx;
  418. font-weight: 500;
  419. color: #838584;
  420. line-height: 34rpx;
  421. }
  422. .kbtn {
  423. width: 138rpx;
  424. height: 52rpx;
  425. border: 1rpx solid #999999;
  426. border-radius: 4rpx;
  427. font-size: 20rpx;
  428. font-weight: 500;
  429. color: #222222;
  430. text-align: center;
  431. line-height: 52rpx;
  432. margin-left: 20rpx;
  433. }
  434. }
  435. }
  436. .no-more {
  437. font-size: 24rpx;
  438. font-weight: 500;
  439. color: #666666;
  440. text-align: center;
  441. line-height: 80rpx;
  442. }
  443. </style>