user_pay.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>用户请款情况</title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="../../css/mui.min.css" rel="stylesheet" />
  8. <link href="../../css/animate.min.css" rel="stylesheet" />
  9. <style>
  10. .mui-bar-nav~.mui-content{padding-top: 55px;margin-bottom: 50px;}
  11. .ht{margin-top: 11px;padding: 5px;background-color: #fffbee;color: #ed9f2b;font-size: 11px;}
  12. .warn{display: block;padding-top: 11px;text-align: center;}
  13. .name{font-weight: bold;font-size: 17px;}
  14. .icon{font-size:17px;}
  15. .right{float: right;color: #FF5722;}
  16. .yh{font-size: 13px;padding: 10px 0px 0px 0px;color: darkgray;}
  17. .yh .sp{padding-right: 15px;}
  18. .sps{background: #00B5AD;padding: 1px 6px;border-radius: 3px;color: white;text-align: center;}
  19. .s{color: darkgray;font-size: 13px;}
  20. .row{font-size: 14px;padding-top: 10px;}
  21. .sm2{color: #4c4848;}
  22. .dc{padding-right: 10px;font-size: 13px;}
  23. .i{color: #00a0ea;}
  24. .item{border-top: 1px solid #ececec;margin-top: 10px;padding-top: 15px;font-size: 14px;}
  25. .dd{padding:5px;margin:0;border: 0;}
  26. .dz{font-size: 12px;color: darkgray;}
  27. .gs{padding-top: 11px;font-size: 48px;display: block;color: #00a0ea;}
  28. .nr{font-size: 13px;color: #4a4747;}
  29. .footer{color: white;position: fixed;background-color: #00a0ea;padding-top: 15px;width: 100%;bottom: 0;height: 52px;text-align: center;}
  30. .model{}
  31. .bbv{padding: 15px 18px 0px 18px;color: #7a7a7a;font-size: 14px;}
  32. .bor{border-left: 5px solid #00a0ea;padding-right: 5px;}
  33. .lyy{float: right;}
  34. .bbcs{color:#585858;padding: 12px;font-size: 14px;border-bottom: 1px solid #eaeaea;}
  35. .bbcs:last-child{border: 0px;}
  36. .btn{padding: 5px 18px;font-weight: normal;font-size: 14px;margin-top: -7px;}
  37. [v-cloak] {display: none;}
  38. </style>
  39. </head>
  40. <body>
  41. <div id="app" v-cloak>
  42. <header class="mui-bar mui-bar-nav">
  43. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  44. <h1 class="mui-title">用户请款情况</h1>
  45. </header><div class="model" style="padding-bottom: 20px;">></div>
  46. <div class="model" style="padding-bottom: 20px;">
  47. <div class="bbcs" v-for="(item,index) in item">用户:{{item.nickName}} 联系方式:{{item.account}} 银行卡号:{{item.kh}}
  48. <div class="lyy" @click="qrdk(item)" v-if="item.state===0">
  49. <button class="btn">请确认付款</button>
  50. </div>
  51. <div class="lyy" @click="contract(item,1)" style="color: #98ff72;"
  52. v-else-if="item.state===1">已同意付款</div>
  53. </div>
  54. </div>
  55. <!--
  56. <div class="mui-content">
  57. <div class="model" v-for="(item,index) in item">
  58. <div class="item dd">{{item.nickName}} {{item.account}} {{item.kh}}
  59. <div class="lyy" style="color: #ffba18;" @click="qrdk(item)" v-if="item.state===0">请确认付款</div>
  60. <div class="lyy" style="color: #00B5AD;" v-else-if="item.state===1">已同意付款</div>
  61. <div class="lyy" style="color: #98ff72;" v-if="item.state=='1' && item.finance=='0'">待请款</div>
  62. <div class="lyy" @click="qrdk(item)" style="color: #00B5AD;" v-if="item.state=='1' && item.finance=='1'">请款中请确认打款</div>
  63. <div class="lyy" style="color: #0000ff;" v-if="item.state=='2' && item.finance=='2'">已完成</div>
  64. </div>
  65. </div>
  66. </div>
  67. -->
  68. </div>
  69. <script src="../../js/mui.min.js"></script>
  70. <script src="../../js/app.js"></script>
  71. <script src="../../js/vue.min.js"></script>
  72. <script type="text/javascript">
  73. var vm = new Vue({
  74. el: "#app",
  75. data: {
  76. item: {},
  77. resume: {},
  78. msg: '我要报名',
  79. qitem: {}
  80. },
  81. mounted: function() {
  82. mui.plusReady(function() {
  83. request(urls().user_payapp, {
  84. parttime_id: plus.webview.currentWebview().param.parttime_id,
  85. userId: plus.webview.currentWebview().param.userId
  86. }, function(res) {
  87. console.log("res===" + JSON.stringify(res));
  88. vm.item = res.data;
  89. // if (res.result == true) {
  90. // mui.toast("操作成功");
  91. // plus.webview.getWebviewById("user_pay").reload(true);
  92. // }
  93. //vm.item.mTime = vm.item.mTime.substring(0, 11)
  94. plus.nativeUI.closeWaiting();
  95. })
  96. })
  97. },
  98. methods: {
  99. //确认打款
  100. qrdk: function(item) {
  101. console.log("items===" + JSON.stringify(item));
  102. if (confirm("请确认向该用户打款!!")) {
  103. console.log("确认======")
  104. vm.qitem.userId = getUser().id;
  105. vm.qitem.type = 1;
  106. vm.qitem.state = 0;
  107. vm.qitem.p_id = item.id;
  108. vm.qitem.pay_mode = item.pay_mode;
  109. vm.qitem.Payee = item.Payee;
  110. vm.qitem.q_date = item.q_date;
  111. vm.qitem.amount = item.amount;
  112. vm.qitem.parttime_id = item.parttime_id;
  113. vm.qitem.contract_id = item.contract_id;
  114. vm.qitem.remark = item.remark;
  115. request(urls().finance_app, vm.qitem, function(res) {
  116. plus.nativeUI.closeWaiting();
  117. if (res.result == true) {
  118. vm.msg = '已打款'
  119. mui.toast('已打款');
  120. plus.nativeUI.closeWaiting();
  121. } else {
  122. mui.alert(res.msg);
  123. }
  124. })
  125. } else {
  126. console.log("取消确认======")
  127. }
  128. },
  129. //合同详情
  130. contract: function(id, index) {
  131. if (index == 0) {
  132. open('detail', 'contract.html', id, 'slide-in-bottom');
  133. }
  134. if (index == 1) {
  135. open('detail', 'contract_detail.html', id, 'slide-in-bottom');
  136. }
  137. },
  138. }
  139. })
  140. </script>
  141. </body>
  142. </html>