绿满眶商城微信小程序-uniapp
xiangpei
2025-07-09 a1c289e7dfc5d9a3b8dc7ca9b05857f276c05f8d
pages/supplier/suppler-order/suppler-order.vue
@@ -106,6 +106,7 @@
                    shape="circle"
                    size="mini"
                    v-if="order.orderStatus==='UNDELIVERED'"
               @click="navigationToOrderDetail(order.sn)"
                    >发货</view
                  >
                  <!-- 等待收货 -->
@@ -134,6 +135,7 @@
<script>
import '@/components/uview-components/uview-ui';
import { getOrderXcxList, cancelOrder, confirmReceipt ,getOrderDetail} from "@/api/order.js";
import{supplierOrderList} from '@/api/supplier.js'
import { getClearReason } from "@/api/after-sale.js";
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
export default {
@@ -263,6 +265,9 @@
     * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
     * 替换onLoad下代码即可
     */
   if(!options.status){
      options.status = 0
   }
    let status = Number(options.status);
    this.status = status;
      
@@ -286,6 +291,11 @@
    },
  },
  methods: {
     navigationToOrderDetail(snNo){
        uni.navigateTo({
           url:`/pages/supplier/suppler-order/order-detail?order_sn=${snNo}`
        })
     },
    async selectPhone(sn){
    const orderInfo =   await getOrderDetail(sn)
    console.log('----------------->',orderInfo)
@@ -295,8 +305,15 @@
    this.userInfo.address = orderInfo.data.result.order.consigneeAddressPath
    
   uni.showModal({
      title:"用户联系电话",
      content:orderInfo.data.result.order.consigneeMobile
      title:orderInfo.data.result.order.consigneeName + '(先生/女士)',
      content:orderInfo.data.result.order.consigneeMobile,
      success(e) {
         if(e.confirm){
            uni.makePhoneCall({
               phoneNumber:orderInfo.data.result.order.consigneeMobile
            })
         }
      }
   })
     },
@@ -316,7 +333,7 @@
    loadData(index) {
      this.params.pageNumber = this.navList[index].pageNumber;
      // this.params.tag = this.orderStatus[index].orderStatus;
      getOrderXcxList(this.params).then((res) => {
      supplierOrderList(this.params).then((res) => {
        uni.stopPullDownRefresh();
        if (!res.data.success) {
          this.navList[index].loadStatus = "noMore";
@@ -367,83 +384,7 @@
        stateTipColor,
      };
    },
    /**
     * 选择取消原因
     */
    reasonChange(reason) {
      this.reason = reason;
    },
    /**
     * 提交取消订单(未付款)
     */
    submitCancel() {
      cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
        if (res.data.success) {
          uni.showToast({
            title: "订单已取消",
            duration: 2000,
            icon: "none",
          });
          this.initData(this.tabCurrentIndex);
          this.cancelShow = false;
        } else {
          uni.showToast({
            title: res.data.message,
            duration: 2000,
            icon: "none",
          });
          this.cancelShow = false;
        }
      });
    },
    /**
     * 确认收货显示
     */
    onRog(sn) {
      this.orderSn = sn;
      this.rogShow = true;
    },
    /**
     * 点击确认收货
     */
    confirmRog() {
      confirmReceipt(this.orderSn).then((res) => {
        if (res.data.code == 200) {
          uni.showToast({
            title: "已确认收货",
            duration: 2000,
            icon: "none",
          });
          this.initData(this.tabCurrentIndex);
          this.rogShow = false;
        }
      });
    },
    /**
     * 评价商品
     */
    onComment(sn) {
      uni.navigateTo({
        url: "./evaluate/myEvaluate",
      });
    },
    /**
     * 重新购买
     */
    reBuy(order) {
      console.log(order);
      return;
      uni.navigateTo({
        url:
          "/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId,
      });
    },
    /**
     * 查看物流
@@ -451,7 +392,7 @@
    navigateToLogistics(order) {
      uni.navigateTo({
        url:
          "/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
           `/pages/order/deliverDetail?order_sn=${order.sn}`,
      });
    },
  },