receipt-orderDetails.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <template name="information">
  2. <view class="information-template">
  3. <!-- 订单信息 -->
  4. <view class="modal-content-mask" @click.stop="handleClickCancel">
  5. <view class="modal-content-alert">
  6. <scroll-view class="modal-content-scroll" scroll-y="true">
  7. <view class="list-title clearfix">
  8. <view class="list-title-b"
  9. >进度:<text :style="{ color: formatColor(receiptInfo.receiptStatus) }">{{
  10. receiptInfo.receiptStatus | formatStateType
  11. }}</text>
  12. </view>
  13. <view class="list-title-b">
  14. <view class="list-title-b-item">
  15. 确认人:<text class="text">{{
  16. receiptInfo.confirmUserName ? receiptInfo.confirmUserName : '无'
  17. }}</text>
  18. </view>
  19. <view class="list-title-b-item ri">
  20. <text class="text">{{ receiptInfo.confirmDate ? receiptInfo.confirmDate : '无' }}</text>
  21. </view>
  22. </view>
  23. <view class="list-title-b">
  24. <view class="list-title-b-item">
  25. 审核人:<text class="text">{{
  26. receiptInfo.reviewUserName ? receiptInfo.reviewUserName : '无'
  27. }}</text>
  28. </view>
  29. <view class="list-title-b-item ri">
  30. <text class="text">{{ receiptInfo.reviewDate ? receiptInfo.reviewDate : '无' }}</text>
  31. </view>
  32. </view>
  33. <view class="list-title-b">
  34. 备注:<text>{{ receiptInfo.reviewReason }}</text>
  35. </view>
  36. </view>
  37. <view
  38. class="list-title item clearfix"
  39. v-for="(order, index) in receiptInfo.shopOrderList"
  40. :key="index"
  41. @click.stop="orderDetail(order.shopOrderId)"
  42. >
  43. <view class="list-title-t">
  44. <view class="list-title-tip">
  45. <text
  46. class="badges"
  47. :class="{
  48. success: order.orderType === 1,
  49. warning: order.orderType === 0
  50. }"
  51. >{{ order.orderType | formatOrderType }}</text
  52. >
  53. </view>
  54. <view class="list-title-tag">
  55. <text class="badges">{{ order.organizeId | organizeName }}</text>
  56. </view>
  57. <view class="list-title-num">{{ order.status | stateExpFormat }}</view>
  58. </view>
  59. <view class="list-title-b">
  60. 客户名称:<text class="text">{{ order.userName }}</text>
  61. </view>
  62. <view class="list-title-b">
  63. 订单编号:<text class="text">{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text>
  64. </view>
  65. <view class="list-title-b">
  66. 下单日期:<text class="text">{{ order.orderTime }}</text>
  67. </view>
  68. <view class="list-title-b">
  69. <view class="list-title-b-item ">
  70. 订单金额:<text class="text">¥{{ order.totalAmount | NumFormat }}</text>
  71. </view>
  72. <view class="list-title-b-item ">
  73. 余额抵扣:<text class="text">¥{{ order.accountAmount | NumFormat }}</text>
  74. </view>
  75. </view>
  76. <view class="list-title-b">
  77. <view class="list-title-b-item ">
  78. 应收金额:<text class="text">¥{{ order.realPay | NumFormat }}</text>
  79. </view>
  80. <view class="list-title-b-item ">
  81. 已收金额:<text class="text">¥{{ order.receiptAmount | NumFormat }}</text>
  82. </view>
  83. </view>
  84. <view class="list-title-b">
  85. <view class="list-title-b-item ">
  86. 剩余应收:<text class="text">¥{{ order.surplusAmount | NumFormat }}</text>
  87. </view>
  88. <view class="list-title-b-item ">
  89. 待审金额:<text class="text">¥{{ order.receiptAmount | NumFormat }}</text>
  90. </view>
  91. </view>
  92. <view class="list-title-b">
  93. 经理折扣:
  94. <text class="text" v-if="order.discountFee - order.returnedPurchaseFee > 0">
  95. ¥{{ order.discountFee - order.returnedPurchaseFee }}
  96. <text>
  97. (原¥{{ order.discountFee }} 折扣取消¥{{
  98. order.discountFee - order.returnedPurchaseFee > 0
  99. ? order.returnedPurchaseFee
  100. : order.discountFee
  101. }})
  102. </text>
  103. </text>
  104. <text class="text" v-else>¥0.00(原¥0.00折扣取消¥0.00)</text>
  105. </view>
  106. <view class="list-title-b" v-if="order.returnedPurchaseFee > 0">
  107. 退货退款:
  108. <text class="text">
  109. (原¥{{ order.returnedPurchaseFee }} 折扣取消¥{{
  110. j.discountFee - j.returnedPurchaseFee > 0
  111. ? order.returnedPurchaseFee
  112. : order.discountFee
  113. }})
  114. </text>
  115. </view>
  116. </view>
  117. </scroll-view>
  118. </view>
  119. </view>
  120. </view>
  121. </template>
  122. <script>
  123. export default {
  124. name: 'information',
  125. props: {
  126. receipt: {
  127. type: Object
  128. }
  129. },
  130. data() {
  131. return {
  132. receiptInfo: {}
  133. }
  134. },
  135. created() {
  136. this.initData(this.receipt)
  137. },
  138. watch: {
  139. orderInfo: {
  140. handler: function(val) {
  141. this.initData(val)
  142. },
  143. deep: true //对象内部的属性监听,也叫深度监听
  144. }
  145. },
  146. methods: {
  147. initData(data) {
  148. this.receiptInfo = data
  149. console.log('this.receiptInfo', this.receiptInfo)
  150. },
  151. formatColor(state) {
  152. //设置邀请码状态亚瑟
  153. let stateColor = '',
  154. stateColorObject = {
  155. 1: '#ff7900',
  156. 2: '#4cd964',
  157. 3: '#19be6b',
  158. 4: '#ed3f14',
  159. 5: '#F74D54'
  160. }
  161. Object.keys(stateColorObject).forEach(function(key) {
  162. if (key == state) {
  163. stateColor = stateColorObject[key]
  164. }
  165. })
  166. return stateColor
  167. },
  168. handleClickCancel() {
  169. // 隐藏
  170. this.$emit('cancel')
  171. },
  172. orderDetail(id) {
  173. //订单详情跳转
  174. this.$api.navigateTo(`/pages/relation/order/detail?orderId=${id}`)
  175. }
  176. }
  177. }
  178. </script>
  179. <style lang="scss">
  180. .modal-content-mask {
  181. width: 100%;
  182. height: 100%;
  183. background: rgba(0, 0, 0, 0.6);
  184. position: fixed;
  185. top: 0;
  186. left: 0;
  187. z-index: 1000;
  188. .modal-content-alert {
  189. width: 600rpx;
  190. height: 600rpx;
  191. padding: 24rpx;
  192. background: #ffffff;
  193. border-radius: 20rpx;
  194. position: absolute;
  195. top: 0;
  196. left: 0;
  197. bottom: 0;
  198. right: 0;
  199. margin: auto;
  200. overflow: hidden;
  201. .modal-content-scroll {
  202. width: 100%;
  203. height: 600rpx;
  204. padding-bottom: 24rpx;
  205. }
  206. }
  207. }
  208. .list-title {
  209. width: 100%;
  210. height: auto;
  211. padding: 12rpx 0;
  212. &.item {
  213. border-bottom: 1px solid #e1e1e1;
  214. &:last-child {
  215. border: none;
  216. }
  217. }
  218. .list-title-t {
  219. width: 100%;
  220. height: 50rpx;
  221. float: left;
  222. font-size: $font-size-24;
  223. padding-bottom: 10rpx;
  224. .list-title-tip {
  225. float: left;
  226. .badges {
  227. display: block;
  228. float: left;
  229. padding: 0 15rpx;
  230. padding: 0 15rpx;
  231. height: 40rpx;
  232. line-height: 40rpx;
  233. border-radius: 20rpx;
  234. font-size: $font-size-24;
  235. text-align: center;
  236. background-color: #f0f9eb;
  237. color: #67c23a;
  238. text-align: center;
  239. &.success {
  240. background-color: #ecf5ff;
  241. color: #409eff;
  242. }
  243. &.warning {
  244. background-color: #fdf6ec;
  245. color: #e6a23c;
  246. }
  247. }
  248. }
  249. .list-title-tag {
  250. float: left;
  251. margin-left: 20rpx;
  252. .badges {
  253. display: block;
  254. float: left;
  255. padding: 0 15rpx;
  256. height: 40rpx;
  257. line-height: 40rpx;
  258. border-radius: 20rpx;
  259. background-color: #ecf5ff;
  260. color: #409eff;
  261. font-size: $font-size-22;
  262. text-align: center;
  263. }
  264. }
  265. .list-title-num {
  266. float: left;
  267. text-align: left;
  268. color: #42b983;
  269. line-height: 40rpx;
  270. margin-left: 20rpx;
  271. font-size: $font-size-24;
  272. }
  273. }
  274. .list-title-b {
  275. width: 100%;
  276. height: 44rpx;
  277. float: left;
  278. font-size: $font-size-24;
  279. line-height: 44rpx;
  280. color: #666666;
  281. text-align: left;
  282. .text {
  283. color: #999999;
  284. }
  285. .list-title-b-item {
  286. width: 50%;
  287. height: 100%;
  288. float: left;
  289. &.ri {
  290. text-align: right;
  291. }
  292. }
  293. &.sms {
  294. height: auto;
  295. text-overflow: ellipsis;
  296. overflow: hidden;
  297. display: -webkit-box;
  298. -webkit-line-clamp: 2;
  299. line-clamp: 2;
  300. -webkit-box-orient: vertical;
  301. }
  302. }
  303. }
  304. </style>