my-order.vue 4.9 KB

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