You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

order-confirm-receipt.vue 4.5KB

10 mesi fa
9 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
9 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!-- 订单详情-确认收货 -->
  2. <template>
  3. <navBar title="确认收货" navbgClass="nav-bgXin" fontColor='#fff' :scrollTop="scrollTop"></navBar>
  4. <view class="bg-img">
  5. <image :src="`${$imgUrl}order/bg-order.png`" mode="scaleToFill" class="icon"></image>
  6. </view>
  7. <view class="content">
  8. <view class="status">
  9. <text>待收货</text>
  10. </view>
  11. <view>
  12. <text>创建时间:</text>
  13. <text>{{getOrderTime(state.orderInfo.insertTime)}}</text>
  14. </view>
  15. <view class="order">
  16. <view class="num">
  17. <text>订单号:</text>
  18. <text>{{state.orderInfo.orderNo}}</text>
  19. </view>
  20. <view class="name">
  21. <text>产品名称:</text>
  22. <text>{{state.orderInfo.productName ?state.orderInfo.productName: ''}}</text>
  23. </view>
  24. </view>
  25. <view class="message" v-if="state.orderInfo.cardId">
  26. <view class="message-top1">
  27. <view class="msg">
  28. <view class="vehiclePlate">
  29. <text>订单车牌:</text>
  30. <text>{{state.orderInfo.vehiclePlate}}</text>
  31. </view>
  32. <view>
  33. <text>发货卡号:</text>
  34. <text>{{state.orderInfo.cardId ?state.orderInfo.cardId: ''}}</text>
  35. </view>
  36. <view >
  37. <text>发货签号:</text>
  38. <text>{{state.orderInfo.obuId ?state.orderInfo.obuId: ''}}</text>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="btn-wrap">
  45. <view class="hint">请核对实收货物与上述货物编号是否一致!</view>
  46. <submit-button title="确认收货" @submit="$util.confirm('是否确认收到货?', confirmReceipt, '收货确认')"></submit-button>
  47. </view>
  48. </template>
  49. <script setup lang="ts">
  50. import navBar from "@/components/nav-bar/nav-bar2.vue";
  51. import { reactive,ref } from "vue";
  52. import { onLoad,onPageScroll } from "@dcloudio/uni-app";
  53. import {requestNew } from "@/utils/network/request.js";
  54. import {confirm,getOrderTime } from "@/utils/utils";
  55. import {orderReceiveGoodsSH,changeCardObuView } from "@/utils/network/api";
  56. const scrollTop = ref(0); //滚动距离
  57. //监听页面滚动
  58. onPageScroll((e) => {
  59. scrollTop.value = e.scrollTop;
  60. });
  61. const state = reactive({
  62. //订单信息
  63. orderInfo: {} as any,
  64. //显示订单信息
  65. });
  66. //确认收货
  67. const confirmReceipt = (e) => {
  68. const options = {
  69. type: 2,
  70. data: {
  71. id:state.orderInfo.id
  72. },
  73. method: "POST",
  74. showLoading: true,
  75. };
  76. requestNew(orderReceiveGoodsSH, options).then((res) => {
  77. confirm(
  78. "您已完成订单收货",
  79. () => {
  80. uni.$emit("refreshOrder");
  81. uni.navigateBack({
  82. delta:2
  83. });
  84. },
  85. "收货完成",
  86. false
  87. );
  88. });
  89. }
  90. //获取订单详情
  91. const getOrderDetails = (id) => {
  92. const options = {
  93. type: 2,
  94. data: { id: id },
  95. method: "POST",
  96. showLoading: true,
  97. };
  98. requestNew(changeCardObuView, options).then((res) => {
  99. console.log("获取订单详情",res)
  100. state.orderInfo =res;
  101. });
  102. };
  103. onLoad((options) => {
  104. getOrderDetails(options.id);
  105. });
  106. </script>
  107. <style>
  108. page {
  109. background: #E9EDF0;
  110. padding-bottom: 30rpx;
  111. font-size: 28rpx;
  112. }
  113. </style>
  114. <style lang="scss" scoped>
  115. .hint {
  116. font-size: 28rpx;
  117. color: #CCB375;
  118. text-align: center;
  119. }
  120. .btn {
  121. margin: 500rpx 40rpx 50rpx;
  122. }
  123. .bg-img {
  124. width: 100%;
  125. position: absolute;
  126. z-index: 0;
  127. .icon {
  128. width: 100%;
  129. height: 534rpx;
  130. }
  131. }
  132. .content {
  133. position: relative;
  134. color: white;
  135. padding:0 30rpx ;
  136. padding-top: 200rpx;
  137. }
  138. .status>text{
  139. font-weight: bold;
  140. font-size: 40rpx;
  141. line-height: 82rpx;
  142. }
  143. .order{
  144. height: 136rpx;
  145. background:linear-gradient(to bottom,rgb(188, 195, 205),#ffffff);;
  146. border-radius: 12rpx 12rpx 12rpx 12rpx;
  147. border: 1rpx solid #FFFFFF;
  148. color: black;
  149. font-weight: 400;
  150. font-size: 30rpx;
  151. margin-top: 80rpx;
  152. padding: 20rpx;
  153. box-sizing: border-box;
  154. }
  155. .order>.num{
  156. color: #111111;
  157. }
  158. .order>.name{
  159. color: #666666;
  160. margin-top: 10rpx;
  161. }
  162. .message{
  163. background: white;
  164. border-radius: 12rpx 12rpx 12rpx 12rpx;
  165. border: 1rpx solid #FFFFFF;
  166. color: #666666;
  167. margin-top: 30rpx;
  168. padding: 20rpx 20rpx 0 20rpx;
  169. }
  170. .message-top1{
  171. display: flex;
  172. padding-bottom: 20rpx;
  173. align-items: center;
  174. }
  175. .message-top1>.msg>view{
  176. line-height: 50rpx;
  177. }
  178. .message-top{
  179. display: flex;
  180. border-bottom: 2rpx solid #E6E9EB;
  181. padding-bottom: 20rpx;
  182. }
  183. .vehiclePlate{
  184. font-weight: 400;
  185. font-size: 30rpx;
  186. color: #111111;
  187. }
  188. .btn-wrap{
  189. position: fixed;
  190. bottom: 0;
  191. left: 0;
  192. background-color: white;
  193. width: 100%;
  194. border-radius: 30rpx 30rpx 0rpx 0rpx;
  195. padding: 0 50rpx;
  196. display: flex;
  197. flex-direction: column;
  198. justify-content: space-evenly;
  199. box-sizing: border-box;
  200. height: 188rpx;
  201. }
  202. </style>