Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

order-list-item-new.vue 14KB

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