Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

order-list-item-new.vue 11KB

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