my-order.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <template>
  2. <view>
  3. <block v-if="list.length > 0">
  4. <view class="my-order" v-for="(item,index) in list" :key="index" @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. <block v-else>
  51. <view class="vflex acenter jcenter" style="height: 80vh;">
  52. <image src="@/static/images/no_list.png" mode="widthFix" style="width: 350rpx;"></image>
  53. <view class="text">暂时没有数据^^</view>
  54. </view>
  55. </block>
  56. </view>
  57. </template>
  58. <script>
  59. export default {
  60. name:"my-order",
  61. props: {
  62. list: {
  63. type: Array,
  64. value: []
  65. },
  66. },
  67. data() {
  68. return {
  69. }
  70. },
  71. methods: {
  72. // 订单详情
  73. toDetail(id) {
  74. this.$emit('toDetail', id)
  75. },
  76. toOffer(id) {
  77. this.$emit('toOffer', id)
  78. },
  79. toEdit(data) {
  80. this.$emit('toEdit', data)
  81. }
  82. }
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. .my-order {
  87. width: 100%;
  88. box-sizing: border-box;
  89. padding: 26rpx 20rpx;
  90. margin-top: 20rpx;
  91. border-radius: 20rpx;
  92. background-color: #fff;
  93. .top {
  94. padding-bottom: 24rpx;
  95. width: 100%;
  96. border-bottom: 1rpx solid #f4f4f4;
  97. .order_no {
  98. font-size: 24rpx;
  99. color: #444;
  100. }
  101. .type {
  102. width: 96rpx;
  103. height: 40rpx;
  104. background-color: #fff4e8;
  105. border-radius: 4rpx;
  106. font-size: 22rpx;
  107. color: #fba94e;
  108. text-align: center;
  109. line-height: 40rpx;
  110. }
  111. .type1 {
  112. width: 96rpx;
  113. height: 40rpx;
  114. background-color: #e7ebf7;
  115. border-radius: 4rpx;
  116. font-size: 22rpx;
  117. color: #506dff;
  118. text-align: center;
  119. line-height: 40rpx;
  120. }
  121. .type2 {
  122. width: 96rpx;
  123. height: 40rpx;
  124. background-color: #E6F7E8;
  125. border-radius: 4rpx;
  126. font-size: 22rpx;
  127. color: #4AB256;
  128. text-align: center;
  129. line-height: 40rpx;
  130. }
  131. }
  132. .box {
  133. width: 100%;
  134. padding-top: 14rpx;
  135. border-bottom: 1rpx solid #f4f4f4;
  136. .text_style1 {
  137. font-size: 28rpx;
  138. color: #222;
  139. line-height: 40rpx;
  140. display: inline-block;
  141. }
  142. .urgent1 {
  143. width: 72rpx;
  144. height: 32rpx;
  145. background-color: #ff762C;
  146. border-radius: 4rpx;
  147. color: #fff;
  148. font-size: 24rpx;
  149. text-align: center;
  150. line-height: 32rpx;
  151. display: inline-block;
  152. margin-right: 8rpx;
  153. }
  154. .urgent {
  155. width: 72rpx;
  156. height: 32rpx;
  157. background-color: #5571ff;
  158. border-radius: 4rpx;
  159. color: #fff;
  160. font-size: 24rpx;
  161. text-align: center;
  162. line-height: 32rpx;
  163. display: inline-block;
  164. margin-right: 8rpx;
  165. }
  166. .box_norm {
  167. width: max-content;
  168. background-color: #f4f4f4;
  169. border-radius: 8rpx;
  170. box-sizing: border-box;
  171. padding: 6rpx 20rpx;
  172. margin: 16rpx 0 24rpx;
  173. }
  174. .box_cell {
  175. margin: 16rpx 0 24rpx;
  176. }
  177. .text_style2 {
  178. font-size: 24rpx;
  179. color: #888;
  180. padding-right: 20rpx;
  181. }
  182. .text {
  183. width: 100%;
  184. padding-bottom: 20rpx;
  185. font-size: 26rpx;
  186. color: #888;
  187. line-height: 36rpx;
  188. }
  189. }
  190. .bottom {
  191. width: 100%;
  192. box-sizing: border-box;
  193. padding: 14rpx 20rpx;
  194. background-color: #eaf4ff;
  195. border-radius: 16rpx;
  196. .offer {
  197. font-size: 24rpx;
  198. color: #506dff;
  199. }
  200. .btn {
  201. width: 152rpx;
  202. height: 52rpx;
  203. background-color: #eaf4ff;
  204. border-radius: 28rpx;
  205. border: 1rpx solid #506dff;
  206. font-size: 26rpx;
  207. color: #506dff;
  208. text-align: center;
  209. line-height: 52rpx;
  210. }
  211. }
  212. .bottom1 {
  213. width: 100%;
  214. padding-top: 20rpx;
  215. border-top: 1rpx solid #f4f4f4;
  216. }
  217. .btn2 {
  218. width: 152rpx;
  219. height: 60rpx;
  220. border-radius: 32rpx;
  221. border: 1rpx solid #506DFF;
  222. font-size: 28rpx;
  223. font-weight: 400;
  224. color: #506DFF;
  225. line-height: 40rpx;
  226. margin: 20rpx 0 0;
  227. }
  228. .btn1 {
  229. width: 152rpx;
  230. height: 52rpx;
  231. // background-color: #eaf4ff;
  232. border-radius: 28rpx;
  233. border: 1rpx solid #e5e5e5;
  234. font-size: 26rpx;
  235. color: #2f2f2f;
  236. text-align: center;
  237. line-height: 52rpx;
  238. margin-left: 24rpx;
  239. }
  240. }
  241. </style>