my-order.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <view>
  3. <block v-for="(item,index) in list" :key="index">
  4. <view class="my-order" @click="toDetail(item.id)">
  5. <view class="top hflex acenter jbetween">
  6. <view class="order_no">订单编号:{{item.order_no}}</view>
  7. <view class="type" v-if="item.status== 1">未报价</view>
  8. <view class="type1" v-if="item.status == 2">已报价</view>
  9. <view class="type2" v-if="item.status == 3">已匹配</view>
  10. </view>
  11. <view v-if="item.items.length<3">
  12. <block v-for="(item2,index2) in item.items" :key="index">
  13. <view class="box">
  14. <view class="text_style1">{{item2.name}}</view>
  15. <view class="box_norm hflex acenter" v-if="item.tab !== 4">
  16. <view class="text_style2">规格:{{item2.spec}}</view>
  17. <view class="text_style2">采购数量:{{item2.number}}</view>
  18. </view>
  19. <view class="box_norm hflex acenter" v-else>
  20. <view class="text_style2">数量/吨位:{{item2.weight}}</view>
  21. </view>
  22. <view class="text" v-if="item2.standard">质量标准:{{item2.standard}}</view>
  23. </view>
  24. </block>
  25. </view>
  26. <view v-else>
  27. <block v-for="(item2,index2) in item.items.slice(0,2)" :key="index">
  28. <view class="box">
  29. <view class="text_style1">{{item2.name}}</view>
  30. <view class="box_norm hflex acenter" v-if="item.tab !== 4">
  31. <view class="text_style2">规格:{{item2.spec}}</view>
  32. <view class="text_style2">采购数量:{{item2.number}}</view>
  33. </view>
  34. <view class="box_norm hflex acenter" v-else>
  35. <view class="text_style2">数量/吨位:{{item2.weight}}</view>
  36. </view>
  37. <view class="text" v-if="item2.standard">质量标准:{{item2.standard}}</view>
  38. </view>
  39. </block>
  40. </view>
  41. <view class="bottom hflex acenter jbetween" v-if="item.status != 1 && item.tab !== 1">
  42. <view class="offer">订单报价:<span style="font-size: 32rpx;color: #222;">{{item.user_order.amount}}</span></view>
  43. <view class="btn" @click.stop="toOffer(item.id)">查看详情</view>
  44. </view>
  45. <view class="hflex acenter jend" v-if="item.tab == 1">
  46. <view class="btn2 hflex acenter jcenter" @click.stop="toDetail(item.id)">查看详情</view>
  47. </view>
  48. </view>
  49. </block>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. name:"my-order",
  55. props: {
  56. list: {
  57. type: Array,
  58. value: []
  59. },
  60. },
  61. data() {
  62. return {
  63. }
  64. },
  65. methods: {
  66. // 订单详情
  67. toDetail(id) {
  68. this.$emit('toDetail', id)
  69. },
  70. toOffer(id) {
  71. this.$emit('toOffer', id)
  72. },
  73. toEdit(data) {
  74. this.$emit('toEdit', data)
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .my-order {
  81. width: 100%;
  82. box-sizing: border-box;
  83. padding: 26rpx 20rpx;
  84. margin-top: 20rpx;
  85. border-radius: 20rpx;
  86. background-color: #fff;
  87. .top {
  88. padding-bottom: 24rpx;
  89. width: 100%;
  90. border-bottom: 1rpx solid #f4f4f4;
  91. .order_no {
  92. font-size: 24rpx;
  93. color: #444;
  94. }
  95. .type {
  96. width: 96rpx;
  97. height: 40rpx;
  98. background-color: #fff4e8;
  99. border-radius: 4rpx;
  100. font-size: 22rpx;
  101. color: #fba94e;
  102. text-align: center;
  103. line-height: 40rpx;
  104. }
  105. .type1 {
  106. width: 96rpx;
  107. height: 40rpx;
  108. background-color: #e7ebf7;
  109. border-radius: 4rpx;
  110. font-size: 22rpx;
  111. color: #506dff;
  112. text-align: center;
  113. line-height: 40rpx;
  114. }
  115. .type2 {
  116. width: 96rpx;
  117. height: 40rpx;
  118. background-color: #E6F7E8;
  119. border-radius: 4rpx;
  120. font-size: 22rpx;
  121. color: #4AB256;
  122. text-align: center;
  123. line-height: 40rpx;
  124. }
  125. }
  126. .box {
  127. width: 100%;
  128. padding-top: 14rpx;
  129. border-bottom: 1rpx solid #f4f4f4;
  130. .text_style1 {
  131. font-size: 28rpx;
  132. color: #222;
  133. line-height: 40rpx;
  134. display: inline-block;
  135. }
  136. .urgent1 {
  137. width: 72rpx;
  138. height: 32rpx;
  139. background-color: #ff762C;
  140. border-radius: 4rpx;
  141. color: #fff;
  142. font-size: 24rpx;
  143. text-align: center;
  144. line-height: 32rpx;
  145. display: inline-block;
  146. margin-right: 8rpx;
  147. }
  148. .urgent {
  149. width: 72rpx;
  150. height: 32rpx;
  151. background-color: #5571ff;
  152. border-radius: 4rpx;
  153. color: #fff;
  154. font-size: 24rpx;
  155. text-align: center;
  156. line-height: 32rpx;
  157. display: inline-block;
  158. margin-right: 8rpx;
  159. }
  160. .box_norm {
  161. width: max-content;
  162. background-color: #f4f4f4;
  163. border-radius: 8rpx;
  164. box-sizing: border-box;
  165. padding: 6rpx 20rpx;
  166. margin: 16rpx 0 24rpx;
  167. }
  168. .box_cell {
  169. margin: 16rpx 0 24rpx;
  170. }
  171. .text_style2 {
  172. font-size: 24rpx;
  173. color: #888;
  174. padding-right: 20rpx;
  175. }
  176. .text {
  177. width: 100%;
  178. padding-bottom: 20rpx;
  179. font-size: 26rpx;
  180. color: #888;
  181. line-height: 36rpx;
  182. }
  183. }
  184. .bottom {
  185. width: 100%;
  186. box-sizing: border-box;
  187. padding: 14rpx 20rpx;
  188. background-color: #eaf4ff;
  189. border-radius: 16rpx;
  190. .offer {
  191. font-size: 24rpx;
  192. color: #506dff;
  193. }
  194. .btn {
  195. width: 152rpx;
  196. height: 52rpx;
  197. background-color: #eaf4ff;
  198. border-radius: 28rpx;
  199. border: 1rpx solid #506dff;
  200. font-size: 26rpx;
  201. color: #506dff;
  202. text-align: center;
  203. line-height: 52rpx;
  204. }
  205. }
  206. .bottom1 {
  207. width: 100%;
  208. padding-top: 20rpx;
  209. border-top: 1rpx solid #f4f4f4;
  210. }
  211. .btn2 {
  212. width: 152rpx;
  213. height: 60rpx;
  214. border-radius: 32rpx;
  215. border: 1rpx solid #506DFF;
  216. font-size: 28rpx;
  217. font-weight: 400;
  218. color: #506DFF;
  219. line-height: 40rpx;
  220. margin: 20rpx 0 0;
  221. }
  222. .btn1 {
  223. width: 152rpx;
  224. height: 52rpx;
  225. // background-color: #eaf4ff;
  226. border-radius: 28rpx;
  227. border: 1rpx solid #e5e5e5;
  228. font-size: 26rpx;
  229. color: #2f2f2f;
  230. text-align: center;
  231. line-height: 52rpx;
  232. margin-left: 24rpx;
  233. }
  234. }
  235. </style>