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

223 lines
4.4 KiB

8 months ago
5 months ago
5 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
8 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
5 months ago
5 months ago
6 months ago
8 months ago
5 months ago
8 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
5 months ago
5 months ago
6 months ago
5 months ago
5 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
8 months ago
  1. <template>
  2. <view class="page">
  3. <view v-if="list.length>0" class="item"
  4. @click="toDetail(item)"
  5. v-for="(item, index) in list" :key="index">
  6. <view class="top">
  7. <view class="service">
  8. <text>{{ item.specsName }}</text>
  9. </view>
  10. <view class="status">
  11. <text>库存{{ item.num }}</text>
  12. </view>
  13. </view>
  14. <view class="zhuti">
  15. <view class="left">
  16. <image :src="item.pic" style="width: 100%;height: 100%;"
  17. mode="aspectFill"/>
  18. </view>
  19. <view class="right">
  20. <view class="text-hidden-1">
  21. 单价 {{ item.price }}
  22. </view>
  23. <view class="text-hidden-1">
  24. {{ $t('other.pickupAddress') }}{{ item.address }}
  25. </view>
  26. <view class="text-hidden-1">
  27. {{ $t('other.pickupDate') }}{{ item.createTime }}
  28. </view>
  29. </view>
  30. <!--审核状态 0审核中 1 审核通过 2审核未通过-->
  31. <!-- <view class="tip" v-if="item.showStatus == 0">
  32. <img v-if="item.auditStatus==0" src="/pages_order/static/order/3.svg" style="width: 100%;height: 100%;" />
  33. <img v-if="item.auditStatus==1" src="/pages_order/static/order/1.svg" style="width: 100%;height: 100%;" />
  34. <img v-if="item.auditStatus==2" src="/pages_order/static/order/2.svg" style="width: 100%;height: 100%;" />
  35. </view> -->
  36. </view>
  37. <!--撤单按钮-->
  38. <view class="bottom">
  39. <view @click.stop="showVideo(item)" class="btn"
  40. v-if="item.reportVideo"
  41. >
  42. 检测视频
  43. </view>
  44. <view @click.stop="showImage(item)" class="btn"
  45. v-if="item.report"
  46. >
  47. 检测报告
  48. </view>
  49. <view @click.stop="immediatePurchase(item)" class="btn a"
  50. >
  51. 立即下单
  52. </view>
  53. </view>
  54. </view>
  55. <!--无历史记录-->
  56. <view style="padding: 100rpx 0;" v-else>
  57. <uv-empty mode="history" textSize="28rpx" iconSize="100rpx" />
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. name: "orderList",
  64. props: {
  65. list: {
  66. type: Array,
  67. default: false
  68. },
  69. showBackOrder: {
  70. type: Boolean,
  71. default: false
  72. }
  73. },
  74. data() {
  75. return {}
  76. },
  77. methods: {
  78. // 立即购买
  79. immediatePurchase(item) {
  80. if(!uni.getStorageSync('token')){
  81. return this.$utils.toLogin()
  82. }
  83. console.log("====")
  84. // var itemStr = encodeURIComponent(JSON.stringify(item));
  85. this.$store.state.productDetail = item
  86. uni.navigateTo({
  87. url: `/pages_order/tradingPlatform/nowOrder`,
  88. });
  89. },
  90. showImage(item){
  91. uni.previewImage({
  92. urls : item.report.split(','),
  93. current : 0,
  94. })
  95. },
  96. showVideo(item, index = 0){
  97. this.$emit('previewVideo', {
  98. urls : item.reportVideo.split(','), // 需要预览的资源列表
  99. index, // 当前显示的资源序号
  100. })
  101. },
  102. toDetail(item){
  103. this.$store.state.productDetail = item
  104. uni.navigateTo({
  105. url: '/pages_order/product/productDetail'
  106. })
  107. },
  108. }
  109. }
  110. </script>
  111. <style scoped lang="scss">
  112. .page {
  113. display: flex;
  114. flex-direction: column;
  115. gap: 20rpx;
  116. // height: calc(90vh - 180rpx);
  117. .item {
  118. margin: 0 20rpx;
  119. padding: 20rpx;
  120. border-radius: 40rpx;
  121. background-color: #fff;
  122. //overflow: hidden;
  123. //height:300px;
  124. .top {
  125. display: flex;
  126. justify-content: space-between;
  127. align-items: center;
  128. font-size: 30rpx;
  129. .service {
  130. color: #000;
  131. }
  132. .status {
  133. color: #8d8d8d;
  134. font-size: 26rpx;
  135. font-weight: 600;
  136. }
  137. }
  138. .zhuti {
  139. display: flex;
  140. margin: 10rpx 0;
  141. position: relative;
  142. .left {
  143. width: 150rpx;
  144. height: 150rpx;
  145. border-radius: 10rpx;
  146. image {
  147. width: 150rpx;
  148. height: 150rpx;
  149. border-radius: 10rpx;
  150. }
  151. }
  152. .right {
  153. width: calc(100% - 160rpx);
  154. color: #777;
  155. font-size: 24rpx;
  156. padding-left: 20rpx;
  157. line-height: 40rpx;
  158. background-color: #f8f8f8;
  159. }
  160. .tip {
  161. width: 80rpx;
  162. height: 80rpx;
  163. position: absolute;
  164. bottom: -20rpx;
  165. right: -20rpx;
  166. }
  167. }
  168. .bottom {
  169. display: flex;
  170. justify-content: flex-end;
  171. .btn {
  172. display: flex;
  173. align-items: center;
  174. justify-content: center;
  175. // width: ;
  176. padding: 0 24rpx;
  177. height: 50rpx;
  178. border-radius: 40rpx;
  179. color: $uni-color;
  180. font-size: 24rpx;
  181. margin: 20rpx 10rpx 0 0;
  182. background: #ffffff;
  183. border: 1px solid $uni-color;
  184. //margin-top: 20rpx;
  185. border-radius: 40rpx;
  186. }
  187. .a{
  188. background-color: $uni-color;
  189. color: #fff;
  190. }
  191. }
  192. }
  193. }
  194. </style>