xuxy
2024-07-27 c9ae65fcfe5e33cba60957506a62446507fad808
update花店端功能
已修改2个文件
148 ■■■■■ 文件已修改
pages/order/order-detail.vue 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/order.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/order-detail.vue
@@ -13,11 +13,13 @@
      // #endif
    };
  },
  onLoad(options) {
        async onLoad(options) {
            console.log('options', options)
    this.id = options.id || ''
    if (this.id) {
      this.getDetail()
                await this.getDetail()
      this.getItemList()
    }
  },
@@ -34,29 +36,44 @@
    },
    async getDetail() {
      this.$message.showLoading()
      const {code, data} = this.$http.request('get', `/api/${type}/order/list/view```, {
                const {
                    code,
                    data
                } = await this.$http.request('get', `/api/${this.type}/order/list/view`, {
        params: {
          id: this.id
        }
      })
      this.$message.hideLoading()
      if (code === 0 && data) {
                console.log('getDetail', data)
                if (code === 0) {
        this.dto = {
          ...this.dto,
          ...data
        }
      }
    },
            async callTel() {
                await this.$message.confirm('是否拨打客服电话')
                uni.makePhoneCall({
                    phoneNumber: '15974805814'
                });
            },
    async getItemList() {
      this.$message.showLoading()
      const {code, data} = this.$http.request('get', `/api/${type}/order/item/list`, {
                const {
                    code,
                    data
                } = await this.$http.request('get', `/api/${this.type}/order/item/list`, {
        params: {
          id: this.id
        }
      })
      this.$message.hideLoading()
      if (code === 0 && data) {
                console.log('getItemList', data)
                if (code === 0) {
        this.list = data || []
                    console.log('data', this.list)
      }
    },
    async buttonClick(buttontype) {
@@ -65,7 +82,9 @@
          await this.$message.confirm('是否确定申请退款')
          // 发送请求
          this.$message.showLoading()
          const {code} = await this.$http.request('post', '/api/customer/order/refund', {
                        const {
                            code
                        } = await this.$http.request('post', '/api/customer/order/refund', {
            data: {
              id: this.id,
              evaluate: res.content
@@ -81,7 +100,9 @@
          await this.$message.confirm('是否确定收货')
          // 发送请求
          this.$message.showLoading()
          const {code} = await this.$http.request('get', '/api/customer/order/receive/confirm', {
                        const {
                            code
                        } = await this.$http.request('get', '/api/customer/order/receive/confirm', {
            params: {
              id: this.id,
            }
@@ -97,7 +118,10 @@
          await this.$message.confirm('是否确定重新')
          // 发送请求
          this.$message.showLoading()
          const {code, data} = await this.$http.request('get', '/api/customer/order/payAgain', {
                        const {
                            code,
                            data
                        } = await this.$http.request('get', '/api/customer/order/payAgain', {
            params: {
              id: this.id,
            }
@@ -132,7 +156,9 @@
          if (res.content && res.confirm) {
            // 发送请求
            this.$message.showLoading()
            const {code} = await this.$http.request('post', '/api/customer/order/evaluate', {
                            const {
                                code
                            } = await this.$http.request('post', '/api/customer/order/evaluate', {
              data: {
                id: this.id,
                evaluate: res.content
@@ -145,6 +171,9 @@
          }
        }
          break
                    case 'couldRefund': {
                    }
        default:
          break
      }
@@ -155,8 +184,8 @@
<template>
  <view class="order-detail-page">
    <view class="top-tip flex m-b-20">
      <image src="//static/common/icon-order-status-SEND.png" class="icon-car m-r-6 img100"></image>
        <view class="top-tip flex ">
            <image src="/static/common/icon-order-status-SEND.png" class="icon-car m-r-6 img100"></image>
      <view>
        <view>{{
            dto.status === 'SEND' && '商家已发货,正在通知顺丰小件取货'
@@ -165,12 +194,12 @@
            || ('订单' + dto.statusStr)
          }}
        </view>
        <!--        <view>{{dto.paymentTime}}</view>-->
                <view class="desc-gray">支付时间:{{dto.paymentTime}}</view>
      </view>
    </view>
    <view class="m-b-20 address-container">
        <view class="address-container bg-white br-4 m-t-12">
      <view class="flex">
        <view class="icon-loc">
                <view class="icon-loc m-r-10">
          <image src="/static/common/icon-loc.png" class="image"></image>
        </view>
        <view class="info">
@@ -182,20 +211,18 @@
        </view>
      </view>
    </view>
    <view class="flower-info m-b-20" v-for="(item,index) of list"
          :key="index">
        <view class="flower-info m-b-20 m-t-12 br-4" v-for="(item,index) of list" :key="index">
      <view class="supplier-name">
        <image class="icon-dp" src="/static/common/icon-dp.png"></image>
        {{ item.supplierName }}
      </view>
      <view class="flex">
        <image class="flower-img img100 m-r-6"
               :src="item.flowerCover" @click="previewImg(item.flowerCover)">
            <view class="flex m-t-12">
                <image class="flower-img img100 m-r-6" :src="item.flowerCover" @click="previewImg(item.flowerCover)">
        </image>
        <view class="flex1">
          <view class=" flex">
            <view class="title">{{ item.flowerName }}<span class="level">{{ item.flowerLevelStr }}</span></view>
                        <view class="title"><span class="level">{{ item.flowerCategory }}</span><span class="level">{{ item.flowerLevelStr }}</span>{{ item.flowerName }}
                        </view>
            <!--            <view class="m-l-a m-r-0">-->
            <!--              {{item.flowerCategory || '-'}}-->
            <!--            </view>-->
@@ -229,12 +256,11 @@
      </view>
    </view>
    <view class="info-container">
        <view class="info-container bg-white br-4">
      <view class="form-item">
        <view class="label">订单编号:</view>
        <view class="value">{{ dto.orderNo || '-' }}</view>
        <view class="button m-l-a m-r-0"
              @click="copyTxt(dto.orderNo)">复制
                <view class="button m-l-a m-r-0" @click="copyTxt(dto.orderNo)">复制
        </view>
      </view>
      <view class="form-item">
@@ -284,7 +310,7 @@
        <view class="value">{{ dto.remarks || '-' }}</view>
      </view>
    </view>
    <view class="info-container">
        <view class="info-container bg-white br-4 m-t-12">
      <view class="form-item">
        <view class="label">订单金额:</view>
        <view class="value">{{ dto.totalAmount || '-' }}</view>
@@ -304,39 +330,44 @@
    </view>
    <view class="info-container">
      <view>
        <image src="/static/common/icon-kf.png" class="icon-kf m-l-15 img100"></image>
        <view class="info-container bg-white br-4 m-t-12">
            <view class="icon-view">
                <image src="/static/common/icon-kf.png" class="icon-kf m-r-10 img100 icon"></image>
        我的客服
      </view>
      <view class="flex">
        <view class="flex1 w-fit m-auto">
          <image src="/static/common/icon-call.png" class="icon-call  img100"></image>
            <view class="flex m-t-12">
                <view class="flex1 w-fit m-auto icon-view" @click.stop="callTel">
                    <image src="/static/common/icon-call.png" class="icon icon-call m-r-10  img100"></image>
          15974805814
        </view>
        <view class="flex1 w-fit m-auto">
          <image src="/static/common/icon-wx.png" class="icon-call  img100"></image>
                <view class="flex1 w-fit m-auto icon-view" open-type="contact">
                    <image src="/static/common/icon-wx.png" class="icon icon-call  m-r-10 img100"></image>
          在线客服
        </view>
      </view>
    </view>
        <!-- #ifdef PUB_CUSTOMER -->
    <view class="button-space"></view>
    <view class="buttons-bottom flex">
      <view class="button button-1"
            @click="buttonClick('refund')" v-if="dto.status ==='CANCEL'">申请退款
            <view class="button button-1" @click="buttonClick('refund')" v-if="dto.couldRefund">申请退款
      </view>
      <view class="button button-1" @click="buttonClick('confirm')"
            v-if="dto.status ==='RECEIVE'"> 确认收货
            <view class="button button-1" @click="buttonClick('confirm')" v-if="dto.status ==='RECEIVE'"> 确认收货
      </view>
      <view class="button button-1" @click="buttonClick('payAgain')"
            v-if=" dto.status === 'PENDING'"> 重新支付
            <view class="button button-1" @click="buttonClick('payAgain')" v-if=" dto.status === 'PENDING'"> 重新支付
      </view>
      <view class="button button-1" @click="buttonClick('evaluate')"
            v-if=" dto.status === 'EVALUATE'"> 评价
            <view class="button button-1" @click="buttonClick('evaluate')" v-if=" dto.status === 'EVALUATE'"> 评价
      </view>
            <view class="button button-1" @click="buttonClick('evaluate')" v-if=" dto.status === 'EVALUATE'"> 评价
            </view>
            <!--       <view class="button button-1" @click="buttonClick('couldRefund')"
            v-if="dto.couldRefund"> 退款
      </view> -->
    </view>
        <!-- #endif -->
    <!--
      <view class="button button-1" @click = "buttonClick('payAgain')" > 查询退款 < /view>-->
@@ -363,6 +394,15 @@
      height: 32rpx;
    }
            .icon-view {
                line-height: 40rpx;
                .icon {
                    display: inline-block;
                    vertical-align: middle;
                }
            }
    .buttons-bottom {
      position: fixed;
      left: 0;
@@ -380,9 +420,7 @@
        line-height: 76rpx;
      }
      .button-1 {
      }
                .button-1 {}
    }
  }
@@ -393,15 +431,16 @@
      font-weight: 400;
      font-size: 28rpx;
      color: #666666;
      line-height: 40rpx;
                line-height: 60rpx;
      display: flex;
      .label {
        min-height: 140rpx;
                    min-width: 140rpx;
                    margin-right: 20rpx;
      }
      .value {
                    word-break: break-all;
      }
    }
@@ -468,7 +507,15 @@
      font-weight: 600;
      font-size: 28rpx;
      color: #000000;
                padding-bottom: 10rpx;
      line-height: 40rpx;
                .icon-dp {
                    width: 27rpx;
                    height: 27rpx;
                    display: inline-block;
                    vertical-align: middle;
                }
    }
    .title {
@@ -482,7 +529,7 @@
        font-size: 28rpx;
        color: #20613D;
        line-height: 40rpx;
        margin-left: 20rpx;
                    margin-right: 20rpx;
      }
    }
pages/order/order.vue
@@ -34,8 +34,9 @@
  methods: {
    toDetail(item) {
      //  订单详情页面
      console.log(' toDetail item',item)
      uni.navigateTo({
        url: 'pages/order/order-detail?id=' + item.id
        url: '/pages/order/order-detail?id=' + item.id
      })
    },
  },