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

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