tb-account-manager.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta name="viewport"
  6. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
  7. <!-- 所有的 css js 资源 -->
  8. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/vue.min.js"></script>
  11. <script src="../../static/kj/element-ui/index.js"></script>
  12. <script src="../../static/kj/jquery.min.js"></script>
  13. <script src="../../static/kj/layer/layer.js"></script>
  14. <script src="../../static/sa.js"></script>
  15. </head>
  16. <body>
  17. <div id='account' style="padding: 10px;">
  18. <el-row :gutter="15">
  19. <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
  20. <el-col :span="24">
  21. <el-form-item label="账户:" prop="accountNo">
  22. {{formData.accountNo}}
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="24">
  26. <el-form-item label="总金额:" prop="totalMoney">
  27. {{formData.totalMoney}}元
  28. </el-form-item>
  29. </el-col>
  30. <!-- <el-col :span="12">
  31. <el-form-item label="冻结金额" prop="lockMoney">
  32. <el-input v-model="formData.lockMoney" placeholder="请输入冻结金额" :disabled='true' clearable
  33. :style="{width: '100%'}"></el-input>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="12">
  37. <el-form-item label="可用余额" prop="actMoney">
  38. <el-input v-model="formData.actMoney" placeholder="请输入可用余额" :disabled='true' clearable
  39. :style="{width: '100%'}"></el-input>
  40. </el-form-item>
  41. </el-col> -->
  42. <el-col :span="24">
  43. <el-form-item label="充值(元):" prop="money">
  44. <el-input-number v-model="money" placeholder="请输入充值金额" :step='1' step-strictly
  45. :precision='1' controls-position=right :min='0'></el-input-number>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="12">
  49. <el-form-item label="" prop="field108">
  50. <el-button type="primary" icon="el-icon-check" size="medium" @click="submitForm"> 确认充值
  51. </el-button>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="12">
  55. <el-form-item label="" prop="field109">
  56. <el-button type="info" icon="el-icon-close" size="medium" @click="sa.closeCurrIframe()"> 关闭
  57. </el-button>
  58. </el-form-item>
  59. </el-col>
  60. </el-form>
  61. </el-row>
  62. <el-dialog title="核验身份" :visible="modal.visible" width="500px">
  63. <el-form size="mini">
  64. <div class="c-item br">
  65. <label class="c-label"><label style="color: red">*</label>登录密码:</label>
  66. <el-input placeholder="请输入登录密码" v-model="modal.form.password"></el-input>
  67. </div>
  68. </el-form>
  69. <span slot="footer" class="dialog-footer">
  70. <el-button @click="modal.visible=false">关闭</el-button>
  71. <el-button type="primary" @click="subFn">确定</el-button>
  72. </span>
  73. </el-dialog>
  74. </div>
  75. <script>
  76. var app = new Vue({
  77. el: '#account',
  78. data: {
  79. customerId: sa.p('customerId', 0), // 获取超链接中的id参数(0=添加,非0=修改)
  80. formData: {
  81. accountNo: '',
  82. totalMoney: '',
  83. lockMoney: '',
  84. actMoney: '',
  85. },
  86. money: '',
  87. rules: {
  88. money: [{
  89. required: true,
  90. message: '请输入充值金额',
  91. trigger: 'blur'
  92. }],
  93. },
  94. modal: {
  95. visible: false,
  96. form: {
  97. password: ''
  98. }
  99. }
  100. },
  101. methods: {
  102. subFn() {
  103. },
  104. submitForm() {
  105. if (!this.money || this.money < 0) {
  106. sa.alert('请输入充值金额')
  107. return;
  108. }
  109. sa.ajax('/TbAccount/recharge', {
  110. customerId: this.customerId,
  111. money: this.money
  112. }, function (resp) {
  113. this.getCustomerAccount()
  114. }.bind(this))
  115. },
  116. getCustomerAccount() {
  117. sa.ajax('/TbAccount/getCustomerAccount', {
  118. customerId: this.customerId
  119. }, function (resp) {
  120. this.formData = resp.data;
  121. }.bind(this))
  122. }
  123. },
  124. mounted: function () {
  125. this.getCustomerAccount()
  126. }
  127. })
  128. </script>
  129. </body>
  130. </html>