191 lines
6.4 KiB
PHP
191 lines
6.4 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; ?>
|
|
<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;
|
|
}
|
|
.el-input-width{
|
|
width: 170px;
|
|
}
|
|
</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="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">
|
|
</div>
|
|
<div class="main-con pad_tb_30" id="pay_channel" >
|
|
<form id="from_id">
|
|
<input type="hidden" name="store_id" id="select_store" :value="store_id">
|
|
<input type="hidden" name="apply_id" id="select_store" :value="apply_id">
|
|
<div class="flex-bet wid pad_tb_20" v-for="(item, index) in channel_arr" :key="index" :id="'div_'+index">
|
|
<input type="hidden" name="bind_id[]" :value="bind_id[index]">
|
|
<div class="flex-grow-0 t_r pad_r_25 right-left">选择支付通道:</div>
|
|
<div class="flex-grow-1 t_l right-width">
|
|
<el-select v-model="select_value[index]" placeholder="请选择" name="channel_select[]" :disabled="true">
|
|
<el-option value="">请选择</el-option>
|
|
<el-option v-for="items in payment_channel_data" :label="items.channel_name" :value="items.channel_id" >
|
|
</el-option>
|
|
</el-select>
|
|
交易占比:<el-input v-model="channel_radio_select[index]" name="channel_radio[]" id="channel_radio" class="el-input-width"></el-input><span style="font-weight: bold;color:red;">【*小数填写范围 0=< X <=1】</span>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</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 apply_id = utils.GetQueryString("apply_id")
|
|
const store_id = utils.GetQueryString("store_id")
|
|
this.apply_id = apply_id
|
|
this.store_id = store_id
|
|
this.init();
|
|
},
|
|
data: function () {
|
|
return {
|
|
cardLoading: true,
|
|
activeName: 'msg',
|
|
apply_id: '',
|
|
store_id: '',
|
|
select_value : [],
|
|
channel_radio_select : [],
|
|
bind_id : [],
|
|
payment_channel_data: <?php echo $data ?>,
|
|
channel_arr: <?php echo $select_data_len ?>,
|
|
}
|
|
},
|
|
watch: {
|
|
select_value(newValue) {
|
|
this.select_value = newValue
|
|
}
|
|
},
|
|
methods: {
|
|
async init() {
|
|
//给已选中select赋默认值
|
|
var select_data = <?php echo $select_data ?>;
|
|
for(var i=0;i<select_data.length;i++){
|
|
this.select_value[i] = select_data[i]['channel_id'];
|
|
this.channel_radio_select[i] = select_data[i]['channel_radio'];
|
|
this.bind_id[i] = select_data[i]['id'];
|
|
}
|
|
},
|
|
//提交数据
|
|
async onSubmit() {
|
|
var fd = new FormData(document.querySelector("form"));
|
|
res = await utils.requestPost({
|
|
data: fd,
|
|
url: "admin/apply/payment-radio-save"
|
|
}, this)
|
|
if (res.code == 1) {
|
|
this.$message({
|
|
type: 'success',
|
|
message: '操作成功!',
|
|
duration: 900,
|
|
onClose: () => {
|
|
location.href = "<?= Yii::$app->urlManager->createUrl('admin/apply/platform_storelist');?>"+ "?id=" + this.apply_id;
|
|
},
|
|
});
|
|
}
|
|
},
|
|
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|