receipt-details.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template name="information">
  2. <view class="information-template">
  3. <!-- 订单信息 -->
  4. <view class="list-title clearfix" @click.stop="orderDetail(order.shopOrderId)">
  5. <view class="list-title-t">
  6. <view class="list-title-tip">
  7. <text
  8. class="badges"
  9. :class="{
  10. success: order.orderType === 1,
  11. warning: order.orderType === 0
  12. }"
  13. >{{ order.orderType | formatOrderType }}</text
  14. >
  15. </view>
  16. <view class="list-title-tag">
  17. <text class="badges">{{ order.organizeId | organizeName }}</text>
  18. </view>
  19. <view class="list-title-num">{{ order.status | stateExpFormat }}</view>
  20. </view>
  21. <view class="list-title-b">
  22. 客户名称:<text class="text">{{ order.userName ? order.userName : '无' }}</text>
  23. </view>
  24. <view class="list-title-b">
  25. 子订单编号:<text class="text">{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text>
  26. </view>
  27. <view class="list-title-b">
  28. 下单日期:<text class="text">{{ order.orderTime }}</text>
  29. </view>
  30. <view class="list-title-b">
  31. <view class="list-title-b-item ">
  32. 子订单金额:<text class="text">¥{{ order.totalAmount | NumFormat }}</text>
  33. </view>
  34. <view class="list-title-b-item ">
  35. 余额抵扣:<text class="text">¥{{ order.accountAmount | NumFormat }}</text>
  36. </view>
  37. </view>
  38. <view class="list-title-b">
  39. <view class="list-title-b-item ">
  40. 应收金额:<text class="text">¥{{ order.realPay | NumFormat }}</text>
  41. </view>
  42. <view class="list-title-b-item ">
  43. 已收金额:<text class="text">¥{{ order.receiptAmount | NumFormat }}</text>
  44. </view>
  45. </view>
  46. <view class="list-title-b">
  47. <view class="list-title-b-item ">
  48. 剩余应收:<text class="text">¥{{ order.surplusAmount | NumFormat }}</text>
  49. </view>
  50. <view class="list-title-b-item ">
  51. 待审金额:<text class="text">¥{{ order.unCheckAmount | NumFormat }}</text>
  52. </view>
  53. </view>
  54. <view class="list-title-b">
  55. 经理折扣:
  56. <text class="text" v-if="order.discountFee - order.returnedPurchaseFee > 0">
  57. ¥{{ order.discountFee - order.returnedPurchaseFee }}
  58. <text>
  59. (原¥{{ order.discountFee }} 折扣取消¥{{
  60. order.discountFee - order.returnedPurchaseFee > 0
  61. ? order.returnedPurchaseFee
  62. : order.discountFee
  63. }})
  64. </text>
  65. </text>
  66. <text class="text" v-else>¥0.00(原¥0.00折扣取消¥0.00)</text>
  67. </view>
  68. <view class="list-title-b" v-if="order.returnedPurchaseFee > 0">
  69. 退货退款:
  70. <text class="text">
  71. (原¥{{ order.returnedPurchaseFee }} 折扣取消¥{{
  72. j.discountFee - j.returnedPurchaseFee > 0 ? order.returnedPurchaseFee : order.discountFee
  73. }})
  74. </text>
  75. </view>
  76. </view>
  77. </view>
  78. </template>
  79. <script>
  80. export default {
  81. name: 'information',
  82. props: {
  83. orderInfo: {
  84. type: Object
  85. }
  86. },
  87. data() {
  88. return {
  89. order: {}
  90. }
  91. },
  92. created() {
  93. this.initData(this.orderInfo)
  94. },
  95. watch: {
  96. orderInfo: {
  97. handler: function(val) {
  98. this.initData(val)
  99. },
  100. deep: true //对象内部的属性监听,也叫深度监听
  101. }
  102. },
  103. methods: {
  104. initData(data) {
  105. this.order = data
  106. },
  107. orderDetail(id) {
  108. //订单详情跳转
  109. this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${id}`)
  110. }
  111. }
  112. }
  113. </script>
  114. <style lang="scss">
  115. .list-title {
  116. width: 100%;
  117. height: auto;
  118. .list-title-t {
  119. width: 100%;
  120. height: 50rpx;
  121. float: left;
  122. font-size: $font-size-24;
  123. padding-bottom: 10rpx;
  124. .list-title-tip {
  125. float: left;
  126. .badges {
  127. display: block;
  128. float: left;
  129. padding: 0 15rpx;
  130. height: 40rpx;
  131. line-height: 40rpx;
  132. border-radius: 20rpx;
  133. font-size: $font-size-24;
  134. text-align: center;
  135. background-color: #f0f9eb;
  136. color: #67c23a;
  137. text-align: center;
  138. &.success {
  139. background-color: #ecf5ff;
  140. color: #409eff;
  141. }
  142. &.warning {
  143. background-color: #fdf6ec;
  144. color: #e6a23c;
  145. }
  146. }
  147. }
  148. .list-title-tag {
  149. float: left;
  150. margin-left: 20rpx;
  151. .badges {
  152. display: block;
  153. float: left;
  154. padding: 0 15rpx;
  155. height: 40rpx;
  156. line-height: 40rpx;
  157. border-radius: 20rpx;
  158. background-color: #ecf5ff;
  159. color: #409eff;
  160. font-size: $font-size-22;
  161. text-align: center;
  162. }
  163. }
  164. .list-title-num {
  165. float: left;
  166. text-align: left;
  167. color: #42b983;
  168. line-height: 40rpx;
  169. margin-left: 20rpx;
  170. font-size: $font-size-24;
  171. }
  172. }
  173. .list-title-b {
  174. width: 100%;
  175. height: 44rpx;
  176. float: left;
  177. font-size: $font-size-24;
  178. line-height: 44rpx;
  179. color: #666666;
  180. text-align: left;
  181. .text {
  182. color: #999999;
  183. }
  184. .list-title-b-item {
  185. width: 50%;
  186. height: 100%;
  187. float: left;
  188. }
  189. &.sms {
  190. height: auto;
  191. text-overflow: ellipsis;
  192. overflow: hidden;
  193. display: -webkit-box;
  194. -webkit-line-clamp: 2;
  195. line-clamp: 2;
  196. -webkit-box-orient: vertical;
  197. }
  198. }
  199. }
  200. </style>