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

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