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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <!-- 新办订单item
  2. 新办订单状态:待支付、审核中、审核不通过、待发货、待收货、待激活、已完成、已取消、已结束、退货、换货-->
  3. <template>
  4. <view :class="item.orderStatus == OrderStatus.已取消 ? 'item finished' : 'item'"
  5. @click.stop="gotoOrderDetails(item,1)">
  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. <!-- item.orderSource==1 app -->
  42. <view v-if="item.orderStatus != OrderStatus.已取消 && !item.orderSource">
  43. <!-- 微信小程序正常 -->
  44. <view>
  45. <!-- 信息填写未完成 -->
  46. <view class="btns"
  47. v-if="item.orderStep == OrderStatus['完成个人/单位信息上传'] || item.orderStep == OrderStatus.完成填写基本信息 || item.orderStep == OrderStatus.完成车辆信息上传 || item.orderStep == OrderStatus.待支付3">
  48. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  49. <view class="btn btn-primary" @click.stop="gotoEditUserOrUnitInfo(item)">继续申请</view>
  50. </view>
  51. <!-- 待支付 -->
  52. <view class="btns" v-if="item.orderStep == OrderStatus.待加购权益">
  53. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  54. <view class="btn btn-primary" @click.stop="gotoEditUserOrUnitInfo(item)">加购权益</view>
  55. </view>
  56. <view class="btns" v-if="item.orderStep == OrderStatus['完成车辆信息上传/待支付']">
  57. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  58. <view class="btn btn-primary" @click.stop="gotoOrderDetailsPay(item)">支付</view>
  59. </view>
  60. <view class="btns" v-if="item.orderStep == OrderStatus.待支付2">
  61. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  62. <view class="btn btn-primary" @click.stop="gotoOrderDetailsPay(item)">支付</view>
  63. </view>
  64. <view class="btns" v-if="item.orderStep == OrderStatus['已支付/待签约']">
  65. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  66. <view class="btn btn-primary" @click.stop="gotoOrderSign(item)">去签约</view>
  67. </view>
  68. <!-- 审核中/审核不通过 -->
  69. <view class="btns" v-if="item.orderStep == OrderStatus.待审核 || item.orderStep == OrderStatus.审核不通过">
  70. <!-- <view class="btn btn-normal" v-if="item.orderStep == OrderStatus.审核不通过"
  71. @click.stop="gotoEditUserOrUnitInfo(item)">修改资料</view> -->
  72. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  73. </view>
  74. <!-- 待发货 -->
  75. <view class="btns" v-else-if="item.orderStep == OrderStatus.待发货">
  76. <view class="btn btn-normal" @click.stop="gotoCancelOrder(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-primary" @click.stop="gotoConfirmReceipt(item)">确认收货</view>
  85. <view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view>
  86. </view>
  87. <!-- 待激活 -->
  88. <view class="btns" v-else-if="item.orderStep == OrderStatus.待激活">
  89. <view class="btn btn-normal" @click.stop="gotoReturnOrder(item)" v-if="item.applyReturn">申请退货</view>
  90. <view class="btn btn-normal" @click.stop="gotoExchangeOrder(item)">申请换货</view>
  91. <view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
  92. <view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view>
  93. </view>
  94. <!-- 已完成 售后订单不允许评价产品,储值卡转记账卡除外-->
  95. <!-- 发行产品 isProduct=0; 业务员 isStaff=0; 权益 isEquity=0 业务服务 isService=0; -->
  96. <view class="btns"
  97. v-else-if="item.orderStep == OrderStatus.已完成 && (item.orderType =='ISSUE' || item.orderType =='VALUE_TO_ACCOUNT') ">
  98. <view class="btn btn-normal" v-if="( item.isProduct==1 && item.isService==1) ">
  99. 已评价
  100. </view>
  101. <view class='evaluation' v-else>
  102. <view class="btn btn-primary" v-if="item.isProduct==0 || item.isService==0"
  103. @click.stop="gotoEvaluateProduct(item)">去评价产品</view>
  104. </view>
  105. </view>
  106. <!-- 已结束 -->
  107. <view class="btns" v-else-if="item.orderStep == OrderStatus.已结束 && item.isUseAgain">
  108. <view class="btn btn-primary" @click.stop="gotoAgainUseOrder(item)">再次使用订单</view>
  109. </view>
  110. </view>
  111. <!-- 换货中 -->
  112. <!-- '完成签约' = 5,
  113. '已申请-退货' = 13,
  114. '退款中' = 15,
  115. '退款成功' = 16,
  116. '退货成功' = 17,
  117. '换货-设备已回收' = 18, -->
  118. </view>
  119. <view v-else>
  120. <!-- 待激活 -->
  121. <view class="btns" v-if="item.orderStep == OrderStatus.待激活">
  122. <view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
  123. </view>
  124. </view>
  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. import { source } from "@/utils/network/difference";
  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. gotoOrderDetailsPay,
  172. gotoOrderDetails,
  173. gotoAgainUseOrder,
  174. gotoOrderSign,
  175. closeOrder
  176. } = useOrderSkip();
  177. //激活订单
  178. const toActiveOrder = (item) => {
  179. gotoActiveOrder(item);
  180. showActiveOrder.value = false;
  181. }
  182. //获取车牌颜色文字
  183. const getVehiclePlateColor = (id : number) => {
  184. const colors = vehiclePlateColor.filter(item => item.id == id);
  185. return colors[0].color
  186. }
  187. </script>
  188. <style lang="scss" scoped>
  189. .item {
  190. background: #ffffff;
  191. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  192. border-radius: 20rpx;
  193. box-sizing: border-box;
  194. display: flex;
  195. flex-direction: column;
  196. margin: 30rpx 30rpx 0rpx;
  197. }
  198. .bg-white .item {
  199. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  200. }
  201. .item .head {
  202. display: flex;
  203. justify-content: space-between;
  204. align-items: center;
  205. padding: 20rpx 28rpx;
  206. border-bottom: 1px solid #dcdcdc;
  207. }
  208. .item .head {
  209. .head-row {
  210. display: flex;
  211. width: 100%;
  212. justify-content: space-between;
  213. align-items: center;
  214. }
  215. .name {}
  216. .name>text {
  217. font-size: 26rpx;
  218. font-family: Noto Sans S Chinese;
  219. font-weight: 400;
  220. color: #999999;
  221. line-height: 36rpx;
  222. }
  223. }
  224. .item .head .icon {
  225. width: 48rpx;
  226. height: 48rpx;
  227. }
  228. .item .head .name {
  229. display: flex;
  230. align-items: center;
  231. }
  232. .text-green {
  233. font-size: 26rpx;
  234. color: #00b38b;
  235. }
  236. .text-orange {
  237. font-size: 26rpx;
  238. color: #ff8000;
  239. }
  240. .text-black {
  241. font-size: 28rpx;
  242. color: #333;
  243. font-weight: 500;
  244. }
  245. .title {
  246. font-size: 30rpx;
  247. color: #333;
  248. }
  249. .tag-green {
  250. font-size: 22rpx;
  251. height: 40rpx;
  252. line-height: 40rpx;
  253. padding: 0 12rpx;
  254. border-radius: 6rpx;
  255. background: #d9f4ee;
  256. color: #00b38b;
  257. }
  258. .tag-grey {
  259. font-size: 22rpx;
  260. height: 40rpx;
  261. line-height: 40rpx;
  262. padding: 0 12rpx;
  263. border-radius: 6rpx;
  264. background: #e8e8e8;
  265. color: #666;
  266. }
  267. .detail {
  268. display: flex;
  269. justify-content: space-between;
  270. align-items: center;
  271. padding: 30rpx 32rpx;
  272. }
  273. .detail .type {
  274. font-size: 26rpx;
  275. color: #999;
  276. }
  277. .detail .value {
  278. font-size: 26rpx;
  279. color: #333;
  280. }
  281. .finished .detail .value {
  282. color: #999;
  283. }
  284. .detail .odd {
  285. margin: 20rpx 0;
  286. }
  287. .cny {
  288. font-size: 26rpx;
  289. color: #333;
  290. }
  291. .finished .cny {
  292. color: #999;
  293. }
  294. .amount {
  295. font-size: 40rpx;
  296. font-weight: bold;
  297. }
  298. .bottom .amount {
  299. color: #ff8000;
  300. }
  301. .finished .amount {
  302. color: #999;
  303. }
  304. .btns {
  305. position: relative;
  306. display: flex;
  307. align-items: center;
  308. justify-content: flex-end;
  309. border-top: 1px solid #dcdcdc;
  310. margin: 0 30rpx;
  311. padding: 20rpx 0;
  312. }
  313. .bottom {
  314. display: flex;
  315. justify-content: space-between;
  316. align-items: center;
  317. border-top: 1px solid #dcdcdc;
  318. margin: 0 30rpx;
  319. padding: 20rpx 0;
  320. }
  321. .btn {
  322. height: 60rpx;
  323. line-height: 58rpx;
  324. border-radius: 30rpx;
  325. padding: 0 24rpx;
  326. font-size: 23rpx;
  327. box-sizing: border-box;
  328. margin-right: 12rpx;
  329. }
  330. .btns .btn:last-child {
  331. margin: 0;
  332. }
  333. .btns .state {
  334. position: absolute;
  335. left: 0;
  336. font-size: 26rpx;
  337. font-family: Noto Sans S Chinese;
  338. font-weight: 400;
  339. color: #999999;
  340. line-height: 58rpx;
  341. text {
  342. font-size: 26rpx;
  343. font-family: Noto Sans S Chinese;
  344. font-weight: 400;
  345. color: #00B38B;
  346. line-height: 58rpx;
  347. }
  348. }
  349. .btn-primary {
  350. border: 1px solid #00b38b;
  351. color: #00b38b;
  352. }
  353. .btn-disable {
  354. border: 1px solid #999;
  355. color: #999;
  356. }
  357. .btn-normal {
  358. border: 1px solid #dcdcdc;
  359. color: #333;
  360. }
  361. .evaluation {
  362. display: flex;
  363. }
  364. </style>