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

2 years ago
2 years ago
10 months ago
2 years ago
10 months ago
10 months ago
10 months ago
10 months ago
2 years ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
10 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
10 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
10 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
10 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
10 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
10 months ago
2 years ago
2 years ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  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 class="content">
  15. <view class="picture">
  16. <view>
  17. <view style="padding-bottom: 10rpx;">
  18. <text>车牌颜色:</text>
  19. <text>{{getVehiclePlateColor(item.vehiclePlateColor)}}</text>
  20. </view>
  21. <view>
  22. <text>产品名称:</text>
  23. <text>{{item.productName ?item.productName: ''}}</text>
  24. </view>
  25. </view>
  26. <view>
  27. <view v-if="item.orderStatus == OrderStatus.已取消">
  28. <image class="tupian" :src="`${$imgUrl}order/yiquxiao.png`" mode="aspectFill"></image>
  29. </view>
  30. <!--异地 orderStatus=-1,你判断这个remoteStatus 是字符串7,就显示审核未通过 -->
  31. <view
  32. v-else-if="item.orderStatus == OrderStatus.已取消 && item.remoteStatus=='7' && item.deviceType == deviceType">
  33. <image class="tupian" :src="`${$imgUrl}order/nopass.png`" mode="aspectFill"></image>
  34. </view>
  35. <view v-else
  36. :class="{'text-orange':item.orderStep == OrderStatus.已完成 || item.orderStep == OrderStatus.已结束
  37. || item.orderStep == OrderStatus['换货-设备已回收'] || item.orderStep == OrderStatus.退款成功 || item.orderStep == OrderStatus.退货成功}">
  38. <image class="tupian" v-if="item.orderStep==12 && item.reshipment==1"
  39. :src="`${$imgUrl}order/buhuozhong.png`" mode="aspectFill"></image>
  40. <image class="tupian" v-else
  41. :src="`${$imgUrl}order/${getOrderStatusNameNew(item.orderStep)}.png`" mode="aspectFill">
  42. </image>
  43. </view>
  44. </view>
  45. </view>
  46. <view>
  47. <text class="type">新办订单号:</text>
  48. <text class="value">{{item.orderNo}}</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. <!-- <view class="btns" v-if="item.orderStep == 'WAITING_ACTIVE'"> -->
  54. <!-- <view class="btn btn-normal" @click.stop="gotoReplenishmentOrder(item)"
  55. v-if="item.deviceType == deviceType">
  56. 申请补货</view> -->
  57. <!-- <view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view> -->
  58. <!-- <view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view> -->
  59. <!-- </view> -->
  60. <view v-if="item.orderStatus == 'NORMAL'">
  61. <view v-if="item.orderSource !== 'APP'">
  62. <view class="btns">
  63. <view v-if="(item.orderSource == 'WECHAT') && (item.orderStep=='ORDER_INIT'||item.orderStep=='CUSTOMER_UPLOAD')" class="btn btn-primary"
  64. @click.stop="gotoEditUserOrUnitInfo(item)">继续申请</view>
  65. <view v-if="item.orderStep=='VEHICLE_UPLOAD'" class="btn btn-primary"
  66. @click.stop="gotoOrderDetailsPay(item)">支付</view>
  67. <view v-if="item.orderStep=='WAITING_ACTIVE'" class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view>
  68. <view v-if="item.orderSource == 'WECHAT' && item.orderStep=='WAITING_ACTIVE' && item.shippingStatus == 'RECEIVED'" class="btn btn-normal" @click.stop="gotoReturnOrder(item)">申请退货</view>
  69. <view v-if="item.orderSource == 'WECHAT' && item.orderStep=='WAITING_ACTIVE' && item.shippingStatus == 'RECEIVED'" class="btn btn-normal" @click.stop="gotoExchangeOrder(item)">申请换货</view>
  70. <view v-if="item.orderSource == 'WECHAT' && item.orderStep=='WAITING_RECEIVE' && item.shippingStatus=='WAIT_RECEIVING'"
  71. class="btn btn-primary" @click.stop="gotoConfirmReceipt(item)">确认收货</view>
  72. <view v-if="item.orderSource == 'WECHAT' && item.canEvaluate== true" class="btn btn-primary" @click.stop="gotoEvaluateProduct(item)">去评价产品</view>
  73. <view v-if="item.orderStep=='ORDER_PAID'" class="btn btn-primary" @click.stop="gotoOrderSign(item)">签约
  74. </view>
  75. <view
  76. v-if="(item.orderSource == 'WECHAT') && (item.orderStep=='ORDER_INIT'||item.orderStep=='CUSTOMER_UPLOAD'||item.orderStep=='VEHICLE_UPLOAD'||item.orderStep=='ORDER_PAID'||item.orderStep=='ORDER_SIGNED'||item.orderStep=='WAITING_AUDIT'||item.orderStep=='AUDIT_FAIL'||item.orderStep=='WAITING_SEND')"
  77. class="btn btn-primary" @click.stop="gotoCancelOrder(item)">取消订单</view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <!-- 弹窗 -->
  83. <u-popup v-model="showActiveOrder" mode="center">
  84. <popup-active-order content="确认是否重新激活订单" @cancel="showActiveOrder = false" @confirm="toActiveOrder">
  85. </popup-active-order>
  86. </u-popup>
  87. </template>
  88. <script lang="ts" setup>
  89. import popupActiveOrder from "./popup-active-order.vue";
  90. import useOrderSkip from "@/composables/order/useOrderSkip";
  91. import { deviceType } from "@/utils/network/difference";
  92. import {
  93. getOrderStatusName,
  94. getOrderStatusNameNew,
  95. msg,
  96. getOrderTypeName
  97. } from "@/utils/utils";
  98. import {
  99. ref
  100. } from "vue";
  101. import {
  102. OrderStatus
  103. } from "@/datas/enum";
  104. import {
  105. vehiclePlateColor
  106. } from "@/datas/vehiclePlateColor";
  107. defineProps({
  108. item: {
  109. type: Object,
  110. default: () => ({}),
  111. },
  112. });
  113. //是否确认激活订单弹窗
  114. const showActiveOrder = ref(false);
  115. //办理订单按钮跳转业务逻辑
  116. const {
  117. gotoCancelOrder,
  118. gotoEditUserOrUnitInfo,
  119. gotoConfirmReceipt,
  120. gotoCheckLogistics,
  121. gotoEvaluateProduct,
  122. gotoActiveOrder,
  123. gotoPay,
  124. gotoReturnOrder,
  125. gotoExchangeOrder,
  126. gotoOrderDetailsPay,
  127. gotoOrderDetails,
  128. gotoAgainUseOrder,
  129. gotoOrderSign,
  130. closeOrder,
  131. gotoReplenishmentOrder,
  132. gotoAddressOrder,
  133. placeAnOrder
  134. } = useOrderSkip();
  135. //激活订单
  136. const toActiveOrder = (item) => {
  137. gotoActiveOrder(item);
  138. showActiveOrder.value = false;
  139. }
  140. //获取车牌颜色文字
  141. const getVehiclePlateColor = (id : number) => {
  142. console.log("id====", id, id)
  143. const colors = vehiclePlateColor.filter(item => item.id == id);
  144. return colors[0].color
  145. }
  146. </script>
  147. <style lang="scss" scoped>
  148. .item {
  149. background: #ffffff;
  150. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  151. border-radius: 20rpx;
  152. box-sizing: border-box;
  153. display: flex;
  154. flex-direction: column;
  155. margin: 30rpx 30rpx 0rpx;
  156. }
  157. .bg-white .item {
  158. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  159. }
  160. .item .head {
  161. display: flex;
  162. justify-content: space-between;
  163. align-items: center;
  164. padding: 20rpx 0;
  165. border-bottom: 1px solid #dcdcdc;
  166. width: 95%;
  167. margin: 0 auto;
  168. }
  169. .item .head {
  170. .head-row {
  171. display: flex;
  172. width: 100%;
  173. justify-content: space-between;
  174. align-items: center;
  175. }
  176. .name {}
  177. .name>text {
  178. font-size: 26rpx;
  179. font-family: Noto Sans S Chinese;
  180. font-weight: 400;
  181. color: #999999;
  182. line-height: 36rpx;
  183. }
  184. }
  185. .item .head .icon {
  186. width: 37rpx;
  187. height: 31rpx;
  188. }
  189. .item .head .name {
  190. display: flex;
  191. align-items: center;
  192. }
  193. .text-green {
  194. font-size: 26rpx;
  195. color: #00b38b;
  196. }
  197. .text-orange {
  198. font-size: 26rpx;
  199. color: #ff8000;
  200. }
  201. .text-black {
  202. font-size: 28rpx;
  203. color: #333;
  204. font-weight: 500;
  205. }
  206. .title {
  207. font-size: 30rpx !important;
  208. color: #333 !important;
  209. margin-left: 10rpx;
  210. font-weight: bold !important;
  211. }
  212. .tag-green {
  213. font-size: 22rpx;
  214. height: 40rpx;
  215. line-height: 40rpx;
  216. padding: 0 12rpx;
  217. border-radius: 6rpx;
  218. background: #d9f4ee;
  219. color: #00b38b;
  220. }
  221. .tag-grey {
  222. font-size: 22rpx;
  223. height: 40rpx;
  224. line-height: 40rpx;
  225. padding: 0 12rpx;
  226. border-radius: 6rpx;
  227. background: #e8e8e8;
  228. color: #666;
  229. }
  230. .detail {
  231. display: flex;
  232. justify-content: space-between;
  233. align-items: center;
  234. padding: 30rpx 32rpx;
  235. }
  236. .detail .type {
  237. font-size: 26rpx;
  238. color: #999;
  239. }
  240. .detail .value {
  241. font-size: 26rpx;
  242. color: #333;
  243. }
  244. .finished .detail .value {
  245. color: #999;
  246. }
  247. .detail .odd {
  248. margin: 20rpx 0;
  249. }
  250. .cny {
  251. font-size: 26rpx;
  252. color: #333;
  253. }
  254. .finished .cny {
  255. color: #999;
  256. }
  257. .amount {
  258. font-size: 40rpx;
  259. font-weight: bold;
  260. }
  261. .bottom .amount {
  262. color: #ff8000;
  263. }
  264. .finished .amount {
  265. color: #999;
  266. }
  267. .btns {
  268. position: relative;
  269. display: flex;
  270. align-items: center;
  271. justify-content: flex-end;
  272. border-top: 1px solid #dcdcdc;
  273. margin: 0 30rpx;
  274. padding: 20rpx 0;
  275. }
  276. .bottom {
  277. display: flex;
  278. justify-content: space-between;
  279. align-items: center;
  280. border-top: 1px solid #dcdcdc;
  281. margin: 0 30rpx;
  282. padding: 20rpx 0;
  283. }
  284. .btn {
  285. height: 60rpx;
  286. line-height: 58rpx;
  287. border-radius: 30rpx;
  288. padding: 0 24rpx;
  289. font-size: 23rpx;
  290. box-sizing: border-box;
  291. margin-right: 12rpx;
  292. }
  293. .btns .btn:last-child {
  294. margin: 0;
  295. }
  296. .btns .state {
  297. position: absolute;
  298. left: 0;
  299. font-size: 26rpx;
  300. font-family: Noto Sans S Chinese;
  301. font-weight: 400;
  302. color: #999999;
  303. line-height: 58rpx;
  304. text {
  305. font-size: 26rpx;
  306. font-family: Noto Sans S Chinese;
  307. font-weight: 400;
  308. color: #00B38B;
  309. line-height: 58rpx;
  310. }
  311. }
  312. .btn-primary {
  313. color: white;
  314. background-color: #133850;
  315. }
  316. .btn-disable {
  317. border: 1px solid #999;
  318. color: #999;
  319. }
  320. .btn-normal {
  321. border: 1px solid #133850;
  322. color: #133850;
  323. }
  324. .evaluation {
  325. display: flex;
  326. }
  327. .content {
  328. font-size: 26rpx;
  329. padding: 6rpx 20rpx;
  330. }
  331. .all {
  332. display: flex;
  333. justify-content: flex-end;
  334. align-items: center;
  335. margin-top: 10rpx;
  336. }
  337. .picture {
  338. display: flex;
  339. align-items: center;
  340. justify-content: space-between;
  341. margin: 10rpx 0;
  342. }
  343. .picture>view:first-child {
  344. width: 65%;
  345. }
  346. .xiao {
  347. background: #42D175;
  348. border-radius: 5rpx 5rpx 5rpx 5rpx;
  349. color: white;
  350. font-size: 20rpx;
  351. padding: 4rpx 6rpx;
  352. }
  353. .xianxia {
  354. background: #CCB375;
  355. border-radius: 5rpx 5rpx 5rpx 5rpx;
  356. color: white;
  357. font-size: 20rpx;
  358. padding: 4rpx 6rpx;
  359. }
  360. .tupian {
  361. width: 90rpx;
  362. height: 80rpx;
  363. }
  364. </style>