|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <!-- 订单详情-确认收货 -->
- <template>
- <navBar title="确认收货" :scrollTop="scrollTop"></navBar>
- <view class="bg-img">
- <image :src="`${$imgUrl}order/bg-order.png`" mode="scaleToFill" class="icon"></image>
- </view>
- <view class="content">
- <view class="status">
- <text>待收货</text>
- </view>
- <view>
- <text>创建时间:</text>
- <text>{{getOrderTime(state.orderInfo.insertTime)}}</text>
- </view>
- <view class="order">
- <view class="num">
- <text>订单号:</text>
- <text>{{state.orderInfo.orderNo}}</text>
- </view>
- <view class="name">
- <text>产品名称:</text>
- <text>{{state.orderInfo.productName ?state.orderInfo.productName: ''}}</text>
- </view>
- </view>
-
- <view class="message" v-if="state.orderInfo.cardId">
- <view class="message-top1">
- <view class="msg">
- <view class="vehiclePlate">
- <text>订单车牌:</text>
- <text>{{state.orderInfo.vehiclePlate}}</text>
- </view>
- <view>
- <text>发货卡号:</text>
- <text>{{state.orderInfo.cardId ?state.orderInfo.cardId: ''}}</text>
- </view>
- <view >
- <text>发货签号:</text>
- <text>{{state.orderInfo.obuId ?state.orderInfo.obuId: ''}}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="btn-wrap">
- <view class="hint">请核对实收货物与上述货物编号是否一致!</view>
- <submit-button title="确认收货" @submit="$util.confirm('是否确认收到货?', confirmReceipt, '收货确认')"></submit-button>
- </view>
- </template>
-
- <script setup lang="ts">
- // import orderInfoItem from "./components/order-info-item";
- import navBar from "@/components/nav-bar/nav-barNew.vue";
- import { reactive,ref } from "vue";
- import { onLoad,onPageScroll } from "@dcloudio/uni-app";
- import {requestNew } from "@/utils/network/request.js";
- import {confirm,getOrderTime } from "@/utils/utils";
- import {orderReceiveGoods,orderDetailQuery } from "@/utils/network/api";
- import { getItem, StorageKeys } from "@/utils/storage";
- const scrollTop = ref(0); //滚动距离
- //监听页面滚动
- onPageScroll((e) => {
- scrollTop.value = e.scrollTop;
- });
- const state = reactive({
- //订单信息
- orderInfo: {} as any,
- });
-
- //确认收货
- const confirmReceipt = (e) => {
- const options = {
- type: 2,
- data: {
- opId: getItem(StorageKeys.OpenId),
- orderId:state.orderInfo.orderNo
- },
- method: "POST",
- showLoading: true,
- };
- requestNew(orderReceiveGoods, options).then((res) => {
- confirm(
- "您已完成订单收货",
- () => {
- uni.$emit("refreshOrder");
- uni.navigateBack();
- },
- "收货完成",
- false
- );
- });
- }
- //确认收货
- const confirmReceiptClick = (e) => {
- navTo("/pages/bluetooth/bluetooth?routeType=5&id=" + state.orderInfo.id); //去连接蓝牙
- };
-
- //获取订单详情
- const getOrderDetails = (id) => {
- const options = {
- type: 2,
- data: { id: id },
- method: "POST",
- showLoading: true,
- };
- requestNew(orderDetailQuery, options).then((res) => {
- console.log("获取订单详情",res)
- state.orderInfo =res.data;
- });
- };
-
- onLoad((options) => {
- getOrderDetails(options.id);
- });
- </script>
-
- <style>
- page {
- background: #E9EDF0;
- padding-bottom: 30rpx;
- font-size: 28rpx;
- }
- </style>
- <style lang="scss" scoped>
- .hint {
- font-size: 28rpx;
- color: #CCB375;
- text-align: center;
- }
-
- .btn {
- margin: 500rpx 40rpx 50rpx;
- }
- .bg-img {
- width: 100%;
- position: absolute;
- z-index: 0;
-
- .icon {
- width: 100%;
- height: 534rpx;
- }
- }
- .content {
- position: relative;
- color: white;
- padding:0 30rpx ;
- padding-top: 200rpx;
- }
- .status>text{
- font-weight: bold;
- font-size: 40rpx;
- line-height: 82rpx;
- }
- .order{
- height: 136rpx;
- background:linear-gradient(to bottom,rgb(188, 195, 205),#ffffff);;
- border-radius: 12rpx 12rpx 12rpx 12rpx;
- border: 1rpx solid #FFFFFF;
- color: black;
- font-weight: 400;
- font-size: 30rpx;
- margin-top: 80rpx;
- padding: 20rpx;
- box-sizing: border-box;
- }
- .order>.num{
- color: #111111;
- }
- .order>.name{
- color: #666666;
- margin-top: 10rpx;
- }
- .message{
- background: white;
- border-radius: 12rpx 12rpx 12rpx 12rpx;
- border: 1rpx solid #FFFFFF;
- color: #666666;
- margin-top: 30rpx;
- padding: 20rpx 20rpx 0 20rpx;
- }
- .message-top1{
- display: flex;
- padding-bottom: 20rpx;
- align-items: center;
- }
- .message-top1>.msg>view{
- line-height: 50rpx;
- }
- .message-top{
- display: flex;
- border-bottom: 2rpx solid #E6E9EB;
- padding-bottom: 20rpx;
- }
- .vehiclePlate{
- font-weight: 400;
- font-size: 30rpx;
- color: #111111;
- }
- .btn-wrap{
- position: fixed;
- bottom: 0;
- left: 0;
- background-color: white;
- width: 100%;
- border-radius: 30rpx 30rpx 0rpx 0rpx;
- padding: 0 50rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- box-sizing: border-box;
- height: 188rpx;
- }
- </style>
|