123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- <template>
- <view class="order-item">
- <view class="order-top">
- <view>
- <text class="bold-size">配送费:¥ {{orderInfo.cost}}</text>
- </view>
- <view>
- <text class="onBold-size">期望时间:{{orderInfo.time}} 前送达</text>
- </view>
- </view>
- <view class="order-content">
- <view class="order-info">
- <text class="store-name">{{orderInfo.merName}}</text>
- <view class="scroll-container">
- <view class="item" v-for="(item, index) in orderInfo.orderInfoList" :key="index">
- <image :src="item.image" />
- <text>{{item.productName}}x{{item.payNum}}</text>
- </view>
- </view>
- <view class="container2">
- <view style="border-right: 2rpx solid #D5D6DC">
- <image src="/static/img/ic-iphone1.png" class="image2" />
- <text style="margin: 0 19rpx 0 15rpx;">联系商家</text>
- </view>
- <view>
- <text>客户姓名:{{orderInfo.name}}</text>
- </view>
- <view>
- <image src="/static/img/phone.png" class="image2" />
- <text style="margin-left: 15rpx">联系客户</text>
- </view>
- </view>
- </view>
- <view class="bold-size flex-y-center" style="margin: 19rpx 0;">
- <view class="icon-info"></view>
- <text>配送详情</text>
- </view>
- <view style="padding-bottom: 39rpx;position: relative;" id="myLineRef">
- <view class="line"></view>
- <view class="box-item">
- <view class="bold-size">
- <text class="order-icon">取</text>{{orderInfo.merName}}
- </view>
- <!-- <view class="order-dis">{{orderInfo.shopDistance}} m</view> -->
- </view>
- <text class="onBold-size"><text class="order-icon" style="opacity: 0">取</text>{{orderInfo.merAddress}}</text>
- </view>
- <view>
- <view class="box-item">
- <view class="bold-size">
- <text class="order-icon">送</text>{{orderInfo.userAddress}}
- </view>
- <!-- <view class="order-dis">{{orderInfo.userDistance}} m</view> -->
- </view>
- <text class="onBold-size"><text class="order-icon" style="opacity: 0">送</text>备注:{{orderInfo.userRemarks}}</text>
- </view>
- </view>
- <view class="order-bottom" v-if="isButton">
- <view class="bottom-but">
- <button class="sub" @tap="formSubmit">接单</button>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- orderInfo: {
- type: Object,
- default: {}
- },
- isButton: {
- type: Boolean,
- default: true
- }
- },
- data() {
- return {
- lineHeight: 0,
- }
- },
- mounted() {
- const that = this;
- this.$nextTick(() => {
- const query = uni.createSelectorQuery().in(this);
- query.select('#myLineRef').boundingClientRect(data => {
- that.lineHeight = data.height;
- }).exec();
- });
- },
- methods: {
- formSubmit() {
- this.$emit('orderCilck', this.orderInfo.id);
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .order-item {
- background-color: #fff;
- border-radius: 23rpx;
- padding: 19rpx 38rpx;
- }
- .order-top {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-bottom: 10rpx;
- border-bottom: 2rpx dashed #D6D7DC;
- }
- .bold-size {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-weight: 500;
- font-size: 27rpx;
- color: #141414;
- }
- .onBold-size {
- font-weight: 400;
- font-size: 23rpx;
- color: #999999;
- }
- .order-content {
- padding: 45rpx 0;
- .box-item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 10rpx;
- }
- .order-info {
- width: 100%;
- background: #F8F9FB;
- padding: 19rpx 38rpx 45rpx 19rpx;
- .store-name {
- font-weight: 600;
- font-size: 27rpx;
- color: #141414;
- }
- .scroll-container {
- display: flex;
- flex-wrap: nowrap;
- margin: 20rpx 0;
- overflow-x: auto;
- /* 允许水平滚动 */
- white-space: nowrap;
- /* 防止项目换行 */
- -webkit-overflow-scrolling: touch;
- /* 在iOS上平滑滚动 */
- .item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- margin-right: 19rpx;
- image {
- width: 115rpx;
- height: 115rpx;
- }
- text {
- font-weight: 400;
- font-size: 21rpx;
- color: #141414;
- margin-top: 9rpx;
- }
- }
- }
- .container2 {
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-weight: 500;
- font-size: 21rpx;
- color: #141414;
- view {
- display: flex;
- align-items: center;
- }
- .image2 {
- width: 42rpx;
- height: 42rpx;
- }
- }
- }
- }
- .order-dis {
- font-weight: 400;
- font-size: 23rpx;
- color: #141414;
- }
- .order-icon {
- display: inline-block;
- margin-left: 10rpx;
- margin-right: 20rpx;
- padding: 5rpx 10rpx;
- font-weight: 400;
- font-size: 23rpx;
- color: #FFFFFF;
- border-radius: 50%;
- background-color: $bg-color-primary;
- }
- .order-bottom {
- border-top: 2rpx dashed #D6D7DC;
- .bottom-but {
- padding: 39rpx 67rpx;
- .sub {
- width: 100%;
- background-color: $bg-color-primary;
- font-weight: 500;
- font-size: 31rpx;
- color: #FFFFFF;
- padding: 17rpx 0;
- }
- }
- }
- .icon-info {
- width: 8rpx;
- height: 31rpx;
- background: $bg-color-primary;
- margin-right: 15rpx;
- }
-
- .line {
- position: absolute;
- width: 2rpx;
- height: 100%;
- border-left: 2rpx dashed $bg-color-primary;
- }
- </style>
|