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.

order-list-item-new.vue 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <!-- 新办订单item
  2. 新办订单状态:待支付、审核中、审核不通过、待发货、待收货、待激活、已完成、已取消、已结束、退货、换货-->
  3. <template>
  4. <view :class="item.orderStatus == OrderStatus.已取消 ? 'item finished' : 'item'" @click.stop="gotoOrderDetails(item,1)">
  5. <view class="head">
  6. <view class="name">
  7. <image :src="`${$imgUrl}order/icon-car.png`" class="icon" mode="aspectFit"></image>
  8. <text class="title">{{item.vehiclePlate ?item.vehiclePlate: ''}}</text>
  9. </view>
  10. <view v-if="item.promotionModes==1" class="xiao">小程序</view>
  11. <view v-else class="xianxia">线下网点</view>
  12. </view>
  13. <view class="content">
  14. <view class="picture">
  15. <view>
  16. <view style="padding-bottom: 10rpx;">
  17. <text>车牌颜色:</text>
  18. <text>{{getVehiclePlateColor(item.vehiclePlateColor)}}</text>
  19. </view>
  20. <view>
  21. <text>产品名称:</text>
  22. <text>{{item.productName ?item.productName: ''}}</text>
  23. </view>
  24. </view>
  25. <view>
  26. <view v-if="item.orderStatus == OrderStatus.已取消">
  27. <image class="tupian" :src="`${$imgUrl}order/yiquxiao.png`" mode="aspectFill"></image>
  28. </view>
  29. <!--异地 orderStatus=-1,你判断这个remoteStatus 是字符串7,就显示审核未通过 -->
  30. <view
  31. v-else-if="item.orderStatus == OrderStatus.已取消 && item.remoteStatus=='7' && item.deviceType == deviceType">
  32. <image class="tupian" :src="`${$imgUrl}order/nopass.png`" mode="aspectFill"></image>
  33. </view>
  34. <view v-else
  35. :class="{'text-orange':item.orderStep == OrderStatus.已完成 || item.orderStep == OrderStatus.已结束
  36. || item.orderStep == OrderStatus['换货-设备已回收'] || item.orderStep == OrderStatus.退款成功 || item.orderStep == OrderStatus.退货成功}">
  37. <image class="tupian" v-if="item.orderStep==12 && item.reshipment==1"
  38. :src="`${$imgUrl}order/buhuozhong.png`" mode="aspectFill"></image>
  39. <image class="tupian" v-else :src="`${$imgUrl}order/${getOrderStatusNameNew(item.orderStep)}.png`"
  40. mode="aspectFill"></image>
  41. </view>
  42. </view>
  43. </view>
  44. <view>
  45. <text class="type">新办订单号:</text>
  46. <text class="value">{{item.orderNo}}</text>
  47. </view>
  48. <view class="all">合计:<text class="cny">¥</text><text class="amount"
  49. v-if="item.amount">{{item.amount / 100}}</text><text class="amount" v-else>0.00</text></view>
  50. </view>
  51. <view v-if="item.orderStatus == 'NORMAL'">
  52. <view class="btns">
  53. <view v-if="item.orderStep=='ORDER_INIT'||item.orderStep=='CUSTOMER_UPLOAD'" class="btn btn-primary" @click.stop="gotoActiveOrder(item)">继续申请</view>
  54. <view v-if="item.orderStep=='VEHICLE_UPLOAD'" class="btn btn-primary" @click.stop="gotoActiveOrder(item)">支付</view>
  55. <view v-if="item.orderStep=='WAITING_ACTIVE'" class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
  56. <view v-if="item.orderStep=='WAITING_ACTIVE'&&item.shippingStatus=='WAIT_RECEIVING'" class="btn btn-primary" @click.stop="gotoActiveOrder(item)">确认收货</view>
  57. <view v-if="item.orderStep=='ORDER_PAID'" class="btn btn-primary" @click.stop="gotoActiveOrder(item)">签约</view>
  58. <view v-if="item.orderStep=='ORDER_PAID'" class="btn btn-primary" @click.stop="gotoActiveOrder(item)">取消订单</view>
  59. </view>
  60. </view>
  61. </view>
  62. <!-- 弹窗 -->
  63. <u-popup v-model="showActiveOrder" mode="center">
  64. <popup-active-order content="确认是否重新激活订单" @cancel="showActiveOrder = false" @confirm="toActiveOrder">
  65. </popup-active-order>
  66. </u-popup>
  67. </template>
  68. <script lang="ts" setup>
  69. import popupActiveOrder from "./popup-active-order.vue";
  70. import useOrderSkip from "@/composables/order/useOrderSkip";
  71. import { deviceType } from "@/utils/network/difference";
  72. import {
  73. getOrderStatusName,
  74. getOrderStatusNameNew,
  75. msg,
  76. getOrderTypeName
  77. } from "@/utils/utils";
  78. import {
  79. ref
  80. } from "vue";
  81. import {
  82. OrderStatus
  83. } from "@/datas/enum";
  84. import {
  85. vehiclePlateColor
  86. } from "@/datas/vehiclePlateColor";
  87. defineProps({
  88. item: {
  89. type: Object,
  90. default: () => ({}),
  91. },
  92. });
  93. //是否确认激活订单弹窗
  94. const showActiveOrder = ref(false);
  95. //办理订单按钮跳转业务逻辑
  96. const {
  97. gotoCancelOrder,
  98. gotoEditUserOrUnitInfo,
  99. gotoConfirmReceipt,
  100. gotoCheckLogistics,
  101. gotoEvaluateProduct,
  102. gotoActiveOrder,
  103. gotoReturnOrder,
  104. gotoExchangeOrder,
  105. gotoOrderDetailsPay,
  106. gotoOrderDetails,
  107. gotoAgainUseOrder,
  108. gotoOrderSign,
  109. closeOrder,
  110. gotoReplenishmentOrder,
  111. gotoAddressOrder,
  112. placeAnOrder
  113. } = useOrderSkip();
  114. //激活订单
  115. const toActiveOrder = (item) => {
  116. gotoActiveOrder(item);
  117. showActiveOrder.value = false;
  118. }
  119. //获取车牌颜色文字
  120. const getVehiclePlateColor = (id : number) => {
  121. console.log("id", id)
  122. const colors = vehiclePlateColor.filter(item => item.id == id);
  123. return colors[0].color
  124. }
  125. </script>
  126. <style lang="scss" scoped>
  127. .item {
  128. background: #ffffff;
  129. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  130. border-radius: 20rpx;
  131. box-sizing: border-box;
  132. display: flex;
  133. flex-direction: column;
  134. margin: 30rpx 30rpx 0rpx;
  135. }
  136. .bg-white .item {
  137. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  138. }
  139. .item .head {
  140. display: flex;
  141. justify-content: space-between;
  142. align-items: center;
  143. padding: 20rpx 0;
  144. border-bottom: 1px solid #dcdcdc;
  145. width: 95%;
  146. margin: 0 auto;
  147. }
  148. .item .head {
  149. .head-row {
  150. display: flex;
  151. width: 100%;
  152. justify-content: space-between;
  153. align-items: center;
  154. }
  155. .name {}
  156. .name>text {
  157. font-size: 26rpx;
  158. font-family: Noto Sans S Chinese;
  159. font-weight: 400;
  160. color: #999999;
  161. line-height: 36rpx;
  162. }
  163. }
  164. .item .head .icon {
  165. width: 37rpx;
  166. height: 31rpx;
  167. }
  168. .item .head .name {
  169. display: flex;
  170. align-items: center;
  171. }
  172. .text-green {
  173. font-size: 26rpx;
  174. color: #00b38b;
  175. }
  176. .text-orange {
  177. font-size: 26rpx;
  178. color: #ff8000;
  179. }
  180. .text-black {
  181. font-size: 28rpx;
  182. color: #333;
  183. font-weight: 500;
  184. }
  185. .title {
  186. font-size: 30rpx !important;
  187. color: #333 !important;
  188. margin-left: 10rpx;
  189. font-weight: bold !important;
  190. }
  191. .tag-green {
  192. font-size: 22rpx;
  193. height: 40rpx;
  194. line-height: 40rpx;
  195. padding: 0 12rpx;
  196. border-radius: 6rpx;
  197. background: #d9f4ee;
  198. color: #00b38b;
  199. }
  200. .tag-grey {
  201. font-size: 22rpx;
  202. height: 40rpx;
  203. line-height: 40rpx;
  204. padding: 0 12rpx;
  205. border-radius: 6rpx;
  206. background: #e8e8e8;
  207. color: #666;
  208. }
  209. .detail {
  210. display: flex;
  211. justify-content: space-between;
  212. align-items: center;
  213. padding: 30rpx 32rpx;
  214. }
  215. .detail .type {
  216. font-size: 26rpx;
  217. color: #999;
  218. }
  219. .detail .value {
  220. font-size: 26rpx;
  221. color: #333;
  222. }
  223. .finished .detail .value {
  224. color: #999;
  225. }
  226. .detail .odd {
  227. margin: 20rpx 0;
  228. }
  229. .cny {
  230. font-size: 26rpx;
  231. color: #333;
  232. }
  233. .finished .cny {
  234. color: #999;
  235. }
  236. .amount {
  237. font-size: 40rpx;
  238. font-weight: bold;
  239. }
  240. .bottom .amount {
  241. color: #ff8000;
  242. }
  243. .finished .amount {
  244. color: #999;
  245. }
  246. .btns {
  247. position: relative;
  248. display: flex;
  249. align-items: center;
  250. justify-content: flex-end;
  251. border-top: 1px solid #dcdcdc;
  252. margin: 0 30rpx;
  253. padding: 20rpx 0;
  254. }
  255. .bottom {
  256. display: flex;
  257. justify-content: space-between;
  258. align-items: center;
  259. border-top: 1px solid #dcdcdc;
  260. margin: 0 30rpx;
  261. padding: 20rpx 0;
  262. }
  263. .btn {
  264. height: 60rpx;
  265. line-height: 58rpx;
  266. border-radius: 30rpx;
  267. padding: 0 24rpx;
  268. font-size: 23rpx;
  269. box-sizing: border-box;
  270. margin-right: 12rpx;
  271. }
  272. .btns .btn:last-child {
  273. margin: 0;
  274. }
  275. .btns .state {
  276. position: absolute;
  277. left: 0;
  278. font-size: 26rpx;
  279. font-family: Noto Sans S Chinese;
  280. font-weight: 400;
  281. color: #999999;
  282. line-height: 58rpx;
  283. text {
  284. font-size: 26rpx;
  285. font-family: Noto Sans S Chinese;
  286. font-weight: 400;
  287. color: #00B38B;
  288. line-height: 58rpx;
  289. }
  290. }
  291. .btn-primary {
  292. color: white;
  293. background-color: #133850;
  294. }
  295. .btn-disable {
  296. border: 1px solid #999;
  297. color: #999;
  298. }
  299. .btn-normal {
  300. border: 1px solid #133850;
  301. color: #133850;
  302. }
  303. .evaluation {
  304. display: flex;
  305. }
  306. .content {
  307. font-size: 26rpx;
  308. padding: 6rpx 20rpx;
  309. }
  310. .all {
  311. display: flex;
  312. justify-content: flex-end;
  313. align-items: center;
  314. margin-top: 10rpx;
  315. }
  316. .picture {
  317. display: flex;
  318. align-items: center;
  319. justify-content: space-between;
  320. margin: 10rpx 0;
  321. }
  322. .picture>view:first-child {
  323. width: 65%;
  324. }
  325. .xiao {
  326. background: #42D175;
  327. border-radius: 5rpx 5rpx 5rpx 5rpx;
  328. color: white;
  329. font-size: 20rpx;
  330. padding: 4rpx 6rpx;
  331. }
  332. .xianxia {
  333. background: #CCB375;
  334. border-radius: 5rpx 5rpx 5rpx 5rpx;
  335. color: white;
  336. font-size: 20rpx;
  337. padding: 4rpx 6rpx;
  338. }
  339. .tupian {
  340. width: 90rpx;
  341. height: 80rpx;
  342. }
  343. </style>