262 lines
9.2 KiB
PHP
262 lines
9.2 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="renderer" content="webkit">
|
|
<?php if ($this->params['site_image']): ?>
|
|
<link rel="shortcut icon" type="image/x-icon" href="<? $this->params['site_image'] ?>"/>
|
|
<?php else: ?>
|
|
<link rel="shortcut icon" type="image/x-icon" href="<?= Yii::$app->request->baseUrl ?>/web/favicon.ico"/>
|
|
<?php endif; ?>
|
|
<title>
|
|
<?php if ($this->params['site_title']): ?>
|
|
<?php echo $this->params['site_title']; ?>
|
|
<?php else: ?>
|
|
应用管理后台
|
|
<?php endif; ?>-修改支付通道
|
|
</title>
|
|
<link rel="stylesheet" type="text/css" href="<?= Yii::$app->request->baseUrl ?>/web/static/css/globle.css"/>
|
|
<script src="<?= Yii::$app->request->baseUrl ?>/web/static/js/config.js" type="text/javascript"
|
|
charset="utf-8"></script>
|
|
</head>
|
|
<style>
|
|
.imgbox {
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
|
|
.checkbox .el-checkbox {
|
|
border: 1px solid #F3F6FB;
|
|
position: relative;
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
|
|
.checklabel-zjtd {
|
|
left: 0px;
|
|
}
|
|
|
|
.checkbox .el-checkbox .el-checkbox__input {
|
|
position: absolute;
|
|
bottom: 5px;
|
|
left: 42px;
|
|
}
|
|
|
|
.channel-icon img {
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
|
|
.namelogo {
|
|
width: 54px;
|
|
height: 54px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.hed-right .el-button {
|
|
height: 38px;
|
|
}
|
|
|
|
.hed-right .btn-jrpt {
|
|
width: 130px;
|
|
}
|
|
|
|
.hed-right .btn-ty {
|
|
width: 104px;
|
|
}
|
|
|
|
.mar_t3 {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.avatar-uploader .el-upload {
|
|
width: 100px;
|
|
height: 100px;
|
|
line-height: 100px;
|
|
}
|
|
|
|
.el-icon-plus:before {
|
|
font-size: 20px;
|
|
}
|
|
</style>
|
|
|
|
<body>
|
|
|
|
|
|
<div class="pHead">
|
|
<div class="publicHeader">
|
|
<?php echo $this->render('@app/views/admin/public/publicHeader.html'); ?>
|
|
</div>
|
|
</div>
|
|
<div class="pLeft">
|
|
<div class="publicAside hei">
|
|
<?php echo $this->render('@app/views/admin/public/publicAside.html'); ?>
|
|
</div>
|
|
</div>
|
|
<!--<div class="upimg">-->
|
|
<!-- <div class="attachment hei">-->
|
|
<?php //echo $this->render('@app/views/admin/public/attachment-img.html'); ?>
|
|
<!--</div>-->
|
|
<!--</div>-->
|
|
<div class="yb_body">
|
|
<div class="layout" id="paymentList" v-cloak>
|
|
<el-container>
|
|
<el-container>
|
|
<el-main>
|
|
<div class="main" style="min-width: 800px">
|
|
<div class="ba_f">
|
|
<div class="main-tab ba_f bor_rad5 pad_tb_30">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tab-pane label="支付通道信息" name="msg">支付通道信息</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
<div class="main-con pad_tb_30" id="pay_channel">
|
|
<div class="flex-bet wid pad_tb_20">
|
|
<div class="flex-grow-0 t_r pad_r_25 right-left"><span class="color_red">*</span>支付通道名称
|
|
</div>
|
|
<div class="flex-grow-1 t_l right-width">
|
|
<el-input v-model="formInline.channel_name" placeholder="支付通道名称"
|
|
class="elinput"></el-input>
|
|
</div>
|
|
</div>
|
|
<div class="flex-bet wid pad_tb_20">
|
|
<div class="flex-grow-0 t_r pad_r_25 right-left"><span class="color_red">*</span>支付通道状态
|
|
</div>
|
|
<div class="flex-grow-1 t_l right-width">
|
|
<el-radio-group v-model="formInline.status">
|
|
<el-radio label="1" value='1'>启用
|
|
</el-radio>
|
|
<el-radio label="2" value='2'>停用
|
|
</el-radio>
|
|
</el-radio-group>
|
|
</div>
|
|
</div>
|
|
<!-- <div class="flex-bet wid pad_tb_20" >-->
|
|
<!-- <div class="flex-grow-0 t_r pad_r_25 right-left">绑定店铺</div>-->
|
|
<!-- <input type="hidden" name="store_id" id="select_store" :value="store_id">-->
|
|
<!-- <div class="flex-grow-1 t_l right-width">-->
|
|
<!-- <el-select v-model="store_id" multiple placeholder="请选择">-->
|
|
<!-- <el-option v-for="item in store_data" :label="item.store_name" :value="item.store_id" >-->
|
|
<!-- </el-option>-->
|
|
<!-- </el-select>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
</div>
|
|
<div class="ba_f mar_t20 pad_30 main-button">
|
|
<el-button type="primary" class="tijiao" @click="onSubmit">保存</el-button>
|
|
</div>
|
|
</div>
|
|
</el-main>
|
|
</el-container>
|
|
</el-container>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
new Vue({
|
|
el: '#paymentList',
|
|
created() {
|
|
const channel_id = utils.GetQueryString("id")
|
|
if (channel_id) {
|
|
console.log(channel_id)
|
|
this.formInline.channel_id = channel_id
|
|
this.getpaymentdetail(channel_id);
|
|
_this = this;
|
|
this.init();
|
|
}
|
|
},
|
|
data: function () {
|
|
return {
|
|
cardLoading: true,
|
|
activeName: 'msg',
|
|
id: '',
|
|
formInline: {
|
|
channel_id: '',
|
|
channel_name: '',
|
|
status: '1',
|
|
},
|
|
store_id: [],
|
|
select1: '',
|
|
select2: '',
|
|
select2Options: [],
|
|
apply_data: [],
|
|
store_data: [],
|
|
select_store_data: [],
|
|
}
|
|
},
|
|
methods: {
|
|
async init() {
|
|
this.getapplylist();
|
|
},
|
|
async getpaymentdetail(channel_id) {
|
|
let params = {
|
|
channel_id: channel_id
|
|
}
|
|
res = await utils.requestGet({ data: params, url: "admin/apply/payment-details" }, this)
|
|
if (res.code == 1) {
|
|
Object.assign(this.formInline,res.data);
|
|
this.cardLoading = false
|
|
this.formInline.channel_id = res.data.channel_id;
|
|
this.formInline.channel_name = res.data.channel_name;
|
|
this.formInline.status= res.data.status;
|
|
this.store_id = res.data.bind_data ? res.data.bind_data : [];
|
|
}
|
|
|
|
},
|
|
//获取平台、店铺列表
|
|
async getapplylist() {
|
|
res = await utils.requestPost({
|
|
data: {'name': 'channel'},
|
|
url: "admin/apply/get-apply-store-info"
|
|
}, this)
|
|
if (res.code == 1) {
|
|
this.apply_data = res.data.apply_data ? res.data.apply_data : [];
|
|
this.store_data = res.data.store_data ? res.data.store_data : [];
|
|
console.log(this.store_data);
|
|
}
|
|
},
|
|
handleClick(tab, event) {
|
|
if (tab.name == 'msg') {
|
|
location.href = "<?= Yii::$app->urlManager->createUrl('admin/apply/platform_add');?>";
|
|
}
|
|
},
|
|
//提交数据
|
|
async onSubmit() {
|
|
const formdata = new FormData()
|
|
if (this.formInline.channel_name == '') {
|
|
this.$message.error('请输入支付通道名称')
|
|
return
|
|
}
|
|
formInline = this.formInline;
|
|
var requstData = {
|
|
channel_id: formInline.channel_id,
|
|
channel_name: formInline.channel_name,
|
|
status: formInline.status,
|
|
store_id: $("#select_store").val(),
|
|
}
|
|
res = await utils.requestPost({
|
|
data: requstData,
|
|
url: "admin/apply/paychannelsave"
|
|
}, this)
|
|
if (res.code == 1) {
|
|
this.$message({
|
|
type: 'success',
|
|
message: '操作成功!',
|
|
duration: 900,
|
|
onClose: () => {
|
|
location.href = "<?= Yii::$app->urlManager->createUrl('admin/apply/platform_payment');?>";
|
|
},
|
|
});
|
|
}
|
|
},
|
|
|
|
}
|
|
})
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|