123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- <template>
- <view class="rigth-view">
- <scroll-view scroll-y class="order_ul" @scrolltolower="scrollTolowerHandel">
- <view class="order_li" v-for="(item, index) in order_list" :key="index" @click="goPage(`/pages/order/orderInfo?userCenterId=${item.userCenterId}&id=${item.id}`)">
- <view class="order_time clearfix">
- <view class="float_left">
- <view class="tag-circleRight">
- <image v-if="item.orderMsg === '待审核'" src="../../../static/img/ic-audit.png" class="img"></image>
- <image v-else-if="item.orderMsg === '已关闭'" src="../../../static/img/ic-Closed.png" class="img"></image>
- <image v-else-if="item.orderMsg === '已出库'" src="../../../static/img/ic-stock.png" class="img"></image>
- <image v-else-if="item.orderMsg === '已完成'" src="../../../static/img/ic-Completed.png" class="img"></image>
- <image v-else-if="item.orderMsg === '待出库'" src="../../../static/img/ic-delivered.png" class="img"></image>
- <image v-else src="../../../static/img/ic-delivered.png" class="img"></image>
- </view>
- </view>
- <view class="float_left text ellipsis">{{ item.shopName }}</view>
- <viwe class="float_right time">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</viwe>
- </view>
- <view class="order_bottom">
- <view class="order_params">
- 订单编号
- <text class="right-txt">{{ item.no }}</text>
- </view>
- <view class="order_params clearfix">
- <text class="float_left">
- 订单来源
- <text class="right-txt">{{ item.sourceMsg }}</text>
- </text>
- </view>
- <view class="order_params clearfix">
- <text class="float_left">
- 业务员
- <text class="right-txt">{{ item.salesManName || '未分配' }}</text>
- </text>
- <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>
- </view>
- </view>
- </view>
- <u-loadmore v-if="order_list.length" :status="load_status" />
- </scroll-view>
- </view>
- </template>
- <script>
- export default {
- props: {
- userCenterId: {
- type: [Number, String],
- default: ''
- }
- },
- data() {
- return {
- order_list: [],
- page: 1,
- pageSize: 10,
- total: 0,
- load_status: 'nomore'
- };
- },
- created() {
- this.getAllOrder();
- },
- methods: {
- scrollTolowerHandel() {
- if (this.total / this.pageSize > this.page) {
- this.page += 1;
- this.getAllOrder();
- }
- },
- // 订单列表
- getAllOrder() {
- this.load_status = 'loading';
- let params = {
- page: this.page,
- pageSize: this.pageSize,
- search: {
- userCenterId: this.userCenterId
- }
- };
- this.$u.api.getAllOrder(params).then(res => {
- if (this.page === 1) {
- this.order_list = res.data;
- } else {
- this.order_list = this.order_list.concat(res.data);
- }
- this.order_list = this.order_list.map(item => {
- return {
- ...item,
- goods_list: item.goods_list || []
- };
- });
- this.load_status = this.$utils.loadStatus(this.page, this.pageSize, res.pageTotal);
- this.total = res.pageTotal;
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .rigth-view {
- background-color: rgb(247, 248, 250);
- .order_ul {
- width: 100%;
- height: calc(90vh - 226rpx);
- .order_li {
- margin: 24rpx 20rpx 0;
- padding: 0 24rpx 30rpx;
- background-color: #ffffff;
- // padding-top: 16rpx;
- border-radius: 14rpx;
- .money-text {
- color: $uni-color-error;
- margin: 0 4rpx;
- font-size: 28rpx;
- font-weight: 500;
- margin-left: 30rpx;
- }
- .order_time {
- // background-color: #f7f8fa;
- height: 80rpx;
- line-height: 80rpx;
- .img {
- width: 126rpx;
- height: 40rpx;
- // margin-left: 24rpx;
- vertical-align: middle;
- }
- // .txt {
- // font-size: 28rpx;
- // font-weight: 500;
- // // margin-left: 110rpx;
- // // vertical-align: middle;
- // }
- // .custom-icon-jinru {
- // font-size: 28rpx;
- // margin-left: 10rpx;
- // }
- .tag-circleRight {
- // line-height: 40rpx;
- height: 40rpx;
- // background-color: $uni-color-primary;
- // color: #ffffff;
- // font-size: 24rpx;
- // display: inline-block;
- width: 126rpx;
- // text-align: center;
- // border-radius: 0 100rpx 100rpx 0;
- // text {
- // font-size: 28rpx;
- // font-weight: bold;
- // margin-left: 4rpx;
- // }
- }
- .text {
- font-size: 30rpx;
- color: #2d405e;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- margin-left: 24rpx;
- margin-top: 4rpx;
- width: 180rpx;
- }
- .time {
- font-size: 24rpx;
- color: #b8c0c8;
- font-family: DINPro-Regular;
- font-weight: 400;
- margin-top: 4rpx;
- }
- }
- .order_info {
- padding: 30rpx;
- font-size: 24rpx;
- border-bottom: 1px solid #f7f8fa;
- }
- .remarks {
- background-color: #f1f1f1;
- padding: 0 30rpx;
- height: 60rpx;
- line-height: 60rpx;
- }
- .order_tip {
- margin-left: 0rpx;
- color: #333333;
- height: 89rpx;
- vertical-align: middle;
- padding: 25rpx 40rpx;
- font-size: 28rpx;
- font-weight: 400;
- background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 195, 149, 0.1) 100%);
- .txst {
- font-size: 28rpx;
- font-weight: 500;
- color: #2d405e;
- }
- }
- .order_pip {
- margin-left: 0rpx;
- color: #333333;
- height: 89rpx;
- vertical-align: middle;
- padding: 25rpx 40rpx;
- font-size: 28rpx;
- font-weight: 400;
- background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(246, 119, 120, 0.1) 100%);
- .txst {
- font-size: 28rpx;
- font-weight: 500;
- color: #2d405e;
- }
- }
- .order_bottom {
- // padding: 30rpx;
- // margin-left: 40rpx;
- font-size: 22rpx;
- margin-top: 4rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #62738e;
- .order_params {
- margin-bottom: 8rpx;
- // color: #999999;
- .right-txt {
- // font-size: 28rpx;
- // font-weight: 400;
- // color: #2D405E;
- margin-left: 30rpx;
- }
- .float_right {
- // color: #333333;
- }
- }
- .printing-btn {
- position: absolute;
- right: 30rpx;
- top: 50%;
- transform: translateY(-50%);
- text-align: center;
- .custom-icon-dayin {
- // font-size: 30rpx;
- }
- }
- .btn {
- display: flex;
- justify-content: center;
- margin-top: 30rpx;
- .btn_some {
- width: 200rpx;
- height: 70rpx;
- line-height: 70rpx;
- text-align: center;
- border-radius: 6rpx;
- }
- .btn_examine {
- border: 1px solid #2979ff;
- color: #2979ff;
- }
- .btn_order {
- border: 1px solid #999999;
- color: #999999;
- margin-left: 30rpx;
- }
- }
- }
- }
- }
- }
- // .log-scroll {
- // height: 100vh;
- // }
- // .order-ul {
- // .order-li {
- // padding: 20rpx 0;
- // padding-left: 80rpx;
- // position: relative;
- // border-bottom: 1px solid #eeeeee;
- // .icon {
- // position: absolute;
- // left: 20rpx;
- // top: 20rpx;
- // }
- // .customer {
- // padding-bottom: 10rpx;
- // .float_left {
- // font-size: 32rpx;
- // font-weight: bold;
- // }
- // }
- // .other {
- // font-size: 22rpx;
- // line-height: 40rpx;
- // .float_right {
- // font-size: 26rpx;
- // font-weight: bold;
- // color: $uni-color-error;
- // }
- // }
- // }
- // }
- </style>
|