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

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