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

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