配置
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
|
||||
<el-table v-loading="loading" :data="payTrdConfigList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="启用" align="center" prop="enableStatus" >
|
||||
<el-table-column label="启用支付宝" align="center" prop="enableStatus" >
|
||||
<template v-slot="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.enableStatus"
|
||||
@@ -55,13 +55,24 @@
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="启用微信" align="center" prop="enableWxStatus" >
|
||||
<template v-slot="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.enableWxStatus"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="handleOpenWxStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付类型" align="center" prop="type" />
|
||||
<el-table-column label="最小金额" align="center" prop="minAmount" />
|
||||
<el-table-column label="最大金额" align="center" prop="maxAmount" />
|
||||
<el-table-column label="排序" align="center" prop="sortBy" />
|
||||
<el-table-column label="支付名称" align="center" prop="name" />
|
||||
<el-table-column label="商户ID" align="center" prop="mchId" />
|
||||
<el-table-column label="支付宝产品ID" align="center" prop="aliProductId" />
|
||||
<el-table-column label="支付宝ID" align="center" prop="aliProductId" />
|
||||
<el-table-column label="微信ID" align="center" prop="wxProductId" />
|
||||
<el-table-column label="请求域名" align="center" prop="gatewayUrl" show-overflow-tooltip />
|
||||
<el-table-column label="回调域名" align="center" prop="notifyUrl" show-overflow-tooltip />
|
||||
<el-table-column label="秘钥" align="center" prop="sign" show-overflow-tooltip />
|
||||
@@ -206,7 +217,22 @@ export default {
|
||||
}).catch(function() {
|
||||
row.enableStatus = row.enableStatus === 1 ? 0 : 1
|
||||
})
|
||||
}
|
||||
},
|
||||
handleOpenWxStatusChange(row){
|
||||
let text = row.enableWxStatus === 0 ? '关闭' : '启用'
|
||||
this.$confirm('确认要' + text + '该配置吗?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
return updatePayTrdConfig({ id: row.id, enableWxStatus: row.enableWxStatus })
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + '成功')
|
||||
this.getList()
|
||||
}).catch(function() {
|
||||
row.enableWxStatus = row.enableWxStatus === 1 ? 0 : 1
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="支付类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="支付类型" size="small">
|
||||
<el-option key="V1" label="V1" value="V1" />
|
||||
@@ -30,6 +30,9 @@
|
||||
<el-form-item label="支付宝产品ID" prop="aliProductId">
|
||||
<el-input v-model="form.aliProductId" placeholder="请输入支付宝产品ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信产品ID" prop="wxProductId">
|
||||
<el-input v-model="form.wxProductId" placeholder="请输入微信产品ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="请求域名" prop="gatewayUrl">
|
||||
<el-input v-model="form.gatewayUrl" placeholder="请输入请求域名" />
|
||||
</el-form-item>
|
||||
@@ -66,6 +69,7 @@ export default {
|
||||
maxAmount: 0,
|
||||
sortBy: 0,
|
||||
aliProductId: undefined,
|
||||
wxProductId: undefined,
|
||||
gatewayUrl: undefined,
|
||||
notifyUrl: undefined,
|
||||
sign: undefined,
|
||||
|
||||
Reference in New Issue
Block a user