您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

order-list-item-new.vue 10KB

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