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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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>
  14. </view>
  15. <view class="content">
  16. <view class="picture">
  17. <view>
  18. <view style="padding-bottom: 10rpx;">
  19. <text>车牌颜色:</text>
  20. <text>{{getVehiclePlateColor(item.vehiclePlateColor)}}</text>
  21. </view>
  22. <view>
  23. <text>产品名称:</text>
  24. <text>{{item.productName ?item.productName: ''}}</text>
  25. </view>
  26. </view>
  27. <view>
  28. <view v-if="item.orderStatus == OrderStatus.已取消">
  29. <image class="tupian" :src="`${$imgUrl}order/yiquxiao.png`" mode="aspectFill"></image>
  30. </view>
  31. <!--异地 orderStatus=-1,你判断这个remoteStatus 是字符串7,就显示审核未通过 -->
  32. <view
  33. v-else-if="item.orderStatus == OrderStatus.已取消 && item.remoteStatus=='7' && item.deviceType == deviceType">
  34. <image class="tupian" :src="`${$imgUrl}order/nopass.png`" mode="aspectFill"></image>
  35. </view>
  36. <view v-else
  37. :class="{'text-orange':item.orderStep == OrderStatus.已完成 || item.orderStep == OrderStatus.已结束
  38. || item.orderStep == OrderStatus['换货-设备已回收'] || item.orderStep == OrderStatus.退款成功 || item.orderStep == OrderStatus.退货成功}">
  39. <image class="tupian" v-if="item.orderStep==12 && item.reshipment==1"
  40. :src="`${$imgUrl}order/buhuozhong.png`" mode="aspectFill"></image>
  41. <image class="tupian" v-else :src="`${$imgUrl}order/${getOrderStatusNameNew(item.orderStep)}.png`"
  42. mode="aspectFill"></image>
  43. </view>
  44. </view>
  45. </view>
  46. <view>
  47. <text class="type">新办订单号:</text>
  48. <text class="value">{{item.orderId}}</text>
  49. </view>
  50. <view class="all">合计:<text class="cny">¥</text><text class="amount"
  51. v-if="item.amount">{{item.amount / 100}}</text><text class="amount" v-else>0.00</text></view>
  52. </view>
  53. <!-- item.orderSource==1 app -->
  54. <view v-if="item.orderStatus != OrderStatus.已取消 && !item.orderSource">
  55. <!-- 微信小程序正常 -->
  56. <view>
  57. <!-- 信息填写未完成 -->
  58. <view class="btns"
  59. v-if="item.orderStep == OrderStatus['完成个人/单位信息上传'] || item.orderStep == OrderStatus.完成填写基本信息 || item.orderStep == OrderStatus.完成车辆信息上传 || item.orderStep == OrderStatus.待支付3">
  60. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  61. <view class="btn btn-primary" @click.stop="gotoEditUserOrUnitInfo(item)">继续申请</view>
  62. </view>
  63. <!-- 待支付 -->
  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="gotoEditUserOrUnitInfo(item)">加购权益</view>
  67. </view>
  68. <view class="btns" v-if="item.orderStep == OrderStatus['完成车辆信息上传/待支付']">
  69. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  70. <view class="btn btn-primary" @click.stop="gotoOrderDetailsPay(item)">支付</view>
  71. </view>
  72. <view class="btns" v-if="item.orderStep == OrderStatus.待支付2">
  73. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  74. <view class="btn btn-primary" @click.stop="gotoOrderDetailsPay(item)">支付</view>
  75. </view>
  76. <view class="btns" v-if="item.orderStep == OrderStatus['已支付/待签约']">
  77. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  78. <view class="btn btn-primary" @click.stop="gotoOrderSign(item)">去签约</view>
  79. </view>
  80. <!-- 审核中/审核不通过 -->
  81. <view class="btns" v-if="item.orderStep == OrderStatus.待审核 || item.orderStep == OrderStatus.审核不通过">
  82. <!-- <view class="btn btn-normal" v-if="item.orderStep == OrderStatus.审核不通过"
  83. @click.stop="gotoEditUserOrUnitInfo(item)">修改资料</view> -->
  84. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  85. </view>
  86. <!-- 待发货 -->
  87. <view class="btns" v-else-if="item.orderStep == OrderStatus.待发货">
  88. <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
  89. </view>
  90. <!-- 待收货 -->
  91. <view class="btns" v-else-if="item.orderStep == OrderStatus.待收货">
  92. <view class="btn btn-normal" @click.stop="gotoCheckLogistics(item)">查看物流</view>
  93. <!-- 待收货异地 发货之后确认收货之前可以补货 -->
  94. <view class="btn btn-normal" @click.stop="gotoReplenishmentOrder(item)" v-if="item.deviceType == deviceType">
  95. 申请补货</view>
  96. <view class="btn btn-normal" @click.stop="gotoReturnOrder(item)" v-else>申请退货</view>
  97. <view class="btn btn-primary" @click.stop="gotoConfirmReceipt(item)">确认收货</view>
  98. <view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view>
  99. </view>
  100. <!-- 待激活 -->
  101. <view class="btns" v-else-if="item.orderStep == OrderStatus.待激活">
  102. <view class="btn btn-normal" @click.stop="gotoReturnOrder(item)"
  103. v-if="item.applyReturn || item.deviceType == deviceType">申请退货</view>
  104. <view class="btn btn-normal" @click.stop="gotoExchangeOrder(item)">申请换货</view>
  105. <view class="btn btn-normal" @click.stop="gotoReplenishmentOrder(item)" v-if="item.deviceType == deviceType">
  106. 申请补货</view>
  107. <view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
  108. <view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view>
  109. </view>
  110. <!-- ORDER_STEP_31(31, "异地-售前退货"),
  111. ORDER_STEP_32(32, "异地-售前退货后确认收货"),
  112. ORDER_STEP_33(33, "异地-售前换货"), 33包含换货和补货 如果item.orderType=='REPLENISHMENT'是补货 就不展示换货
  113. ORDER_STEP_34(34, "异地-售前换货后确认收货"),
  114. ORDER_STEP_35(35, "异地-下单-->
  115. <view class="btns" v-else-if="item.orderStep == 31">
  116. <view class="btn btn-primary" @click.stop="gotoReturnOrder(item)">退货</view>
  117. </view>
  118. <view class="btns" v-else-if="item.orderStep==33">
  119. <view class="btn btn-primary" @click.stop="gotoExchangeOrder(item)" v-if="item.orderType!='REPLENISHMENT'">换货
  120. </view>
  121. </view>
  122. <view class="btns" v-else-if="item.orderStep == 35">
  123. <view class="btn btn-primary" @click.stop="placeAnOrder(item)">下单</view>
  124. </view>
  125. <!-- 已完成 售后订单不允许评价产品,储值卡转记账卡除外-->
  126. <!-- 发行产品 isProduct=0; 业务员 isStaff=0; 权益 isEquity=0 业务服务 isService=0; -->
  127. <view class="btns"
  128. v-else-if="item.orderStep == OrderStatus.已完成 && (item.orderType =='ISSUE' || item.orderType =='VALUE_TO_ACCOUNT') ">
  129. <view class="btn btn-normal" v-if="( item.isProduct==1 && item.isService==1) ">
  130. 已评价
  131. </view>
  132. <view class='evaluation' v-else>
  133. <view class="btn btn-primary" v-if="item.isProduct==0 || item.isService==0"
  134. @click.stop="gotoEvaluateProduct(item)">去评价产品</view>
  135. </view>
  136. </view>
  137. <!-- 已结束 -->
  138. <view class="btns" v-else-if="item.orderStep == OrderStatus.已结束 && item.isUseAgain">
  139. <view class="btn btn-primary" @click.stop="gotoAgainUseOrder(item)">再次使用订单</view>
  140. </view>
  141. <!-- 异地-邮寄地址填写 -->
  142. <view class="btns" v-else-if="item.orderStep == OrderStatus.邮寄地址填写 && item.deviceType==deviceType">
  143. <view class="btn btn-primary" @click.stop="gotoAddressOrder(item)">邮寄地址填写</view>
  144. </view>
  145. </view>
  146. <!-- 换货中 -->
  147. <!-- '完成签约' = 5,
  148. '已申请-退货' = 13,
  149. '退款中' = 15,
  150. '退款成功' = 16,
  151. '退货成功' = 17,
  152. '换货-设备已回收' = 18, -->
  153. </view>
  154. <view v-else>
  155. <!-- 待激活 -->
  156. <view class="btns" v-if="item.orderStep == OrderStatus.待激活">
  157. <view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
  158. </view>
  159. </view>
  160. </view>
  161. <!-- 弹窗 -->
  162. <u-popup v-model="showActiveOrder" mode="center">
  163. <popup-active-order content="确认是否重新激活订单" @cancel="showActiveOrder = false" @confirm="toActiveOrder">
  164. </popup-active-order>
  165. </u-popup>
  166. </template>
  167. <script lang="ts" setup>
  168. import popupActiveOrder from "./popup-active-order.vue";
  169. import useOrderSkip from "@/composables/order/useOrderSkip";
  170. import { deviceType } from "@/utils/network/difference";
  171. import {
  172. getOrderStatusName,
  173. getOrderStatusNameNew,
  174. msg,
  175. getOrderTypeName
  176. } from "@/utils/utils";
  177. import {
  178. ref
  179. } from "vue";
  180. import {
  181. OrderStatus
  182. } from "@/datas/enum";
  183. import {
  184. vehiclePlateColor
  185. } from "@/datas/vehiclePlateColor";
  186. defineProps({
  187. item: {
  188. type: Object,
  189. default: () => ({}),
  190. },
  191. });
  192. //是否确认激活订单弹窗
  193. const showActiveOrder = ref(false);
  194. //办理订单按钮跳转业务逻辑
  195. const {
  196. gotoCancelOrder,
  197. gotoEditUserOrUnitInfo,
  198. gotoConfirmReceipt,
  199. gotoCheckLogistics,
  200. gotoEvaluateProduct,
  201. gotoActiveOrder,
  202. gotoReturnOrder,
  203. gotoExchangeOrder,
  204. gotoOrderDetailsPay,
  205. gotoOrderDetails,
  206. gotoAgainUseOrder,
  207. gotoOrderSign,
  208. closeOrder,
  209. gotoReplenishmentOrder,
  210. gotoAddressOrder,
  211. placeAnOrder
  212. } = useOrderSkip();
  213. //激活订单
  214. const toActiveOrder = (item) => {
  215. gotoActiveOrder(item);
  216. showActiveOrder.value = false;
  217. }
  218. //获取车牌颜色文字
  219. const getVehiclePlateColor = (id : number) => {
  220. console.log("id", id)
  221. const colors = vehiclePlateColor.filter(item => item.id == id);
  222. return colors[0].color
  223. }
  224. </script>
  225. <style lang="scss" scoped>
  226. .item {
  227. background: #ffffff;
  228. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  229. border-radius: 20rpx;
  230. box-sizing: border-box;
  231. display: flex;
  232. flex-direction: column;
  233. margin: 30rpx 30rpx 0rpx;
  234. }
  235. .bg-white .item {
  236. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  237. }
  238. .item .head {
  239. display: flex;
  240. justify-content: space-between;
  241. align-items: center;
  242. padding: 20rpx 0;
  243. border-bottom: 1px solid #dcdcdc;
  244. width: 95%;
  245. margin: 0 auto;
  246. }
  247. .item .head {
  248. .head-row {
  249. display: flex;
  250. width: 100%;
  251. justify-content: space-between;
  252. align-items: center;
  253. }
  254. .name {}
  255. .name>text {
  256. font-size: 26rpx;
  257. font-family: Noto Sans S Chinese;
  258. font-weight: 400;
  259. color: #999999;
  260. line-height: 36rpx;
  261. }
  262. }
  263. .item .head .icon {
  264. width: 37rpx;
  265. height: 31rpx;
  266. }
  267. .item .head .name {
  268. display: flex;
  269. align-items: center;
  270. }
  271. .text-green {
  272. font-size: 26rpx;
  273. color: #00b38b;
  274. }
  275. .text-orange {
  276. font-size: 26rpx;
  277. color: #ff8000;
  278. }
  279. .text-black {
  280. font-size: 28rpx;
  281. color: #333;
  282. font-weight: 500;
  283. }
  284. .title {
  285. font-size: 30rpx !important;
  286. color: #333 !important;
  287. margin-left: 10rpx;
  288. font-weight: bold !important;
  289. }
  290. .tag-green {
  291. font-size: 22rpx;
  292. height: 40rpx;
  293. line-height: 40rpx;
  294. padding: 0 12rpx;
  295. border-radius: 6rpx;
  296. background: #d9f4ee;
  297. color: #00b38b;
  298. }
  299. .tag-grey {
  300. font-size: 22rpx;
  301. height: 40rpx;
  302. line-height: 40rpx;
  303. padding: 0 12rpx;
  304. border-radius: 6rpx;
  305. background: #e8e8e8;
  306. color: #666;
  307. }
  308. .detail {
  309. display: flex;
  310. justify-content: space-between;
  311. align-items: center;
  312. padding: 30rpx 32rpx;
  313. }
  314. .detail .type {
  315. font-size: 26rpx;
  316. color: #999;
  317. }
  318. .detail .value {
  319. font-size: 26rpx;
  320. color: #333;
  321. }
  322. .finished .detail .value {
  323. color: #999;
  324. }
  325. .detail .odd {
  326. margin: 20rpx 0;
  327. }
  328. .cny {
  329. font-size: 26rpx;
  330. color: #333;
  331. }
  332. .finished .cny {
  333. color: #999;
  334. }
  335. .amount {
  336. font-size: 40rpx;
  337. font-weight: bold;
  338. }
  339. .bottom .amount {
  340. color: #ff8000;
  341. }
  342. .finished .amount {
  343. color: #999;
  344. }
  345. .btns {
  346. position: relative;
  347. display: flex;
  348. align-items: center;
  349. justify-content: flex-end;
  350. border-top: 1px solid #dcdcdc;
  351. margin: 0 30rpx;
  352. padding: 20rpx 0;
  353. }
  354. .bottom {
  355. display: flex;
  356. justify-content: space-between;
  357. align-items: center;
  358. border-top: 1px solid #dcdcdc;
  359. margin: 0 30rpx;
  360. padding: 20rpx 0;
  361. }
  362. .btn {
  363. height: 60rpx;
  364. line-height: 58rpx;
  365. border-radius: 30rpx;
  366. padding: 0 24rpx;
  367. font-size: 23rpx;
  368. box-sizing: border-box;
  369. margin-right: 12rpx;
  370. }
  371. .btns .btn:last-child {
  372. margin: 0;
  373. }
  374. .btns .state {
  375. position: absolute;
  376. left: 0;
  377. font-size: 26rpx;
  378. font-family: Noto Sans S Chinese;
  379. font-weight: 400;
  380. color: #999999;
  381. line-height: 58rpx;
  382. text {
  383. font-size: 26rpx;
  384. font-family: Noto Sans S Chinese;
  385. font-weight: 400;
  386. color: #00B38B;
  387. line-height: 58rpx;
  388. }
  389. }
  390. .btn-primary {
  391. color: white;
  392. background-color: #133850;
  393. }
  394. .btn-disable {
  395. border: 1px solid #999;
  396. color: #999;
  397. }
  398. .btn-normal {
  399. border: 1px solid #133850;
  400. color: #133850;
  401. }
  402. .evaluation {
  403. display: flex;
  404. }
  405. .content {
  406. font-size: 26rpx;
  407. padding: 6rpx 20rpx;
  408. }
  409. .all {
  410. display: flex;
  411. justify-content: flex-end;
  412. align-items: center;
  413. margin-top: 10rpx;
  414. }
  415. .picture {
  416. display: flex;
  417. align-items: center;
  418. justify-content: space-between;
  419. margin: 10rpx 0;
  420. }
  421. .picture>view:first-child {
  422. width: 65%;
  423. }
  424. .xiao {
  425. background: #42D175;
  426. border-radius: 5rpx 5rpx 5rpx 5rpx;
  427. color: white;
  428. font-size: 20rpx;
  429. padding: 4rpx 6rpx;
  430. }
  431. .xianxia {
  432. background: #CCB375;
  433. border-radius: 5rpx 5rpx 5rpx 5rpx;
  434. color: white;
  435. font-size: 20rpx;
  436. padding: 4rpx 6rpx;
  437. }
  438. .tupian {
  439. width: 90rpx;
  440. height: 80rpx;
  441. }
  442. </style>