order-pay-list.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view class="container cashier">
  3. <view class="pay-title" @click="handlePayunder">
  4. <view class="content">
  5. 因线上支付政策调整,请对每家店铺分别进行线上付款;若需要直接转账支付订单,请点击右侧箭头查看线下转账信息。
  6. <view class="content-icon"> <text class="iconfont icon-xiayibu"></text> </view>
  7. </view>
  8. </view>
  9. <view class="pay-content">
  10. <view class="pay-list" v-for="(list, index) in list" :key="index">
  11. <view class="pay-list-title">{{ list.shopName }}</view>
  12. <view class="pay-list-goods" v-for="(pros, prosIndex) in list.orderProductList" :key="prosIndex">
  13. <view class="pay-list-image"> <image :src="pros.image" class="image" mode=""></image> </view>
  14. <view class="pay-list-info">
  15. <view class="info-title">{{ pros.name }}</view>
  16. <view class="info-view" v-if="pros.productUnit != ''"> 规格:{{ pros.productUnit ? pros.productUnit : '' }} </view>
  17. <view class="info-view" v-if="pros.productCode != '' && pros.productCode != null">
  18. 商品编码:{{ pros.productCode ? pros.productCode : '' }}
  19. </view>
  20. <view class="info-price">
  21. <view class="price">¥{{ pros.price | NumFormat }}</view>
  22. <view class="count"><text class="sm">X</text> {{ pros.num }}</view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="pay-list-msg">
  27. <view class="list-msg" v-if="list.receiptAmount > 0"
  28. >已付:<text class="text">¥{{ list.receiptAmount | NumFormat }}</text></view
  29. >
  30. <view class="list-msg" v-if="list.eachDiscount > 0"
  31. >优惠:<text class="text">¥{{ list.eachDiscount | NumFormat }}</text></view
  32. >
  33. </view>
  34. <view class="pay-list-btn">
  35. <view class="btn" v-if="list.receiptStatus != 3" @click="handlePayOrder(list.shopOrderId)">付款</view>
  36. <view class="list-msg" v-if="list.obligation > 0"
  37. >待付:<text class="text red">¥{{ list.obligation | NumFormat }}</text></view
  38. >
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. orderId: 0,
  49. list: []
  50. }
  51. },
  52. onLoad(option) {
  53. this.initData(option)
  54. },
  55. filters: {
  56. NumFormat(value) {
  57. //处理金额
  58. if (value) {
  59. return Number(value).toFixed(2)
  60. } else {
  61. return '0.00'
  62. }
  63. }
  64. },
  65. methods: {
  66. initData(e) {
  67. console.log(e)
  68. this.orderId = e.orderId
  69. this.payOrderId = '#' + e.orderId + '#'
  70. this.PayOrderShoporders(this.orderId)
  71. },
  72. PayOrderShoporders(orderId) {
  73. this.PayService.PayOrderShoporders({ orderId: orderId })
  74. .then(response => {
  75. this.list = response.data
  76. })
  77. .catch(error => {
  78. this.$util.msg(error.msg, 2000)
  79. })
  80. },
  81. handlePayOrder(shopOrderId){
  82. this.$api.navigateTo(`/pages/user/order/order-payment?shopOrderId=${shopOrderId}`)
  83. },
  84. handlePayunder(){
  85. this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${this.orderId}`)
  86. }
  87. },
  88. onShow() {}
  89. }
  90. </script>
  91. <style lang="scss">
  92. page {
  93. height: auto !important;
  94. background-color: #f7f7f7;
  95. }
  96. .cashier {
  97. width: 100%;
  98. }
  99. .pay-title {
  100. width: 100%;
  101. height: 182rpx;
  102. box-sizing: border-box;
  103. padding: 24rpx 24rpx 0 24rpx;
  104. background-color: #ffffff;
  105. .content {
  106. width: 100%;
  107. height: 100%;
  108. position: relative;
  109. box-sizing: border-box;
  110. padding: 20rpx 100rpx 20rpx 24rpx;
  111. background: url(https://static.caimei365.com/app/img/bg/pay-bgtitle@2x.png) no-repeat;
  112. background-size: cover;
  113. line-height: 40rpx;
  114. font-size: $font-size-26;
  115. text-align: justify;
  116. color: $color-system;
  117. .content-icon {
  118. width: 40rpx;
  119. height: 100%;
  120. position: absolute;
  121. top: 0;
  122. right: 24rpx;
  123. line-height: 158rpx;
  124. .iconfont {
  125. font-size: $font-size-34;
  126. color: $color-system;
  127. text-align: right;
  128. }
  129. }
  130. }
  131. }
  132. .pay-content {
  133. width: 100%;
  134. height: auto;
  135. .pay-list {
  136. width: 100%;
  137. height: auto;
  138. padding: 30rpx 24rpx 30rpx 24rpx;
  139. box-sizing: border-box;
  140. background-color: #ffffff;
  141. margin-bottom: 20rpx;
  142. .pay-list-title {
  143. width: 100%;
  144. height: 42rpx;
  145. line-height: 42rpx;
  146. font-size: $font-size-30;
  147. color: #333333;
  148. margin-bottom: 20rpx;
  149. }
  150. .pay-list-goods {
  151. width: 100%;
  152. height: 180rpx;
  153. margin-bottom: 30rpx;
  154. .pay-list-image {
  155. width: 180rpx;
  156. height: 180rpx;
  157. box-sizing: border-box;
  158. border: 1px solid #e1e1e1;
  159. border-radius: 8rpx;
  160. float: left;
  161. margin-right: 13rpx;
  162. .image {
  163. width: 100%;
  164. height: 100%;
  165. display: block;
  166. border-radius: 8rpx;
  167. }
  168. }
  169. .pay-list-info {
  170. width: 508rpx;
  171. height: 100%;
  172. float: right;
  173. .info-title {
  174. width: 100%;
  175. display: inline-block;
  176. height: auto;
  177. text-overflow: ellipsis;
  178. display: -webkit-box;
  179. word-break: break-all;
  180. -webkit-box-orient: vertical;
  181. -webkit-line-clamp: 2;
  182. overflow: hidden;
  183. line-height: 38rpx;
  184. font-size: $font-size-28;
  185. color: #333333;
  186. }
  187. .info-view {
  188. height: 40rpx;
  189. line-height: 40rpx;
  190. color: #999999;
  191. text-overflow: ellipsis;
  192. display: -webkit-box;
  193. word-break: break-all;
  194. -webkit-box-orient: vertical;
  195. -webkit-line-clamp: 2;
  196. overflow: hidden;
  197. font-size: $font-size-22;
  198. color: #999999;
  199. }
  200. .info-price {
  201. height: 40rpx;
  202. width: 100%;
  203. float: left;
  204. line-height: 40rpx;
  205. font-size: $font-size-26;
  206. .price {
  207. color: #333333;
  208. float: left;
  209. }
  210. .count {
  211. float: right;
  212. color: #666666;
  213. .sm{
  214. font-size: $font-size-22;
  215. }
  216. }
  217. }
  218. }
  219. }
  220. .pay-list-msg {
  221. width: 100%;
  222. height: 40rpx;
  223. line-height: 40rpx;
  224. font-size: $font-size-26;
  225. margin-bottom: 30rpx;
  226. .list-msg {
  227. float: right;
  228. margin-left: 30rpx;
  229. font-size: $font-size-26;
  230. color: #333333;
  231. font-weight: bold;
  232. .text {
  233. font-weight: normal;
  234. &.red {
  235. color: #f94b4b;
  236. }
  237. }
  238. }
  239. }
  240. .pay-list-btn {
  241. width: 100%;
  242. height: 64rpx;
  243. .btn {
  244. width: 160rpx;
  245. height: 64rpx;
  246. line-height: 64rpx;
  247. background: $btn-confirm;
  248. font-size: $font-size-26;
  249. text-align: center;
  250. float: right;
  251. color: #ffffff;
  252. border-radius: 32rpx;
  253. }
  254. .list-msg {
  255. float: right;
  256. line-height: 64rpx;
  257. margin-right: 40rpx;
  258. font-size: $font-size-26;
  259. color: #333333;
  260. font-weight: bold;
  261. .text {
  262. font-weight: normal;
  263. &.red {
  264. color: #f94b4b;
  265. }
  266. }
  267. }
  268. }
  269. }
  270. }
  271. </style>