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

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