CustomerOrder.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <template>
  2. <view class="rigth-view">
  3. <scroll-view scroll-y class="order_ul" @scrolltolower="scrollTolowerHandel">
  4. <view class="order_li" v-for="(item, index) in order_list" :key="index" @click="goPage(`/pages/order/orderInfo?userCenterId=${item.userCenterId}&id=${item.id}`)">
  5. <view class="order_time clearfix">
  6. <view class="float_left">
  7. <view class="tag-circleRight">
  8. <image v-if="item.orderMsg === '待审核'" src="../../../static/img/ic-audit.png" class="img"></image>
  9. <image v-else-if="item.orderMsg === '已关闭'" src="../../../static/img/ic-Closed.png" class="img"></image>
  10. <image v-else-if="item.orderMsg === '已出库'" src="../../../static/img/ic-stock.png" class="img"></image>
  11. <image v-else-if="item.orderMsg === '已完成'" src="../../../static/img/ic-Completed.png" class="img"></image>
  12. <image v-else-if="item.orderMsg === '待出库'" src="../../../static/img/ic-delivered.png" class="img"></image>
  13. <image v-else src="../../../static/img/ic-delivered.png" class="img"></image>
  14. </view>
  15. </view>
  16. <view class="float_left text ellipsis">{{ item.shopName }}</view>
  17. <viwe class="float_right time">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</viwe>
  18. </view>
  19. <view class="order_bottom">
  20. <view class="order_params">
  21. 订单编号
  22. <text class="right-txt">{{ item.no }}</text>
  23. </view>
  24. <view class="order_params clearfix">
  25. <text class="float_left">
  26. 订单来源
  27. <text class="right-txt">{{ item.sourceMsg }}</text>
  28. </text>
  29. </view>
  30. <view class="order_params clearfix">
  31. <text class="float_left">
  32. 业务员
  33. <text class="right-txt">{{ item.salesManName || '未分配' }}</text>
  34. </text>
  35. <view class="float_right" style="color: #FA6400;font-weight: bold;font-size: 28rpx;"><text style="font-weight: 300;font-size: 24rpx;">¥</text>{{ item.payAmount }}</view>
  36. </view>
  37. </view>
  38. </view>
  39. <u-loadmore v-if="order_list.length" :status="load_status" />
  40. </scroll-view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. props: {
  46. userCenterId: {
  47. type: [Number, String],
  48. default: ''
  49. }
  50. },
  51. data() {
  52. return {
  53. order_list: [],
  54. page: 1,
  55. pageSize: 10,
  56. total: 0,
  57. load_status: 'nomore'
  58. };
  59. },
  60. created() {
  61. this.getAllOrder();
  62. },
  63. methods: {
  64. scrollTolowerHandel() {
  65. if (this.total / this.pageSize > this.page) {
  66. this.page += 1;
  67. this.getAllOrder();
  68. }
  69. },
  70. // 订单列表
  71. getAllOrder() {
  72. this.load_status = 'loading';
  73. let params = {
  74. page: this.page,
  75. pageSize: this.pageSize,
  76. search: {
  77. userCenterId: this.userCenterId
  78. }
  79. };
  80. this.$u.api.getAllOrder(params).then(res => {
  81. if (this.page === 1) {
  82. this.order_list = res.data;
  83. } else {
  84. this.order_list = this.order_list.concat(res.data);
  85. }
  86. this.order_list = this.order_list.map(item => {
  87. return {
  88. ...item,
  89. goods_list: item.goods_list || []
  90. };
  91. });
  92. this.load_status = this.$utils.loadStatus(this.page, this.pageSize, res.pageTotal);
  93. this.total = res.pageTotal;
  94. });
  95. }
  96. }
  97. };
  98. </script>
  99. <style lang="scss" scoped>
  100. .rigth-view {
  101. background-color: rgb(247, 248, 250);
  102. .order_ul {
  103. width: 100%;
  104. height: calc(90vh - 226rpx);
  105. .order_li {
  106. margin: 24rpx 20rpx 0;
  107. padding: 0 24rpx 30rpx;
  108. background-color: #ffffff;
  109. // padding-top: 16rpx;
  110. border-radius: 14rpx;
  111. .money-text {
  112. color: $uni-color-error;
  113. margin: 0 4rpx;
  114. font-size: 28rpx;
  115. font-weight: 500;
  116. margin-left: 30rpx;
  117. }
  118. .order_time {
  119. // background-color: #f7f8fa;
  120. height: 80rpx;
  121. line-height: 80rpx;
  122. .img {
  123. width: 126rpx;
  124. height: 40rpx;
  125. // margin-left: 24rpx;
  126. vertical-align: middle;
  127. }
  128. // .txt {
  129. // font-size: 28rpx;
  130. // font-weight: 500;
  131. // // margin-left: 110rpx;
  132. // // vertical-align: middle;
  133. // }
  134. // .custom-icon-jinru {
  135. // font-size: 28rpx;
  136. // margin-left: 10rpx;
  137. // }
  138. .tag-circleRight {
  139. // line-height: 40rpx;
  140. height: 40rpx;
  141. // background-color: $uni-color-primary;
  142. // color: #ffffff;
  143. // font-size: 24rpx;
  144. // display: inline-block;
  145. width: 126rpx;
  146. // text-align: center;
  147. // border-radius: 0 100rpx 100rpx 0;
  148. // text {
  149. // font-size: 28rpx;
  150. // font-weight: bold;
  151. // margin-left: 4rpx;
  152. // }
  153. }
  154. .text {
  155. font-size: 30rpx;
  156. color: #2d405e;
  157. font-family: PingFangSC-Medium, PingFang SC;
  158. font-weight: 500;
  159. margin-left: 24rpx;
  160. margin-top: 4rpx;
  161. width: 180rpx;
  162. }
  163. .time {
  164. font-size: 24rpx;
  165. color: #b8c0c8;
  166. font-family: DINPro-Regular;
  167. font-weight: 400;
  168. margin-top: 4rpx;
  169. }
  170. }
  171. .order_info {
  172. padding: 30rpx;
  173. font-size: 24rpx;
  174. border-bottom: 1px solid #f7f8fa;
  175. }
  176. .remarks {
  177. background-color: #f1f1f1;
  178. padding: 0 30rpx;
  179. height: 60rpx;
  180. line-height: 60rpx;
  181. }
  182. .order_tip {
  183. margin-left: 0rpx;
  184. color: #333333;
  185. height: 89rpx;
  186. vertical-align: middle;
  187. padding: 25rpx 40rpx;
  188. font-size: 28rpx;
  189. font-weight: 400;
  190. background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 195, 149, 0.1) 100%);
  191. .txst {
  192. font-size: 28rpx;
  193. font-weight: 500;
  194. color: #2d405e;
  195. }
  196. }
  197. .order_pip {
  198. margin-left: 0rpx;
  199. color: #333333;
  200. height: 89rpx;
  201. vertical-align: middle;
  202. padding: 25rpx 40rpx;
  203. font-size: 28rpx;
  204. font-weight: 400;
  205. background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(246, 119, 120, 0.1) 100%);
  206. .txst {
  207. font-size: 28rpx;
  208. font-weight: 500;
  209. color: #2d405e;
  210. }
  211. }
  212. .order_bottom {
  213. // padding: 30rpx;
  214. // margin-left: 40rpx;
  215. font-size: 22rpx;
  216. margin-top: 4rpx;
  217. font-family: PingFangSC-Regular, PingFang SC;
  218. font-weight: 400;
  219. color: #62738e;
  220. .order_params {
  221. margin-bottom: 8rpx;
  222. // color: #999999;
  223. .right-txt {
  224. // font-size: 28rpx;
  225. // font-weight: 400;
  226. // color: #2D405E;
  227. margin-left: 30rpx;
  228. }
  229. .float_right {
  230. // color: #333333;
  231. }
  232. }
  233. .printing-btn {
  234. position: absolute;
  235. right: 30rpx;
  236. top: 50%;
  237. transform: translateY(-50%);
  238. text-align: center;
  239. .custom-icon-dayin {
  240. // font-size: 30rpx;
  241. }
  242. }
  243. .btn {
  244. display: flex;
  245. justify-content: center;
  246. margin-top: 30rpx;
  247. .btn_some {
  248. width: 200rpx;
  249. height: 70rpx;
  250. line-height: 70rpx;
  251. text-align: center;
  252. border-radius: 6rpx;
  253. }
  254. .btn_examine {
  255. border: 1px solid #2979ff;
  256. color: #2979ff;
  257. }
  258. .btn_order {
  259. border: 1px solid #999999;
  260. color: #999999;
  261. margin-left: 30rpx;
  262. }
  263. }
  264. }
  265. }
  266. }
  267. }
  268. // .log-scroll {
  269. // height: 100vh;
  270. // }
  271. // .order-ul {
  272. // .order-li {
  273. // padding: 20rpx 0;
  274. // padding-left: 80rpx;
  275. // position: relative;
  276. // border-bottom: 1px solid #eeeeee;
  277. // .icon {
  278. // position: absolute;
  279. // left: 20rpx;
  280. // top: 20rpx;
  281. // }
  282. // .customer {
  283. // padding-bottom: 10rpx;
  284. // .float_left {
  285. // font-size: 32rpx;
  286. // font-weight: bold;
  287. // }
  288. // }
  289. // .other {
  290. // font-size: 22rpx;
  291. // line-height: 40rpx;
  292. // .float_right {
  293. // font-size: 26rpx;
  294. // font-weight: bold;
  295. // color: $uni-color-error;
  296. // }
  297. // }
  298. // }
  299. // }
  300. </style>