123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <template>
- <view class="card_order_management">
- <view class="card_order" v-for="(item,index) in datalist" :key="index" v-if="datalist.length > 0">
- <view style="padding: 30rpx 20rpx">
- <view @click="goDetails(item)">
- <view class="space_between">
- <view class="item_headline" v-if="item.goods && item.spec">{{item.goods.name}}{{item.spec.name}}
- </view>
- <view v-if="item.state == 5 || item.state == 6">
- <view class="item_tag" v-if="item.customer.isSyncProv">
- <u-tag text="已完善" plain size="mini" type="success"></u-tag>
- </view>
- <view class="item_tag" v-else>
- <u-tag text="补全客户信息" plain size="mini" @click="goCompletionTasks(item)"></u-tag>
- </view>
- </view>
- <view v-if="item.state == 3 || item.state == 4">
- <view class="details_title" style="color: #5ac725;" v-if="item.state == 3">已送达</view>
- <view class="details_title" style="color: #f56c6c;" v-else-if="item.state == 4">已取消</view>
- </view>
- <view v-if="item.state == 1 || item.state == 2">
- <view class="details_title" style="color: #3c9cff;">待配送</view>
- </view>
- </view>
- <view class="item_num">×{{item.quantity}}</view>
- <view class="item_address">配送地址:{{item.address}}</view>
- <view class="item_address" v-if="item.state == 5 || item.state == 6">联系电话:{{item.phone}}
- <u-icon color="#70B603" size="26" name="phone-fill"
- @click.native.stop="phone(item.phone)"></u-icon>
- </view>
- <view class="item_address">下单时间:{{item.orderTime}}</view>
- <view class="item_address" v-if="item.state == 3">送达时间:{{item.arriveTime}}</view>
- </view>
- <view v-if="item.state == 2">
- <u-button type="success" @click="toDeliver(item)">去配送</u-button>
- </view>
- <view class="card_delivery" v-if="item.state == 5">
- <view style="flex: 1;">
- <u-button type="warning" @click="goSecurityCheck(item)">入户安全检查</u-button>
- </view>
- </view>
- <view class="card_delivery" v-if="item.state == 6">
- <view style="flex: 1;">
- <u-button type="primary" @click="confirmedDelivery(item)">确认送达</u-button>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- datalist: {
- type: Array,
- default: []
- }
- },
- data() {
- return {}
- },
- methods: {
- goDetails(value) {
- uni.setStorageSync('detailsData', value);
- uni.navigateTo({
- url: '/pages/order/orderDetails'
- });
- },
- // 入户安全检查
- goSecurityCheck(row) {
- uni.navigateTo({
- url: '/pages/order/securityCheck?orderId=' + row.orderId + '&customerId=' + row.customerId
- });
- },
- // 确认送达
- confirmedDelivery(row) {
- if (row.customer.isSyncProv) {
- uni.navigateTo({
- url: '/pages/order/delivery?id=' + '99' + '&title=' + '确定送达' + '&orderId=' + row.id
- });
- } else {
- uni.$u.toast('请先完善客户信息')
- }
- },
- // 补全用户信息
- goCompletionTasks(row) {
- uni.navigateTo({
- url: '/pages/order/completionTasks?customerId=' + row.customerId
- });
- },
- // 去配送
- toDeliver(row) {
- this.$emit('toDeliver', row)
- },
- phone(phone) {
- uni.makePhoneCall({
- phoneNumber: phone,
- success: () => {
- console.log('拨打电话成功!');
- },
- fail: () => {
- console.error('拨打电话失败!');
- }
- });
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .card_order_management {
- margin: 0rpx 20rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .card_order {
- width: 100%;
- margin-top: 20rpx;
- border: 1rpx solid #d7d7d7;
- border-radius: 8rpx;
- }
- .frame {
- position: relative;
- }
- .frame::after {
- content: '';
- position: absolute;
- display: block;
- bottom: 0;
- pointer-events: none;
- // z-index: -1;
- width: 200%;
- height: 200%;
- border: 2rpx solid rgba(215, 215, 215, 1);
- border-radius: 16rpx;
- transform: scale(0.5);
- transform-origin: left bottom;
- }
- .item_headline {
- font-size: 34rpx;
- font-weight: 800;
- }
- .item_num {
- margin: 20rpx 0rpx;
- font-size: 26rpx;
- }
- .details_title {
- font-size: 26rpx;
- font-weight: 500;
- }
- .item_address {
- display: flex;
- align-items: center;
- font-size: 26rpx;
- color: #7f7f7f;
- margin-bottom: 16rpx;
- }
- .card_delivery {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- </style>
|