|
|
@@ -17,10 +17,56 @@
|
|
|
<template #table-column-gatheringCode="{scope}">
|
|
|
<el-button type="text" @click="gotoPage(1,scope.row)">查看</el-button>
|
|
|
</template>
|
|
|
+ <!-- 充值 -->
|
|
|
+ <template #slot-apply="{scope}">
|
|
|
+ <el-button type="text" @click="topUp(scope.row.shopName, scope.row.id)">充值</el-button>
|
|
|
+ </template>
|
|
|
</x-crud>
|
|
|
<!-- 用户详情 -->
|
|
|
<balance-detail v-if='showBalanceDetail' @closeFn='showBalanceDetail = false' ref="balanceDetail" :orderOperate="optionData" />
|
|
|
<amount-detail v-if='showAmountDetail' @closeFn='showAmountDetail = false' ref="amountDetail" :orderOperate="optionData" />
|
|
|
+ <el-dialog :visible.sync="wxPayDialog" :close-on-click-modal="false" width="500px" >
|
|
|
+ <el-form
|
|
|
+ :model="topForm"
|
|
|
+ :rules="ruleForm"
|
|
|
+ ref="adForm"
|
|
|
+ label-width="80px"
|
|
|
+ class="demo-form"
|
|
|
+ >
|
|
|
+ <el-form-item
|
|
|
+ label="充值门店"
|
|
|
+ style="text-align: left;"
|
|
|
+ >
|
|
|
+ <span>{{dialogTitle}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="充值金额"
|
|
|
+ prop="amount"
|
|
|
+ style="text-align: left;"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入充值金额"
|
|
|
+ size="small"
|
|
|
+ v-model="topForm.amount"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="登录密码"
|
|
|
+ prop="password"
|
|
|
+ style="text-align: left;"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入登录密码"
|
|
|
+ size="small"
|
|
|
+ v-model="topForm.password"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="resetForm">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="submitForm">确认</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -36,6 +82,17 @@
|
|
|
showBalanceDetail: false,
|
|
|
showAmountDetail: false,
|
|
|
optionData: {},
|
|
|
+ wxPayDialog: false,
|
|
|
+ dialogTitle: '',
|
|
|
+ topForm: {
|
|
|
+ shopId: '',
|
|
|
+ amount: '',
|
|
|
+ password: '',
|
|
|
+ },
|
|
|
+ ruleForm: {
|
|
|
+ amount: [{ required: true, message: '请输入充值金额', trigger: 'blur' }],
|
|
|
+ password: [{ required: true, message: '请输入登录密码', trigger: 'blur' }],
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -129,16 +186,16 @@
|
|
|
],
|
|
|
// 操作列
|
|
|
op: {
|
|
|
- visible: true, // 是否显示
|
|
|
- // 同 element-ui Table-column Attributes
|
|
|
- props: {
|
|
|
- width: 150,
|
|
|
- align: 'center',
|
|
|
- fixed: 'right',
|
|
|
- label: '操作'
|
|
|
- },
|
|
|
- // 布局,请移步 `layout`
|
|
|
- layout: []
|
|
|
+ visible: true, // 是否显示
|
|
|
+ // 同 element-ui Table-column Attributes
|
|
|
+ props: {
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'right',
|
|
|
+ label: '操作'
|
|
|
+ },
|
|
|
+ // 布局,请移步 `layout`
|
|
|
+ layout: ['slot-apply']
|
|
|
}
|
|
|
})
|
|
|
.set('layout', [
|
|
|
@@ -150,7 +207,30 @@
|
|
|
.done();
|
|
|
app.refresh();
|
|
|
},
|
|
|
-
|
|
|
+ // 充值
|
|
|
+ topUp(name, id) {
|
|
|
+ this.dialogTitle = name
|
|
|
+ this.topForm.shopId = id
|
|
|
+ this.wxPayDialog = true
|
|
|
+ },
|
|
|
+ resetForm () {
|
|
|
+ this.$refs['adForm'].resetFields();
|
|
|
+ this.wxPayDialog = false;
|
|
|
+ },
|
|
|
+ submitForm () {
|
|
|
+ this.$refs['adForm'].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ console.log(1111)
|
|
|
+ console.log(this.topForm)
|
|
|
+ this.$service.saasShop.rechargeBalance(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
detailShowFn(item){
|
|
|
this.optionData = item;
|
|
|
this.showBalanceDetail = true;
|