order-pay-list.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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.cartList" :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.unit != ''"> 规格:{{ pros.unit ? pros.unit : '' }} </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.paidAmount > 0"
  28. >已付:<text class="text">¥{{ list.paidAmount | NumFormat }}</text></view
  29. >
  30. <view class="list-msg" v-if="list.coupon > 0"
  31. >优惠:<text class="text">¥{{ list.coupon | NumFormat }}</text></view
  32. >
  33. </view>
  34. <view class="pay-list-btn">
  35. <view class="btn" v-if="list.paystaut == 0">付款</view>
  36. <view class="list-msg" v-if="list.payAmount > 0"
  37. >待付:<text class="text red">¥{{ list.payAmount | 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. shopName: '浙江瑞琪',
  52. coupon: 20000,
  53. paidAmount: 2000,
  54. payAmount: 1000,
  55. paystaut: 0,
  56. cartList: [
  57. {
  58. name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
  59. unit: '10ml/盒',
  60. num: 1,
  61. price: 500000,
  62. productCode: 'SXSASDADA',
  63. image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
  64. },
  65. {
  66. name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
  67. unit: '10ml/盒',
  68. num: 1,
  69. price: 500000,
  70. productCode: 'SXSASDADA',
  71. image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
  72. }
  73. ]
  74. },
  75. {
  76. shopName: '华熙生物',
  77. coupon: 20000,
  78. paidAmount: 2000,
  79. payAmount: 1000,
  80. paystaut: 0,
  81. cartList: [
  82. {
  83. name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
  84. unit: '10ml/盒',
  85. num: 1,
  86. price: 500000,
  87. productCode: 'SXSASDADA',
  88. image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
  89. },
  90. {
  91. name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
  92. unit: '10ml/盒',
  93. num: 1,
  94. price: 500000,
  95. productCode: 'SXSASDADA',
  96. image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
  97. }
  98. ]
  99. },
  100. {
  101. shopName: '采美快递物流商',
  102. coupon: 0,
  103. paidAmount: 0,
  104. payAmount: 10,
  105. paystaut: 1,
  106. cartList: [
  107. {
  108. name: '运费',
  109. unit: '',
  110. num: 1,
  111. price: 10,
  112. image:
  113. 'https://www.caimei365.com/uploadFile/product/2020-04-16/DV8ZXHKHIA20200416112227.jpg'
  114. }
  115. ]
  116. }
  117. ]
  118. }
  119. },
  120. onLoad(option) {
  121. this.initData(option)
  122. },
  123. filters: {
  124. NumFormat(value) {
  125. //处理金额
  126. if (value) {
  127. return Number(value).toFixed(2)
  128. } else {
  129. return '0.00'
  130. }
  131. }
  132. },
  133. methods: {
  134. initData(e) {
  135. console.log(e)
  136. this.orderId = e.orderId
  137. this.payOrderId = '#' + e.orderId + '#'
  138. this.PayOrderCheckoutCounter(this.orderId)
  139. },
  140. PayOrderCheckoutCounter(orderId) {
  141. this.PayService.PayOrderCheckoutCounter({ orderId: orderId })
  142. .then(response => {
  143. let data = response.data.order
  144. this.payableAmount = data.payableAmount - data.receiptAmount //待付金额
  145. this.receiptStatus = data.receiptStatus
  146. this.onlinePayFlag = data.onlinePayFlag
  147. //判断线上线下显示
  148. if (this.optionType == 'onlinePay') {
  149. this.onlinePay = 2
  150. } else {
  151. this.onlinePay = response.data.onlinePay
  152. }
  153. })
  154. .catch(error => {
  155. this.$util.msg(error.msg, 2000)
  156. })
  157. },
  158. handlePayunder(){
  159. this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${this.orderId}`)
  160. }
  161. },
  162. onShow() {}
  163. }
  164. </script>
  165. <style lang="scss">
  166. page {
  167. height: auto !important;
  168. background-color: #f7f7f7;
  169. }
  170. .cashier {
  171. width: 100%;
  172. }
  173. .pay-title {
  174. width: 100%;
  175. height: 182rpx;
  176. box-sizing: border-box;
  177. padding: 24rpx 24rpx 0 24rpx;
  178. background-color: #ffffff;
  179. .content {
  180. width: 100%;
  181. height: 100%;
  182. position: relative;
  183. box-sizing: border-box;
  184. padding: 20rpx 100rpx 20rpx 24rpx;
  185. background: url(https://static.caimei365.com/app/img/bg/pay-bgtitle@2x.png) no-repeat;
  186. background-size: cover;
  187. line-height: 40rpx;
  188. font-size: $font-size-26;
  189. text-align: justify;
  190. color: $color-system;
  191. .content-icon {
  192. width: 40rpx;
  193. height: 100%;
  194. position: absolute;
  195. top: 0;
  196. right: 24rpx;
  197. line-height: 158rpx;
  198. .iconfont {
  199. font-size: $font-size-34;
  200. color: $color-system;
  201. text-align: right;
  202. }
  203. }
  204. }
  205. }
  206. .pay-content {
  207. width: 100%;
  208. height: auto;
  209. .pay-list {
  210. width: 100%;
  211. height: auto;
  212. padding: 30rpx 24rpx 30rpx 24rpx;
  213. box-sizing: border-box;
  214. background-color: #ffffff;
  215. margin-bottom: 20rpx;
  216. .pay-list-title {
  217. width: 100%;
  218. height: 42rpx;
  219. line-height: 42rpx;
  220. font-size: $font-size-30;
  221. color: #333333;
  222. margin-bottom: 20rpx;
  223. }
  224. .pay-list-goods {
  225. width: 100%;
  226. height: 180rpx;
  227. margin-bottom: 30rpx;
  228. .pay-list-image {
  229. width: 180rpx;
  230. height: 180rpx;
  231. box-sizing: border-box;
  232. border: 1px solid #e1e1e1;
  233. border-radius: 8rpx;
  234. float: left;
  235. margin-right: 13rpx;
  236. .image {
  237. width: 100%;
  238. height: 100%;
  239. display: block;
  240. border-radius: 8rpx;
  241. }
  242. }
  243. .pay-list-info {
  244. width: 508rpx;
  245. height: 100%;
  246. float: right;
  247. .info-title {
  248. width: 100%;
  249. display: inline-block;
  250. height: auto;
  251. text-overflow: ellipsis;
  252. display: -webkit-box;
  253. word-break: break-all;
  254. -webkit-box-orient: vertical;
  255. -webkit-line-clamp: 2;
  256. overflow: hidden;
  257. line-height: 38rpx;
  258. font-size: $font-size-28;
  259. color: #333333;
  260. }
  261. .info-view {
  262. height: 36rpx;
  263. line-height: 36rpx;
  264. color: #999999;
  265. text-overflow: ellipsis;
  266. display: -webkit-box;
  267. word-break: break-all;
  268. -webkit-box-orient: vertical;
  269. -webkit-line-clamp: 2;
  270. overflow: hidden;
  271. font-size: $font-size-22;
  272. color: #999999;
  273. }
  274. .info-price {
  275. height: 38rpx;
  276. width: 100%;
  277. float: left;
  278. line-height: 38rpx;
  279. font-size: $font-size-26;
  280. .price {
  281. color: #333333;
  282. float: left;
  283. }
  284. .count {
  285. float: right;
  286. color: #666666;
  287. .sm{
  288. font-size: $font-size-22;
  289. }
  290. }
  291. }
  292. }
  293. }
  294. .pay-list-msg {
  295. width: 100%;
  296. height: 40rpx;
  297. line-height: 40rpx;
  298. font-size: $font-size-26;
  299. margin-bottom: 30rpx;
  300. .list-msg {
  301. float: right;
  302. margin-left: 30rpx;
  303. font-size: $font-size-26;
  304. color: #333333;
  305. font-weight: bold;
  306. .text {
  307. font-weight: normal;
  308. &.red {
  309. color: #f94b4b;
  310. }
  311. }
  312. }
  313. }
  314. .pay-list-btn {
  315. width: 100%;
  316. height: 64rpx;
  317. .btn {
  318. width: 160rpx;
  319. height: 64rpx;
  320. line-height: 64rpx;
  321. background: $btn-confirm;
  322. font-size: $font-size-26;
  323. text-align: center;
  324. float: right;
  325. color: #ffffff;
  326. border-radius: 32rpx;
  327. }
  328. .list-msg {
  329. float: right;
  330. line-height: 64rpx;
  331. margin-right: 40rpx;
  332. font-size: $font-size-26;
  333. color: #333333;
  334. font-weight: bold;
  335. .text {
  336. font-weight: normal;
  337. &.red {
  338. color: #f94b4b;
  339. }
  340. }
  341. }
  342. }
  343. }
  344. }
  345. </style>