铝交易,微信公众号
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.

442 lines
8.6 KiB

9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
  1. <template>
  2. <view class="page">
  3. <navbar :title="$t('pageTitle.orderDetails')" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="info">
  5. <view class="flex">
  6. <!--订单基本信息-->
  7. <view class="server-item">
  8. <view class="img-box">
  9. <img :src="orderInfo.pic" style="width: 100%;height: 100%;" />
  10. </view>
  11. <view class="server-info">
  12. <view class="server-title">
  13. {{ $t('other.aluminumProducts') }}
  14. </view>
  15. <view class="current-price">
  16. <text class="unit">{{ $t('components.productSpecification') }}</text>
  17. <text class="text"> {{ $t('other.specification') }}</text>
  18. </view>
  19. <view class="sales-volume" style="margin-top: 5px;">
  20. <view class="desc"> {{ $t('other.pickupDate') }}{{ orderInfo.takeTime }}</view>
  21. </view>
  22. </view>
  23. </view>
  24. <!--收货地址-->
  25. <view class="line address">
  26. <view class="address-top">
  27. <view class="">
  28. {{ $t('components.shippingAddress') }}
  29. </view>
  30. <view class="copy">
  31. <img style="width:40rpx;height:40rpx;" @click="$utils.copyText('1')"
  32. src="../static/order/copy.png">
  33. </view>
  34. </view>
  35. <view class="addressDetail">
  36. <view class="">{{ orderInfo.userName }}&nbsp;&nbsp;&nbsp; {{ orderInfo.phone }}</view>
  37. <view class="">
  38. {{ orderInfo.address }}
  39. </view>
  40. </view>
  41. </view>
  42. <!-- 订单信息 -->
  43. <view class="line">
  44. <view class="t min_tips">
  45. <view class="">
  46. {{ $t('components.orderInfo') }}
  47. </view>
  48. </view>
  49. <view class="min_tips">
  50. <view class="">
  51. {{ $t('components.orderNumber') }}
  52. </view>
  53. <view class="">
  54. {{ orderInfo.id }}
  55. </view>
  56. </view>
  57. <view class="min_tips">
  58. <view class="">
  59. {{ $t('components.orderTime') }}
  60. </view>
  61. <view class="">
  62. {{ orderInfo.createTime }}
  63. </view>
  64. </view>
  65. </view>
  66. <!-- 下单须知 -->
  67. <view class="line">
  68. <view class="t min_tips">
  69. <view class="">
  70. {{ $t('components.orderNotice') }}
  71. </view>
  72. </view>
  73. <view class="xdxz" style="line-height: 40rpx;">
  74. <!--<uv-parse :content="content"></uv-parse>-->
  75. <view>1. 请您在收货时间前15分钟内到货否则将视为放弃挂单</view>
  76. <view>2. 请您在收货地址提供的手机号码收到货物</view>
  77. </view>
  78. </view>
  79. </view>
  80. <!--我要撤单和联系客服-->
  81. <view class="btns">
  82. <view @click="backOrder" class="oneBtn">
  83. {{ $t('other.withdrawOrder') }}
  84. </view>
  85. <view @click="$refs.customerServicePopup.open()" class="twoBtn">
  86. {{ $t('components.contactCustomerService') }}
  87. </view>
  88. </view>
  89. </view>
  90. <!-- 联系客服弹框 -->
  91. <customerServicePopup ref="customerServicePopup" />
  92. </view>
  93. </template>
  94. <script>
  95. import customerServicePopup from "@/components/config/customerServicePopup.vue";
  96. export default {
  97. name: "orderDetail2",
  98. components: {
  99. customerServicePopup
  100. },
  101. onLoad(options) {
  102. if (options.orderInfo) {
  103. this.orderInfo = JSON.parse(decodeURIComponent(options.orderInfo));
  104. console.log(this.orderInfo, "解析后的订单数据"); // 解析后的订单数据
  105. }
  106. },
  107. data() {
  108. return {
  109. orderInfo: {}
  110. }
  111. },
  112. methods: {
  113. // 供应商根据挂单id查询挂单详情的接口
  114. queryOrderInfo() {
  115. this.$api('getProductInfo', this.orderId, res => {
  116. console.log(res, "挂单详情信息")
  117. this.orderInfo = res.result
  118. })
  119. },
  120. // 撤单
  121. backOrder() {
  122. let self = this
  123. uni.showModal({
  124. title: self.$t('other.backOrderTitle'),
  125. content: self.$t('other.backOrderTitleConfirm'),
  126. success(e) {
  127. if (e.confirm) {
  128. self.$api('noShow', {
  129. id
  130. }, res => {
  131. if (res.code == 200) {
  132. uni.showToast({
  133. title: self.$t('other.backOrderSuccess'),
  134. icon: 'none'
  135. })
  136. uni.navigateBack();
  137. }
  138. })
  139. }
  140. }
  141. })
  142. },
  143. },
  144. }
  145. </script>
  146. <style scoped lang="scss">
  147. .page {
  148. .info {
  149. margin: 10px;
  150. padding: 20rpx;
  151. background-color: #fff;
  152. width: calc(100% - 40px);
  153. border-radius: 10px;
  154. .head-title {
  155. font-family: PingFang SC, PingFang SC-Bold;
  156. color: #2f2e2e;
  157. line-height: 30rpx;
  158. margin-left: 10rpx;
  159. }
  160. .server-item {
  161. display: flex;
  162. flex-wrap: wrap;
  163. align-items: center;
  164. justify-content: space-between;
  165. background: white;
  166. border-radius: 15rpx;
  167. box-sizing: border-box;
  168. margin: 20rpx 0rpx;
  169. width: 100%;
  170. .img-box {
  171. width: 150rpx;
  172. height: 150rpx;
  173. border-radius: 10rpx;
  174. overflow: hidden;
  175. image {
  176. width: 100%;
  177. height: 100%;
  178. }
  179. }
  180. .server-info {
  181. display: flex;
  182. flex-direction: column;
  183. justify-content: space-around;
  184. width: calc(100% - 180rpx);
  185. box-sizing: border-box;
  186. padding: 10rpx 15rpx;
  187. .server-title {
  188. display: flex;
  189. margin-bottom: 10rpx;
  190. }
  191. .coupon {
  192. display: flex;
  193. justify-content: center;
  194. align-items: center;
  195. background: #F29E45;
  196. color: white;
  197. width: 120rpx;
  198. height: 40rpx;
  199. border-radius: 10rpx;
  200. margin-left: 10rpx;
  201. font-size: 22rpx;
  202. }
  203. .time-coupon,
  204. .price {
  205. display: flex;
  206. flex-wrap: wrap;
  207. align-items: center;
  208. }
  209. .time-coupon {
  210. margin: 10rpx 0rpx;
  211. font-size: 26rpx;
  212. justify-content: space-between;
  213. width: 100%;
  214. .flex {
  215. justify-content: center;
  216. align-items: center;
  217. }
  218. image {
  219. width: 25rpx;
  220. height: 25rpx;
  221. }
  222. .time {
  223. color: #B8B8B8;
  224. margin-left: 6rpx;
  225. }
  226. }
  227. .sales-volume {
  228. display: flex;
  229. align-items: center;
  230. color: #B8B8B8;
  231. font-size: 24rpx;
  232. image {
  233. width: 25rpx;
  234. height: 25rpx;
  235. }
  236. }
  237. }
  238. }
  239. .address {
  240. .address-top {
  241. display: flex;
  242. justify-content: space-between;
  243. align-items: center;
  244. image {
  245. width: 30rpx;
  246. height: 30rpx;
  247. }
  248. }
  249. .addressDetail {
  250. color: #777;
  251. font-size: 26rpx;
  252. padding: 5px 0;
  253. }
  254. text {
  255. background-color: #F29E45;
  256. padding: 8rpx 10rpx;
  257. color: #fff;
  258. font-size: 20rpx;
  259. margin-left: 10px;
  260. border-radius: 5px;
  261. }
  262. }
  263. .min_tips {
  264. font-size: 22rpx;
  265. color: #777;
  266. display: flex;
  267. justify-content: space-between;
  268. padding: 5px 0;
  269. align-items: center;
  270. }
  271. .btns {
  272. display: flex;
  273. justify-content: center;
  274. align-items: center;
  275. gap: 40rpx;
  276. .oneBtn {
  277. display: flex;
  278. align-items: center;
  279. justify-content: center;
  280. width: 40%;
  281. height: 70rpx;
  282. padding: 10rpx;
  283. border-radius: 40rpx;
  284. color: white;
  285. font-size: 28rpx;
  286. margin: 20rpx 10rpx 0 0;
  287. background: #293143;
  288. //margin-top: 20rpx;
  289. border-radius: 40rpx;
  290. }
  291. .twoBtn {
  292. display: flex;
  293. align-items: center;
  294. justify-content: center;
  295. width: 40%;
  296. height: 70rpx;
  297. padding: 10rpx;
  298. border-radius: 40rpx;
  299. color: #000000;
  300. font-size: 28rpx;
  301. margin: 20rpx 10rpx 0 0;
  302. background: #f2f2f2;
  303. //margin-top: 20rpx;
  304. border-radius: 40rpx;
  305. }
  306. }
  307. .xdxz {
  308. font-size: 24rpx;
  309. color: #777;
  310. line-height: 30rpx;
  311. }
  312. .current-price {
  313. font-size: 24rpx;
  314. color: #8c8888;
  315. .unit {}
  316. .text {}
  317. }
  318. .line {
  319. border-top: 2px dotted #00000011;
  320. padding: 20rpx 0;
  321. .t {
  322. padding: 5px 0;
  323. color: #000;
  324. font-size: 26rpx;
  325. }
  326. }
  327. .head-div {
  328. .nickname {
  329. font-size: 30rpx;
  330. font-weight: 600;
  331. text-align: left;
  332. line-height: 42rpx;
  333. display: flex;
  334. align-items: center;
  335. .tag {
  336. position: relative;
  337. display: flex;
  338. align-items: center;
  339. image {
  340. height: 45rpx;
  341. width: 90rpx;
  342. vertical-align: middle;
  343. }
  344. .auth {
  345. position: absolute;
  346. white-space: nowrap;
  347. color: $uni-color;
  348. left: 23rpx;
  349. font-size: 17rpx;
  350. }
  351. }
  352. }
  353. .days {
  354. font-size: 20rpx;
  355. font-weight: 400;
  356. text-align: left;
  357. line-height: 56rpx;
  358. display: flex;
  359. align-items: center;
  360. view {
  361. padding-left: 5px;
  362. }
  363. }
  364. }
  365. .btn-x {
  366. color: $uni-color;
  367. border: 1px solid $uni-color;
  368. padding: 10rpx 20rpx;
  369. border-radius: 30rpx;
  370. }
  371. .btns {
  372. display: flex;
  373. justify-content: center;
  374. .btn {
  375. color: $uni-color;
  376. border: 1px solid $uni-color;
  377. padding: 10rpx 20rpx;
  378. border-radius: 30rpx;
  379. }
  380. }
  381. }
  382. }
  383. </style>