index_details_mall.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <template>
  2. <view class="orderGoods">
  3. <view class='total' v-if="is_behalf"><text>
  4. {{ $t(`代付金额`) }}:
  5. <text class="pay-price">¥{{ pay_price }}</text>
  6. </text>
  7. </view>
  8. <view class='total' v-else-if="!split && !is_behalf">{{ $t(`商品信息`) }}</view>
  9. <view class='total' v-else-if="split">
  10. <text>{{ $t(`订单包裹`) }} {{ index + 1 }}</text>
  11. <view class="rig-btn" v-if="status_type === -1">
  12. <view class="refund">{{ $t(`申请退款中`) }}</view>
  13. </view>
  14. <view class="rig-btn" v-else-if="status_type === -2">
  15. <view class="refund">{{ $t(`已退款`) }}</view>
  16. </view>
  17. <view class="rig-btn" v-else-if="status_type === 4">
  18. <view class="done">{{ $t(`已完成`) }}</view>
  19. </view>
  20. </view>
  21. <view class='goodWrapper'>
  22. <view class='' v-for="(item, index) in cartInfo" :key="index" @click="jumpCon(item.id)">
  23. <view class="item acea-row row-between-wrapper">
  24. <view class='pictrue'>
  25. <image :src='item.goodsImg'></image>
  26. </view>
  27. <view class='text'>
  28. <view class='acea-row row-between-wrapper'>
  29. <view class='name line1'>{{ item.goodsName }}</view>
  30. <!-- <view class='num'>x {{item.totalSales}}</view> -->
  31. </view>
  32. <view class='attr line1'>{{ item.goodsSpecNames }}
  33. </view>
  34. <view class='money font-color pic' v-if="item.salePrice">
  35. <text :class="{ gray: !item.isSale }">
  36. {{ $t(`¥`) }}{{ item.salePrice - 0 }}
  37. </text>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- <view class="botton-btn">
  42. <view class='logistics' v-if="item.is_reply==0 && evaluate==3 && pid != -1 && isShow"
  43. @click.stop="evaluateTap(item.unique,orderId)">
  44. {{$t(`评价`)}}</view>
  45. <view class='logistics'
  46. v-if="paid === 1 && refund_status === 0 && item.refund_num !=item.cart_num && !is_confirm && isShow"
  47. @click.stop="openSubcribe(item)">
  48. {{$t(`申请退款`)}}</view>
  49. <view class="rig-btn" v-if="status_type === 2 && index === cartInfo.length - 1 || !split">
  50. <view v-if="delivery_type === 'express'" class="logistics" @click.stop="logistics(orderId)">{{$t(`查看物流`)}}
  51. </view>
  52. <view class="logistics sure" v-if="status_type === 2" @click.stop="confirmOrder(orderId)">{{$t(`确认收货`)}}
  53. </view>
  54. </view>
  55. </view> -->
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. props: {
  63. // 订单状态
  64. statusType: {
  65. type: Number,
  66. default: 0,
  67. },
  68. evaluate: {
  69. type: Number,
  70. default: 0,
  71. },
  72. oid: {
  73. type: Number,
  74. default: 0,
  75. },
  76. // 1已支付 0未支付
  77. paid: {
  78. type: Number,
  79. default: 0,
  80. },
  81. cartInfo: {
  82. type: Array,
  83. default: function () {
  84. return [];
  85. }
  86. },
  87. orderId: {
  88. type: String,
  89. default: '',
  90. },
  91. shipping_type: {
  92. type: Number,
  93. default: -1,
  94. },
  95. delivery_type: {
  96. type: String,
  97. default: '',
  98. },
  99. pay_price: {
  100. type: String,
  101. default: '',
  102. },
  103. jump: {
  104. type: Boolean,
  105. default: false,
  106. },
  107. is_confirm: {
  108. type: Boolean,
  109. default: false,
  110. },
  111. // is_behalf 是否是代付列表
  112. is_behalf: {
  113. type: Boolean,
  114. default: false,
  115. },
  116. split: {
  117. type: Boolean,
  118. default: false,
  119. },
  120. jumpDetail: {
  121. type: Boolean,
  122. default: false,
  123. },
  124. index: {
  125. type: Number,
  126. default: 0,
  127. },
  128. pid: {
  129. type: Number,
  130. default: 0,
  131. },
  132. refund_status: {
  133. type: Number,
  134. default: 0,
  135. },
  136. status_type: {
  137. type: Number,
  138. default: 0,
  139. },
  140. isShow: {
  141. type: Boolean,
  142. default: true,
  143. },
  144. },
  145. data() {
  146. return {
  147. totalNmu: 0,
  148. operationModel: false,
  149. status: "",
  150. };
  151. },
  152. watch: {
  153. cartInfo: function (nVal, oVal) {
  154. let num = 0
  155. nVal.forEach((item, index) => {
  156. num += item.totalSales - 0
  157. })
  158. this.totalNmu = num
  159. }
  160. },
  161. mounted() {
  162. let num = 0
  163. this.$nextTick(() => {
  164. this.cartInfo.forEach((item, index) => {
  165. num += item.cart_num
  166. })
  167. console.log(num)
  168. this.$set(this, 'totalNmu', num)
  169. })
  170. },
  171. methods: {
  172. evaluateTap: function (unique, orderId) {
  173. uni.navigateTo({
  174. url: "/pages/goods/goods_comment_con/index?unique=" + unique + "&uni=" + orderId
  175. })
  176. },
  177. jumpCon(id) {
  178. if (this.jump) {
  179. uni.navigateTo({
  180. url: `/pages/goods_details/index?id=${id}`
  181. })
  182. } else if (this.jumpDetail) {
  183. uni.navigateTo({
  184. url: `/pages/goods/order_details/index?order_id=${this.orderId}`
  185. })
  186. }
  187. },
  188. logistics(order_id) {
  189. uni.navigateTo({
  190. url: '/pages/goods/goods_logistics/index?orderId=' + order_id
  191. })
  192. },
  193. confirmOrder(orderId) {
  194. this.$emit('confirmOrder', orderId)
  195. },
  196. changeOperation() {
  197. this.operationModel = !this.operationModel
  198. },
  199. openSubcribe(item) {
  200. let cartList = [];
  201. cartList.push({
  202. cart_id: item.id,
  203. cart_num: item.surplus_refund_num
  204. })
  205. let obj = JSON.stringify(cartList);
  206. this.$emit('openSubcribe',
  207. `/pages/goods/goods_return/index?orderId=${this.orderId}&id=${this.oid}&cartIds=${obj}`)
  208. },
  209. }
  210. }
  211. </script>
  212. <style scoped lang="scss">
  213. .name {
  214. width: 100% !important;
  215. }
  216. .fontcolor {
  217. color: #e93323;
  218. }
  219. .orderGoods {
  220. background-color: #fff;
  221. }
  222. .orderGoods .total {
  223. display: flex;
  224. justify-content: space-between;
  225. align-items: center;
  226. width: 100%;
  227. // height: 86rpx;
  228. padding: 0 30rpx;
  229. border-bottom: 2rpx solid #f0f0f0;
  230. font-size: 30rpx;
  231. color: #282828;
  232. line-height: 86rpx;
  233. box-sizing: border-box;
  234. }
  235. .botton-btn {
  236. display: flex;
  237. align-items: right;
  238. justify-content: flex-end;
  239. padding: 0rpx 20rpx 20rpx 20rpx;
  240. }
  241. .rig-btn {
  242. display: flex;
  243. align-items: center;
  244. .refund {
  245. font-size: 26rpx;
  246. color: #e93323;
  247. }
  248. .done {
  249. font-size: 26rpx;
  250. color: #F19D2F;
  251. }
  252. }
  253. .logistics {
  254. // height: 46rpx;
  255. line-height: 30rpx;
  256. color: #666666;
  257. font-size: 20rpx;
  258. border: 1px solid #CCCCCC;
  259. border-radius: 30rpx;
  260. padding: 8rpx 22rpx;
  261. margin-left: 10rpx;
  262. }
  263. .sure {
  264. color: #e93323;
  265. border: 1px solid #e93323;
  266. }
  267. .more-operation {
  268. display: flex;
  269. justify-content: center;
  270. align-items: center;
  271. padding: 10rpx 0;
  272. color: #bbb;
  273. }
  274. .b-top {
  275. margin-left: 30rpx;
  276. margin-right: 30rpx;
  277. border-top: 1px solid #f0f0f0
  278. }
  279. .fade-enter-active,
  280. .fade-leave-active {
  281. transition: all 0.1s;
  282. }
  283. .fade-enter,
  284. .fade-leave-to
  285. /* .fade-leave-active below version 2.1.8 */
  286. {
  287. opacity: 0;
  288. transform: translateY(-10px);
  289. }
  290. .op {
  291. opacity: 0.5;
  292. }
  293. .gray {
  294. filter: grayscale(100%);
  295. filter: gray;
  296. }
  297. .pic {
  298. display: flex;
  299. justify-content: space-between;
  300. }
  301. .valid {
  302. margin-left: 20rpx;
  303. font-size: 24rpx;
  304. }
  305. .pay-price {
  306. color: #E93323;
  307. }
  308. .refund {
  309. text-align: right;
  310. font-size: 26rpx;
  311. color: var(--view-theme);
  312. }
  313. </style>