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 11KB

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