123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
- <!-- 所有的 css js 资源 -->
- <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="../../static/kj/vue.min.js"></script>
- <script src="../../static/kj/element-ui/index.js"></script>
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- </head>
- <body>
- <div id='account' style="padding: 10px;">
- <el-row :gutter="15">
- <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
- <el-col :span="24">
- <el-form-item label="账户:" prop="accountNo">
- {{formData.accountNo}}
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="总金额:" prop="totalMoney">
- {{formData.totalMoney}}元
- </el-form-item>
- </el-col>
- <el-col :span="24" v-if="sa.isAuth('tb-costomer-account-charge')">
- <el-form-item label="充值(元):" prop="money">
- <el-input-number v-model="money" placeholder="请输入充值金额" :step='1' step-strictly
- :precision='1' controls-position=right :min='0'></el-input-number>
- </el-form-item>
- </el-col>
- <el-col :span="12" v-if="sa.isAuth('tb-costomer-account-charge')">
- <el-form-item label="" prop="field108">
- <el-button type="primary" icon="el-icon-check" size="medium" @click="submitForm"> 确认充值
- </el-button>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="" prop="field109">
- <el-button type="info" icon="el-icon-close" size="medium" @click="sa.closeCurrIframe()"> 关闭
- </el-button>
- </el-form-item>
- </el-col>
- </el-form>
- </el-row>
- <el-dialog title="核验身份" :visible="modal.visible" width="500px">
- <el-form size="mini">
- <div class="c-item br">
- <label class="c-label"><label style="color: red">*</label>登录密码:</label>
- <el-input placeholder="请输入登录密码" v-model="modal.form.password"></el-input>
- </div>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="modal.visible=false">关闭</el-button>
- <el-button type="primary" @click="subFn">确定</el-button>
- </span>
- </el-dialog>
- </div>
- <script>
- var app = new Vue({
- el: '#account',
- data: {
- customerId: sa.p('customerId', 0), // 获取超链接中的id参数(0=添加,非0=修改)
- formData: {
- accountNo: '',
- totalMoney: '',
- lockMoney: '',
- actMoney: '',
- },
- money: '',
- rules: {
- money: [{
- required: true,
- message: '请输入充值金额',
- trigger: 'blur'
- }],
- },
- modal: {
- visible: false,
- form: {
- password: ''
- }
- }
- },
- methods: {
- subFn() {
- },
- submitForm() {
- if (!this.money || this.money < 0) {
- sa.alert('请输入充值金额')
- return;
- }
- sa.ajax('/TbAccount/recharge', {
- customerId: this.customerId,
- money: this.money
- }, function (resp) {
- sa.alert('充值成功');
- setTimeout(() => {
- sa.closeCurrIframe();
- }, 1500)
- }.bind(this))
- },
- getCustomerAccount() {
- sa.ajax('/TbAccount/getCustomerAccount', {
- customerId: this.customerId
- }, function (resp) {
- this.formData = resp.data;
- }.bind(this))
- }
- },
- mounted: function () {
- this.getCustomerAccount()
- }
- })
- </script>
- </body>
- </html>
|