mySaleOrder.vue 11 KB

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