order-payunder.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. <template>
  2. <view class="container cashier">
  3. <view class="container-cash clearfix">
  4. <view class="pay-bring-title" v-if="onlinePay == 2">{{payBringTitle}}</view>
  5. <view class="container-wrapper">
  6. <view class="pay-content">
  7. <view class="pay-p"><text>待付金额</text></view>
  8. <view class="pay-money">
  9. <text class="pay-sm">¥</text>
  10. <text class="pay-bg">{{payableAmount | NumFormat}}</text>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="pay-bring-wrapper clearfix">
  15. <view class="pay-bring-content">
  16. <view class="text-v title">转账信息</view>
  17. <view class="text-v">开户行:华夏银行深圳分行营业部</view>
  18. <view class="text-v">银行卡号:{{bankNumber}}</view>
  19. <view class="text-v">户名:周倩如</view>
  20. <view class="text-v">订单标识:{{payOrderId}} <text class="clipboard" @click.stop="clipboard(payOrderId)">复制</text></view>
  21. <view class="text-v title">特别注意</view>
  22. <view class="text-v bg-color">请在转账备注中填写上述订单标识,方便财务快速审核,提高发货速度</view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. const thorui = require('@/components/clipboard/clipboard.thorui.js')
  30. import bankMixins from '@/mixins/bankMixins.js'
  31. export default{
  32. mixins: [bankMixins],
  33. data(){
  34. return{
  35. orderId:'',
  36. payableAmount:0,
  37. emptyWrapperH: '',
  38. bankNumber:'6230 2100 9221 2400',
  39. payOrderId:'',
  40. isIphoneX:this.$store.state.isIphoneX,
  41. CustomBar:this.CustomBar,// 顶部导航栏高度
  42. tabCurrentIndex:0,
  43. isReceiptStatus:false,
  44. buttonText:'使用微信支付',
  45. btnColor:'#09BB07',
  46. receiptStatus:'',
  47. onlinePay:1,
  48. optionType:'',
  49. onlinePayFlag:'',
  50. payBringTitle:'本次交易暂不支持线上支付,请使用线下转账方式付款',
  51. payStatusText:'使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。',
  52. pageType:''
  53. }
  54. },
  55. onLoad(option) {
  56. this.initData(option)
  57. },
  58. filters: {
  59. NumFormat(value) {
  60. if(!value) return '0.00'
  61. /*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
  62. /*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
  63. var intPart = Number(value) - Number(value)%1 //获取整数部分(这里是windy93的方法)
  64. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') //将整数部分逢三一断
  65. var floatPart = '.00' //预定义小数部分
  66. var value2Array = value.toString().split('.')
  67. //=2表示数据有小数位
  68. if(value2Array.length == 2) {
  69. floatPart = value2Array[1].toString() //拿到小数部分
  70. if(floatPart.length == 1) { //补0,实际上用不着
  71. return intPartFormat + '.' + floatPart + '0'
  72. } else {
  73. return intPartFormat + '.' + floatPart
  74. }
  75. } else {
  76. return intPartFormat + floatPart
  77. }
  78. }
  79. },
  80. methods:{
  81. initData(e){
  82. console.log(e)
  83. this.orderId = e.orderId
  84. this.payOrderId ='#'+e.orderId+'#'
  85. this.PayOrderCheckoutCounter(this.orderId)
  86. },
  87. PayOrderCheckoutCounter(orderId){
  88. this.PayService.PayOrderCheckoutCounter({orderId:orderId}).then(response =>{
  89. let data = response.data.order
  90. this.payableAmount = data.payableAmount - data.receiptAmount //待付金额
  91. this.receiptStatus = data.receiptStatus
  92. this.onlinePayFlag = data.onlinePayFlag
  93. //判断线上线下显示
  94. if(this.optionType == 'onlinePay'){
  95. this.onlinePay = 2
  96. }else{
  97. this.onlinePay = response.data.onlinePay
  98. }
  99. }).catch(error =>{
  100. this.$util.msg(error.msg,2000)
  101. })
  102. },
  103. clipboard(data) {
  104. thorui.getClipboardData(data, (res) => {
  105. if (res) {
  106. this.$util.msg('复制成功',2000,true,'success')
  107. } else {
  108. this.$util.msg('复制失败',2000,true,'none')
  109. }
  110. })
  111. },
  112. },
  113. onShow() {
  114. }
  115. }
  116. </script>
  117. <style lang="scss">
  118. page{
  119. height: auto !important;
  120. background-color: #FFFFFF;
  121. }
  122. .container-cash{
  123. width: 100%;
  124. padding-bottom: 250rpx;
  125. .pay-bring-title{
  126. box-sizing: border-box;
  127. width: 100%;
  128. min-height: 96rpx;
  129. padding: 20rpx 24rpx;
  130. line-height: 48rpx;
  131. text-align: left;
  132. font-size: $font-size-24;
  133. background:rgba(255,234,221,1);
  134. color: $color-system;
  135. }
  136. .container-wrapper{
  137. width:662rpx;
  138. margin: 0 auto;
  139. .pay-title{
  140. font-size: $font-size-32;
  141. line-height: 44rpx;
  142. text-align: center;
  143. color: #2A86FF;
  144. margin: 40rpx 0 0 0;
  145. width: 100%;
  146. float: left;
  147. }
  148. .pay-content{
  149. width: 574rpx;
  150. height: 136rpx;
  151. padding: 52rpx 44rpx;
  152. background: url(https://img.caimei365.com/group1/M00/03/BD/Cmis218ekFyAHoAzAALhR3oBpDI049.png) no-repeat;
  153. background-size: cover;
  154. float: left;
  155. margin-top: 40rpx;
  156. .pay-p{
  157. font-size: $font-size-26;
  158. color: #FFFFFF;
  159. line-height: 36rpx;
  160. }
  161. .pay-money{
  162. color: #FFFFFF;
  163. line-height: 84rpx;
  164. font-weight: bold;
  165. .pay-sm{
  166. font-size: $font-size-26;
  167. }
  168. .pay-bg{
  169. font-size: 50rpx;
  170. }
  171. }
  172. }
  173. .pay-check{
  174. width: 100%;
  175. height: auto;
  176. float: left;
  177. .check-title{
  178. width: 622rpx;
  179. height: 40rpx;
  180. line-height: 40rpx;
  181. padding: 0 20rpx;
  182. margin-top: 24rpx;
  183. .text{
  184. font-size: $font-size-28;
  185. color: $text-color;
  186. text-align: left;
  187. float: left;
  188. }
  189. .icon{
  190. width: 40rpx;
  191. height: 40rpx;
  192. border-radius: 50%;
  193. line-height: 40rpx;
  194. text-align: center;
  195. color: #FFFFFF;
  196. font-size: $font-size-24;
  197. background: radial-gradient(circle,rgba(225,86,22,1) 0%,rgba(255,170,0,1) 67%,rgba(249,185,156,1) 100%);
  198. float: right;
  199. }
  200. }
  201. .pay-checked{
  202. width: 100%;
  203. height: auto;
  204. .pay-item{
  205. width: 618rpx;
  206. height: 96rpx;
  207. border: 2px solid #F5F5F5;
  208. border-radius: 30rpx;
  209. padding: 20rpx;
  210. margin: 24rpx 0;
  211. display: flex;
  212. background-color: #FFFFFF;
  213. &.current{
  214. border-color:$color-system;
  215. .item-r{
  216. .icon-duigou{
  217. color: $color-system;
  218. }
  219. }
  220. }
  221. .item-l{
  222. flex: 8;
  223. .item-icon{
  224. width: 96rpx;
  225. height: 96rpx;
  226. float: left;
  227. text-align: center;
  228. line-height: 96rpx;
  229. margin-right: 20rpx;
  230. .iconfont{
  231. font-size:88rpx;
  232. }
  233. .icon-weixinzhifu{
  234. color: #09BB07;
  235. }
  236. .icon-gerenwangyinzhifu{
  237. color: #034582;
  238. }
  239. .icon-daewangyinzhuanzhang{
  240. font-size: 68rpx;
  241. color: #034582;
  242. }
  243. .icon-qiyewangyinzhifu{
  244. color: #004889;
  245. }
  246. }
  247. .item-texts{
  248. line-height: 96rpx;
  249. font-size:$font-size-26;
  250. color: $text-color;
  251. }
  252. .item-text{
  253. line-height: 48rpx;
  254. font-size:$font-size-26;
  255. .txt-p{
  256. color: $text-color;
  257. }
  258. .txt-t{
  259. font-size: $font-size-24;
  260. color: #999999;
  261. }
  262. }
  263. }
  264. .item-r{
  265. flex: 2;
  266. text-align: center;
  267. line-height: 96rpx;
  268. .icon-duigou{
  269. font-size: 60rpx;
  270. color: #FFFFFF;
  271. }
  272. }
  273. }
  274. }
  275. }
  276. }
  277. .pay-button{
  278. width: 100%;
  279. float: left;
  280. margin-top:30rpx;
  281. .btn{
  282. width: 662rpx;
  283. height: 88rpx;
  284. border-radius: 44rpx;
  285. font-size: $font-size-28;
  286. line-height: 88rpx;
  287. color: #FFFFFF;
  288. margin: 0 auto;
  289. text-align: center;
  290. background:$btn-confirm;
  291. }
  292. }
  293. .pay-statustext{
  294. width: 100%;
  295. height: auto;
  296. float: left;
  297. margin-top:40rpx;
  298. .pay-statustext-inner{
  299. width: 662rpx;
  300. height: 100%;
  301. margin: 0 auto;
  302. .pay-icon{
  303. width: 62rpx;
  304. height: 100%;
  305. float: left;
  306. text-align: center;
  307. .iconfont{
  308. color: #FF2A2A;
  309. font-size:$font-size-36;
  310. line-height: 20rpx;
  311. }
  312. }
  313. .pay-text{
  314. width: 560rpx;
  315. height: 100%;
  316. float: left;
  317. line-height: 40rpx;
  318. font-size: $font-size-24;
  319. color: #FF2A2A;
  320. text-align: justify;
  321. }
  322. }
  323. }
  324. .pay-bring{
  325. width: 100%;
  326. min-height: 190rpx;
  327. padding: 24rpx 0;
  328. background-color: #FFFFFF;
  329. box-shadow:0px 3px 6px rgba(0,0,0,0.16);
  330. position: fixed;
  331. bottom: 0;
  332. left: 0;
  333. border-radius: 30rpx 30rpx 0 0;
  334. display: flex;
  335. align-items: center;
  336. flex-direction: column;
  337. .pay-bring-line{
  338. display: flex;
  339. align-items: center;
  340. .line{
  341. display: inline-block;
  342. width: 48rpx;
  343. height: 2px;
  344. background-color: #707070;
  345. }
  346. }
  347. .pay-bring-content{
  348. width: 654rpx;
  349. height: auto;
  350. padding: 0 24rpx;
  351. .text{
  352. font-size: $font-size-24;
  353. color: #666;
  354. line-height: 44rpx;
  355. text-align: center;
  356. &.bg-color{
  357. color: $color-system;
  358. line-height: 88rpx;
  359. }
  360. }
  361. .text-v{
  362. font-size: $font-size-28;
  363. color: #999;
  364. line-height: 70rpx;
  365. text-align: left;
  366. &.title{
  367. font-size: $font-size-26;
  368. color: #666666;
  369. }
  370. &.bg-color{
  371. line-height: 44rpx;
  372. color: $color-system;
  373. }
  374. .clipboard{
  375. width: 84rpx;
  376. height: 36rpx;
  377. background:linear-gradient(34deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
  378. text-align: center;
  379. font-size: $font-size-24;
  380. color: #FFFFFF;
  381. border-radius: 4rpx;
  382. line-height: 36rpx;
  383. display: inline-block;
  384. margin-left: 10rpx;
  385. }
  386. }
  387. }
  388. }
  389. .pay-bring-wrapper{
  390. width: 100%;
  391. padding: 24rpx 0;
  392. background-color: #FFFFFF;
  393. display: flex;
  394. align-items: center;
  395. flex-direction: column;
  396. .pay-bring-content{
  397. width: 654rpx;
  398. height: auto;
  399. padding: 0 24rpx;
  400. .text{
  401. font-size: $font-size-24;
  402. color: #666;
  403. line-height: 44rpx;
  404. text-align: center;
  405. &.bg-color{
  406. color: $color-system;
  407. line-height: 88rpx;
  408. }
  409. }
  410. .text-v{
  411. font-size: $font-size-28;
  412. color: #999;
  413. line-height: 70rpx;
  414. text-align: left;
  415. &.title{
  416. font-size: $font-size-28;
  417. color: #666666;
  418. }
  419. &.bg-color{
  420. line-height: 44rpx;
  421. color: $color-system;
  422. }
  423. .clipboard{
  424. width: 84rpx;
  425. height: 36rpx;
  426. background:linear-gradient(34deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
  427. text-align: center;
  428. font-size: $font-size-24;
  429. color: #FFFFFF;
  430. border-radius: 4rpx;
  431. line-height: 36rpx;
  432. display: inline-block;
  433. margin-left: 10rpx;
  434. }
  435. }
  436. }
  437. }
  438. }
  439. .freight-alert{
  440. width: 100%;
  441. height: 100%;
  442. background: rgba(0,0,0,.5);
  443. position: fixed;
  444. top: 0;
  445. left: 0;
  446. z-index: 8888;
  447. transition: all 0.4s;
  448. &.none{
  449. display: none;
  450. }
  451. &.show{
  452. display: block;
  453. }
  454. .content{
  455. width: 422rpx;
  456. height:434rpx;
  457. position: absolute;
  458. background: $bg-color;
  459. left: 0;
  460. right: 0;
  461. bottom: 0;
  462. top: 0;
  463. margin: auto;
  464. padding: 20rpx 32rpx;
  465. border-radius: 12rpx;
  466. .title{
  467. width: 100%;
  468. height: 68rpx;
  469. line-height: 68rpx;
  470. font-size: $font-size-28;
  471. color: $text-color;
  472. text-align: center;
  473. position: relative;
  474. .icon-iconfontguanbi{
  475. width: 68rpx;
  476. height: 68rpx;
  477. text-align: center;
  478. line-height: 68rpx;
  479. position: absolute;
  480. right: 0;
  481. top: 0;
  482. font-size: $font-size-36;
  483. color: #999999;
  484. }
  485. }
  486. .text-content{
  487. width: 100%;
  488. height: auto;
  489. .text{
  490. padding: 20rpx 0;
  491. line-height: 44rpx;
  492. font-size: $font-size-26;
  493. color:#666666;
  494. text-align: justify;
  495. }
  496. .text-p{
  497. line-height: 44rpx;
  498. font-size: $font-size-26;
  499. color:$color-system;
  500. text-align: left;
  501. }
  502. }
  503. }
  504. }
  505. </style>